private ISolverStatement MakeNegatedAndCombinations(List<Term> terms) { //Variables List<Term> negatedAnds = new List<Term>(); ISolverStatement finalStatement = null; // for (int i = 0; i < terms.Count; i++) { for (int j = i + 1; j < terms.Count; j++) { negatedAnds.Add(_context.MkNot(_context.MkAnd(terms[i], terms[j]))); } } if (negatedAnds.Count > 1) finalStatement = new Z3Statement(_context.MkAnd(negatedAnds.ToArray())); else finalStatement = new Z3Statement(negatedAnds[0]); // return finalStatement; }
public ISolverStatement MakeLowerOrEqual(ISolverStatement leftStatement, ISolverStatement rightStatement) { //Variables ISolverStatement finalStatement = null; Term leftTerm = ((Z3Statement)leftStatement).Term; Term rightTerm = ((Z3Statement)rightStatement).Term; // finalStatement = new Z3Statement(_context.MkLe(leftTerm, rightTerm)); return finalStatement; }
public ISolverStatement MakeNegation(ISolverStatement innerStatement) { //Variables ISolverStatement finalStatement = null; Term term = ((Z3Statement)innerStatement).Term; // finalStatement = new Z3Statement(_context.MkNot(term)); return finalStatement; }
public ISolverStatement MakeImplies(string leftVarID, ISolverStatement rightStatement) { //Variables ISolverStatement finalStatement = null; Term leftTerm = _variables[leftVarID].Term; Term rightTerm = ((Z3Statement)rightStatement).Term; // finalStatement = new Z3Statement(_context.MkImplies(leftTerm, rightTerm)); return finalStatement; }
public ISolverStatement MakeExcludes(string leftVarID, string rightVarID) { //Variables ISolverStatement finalStatement = null; Term leftTerm = _variables[leftVarID].Term; Term rightTerm = _variables[rightVarID].Term; // finalStatement = new Z3Statement(_context.MkNot(_context.MkAnd(leftTerm, rightTerm))); return finalStatement; }
public ISolverStatement MakeExcludes(ISolverStatement leftStatement, ISolverStatement rightStatement) { //Variables ISolverStatement finalStatement = null; Term leftTerm = ((Z3Statement)leftStatement).Term; Term rightTerm = ((Z3Statement)rightStatement).Term; // finalStatement = new Z3Statement(_context.MkNot(_context.MkAnd(leftTerm, rightTerm))); return finalStatement; }
public ISolverStatement MakeEquivalence(string leftVarID, ISolverStatement rightStatement) { //Variables ISolverStatement finalStatement = null; Term leftTerm = _variables[leftVarID].Term; Term rightTerm = ((Z3Statement)rightStatement).Term; // Z3Statement substatement1 = new Z3Statement(_context.MkImplies(leftTerm, rightTerm)); Z3Statement substatement2 = new Z3Statement(_context.MkImplies(rightTerm, leftTerm)); finalStatement = new Z3Statement(_context.MkAnd(substatement1.Term, substatement2.Term)); return finalStatement; }
public ISolverStatement MakeAdd(ISolverStatement[] innerStatements) { //Variables ISolverStatement finalStatement = null; List<Term> terms = new List<Term>(); foreach (ISolverStatement innerStatement in innerStatements) { terms.Add(((Z3Statement)innerStatement).Term); } // finalStatement = new Z3Statement(_context.MkAdd(terms.ToArray())); return finalStatement; }