septract / starling-tool

An automatic verifier for concurrent algorithms.
MIT License
7 stars 4 forks source link

[grasshopper] Emit standard types with capitals #125

Closed MattWindsor91 closed 7 years ago

MattWindsor91 commented 7 years ago

GRASShopper calls the standard integer type Int (not int), and the standard Boolean type Bool (not bool). This means that every time we have an integer or Boolean variable, we have to add

typedef int Int;
typedef bool Bool;

to the proof, and then jump through hoops like using x == true instead of x if we're trying to use a Bool called x in a bool position. This also turns off a lot of Starling's expression simplification.

Ideally Starling should treat the standard types specially here, and emit the GRASShopper equivalents directly.

In terms of changes I think this would need us to:

Example: see the GRASShopper proofs we have already.