@@ -35,7 +35,7 @@ addBoundsConstructor ctor@(Constructor _ (Interface _ decls) _ pre post invs sta
3535 , _cpostconditions = post'
3636 , _invariants = invs' }
3737 where
38- pre' = pre
38+ pre' = nub $ pre
3939 <> mkCallDataBounds decls
4040 <> mkEthEnvBounds (ethEnvFromConstructor ctor)
4141 -- The following is sound as values of locations outside local storage
@@ -55,7 +55,7 @@ addBoundsBehaviour :: Behaviour -> Behaviour
5555addBoundsBehaviour behv@ (Behaviour _ _ (Interface _ decls) _ pre cases post stateUpdates ret) =
5656 behv { _preconditions = pre', _postconditions = post' }
5757 where
58- pre' = pre
58+ pre' = nub $ pre
5959 <> mkCallDataBounds decls
6060 <> mkStorageBounds stateUpdates Pre
6161 <> mkLocationBounds locs
@@ -72,14 +72,14 @@ addBoundsInvariant :: Constructor -> Invariant -> Invariant
7272addBoundsInvariant (Constructor _ (Interface _ decls) _ _ _ _ _) inv@ (Invariant _ preconds storagebounds (PredTimed predicate _)) =
7373 inv { _ipreconditions = preconds', _istoragebounds = storagebounds' }
7474 where
75- preconds' = preconds
75+ preconds' = nub $ preconds
7676 <> mkCallDataBounds decls
7777 <> mkEthEnvBounds (ethEnvFromExp predicate)
7878 <> mkLocationBounds nonlocalLocs
7979 storagebounds' = storagebounds
8080 <> mkLocationBounds localLocs
8181
82- locs = concatMap locsFromExp (preconds <> storagebounds)
82+ locs = nub $ concatMap locsFromExp (preconds <> storagebounds)
8383 <> locsFromExp predicate
8484 (nonlocalLocs, localLocs) = partition (not . isLocalLoc) locs
8585
0 commit comments