use of com.dat3m.dartagnan.program.event.core.Event in project Dat3M by hernanponcedeleon.
the class SvcompProcedures method __VERIFIER_atomic.
public static void __VERIFIER_atomic(VisitorBoogie visitor, boolean begin) {
Register register = visitor.programBuilder.getOrCreateRegister(visitor.threadCount, null, ARCH_PRECISION);
MemoryObject lockAddress = visitor.programBuilder.getOrNewObject("__VERIFIER_atomic");
Label label = visitor.programBuilder.getOrCreateLabel("END_OF_T" + visitor.threadCount);
LinkedList<Event> events = new LinkedList<>();
events.add(EventFactory.newLoad(register, lockAddress, null));
events.add(EventFactory.newJump(new Atom(register, NEQ, begin ? IValue.ZERO : IValue.ONE), label));
events.add(EventFactory.newStore(lockAddress, begin ? IValue.ONE : IValue.ZERO, null));
for (Event e : events) {
e.addFilters(Tag.C11.LOCK, Tag.RMW);
visitor.programBuilder.addChild(visitor.threadCount, e);
}
}
use of com.dat3m.dartagnan.program.event.core.Event in project Dat3M by hernanponcedeleon.
the class Thread method updateExit.
public void updateExit(Event event) {
exit = event;
Event next = exit.getSuccessor();
while (next != null) {
exit = next;
exit.setThread(this);
next = next.getSuccessor();
}
}
use of com.dat3m.dartagnan.program.event.core.Event in project Dat3M by hernanponcedeleon.
the class VisitorBase method visitLock.
@Override
public List<Event> visitLock(Lock e) {
Register resultRegister = e.getResultRegister();
String mo = e.getMo();
List<Event> events = eventSequence(newLoad(resultRegister, e.getAddress(), mo), newJump(new Atom(resultRegister, NEQ, IValue.ZERO), (Label) e.getThread().getExit()), newStore(e.getAddress(), IValue.ONE, mo));
for (Event child : events) {
child.addFilters(C11.LOCK, RMW);
}
return events;
}
use of com.dat3m.dartagnan.program.event.core.Event in project Dat3M by hernanponcedeleon.
the class VisitorLitmusC method visitReLoad.
@Override
public IExpr visitReLoad(LitmusCParser.ReLoadContext ctx) {
Register register = getReturnRegister(true);
Event event = EventFactory.newLoad(register, getAddress(ctx.address), ctx.mo);
programBuilder.addChild(currentThread, event);
return register;
}
use of com.dat3m.dartagnan.program.event.core.Event in project Dat3M by hernanponcedeleon.
the class VisitorLitmusC method visitReReadOnce.
@Override
public IExpr visitReReadOnce(LitmusCParser.ReReadOnceContext ctx) {
Register register = getReturnRegister(true);
Event event = EventFactory.newLoad(register, getAddress(ctx.address), ctx.mo);
programBuilder.addChild(currentThread, event);
return register;
}
Aggregations