|
22 | 22 | import liquidjava.processor.context.*; |
23 | 23 | import liquidjava.rj_language.Predicate; |
24 | 24 | import liquidjava.rj_language.ast.Expression; |
25 | | -import liquidjava.smt.GhostFunctionError; |
26 | | -import liquidjava.smt.NotFoundSMTError; |
27 | 25 | import liquidjava.smt.SMTEvaluator; |
28 | | -import liquidjava.smt.TypeCheckError; |
| 26 | +import liquidjava.smt.errors.TypeCheckError; |
29 | 27 | import liquidjava.utils.constants.Keys; |
30 | 28 | import spoon.reflect.cu.SourcePosition; |
31 | 29 | import spoon.reflect.declaration.CtElement; |
@@ -267,10 +265,10 @@ public boolean smtChecks(Predicate found, Predicate expectedType, SourcePosition |
267 | 265 | * |
268 | 266 | * @throws Exception |
269 | 267 | * @throws GhostFunctionError |
270 | | - * @throws TypeCheckError |
| 268 | + * @throws SMTError |
271 | 269 | */ |
272 | 270 | private void smtChecking(Predicate cSMT, Predicate expectedType, SourcePosition p) |
273 | | - throws TypeCheckError, GhostFunctionError, Exception { |
| 271 | + throws TypeCheckError, Exception { |
274 | 272 | new SMTEvaluator().verifySubtype(cSMT, expectedType, context, p); |
275 | 273 | } |
276 | 274 |
|
@@ -335,10 +333,7 @@ private LJError mapError(Exception e, Predicate premisesBeforeChange, Predicate |
335 | 333 | TranslationTable map) { |
336 | 334 | if (e instanceof TypeCheckError) { |
337 | 335 | return new RefinementError(element, expectedType.getExpression(), premisesBeforeChange.simplify(), map); |
338 | | - } else if (e instanceof GhostFunctionError) { |
339 | | - return new GhostInvocationError("Invalid types or number of arguments in ghost invocation", |
340 | | - element.getPosition(), expectedType.getExpression(), map); |
341 | | - } else if (e instanceof NotFoundSMTError) { |
| 336 | + } else if (e instanceof liquidjava.smt.errors.NotFoundError) { |
342 | 337 | return new NotFoundError(element, e.getMessage(), map); |
343 | 338 | } else { |
344 | 339 | return new CustomError(e.getMessage(), element); |
|
0 commit comments