Skip to content

Commit 54b6ff2

Browse files
committed
Minor changes to union compatibilty checker for binary id relations
1 parent 8c76649 commit 54b6ff2

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

.project

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,15 @@
3737
<nature>org.eclipse.pde.PluginNature</nature>
3838
<nature>rascal_eclipse.term_nature</nature>
3939
</natures>
40+
<filteredResources>
41+
<filter>
42+
<id>1607933581072</id>
43+
<name></name>
44+
<type>30</type>
45+
<matcher>
46+
<id>org.eclipse.core.resources.regexFilterMatcher</id>
47+
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
48+
</matcher>
49+
</filter>
50+
</filteredResources>
4051
</projectDescription>

src/ide/UnionCompatibilityChecker.rsc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,12 +328,12 @@ void check(e:(AlleExpr)`<AlleExpr expr> where <Criteria crit>`, Environment env,
328328
329329
void check(e:(AlleExpr)`~<AlleExpr expr>`, Environment env, CheckFunctions cf) {
330330
check(expr,env,cf);
331-
checkBinaryIdRel(e@\loc, cf);
331+
checkBinaryIdRel(e@\loc, expr@\loc, cf);
332332
}
333333
334334
void check(e:(AlleExpr)`^<AlleExpr expr>`, Environment env, CheckFunctions cf) {
335335
check(expr,env,cf);
336-
checkBinaryIdRel(e@\loc, cf);
336+
checkBinaryIdRel(e@\loc, expr@\loc, cf);
337337
}
338338
339339
void check(e:(AlleExpr)`*<AlleExpr expr>`, Environment env, CheckFunctions cf) {

src/translation/Imploder.rsc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ translation::AST::Problem implodeProblem(translation::Syntax::Problem p) {
1414
Maybe[translation::AST::ObjectiveSection] s = (/translation::Syntax::ObjectiveSection objSec := p.objSection) ? just(implode(objSec)) : nothing();
1515
Maybe[translation::AST::Expect] e = (/translation::Syntax::Expect exp := p.expect) ? just(implode(exp)) : nothing();
1616

17-
map[str, translation::AST::AllePredicate] predicates = ("<p.name>" : implode(p) | (AlleConstraint)`<AllePredicate p>` <- p.constraints);
17+
map[str, translation::AST::AllePredicate] predicates = ("<pred.name>" : implode(pred) | (AlleConstraint)`<AllePredicate pred>` <- p.constraints);
1818
list[translation::AST::AlleFormula] constraints = [implode(f) | (AlleConstraint)`<AlleFormula f>` <- p.constraints];
1919
2020
return problem([implode(r) | r <- p.relations], constraints, predicates, s, e);
@@ -183,7 +183,7 @@ translation::AST::AlleExpr implode((AlleExpr)`<AlleExpr lhs> ⨯ <AlleExpr rhs>`
183183
= product(implode(lhs), implode(rhs));
184184
185185
translation::AST::AlleExpr implode(f:(AlleExpr)`{<{VarDeclaration ","}+ decls> | <AlleFormula form>}`)
186-
= comprehension([implode(d) | d <- decls], implode(form), origLoc=f@\loc);
186+
= comprehension([implode(d) | d <- decls], implode(form));
187187
188188
translation::AST::TupleAttributeSelection implode ((TupleAttributeSelection)`\<<AttributeName first>,<AttributeName second>\>`)
189189
= order("<first>","<second>");

0 commit comments

Comments
 (0)