-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encoding refactor #466
Encoding refactor #466
Conversation
…y introduced another bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I have some minor questions/points, but overall, these quality of life improvements can be useful already in my branch for globals
src/main/scala/viper/gobra/frontend/info/implementation/property/ConstantEvaluation.scala
Outdated
Show resolved
Hide resolved
src/main/scala/viper/gobra/translator/encodings/combinators/DefaultEncoding.scala
Show resolved
Hide resolved
src/main/scala/viper/gobra/translator/encodings/combinators/FinalTypeEncoding.scala
Show resolved
Hide resolved
src/main/scala/viper/gobra/translator/encodings/combinators/TypeEncoding.scala
Show resolved
Hide resolved
src/main/scala/viper/gobra/translator/encodings/interfaces/InterfaceEncoding.scala
Outdated
Show resolved
Hide resolved
arg <- ctx.predicate.predicateAccess(ctx)(cp.acc.op, in.FullPerm(cp.info)) | ||
res = vpr.CurrentPerm(arg.loc)(pos, info, errT) | ||
arg <- ctx.ass(in.Access(in.Accessible.Predicate(cp.acc.op), in.FullPerm(cp.info))(cp.info)) | ||
pap = arg.asInstanceOf[vpr.PredicateAccessPredicate] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you choose not to offer predicateAccess
anymore?
@@ -296,7 +297,7 @@ class StringEncoding extends LeafTypeEncoding { | |||
terminationMeasures = Vector(in.WildcardMeasure(None)(info)), | |||
body = None | |||
)(info) | |||
val translatedFunc = ctx.pureMethod.pureFunction(func)(ctx) | |||
val translatedFunc = ctx.function(func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a mistake or just confusing that pureMethod.pureFunction
becomes function
?
case meth: in.Method => ctx.method.method(meth)(ctx).res | ||
case meth: in.PureMethod => ctx.pureMethod.pureMethod(meth)(ctx).res | ||
case meth: in.Method => ctx.method(meth).res | ||
case meth: in.PureMethod => ctx.function(meth).res |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here: should we think about method and function in the Viper way?
The changeset looks worse than it is. This PR:
TypeEncoding
trait.