Class AbstractEvaluator<TFormulaInfo,TType,TEnv>
- All Implemented Interfaces:
AutoCloseable,Evaluator
- Direct Known Subclasses:
AbstractModel
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractEvaluator(AbstractProver<?> pProver, FormulaCreator<TFormulaInfo, TType, TEnv, ?> creator) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Free resources associated with this evaluator (existingFormulainstances stay valid, butEvaluator.evaluate(Formula)etc.final <T extends Formula>
@Nullable Teval(T f) Evaluate a given formula substituting the values from the model and return it as formula.protected abstract @Nullable TFormulaInfoevalImpl(TFormulaInfo formula) Simplify the given formula and replace all symbols with their model values.final @Nullable BigIntegerType-safe evaluation for bitvector formulas.final @Nullable BooleanType-safe evaluation for boolean formulas.final @Nullable StringType-safe evaluation for enumeration formulas.final @Nullable FloatingPointNumberType-safe evaluation for floating-point formulas.final @Nullable ObjectEvaluate a given formula substituting the values from the model.final @Nullable BigIntegerType-safe evaluation for integer formulas.@Nullable RationalType-safe evaluation for rational formulas.final @Nullable StringType-safe evaluation for string formulas.protected final @Nullable ObjectSimplify the given formula and replace all symbols with their model values.protected booleanisClosed()
-
Field Details
-
creator
-
-
Constructor Details
-
AbstractEvaluator
protected AbstractEvaluator(AbstractProver<?> pProver, FormulaCreator<TFormulaInfo, TType, TEnv, ?> creator)
-
-
Method Details
-
eval
Description copied from interface:EvaluatorEvaluate a given formula substituting the values from the model and return it as formula.If a value is not relevant to the satisfiability result, the solver can choose either to insert an arbitrary value (e.g., the value
0for the matching type) or just returnnull.The formula does not need to be a variable, we also allow complex expression. The solver will replace all symbols from the formula with their model values and then simplify the formula into a simple formula, e.g., consisting only of a numeral expression.
-
evaluate
Description copied from interface:EvaluatorType-safe evaluation for integer formulas.The formula does not need to be a variable, we also allow complex expression.
-
evaluate
Description copied from interface:EvaluatorType-safe evaluation for rational formulas.The formula does not need to be a variable, we also allow complex expression.
-
evaluate
Description copied from interface:EvaluatorType-safe evaluation for boolean formulas.The formula does not need to be a variable, we also allow complex expression.
-
evaluate
Description copied from interface:EvaluatorType-safe evaluation for string formulas.The formula does not need to be a variable, we also allow complex expression.
-
evaluate
Description copied from interface:EvaluatorType-safe evaluation for enumeration formulas.The formula does not need to be a variable, we also allow complex expression.
-
evaluate
Description copied from interface:EvaluatorType-safe evaluation for floating-point formulas.The formula does not need to be a variable, we also allow complex expression.
-
evaluate
Description copied from interface:EvaluatorType-safe evaluation for bitvector formulas.The formula does not need to be a variable, we also allow complex expression.
-
evaluate
Description copied from interface:EvaluatorEvaluate a given formula substituting the values from the model.If a value is not relevant to the satisfiability result, the model can choose either an arbitrary value (e.g., the value
0for the matching type) or just returnnull.The formula does not need to be a variable, we also allow complex expression.
-
evalImpl
Simplify the given formula and replace all symbols with their model values. If a symbol is not set in the model and evaluation aborts, returnnull. -
evaluateImpl
Simplify the given formula and replace all symbols with their model values. If a symbol is not set in the model and evaluation aborts, returnnull. Afterwards convert the formula into a Java object as far as possible, i.e., try to match a primitive or simple type. -
isClosed
protected boolean isClosed() -
close
public void close()Description copied from interface:EvaluatorFree resources associated with this evaluator (existingFormulainstances stay valid, butEvaluator.evaluate(Formula)etc. must not be called again).- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceEvaluator
-