Search in sources :

Example 1 with ExprsContext

use of com.dat3m.dartagnan.parsers.BoogieParser.ExprsContext in project Dat3M by hernanponcedeleon.

the class PthreadsProcedures method mutexUnlock.

private static void mutexUnlock(VisitorBoogie visitor, Call_cmdContext ctx) {
    ExprsContext lock = ctx.call_params().exprs();
    Register register = visitor.programBuilder.getOrCreateRegister(visitor.threadCount, null, ARCH_PRECISION);
    IExpr lockAddress = (IExpr) lock.accept(visitor);
    if (lockAddress != null) {
        visitor.programBuilder.addChild(visitor.threadCount, EventFactory.Pthread.newUnlock(lock.getText(), lockAddress, register));
    }
}
Also used : Register(com.dat3m.dartagnan.program.Register) ExprsContext(com.dat3m.dartagnan.parsers.BoogieParser.ExprsContext) IExpr(com.dat3m.dartagnan.expression.IExpr)

Example 2 with ExprsContext

use of com.dat3m.dartagnan.parsers.BoogieParser.ExprsContext in project Dat3M by hernanponcedeleon.

the class PthreadsProcedures method mutexLock.

private static void mutexLock(VisitorBoogie visitor, Call_cmdContext ctx) {
    ExprsContext lock = ctx.call_params().exprs();
    Register register = visitor.programBuilder.getOrCreateRegister(visitor.threadCount, null, ARCH_PRECISION);
    IExpr lockAddress = (IExpr) lock.accept(visitor);
    if (lockAddress != null) {
        visitor.programBuilder.addChild(visitor.threadCount, EventFactory.Pthread.newLock(lock.getText(), lockAddress, register));
    }
}
Also used : Register(com.dat3m.dartagnan.program.Register) ExprsContext(com.dat3m.dartagnan.parsers.BoogieParser.ExprsContext) IExpr(com.dat3m.dartagnan.expression.IExpr)

Aggregations

IExpr (com.dat3m.dartagnan.expression.IExpr)2 ExprsContext (com.dat3m.dartagnan.parsers.BoogieParser.ExprsContext)2 Register (com.dat3m.dartagnan.program.Register)2