@@ -32,6 +32,7 @@ import Kore.Internal.Predicate qualified as Predicate
32
32
import Kore.Internal.TermLike qualified as TermLike
33
33
import Kore.Internal.Variable
34
34
import Kore.Syntax.Json qualified as PatternJson
35
+ import Kore.Unparser (unparseToText )
35
36
import Language.Haskell.TH.Syntax (Exp , Loc (.. ), Q , qLocation )
36
37
import Log
37
38
import Prelude.Kore
@@ -101,7 +102,20 @@ instance Entry DecidePredicateUnknown where
101
102
where
102
103
prettyHsLoc Loc {loc_module, loc_start = (row, col)} =
103
104
Pretty. pretty loc_module <> " :" <> Pretty. pretty row <> " :" <> Pretty. pretty col
104
- oneLineDoc _ = " DecidePredicateUnknown"
105
+ oneLineDoc (DecidePredicateUnknown {message, predicates}) =
106
+ Pretty. hsep
107
+ [Pretty. brackets " smt" , Pretty. pretty description]
108
+ where
109
+ predicate = Predicate. makeMultipleAndPredicate . toList $ predicates
110
+ description =
111
+ " solver returned unknwon ("
112
+ <> message
113
+ <> " ) for predicate "
114
+ <> unparseToText
115
+ ( Predicate. fromPredicate
116
+ sortBool
117
+ predicate
118
+ )
105
119
helpDoc _ =
106
120
" error or a warning when the solver cannot decide the satisfiability of a formula"
107
121
@@ -125,6 +139,10 @@ externaliseDecidePredicateUnknown :: DecidePredicateUnknown -> (Text, PatternJso
125
139
externaliseDecidePredicateUnknown err@ DecidePredicateUnknown {message} =
126
140
( message
127
141
, PatternJson. fromPredicate
128
- ( TermLike. SortActualSort $ TermLike. SortActual ( TermLike. Id " SortBool " TermLike. AstLocationNone ) [] )
142
+ sortBool
129
143
(Predicate. makeMultipleAndPredicate . toList $ predicates err)
130
144
)
145
+
146
+ sortBool :: TermLike. Sort
147
+ sortBool =
148
+ (TermLike. SortActualSort $ TermLike. SortActual (TermLike. Id " SortBool" TermLike. AstLocationNone ) [] )
0 commit comments