Skip to content

Commit

Permalink
Return vacuous on undefined concrete terms
Browse files Browse the repository at this point in the history
  • Loading branch information
geo2a committed Aug 21, 2024
1 parent 39e6abc commit df4cfae
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions booster/library/Booster/JsonRpc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,20 @@ respond stateVar request =
checkConstraintsConsistent
substPat

let trivialResponse =
execResponse
req
(0, mempty, RewriteTrivial substPat)
substitution
unsupported

case evaluatedInitialPattern of
(Left ApplyEquations.SideConditionFalse{}, _) -> do
-- input pattern's constraints are Bottom, return Vacuous
pure $
execResponse
req
(0, mempty, RewriteTrivial substPat)
substitution
unsupported
pure trivialResponse
(Left ApplyEquations.UndefinedTerm{}, _) -> do
-- LLVM has stumbled upon an undefined term, the whole term is Bottom, return Vacuous
pure trivialResponse
(Left other, _) ->
pure . Left . RpcError.backendError $ RpcError.Aborted (Text.pack . constructorName $ other)
(Right newPattern, simplifierCache) -> do
Expand Down

0 comments on commit df4cfae

Please sign in to comment.