Search in sources :

Example 1 with BExpr

use of com.dat3m.dartagnan.expression.BExpr in project Dat3M by hernanponcedeleon.

the class Simplifier method simplifyJump.

private boolean simplifyJump(Event pred, CondJump jump) {
    Label label = jump.getLabel();
    Event successor = jump.getSuccessor();
    BExpr expr = jump.getGuard();
    if (label.equals(successor) && expr instanceof BConst) {
        label.getListeners().remove(jump);
        pred.setSuccessor(successor);
        return true;
    }
    return false;
}
Also used : BExpr(com.dat3m.dartagnan.expression.BExpr) BConst(com.dat3m.dartagnan.expression.BConst)

Example 2 with BExpr

use of com.dat3m.dartagnan.expression.BExpr in project Dat3M by hernanponcedeleon.

the class Simplifier method simplifyJump.

private boolean simplifyJump(CondJump jump) {
    Label label = jump.getLabel();
    Event successor = jump.getSuccessor();
    BExpr expr = jump.getGuard();
    if (label.equals(successor) && expr instanceof BConst) {
        jump.delete();
        return true;
    }
    return false;
}
Also used : BExpr(com.dat3m.dartagnan.expression.BExpr) BConst(com.dat3m.dartagnan.expression.BConst) Label(com.dat3m.dartagnan.program.event.core.Label) Event(com.dat3m.dartagnan.program.event.core.Event)

Aggregations

BConst (com.dat3m.dartagnan.expression.BConst)2 BExpr (com.dat3m.dartagnan.expression.BExpr)2 Event (com.dat3m.dartagnan.program.event.core.Event)1 Label (com.dat3m.dartagnan.program.event.core.Label)1