public void DileepTest1() { PDLEnumerator pdlEnumerator = new PDLEnumerator(); PDLPred phi = new PDLAtSet('a', new PDLPredSet("x", new PDLModSetEq(new PDLAllPosBefore(new PDLPosVar("x")), 2, 1))); var solver = new CharSetSolver(BitWidth.BV64); var alph = new List <char> { 'a', 'b' }; var al = new HashSet <char>(alph); var dfa = phi.GetDFA(al, solver); //solver.SaveAsDot(dfa, "C:/Users/Dileep/Desktop/oddPos.dot"); PDLPred synthPhi = null; StringBuilder sb = new StringBuilder(); foreach (var phi1 in pdlEnumerator.SynthesizePDL(al, dfa, solver, sb, 10000)) { synthPhi = phi1; break; } Console.WriteLine(sb); }
public void aAtEven() { var solver = new CharSetSolver(BitWidth.BV64); List <char> alph = new List <char> { 'a', 'b', 'c' }; HashSet <char> al = new HashSet <char>(alph); PDLPred phi = new PDLAtSet('a', new PDLPredSet("p", new PDLModSetEq(new PDLAllPosUpto(new PDLPosVar("p")), 2, 0))); StringBuilder sb = new StringBuilder(); phi.ToString(sb); System.Console.WriteLine(sb); System.Console.WriteLine(phi.Eval("babababb", new Dictionary <string, int>())); var dfa = phi.GetDFA(al, solver); //string file = "../../../TestPDL/DotFiles/aAtEven"; //solver.SaveAsDot(dfa, "aut", file); }
public void DileepTest1() { PDLEnumerator pdlEnumerator = new PDLEnumerator(); PDLPred phi = new PDLAtSet('a', new PDLPredSet("x", new PDLModSetEq(new PDLAllPosBefore(new PDLPosVar("x")), 2, 1))); var solver = new CharSetSolver(BitWidth.BV64); var alph = new List<char> { 'a', 'b' }; var al = new HashSet<char>(alph); var dfa = phi.GetDFA(al, solver); //solver.SaveAsDot(dfa, "C:/Users/Dileep/Desktop/oddPos.dot"); PDLPred synthPhi = null; StringBuilder sb = new StringBuilder(); foreach (var phi1 in pdlEnumerator.SynthesizePDL(al, dfa, solver, sb, 10000)) { synthPhi = phi1; break; } Console.WriteLine(sb); }
public void aAtEven() { var solver = new CharSetSolver(BitWidth.BV64); List<char> alph = new List<char> { 'a', 'b', 'c' }; HashSet<char> al = new HashSet<char>(alph); PDLPred phi = new PDLAtSet('a', new PDLPredSet("p", new PDLModSetEq(new PDLAllPosUpto(new PDLPosVar("p")), 2, 0))); StringBuilder sb = new StringBuilder(); phi.ToString(sb); System.Console.WriteLine(sb); System.Console.WriteLine(phi.Eval("babababb", new Dictionary<string, int>())); var dfa = phi.GetDFA(al, solver); //string file = "../../../TestPDL/DotFiles/aAtEven"; //solver.SaveAsDot(dfa, "aut", file); }