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;
}
Aggregations