Skip to content

Commit

Permalink
Partially revert the implication endpoint (#3862)
Browse files Browse the repository at this point in the history
Partially reverts #3846 by disabling the implication endpoint in booster
until we figure out and address #3857
  • Loading branch information
goodlyrottenapple authored May 15, 2024
1 parent df703fe commit 5278433
Show file tree
Hide file tree
Showing 9 changed files with 34,707 additions and 33,908 deletions.
368 changes: 184 additions & 184 deletions booster/test/rpc-integration/test-foundry-bug-report/response-006.json

Large diffs are not rendered by default.

11,778 changes: 5,889 additions & 5,889 deletions booster/test/rpc-integration/test-foundry-bug-report/response-008.json

Large diffs are not rendered by default.

11,778 changes: 5,889 additions & 5,889 deletions booster/test/rpc-integration/test-foundry-bug-report/response-010.json

Large diffs are not rendered by default.

11,828 changes: 5,914 additions & 5,914 deletions booster/test/rpc-integration/test-foundry-bug-report/response-012.json

Large diffs are not rendered by default.

11,828 changes: 5,914 additions & 5,914 deletions booster/test/rpc-integration/test-foundry-bug-report/response-014.json

Large diffs are not rendered by default.

20,996 changes: 10,893 additions & 10,103 deletions booster/test/rpc-integration/test-foundry-bug-report/response-016.json

Large diffs are not rendered by default.

31 changes: 18 additions & 13 deletions booster/tools/booster/Proxy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,24 @@ respondEither cfg@ProxyConfig{statsVar, boosterState} booster kore req = case re
fromMaybe (error $ "Module " <> show m <> " not found") $
Map.lookup m bState.definitions
handleExecute logSettings def start execReq
Implies{} -> do
-- try the booster end-point first
(boosterResult, boosterTime) <- Stats.timed $ booster req
case boosterResult of
res@Right{} -> do
logStats ImpliesM (boosterTime, 0)
pure res
Left err -> do
Log.logWarnNS "proxy" . Text.pack $
"implies error in booster: " <> fromError err
(koreRes, koreTime) <- Stats.timed $ kore req
logStats ImpliesM (boosterTime + koreTime, koreTime)
pure koreRes
Implies ImpliesRequest{assumeDefined}
| fromMaybe False assumeDefined -> do
-- try the booster end-point first
(boosterResult, boosterTime) <- Stats.timed $ booster req
case boosterResult of
res@Right{} -> do
logStats ImpliesM (boosterTime, 0)
pure res
Left err -> do
Log.logWarnNS "proxy" . Text.pack $
"implies error in booster: " <> fromError err
(koreRes, koreTime) <- Stats.timed $ kore req
logStats ImpliesM (boosterTime + koreTime, koreTime)
pure koreRes
| otherwise -> do
(koreRes, koreTime) <- Stats.timed $ kore req
logStats ImpliesM (koreTime, koreTime)
pure koreRes
Simplify simplifyReq ->
liftIO (getTime Monotonic) >>= handleSimplify simplifyReq . Just
AddModule _ -> do
Expand Down
7 changes: 5 additions & 2 deletions docs/2022-07-18-JSON-RPC-Server-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,15 @@ Not all backends support logging processing time, and some won't have the differ
"antecedent": {"format": "KORE", "version": 1, "term": {}},
"consequent": {"format": "KORE", "version": 1, "term": {}},
"module": "MODULE-NAME",
"log-timing": true
"log-timing": true,
"assume-defined": false
}
}
```

Optional parameters: `module` (main module name), `log-timing`
Optional parameters: `module` (main module name), `log-timing`, `assume-defined`.

The `assume-defined` flag defaults to `false`. When set to `true`, the server uses the new simplified implication check in booster, which makes the assumption that the antecedent and consequent are bot defined, i.e. don't simplify to `#Bottom`.

### Error Response:

Expand Down
1 change: 1 addition & 0 deletions kore-rpc-types/src/Kore/JsonRpc/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ data ImpliesRequest = ImpliesRequest
{ antecedent :: !KoreJson
, consequent :: !KoreJson
, _module :: !(Maybe Text)
, assumeDefined :: !(Maybe Bool)
, logSuccessfulSimplifications :: !(Maybe Bool)
, logFailedSimplifications :: !(Maybe Bool)
, logTiming :: !(Maybe Bool)
Expand Down

0 comments on commit 5278433

Please sign in to comment.