Skip to content

Commit

Permalink
removed electrod int safeguards
Browse files Browse the repository at this point in the history
  • Loading branch information
nmacedo committed Apr 15, 2024
1 parent 5060b1a commit 7ed4a52
Showing 1 changed file with 11 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -818,11 +818,10 @@ public void visit(ProjectExpression node) {
* tokenize[node.intExpr], "]" ] **/
// [HASLab] integer relations
public void visit(IntToExprCast node) {
throw new InvalidUnboundedProblem(lastFormula);
// append("Int");
// append("[");
// node.intExpr().accept(this);
// append("]");
append("Int");
append("[");
node.intExpr().accept(this);
append("]");
}

/** @throws InvalidUnboundedProblem
Expand All @@ -832,12 +831,11 @@ public void visit(IntToExprCast node) {
public void visit(ExprToIntCast node) {
switch(node.op()) {
case SUM:
throw new InvalidUnboundedProblem(lastFormula);
// append("int");
// append("[");
// node.expression().accept(this);
// append("]");
// break;
append("int");
append("[");
node.expression().accept(this);
append("]");
break;
case CARDINALITY :
append("#");
append("(");
Expand Down Expand Up @@ -883,9 +881,7 @@ public void visit(RelationPredicate node) {
/**
* Converts identifiers into a version that is compatible with Electrod by
* removing '/', '.' and '$' symbols.
*
* TODO: what if id already has # symbols?
*
*
* @param id the identifier.
* @return the normalized identifier.
*/
Expand All @@ -900,9 +896,7 @@ else if (Arrays.asList(protected_keywords).contains(id))
/**
* Converts identifiers that are compatible with Electrod back to their Kodkod
* internal representation.
*
* * TODO: what if id already has # symbols?
*
*
* @param id the identifier.
* @return the denormalized identifier.
*/
Expand Down

0 comments on commit 7ed4a52

Please sign in to comment.