-
Notifications
You must be signed in to change notification settings - Fork 152
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
Take result attributes directly from the production when resolving contexts #4685
Take result attributes directly from the production when resolving contexts #4685
Conversation
87060c5
to
2b42de4
Compare
2b42de4
to
a1c0ffa
Compare
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.
Before merging, please add a description for the PR, as that will become the commit description once it is merged into master
.
@@ -119,6 +119,14 @@ private void setAliases(String attribute, Set<ContextAlias> aliases, Production | |||
private static final ContextAlias DEFAULT_ALIAS = | |||
ContextAlias(KVariable("HERE"), BooleanUtils.TRUE, Att.empty()); | |||
|
|||
private static final ContextAlias defaultAliasWithAtts(Att att) { | |||
if (!att.contains(Att.RESULT())) { | |||
return DEFAULT_ALIAS; |
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.
If DEFAULT_ALIAS
is not referred to elsewhere, consider inlining it here.
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.
Done
k-frontend/src/main/java/org/kframework/compile/ResolveStrict.java
Outdated
Show resolved
Hide resolved
|
||
|
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.
Nitpick: consider removing these blank lines.
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.
Done
I hope it looks reasonable now. |
d08b4c3
to
20b7730
Compare
A declaration like
syntax KItem ::= thing(Stuff, Stuff) [seqstrict, result(Evaluated)]
should consider tems that are
Evaluated
as evaluated. Right now, this happens only for the argument being heated/cooled, while the previous arguments are checked for beingKResult
. As an example, when heating the second argument above, the heating rule looks something like this:With this PR, the rule becomes
Fixes #4683