예제 #1
0
파일: triggers.py 프로젝트: pierg/crome
    def __init__(self, pre: Union[Specification, Boolean],
                 post: Union[Specification, Boolean]):
        new_typeset, pre, post = Trigger.process_bin_input(pre, post)

        f = Logic.g_(Logic.iff_(pre, Logic.x_(post)))

        super().__init__(formula=(f, new_typeset))
예제 #2
0
    def __init__(self, pre: Union[Atom, Boolean],
                 post: Union[Atom, Boolean],
                 active: Union[Atom, Boolean],
                 context: Union[Atom, Boolean] = None):
        new_typeset, pre, post, context, active = Trigger.process_bin_contextual_input(pre, post, context, active)

        c = Logic.and_([context, active])
        f = Logic.g_(Logic.iff_(Logic.and_([c, pre]), Logic.x_(Logic.w_(Logic.not_(c), Logic.and_([c, post])))))

        super().__init__(formula=(f, new_typeset))