public string PrettyPrint(CsPred <T> t) { string s = ""; foreach (var prod in t.GetSumOfProducts()) { if (s != "") { s += ";"; } var pp = NodeAlgebra.Second as IPrettyPrinter <T>; string inp = ""; if (pp != null) { inp = pp.PrettyPrint(prod.Item2); } else { inp = prod.Item2.ToString(); } string cc = prod.Item1.ToString(); s += inp; if (cc != "") { s += "&" + cc; } } return(s); }
CsLabel(bool isFinalCondition, CsPred <S> guard, CsUpdateSeq updates, Func <S, string> inputToString) { this.isFinalCondition = isFinalCondition; this.Guard = guard; this.Updates = updates; this.InputToString = inputToString; }
public CsAlgebra(IBooleanAlgebra <T> leafAlgebra, ICounter[] counters) { this.counters = counters; this.LeafAlgebra = leafAlgebra; this.NodeAlgebra = new BDDAlgebra <T>(leafAlgebra); __false = new CsPred <T>(this, (BDD <T>)NodeAlgebra.False); __true = new CsPred <T>(this, (BDD <T>)NodeAlgebra.True); this.K = counters.Length; TrueCsConditionSeq = CsConditionSeq.MkTrue(counters.Length); FalseCsConditionSeq = CsConditionSeq.MkFalse(counters.Length); }
public string PrettyPrintCS(CsPred <T> t, Func <CsPred <T>, string> varLookup) { throw new NotImplementedException(); }
public CsPred <T> Simplify(CsPred <T> predicate) { return(predicate); }
public CsPred <T> MkSymmetricDifference(CsPred <T> pred1, CsPred <T> pred2) { var bdd = (BDD <T>)NodeAlgebra.MkSymmetricDifference((BDD)pred1.pred, pred2.pred); return(new CsPred <T>(this, bdd)); }
public CsPred <T> MkOr(CsPred <T> pred1, CsPred <T> pred2) { var bdd = (BDD <T>)NodeAlgebra.MkOr((BDD)pred1.pred, (BDD)pred2.pred); return(new CsPred <T>(this, bdd)); }
public CsPred <T> MkNot(CsPred <T> pred) { var bdd = (BDD <T>)NodeAlgebra.MkNot((BDD)pred.pred); return(new CsPred <T>(this, bdd)); }
public bool IsSatisfiable(CsPred <T> predicate) { return(NodeAlgebra.IsSatisfiable((BDD)predicate.pred)); }
public CsPred <T> GetAtom(CsPred <T> psi) { throw new AutomataException(AutomataExceptionKind.BooleanAlgebraIsNotAtomic); }
public bool EvaluateAtom(CsPred <T> atom, CsPred <T> psi) { throw new AutomataException(AutomataExceptionKind.BooleanAlgebraIsNotAtomic); }
public bool CheckImplication(CsPred <T> lhs, CsPred <T> rhs) { return(NodeAlgebra.CheckImplication((BDD)lhs.pred, rhs.pred)); }
public bool AreEquivalent(CsPred <T> pred1, CsPred <T> pred2) { return(NodeAlgebra.AreEquivalent((BDD)pred1.pred, pred2.pred)); }
public static CsLabel <S> MkTransitionLabel(CsPred <S> guard, CsUpdateSeq updates, Func <S, string> inputToString = null) { return(new CsLabel <S>(false, guard, updates, inputToString)); }
public static CsLabel <S> MkFinalCondition(CsPred <S> guard, Func <S, string> inputToString = null) { return(new CsLabel <S>(true, guard, null, inputToString)); }