Conversation
jcp19
left a comment
There was a problem hiding this comment.
Just identified minor stuff rn. I will take a more thorough look tomorrow. Why is genparser.sh part of the changeset?
I think it is because I added execute permissions to it to run it and git captured that too. |
Felalolf
left a comment
There was a problem hiding this comment.
A few smaller comments. I did not check the desugaring thoroughly, but just that it does not break existing stuff.
jcp19
left a comment
There was a problem hiding this comment.
It is a bit hard for me to follow the Desugarer, as it seems very long and repetitive. Is there a way we can nicely refactor this into smaller, easy to grok methods?
src/main/scala/viper/gobra/frontend/info/base/SymbolTable.scala
Outdated
Show resolved
Hide resolved
| underlyingType(exprType(exp)) match { | ||
| case _: SliceT | _: ArrayT => IntT(config.typeBounds.Int) | ||
| case MapT(key, _) => SetT(key) | ||
| case t => violation(s"type $t is not supported for range") | ||
| } |
There was a problem hiding this comment.
This seems like a repeated pattern, maybe we could abstract this in a method
Range for slices/arrays is reworked as discussed.
Range for maps is also implemented.
Variables declared with := in range expressions can be shared now (this is the case with Go)