Evaluator not recognizing variable name. Error: The name cannot contain the '$' symbol.
luomein opened this issue · comments
Alloy 6.1.0, Mac OS 13.6.3
In the Evaluator, sometimes the variable name will raise error, The name cannot contain the '$' symbol.
{Node$0} ---> work fine
{Node$1} ---> work fine
{Node$0} + {Node$1} ---> work fine
{Node$0, Node$1} ---> error1
{(Node$0), (Node$1)} ---> error2
{List$0->Node$0, List$0->Node$1} ---> error2
error1:
The name cannot contain the '$' symbol.
error2:
Syntax error at line 1 column 10:
There are 38 possible tokens that can appear here:
! # ( * @ Int NAME NUMBER STRING String ^ after all always before disj eventually fun historically iden int let lone no none once one pred seq set some steps sum this univ { } ~
The '{' is not valid Alloy syntax. Message could be better but the curly braces are the problem. This works:
(Node$0+Node$1) & Node$1
For convenience, you can also use the Foo¹
that you can copy from the output.