From 54b6ff2d586c511216c08b307566c305d7b87b4e Mon Sep 17 00:00:00 2001 From: Jouke Stoel Date: Tue, 12 Jan 2021 13:25:08 +0100 Subject: [PATCH] Minor changes to union compatibilty checker for binary id relations --- .project | 11 +++++++++++ src/ide/UnionCompatibilityChecker.rsc | 4 ++-- src/translation/Imploder.rsc | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.project b/.project index 2edc62d..91e6ec2 100644 --- a/.project +++ b/.project @@ -37,4 +37,15 @@ org.eclipse.pde.PluginNature rascal_eclipse.term_nature + + + 1607933581072 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/src/ide/UnionCompatibilityChecker.rsc b/src/ide/UnionCompatibilityChecker.rsc index 41fc93f..c71a5b6 100644 --- a/src/ide/UnionCompatibilityChecker.rsc +++ b/src/ide/UnionCompatibilityChecker.rsc @@ -328,12 +328,12 @@ void check(e:(AlleExpr)` where `, Environment env, void check(e:(AlleExpr)`~`, Environment env, CheckFunctions cf) { check(expr,env,cf); - checkBinaryIdRel(e@\loc, cf); + checkBinaryIdRel(e@\loc, expr@\loc, cf); } void check(e:(AlleExpr)`^`, Environment env, CheckFunctions cf) { check(expr,env,cf); - checkBinaryIdRel(e@\loc, cf); + checkBinaryIdRel(e@\loc, expr@\loc, cf); } void check(e:(AlleExpr)`*`, Environment env, CheckFunctions cf) { diff --git a/src/translation/Imploder.rsc b/src/translation/Imploder.rsc index 7204d9f..1a9c904 100644 --- a/src/translation/Imploder.rsc +++ b/src/translation/Imploder.rsc @@ -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 = ("" : implode(p) | (AlleConstraint)`` <- p.constraints); + map[str, translation::AST::AllePredicate] predicates = ("" : implode(pred) | (AlleConstraint)`` <- p.constraints); list[translation::AST::AlleFormula] constraints = [implode(f) | (AlleConstraint)`` <- p.constraints]; return problem([implode(r) | r <- p.relations], constraints, predicates, s, e); @@ -183,7 +183,7 @@ translation::AST::AlleExpr implode((AlleExpr)` тип ` = product(implode(lhs), implode(rhs)); translation::AST::AlleExpr implode(f:(AlleExpr)`{<{VarDeclaration ","}+ decls> | }`) - = comprehension([implode(d) | d <- decls], implode(form), origLoc=f@\loc); + = comprehension([implode(d) | d <- decls], implode(form)); translation::AST::TupleAttributeSelection implode ((TupleAttributeSelection)`\<,\>`) = order("","");