public override WS1SFormula ToWS1S(CharSetSolver solver) { if (WS1S == null) { WS1S = new WS1SSingleton(set); } return(WS1S); }
public void WS1SSingleton() { var solver = new CharSetSolver(BitWidth.BV64); //new solver using ASCII encoding List<char> alph = new List<char> { 'a', 'b' }; HashSet<char> al = new HashSet<char>(alph); WS1SFormula f1 = new WS1SSingleton("X"); WS1SFormula phi = new WS1SExists("X", f1); var dfa = phi.getDFA(al, solver); var test = solver.Convert(@"^(a|b)+$").Determinize(solver).Minimize(solver); string file = "../../../MSOZ3Test/DotFiles/singletona"; solver.SaveAsDot(dfa, "aut", file); //extension .dot is added automatically when missing Assert.IsTrue(dfa.IsEquivalentWith(test, solver)); }
internal override Automaton <BDD> getDFA(List <string> variables, BDD alphabet, CharSetSolver solver) { return(WS1SSingleton.computeDFA(variables, alphabet, solver, this.set)); }
public override WS1SFormula ToWS1S(CharSetSolver solver) { if (WS1S == null) WS1S = new WS1SSingleton(set); return WS1S; }
public void WS1SNot() { var solver = new CharSetSolver(BitWidth.BV64); //new solver using ASCII encoding List<char> alph = new List<char> { 'a', 'b' }; HashSet<char> al = new HashSet<char>(alph); WS1SFormula f1 = new WS1SUnaryPred("X", solver.MkCharConstraint(false, 'a')); WS1SFormula f2 = new WS1SSingleton("X"); WS1SFormula f = new WS1SAnd(f1, f2); WS1SFormula phi = new WS1SNot(new WS1SExists("X", f)); var dfa = phi.getDFA(al, solver); var test = solver.Convert(@"^b*$"); Assert.IsTrue(dfa.IsEquivalentWith(test, solver)); string file = "../../../MSOZ3Test/DotFiles/nota"; solver.SaveAsDot(dfa, "aut", file); //extension .dot is added automatically when missing }