Skip to content

Commit

Permalink
add EnsuresFalse case to simplify endpoint, WIP cases for tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
jberthold committed Jul 11, 2023
1 parent c002568 commit 3b8806a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions library/Booster/JsonRpc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ respond stateVar =
{ state = addHeader result
, logs = mkTraces patternTraces
}
Left (ApplyEquations.SideConditionsFalse _) -> do
let tSort = fromMaybe (error "unknown sort") $ sortOfJson req.state.term
pure . Right . Simplify $
SimplifyResult
{ state = addHeader $ KoreJson.KJBottom tSort
, logs = mkTraces [] -- FIXME add traces
}
Left (ApplyEquations.EquationLoop _traces terms) ->
pure . Left . backendError RpcError.Aborted $ map externaliseTerm terms -- FIXME
Left other ->
Expand Down Expand Up @@ -509,4 +516,11 @@ mkLogRewriteTrace
, origin = Booster
, result = Failure{reason = "Internal error: " <> err, _ruleId = Nothing}
}
ApplyEquations.SideConditionsFalse{} ->
Simplification -- FIXME
{ originalTerm = Nothing
, originalTermIndex = Nothing
, origin = Booster
, result = Failure{reason = "Side conditions false", _ruleId = Nothing}
}
_ -> Nothing

0 comments on commit 3b8806a

Please sign in to comment.