use of com.dat3m.dartagnan.program.memory.Location in project Dat3M by hernanponcedeleon.
the class VisitorLitmusAssertions method acceptAssertionValue.
private LastValueInterface acceptAssertionValue(LitmusAssertionsParser.AssertionValueContext ctx, boolean right) {
if (ctx.constant() != null) {
return new IValue(new BigInteger(ctx.constant().getText()), ARCH_PRECISION);
}
String name = ctx.varName().getText();
if (ctx.threadId() != null) {
return programBuilder.getOrErrorRegister(ctx.threadId().id, name);
}
MemoryObject base = programBuilder.getObject(name);
checkState(base != null, "uninitialized location %s", name);
TerminalNode offset = ctx.DigitSequence();
int o = offset == null ? 0 : Integer.parseInt(offset.getText());
return right && offset == null ? base : new Location(name, base, o);
}
Aggregations