Skip to content

Commit

Permalink
transform rawTerm(inj{SortX,SortKItem}(X)) => X while deserialising L…
Browse files Browse the repository at this point in the history
  • Loading branch information
jberthold committed Dec 20, 2023
1 parent 4ab3fc3 commit 49d7a78
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions library/Booster/Pattern/Binary.hs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ decodeBlock mbSize = do
False -> m >> whileNotEnded m

mkSymbolApplication :: ByteString -> [Sort] -> [Block] -> DecodeM Block
-- automatically transform `rawTerm(inj{SortX, KItem}(X))` to X:SortX
-- see https://github.com/runtimeverification/llvm-backend/issues/916
mkSymbolApplication "rawTerm" [] [BTerm t]
| Injection sort SortKItem t' <- t
, sort == sortOfTerm t' =
pure $ BTerm t'
mkSymbolApplication "\\and" _ [BTerm t1, BTerm t2] = pure $ BTerm $ AndTerm t1 t2
mkSymbolApplication "\\and" _ bs =
argError "AndTerm" [BTerm undefined, BTerm undefined] bs
Expand Down

0 comments on commit 49d7a78

Please sign in to comment.