Lib.Krakatau.ssa.ssa_ops.monitor.py Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of krakatau-lib Show documentation
Show all versions of krakatau-lib Show documentation
Assembler, disassebmler, decompiler and compiler tools library for Java.
from .base import BaseOp
from .. import excepttypes
from ..constraints import ObjectConstraint, DUMMY
class Monitor(BaseOp):
def __init__(self, parent, args, monad, isExit):
BaseOp.__init__(self, parent, [monad]+args, makeException=True, makeMonad=True)
self.exit = isExit
self.env = parent.env
def propagateConstraints(self, m, x):
etypes = ()
if x.null:
etypes += (excepttypes.NullPtr,)
if self.exit and not x.isConstNull():
etypes += (excepttypes.MonState,)
eout = ObjectConstraint.fromTops(self.env, [], etypes, nonnull=True)
mout = m if x.isConstNull() else DUMMY
return None, eout, mout
© 2015 - 2025 Weber Informatics LLC | Privacy Policy