Search in sources :

Example 1 with FenceGraph

use of com.dat3m.dartagnan.solver.caat4wmm.basePredicates.FenceGraph in project Dat3M by hernanponcedeleon.

the class CoreReasoner method addFenceReason.

private void addFenceReason(Relation rel, Edge edge, List<CoreLiteral> coreReasons) {
    FenceGraph fenceGraph = (FenceGraph) executionGraph.getRelationGraph(rel);
    EventDomain domain = executionGraph.getDomain();
    EventData e1 = domain.getObjectById(edge.getFirst());
    EventData e2 = domain.getObjectById(edge.getSecond());
    EventData f = fenceGraph.getNextFence(e1);
    coreReasons.add(new ExecLiteral(f.getEvent()));
    if (!exec.isImplied(f.getEvent(), e1.getEvent())) {
        coreReasons.add(new ExecLiteral(e1.getEvent()));
    }
    if (!exec.isImplied(f.getEvent(), e2.getEvent())) {
        coreReasons.add(new ExecLiteral(e2.getEvent()));
    }
}
Also used : EventDomain(com.dat3m.dartagnan.solver.caat4wmm.EventDomain) FenceGraph(com.dat3m.dartagnan.solver.caat4wmm.basePredicates.FenceGraph) EventData(com.dat3m.dartagnan.verification.model.EventData)

Aggregations

EventDomain (com.dat3m.dartagnan.solver.caat4wmm.EventDomain)1 FenceGraph (com.dat3m.dartagnan.solver.caat4wmm.basePredicates.FenceGraph)1 EventData (com.dat3m.dartagnan.verification.model.EventData)1