Skip to content

Commit

Permalink
Fetch review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
virgil-serbanuta committed Nov 27, 2024
1 parent 685c9b1 commit d08b4c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 0 additions & 2 deletions k-distribution/tests/regression-new/issue-4683/test.k
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ module TEST
syntax Bool ::= isMyResult(K) [function, total, symbol(isMyResult)]
rule isMyResult(_) => false [owise]
rule isMyResult(c) => true


endmodule
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,9 @@ 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 defaultAliasFor(Production production) {
if (!att.contains(Att.RESULT())) {
return DEFAULT_ALIAS;
return ContextAlias(KVariable("HERE"), BooleanUtils.TRUE, Att.empty());
}
return ContextAlias(
KVariable("HERE"), BooleanUtils.TRUE, Att.empty().add(Att.RESULT(), att.get(Att.RESULT())));
Expand Down Expand Up @@ -210,14 +207,14 @@ public Set<Sentence> resolve(Production production, boolean sequential) {
for (int i = 1; i <= arity; i++) {
strictnessPositions.add(i);
}
aliases.add(defaultAliasWithAtts(production.att()));
aliases.add(defaultAliasFor(production.att()));
resolve(sequential, sentences, arity, strictnessPositions, allPositions, aliases, production);
allPositions.addAll(strictnessPositions);
} else {
String[] components = attribute.split(";");
if (components.length == 1) {
if (Character.isDigit(components[0].trim().charAt(0))) {
aliases.add(defaultAliasWithAtts(production.att()));
aliases.add(defaultAliasFor(production.att()));
setPositions(components[0].trim(), strictnessPositions, arity, production);
} else {
for (int i = 1; i <= arity; i++) {
Expand Down

0 comments on commit d08b4c3

Please sign in to comment.