Search in sources :

Example 1 with Empty

use of com.dat3m.dartagnan.wmm.axiom.Empty in project Dat3M by hernanponcedeleon.

the class RefinementTask method createDefaultWmm.

private Wmm createDefaultWmm() {
    Wmm baseline = new Wmm();
    RelationRepository repo = baseline.getRelationRepository();
    Relation rf = repo.getRelation(RF);
    if (baselines.contains(UNIPROC)) {
        // ---- acyclic(po-loc | rf) ----
        Relation poloc = repo.getRelation(POLOC);
        Relation co = repo.getRelation(CO);
        Relation fr = repo.getRelation(FR);
        Relation porf = new RelUnion(poloc, rf);
        repo.addRelation(porf);
        Relation porfco = new RelUnion(porf, co);
        repo.addRelation(porfco);
        Relation porfcofr = new RelUnion(porfco, fr);
        repo.addRelation(porfcofr);
        baseline.addAxiom(new Acyclic(porfcofr));
    }
    if (baselines.contains(NO_OOTA)) {
        // ---- acyclic (dep | rf) ----
        Relation data = repo.getRelation(DATA);
        Relation ctrl = repo.getRelation(CTRL);
        Relation addr = repo.getRelation(ADDR);
        Relation dep = new RelUnion(data, addr);
        repo.addRelation(dep);
        dep = new RelUnion(ctrl, dep);
        repo.addRelation(dep);
        Relation hb = new RelUnion(dep, rf);
        repo.addRelation(hb);
        baseline.addAxiom(new Acyclic(hb));
    }
    if (baselines.contains(ATOMIC_RMW)) {
        // ---- empty (rmw & fre;coe) ----
        Relation rmw = repo.getRelation(RMW);
        Relation coe = repo.getRelation(COE);
        Relation fre = repo.getRelation(FRE);
        Relation frecoe = new RelComposition(fre, coe);
        repo.addRelation(frecoe);
        Relation rmwANDfrecoe = new RelIntersection(rmw, frecoe);
        repo.addRelation(rmwANDfrecoe);
        baseline.addAxiom(new Empty(rmwANDfrecoe));
    }
    return baseline;
}
Also used : Relation(com.dat3m.dartagnan.wmm.relation.Relation) Empty(com.dat3m.dartagnan.wmm.axiom.Empty) RelUnion(com.dat3m.dartagnan.wmm.relation.binary.RelUnion) Wmm(com.dat3m.dartagnan.wmm.Wmm) Acyclic(com.dat3m.dartagnan.wmm.axiom.Acyclic) RelComposition(com.dat3m.dartagnan.wmm.relation.binary.RelComposition) RelIntersection(com.dat3m.dartagnan.wmm.relation.binary.RelIntersection) RelationRepository(com.dat3m.dartagnan.wmm.utils.RelationRepository)

Aggregations

Wmm (com.dat3m.dartagnan.wmm.Wmm)1 Acyclic (com.dat3m.dartagnan.wmm.axiom.Acyclic)1 Empty (com.dat3m.dartagnan.wmm.axiom.Empty)1 Relation (com.dat3m.dartagnan.wmm.relation.Relation)1 RelComposition (com.dat3m.dartagnan.wmm.relation.binary.RelComposition)1 RelIntersection (com.dat3m.dartagnan.wmm.relation.binary.RelIntersection)1 RelUnion (com.dat3m.dartagnan.wmm.relation.binary.RelUnion)1 RelationRepository (com.dat3m.dartagnan.wmm.utils.RelationRepository)1