public override WS1SFormula Normalize(CharSetSolver solver) { var ln = left.Normalize(solver); var rn = right.Normalize(solver); if (ln is WS1SUnaryPred && rn is WS1SUnaryPred) { var cln = ln as WS1SUnaryPred; var crn = rn as WS1SUnaryPred; if (cln.set == crn.set) { return(new WS1SUnaryPred(cln.set, solver.MkOr(cln.pred, crn.pred))); } } else { if (ln is WS1STrue || rn is WS1STrue) { return(ln); } if (ln is WS1SFalse) { return(rn); } if (rn is WS1SFalse) { return(ln); } } return(new WS1SOr(ln, rn)); }
public override WS1SFormula Normalize(CharSetSolver solver) { if (phi is WS1SNot) { return((phi as WS1SNot).phi.Normalize(solver)); } if (phi is WS1SUnaryPred) { var cphi = phi as WS1SUnaryPred; return(new WS1SUnaryPred(cphi.set, solver.MkNot(cphi.pred))); } return(new WS1SNot(phi.Normalize(solver)));; }
public override WS1SFormula Normalize(CharSetSolver solver) { return(new WS1SExists(variable, phi.Normalize(solver))); }