We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8304ec1 commit 1e2720cCopy full SHA for 1e2720c
kore/src/Kore/Rewrite/SMT/Translate.hs
@@ -533,6 +533,11 @@ backTranslateWith
533
backTranslate (List xs)
534
| null xs =
535
throwError "backtranslate: empty list"
536
+ -- special case for the unary minus, back-translating 'List ["-", "X"]' as '0 - X'
537
+ | [fct@(Atom "-"), arg] <- xs
538
+ , Just koreSym <- Map.lookup fct reverseMetadata = do
539
+ arg' <- backTranslate arg
540
+ pure $ TermLike.mkApplySymbol koreSym [mkInternalInt (InternalInt (simpleSort "SortInt") 0), arg']
541
-- everything is translated back using symbol declarations,
542
-- not ML connectives (translating terms not predicates)
543
| (fct@Atom{} : rest) <- xs
0 commit comments