File tree Expand file tree Collapse file tree 3 files changed +20
-8
lines changed Expand file tree Collapse file tree 3 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,6 @@ internalize tools =
198
198
where
199
199
internalize1 =
200
200
List. internalize tools
201
- . Map. internalize
202
- . Set. internalize
201
+ . Map. internalize tools
202
+ . Set. internalize tools
203
203
. InternalBytes. internalize
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ import Data.Text
52
52
import Kore.Attribute.Hook
53
53
( Hook (.. )
54
54
)
55
+ import qualified Kore.Attribute.Symbol as Attribute
55
56
import qualified Kore.Builtin.AssociativeCommutative as Ac
56
57
import Kore.Builtin.Attributes
57
58
( isConstructorModulo_
@@ -484,14 +485,18 @@ internalize subterms.
484
485
485
486
internalize
486
487
:: InternalVariable variable
487
- => TermLike variable
488
+ => SmtMetadataTools Attribute. Symbol
489
+ -> TermLike variable
488
490
-> TermLike variable
489
- internalize termLike
491
+ internalize tools termLike
492
+ | fromMaybe False (isMapSort tools sort')
490
493
-- Ac.toNormalized is greedy about 'normalizing' opaque terms, we should only
491
494
-- apply it if we know the term head is a constructor-like symbol.
492
- | App_ symbol _ <- termLike
495
+ , App_ symbol _ <- termLike
493
496
, isConstructorModulo_ symbol = Ac. toNormalizedInternalMap termLike
494
497
| otherwise = termLike
498
+ where
499
+ sort' = termLikeSort termLike
495
500
496
501
{- | Simplify the conjunction or equality of two concrete Map domain values.
497
502
Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ import qualified Data.Set as Set
52
52
import Data.Text
53
53
( Text
54
54
)
55
+ import qualified Kore.Attribute.Symbol as Attribute
56
+ ( Symbol
57
+ )
55
58
import qualified Kore.Builtin.AssociativeCommutative as Ac
56
59
import Kore.Builtin.Attributes
57
60
( isConstructorModulo_
@@ -485,14 +488,18 @@ internalize subterms.
485
488
-}
486
489
internalize
487
490
:: InternalVariable variable
488
- => TermLike variable
491
+ => SmtMetadataTools Attribute. Symbol
492
+ -> TermLike variable
489
493
-> TermLike variable
490
- internalize termLike
494
+ internalize tools termLike
495
+ | fromMaybe False (isSetSort tools sort')
491
496
-- Ac.toNormalized is greedy about 'normalizing' opaque terms, we should only
492
497
-- apply it if we know the term head is a constructor-like symbol.
493
- | App_ symbol _ <- termLike
498
+ , App_ symbol _ <- termLike
494
499
, isConstructorModulo_ symbol = Ac. toNormalizedInternalSet termLike
495
500
| otherwise = termLike
501
+ where
502
+ sort' = termLikeSort termLike
496
503
497
504
{- | Simplify the conjunction or equality of two concrete Set domain values.
498
505
You can’t perform that action at this time.
0 commit comments