예제 #1
0
        ////////////////////////////////////////////////////////////
        public static PropositionalFormula operator |(PropositionalFormula x, PropositionalFormula y)
        {
            var result = new PropositionalFormula(x);

            result.orWith(y);
            return(result);
        }
예제 #2
0
        public static PropositionalFormula or(IEnumerable <PropositionalFormula> others)
        {
            Debug.Assert(others != null);
//            Debug.Assert(predecessors.Count > 0);
            var result = new PropositionalFormula(false);

            foreach (var o in others)
            {
                result.orWith(o);
            }

/*            if (predecessors.Count()==1)
 *          {
 *              var of = predecessors.First();
 *              var nof = !of;
 *              var nr = !result;
 *              Debug.Assert((result & nof).isFalse);
 *              Debug.Assert((nr     &  of).isFalse);
 *              Debug.Assert((result | nof).isTrue);
 *              Debug.Assert((nr     | of ).isTrue);
 *          }
 * */
            return(result);
        }