use of com.dat3m.dartagnan.wmm.utils.TupleSet in project Dat3M by hernanponcedeleon.
the class BasicRegRelation method mkTupleSets.
private void mkTupleSets() {
maxTupleSet = new TupleSet();
minTupleSet = new TupleSet();
Dependency dep = analysisContext.requires(Dependency.class);
for (Event regReader : getEvents()) {
for (Register register : getRegisters(regReader)) {
Dependency.State r = dep.of(regReader, register);
for (Event regWriter : r.may) {
maxTupleSet.add(new Tuple(regWriter, regReader));
}
for (Event regWriter : r.must) {
minTupleSet.add(new Tuple(regWriter, regReader));
}
}
}
}
use of com.dat3m.dartagnan.wmm.utils.TupleSet in project Dat3M by hernanponcedeleon.
the class RelCo method getMinTupleSet.
@Override
public TupleSet getMinTupleSet() {
if (minTupleSet == null) {
minTupleSet = new TupleSet();
WmmAnalysis wmmAnalysis = analysisContext.get(WmmAnalysis.class);
if (wmmAnalysis.isLocallyConsistent()) {
applyLocalConsistencyMinSet();
}
}
return minTupleSet;
}
use of com.dat3m.dartagnan.wmm.utils.TupleSet in project Dat3M by hernanponcedeleon.
the class RelLoc method getMaxTupleSet.
@Override
public TupleSet getMaxTupleSet() {
if (maxTupleSet == null) {
AliasAnalysis alias = analysisContext.get(AliasAnalysis.class);
maxTupleSet = new TupleSet();
Collection<Event> events = task.getProgram().getCache().getEvents(FilterBasic.get(MEMORY));
for (Event e1 : events) {
for (Event e2 : events) {
if (alias.mayAlias((MemEvent) e1, (MemEvent) e2)) {
maxTupleSet.add(new Tuple(e1, e2));
}
}
}
removeMutuallyExclusiveTuples(maxTupleSet);
}
return maxTupleSet;
}
use of com.dat3m.dartagnan.wmm.utils.TupleSet in project Dat3M by hernanponcedeleon.
the class RelExt method getMaxTupleSet.
@Override
public TupleSet getMaxTupleSet() {
if (maxTupleSet == null) {
maxTupleSet = new TupleSet();
List<Thread> threads = task.getProgram().getThreads();
for (int i = 0; i < threads.size(); i++) {
Thread t1 = threads.get(i);
for (int j = i + 1; j < threads.size(); j++) {
Thread t2 = threads.get(j);
for (Event e1 : t1.getCache().getEvents(FilterBasic.get(Tag.VISIBLE))) {
for (Event e2 : t2.getCache().getEvents(FilterBasic.get(Tag.VISIBLE))) {
maxTupleSet.add(new Tuple(e1, e2));
maxTupleSet.add(new Tuple(e2, e1));
}
}
}
}
}
return maxTupleSet;
}
use of com.dat3m.dartagnan.wmm.utils.TupleSet in project Dat3M by hernanponcedeleon.
the class RelDomainIdentity method getMinTupleSet.
@Override
public TupleSet getMinTupleSet() {
if (minTupleSet == null) {
ExecutionAnalysis exec = analysisContext.get(ExecutionAnalysis.class);
minTupleSet = new TupleSet();
r1.getMinTupleSet().stream().filter(t -> exec.isImplied(t.getFirst(), t.getSecond())).map(t -> new Tuple(t.getFirst(), t.getFirst())).forEach(minTupleSet::add);
}
return minTupleSet;
}
Aggregations