Skip to content

Commit

Permalink
Minor changes to union compatibilty checker for binary id relations
Browse files Browse the repository at this point in the history
  • Loading branch information
joukestoel committed Jan 12, 2021
1 parent 8c76649 commit 54b6ff2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,15 @@
<nature>org.eclipse.pde.PluginNature</nature>
<nature>rascal_eclipse.term_nature</nature>
</natures>
<filteredResources>
<filter>
<id>1607933581072</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
4 changes: 2 additions & 2 deletions src/ide/UnionCompatibilityChecker.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -328,12 +328,12 @@ void check(e:(AlleExpr)`<AlleExpr expr> where <Criteria crit>`, Environment env,
void check(e:(AlleExpr)`~<AlleExpr expr>`, Environment env, CheckFunctions cf) {
check(expr,env,cf);
checkBinaryIdRel(e@\loc, cf);
checkBinaryIdRel(e@\loc, expr@\loc, cf);
}
void check(e:(AlleExpr)`^<AlleExpr expr>`, Environment env, CheckFunctions cf) {
check(expr,env,cf);
checkBinaryIdRel(e@\loc, cf);
checkBinaryIdRel(e@\loc, expr@\loc, cf);
}
void check(e:(AlleExpr)`*<AlleExpr expr>`, Environment env, CheckFunctions cf) {
Expand Down
4 changes: 2 additions & 2 deletions src/translation/Imploder.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ translation::AST::Problem implodeProblem(translation::Syntax::Problem p) {
Maybe[translation::AST::ObjectiveSection] s = (/translation::Syntax::ObjectiveSection objSec := p.objSection) ? just(implode(objSec)) : nothing();
Maybe[translation::AST::Expect] e = (/translation::Syntax::Expect exp := p.expect) ? just(implode(exp)) : nothing();

map[str, translation::AST::AllePredicate] predicates = ("<p.name>" : implode(p) | (AlleConstraint)`<AllePredicate p>` <- p.constraints);
map[str, translation::AST::AllePredicate] predicates = ("<pred.name>" : implode(pred) | (AlleConstraint)`<AllePredicate pred>` <- p.constraints);
list[translation::AST::AlleFormula] constraints = [implode(f) | (AlleConstraint)`<AlleFormula f>` <- p.constraints];

return problem([implode(r) | r <- p.relations], constraints, predicates, s, e);
Expand Down Expand Up @@ -183,7 +183,7 @@ translation::AST::AlleExpr implode((AlleExpr)`<AlleExpr lhs> ⨯ <AlleExpr rhs>`
= product(implode(lhs), implode(rhs));

translation::AST::AlleExpr implode(f:(AlleExpr)`{<{VarDeclaration ","}+ decls> | <AlleFormula form>}`)
= comprehension([implode(d) | d <- decls], implode(form), origLoc=f@\loc);
= comprehension([implode(d) | d <- decls], implode(form));

translation::AST::TupleAttributeSelection implode ((TupleAttributeSelection)`\<<AttributeName first>,<AttributeName second>\>`)
= order("<first>","<second>");
Expand Down

0 comments on commit 54b6ff2

Please sign in to comment.