Esempio n. 1
0
        // if the user says ( forall x :: forall y :: { f(x,y) } ... ) we transform it to
        // (forall x, y :: { f(x,y) } ... ) otherwise the prover ignores the trigger
        private void MergeAdjecentQuantifier()
        {
            QuantifierExpr qbody = Body as QuantifierExpr;

            if (!(qbody != null && (qbody is ForallExpr) == (this is ForallExpr) && Triggers == null))
            {
                return;
            }
            qbody.MergeAdjecentQuantifier();
            if (qbody.Triggers == null)
            {
                return;
            }
            Body = qbody.Body;
            TypeParameters.AddRange(qbody.TypeParameters);
            Dummies.AddRange(qbody.Dummies);
            Triggers = qbody.Triggers;
            if (qbody.Attributes != null)
            {
                if (Attributes == null)
                {
                    Attributes = qbody.Attributes;
                }
                else
                {
                    QKeyValue p = Attributes;
                    while (p.Next != null)
                    {
                        p = p.Next;
                    }
                    p.Next = qbody.Attributes;
                }
            }
        }