Ejemplo n.º 1
0
        public override StateFormula existentialNormalForm()
        {
            StateFormula e_left  = left.existentialNormalForm();
            StateFormula e_right = right.existentialNormalForm();

            // a OR b = NOT ((NOT a) AND (NOT b))
            e_left  = new SNot(e_left);
            e_right = new SNot(e_right);

            StateFormula and = new SAnd(e_left, e_right);

            return(new SNot(and));
        }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            if (obj.GetType() == typeof(SAnd))
            {
                SAnd and = (SAnd)obj;
                if (and.left.Equals(left) && and.right.Equals(right))
                {
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 3
0
        public override StateFormula existentialNormalForm()
        {
            // E(p W w) = NE((Nw) U (Np AND Nw))

            StateFormula not_right1 = new SNot(right);
            StateFormula not_right2 = new SNot(right);

            StateFormula not_left = new SNot(left);

            StateFormula and = new SAnd(not_left, not_right2);

            StateFormula exists_until = new SEUntil(not_right1, and);

            StateFormula not_exists_until = new SNot(exists_until);

            return(not_exists_until.existentialNormalForm());
        }
Ejemplo n.º 4
0
        public override StateFormula existentialNormalForm()
        {
            // A(p U w) = NOT E(NOT w U (NOT p AND NOT w)) AND NOT EG NOT w
            StateFormula not_right1 = new SNot(right);
            StateFormula not_right2 = new SNot(right);
            StateFormula not_right3 = new SNot(right);

            StateFormula not_left = new SNot(left);

            StateFormula inner_and       = new SAnd(not_left, not_right2);
            StateFormula exists_until    = new SEUntil(not_right1, inner_and);
            StateFormula not_exists_left = new SNot(exists_until);

            StateFormula exists_always    = new SEAlways(not_right3);
            StateFormula not_exists_right = new SNot(exists_always);

            StateFormula outer_and = new SAnd(not_exists_left, not_exists_right);

            return(outer_and.existentialNormalForm());
        }