Example: using ivy-master/examples/pld16/learning_switch.ivy
Command line: ivy_check diagnose=true debug=true trace=true learning_switch.ivy
Tried this on macOS Catalina 10.15 and Linux
- The example has uninterpreted types
type packet
type node
This runs correctly and if I comment out the last conjecture within learning_switch.ivy produces a failing trace
- when I change type packet to an enumerated type
type packet = {arp,ip}
type node
And don't comment out the last conjecture the the verification is successful, but when I comment out the last conjecture I get the following:
learning_switch.ivy: line 120: (no name) ... FAIL
searching for a small model... done
warning: model doesn't give a value for enumerated term __loc:p. returning arp.
warning: model doesn't give a value for enumerated term __loc:p. returning arp.
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/ivy_check", line 11, in
load_entry_point('ms-ivy==0.1', 'console_scripts', 'ivy_check')()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_check.py", line 696, in main
check_module()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_check.py", line 675, in check_module
check_isolate()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_check.py", line 544, in check_isolate
summarize_isolate(mod)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_check.py", line 460, in summarize_isolate
check_conjs_in_state(mod,ag,post,indent=12)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_check.py", line 328, in check_conjs_in_state
return check_fcs_in_state(mod,ag,post,[ConjChecker(c,indent) for c in lcs])
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_check.py", line 304, in check_fcs_in_state
handler = MatchHandler(mclauses,model,vocab)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_check.py", line 209, in init
mod_clauses = islv.clauses_model_to_clauses(clauses,model=model,numerals=True)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_solver.py", line 1232, in clauses_model_to_clauses
res = model_facts(h,ignore,clauses1)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_solver.py", line 1177, in model_facts
for l in relation_model_to_clauses(h,r,n)]
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_solver.py", line 1364, in relation_model_to_clauses
get_lit_facts(h,lit,res)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_solver.py", line 1372, in get_lit_facts
vs,rows = h.check(lit)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_solver.py", line 734, in check
ranges = [self.constants[x.sort] for x in vs]
KeyError: EnumeratedSort('packet', ('arp', 'ip'))
- When change type node
type packet
type node = {bridge, router}
And don't comment out the last conjecture I get the following:
Initialization must establish the invariant
learning_switch.ivy: line 24: route(N:node) ... PASS
learning_switch.ivy: line 25: route(N:node) ... PASS
learning_switch.ivy: line 26: route(N:node) ... FAIL
searching for a small model... done
warning: model doesn't give a value for enumerated term __N. returning bridge.
warning: model doesn't give a value for enumerated term __N. returning bridge.
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/ivy_check", line 11, in
load_entry_point('ms-ivy==0.1', 'console_scripts', 'ivy_check')()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_check.py", line 696, in main
check_module()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_check.py", line 675, in check_module
check_isolate()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_check.py", line 544, in check_isolate
summarize_isolate(mod)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_check.py", line 435, in summarize_isolate
check_conjs_in_state(mod,ag,ag.states[0])
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_check.py", line 328, in check_conjs_in_state
return check_fcs_in_state(mod,ag,post,[ConjChecker(c,indent) for c in lcs])
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_check.py", line 304, in check_fcs_in_state
handler = MatchHandler(mclauses,model,vocab)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_check.py", line 209, in init
mod_clauses = islv.clauses_model_to_clauses(clauses,model=model,numerals=True)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_solver.py", line 1232, in clauses_model_to_clauses
res = model_facts(h,ignore,clauses1)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_solver.py", line 1177, in model_facts
for l in relation_model_to_clauses(h,r,n)]
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_solver.py", line 1364, in relation_model_to_clauses
get_lit_facts(h,lit,res)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_solver.py", line 1372, in get_lit_facts
vs,rows = h.check(lit)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ms_ivy-0.1-py2.7.egg/ivy/ivy_solver.py", line 734, in check
ranges = [self.constants[x.sort] for x in vs]
KeyError: EnumeratedSort('node', ('bridge', 'router'))