IVy is a research tool intended to allow interactive development of protocols and their proofs of correctness and to provide a platform for developing and experimenting with automated proof techniques. In particular, IVy provides interactive visualization of automated proofs, and supports a use model in which the human protocol designer and the automated tool interact to expose errors and prove correctness.
The above script when verified using $ ivy_check study_interference.ivy, checks OK.
However, when attempting to generate C++ codes, it provides the following errors.
Using target=test
$ ivyc isolate=iso_foo target=test study_interference.ivy
error: cannot strip parameter t from bit
$ ivyc isolate=iso_foo target=test build=true study_interference.ivy
error: cannot strip parameter t from bit
$ ivy_to_cpp isolate=iso_foo target=test study_interference.ivy
error: cannot strip parameter t from bit
$ ivy_to_cpp isolate=iso_foo target=test build=true study_interference.ivy
error: cannot strip parameter t from bit
2. Using `target=repl` + with/without `build=true`
$ ivyc isolate=iso_foo target=repl build=true study_interference.ivy
error: cannot strip parameter t from bit
$ ivyc isolate=iso_foo target=repl study_interference.ivy
error: cannot strip parameter t from bit
$ ivy_to_cpp isolate=iso_foo target=repl build=true study_interference.ivy
error: cannot strip parameter t from bit
$ ivy_to_cpp isolate=iso_foo target=repl study_interference.ivy
error: cannot strip parameter t from bit
The following action implementations are present:
study_interference.ivy: line 14: implementation of foo.flip
The following initializers are present:
study_interference.ivy: line 9: foo.init[after1]
Any assertions in initializers must be checked ... PASS
OK
However, when we attempt to compile this to cpp, we obtain some errors.
1. Produces no messages on terminal. No executable is generated.
Based on the example provided in Networking Tutorial
Script derived from above tutorial
The above script when verified using
$ ivy_check study_interference.ivy
, checksOK
. However, when attempting to generate C++ codes, it provides the following errors.target=test
$ ivyc isolate=iso_foo target=test build=true study_interference.ivy error: cannot strip parameter t from bit
$ ivy_to_cpp isolate=iso_foo target=test study_interference.ivy error: cannot strip parameter t from bit
$ ivy_to_cpp isolate=iso_foo target=test build=true study_interference.ivy error: cannot strip parameter t from bit
$ ivyc isolate=iso_foo target=repl build=true study_interference.ivy error: cannot strip parameter t from bit
$ ivyc isolate=iso_foo target=repl study_interference.ivy error: cannot strip parameter t from bit
$ ivy_to_cpp isolate=iso_foo target=repl build=true study_interference.ivy error: cannot strip parameter t from bit
$ ivy_to_cpp isolate=iso_foo target=repl study_interference.ivy error: cannot strip parameter t from bit
lang ivy1.7
type t
module foomodule = {
}
instance foo(X:t) :foomodule export foo.flip
extract iso_foo(me:t) = foo(me)
$ ivy_check study_interference.ivy
Isolate this:
OK
$ ivy_to_cpp isolate=iso_foo target=repl study_interference.ivy
$ ivy_to_cpp isolate=iso_foo target=repl build=true study_interference.ivy g++ -g -o study_interference study_interference.cpp -pthread
$ ./study_interference 1
$ ivy_to_cpp isolate=iso_foo target=test build=true study_interference.ivy g++ -I /home/user/.local/lib/python2.7/site-packages/ivy/include -L /home/user/.local/lib/python2.7/site-packages/ivy/lib -Wl,-rpath=/home/user/.local/lib/python2.7/site-packages/ivy/lib -g -o study_interference study_interference.cpp -lz3 -pthread study_interference.cpp: In member function ‘virtual void extfooflip_gen::execute(study_interference&)’: study_interference.cpp:1244:35: error: no matching function for call to ‘study_interference::extfooflip(int&, int&)’ obj.extfooflip(prmX,self); ^ study_interference.cpp:1113:6: note: candidate: virtual void study_interference::extfoo__flip(int) void study_interference::extfooflip(int self){ ^
~~~~~ study_interference.cpp:1113:6: note: candidate expects 1 argument, 2 provided$ ivyc isolate=iso_foo target=test build=true study_interference.ivy g++ -I /home/user/.local/lib/python2.7/site-packages/ivy/include -L /home/user/.local/lib/python2.7/site-packages/ivy/lib -Wl,-rpath=/home/user/.local/lib/python2.7/site-packages/ivy/lib -g -o study_interference study_interference.cpp -lz3 -pthread study_interference.cpp: In member function ‘virtual void extfooflip_gen::execute(study_interference&)’: study_interference.cpp:1244:35: error: no matching function for call to ‘study_interference::extfooflip(int&, int&)’ obj.extfooflip(prmX,self); ^ study_interference.cpp:1113:6: note: candidate: virtual void study_interference::extfoo__flip(int) void study_interference::extfooflip(int self){ ^
~~~~~ study_interference.cpp:1113:6: note: candidate expects 1 argument, 2 provided