kenmcmil / ivy

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.
Other
77 stars 24 forks source link

compiler error in ivy1.8 : invalid conversion from ‘int’ to #60

Open prpr2770 opened 2 years ago

prpr2770 commented 2 years ago

The issue I've indicated below is similar to the one that was raised earlier in #57. It provides a more concise representation of the problem.

The ivy-script for modelling a connection-mgmt protocol check correctly, withivy_check OK. However, when compiling it using ivyc target=test conn-mgmt.ivy, we obtain the following error:

$ ivyc target=test connection_mgmt_v2.ivy 
g++ -Wno-parentheses-equality  -std=c++11  -I /usr/local/lib/python2.7/dist-packages/ivy/include -L /usr/local/lib/python2.7/dist-packages/ivy/lib -Xlinker -rpath -Xlinker /usr/local/lib/python2.7/dist-packages/ivy/lib -g -o connection_mgmt_v2 connection_mgmt_v2.cpp -lz3 -pthread
connection_mgmt_v2.cpp: In member function ‘void connection_mgmt_v2::__init()’:
connection_mgmt_v2.cpp:1863:20: error: ‘__tup__namesOfProcedures__int’ was not declared in this scope
         hash_thunk<__tup__namesOfProcedures__int,bool> __tmp3;
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
connection_mgmt_v2.cpp:1863:20: note: suggested alternative: ‘__tup__int__namesOfProcedures’
         hash_thunk<__tup__namesOfProcedures__int,bool> __tmp3;
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    __tup__int__namesOfProcedures
connection_mgmt_v2.cpp:1863:54: error: template argument 1 is invalid
         hash_thunk<__tup__namesOfProcedures__int,bool> __tmp3;
                                                      ^
connection_mgmt_v2.cpp:1863:54: error: template argument 3 is invalid
connection_mgmt_v2.cpp:1866:36: error: ‘__tup__namesOfProcedures__int’ is not a member of ‘connection_mgmt_v2’
         __tmp3[connection_mgmt_v2::__tup__namesOfProcedures__int(Y,X)] = false;
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
connection_mgmt_v2.cpp:1871:98: error: invalid conversion from ‘int’ to ‘connection_mgmt_v2::namesOfProcedures’ [-fpermissive]
         client__intf__connection_procedures[connection_mgmt_v2::__tup__int__namesOfProcedures(X,Y)] = __tmp3[connection_mgmt_v2::__tup__namesOfProcedures__int(Y,X)];
                                                                                                  ^
In file included from connection_mgmt_v2.cpp:1:0:
connection_mgmt_v2.h:714:34: note:   initializing argument 2 of ‘connection_mgmt_v2::__tup__int__namesOfProcedures::__tup__int__namesOfProcedures(const int&, const connection_mgmt_v2::namesOfProcedures&)’
 __tup__int__namesOfProcedures(){}__tup__int__namesOfProcedures(const int &arg0,const namesOfProcedures &arg1) : arg0(arg0),arg1(arg1){}
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
connection_mgmt_v2.cpp:1871:130: error: ‘__tup__namesOfProcedures__int’ is not a member of ‘connection_mgmt_v2’
     client__intf__connection_procedures[connection_mgmt_v2::__tup__int__namesOfProcedures(X,Y)] = __tmp3[connection_mgmt_v2::__tup__namesOfProcedures__int(Y,X)];
                                                                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-parentheses-equality’