use of com.dat3m.dartagnan.asserts.AbstractAssert in project Dat3M by hernanponcedeleon.
the class LoopUnrolling method updateAssertions.
private void updateAssertions(Program program) {
if (program.getAss() != null) {
// but I was under the impression that assFilter was used for Litmus tests.
return;
}
List<Event> assertions = new ArrayList<>();
for (Thread t : program.getThreads()) {
assertions.addAll(t.getCache().getEvents(FilterBasic.get(Tag.ASSERTION)));
}
AbstractAssert ass = new AssertTrue();
if (!assertions.isEmpty()) {
ass = new AssertInline((Local) assertions.get(0));
for (int i = 1; i < assertions.size(); i++) {
ass = new AssertCompositeOr(ass, new AssertInline((Local) assertions.get(i)));
}
}
program.setAss(ass);
logger.info("Updated assertions after unrolling.");
}
use of com.dat3m.dartagnan.asserts.AbstractAssert in project Dat3M by hernanponcedeleon.
the class VerificationTask method updateAssertions.
private void updateAssertions(Program program) {
List<Event> assertions = program.getCache().getEvents(FilterBasic.get(ASSERTION));
AbstractAssert ass = new AssertTrue();
if (!assertions.isEmpty()) {
ass = new AssertInline((Local) assertions.get(0));
for (int i = 1; i < assertions.size(); i++) {
ass = new AssertCompositeOr(ass, new AssertInline((Local) assertions.get(i)));
}
}
program.setAss(ass);
}
Aggregations