コード例 #1
0
        public override Sentence VisitBinarySentence(ComplexSentence s, object arg)
        {
            Sentence result = null;

            if (s.IsBiconditionalSentence())
            {
                // Elimina <=>, reemplazando &alpha; <=> &beta; con (&alpha; => &beta;) & (&beta; => &alpha;)
                Sentence alpha            = s.GetSimplerSentence(0).Accept(this, arg);
                Sentence beta             = s.GetSimplerSentence(1).Accept(this, arg);
                Sentence alphaImpliesBeta = new ComplexSentence(
                    Connective.IMPLICATION, alpha, beta);
                Sentence betaImpliesAlpha = new ComplexSentence(
                    Connective.IMPLICATION, beta, alpha);

                result = new ComplexSentence(Connective.AND, alphaImpliesBeta,
                                             betaImpliesAlpha);
            }
            else
            {
                result = base.VisitBinarySentence(s, arg);
            }
            return(result);
        }