Search in sources :

Example 1 with IrreflexivityConstraint

use of com.dat3m.dartagnan.solver.caat.constraints.IrreflexivityConstraint in project Dat3M by hernanponcedeleon.

the class ExecutionGraph method getOrCreateConstraintFromAxiom.

// =======================================================
// =================== Reading the WMM ====================
private Constraint getOrCreateConstraintFromAxiom(Axiom axiom) {
    if (constraintMap.containsKey(axiom)) {
        return constraintMap.get(axiom);
    }
    Constraint constraint;
    RelationGraph innerGraph = getOrCreateGraphFromRelation(axiom.getRelation());
    if (axiom.isAcyclicity()) {
        constraint = new AcyclicityConstraint(innerGraph);
    } else if (axiom.isEmptiness()) {
        constraint = new EmptinessConstraint(innerGraph);
    } else if (axiom.isIrreflexivity()) {
        constraint = new IrreflexivityConstraint(innerGraph);
    } else {
        throw new UnsupportedOperationException("The axiom " + axiom + " is not recognized.");
    }
    constraintMap.put(axiom, constraint);
    return constraint;
}
Also used : RelationGraph(com.dat3m.dartagnan.solver.caat.predicates.relationGraphs.RelationGraph) EmptinessConstraint(com.dat3m.dartagnan.solver.caat.constraints.EmptinessConstraint) AcyclicityConstraint(com.dat3m.dartagnan.solver.caat.constraints.AcyclicityConstraint) IrreflexivityConstraint(com.dat3m.dartagnan.solver.caat.constraints.IrreflexivityConstraint) EmptinessConstraint(com.dat3m.dartagnan.solver.caat.constraints.EmptinessConstraint) Constraint(com.dat3m.dartagnan.solver.caat.constraints.Constraint) AcyclicityConstraint(com.dat3m.dartagnan.solver.caat.constraints.AcyclicityConstraint) IrreflexivityConstraint(com.dat3m.dartagnan.solver.caat.constraints.IrreflexivityConstraint)

Aggregations

AcyclicityConstraint (com.dat3m.dartagnan.solver.caat.constraints.AcyclicityConstraint)1 Constraint (com.dat3m.dartagnan.solver.caat.constraints.Constraint)1 EmptinessConstraint (com.dat3m.dartagnan.solver.caat.constraints.EmptinessConstraint)1 IrreflexivityConstraint (com.dat3m.dartagnan.solver.caat.constraints.IrreflexivityConstraint)1 RelationGraph (com.dat3m.dartagnan.solver.caat.predicates.relationGraphs.RelationGraph)1