public void EqualsTest() { bool constant = false; Bdd target = new Bdd(constant); Bdd bdd = null; bool expected = false; bool actual; actual = target.Equals(bdd); Assert.AreEqual(expected, actual, "BddSharp.Kernel.Bdd.Equals did not return the expected value."); Bdd target2 = new Bdd(2); Bdd target22 = new Bdd(2); bool expected2 = true; bool actual2 = target2.Equals(target22); Assert.AreEqual(expected2, actual2, "Equals with same var"); target = new Bdd(3); expected = false; actual = target.Equals(target2); Assert.AreEqual(expected, actual, "Equals with dif var"); }
public static Bdd ReachableStates(Bdd I, Bdd T, List <int> PreState, List <int> PostState) { Bdd Rp, tmp, t; Bdd R = new Bdd(false); do { Rp = R; tmp = Kernel.And(T, R); t = Kernel.Exists(PreState, tmp); R = Kernel.Or(I, Kernel.Compose(t, PreState, PostState)); }while (!R.Equals(Rp)); return(R); }
public void LowTest() { bool constant = true; Bdd target = new Bdd(constant); Bdd val = new Bdd(true); bool result = val.Equals(target.Low); Assert.AreEqual(true, result, "BddSharp.Kernel.Bdd.Low was not set correctly1."); target = new Bdd(2); val = new Bdd(false); result = val.Equals(target.Low); Assert.AreEqual(true, result, "BddSharp.Kernel.Bdd.Low was not set correctly2."); }
public void HighTest() { bool constant = false; Bdd target = new Bdd(constant); Bdd val = new Bdd(false); bool result = val.Equals(target.High); Assert.AreEqual(true, result, "BddSharp.Kernel.Bdd.High was not set correctly."); target = new Bdd(2); val = new Bdd(true); result = val.Equals(target.High); Assert.AreEqual(true, result, "BddSharp.Kernel.Bdd.High was not set correctly."); }
private Bdd ReachableStates(Bdd I, Bdd T, BddPairList bpl) { Bdd Rp, tmp, t; Bdd R = new Bdd(false); do { Rp = R; tmp = T & R; t = Kernel.Exists(bpl, tmp); R = I | Kernel.Compose(t, bpl); count++; }while (!R.Equals(Rp)); return(R); }
private Bdd ReachableStates(Bdd I, Bdd T, List <int> PreState, List <int> PostState) { Bdd Rp, tmp, t; Bdd R = new Bdd(false); do { Rp = R; tmp = T & R; t = Kernel.Exists(PreState, tmp); R = I | Kernel.Compose(t, PreState, PostState); count++; }while (!R.Equals(Rp)); return(R); }
public Bdd ReachableStates() { int count = 0; Bdd Rp, tmp, t; Bdd result = new Bdd(false); do { Rp = result; tmp = T & result; t = FddKernel.Exists(pairs, tmp); count++; //Console.WriteLine(String.Format("time: {0}, count: {1}", DateTime.Now.ToString(), count)); result = I | FddKernel.Compose(t, pairs); }while (!result.Equals(Rp)); return(result); }
private int Tracelength(BddPairList bpl) { int count = 0; Bdd Rp, tmp, t; Bdd R = I; do { Bdd test = E >= R; if (test.U == Kernel.bddtrue) { break; } Rp = R; tmp = T & R; t = Kernel.Exists(bpl, tmp); R = I | Kernel.Compose(t, bpl); count++; }while (!R.Equals(Rp)); return(count); }
private int Tracelength() { int count = 0; Bdd Rp, tmp, t; Bdd R = I; do { Bdd test = E >= R; if (test.U == Kernel.bddtrue) { break; } Rp = R; tmp = T & R; t = FddKernel.Exists(pairs, tmp); R = I | FddKernel.Compose(t, pairs); count++; //R.Serialize(String.Format("TracelengthLoop{0}",count),40); }while (!R.Equals(Rp)); return(count); }