ethereum / act

Smart contract specification language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SMT: Destringify Mapping Keys

d-xo opened this issue · comments

commented

The SMT backend currently stores storage vars, environment vars, and calldata vars in mappings that are keyed by strings. The key for a particular variable is determined by running a pretty printing routine.

This is a little messy and makes pretty printing of the counter examples difficult (we would have to parse these key names). This can be tidied by:

  1. Adding an Ord instance for the relevant pieces of the AST
  2. Changing the types of the mapping keys to be the concrete varaibles in question (e.g. the mapping for the storage vars would be TEntry -> SMType).

This should also make pretty printing the counter examples much easier as we could easily reuse the existing (well tested) pretty printer in Print.hs.

commented

probably no longer required since we have the new SMT backend.