public static MjuFormula ExistTrans(MjuFormula formula) { if (formula == null) throw new ArgumentNullException ("formula"); return new MjuFormula (formula, null, MjuOperator.MJU_EXISTS, null); }
private MjuFormula(MjuFormula left, MjuFormula right, MjuOperator op, string name) { this.Left = left; this.Right = right; this.Operator = op; this.Name = name; }
public static MjuFormula And(MjuFormula left, MjuFormula right) { if (left == null) throw new ArgumentNullException ("left"); if (right == null) throw new ArgumentNullException ("right"); return new MjuFormula (left, right, MjuOperator.LOGIC_AND, null); }
public static MjuFormula LeastFixedPoint(MjuFormula formula, string var) { if (formula == null) throw new ArgumentNullException ("formula"); if (var == null) throw new ArgumentNullException ("var"); return new MjuFormula (formula, Var (var), MjuOperator.MJU_LFP, null); }
public static MjuFormula Not(MjuFormula formula) { if (formula == null) throw new ArgumentNullException ("formula"); switch (formula.Operator) { case MjuOperator.TRUE : return FALSE; case MjuOperator.FALSE : return TRUE; case MjuOperator.LOGIC_NOT : return formula.Left; case MjuOperator.LOGIC_AND : return new MjuFormula (Not (formula.Left), Not (formula.Right), MjuOperator.LOGIC_OR, null); case MjuOperator.LOGIC_OR : return new MjuFormula (Not (formula.Left), Not (formula.Right), MjuOperator.LOGIC_AND, null); case MjuOperator.MJU_ALL : return ExistTrans (Not (formula.Left)); case MjuOperator.MJU_EXISTS : return AllTrans (Not (formula.Left)); case MjuOperator.MJU_LFP : return GreatestFixedPoint (Not (formula.Left), formula.Right.Name); case MjuOperator.MJU_GFP : return LeastFixedPoint (Not (formula.Left), formula.Right.Name); case MjuOperator.VARIABLE : return formula; default : return new MjuFormula (formula, null, MjuOperator.LOGIC_NOT, null); } }