Search in sources :

Example 1 with RecursiveGroup

use of com.dat3m.dartagnan.wmm.utils.RecursiveGroup in project Dat3M by hernanponcedeleon.

the class Wmm method addRecursiveGroup.

public void addRecursiveGroup(Set<RecursiveRelation> recursiveGroup) {
    int id = 1 << recursiveGroups.size();
    Preconditions.checkArgument(id >= 0, "Exceeded maximum number of recursive relations.");
    recursiveGroups.add(new RecursiveGroup(id, recursiveGroup));
}
Also used : RecursiveGroup(com.dat3m.dartagnan.wmm.utils.RecursiveGroup)

Example 2 with RecursiveGroup

use of com.dat3m.dartagnan.wmm.utils.RecursiveGroup in project Dat3M by hernanponcedeleon.

the class RelationAnalysis method run.

private void run(VerificationTask task, Context context) {
    // Init data context so that each relation is able to compute its may/must sets.
    Wmm memoryModel = task.getMemoryModel();
    for (Axiom ax : memoryModel.getAxioms()) {
        ax.getRelation().updateRecursiveGroupId(ax.getRelation().getRecursiveGroupId());
    }
    for (RecursiveGroup recursiveGroup : memoryModel.getRecursiveGroups()) {
        recursiveGroup.setDoRecurse();
    }
    // ------------------------------------------------
    for (String relName : Wmm.BASE_RELATIONS) {
        memoryModel.getRelationRepository().getRelation(relName).initializeRelationAnalysis(task, context);
    }
    for (Relation rel : memoryModel.getRelationRepository().getRelations()) {
        rel.initializeRelationAnalysis(task, context);
    }
    for (Axiom ax : memoryModel.getAxioms()) {
        ax.initializeRelationAnalysis(task, context);
    }
    // ------------------------------------------------
    for (String relName : Wmm.BASE_RELATIONS) {
        Relation baseRel = memoryModel.getRelationRepository().getRelation(relName);
        baseRel.getMaxTupleSet();
        baseRel.getMinTupleSet();
    }
    for (RecursiveGroup recursiveGroup : memoryModel.getRecursiveGroups()) {
        recursiveGroup.initMaxTupleSets();
        recursiveGroup.initMinTupleSets();
    }
    for (Axiom ax : memoryModel.getAxioms()) {
        ax.getRelation().getMaxTupleSet();
        ax.getRelation().getMinTupleSet();
    }
}
Also used : Relation(com.dat3m.dartagnan.wmm.relation.Relation) RecursiveGroup(com.dat3m.dartagnan.wmm.utils.RecursiveGroup) Wmm(com.dat3m.dartagnan.wmm.Wmm) Axiom(com.dat3m.dartagnan.wmm.axiom.Axiom)

Aggregations

RecursiveGroup (com.dat3m.dartagnan.wmm.utils.RecursiveGroup)2 Wmm (com.dat3m.dartagnan.wmm.Wmm)1 Axiom (com.dat3m.dartagnan.wmm.axiom.Axiom)1 Relation (com.dat3m.dartagnan.wmm.relation.Relation)1