Class Util
java.lang.Object
de.uni_freiburg.informatik.ultimate.logic.Util
public final class Util
extends java.lang.Object
This class contains some static methods to help creating terms, checking formulas, etc.
- Author:
- christ, heizmann, hoenicke
-
Method Summary
Modifier and Type Method Description static Termand(Script script, Term... subforms)Return slightly simplified version of (and subforms).static Script.LBoolcheckSat(Script script, Term term)Check iftermwhich may contain freeTermVariablesis satisfiable with respect to the current assertion stack ofscript.static Termimplies(Script script, Term... subforms)Create a slightly simplified implies term.static Termite(Script script, Term cond, Term thenPart, Term elsePart)Create a slightly simplified if-then-else term.static Termnot(Script script, Term f)Return slightly simplified version of (not f).static Termor(Script script, Term... subforms)Return slightly simplified version of (or subforms).
-
Method Details
-
checkSat
Check iftermwhich may contain freeTermVariablesis satisfiable with respect to the current assertion stack ofscript. Only the result from this function can be used since the assertion stack will be modified after leaving this function.- Parameters:
script- the script used to run the check.term- the term to check for satisfiability (possibly containing free variables).- Returns:
- the satisfiability status (SAT, UNSAT or UNKNOWN).
-
not
Return slightly simplified version of (not f). It removes double negation and simplifies (not true) and (not false).- Parameters:
script- the Script used to build terms.f- the term to negate- Returns:
- a term logically equivalent to (not f).
-
and
Return slightly simplified version of (and subforms). It removes parameters occuring multiple times, true and false. It also handles the case where there is only one or zero subformulas.- Parameters:
script- the Script used to build terms.subforms- the sub formulas that are conjoined.- Returns:
- a term logically equivalent to (and subforms).
-
or
Return slightly simplified version of (or subforms). It removes parameters occuring multiple times, true and false. It also handles the case where there is only one or zero subformulas.- Parameters:
script- the Script used to build terms.subforms- the sub formulas that are disjoined.- Returns:
- a term logically equivalent to (or subforms).
-
ite
Create a slightly simplified if-then-else term. This mainly optimizes the special cases where one of the parameters is true or false.- Parameters:
script- the script where the term is created.cond- the if condition.thenPart- the then part.elsePart- the else part.- Returns:
- the simplified if-then-else term.
-
implies
Create a slightly simplified implies term. This mainly optimizes the special cases where one of the parameters is true or false or if a left-hand-side term occurs more than once. It also handles the case where only one subformula is given.- Parameters:
script- the script where the term is created.subforms- the sub formulas.- Returns:
- A simplified version of
(=> subforms...).
-