2222import org .sosy_lab .java_smt .api .Formula ;
2323import org .sosy_lab .java_smt .api .NumeralFormula .IntegerFormula ;
2424import org .sosy_lab .java_smt .api .NumeralFormula .RationalFormula ;
25- import org .sosy_lab .java_smt .api .SolverException ;
2625import org .sosy_lab .java_smt .api .StringFormula ;
2726
2827@ SuppressWarnings ("ClassTypeParameterName" )
@@ -41,22 +40,22 @@ protected AbstractEvaluator(
4140 @ SuppressWarnings ("unchecked" )
4241 @ Nullable
4342 @ Override
44- public final <T extends Formula > T eval (T f ) throws InterruptedException , SolverException {
43+ public final <T extends Formula > T eval (T f ) {
4544 Preconditions .checkState (!isClosed ());
4645 TFormulaInfo evaluation = evalImpl (creator .extractInfo (f ));
4746 return evaluation == null ? null : (T ) creator .encapsulateWithTypeOf (evaluation );
4847 }
4948
5049 @ Nullable
5150 @ Override
52- public final BigInteger evaluate (IntegerFormula f ) throws InterruptedException , SolverException {
51+ public final BigInteger evaluate (IntegerFormula f ) {
5352 Preconditions .checkState (!isClosed ());
5453 return (BigInteger ) evaluateImpl (creator .extractInfo (f ));
5554 }
5655
5756 @ Nullable
5857 @ Override
59- public Rational evaluate (RationalFormula f ) throws InterruptedException , SolverException {
58+ public Rational evaluate (RationalFormula f ) {
6059 Object value = evaluateImpl (creator .extractInfo (f ));
6160 if (value instanceof BigInteger ) {
6261 // We simplified the value internally. Here, we need to convert it back to Rational.
@@ -68,43 +67,41 @@ public Rational evaluate(RationalFormula f) throws InterruptedException, SolverE
6867
6968 @ Nullable
7069 @ Override
71- public final Boolean evaluate (BooleanFormula f ) throws InterruptedException , SolverException {
70+ public final Boolean evaluate (BooleanFormula f ) {
7271 Preconditions .checkState (!isClosed ());
7372 return (Boolean ) evaluateImpl (creator .extractInfo (f ));
7473 }
7574
7675 @ Nullable
7776 @ Override
78- public final String evaluate (StringFormula f ) throws InterruptedException , SolverException {
77+ public final String evaluate (StringFormula f ) {
7978 Preconditions .checkState (!isClosed ());
8079 return (String ) evaluateImpl (creator .extractInfo (f ));
8180 }
8281
8382 @ Nullable
8483 @ Override
85- public final String evaluate (EnumerationFormula f ) throws InterruptedException , SolverException {
84+ public final String evaluate (EnumerationFormula f ) {
8685 Preconditions .checkState (!isClosed ());
8786 return (String ) evaluateImpl (creator .extractInfo (f ));
8887 }
8988
9089 @ Override
91- public final @ Nullable FloatingPointNumber evaluate (FloatingPointFormula f )
92- throws InterruptedException , SolverException {
90+ public final @ Nullable FloatingPointNumber evaluate (FloatingPointFormula f ) {
9391 Preconditions .checkState (!isClosed ());
9492 return (FloatingPointNumber ) evaluateImpl (creator .extractInfo (f ));
9593 }
9694
9795 @ Nullable
9896 @ Override
99- public final BigInteger evaluate (BitvectorFormula f )
100- throws InterruptedException , SolverException {
97+ public final BigInteger evaluate (BitvectorFormula f ) {
10198 Preconditions .checkState (!isClosed ());
10299 return (BigInteger ) evaluateImpl (creator .extractInfo (f ));
103100 }
104101
105102 @ Nullable
106103 @ Override
107- public final Object evaluate (Formula f ) throws InterruptedException , SolverException {
104+ public final Object evaluate (Formula f ) {
108105 Preconditions .checkState (!isClosed ());
109106 Preconditions .checkArgument (
110107 !(f instanceof ArrayFormula ),
@@ -117,16 +114,15 @@ public final Object evaluate(Formula f) throws InterruptedException, SolverExcep
117114 * set in the model and evaluation aborts, return <code>null</code>.
118115 */
119116 @ Nullable
120- protected abstract TFormulaInfo evalImpl (TFormulaInfo formula )
121- throws InterruptedException , SolverException ;
117+ protected abstract TFormulaInfo evalImpl (TFormulaInfo formula );
122118
123119 /**
124120 * Simplify the given formula and replace all symbols with their model values. If a symbol is not
125121 * set in the model and evaluation aborts, return <code>null</code>. Afterwards convert the
126122 * formula into a Java object as far as possible, i.e., try to match a primitive or simple type.
127123 */
128124 @ Nullable
129- protected final Object evaluateImpl (TFormulaInfo f ) throws InterruptedException , SolverException {
125+ protected final Object evaluateImpl (TFormulaInfo f ) {
130126 Preconditions .checkState (!isClosed ());
131127 TFormulaInfo evaluatedF = evalImpl (f );
132128 return evaluatedF == null ? null : creator .convertValue (f , evaluatedF );
0 commit comments