From 11f05b6a3751a3cea1f7e1bf6bb3645a74723804 Mon Sep 17 00:00:00 2001 From: lefterislazar Date: Sun, 14 Sep 2025 02:33:13 +0300 Subject: [PATCH 1/6] WIP partial vyper compatibility --- src/Act/Bounds.hs | 6 +- src/Act/CLI.hs | 104 +++++++++++++++++++++---- src/Act/Consistency.hs | 6 +- src/Act/Coq.hs | 4 +- src/Act/Decompile.hs | 6 +- src/Act/HEVM.hs | 132 +++++++++++++++++++++++--------- src/Act/Lex.x | 8 ++ src/Act/Parse.y | 15 +++- src/Act/Print.hs | 2 +- src/Act/SMT.hs | 4 +- src/Act/Syntax.hs | 10 +-- src/Act/Syntax/Typed.hs | 11 ++- src/Act/Syntax/TypedExplicit.hs | 2 +- src/Act/Syntax/Untyped.hs | 5 +- src/Act/Type.hs | 62 ++++++++++++--- 15 files changed, 287 insertions(+), 90 deletions(-) diff --git a/src/Act/Bounds.hs b/src/Act/Bounds.hs index 5ce46edd..1d76eee2 100644 --- a/src/Act/Bounds.hs +++ b/src/Act/Bounds.hs @@ -25,7 +25,7 @@ and postconditions. addBounds :: Act -> Act addBounds (Act store contracts) = Act store (addBoundsContract <$> contracts) where - addBoundsContract (Contract ctors behvs) = Contract (addBoundsConstructor ctors) (addBoundsBehaviour <$> behvs) + addBoundsContract (Contract layout ctors behvs) = Contract layout (addBoundsConstructor ctors) (addBoundsBehaviour <$> behvs) -- | Adds type bounds for calldata, environment vars, and external storage vars -- as preconditions @@ -45,7 +45,7 @@ addBoundsConstructor ctor@(Constructor _ (Interface _ decls) _ pre post invs sta invs' = addBoundsInvariant ctor <$> invs post' = post <> mkStorageBounds stateUpdates Post - locs = concatMap locsFromExp (pre <> post) + locs = nub $ concatMap locsFromExp (pre <> post) <> concatMap locsFromInvariant invs <> concatMap locsFromUpdate stateUpdates nonlocalLocs = filter (not . isLocalLoc) locs @@ -63,7 +63,7 @@ addBoundsBehaviour behv@(Behaviour _ _ (Interface _ decls) _ pre cases post stat post' = post <> mkStorageBounds stateUpdates Post - locs = concatMap locsFromExp (pre <> post <> cases) + locs = nub $ concatMap locsFromExp (pre <> post <> cases) <> concatMap locsFromUpdate stateUpdates -- | Adds type bounds for calldata, environment vars, and storage vars diff --git a/src/Act/CLI.hs b/src/Act/CLI.hs index dd0c27bd..9d2e8c4c 100644 --- a/src/Act/CLI.hs +++ b/src/Act/CLI.hs @@ -13,13 +13,19 @@ module Act.CLI (main, compile, proceed, prettyErrs) where import Data.Aeson hiding (Bool, Number, json, Success) +import Data.Aeson.Optics +import Data.Aeson.Key qualified as Key +import Data.Aeson.KeyMap qualified as KeyMap import GHC.Generics import System.Exit ( exitFailure ) import System.IO (hPutStrLn, stderr) +import System.Process import Data.Text (unpack) +import Data.Text.Encoding (encodeUtf8, decodeUtf8) import Data.List import qualified Data.Map as Map import Data.Map (Map) +import Data.HashMap.Strict qualified as HMap import Data.Maybe import qualified Data.Text as Text import qualified Data.Text.IO as TIO @@ -28,17 +34,21 @@ import GHC.Conc import GHC.Natural import Options.Generic +import Optics.Core +import Optics.Operators.Unsafe + import qualified Data.ByteString.Lazy.Char8 as B import qualified Data.ByteString as BS +import qualified Data.ByteString.Base16 as BS16 import Data.ByteString (ByteString) import Control.Monad -import Control.Lens.Getter +import Control.Lens.Getter as LensGetter import Act.Error import Act.Lex (lexer, AlexPosn(..)) import Act.Parse -import Act.Syntax.TypedExplicit +import Act.Syntax.TypedExplicit hiding (_Array) import Act.Bounds import Act.SMT as SMT import Act.Type @@ -47,11 +57,12 @@ import Act.HEVM import Act.HEVM_utils import Act.Consistency import Act.Print -import Act.Decompile +import Act.Decompile hiding (storageLayout) import qualified EVM.Solvers as Solvers import EVM.Solidity import EVM.Effects +import Debug.Trace --command line options data Command w @@ -259,34 +270,99 @@ hevm actspec sol' code' initcode' solver' timeout debug' = do where createContractMap :: [Contract] -> IO (Map Id (Contract, BS.ByteString, BS.ByteString)) createContractMap contracts = do - foldM (\cmap spec'@(Contract cnstr _) -> do + foldM (\cmap spec'@(Contract layout cnstr _) -> do let cid = _cname cnstr - (initcode'', runtimecode') <- getBytecode cid -- TODO do not reread the file each time + (initcode'', runtimecode') <- getBytecode cid layout -- TODO do not reread the file each time pure $ Map.insert cid (spec', initcode'', runtimecode') cmap ) mempty contracts - getBytecode :: Id -> IO (BS.ByteString, BS.ByteString) - getBytecode cid = + getBytecode :: Id -> LayoutMode -> IO (BS.ByteString, BS.ByteString) + getBytecode cid layout = case (sol', code', initcode') of (Just f, Nothing, Nothing) -> do solContents <- TIO.readFile f - bytecodes (Text.pack cid) solContents + bytecodes (Text.pack cid) layout solContents (Nothing, Just _, Just _) -> render (text "Only Solidity file supported") >> exitFailure -- pure (i, c) (Nothing, Nothing, _) -> render (text "No runtime code is given" <> line) >> exitFailure (Nothing, _, Nothing) -> render (text "No initial code is given" <> line) >> exitFailure (Just _, Just _, _) -> render (text "Both Solidity file and runtime code are given. Please specify only one." <> line) >> exitFailure - (Just _, _, Just _) -> render (text "Both Solidity file and initial code are given. Please specify only one." <> line) >> exitFailure + (Just _, _, Just _) -> render (text "Both Solidityfile and initial code are given. Please specify only one." <> line) >> exitFailure -bytecodes :: Text -> Text -> IO (BS.ByteString, BS.ByteString) -bytecodes cid src = do +bytecodes :: Text -> LayoutMode -> Text -> IO (BS.ByteString, BS.ByteString) +bytecodes cid SolidityLayout src = do json <- solc Solidity src False let (Contracts sol', _, _) = fromJust $ readStdJSON json let err = error $ "Cannot find Solidity contract " <> Text.unpack cid pure ((fromMaybe err . Map.lookup ("hevm.sol" <> ":" <> cid) $ sol').creationCode, (fromMaybe err . Map.lookup ("hevm.sol" <> ":" <> cid) $ sol').runtimeCode) - - +bytecodes cid VyperLayout src = do + json <- vyper cid src + let contracts = fromJust $ readVyperJSON json + let err = error $ "Cannot find Solidity contract " <> Text.unpack cid + pure (fromMaybe err . lookup (cid <> ".vy" <> ":" <> cid) $ contracts) + +vyper :: Text -> Text -> IO Text +vyper cid src = Text.pack <$> readProcess "vyper" ["--standard-json"] (Text.unpack $ stdVyperJson cid src) + +stdVyperJson :: Text -> Text -> Text +stdVyperJson cid src = decodeUtf8 $ BS.toStrict $ encode $ vyperToJSON cid src + +vyperToJSON :: Text -> Text -> Value +vyperToJSON cid src = + object [ "language" .= (toJSON :: String -> Value) ("Vyper" :: String) + , "sources" .= object [ Key.fromText (cid <> ".vy") .= object ["content" .= src]] + , "settings" .= + object [ "outputSelection" .= + object ["*" .= + object ["*" .= ((toJSON :: [String] -> Value) + ["metadata" :: String, + "evm.bytecode", + "evm.deployedBytecode", + "abi", + --"storageLayout", + "evm.bytecode.sourceMap", + --"evm.bytecode.linkReferences", + --"evm.bytecode.generatedSources", + "evm.deployedBytecode.sourceMap" + --"evm.deployedBytecode.linkReferences", + --"evm.deployedBytecode.generatedSources", + --"evm.deployedBytecode.immutableReferences" + ]), + "" .= ((toJSON :: [String] -> Value) ["ast" :: String]) + ] + ] + ] + + ] + +-- | Parses the standard json output from solc +readVyperJSON :: Text -> Maybe [(Text,(ByteString, ByteString))] +readVyperJSON json = do + contracts <- KeyMap.toHashMapText <$> json ^? key "contracts" % _Object + let contractMap = f contracts + pure $ Map.toList contractMap + where + f :: (AsValue s) => HMap.HashMap Text s -> (Map Text (ByteString, ByteString)) + f x = Map.fromList . (concatMap g) . HMap.toList $ x + g (s, x) = h s <$> HMap.toList (KeyMap.toHashMapText (fromMaybe (error "Could not parse json object") (preview _Object x))) + h :: Text -> (Text, Value) -> (Text, (ByteString, ByteString)) + h s (c, x) = + let + evmstuff = x ^?! key "evm" + sc = s <> ":" <> c + runtime = evmstuff ^?! key "deployedBytecode" + creation = evmstuff ^?! key "bytecode" + theRuntimeCode = (toCode sc) $ fromMaybe "" $ runtime ^? key "object" % _String + theCreationCode = (toCode sc) $ fromMaybe "" $ creation ^? key "object" % _String + in (sc, (theCreationCode, theRuntimeCode)) + +toCode :: Text -> Text -> ByteString +toCode contractName t = case BS16.decodeBase16Untyped (encodeUtf8 (Text.drop 2 t)) of + Right d -> d + Left e -> if containsLinkerHole t + then error $ Text.unpack ("Error toCode: unlinked libraries detected in bytecode, in " <> contractName) + else error $ Text.unpack ("Error toCode:" <> e <> ", in " <> contractName) ------------------- -- *** Util *** --- @@ -294,7 +370,7 @@ bytecodes cid src = do -- | Fail on error, or proceed with continuation proceed :: Validate err => String -> err (NonEmpty (Pn, String)) a -> (a -> IO ()) -> IO () -proceed contents comp continue = validation (prettyErrs contents) continue (comp ^. revalidate) +proceed contents comp continue = validation (prettyErrs contents) continue (comp LensGetter.^. revalidate) compile :: String -> Error String Act compile = pure . annotate <==< typecheck <==< parse . lexer diff --git a/src/Act/Consistency.hs b/src/Act/Consistency.hs index 40cdc639..bdb11da0 100644 --- a/src/Act/Consistency.hs +++ b/src/Act/Consistency.hs @@ -104,7 +104,7 @@ mkCaseQuery _ [] = error "Internal error: behaviours cannot be empty" -- | Checks nonoverlapping and exhaustiveness of cases checkCases :: Act -> Solvers.Solver -> Maybe Integer -> Bool -> IO () checkCases (Act _ contracts) solver' smttimeout debug = do - let groups = concatMap (\(Contract _ behvs) -> groupBy sameIface behvs) contracts + let groups = concatMap (\(Contract _ _ behvs) -> groupBy sameIface behvs) contracts let config = SMT.SMTConfig solver' (fromMaybe 20000 smttimeout) debug solver <- spawnSolver config let qs = mkCaseQuery mkNonoverlapAssertion <$> groups @@ -189,7 +189,7 @@ mkBehvArrayBoundsQuery behv@(Behaviour _ _ (Interface ifaceName decls) _ precond checkArrayBounds :: Act -> Solvers.Solver -> Maybe Integer -> Bool -> IO () checkArrayBounds (Act _ contracts) solver' smttimeout debug = - forM_ contracts (\(Contract constr behvs) -> do + forM_ contracts (\(Contract _ constr behvs) -> do let config = SMT.SMTConfig solver' (fromMaybe 20000 smttimeout) debug solver <- spawnSolver config let constrQs = mkConstrArrayBoundsQuery constr @@ -315,7 +315,7 @@ mkAliasingQuery behv@(Behaviour _ _ (Interface ifaceName decls) _ preconds casec checkRewriteAliasing :: Act -> Solvers.Solver -> Maybe Integer -> Bool -> IO () checkRewriteAliasing (Act _ contracts) solver' smttimeout debug = - forM_ contracts (\(Contract _ behvs) -> do + forM_ contracts (\(Contract _ _ behvs) -> do let config = SMT.SMTConfig solver' (fromMaybe 20000 smttimeout) debug solver <- spawnSolver config let behvQs = mkAliasingQuery <$> behvs diff --git a/src/Act/Coq.hs b/src/Act/Coq.hs index 1f880aa1..1b202fc6 100644 --- a/src/Act/Coq.hs +++ b/src/Act/Coq.hs @@ -48,7 +48,7 @@ coq (Act store contracts) = header <> (T.intercalate "\n\n" $ contractCode store <$> contracts) contractCode :: Store -> Contract -> T.Text -contractCode store (Contract ctor@Constructor{..} behvs) = T.unlines $ +contractCode store (Contract _ ctor@Constructor{..} behvs) = T.unlines $ [ "Module " <> T.pack _cname <> ".\n" ] <> [ stateRecord ] <> [ base store ctor ] @@ -187,7 +187,7 @@ stateval store contract handler updates = T.unwords $ contractStore :: Id -> Store -> Map Id (SlotType, Integer) contractStore contract store = case M.lookup contract store of - Just s -> s + Just s -> snd s Nothing -> error "Internal error: cannot find constructor in store" diff --git a/src/Act/Decompile.hs b/src/Act/Decompile.hs index 5b08ecbb..39e2fc52 100644 --- a/src/Act/Decompile.hs +++ b/src/Act/Decompile.hs @@ -184,13 +184,13 @@ translate :: EVMContract -> Either Text Act translate c = do ctor <- mkConstructor c behvs <- mkBehvs c - let contract = Contract ctor behvs + let contract = Contract SolidityLayout ctor behvs let store = mkStore c pure $ Act store [contract] -- | Build an Act Store from a solc storage layout mkStore :: EVMContract -> Store -mkStore c = Map.singleton (T.unpack c.name) (Map.mapKeys T.unpack $ fmap fromitem c.storageLayout) +mkStore c = Map.singleton (T.unpack c.name) (SolidityLayout, Map.mapKeys T.unpack $ fmap fromitem c.storageLayout) where fromitem item = (convslot item.slotType, toInteger item.slot) @@ -457,7 +457,7 @@ fromWord layout w = simplify <$> go w verifyDecompilation :: App m => SolverGroup -> ByteString -> ByteString -> Act -> m (Error String ()) verifyDecompilation solvers creation runtime (Act store spec) = do let cmap = case spec of - [con@(Contract cnstr _)] -> + [con@(Contract _ cnstr _)] -> Map.insert (_cname cnstr) (con, creation, runtime) mempty _ -> error "TODO multiple contracts" checkContracts solvers store cmap diff --git a/src/Act/HEVM.hs b/src/Act/HEVM.hs index 70a2e19e..bb334032 100644 --- a/src/Act/HEVM.hs +++ b/src/Act/HEVM.hs @@ -54,6 +54,7 @@ import EVM.Solvers import EVM.Effects import EVM.Format as Format import EVM.Traversals +import Debug.Trace type family ExprType a where ExprType 'AInteger = EVM.EWord @@ -79,20 +80,26 @@ initAddr = EVM.SymAddr "entrypoint" slotMap :: Store -> Layout slotMap store = M.map (\cstore -> - let vars = sortOn (snd . snd) $ M.toList cstore in - M.fromList $ makeLayout vars 0 0 + let vars = sortOn (snd . snd) $ M.toList $ snd cstore + layout = fst cstore + in + M.fromList $ makeLayout layout vars 0 0 ) store -makeLayout :: [(String,(SlotType, Integer))] -> Int -> Int -> [(Id, (Int,Int,Int))] -makeLayout [] _ _ = [] -makeLayout ((name,(typ,_)):vars) offset slot = +makeLayout :: LayoutMode -> [(String,(SlotType, Integer))] -> Int -> Int -> [(Id, (Int,Int,Int))] +makeLayout _ [] _ _ = [] +makeLayout SolidityLayout ((name,(typ,_)):vars) offset slot = if itFits then - (name, (slot, offset, size)):makeLayout vars (offset+size) slot + (name, (slot, offset, size)):makeLayout SolidityLayout vars (offset+size) slot else - (name, (slot+1, 0, size)):makeLayout vars size (slot+1) + (name, (slot+1, 0, size)):makeLayout SolidityLayout vars size (slot+1) where size = sizeOfSlotType typ itFits = size <= 32 - offset +makeLayout VyperLayout ((name,(typ,_)):vars) _ slot = + (name, (slot, 0, 32)):makeLayout VyperLayout vars 0 (slot+1) + where + size = sizeOfSlotType typ -- size of a storage item in bytes sizeOfSlotType :: SlotType -> Int @@ -177,11 +184,11 @@ getCaller = do -- * Act translation -translateConstructor :: Monad m => BS.ByteString -> Constructor -> ContractMap -> ActT m ([EVM.Expr EVM.End], Calldata, Sig, ContractMap) -translateConstructor bytecode (Constructor cid iface _ preconds _ _ upds) cmap = do +translateConstructor :: Monad m => BS.ByteString -> LayoutMode -> Constructor -> ContractMap -> ActT m ([EVM.Expr EVM.End], Calldata, Sig, ContractMap) +translateConstructor bytecode layout (Constructor cid iface _ preconds _ _ upds) cmap = do let initmap = M.insert initAddr (initcontract, cid) cmap preconds' <- mapM (toProp initmap) preconds - cmap' <- applyUpdates initmap initmap upds + cmap' <- applyUpdates layout initmap initmap upds let acmap = abstractCmap initAddr cmap' pure ([simplify $ EVM.Success (snd calldata <> preconds' <> symAddrCnstr acmap) mempty (EVM.ConcreteBuf bytecode) (M.map fst cmap')], calldata, ifaceToSig iface, acmap) where @@ -197,12 +204,12 @@ symAddrCnstr :: ContractMap -> [EVM.Prop] symAddrCnstr cmap = (\(a1, a2) -> EVM.PNeg (EVM.PEq (EVM.WAddr a1) (EVM.WAddr a2))) <$> comb (M.keys cmap) -translateBehvs :: Monad m => ContractMap -> [Behaviour] -> ActT m [(Id, [(EVM.Expr EVM.End, ContractMap)], Calldata, Sig)] -translateBehvs cmap behvs = do +translateBehvs :: Monad m => ContractMap -> LayoutMode -> [Behaviour] -> ActT m [(Id, [(EVM.Expr EVM.End, ContractMap)], Calldata, Sig)] +translateBehvs cmap layout behvs = do let groups = (groupBy sameIface behvs) :: [[Behaviour]] mapM (\behvs' -> do let calldata = behvCalldata behvs' - exprs <- mapM (translateBehv cmap (snd calldata)) behvs' + exprs <- mapM (translateBehv cmap (snd calldata) layout) behvs' pure (behvName behvs', exprs, calldata, behvSig behvs)) groups where behvCalldata (Behaviour _ _ iface _ _ _ _ _ _:_) = makeCalldata iface @@ -223,20 +230,41 @@ ifaceToSig (Interface name args) = Sig (T.pack name) (fmap fromdecl args) where fromdecl (Decl t _) = t -translateBehv :: Monad m => ContractMap -> [EVM.Prop] -> Behaviour -> ActT m (EVM.Expr EVM.End, ContractMap) -translateBehv cmap cdataprops (Behaviour _ _ _ _ preconds caseconds _ upds ret) = do - preconds' <- mapM (toProp cmap) preconds +translateBehv :: Monad m => ContractMap -> [EVM.Prop] -> LayoutMode -> Behaviour -> ActT m (EVM.Expr EVM.End, ContractMap) +translateBehv cmap cdataprops layout (Behaviour _ _ _ _ preconds caseconds _ upds ret) = do + --preconds' <- mapM (toProp cmap) preconds + preconds' <- mapM (toProp cmap) $ traceShowId $ filter (Prelude.not . isStorageBound) $ traceShowId preconds caseconds' <- mapM (toProp cmap) caseconds ret' <- returnsToExpr cmap ret - cmap' <- applyUpdates cmap cmap upds + cmap' <- applyUpdates layout cmap cmap upds let acmap = abstractCmap initAddr cmap' pure (EVM.Success (preconds' <> caseconds' <> cdataprops <> symAddrCnstr cmap') mempty ret' (M.map fst cmap'), acmap) - -applyUpdates :: Monad m => ContractMap -> ContractMap -> [StorageUpdate] -> ActT m ContractMap -applyUpdates readMap writeMap upds = foldM (applyUpdate readMap) writeMap upds - -applyUpdate :: Monad m => ContractMap -> ContractMap -> StorageUpdate -> ActT m ContractMap -applyUpdate readMap writeMap (Update typ (Item _ _ ref) e) = do + where + isStorageBound :: Exp ABoolean -> Bool + isStorageBound (And _ (LEQ _ (LitInt _ 0) e) (LEQ _ e' (UIntMax _ n))) | e == e' = + case (e,e') of + (VarRef _ Pre SRefKind item@(Item _ (PrimitiveType (AbiUIntType an)) r), VarRef _ _ SRefKind item'@(Item _ (PrimitiveType (AbiUIntType an')) _)) -> + (eqKind item item') && (Prelude.not $ isInCalldata r) && n == an && an == an' + _ -> False + isStorageBound (And _ (LEQ _ (LitInt _ 0) e) (LEQ _ e' (IntMax _ n))) | e == e' = + case (e,e') of + (VarRef _ Pre SRefKind item@(Item _ (PrimitiveType (AbiIntType an)) r), VarRef _ _ SRefKind item'@(Item _ (PrimitiveType (AbiIntType an')) _)) -> + (eqKind item item') && (Prelude.not $ isInCalldata r) && n == an && an == an' + _ -> False + isStorageBound _ = False + + isInCalldata :: Ref k -> Bool + isInCalldata (CVar _ _ _) = True + isInCalldata (SArray _ r _ _) = isInCalldata r + isInCalldata (SMapping _ r _ _) = isInCalldata r + isInCalldata (SField _ _ _ _) = False + isInCalldata (SVar _ _ _) = False + +applyUpdates :: Monad m => LayoutMode -> ContractMap -> ContractMap -> [StorageUpdate] -> ActT m ContractMap +applyUpdates layout readMap writeMap upds = foldM (applyUpdate layout readMap) writeMap upds + +applyUpdate :: Monad m => LayoutMode -> ContractMap -> ContractMap -> StorageUpdate -> ActT m ContractMap +applyUpdate layout readMap writeMap (Update typ (Item _ _ ref) e) = do caddr' <- baseAddr readMap ref (addr, offset, size) <- refOffset readMap ref let (contract, cid) = fromMaybe (error $ "Internal error: contract not found\n" <> show e) $ M.lookup caddr' writeMap @@ -289,7 +317,7 @@ createContract :: Monad m => ContractMap -> ContractMap -> EVM.Expr EVM.EAddr -> createContract readMap writeMap freshAddr (Create _ cid args) = do codemap <- getCodemap case M.lookup cid codemap of - Just (Contract (Constructor _ iface _ _ _ _ upds) _, _, bytecode) -> do + Just (Contract layout (Constructor _ iface _ _ _ _ upds) _, _, bytecode) -> do let contract = EVM.C { EVM.code = EVM.RuntimeCode (EVM.ConcreteRuntimeCode bytecode) , EVM.storage = EVM.ConcreteStore mempty , EVM.tStorage = EVM.ConcreteStore mempty @@ -299,7 +327,7 @@ createContract readMap writeMap freshAddr (Create _ cid args) = do let subst = makeSubstMap iface args let upds' = substUpds subst upds - applyUpdates (M.insert freshAddr (contract, cid) readMap) (M.insert freshAddr (contract, cid) writeMap) upds' + applyUpdates layout (M.insert freshAddr (contract, cid) readMap) (M.insert freshAddr (contract, cid) writeMap) upds' Nothing -> error "Internal error: constructor not found" createContract _ _ _ _ = error "Internal error: constructor call expected" -- TODO needs to propagate up preconditions and check pointer constraints @@ -655,6 +683,14 @@ inRange :: AbiType -> Exp AInteger -> Exp ABoolean inRange (AbiUIntType 256) e = checkOp e inRange (AbiIntType 256) _ = error "TODO signed integers" -- otherwise insert range bounds +inRange _ (VarRef _ _ _ (Item _ _ r)) | Prelude.not $ isInCalldata r = LitBool nowhere True + where + isInCalldata :: Ref k -> Bool + isInCalldata (CVar _ _ _) = True + isInCalldata (SArray _ r' _ _) = isInCalldata r' + isInCalldata (SMapping _ r' _ _) = isInCalldata r' + isInCalldata (SField _ _ _ _) = False + isInCalldata (SVar _ _ _) = False inRange t e = bound t e @@ -713,7 +749,7 @@ getInitContractState solvers iface pointers preconds cmap = do let addr = EVM.SymAddr $ T.pack x codemap <- getCodemap case M.lookup cid codemap of - Just (Contract (Constructor _ iface' pointers' preconds' _ _ upds) _, _, bytecode) -> do + Just (Contract layout (Constructor _ iface' pointers' preconds' _ _ upds) _, _, bytecode) -> do (icmap, check) <- getInitContractState solvers iface' pointers' preconds' M.empty let contract = EVM.C { EVM.code = EVM.RuntimeCode (EVM.ConcreteRuntimeCode bytecode) , EVM.storage = EVM.ConcreteStore mempty @@ -722,7 +758,7 @@ getInitContractState solvers iface pointers preconds cmap = do , EVM.nonce = Just 1 } let icmap' = M.insert addr (contract, cid) icmap - cmap' <- localCaddr addr $ applyUpdates icmap' icmap' upds + cmap' <- localCaddr addr $ applyUpdates layout icmap' icmap' upds pure (abstractCmap addr cmap', check) Nothing -> error $ "Internal error: Contract " <> cid <> " not found\n" <> show codemap getContractState [] = error "Internal error: Cast cannot be empty" @@ -766,13 +802,14 @@ comb :: Show a => [a] -> [(a,a)] comb xs = [(x,y) | (x:ys) <- tails xs, y <- ys] checkConstructors :: App m => SolverGroup -> ByteString -> ByteString -> Contract -> ActT m (Error String ContractMap) -checkConstructors solvers initcode runtimecode (Contract ctor@(Constructor _ iface pointers preconds _ _ _) _) = do +checkConstructors solvers initcode runtimecode (Contract layout ctor@(Constructor _ iface pointers preconds _ _ _) _) = do -- Construct the initial contract state - (actinitmap, checks) <- getInitContractState solvers iface pointers preconds M.empty + let preconds' = filter (Prelude.not . isStorageBound) preconds + (actinitmap, checks) <- getInitContractState solvers iface pointers preconds' M.empty let hevminitmap = translateCmap actinitmap -- Translate Act constructor to Expr fresh <- getFresh - (actbehvs, calldata, sig, cmap) <- translateConstructor runtimecode ctor actinitmap + (actbehvs, calldata, sig, cmap) <- translateConstructor runtimecode layout ctor actinitmap -- Symbolically execute bytecode -- TODO check if contrainsts about preexistsing fresh symbolic addresses are necessary solbehvs <- lift $ removeFails <$> getInitcodeBranches solvers initcode hevminitmap calldata [] fresh @@ -781,17 +818,38 @@ checkConstructors solvers initcode runtimecode (Contract ctor@(Constructor _ ifa lift $ showMsg "\x1b[1mChecking if constructor results are equivalent.\x1b[m" res1 <- lift $ checkResult calldata (Just sig) =<< checkEquiv solvers solbehvs actbehvs lift $ showMsg "\x1b[1mChecking if constructor input spaces are the same.\x1b[m" - res2 <- lift $ checkResult calldata (Just sig) =<< checkInputSpaces solvers solbehvs actbehvs + res2 <- lift $ checkResult calldata (Just sig) =<< checkInputSpaces solvers + solbehvs actbehvs pure $ checks *> res1 *> res2 *> Success cmap where removeFails branches = filter isSuccess branches + isStorageBound :: Exp ABoolean -> Bool + isStorageBound (And _ (LEQ _ (LitInt _ 0) e) (LEQ _ e' (UIntMax _ n))) | e == e' = + case (e,e') of + (VarRef _ Pre SRefKind item@(Item _ (PrimitiveType (AbiUIntType an)) r), VarRef _ _ SRefKind item'@(Item _ (PrimitiveType (AbiUIntType an')) _)) -> + (eqKind item item') && (Prelude.not $ isInCalldata r) && n == an && an == an' + _ -> False + isStorageBound (And _ (LEQ _ (LitInt _ 0) e) (LEQ _ e' (IntMax _ n))) | e == e' = + case (e,e') of + (VarRef _ Pre SRefKind item@(Item _ (PrimitiveType (AbiIntType an)) r), VarRef _ _ SRefKind item'@(Item _ (PrimitiveType (AbiIntType an')) _)) -> + (eqKind item item') && (Prelude.not $ isInCalldata r) && n == an && an == an' + _ -> False + isStorageBound _ = False + + isInCalldata :: Ref k -> Bool + isInCalldata (CVar _ _ _) = True + isInCalldata (SArray _ r _ _) = isInCalldata r + isInCalldata (SMapping _ r _ _) = isInCalldata r + isInCalldata (SField _ _ _ _) = False + isInCalldata (SVar _ _ _) = False + checkBehaviours :: forall m. App m => SolverGroup -> Contract -> ContractMap -> ActT m (Error String ()) -checkBehaviours solvers (Contract _ behvs) actstorage = do +checkBehaviours solvers (Contract layout _ behvs) actstorage = do let hevmstorage = translateCmap actstorage fresh <- getFresh - actbehvs <- translateBehvs actstorage behvs + actbehvs <- translateBehvs actstorage layout behvs (fmap $ concatError def) $ forM actbehvs $ \(name,actbehv,calldata, sig) -> do let (behvs', fcmaps) = unzip actbehv @@ -803,7 +861,8 @@ checkBehaviours solvers (Contract _ behvs) actstorage = do res1 <- lift $ checkResult calldata (Just sig) =<< checkEquiv solvers solbehvs behvs' -- input space exhaustiveness check lift $ showMsg "\x1b[1mChecking if the input spaces are the same\x1b[m" - res2 <- lift $ checkResult calldata (Just sig) =<< checkInputSpaces solvers solbehvs behvs' + res2 <- lift $ checkResult calldata (Just sig) =<< checkInputSpaces solvers --solbehvs behvs' + (trace (showBehvs solbehvs) solbehvs) (trace (showBehvs behvs') behvs') pure $ traverse_ (checkStoreIsomorphism actstorage) fcmaps *> res1 *> res2 where @@ -811,6 +870,7 @@ checkBehaviours solvers (Contract _ behvs) actstorage = do def = Success () + translateCmap :: ContractMap -> [(EVM.Expr EVM.EAddr, EVM.Contract)] translateCmap cmap = (\(addr, (c, _)) -> (addr, toContract c)) <$> M.toList cmap where @@ -953,7 +1013,7 @@ inputSpace exprs = map aux exprs -- | Check whether two lists of behaviours cover exactly the same input space checkInputSpaces :: App m => SolverGroup -> [EVM.Expr EVM.End] -> [EVM.Expr EVM.End] -> m [EquivResult] checkInputSpaces solvers l1 l2 = do - let p1 = inputSpace l1 + let p1 = inputSpace l1 --trace (show(l1) <> " and " <> show(l2)) $ inputSpace l1 let p2 = inputSpace l2 conf <- readConfig @@ -989,7 +1049,7 @@ checkAbi solver contract cmap = do where actSig (Behaviour _ _ iface _ _ _ _ _ _) = T.pack $ makeIface iface - actSigs (Contract _ behvs) = actSig <$> behvs + actSigs (Contract _ _ behvs) = actSig <$> behvs checkBehv :: [EVM.Prop] -> EVM.Expr EVM.End -> [EVM.Prop] checkBehv assertions (EVM.Success cnstr _ _ _) = assertions <> cnstr diff --git a/src/Act/Lex.x b/src/Act/Lex.x index b33f827d..ed524489 100644 --- a/src/Act/Lex.x +++ b/src/Act/Lex.x @@ -58,6 +58,9 @@ tokens :- pre { mk PRE } post { mk POST } + -- pragmas + layout { mk LAYOUT } + -- builtin types uint $digit+ { \ p s -> L (UINT (read (drop 4 s))) p } int $digit+ { \ p s -> L (INT (read (drop 3 s))) p } @@ -114,6 +117,7 @@ tokens :- "_" { mk SCORE } "." { mk DOT } "," { mk COMMA } + "#" { mk HASHTAG } "//" [.]* ; -- Toss single line comments -- identifiers $ident ($ident | $digit)* { \ p s -> L (ID s) p } @@ -157,6 +161,9 @@ data LEX = | PRE | POST + -- pragmas + | LAYOUT + -- builtin types | UINT Int | INT Int @@ -209,6 +216,7 @@ data LEX = | SCORE | DOT | COMMA + | HASHTAG -- identifiers | ID String diff --git a/src/Act/Parse.y b/src/Act/Parse.y index 6351fbde..f80bf545 100644 --- a/src/Act/Parse.y +++ b/src/Act/Parse.y @@ -47,6 +47,9 @@ import Act.Error 'pre' { L PRE _ } 'post' { L POST _ } + -- pragmas + 'layout' { L LAYOUT _ } + -- builtin types 'uint' { L (UINT $$) _ } 'int' { L (INT $$) _ } @@ -101,6 +104,7 @@ import Act.Error '_' { L SCORE _ } '.' { L DOT _ } ',' { L COMMA _ } + '#' { L HASHTAG _ } id { L (ID _) _ } @@ -174,14 +178,17 @@ Transition : 'behaviour' id 'of' id Ensures { Transition (posn $1) (name $2) (name $4) $5 $6 $7 $8 $9 } -Constructor : 'constructor' 'of' id +Constructor : list(Pragma) + 'constructor' 'of' id CInterface Pointers Precondition Creation Ensures - Invariants { Constructor (posn $3) (name $3) - $4 $5 $6 $7 $8 $9 } + Invariants { Constructor (posn $4) (name $4) + $1 $5 $6 $7 $8 $9 $10 } + +Pragma : '#' 'layout' id { LayoutMode (posn $1) (name $3) } Ensures : optblock('ensures', Expr) { $1 } @@ -333,6 +340,6 @@ parseError ((L token pn):_) = show token]) emptyConstructor :: Transition -> Constructor -emptyConstructor (Transition _ _ c _ _ _ _ _) = Constructor nowhere c (Interface "constructor" []) [] [] (Creates []) [] [] +emptyConstructor (Transition _ _ c _ _ _ _ _) = Constructor nowhere c [] ( Interface "constructor" []) [] [] (Creates []) [] [] } diff --git a/src/Act/Print.hs b/src/Act/Print.hs index f6f3ed5a..ee00aa95 100644 --- a/src/Act/Print.hs +++ b/src/Act/Print.hs @@ -28,7 +28,7 @@ prettyStore :: Store -> String prettyStore = show prettyContract :: Contract t -> String -prettyContract (Contract ctor behvs) = unlines $ intersperse "\n" $ (prettyCtor ctor):(fmap prettyBehaviour behvs) +prettyContract (Contract _ ctor behvs) = unlines $ intersperse "\n" $ (prettyCtor ctor):(fmap prettyBehaviour behvs) prettyCtor :: Constructor t -> String prettyCtor (Constructor name interface ptrs pres posts invs initStore) diff --git a/src/Act/SMT.hs b/src/Act/SMT.hs index 833607f3..669ce465 100644 --- a/src/Act/SMT.hs +++ b/src/Act/SMT.hs @@ -228,7 +228,7 @@ mkDefaultSMT isCtor activeSLocs activeCLocs envs ifaceName decls preconds extrac mkPostconditionQueries :: Act -> [Query] mkPostconditionQueries (Act _ contr) = concatMap mkPostconditionQueriesContract contr where - mkPostconditionQueriesContract (Contract constr behvs) = + mkPostconditionQueriesContract (Contract _ constr behvs) = mkPostconditionQueriesConstr constr <> concatMap mkPostconditionQueriesBehv behvs mkPostconditionQueriesBehv :: Behaviour -> [Query] @@ -274,7 +274,7 @@ mkInvariantQueries (Act _ contracts) = fmap mkQuery gathered mkQuery (inv, ctor, behvs) = Inv inv (mkInit inv ctor) (fmap (mkBehv inv ctor) behvs) gathered = concatMap getInvariants contracts - getInvariants (Contract (c@Constructor{..}) behvs) = fmap (, c, behvs) _invariants + getInvariants (Contract _ (c@Constructor{..}) behvs) = fmap (, c, behvs) _invariants mkInit :: Invariant -> Constructor -> (Constructor, SMTExp) mkInit (Invariant _ invConds _ (PredTimed _ invPost)) ctor@(Constructor _ (Interface ifaceName decls) _ preconds _ _ initialStorage) = (ctor, mksmt invPost) diff --git a/src/Act/Syntax.hs b/src/Act/Syntax.hs index 47408560..cb6eede5 100644 --- a/src/Act/Syntax.hs +++ b/src/Act/Syntax.hs @@ -59,16 +59,16 @@ locsFromConstrInvariant (Invariant _ pre _ (PredTimed _ predpost)) = ------------------------------------ nameOfContract :: Contract t -> Id -nameOfContract (Contract (Constructor cname _ _ _ _ _ _) _) = cname +nameOfContract (Contract _ (Constructor cname _ _ _ _ _ _) _) = cname behvsFromAct :: Typed.Act t -> [Behaviour t] behvsFromAct (Act _ contracts) = behvsFromContracts contracts behvsFromContracts :: [Contract t] -> [Behaviour t] -behvsFromContracts contracts = concatMap (\(Contract _ b) -> b) contracts +behvsFromContracts contracts = concatMap (\(Contract _ _ b) -> b) contracts constrFromContracts :: [Contract t] -> [Constructor t] -constrFromContracts contracts = fmap (\(Contract c _) -> c) contracts +constrFromContracts contracts = fmap (\(Contract _ c _) -> c) contracts isLocalLoc :: Location t -> Bool isLocalLoc (Loc _ SStorage item) = isLocalItem item @@ -193,7 +193,7 @@ createsFromTypedExp :: TypedExp t -> [Id] createsFromTypedExp (TExp _ _ e) = createsFromExp e createsFromContract :: Contract t -> [Id] -createsFromContract (Contract constr behvs) = +createsFromContract (Contract _ constr behvs) = createsFromConstructor constr <> concatMap createsFromBehaviour behvs createsFromConstructor :: Constructor t -> [Id] @@ -224,7 +224,7 @@ createsFromBehaviour (Behaviour _ _ _ _ _ preconds postconds rewrites returns) = pointersFromContract :: Contract t -> [Id] -pointersFromContract (Contract constr behvs) = +pointersFromContract (Contract _ constr behvs) = nub $ pointersFromConstructor constr <> concatMap pointersFromBehaviour behvs pointersFromConstructor :: Constructor t -> [Id] diff --git a/src/Act/Syntax/Typed.hs b/src/Act/Syntax/Typed.hs index 5d257080..2ce4b552 100644 --- a/src/Act/Syntax/Typed.hs +++ b/src/Act/Syntax/Typed.hs @@ -41,6 +41,7 @@ import Data.ByteString (ByteString) import qualified Data.ByteString as BS import Data.List (genericTake,genericDrop) import Data.Map.Strict (Map) +import qualified Data.Map.Strict as StrictMap (map) import Data.String (fromString) import Data.Text (pack) import Data.Vector (fromList) @@ -59,12 +60,12 @@ import Act.Syntax.Untyped as Act.Syntax.Typed (Id, Pn, Interface(..), EthEnv(..) data Act t = Act Store [Contract t] deriving (Show, Eq) -data Contract t = Contract (Constructor t) [Behaviour t] +data Contract t = Contract LayoutMode (Constructor t) [Behaviour t] deriving (Show, Eq) -- For each contract, it stores the type of a storage variables and -- the order in which they are declared -type Store = Map Id (Map Id (SlotType, Integer)) +type Store = Map Id (LayoutMode, (Map Id (SlotType, Integer))) -- | Represents a contract level invariant. The invariant is defined in the @@ -102,6 +103,8 @@ data Constructor t = Constructor , _initialStorage :: [StorageUpdate t] } deriving (Show, Eq) +data LayoutMode = SolidityLayout | VyperLayout + deriving (Show, Eq) -- After typing each behavior may be split to multiple behaviors, one for each case branch. -- In this case, only the `_caseconditions`, `_stateUpdates`, and `_returns` fields are different. @@ -410,13 +413,13 @@ instance ToJSON (Act t) where , "contracts" .= toJSON contracts ] instance ToJSON (Contract t) where - toJSON (Contract ctor behv) = object [ "kind" .= String "Contract" + toJSON (Contract _ ctor behv) = object [ "kind" .= String "Contract" , "constructor" .= toJSON ctor , "behaviours" .= toJSON behv ] storeJSON :: Store -> Value storeJSON storages = object [ "kind" .= String "Storages" - , "storages" .= toJSON storages] + , "storages" .= toJSON (StrictMap.map snd storages)] instance ToJSON (Constructor t) where toJSON Constructor{..} = object [ "kind" .= String "Constructor" diff --git a/src/Act/Syntax/TypedExplicit.hs b/src/Act/Syntax/TypedExplicit.hs index 4bcfefcd..dfa02504 100644 --- a/src/Act/Syntax/TypedExplicit.hs +++ b/src/Act/Syntax/TypedExplicit.hs @@ -39,7 +39,7 @@ instance Annotatable Typed.Act where annotate (Typed.Act store act) = Typed.Act store $ fmap annotate act instance Annotatable Typed.Contract where - annotate (Typed.Contract ctor behv) = Typed.Contract (annotate ctor) (fmap annotate behv) + annotate (Typed.Contract layout ctor behv) = Typed.Contract layout (annotate ctor) (fmap annotate behv) instance Annotatable Typed.Invariant where annotate inv@Invariant{..} = inv diff --git a/src/Act/Syntax/Untyped.hs b/src/Act/Syntax/Untyped.hs index 1234c374..05e478fd 100644 --- a/src/Act/Syntax/Untyped.hs +++ b/src/Act/Syntax/Untyped.hs @@ -22,12 +22,15 @@ newtype Act = Main [Contract] data Contract = Contract Constructor [Transition] deriving (Eq, Show) -data Constructor = Constructor Pn Id Interface [Pointer] Iff Creates Ensures Invariants +data Constructor = Constructor Pn Id [Pragma] Interface [Pointer] Iff Creates Ensures Invariants deriving (Eq, Show) data Transition = Transition Pn Id Id Interface [Pointer] Iff Cases Ensures deriving (Eq, Show) +data Pragma = LayoutMode Pn String + deriving (Eq, Show) + type Iff = [Expr] type Ensures = [Expr] diff --git a/src/Act/Type.hs b/src/Act/Type.hs index 3a16bdb5..1690e7dc 100644 --- a/src/Act/Type.hs +++ b/src/Act/Type.hs @@ -56,7 +56,7 @@ typecheck' (U.Main contracts) = Act store <$> traverse (checkContract store cons <* noDuplicateContracts <* noDuplicateBehaviourNames <* noDuplicateInterfaces - <* traverse noDuplicateVars [creates | U.Contract (U.Constructor _ _ _ _ _ creates _ _) _ <- contracts] + <* traverse noDuplicateVars [creates | U.Contract (U.Constructor _ _ _ _ _ _ creates _ _) _ <- contracts] where store = lookupVars contracts constructors = lookupConstructors contracts @@ -64,7 +64,7 @@ typecheck' (U.Main contracts) = Act store <$> traverse (checkContract store cons transitions = concatMap (\(U.Contract _ ts) -> ts) contracts noDuplicateContracts :: Err () - noDuplicateContracts = noDuplicates [(pn,contract) | U.Contract (U.Constructor pn contract _ _ _ _ _ _) _ <- contracts] + noDuplicateContracts = noDuplicates [(pn,contract) | U.Contract (U.Constructor pn contract _ _ _ _ _ _ _) _ <- contracts] $ \c -> "Multiple definitions of Contract " <> c noDuplicateVars :: U.Creates -> Err () @@ -129,24 +129,37 @@ topologicalSort (Act store contracts) = -- map a contract name to the list of contracts that it calls and its code findCreates :: Contract -> (Id, ([Id], Contract)) - findCreates c@(Contract (Constructor cname _ _ _ _ _ _) _) = (cname, (createsFromContract c <> pointersFromContract c, c)) + findCreates c@(Contract _ (Constructor cname _ _ _ _ _ _) _) = (cname, (createsFromContract c <> pointersFromContract c, c)) --- Finds storage declarations from constructors lookupVars :: [U.Contract] -> Store lookupVars = foldMap $ \case - U.Contract (U.Constructor _ contract _ _ _ (U.Creates assigns) _ _) _ -> - Map.singleton contract . Map.fromList $ addSlot $ snd . fromAssign <$> assigns + U.Contract (U.Constructor _ contract pragmas _ _ _ (U.Creates assigns) _ _) _ -> + Map.singleton contract . (checkLayout pragmas, ) . Map.fromList $ addSlot $ snd . fromAssign <$> assigns where addSlot :: [(Id, SlotType)] -> [(Id, (SlotType, Integer))] addSlot l = zipWith (\(name, typ) slot -> (name, (typ, slot))) l [0..] + checkLayout :: [U.Pragma] -> LayoutMode + checkLayout pragmas = let layouts = filter isLayout pragmas in + case layouts of + [] -> SolidityLayout + [l] -> getLayout l + (U.LayoutMode pn _):_ -> error $ (show pn) <> "Multiple layout pragmas" + where + isLayout (U.LayoutMode _ _) = True + + getLayout (U.LayoutMode _ "Vyper") = VyperLayout + getLayout (U.LayoutMode _ "Solidity") = SolidityLayout + getLayout (U.LayoutMode pn s) = error $ (show pn) <> ": unknown layout: " <> s + -- | A map containing the interfaces of all available constructors together with pointer constraints type Constructors = Map Id [(AbiType, Maybe Id)] -- | Construct the constructor map for the given spec lookupConstructors :: [U.Contract] -> Constructors lookupConstructors = foldMap $ \case - U.Contract (U.Constructor _ contract (Interface _ decls) pointers _ _ _ _) _ -> + U.Contract (U.Constructor _ contract _ (Interface _ decls) pointers _ _ _ _) _ -> let ptrs = Map.fromList $ map (\(PointsTo _ x c) -> (x, c)) pointers in Map.singleton contract (map (\(Decl t x) -> (t, Map.lookup x ptrs)) decls) @@ -190,7 +203,7 @@ globalEnv = mkEnv :: Id -> Store -> Constructors -> Env mkEnv contract store constructors = Env { contract = contract - , store = Map.map fst $ fromMaybe mempty (Map.lookup contract store) + , store = Map.map fst $ snd $ fromMaybe (SolidityLayout,mempty) (Map.lookup contract store) , theirs = store , calldata = mempty , pointers = mempty @@ -211,8 +224,8 @@ addPointers decls env = env{ pointers = ptrs } -- Type check a contract checkContract :: Store -> Constructors -> U.Contract -> Err Contract -checkContract store constructors (U.Contract constr@(U.Constructor _ cid _ _ _ _ _ _) trans) = - Contract <$> checkConstructor env constr <*> (concat <$> traverse (checkBehavior env) trans) <* namesConsistent +checkContract store constructors (U.Contract constr@(U.Constructor cpn cid pragmas _ _ _ _ _ _) trans) = + Contract <$> checkLayout <*> checkConstructor env constr <*> (concat <$> traverse (checkBehavior env) trans) <* namesConsistent where env :: Env env = mkEnv cid store constructors @@ -223,6 +236,19 @@ checkContract store constructors (U.Contract constr@(U.Constructor _ cid _ _ _ _ errmsg pn cid' = (pn, "Behavior must belong to contract " <> show cid <> " but belongs to contract " <> cid') + checkLayout :: Err LayoutMode + checkLayout = let layouts = filter isLayout pragmas in + case layouts of + [] -> Success SolidityLayout + [l] -> getLayout l + _ -> throw (cpn, "Multiple layout pragmas") + where + isLayout (U.LayoutMode _ _) = True + + getLayout (U.LayoutMode _ "Vyper") = Success VyperLayout + getLayout (U.LayoutMode _ "Solidity") = Success SolidityLayout + getLayout (U.LayoutMode pn s) = throw (pn, "Unknown layout: " <> s) + -- Type check a behavior checkBehavior :: Env -> U.Transition -> Err [Behaviour] @@ -258,8 +284,9 @@ checkBehavior env (U.Transition _ name contract iface@(Interface _ decls) ptrs i makeBehv pres posts' (casecond,storage,ret) = Behaviour name contract iface ptrs pres casecond posts' storage ret checkConstructor :: Env -> U.Constructor -> Err Constructor -checkConstructor env (U.Constructor _ contract (Interface _ decls) ptrs iffs (U.Creates assigns) postcs invs) = +checkConstructor env (U.Constructor _ contract _ (Interface _ decls) ptrs iffs (U.Creates assigns) postcs invs) = do + --layout <- checkLayout traverse_ (checkPointer env') ptrs stateUpdates <- concat <$> traverse (checkAssign env') assigns iffs' <- checkIffs envNoStorage iffs @@ -272,6 +299,19 @@ checkConstructor env (U.Constructor _ contract (Interface _ decls) ptrs iffs (U. -- type checking environment prior to storage creation of this contract envNoStorage = env'{ store = mempty } + --checkLayout :: Err LayoutMode + --checkLayout = let layouts = filter isLayout pragmas in + -- case layouts of + -- [] -> Success SolidityLayout + -- [l] -> getLayout l + -- _ -> throw (pn, "Multiple layout pragmas") + -- where + -- isLayout (U.LayoutMode _) = True + -- + -- getLayout (U.LayoutMode "Vyper") = Success VyperLayout + -- getLayout (U.LayoutMode "Solidity") = Success SolidityLayout + -- getLayout (U.LayoutMode s) = throw (pn, "Unknown layout: " <> s) + -- | Checks that a pointer declaration x |-> A is valid. This consists of -- checking that x is a calldata variable that has address type and A is a valid -- contract type. @@ -382,7 +422,7 @@ checkEntry env kind (U.EIndexed p e args) = checkEntry env@Env{theirs} kind (U.EField p e x) = checkEntry env kind e `bindValidation` \(_, oc, ref) -> case oc of Just c -> case Map.lookup c theirs of - Just cenv -> case Map.lookup x cenv of + Just cenv -> case Map.lookup x (snd cenv) of Just (st@(StorageValue (ContractType c')), _) -> pure (st, Just c', SField p ref c x) Just (st, _) -> pure (st, Nothing, SField p ref c x) Nothing -> throw (p, "Contract " <> c <> " does not have field " <> x) From b3ee18fc27764a3bf2b771eb169b0031445a7fc3 Mon Sep 17 00:00:00 2001 From: lefterislazar Date: Thu, 18 Sep 2025 03:24:28 +0300 Subject: [PATCH 2/6] WIP vyper compatibility occasionally functional --- act.cabal | 4 ++ src/Act/CLI.hs | 3 +- src/Act/HEVM.hs | 150 ++++++++++++++++-------------------------- src/Act/HEVM_utils.hs | 13 ++-- 4 files changed, 69 insertions(+), 101 deletions(-) diff --git a/act.cabal b/act.cabal index ab2665a0..79dcae49 100644 --- a/act.cabal +++ b/act.cabal @@ -20,6 +20,7 @@ common common GADTs build-depends: base >= 4.9 && < 5, aeson >= 1.0, + aeson-optics >= 1.2.1, containers >= 0.5, hevm >= 0.51.3, lens >= 4.17.1, @@ -42,6 +43,9 @@ common common data-dword >= 0.3.2.1, prettyprinter, prettyprinter-ansi-terminal, + unordered-containers, + optics-core, + base16 if flag(ci) ghc-options: -O2 -Wall -Werror -Wno-orphans -Wno-unticked-promoted-constructors else diff --git a/src/Act/CLI.hs b/src/Act/CLI.hs index 9d2e8c4c..cb68ddf7 100644 --- a/src/Act/CLI.hs +++ b/src/Act/CLI.hs @@ -62,7 +62,6 @@ import Act.Decompile hiding (storageLayout) import qualified EVM.Solvers as Solvers import EVM.Solidity import EVM.Effects -import Debug.Trace --command line options data Command w @@ -303,7 +302,7 @@ bytecodes cid VyperLayout src = do pure (fromMaybe err . lookup (cid <> ".vy" <> ":" <> cid) $ contracts) vyper :: Text -> Text -> IO Text -vyper cid src = Text.pack <$> readProcess "vyper" ["--standard-json"] (Text.unpack $ stdVyperJson cid src) +vyper cid src = Text.pack <$> (readProcess "vyper" ["--standard-json"] (Text.unpack $ stdVyperJson cid src)) stdVyperJson :: Text -> Text -> Text stdVyperJson cid src = decodeUtf8 $ BS.toStrict $ encode $ vyperToJSON cid src diff --git a/src/Act/HEVM.hs b/src/Act/HEVM.hs index bb334032..a9ee488a 100644 --- a/src/Act/HEVM.hs +++ b/src/Act/HEVM.hs @@ -63,7 +63,7 @@ type family ExprType a where -- | The storage layout. Maps each contract type to a map that maps storage -- variables to their slot, offset, and size in bytes in memory -type Layout = M.Map Id (M.Map Id (Int, Int,Int)) +type Layout = M.Map Id (LayoutMode, M.Map Id (Int, Int,Int)) type ContractMap = M.Map (EVM.Expr EVM.EAddr) (EVM.Expr EVM.EContract, Id) @@ -81,9 +81,9 @@ slotMap :: Store -> Layout slotMap store = M.map (\cstore -> let vars = sortOn (snd . snd) $ M.toList $ snd cstore - layout = fst cstore + layoutMode = fst cstore in - M.fromList $ makeLayout layout vars 0 0 + (layoutMode, M.fromList $ makeLayout layoutMode vars 0 0) ) store makeLayout :: LayoutMode -> [(String,(SlotType, Integer))] -> Int -> Int -> [(Id, (Int,Int,Int))] @@ -96,10 +96,8 @@ makeLayout SolidityLayout ((name,(typ,_)):vars) offset slot = where size = sizeOfSlotType typ itFits = size <= 32 - offset -makeLayout VyperLayout ((name,(typ,_)):vars) _ slot = +makeLayout VyperLayout ((name,_):vars) _ slot = (name, (slot, 0, 32)):makeLayout VyperLayout vars 0 (slot+1) - where - size = sizeOfSlotType typ -- size of a storage item in bytes sizeOfSlotType :: SlotType -> Int @@ -185,10 +183,10 @@ getCaller = do -- * Act translation translateConstructor :: Monad m => BS.ByteString -> LayoutMode -> Constructor -> ContractMap -> ActT m ([EVM.Expr EVM.End], Calldata, Sig, ContractMap) -translateConstructor bytecode layout (Constructor cid iface _ preconds _ _ upds) cmap = do +translateConstructor bytecode layoutMode (Constructor cid iface _ preconds _ _ upds) cmap = do let initmap = M.insert initAddr (initcontract, cid) cmap preconds' <- mapM (toProp initmap) preconds - cmap' <- applyUpdates layout initmap initmap upds + cmap' <- applyUpdates layoutMode initmap initmap upds let acmap = abstractCmap initAddr cmap' pure ([simplify $ EVM.Success (snd calldata <> preconds' <> symAddrCnstr acmap) mempty (EVM.ConcreteBuf bytecode) (M.map fst cmap')], calldata, ifaceToSig iface, acmap) where @@ -205,11 +203,11 @@ symAddrCnstr cmap = (\(a1, a2) -> EVM.PNeg (EVM.PEq (EVM.WAddr a1) (EVM.WAddr a2))) <$> comb (M.keys cmap) translateBehvs :: Monad m => ContractMap -> LayoutMode -> [Behaviour] -> ActT m [(Id, [(EVM.Expr EVM.End, ContractMap)], Calldata, Sig)] -translateBehvs cmap layout behvs = do +translateBehvs cmap layoutMode behvs = do let groups = (groupBy sameIface behvs) :: [[Behaviour]] mapM (\behvs' -> do let calldata = behvCalldata behvs' - exprs <- mapM (translateBehv cmap (snd calldata) layout) behvs' + exprs <- mapM (translateBehv cmap (snd calldata) layoutMode) behvs' pure (behvName behvs', exprs, calldata, behvSig behvs)) groups where behvCalldata (Behaviour _ _ iface _ _ _ _ _ _:_) = makeCalldata iface @@ -231,42 +229,21 @@ ifaceToSig (Interface name args) = Sig (T.pack name) (fmap fromdecl args) fromdecl (Decl t _) = t translateBehv :: Monad m => ContractMap -> [EVM.Prop] -> LayoutMode -> Behaviour -> ActT m (EVM.Expr EVM.End, ContractMap) -translateBehv cmap cdataprops layout (Behaviour _ _ _ _ preconds caseconds _ upds ret) = do - --preconds' <- mapM (toProp cmap) preconds - preconds' <- mapM (toProp cmap) $ traceShowId $ filter (Prelude.not . isStorageBound) $ traceShowId preconds +translateBehv cmap cdataprops layoutMode (Behaviour _ _ _ _ preconds caseconds _ upds ret) = do + preconds' <- mapM (toProp cmap) preconds caseconds' <- mapM (toProp cmap) caseconds ret' <- returnsToExpr cmap ret - cmap' <- applyUpdates layout cmap cmap upds + cmap' <- applyUpdates layoutMode cmap cmap upds let acmap = abstractCmap initAddr cmap' pure (EVM.Success (preconds' <> caseconds' <> cdataprops <> symAddrCnstr cmap') mempty ret' (M.map fst cmap'), acmap) - where - isStorageBound :: Exp ABoolean -> Bool - isStorageBound (And _ (LEQ _ (LitInt _ 0) e) (LEQ _ e' (UIntMax _ n))) | e == e' = - case (e,e') of - (VarRef _ Pre SRefKind item@(Item _ (PrimitiveType (AbiUIntType an)) r), VarRef _ _ SRefKind item'@(Item _ (PrimitiveType (AbiUIntType an')) _)) -> - (eqKind item item') && (Prelude.not $ isInCalldata r) && n == an && an == an' - _ -> False - isStorageBound (And _ (LEQ _ (LitInt _ 0) e) (LEQ _ e' (IntMax _ n))) | e == e' = - case (e,e') of - (VarRef _ Pre SRefKind item@(Item _ (PrimitiveType (AbiIntType an)) r), VarRef _ _ SRefKind item'@(Item _ (PrimitiveType (AbiIntType an')) _)) -> - (eqKind item item') && (Prelude.not $ isInCalldata r) && n == an && an == an' - _ -> False - isStorageBound _ = False - - isInCalldata :: Ref k -> Bool - isInCalldata (CVar _ _ _) = True - isInCalldata (SArray _ r _ _) = isInCalldata r - isInCalldata (SMapping _ r _ _) = isInCalldata r - isInCalldata (SField _ _ _ _) = False - isInCalldata (SVar _ _ _) = False applyUpdates :: Monad m => LayoutMode -> ContractMap -> ContractMap -> [StorageUpdate] -> ActT m ContractMap -applyUpdates layout readMap writeMap upds = foldM (applyUpdate layout readMap) writeMap upds +applyUpdates layoutMode readMap writeMap upds = foldM (applyUpdate layoutMode readMap) writeMap upds applyUpdate :: Monad m => LayoutMode -> ContractMap -> ContractMap -> StorageUpdate -> ActT m ContractMap -applyUpdate layout readMap writeMap (Update typ (Item _ _ ref) e) = do +applyUpdate layoutMode readMap writeMap (Update typ (Item _ _ ref) e) = do caddr' <- baseAddr readMap ref - (addr, offset, size) <- refOffset readMap ref + (addr, offset, size, _) <- refOffset readMap ref let (contract, cid) = fromMaybe (error $ "Internal error: contract not found\n" <> show e) $ M.lookup caddr' writeMap case typ of SInteger | isCreate e -> do @@ -317,7 +294,7 @@ createContract :: Monad m => ContractMap -> ContractMap -> EVM.Expr EVM.EAddr -> createContract readMap writeMap freshAddr (Create _ cid args) = do codemap <- getCodemap case M.lookup cid codemap of - Just (Contract layout (Constructor _ iface _ _ _ _ upds) _, _, bytecode) -> do + Just (Contract layoutMode (Constructor _ iface _ _ _ _ upds) _, _, bytecode) -> do let contract = EVM.C { EVM.code = EVM.RuntimeCode (EVM.ConcreteRuntimeCode bytecode) , EVM.storage = EVM.ConcreteStore mempty , EVM.tStorage = EVM.ConcreteStore mempty @@ -327,7 +304,7 @@ createContract readMap writeMap freshAddr (Create _ cid args) = do let subst = makeSubstMap iface args let upds' = substUpds subst upds - applyUpdates layout (M.insert freshAddr (contract, cid) readMap) (M.insert freshAddr (contract, cid) writeMap) upds' + applyUpdates layoutMode (M.insert freshAddr (contract, cid) readMap) (M.insert freshAddr (contract, cid) writeMap) upds' Nothing -> error "Internal error: constructor not found" createContract _ _ _ _ = error "Internal error: constructor call expected" -- TODO needs to propagate up preconditions and check pointer constraints @@ -461,33 +438,43 @@ expToBuf cmap styp e = do SByteStr -> toExpr cmap e SSArray _ -> error "TODO arrays" +getLayoutMode :: Layout -> Id -> LayoutMode +getLayoutMode layout cid = + case M.lookup cid layout of + Just (lm, _) -> lm + Nothing -> error "Internal error: invalid contract name" + -- | Get the slot and the offset of a storage variable in storage -getPosition :: Layout -> Id -> Id -> (Int, Int, Int) +getPosition :: Layout -> Id -> Id -> (Int, Int, Int, LayoutMode) getPosition layout cid name = case M.lookup cid layout of - Just m -> case M.lookup name m of - Just pos -> pos + Just (lm, m) -> case M.lookup name m of + Just (p1,p2,p3) -> (p1,p2,p3,lm) Nothing -> error $ "Internal error: invalid variable name: " <> show name Nothing -> error "Internal error: invalid contract name" -- | For the given storage reference, it returs the memory slot, the offset -- of the value within the slot, and the size of the value. -refOffset :: Monad m => ContractMap -> Ref k -> ActT m (EVM.Expr EVM.EWord, EVM.Expr EVM.EWord, Int) +refOffset :: Monad m => ContractMap -> Ref k -> ActT m (EVM.Expr EVM.EWord, EVM.Expr EVM.EWord, Int, LayoutMode) refOffset _ (CVar _ _ _) = error "Internal error: ill-typed entry" refOffset _ (SVar _ cid name) = do layout <- getLayout - let (slot, off, size) = getPosition layout cid name - pure (EVM.Lit (fromIntegral slot), EVM.Lit $ fromIntegral off, size) + let (slot, off, size, layoutMode) = getPosition layout cid name + pure (EVM.Lit (fromIntegral slot), EVM.Lit $ fromIntegral off, size, layoutMode) refOffset cmap (SMapping _ ref typ ixs) = do - (slot, _, _) <- refOffset cmap ref + (slot, _, _, layoutMode) <- refOffset cmap ref addr <- foldM (\slot' i -> do buf <- typedExpToBuf cmap i - pure (EVM.keccak (buf <> (wordToBuf slot')))) slot ixs - pure (addr, EVM.Lit 0, sizeOfValue typ) + let concatenation = + case layoutMode of + SolidityLayout -> buf <> (wordToBuf slot') + VyperLayout -> (wordToBuf slot') <> buf + pure (EVM.keccak concatenation)) slot ixs + pure (addr, EVM.Lit 0, sizeOfValue typ, layoutMode) refOffset _ (SField _ _ cid name) = do layout <- getLayout - let (slot, off, size) = getPosition layout cid name - pure (EVM.Lit (fromIntegral slot), EVM.Lit $ fromIntegral off, size) + let (slot, off, size, layoutMode) = getPosition layout cid name + pure (EVM.Lit (fromIntegral slot), EVM.Lit $ fromIntegral off, size, layoutMode) refOffset _ (SArray _ _ _ _) = error "TODO" @@ -667,7 +654,7 @@ refToExp _ (CVar _ typ x) = pure $ fromCalldataFramgment $ symAbiArg (T.pack x) refToExp cmap r = do caddr <- baseAddr cmap r - (slot, offset, size) <- refOffset cmap r + (slot, offset, size, _) <- refOffset cmap r let word = accessStorage cmap slot caddr pure $ extractValue word offset size @@ -682,15 +669,6 @@ inRange :: AbiType -> Exp AInteger -> Exp ABoolean -- if the type has the type of machine word then check per operation inRange (AbiUIntType 256) e = checkOp e inRange (AbiIntType 256) _ = error "TODO signed integers" --- otherwise insert range bounds -inRange _ (VarRef _ _ _ (Item _ _ r)) | Prelude.not $ isInCalldata r = LitBool nowhere True - where - isInCalldata :: Ref k -> Bool - isInCalldata (CVar _ _ _) = True - isInCalldata (SArray _ r' _ _) = isInCalldata r' - isInCalldata (SMapping _ r' _ _) = isInCalldata r' - isInCalldata (SField _ _ _ _) = False - isInCalldata (SVar _ _ _) = False inRange t e = bound t e @@ -749,7 +727,7 @@ getInitContractState solvers iface pointers preconds cmap = do let addr = EVM.SymAddr $ T.pack x codemap <- getCodemap case M.lookup cid codemap of - Just (Contract layout (Constructor _ iface' pointers' preconds' _ _ upds) _, _, bytecode) -> do + Just (Contract layoutMode (Constructor _ iface' pointers' preconds' _ _ upds) _, _, bytecode) -> do (icmap, check) <- getInitContractState solvers iface' pointers' preconds' M.empty let contract = EVM.C { EVM.code = EVM.RuntimeCode (EVM.ConcreteRuntimeCode bytecode) , EVM.storage = EVM.ConcreteStore mempty @@ -758,7 +736,7 @@ getInitContractState solvers iface pointers preconds cmap = do , EVM.nonce = Just 1 } let icmap' = M.insert addr (contract, cid) icmap - cmap' <- localCaddr addr $ applyUpdates layout icmap' icmap' upds + cmap' <- localCaddr addr $ applyUpdates layoutMode icmap' icmap' upds pure (abstractCmap addr cmap', check) Nothing -> error $ "Internal error: Contract " <> cid <> " not found\n" <> show codemap getContractState [] = error "Internal error: Cast cannot be empty" @@ -802,14 +780,13 @@ comb :: Show a => [a] -> [(a,a)] comb xs = [(x,y) | (x:ys) <- tails xs, y <- ys] checkConstructors :: App m => SolverGroup -> ByteString -> ByteString -> Contract -> ActT m (Error String ContractMap) -checkConstructors solvers initcode runtimecode (Contract layout ctor@(Constructor _ iface pointers preconds _ _ _) _) = do +checkConstructors solvers initcode runtimecode (Contract layoutMode ctor@(Constructor _ iface pointers preconds _ _ _) _) = do -- Construct the initial contract state - let preconds' = filter (Prelude.not . isStorageBound) preconds - (actinitmap, checks) <- getInitContractState solvers iface pointers preconds' M.empty + (actinitmap, checks) <- getInitContractState solvers iface pointers preconds M.empty let hevminitmap = translateCmap actinitmap -- Translate Act constructor to Expr fresh <- getFresh - (actbehvs, calldata, sig, cmap) <- translateConstructor runtimecode layout ctor actinitmap + (actbehvs, calldata, sig, cmap) <- translateConstructor runtimecode layoutMode ctor actinitmap -- Symbolically execute bytecode -- TODO check if contrainsts about preexistsing fresh symbolic addresses are necessary solbehvs <- lift $ removeFails <$> getInitcodeBranches solvers initcode hevminitmap calldata [] fresh @@ -824,36 +801,24 @@ checkConstructors solvers initcode runtimecode (Contract layout ctor@(Constructo where removeFails branches = filter isSuccess branches - isStorageBound :: Exp ABoolean -> Bool - isStorageBound (And _ (LEQ _ (LitInt _ 0) e) (LEQ _ e' (UIntMax _ n))) | e == e' = - case (e,e') of - (VarRef _ Pre SRefKind item@(Item _ (PrimitiveType (AbiUIntType an)) r), VarRef _ _ SRefKind item'@(Item _ (PrimitiveType (AbiUIntType an')) _)) -> - (eqKind item item') && (Prelude.not $ isInCalldata r) && n == an && an == an' - _ -> False - isStorageBound (And _ (LEQ _ (LitInt _ 0) e) (LEQ _ e' (IntMax _ n))) | e == e' = - case (e,e') of - (VarRef _ Pre SRefKind item@(Item _ (PrimitiveType (AbiIntType an)) r), VarRef _ _ SRefKind item'@(Item _ (PrimitiveType (AbiIntType an')) _)) -> - (eqKind item item') && (Prelude.not $ isInCalldata r) && n == an && an == an' - _ -> False - isStorageBound _ = False - - isInCalldata :: Ref k -> Bool - isInCalldata (CVar _ _ _) = True - isInCalldata (SArray _ r _ _) = isInCalldata r - isInCalldata (SMapping _ r _ _) = isInCalldata r - isInCalldata (SField _ _ _ _) = False - isInCalldata (SVar _ _ _) = False - +localStorageBounds :: forall m . App m => Constructor -> ContractMap -> ActT m [EVM.Prop] +localStorageBounds (Constructor _ _ _ _ _ _ initState) contractMap = do + mapM (toProp contractMap) $ concatMap updateBound initState + where + updateBound :: StorageUpdate -> [Exp ABoolean] + updateBound (Update SInteger item@(Item _ (PrimitiveType at) _) _) = [bound at (VarRef nowhere Pre SStorage item)] + updateBound _ = [] checkBehaviours :: forall m. App m => SolverGroup -> Contract -> ContractMap -> ActT m (Error String ()) -checkBehaviours solvers (Contract layout _ behvs) actstorage = do +checkBehaviours solvers (Contract layoutMode constr behvs) actstorage = do let hevmstorage = translateCmap actstorage fresh <- getFresh - actbehvs <- translateBehvs actstorage layout behvs + actbehvs <- translateBehvs actstorage layoutMode behvs (fmap $ concatError def) $ forM actbehvs $ \(name,actbehv,calldata, sig) -> do let (behvs', fcmaps) = unzip actbehv - solbehvs <- lift $ removeFails <$> getRuntimeBranches solvers hevmstorage calldata fresh + localBounds <- localStorageBounds constr actstorage + solbehvs <- lift $ removeFails <$> getRuntimeBranches solvers hevmstorage calldata localBounds fresh lift $ showMsg $ "\x1b[1mChecking behavior \x1b[4m" <> name <> "\x1b[m of Act\x1b[m" -- equivalence check @@ -861,8 +826,8 @@ checkBehaviours solvers (Contract layout _ behvs) actstorage = do res1 <- lift $ checkResult calldata (Just sig) =<< checkEquiv solvers solbehvs behvs' -- input space exhaustiveness check lift $ showMsg "\x1b[1mChecking if the input spaces are the same\x1b[m" - res2 <- lift $ checkResult calldata (Just sig) =<< checkInputSpaces solvers --solbehvs behvs' - (trace (showBehvs solbehvs) solbehvs) (trace (showBehvs behvs') behvs') + res2 <- lift $ checkResult calldata (Just sig) =<< checkInputSpaces solvers solbehvs behvs' + --(trace (showBehvs solbehvs) solbehvs) (trace (showBehvs behvs') behvs') pure $ traverse_ (checkStoreIsomorphism actstorage) fcmaps *> res1 *> res2 where @@ -870,7 +835,6 @@ checkBehaviours solvers (Contract layout _ behvs) actstorage = do def = Success () - translateCmap :: ContractMap -> [(EVM.Expr EVM.EAddr, EVM.Contract)] translateCmap cmap = (\(addr, (c, _)) -> (addr, toContract c)) <$> M.toList cmap where @@ -1041,7 +1005,7 @@ checkAbi solver contract cmap = do let hevmstorage = translateCmap cmap let txdata = EVM.AbstractBuf "txdata" let selectorProps = assertSelector txdata <$> nubOrd (actSigs contract) - evmBehvs <- getRuntimeBranches solver hevmstorage (txdata, []) 0 -- TODO what freshAddr goes here? + evmBehvs <- getRuntimeBranches solver hevmstorage (txdata, []) [] 0 -- TODO what freshAddr goes here? conf <- readConfig let queries = fmap (assertProps conf) $ filter (/= []) $ fmap (checkBehv selectorProps) evmBehvs res <- liftIO $ mapConcurrently (checkSat solver Nothing) queries diff --git a/src/Act/HEVM_utils.hs b/src/Act/HEVM_utils.hs index 6e9e77b2..55573ead 100644 --- a/src/Act/HEVM_utils.hs +++ b/src/Act/HEVM_utils.hs @@ -118,9 +118,9 @@ iterConfig = IterConfig } -- | decompiles the given EVM bytecode into a list of Expr branches -getRuntimeBranches :: App m => SolverGroup -> [(EVM.Expr EVM.EAddr, EVM.Contract)] -> Calldata -> Int -> m [EVM.Expr EVM.End] -getRuntimeBranches solvers contracts calldata fresh = do - prestate <- liftIO $ stToIO $ abstractVM contracts calldata fresh +getRuntimeBranches :: App m => SolverGroup -> [(EVM.Expr EVM.EAddr, EVM.Contract)] -> Calldata -> [EVM.Prop] -> Int -> m [EVM.Expr EVM.End] +getRuntimeBranches solvers contracts calldata precond fresh = do + prestate <- liftIO $ stToIO $ abstractVM contracts calldata precond fresh expr <- interpret (Fetch.oracle solvers Nothing) iterConfig prestate runExpr let simpl = simplify expr let nodes = flattenExpr simpl @@ -145,11 +145,12 @@ abstractInitVM contractCode contracts cd precond fresh = do vm <- loadSymVM (EVM.SymAddr "entrypoint", EVM.initialContract code) contracts value cd True fresh pure $ vm { constraints = vm.constraints <> precond } -abstractVM :: [(EVM.Expr EVM.EAddr, EVM.Contract)] -> (EVM.Expr EVM.Buf, [EVM.Prop]) -> Int -> ST s (EVM.VM EVM.Symbolic s) -abstractVM contracts cd fresh = do +abstractVM :: [(EVM.Expr EVM.EAddr, EVM.Contract)] -> (EVM.Expr EVM.Buf, [EVM.Prop]) -> [EVM.Prop] -> Int -> ST s (EVM.VM EVM.Symbolic s) +abstractVM contracts cd precond fresh = do let value = EVM.TxValue let (c, cs) = findInitContract - loadSymVM c cs value cd False fresh + vm <- loadSymVM c cs value cd False fresh + pure $ vm { constraints = vm.constraints <> precond } where findInitContract :: ((EVM.Expr 'EVM.EAddr, EVM.Contract), [(EVM.Expr 'EVM.EAddr, EVM.Contract)]) From b9521489368b53092e7a2dbf9f4934776be2ee6a Mon Sep 17 00:00:00 2001 From: lefterislazar Date: Sun, 28 Sep 2025 21:02:31 +0300 Subject: [PATCH 3/6] Working Vyper HEVM equivalence, multiple source file interface --- Makefile | 19 +- act.cabal | 6 +- flake.nix | 2 + src/Act/Bounds.hs | 11 +- src/Act/CLI.hs | 238 +- src/Act/Consistency.hs | 6 +- src/Act/Coq.hs | 4 +- src/Act/Decompile.hs | 12 +- src/Act/HEVM.hs | 129 +- src/Act/Lex.x | 8 - src/Act/Parse.y | 15 +- src/Act/Print.hs | 2 +- src/Act/SMT.hs | 10 +- src/Act/Syntax.hs | 10 +- src/Act/Syntax/Typed.hs | 14 +- src/Act/Syntax/TypedExplicit.hs | 2 +- src/Act/Syntax/Untyped.hs | 5 +- src/Act/Type.hs | 62 +- .../frontend/pass/array/array.act.typed.json | 95 +- .../array/array_composite_post.act.typed.json | 1007 +- .../array/array_exp_rewrite.act.typed.json | 6801 +++++++++++- .../pass/array/array_post.act.typed.json | 483 +- .../pass/array/array_update.act.typed.json | 6479 +++++++++++- .../pass/array/assignments.act.typed.json | 2475 ++++- .../pass/array/bounds_iff.act.typed.json | 288 +- .../array/bounds_postupdate.act.typed.json | 288 +- .../array/bounds_preupdate.act.typed.json | 336 +- ...composite_array_exp_rewrite.act.typed.json | 7033 ++++++++++++- .../pass/array/const_array.act.typed.json | 7137 ++++++++++++- tests/frontend/pass/array/const_array2.act | 3 + .../pass/array/const_array2.act.parsed.hs | 2 +- .../pass/array/const_array2.act.typed.json | 7677 +++++++++++++- .../frontend/pass/array/create.act.typed.json | 816 ++ .../pass/array/cross_contract.act.typed.json | 243 +- .../pass/array/cross_contract2.act.typed.json | 243 +- .../pass/array/cross_inv.act.typed.json | 259 +- .../array/multicase_bounds.act.typed.json | 748 ++ .../pass/array/noaliasing.act.typed.json | 2220 +++- .../pass/array/noaliasing2.act.typed.json | 3318 +++--- tests/frontend/pass/case/case.act.typed.json | 486 - .../pass/token/transfer.act.typed.json | 9138 +++++------------ tests/hevm/pass/multisource/multi1/file1.sol | 19 + tests/hevm/pass/multisource/multi1/file2.vy | 10 + tests/hevm/pass/multisource/multi1/multi1.act | 37 + .../hevm/pass/multisource/multi1/multi1.json | 18 + tests/hevm/pass/multisource/multi2/file1.vy | 12 + tests/hevm/pass/multisource/multi2/file2.sol | 12 + tests/hevm/pass/multisource/multi2/multi2.act | 37 + .../hevm/pass/multisource/multi2/multi2.json | 18 + tests/hevm/pass/vyper/erc20/erc20.act | 214 + tests/hevm/pass/vyper/erc20/erc20.vy | 51 + .../pass/vyper/short_ints_mapping/mapping.act | 26 + .../pass/vyper/short_ints_mapping/mapping.vy | 10 + 53 files changed, 47427 insertions(+), 11167 deletions(-) create mode 100644 tests/hevm/pass/multisource/multi1/file1.sol create mode 100644 tests/hevm/pass/multisource/multi1/file2.vy create mode 100644 tests/hevm/pass/multisource/multi1/multi1.act create mode 100644 tests/hevm/pass/multisource/multi1/multi1.json create mode 100644 tests/hevm/pass/multisource/multi2/file1.vy create mode 100644 tests/hevm/pass/multisource/multi2/file2.sol create mode 100644 tests/hevm/pass/multisource/multi2/multi2.act create mode 100644 tests/hevm/pass/multisource/multi2/multi2.json create mode 100644 tests/hevm/pass/vyper/erc20/erc20.act create mode 100644 tests/hevm/pass/vyper/erc20/erc20.vy create mode 100644 tests/hevm/pass/vyper/short_ints_mapping/mapping.act create mode 100644 tests/hevm/pass/vyper/short_ints_mapping/mapping.vy diff --git a/Makefile b/Makefile index ccfbc88c..3356ee4c 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,8 @@ postcondition_fail=$(wildcard tests/postconditions/fail/*.act) hevm_buggy=tests/hevm/pass/transfer/transfer.act # supposed to pass hevm_pass=$(filter-out $(hevm_buggy), $(wildcard tests/hevm/pass/*/*.act)) +hevm_vy_pass=$(wildcard tests/hevm/pass/vyper/*/*.act) +hevm_multi_pass=$(wildcard tests/hevm/pass/multisource/*/*.act) # supposed to fail hevm_fail=$(wildcard tests/hevm/fail/*/*.act) # supposed to pass @@ -68,8 +70,8 @@ test-parse: parser compiler $(parser_pass:=.parse.pass) $(parser_fail:=.parse.fa test-type: parser compiler $(typing_pass:=.type.pass) $(typing_fail:=.type.fail) test-invariant: parser compiler $(invariant_pass:=.invariant.pass) $(invariant_fail:=.invariant.fail) test-postcondition: parser compiler $(postcondition_pass:=.postcondition.pass) $(postcondition_fail:=.postcondition.fail) -test-hevm: parser compiler $(hevm_pass:=.hevm.pass) $(hevm_fail:=.hevm.fail) -test-hevm-fast: parser compiler $(hevm_fast:=.hevm.pass.fast) $(hevm_fail:=.hevm.fail) +test-hevm: parser compiler $(hevm_pass:=.hevm.pass) $(hevm_vy_pass:=.hevm.vy.pass) $(hevm_multi_pass:=.hevm.multi.pass) $(hevm_fail:=.hevm.fail) +test-hevm-fast: parser compiler $(hevm_fast:=.hevm.pass.fast) $(hevm_vy_pass:=.hevm.vy.pass) $(hevm_fail:=.hevm.fail) test-cabal: src/*.hs cabal v2-run test @@ -108,15 +110,22 @@ tests/%.postcondition.fail: tests/hevm/pass/%.act.hevm.pass: $(eval CONTRACT := $(shell awk '/contract/{ print $$2 }' tests/hevm/pass/$*.sol)) - ./bin/act hevm --spec tests/hevm/pass/$*.act --sol tests/hevm/pass/$*.sol --smttimeout 100000000 + ./bin/act hevm --spec tests/hevm/pass/$*.act --sol tests/hevm/pass/$*.sol --solver bitwuzla --smttimeout 100000000 + +tests/hevm/pass/%.act.hevm.vy.pass: + $(eval CONTRACT := $(shell awk '/contract/{ print $$2 }' tests/hevm/pass/$*.vy)) + ./bin/act hevm --spec tests/hevm/pass/$*.act --vy tests/hevm/pass/$*.vy --solver bitwuzla --smttimeout 100000000 + +tests/hevm/pass/%.act.hevm.multi.pass: + ./bin/act hevm --spec tests/hevm/pass/$*.act --sources tests/hevm/pass/$*.json --solver bitwuzla --smttimeout 100000000 tests/hevm/fail/%.act.hevm.fail: $(eval CONTRACT := $(shell awk '/contract/{ print $$2 }' tests/hevm/fail/$*.sol)) - ./bin/act hevm --spec tests/hevm/fail/$*.act --sol tests/hevm/fail/$*.sol && exit 1 || echo 0 + ./bin/act hevm --spec tests/hevm/fail/$*.act --sol tests/hevm/fail/$*.sol --solver bitwuzla && exit 1 || echo 0 tests/hevm/pass/%.act.hevm.pass.fast: $(eval CONTRACT := $(shell awk '/contract/{ print $$2 }' tests/hevm/pass/$*.sol)) - ./bin/act hevm --spec tests/hevm/pass/$*.act --sol tests/hevm/pass/$*.sol --smttimeout 100000000 + ./bin/act hevm --spec tests/hevm/pass/$*.act --sol tests/hevm/pass/$*.sol --solver bitwuzla --smttimeout 100000000 test-ci: test-parse test-type test-invariant test-postcondition test-coq test-hevm test: test-ci test-cabal diff --git a/act.cabal b/act.cabal index 79dcae49..e9f430e3 100644 --- a/act.cabal +++ b/act.cabal @@ -20,7 +20,6 @@ common common GADTs build-depends: base >= 4.9 && < 5, aeson >= 1.0, - aeson-optics >= 1.2.1, containers >= 0.5, hevm >= 0.51.3, lens >= 4.17.1, @@ -43,9 +42,8 @@ common common data-dword >= 0.3.2.1, prettyprinter, prettyprinter-ansi-terminal, - unordered-containers, - optics-core, - base16 + base16, + filepath if flag(ci) ghc-options: -O2 -Wall -Werror -Wno-orphans -Wno-unticked-promoted-constructors else diff --git a/flake.nix b/flake.nix index 8d076e14..b5b80694 100644 --- a/flake.nix +++ b/flake.nix @@ -27,6 +27,7 @@ pkgs.cvc5 pkgs.solc pkgs.vyper + pkgs.bitwuzla ]; }); in rec { @@ -55,6 +56,7 @@ pkgs.secp256k1 pkgs.libff pkgs.vyper + pkgs.bitwuzla ]; withHoogle = true; shellHook = '' diff --git a/src/Act/Bounds.hs b/src/Act/Bounds.hs index 1d76eee2..a0e4f5db 100644 --- a/src/Act/Bounds.hs +++ b/src/Act/Bounds.hs @@ -1,7 +1,7 @@ {-# LANGUAGE GADTs #-} {-# LANGUAGE DataKinds #-} -module Act.Bounds (addBounds) where +module Act.Bounds (addBounds, mkLocationBounds) where import Data.Maybe import Data.List (nub, partition) @@ -25,7 +25,7 @@ and postconditions. addBounds :: Act -> Act addBounds (Act store contracts) = Act store (addBoundsContract <$> contracts) where - addBoundsContract (Contract layout ctors behvs) = Contract layout (addBoundsConstructor ctors) (addBoundsBehaviour <$> behvs) + addBoundsContract (Contract ctors behvs) = Contract (addBoundsConstructor ctors) (addBoundsBehaviour <$> behvs) -- | Adds type bounds for calldata, environment vars, and external storage vars -- as preconditions @@ -52,7 +52,7 @@ addBoundsConstructor ctor@(Constructor _ (Interface _ decls) _ pre post invs sta -- | Adds type bounds for calldata, environment vars, and storage vars as preconditions addBoundsBehaviour :: Behaviour -> Behaviour -addBoundsBehaviour behv@(Behaviour _ _ (Interface _ decls) _ pre cases post stateUpdates _) = +addBoundsBehaviour behv@(Behaviour _ _ (Interface _ decls) _ pre cases post stateUpdates ret) = behv { _preconditions = pre', _postconditions = post' } where pre' = pre @@ -65,6 +65,7 @@ addBoundsBehaviour behv@(Behaviour _ _ (Interface _ decls) _ pre cases post stat locs = nub $ concatMap locsFromExp (pre <> post <> cases) <> concatMap locsFromUpdate stateUpdates + <> (maybe [] locsFromTypedExp ret) -- | Adds type bounds for calldata, environment vars, and storage vars addBoundsInvariant :: Constructor -> Invariant -> Invariant @@ -112,7 +113,7 @@ mkStorageBounds refs t = concatMap mkBound refs where mkBound :: StorageUpdate -> [Exp ABoolean] mkBound (Update SInteger item _) = [mkSItemBounds t item] - mkBound (Update typ item@(Item _ (PrimitiveType at) _) _) | isNothing $ flattenArrayAbiType at = + mkBound (Update typ item@(Item _ (PrimitiveType at) _) _) | isJust $ flattenArrayAbiType at = maybe [] (\Refl -> mkSItemBounds t <$> expandItem item) $ testEquality (flattenSType typ) SInteger mkBound _ = [] @@ -129,7 +130,7 @@ mkLocationBounds refs = concatMap mkBound refs where mkBound :: Location -> [Exp ABoolean] mkBound (Loc SInteger rk item) = [mkItemBounds rk item] - mkBound (Loc typ rk item@(Item _ (PrimitiveType at) _)) | isNothing $ flattenArrayAbiType at = + mkBound (Loc typ rk item@(Item _ (PrimitiveType at) _)) | isJust $ flattenArrayAbiType at = maybe [] (\Refl -> mkItemBounds rk <$> expandItem item) $ testEquality (flattenSType typ) SInteger mkBound _ = [] diff --git a/src/Act/CLI.hs b/src/Act/CLI.hs index cb68ddf7..5ccd89cf 100644 --- a/src/Act/CLI.hs +++ b/src/Act/CLI.hs @@ -13,19 +13,17 @@ module Act.CLI (main, compile, proceed, prettyErrs) where import Data.Aeson hiding (Bool, Number, json, Success) -import Data.Aeson.Optics -import Data.Aeson.Key qualified as Key -import Data.Aeson.KeyMap qualified as KeyMap +import Data.Aeson.Types hiding (Success, parse) import GHC.Generics import System.Exit ( exitFailure ) import System.IO (hPutStrLn, stderr) import System.Process +import System.FilePath import Data.Text (unpack) -import Data.Text.Encoding (encodeUtf8, decodeUtf8) +import Data.Text.Encoding (encodeUtf8) import Data.List import qualified Data.Map as Map import Data.Map (Map) -import Data.HashMap.Strict qualified as HMap import Data.Maybe import qualified Data.Text as Text import qualified Data.Text.IO as TIO @@ -34,16 +32,13 @@ import GHC.Conc import GHC.Natural import Options.Generic -import Optics.Core -import Optics.Operators.Unsafe - import qualified Data.ByteString.Lazy.Char8 as B import qualified Data.ByteString as BS import qualified Data.ByteString.Base16 as BS16 import Data.ByteString (ByteString) import Control.Monad -import Control.Lens.Getter as LensGetter +import Control.Lens.Getter import Act.Error import Act.Lex (lexer, AlexPosn(..)) @@ -57,7 +52,7 @@ import Act.HEVM import Act.HEVM_utils import Act.Consistency import Act.Print -import Act.Decompile hiding (storageLayout) +import Act.Decompile import qualified EVM.Solvers as Solvers import EVM.Solidity @@ -89,8 +84,10 @@ data Command w | HEVM { spec :: w ::: String "Path to spec" , sol :: w ::: Maybe String "Path to .sol" + , vy :: w ::: Maybe String "Path to .vy" , code :: w ::: Maybe ByteString "Runtime code" , initcode :: w ::: Maybe ByteString "Initial code" + , sources :: w ::: Maybe String "Path to sources .json" , solver :: w ::: Maybe Text "SMT solver: cvc5 (default) or z3" , smttimeout :: w ::: Maybe Integer "Timeout given to SMT solver in milliseconds (default: 20000)" , debug :: w ::: Bool "Print verbose SMT output (default: False)" @@ -128,9 +125,9 @@ main = do Coq f solver' smttimeout' debug' -> do solver'' <- parseSolver solver' coq' f solver'' smttimeout' debug' - HEVM spec' sol' code' initcode' solver' smttimeout' debug' -> do + HEVM spec' sol' vy' code' initcode' sources' solver' smttimeout' debug' -> do solver'' <- parseSolver solver' - hevm spec' sol' code' initcode' solver'' smttimeout' debug' + hevm spec' sol' vy' code' initcode' sources' solver'' smttimeout' debug' Decompile sol' contract' solver' smttimeout' debug' -> do solver'' <- parseSolver solver' decompile' sol' (Text.pack contract') solver'' smttimeout' debug' @@ -166,6 +163,7 @@ parseSolver s = case s of Just s' -> case Text.unpack s' of "z3" -> pure Solvers.Z3 "cvc5" -> pure Solvers.CVC5 + "bitwuzla" -> pure Solvers.Bitwuzla input -> render (text $ "unrecognised solver: " <> Text.pack input) >> exitFailure prove :: FilePath -> Solvers.Solver -> Maybe Integer -> Bool -> IO () @@ -254,114 +252,140 @@ decompile' solFile' cid solver' timeout debug' = do putStrLn (prettyAct s) -hevm :: FilePath -> Maybe FilePath -> Maybe ByteString -> Maybe ByteString -> Solvers.Solver -> Maybe Integer -> Bool -> IO () -hevm actspec sol' code' initcode' solver' timeout debug' = do +hevm :: FilePath -> Maybe FilePath -> Maybe FilePath -> Maybe ByteString -> Maybe ByteString -> Maybe FilePath -> Solvers.Solver -> Maybe Integer -> Bool -> IO () +hevm actspec sol' vy' code' initcode' sources' solver' timeout debug' = do let config = if debug' then debugActConfig else defaultActConfig cores <- liftM fromIntegral getNumProcessors specContents <- readFile actspec + inputsMap <- processSources proceed specContents (addBounds <$> compile specContents) $ \ (Act store contracts) -> do - cmap <- createContractMap contracts + (cmap, lmap) <- createContractMap contracts inputsMap res <- runEnv (Env config) $ Solvers.withSolvers solver' cores 1 (naturalFromInteger <$> timeout) $ \solvers -> - checkContracts solvers store cmap + checkContracts solvers store lmap cmap case res of Success _ -> pure () Failure err -> prettyErrs "" err where - createContractMap :: [Contract] -> IO (Map Id (Contract, BS.ByteString, BS.ByteString)) - createContractMap contracts = do - foldM (\cmap spec'@(Contract layout cnstr _) -> do + + -- Creates maps of storage layout modes and bytecodes, for all contracts contained in the given Act specification + createContractMap :: [Contract] -> Map (Maybe Id) (LayoutMode, ByteString, ByteString) -> IO (Map Id (Contract, BS.ByteString, BS.ByteString), Map Id LayoutMode) + createContractMap contracts inputsMap | Map.keys inputsMap == [Nothing] = + -- Singleton inputsMap with Nothing as contract Id means that '--vy' was given + case contracts of + [spec'@(Contract cnstr _)] -> do + let cid = _cname cnstr + (_, initcode'', runtimecode') = fromJust $ Map.lookup Nothing inputsMap + pure (Map.singleton cid (spec', initcode'', runtimecode'), Map.singleton cid VyperLayout) + _ -> do + render (yellow "Warning: " <> text "Multiple contracts in spec mapped to a single Vyper file" <> line) + let (_, initcode'', runtimecode') = fromJust $ Map.lookup Nothing inputsMap + pure $ foldr (\spec'@(Contract cnstr _) (cmap, lmap) -> + let cid = _cname cnstr + in (Map.insert cid (spec', initcode'', runtimecode') cmap, Map.insert cid VyperLayout lmap) + ) (mempty,mempty) contracts + createContractMap contracts inputsMap = do + pure $ foldr (\spec'@(Contract cnstr _) (cmap, lmap) -> let cid = _cname cnstr - (initcode'', runtimecode') <- getBytecode cid layout -- TODO do not reread the file each time - pure $ Map.insert cid (spec', initcode'', runtimecode') cmap - ) mempty contracts - - getBytecode :: Id -> LayoutMode -> IO (BS.ByteString, BS.ByteString) - getBytecode cid layout = - case (sol', code', initcode') of - (Just f, Nothing, Nothing) -> do - solContents <- TIO.readFile f - bytecodes (Text.pack cid) layout solContents - (Nothing, Just _, Just _) -> render (text "Only Solidity file supported") >> exitFailure -- pure (i, c) - (Nothing, Nothing, _) -> render (text "No runtime code is given" <> line) >> exitFailure - (Nothing, _, Nothing) -> render (text "No initial code is given" <> line) >> exitFailure - (Just _, Just _, _) -> render (text "Both Solidity file and runtime code are given. Please specify only one." <> line) >> exitFailure - (Just _, _, Just _) -> render (text "Both Solidityfile and initial code are given. Please specify only one." <> line) >> exitFailure - - -bytecodes :: Text -> LayoutMode -> Text -> IO (BS.ByteString, BS.ByteString) -bytecodes cid SolidityLayout src = do + (layoutMode, initcode'', runtimecode') = fromMaybe (error $ "Contract " <> cid <> "not found in sources") $ Map.lookup (Just cid) inputsMap + in (Map.insert cid (spec', initcode'', runtimecode') cmap, Map.insert cid layoutMode lmap) + ) (mempty,mempty) contracts + + -- Creates a map of information for contracts available from source code or bytecode arguments + processSources :: IO (Map (Maybe Id) (LayoutMode, ByteString, ByteString)) + processSources = + case (sources', sol', vy', code', initcode') of + (Just f, Nothing, Nothing, Nothing, Nothing) -> do + jsonContents <- TIO.readFile f + let (contractSources, sourceLangs) = + case readSourcesJSON jsonContents of + Right res -> res + Left err -> error err + let sourceLayouts = checkLanguages sourceLangs + bytecodeMap <- compileSources f sourceLayouts + pure $ Map.fromList $ map (\(cid,src) -> + let src' = Text.unpack src + cid' = Text.unpack cid + sourceMap = fromMaybe (error $ "Source " <> Text.unpack src <> " of " <> cid' <> " not found in sources") $ Map.lookup src' bytecodeMap + layoutMode = fromJust $ Map.lookup src sourceLayouts + (initcode'', runtimecode') = case layoutMode of + SolidityLayout -> fromMaybe (error $ "Contract " <> cid' <> " not found in " <> src') $ Map.lookup (Just cid') sourceMap + VyperLayout -> fromJust $ Map.lookup Nothing sourceMap + in (Just cid', (layoutMode, initcode'', runtimecode'))) $ Map.toList contractSources + (Just _, Just _, _, _, _) -> render (text "Both a sources JSON file and Solidity file are given. Please specify only one.") >> exitFailure + (Just _, _, Just _, _, _) -> render (text "Both a sources JSON file and Vyper file are given. Please specify only one.") >> exitFailure + (Just _, _, _, Just _, _) -> render (text "Both a sources JSON file and runtime code are given. Please specify only one.") >> exitFailure + (Just _, _, _, _, Just _) -> render (text "Both a sources JSON file and initcode code are given. Please specify only one.") >> exitFailure + (Nothing, Just f, Nothing, Nothing, Nothing) -> do + bcs <- bytecodes f SolidityLayout + pure $ Map.map (\(b1,b2) -> (SolidityLayout, b1, b2)) bcs + (Nothing, Just _, Just _, _, _) -> render (text "Both Solidity and Vyper file are given. Please specify only one." <> line) >> exitFailure + (Nothing, Just _, _, Just _, _) -> render (text "Both Solidity file and runtime code are given. Please specify only one." <> line) >> exitFailure + (Nothing, Just _, _, _, Just _) -> render (text "Both Solidity file and initial code are given. Please specify only one." <> line) >> exitFailure + (Nothing, Nothing, Just f, Nothing, Nothing) -> do + bcs <- bytecodes f VyperLayout + pure $ Map.map (\(b1,b2) -> (VyperLayout, b1, b2)) bcs + (Nothing, Nothing, Just _, Just _, _) -> render (text "Both Vyper file and runtime code are given. Please specify only one." <> line) >> exitFailure + (Nothing, Nothing, Just _, _, Just _) -> render (text "Both Vyper file and initial code are given. Please specify only one." <> line) >> exitFailure + (Nothing, Nothing, Nothing, Nothing, _) -> render (text "No runtime code is given" <> line) >> exitFailure + (Nothing, Nothing, Nothing, _, Nothing) -> render (text "No initial code is given" <> line) >> exitFailure + (Nothing, Nothing, Nothing, Just _, Just _) -> render (text "Only Solidity or Vyper files supported") >> exitFailure -- TODO pure (i, c) + + +readSourcesJSON :: Text -> Either String (Map Text Text, Map Text Text) +readSourcesJSON json = case eitherDecode $ BS.fromStrict $ encodeUtf8 json of + Left s -> error s + Right decoded -> do + (contractObjs,sourcesObjs) <- flip parseEither decoded $ \obj -> do + contractsObjs <- obj .: "contracts" + sourcesObjs <- obj .: "sources" + pure (contractsObjs, sourcesObjs) + contractSources <- sequence (Map.map (parseEither (.: "source")) contractObjs) + sourceLangs <- sequence (Map.map (parseEither (.: "language")) sourcesObjs) + pure (contractSources, sourceLangs) + +checkLanguages :: Map Text Text -> Map Text LayoutMode +checkLanguages = Map.map (fromMaybe (error "Unknown language") . checkLanguage) + where + checkLanguage :: Text -> Maybe LayoutMode + checkLanguage "Solidity" = Just SolidityLayout + checkLanguage "Vyper" = Just VyperLayout + checkLanguage "Bytecode" = Just SolidityLayout -- TODO maybe give options + checkLanguage _ = Nothing + +-- Compiles all source files provided in the sources .json file +-- Returns map from source filepaths to maps from included contract IDs to bytecodes +compileSources :: FilePath -> Map Text LayoutMode -> IO (Map FilePath (Map (Maybe Id) (BS.ByteString, BS.ByteString))) +compileSources jsonPath jsonMap = + sequence $ Map.fromList $ map (\(src, layoutMode) -> + let jsonDir = takeDirectory jsonPath + src' = jsonDir Text.unpack src + in (Text.unpack src, bytecodes src' layoutMode)) $ Map.toList jsonMap + +-- Compiles a source file to bytecode. Returns map from included contract IDs to bytecodes. +-- Mapping from (Maybe Id) to cover the case where a single Vyper file is given, which provides no information on contract names. +bytecodes :: FilePath -> LayoutMode -> IO (Map (Maybe Id) (BS.ByteString, BS.ByteString)) +bytecodes srcFile SolidityLayout = do + src <- TIO.readFile srcFile json <- solc Solidity src False let (Contracts sol', _, _) = fromJust $ readStdJSON json - let err = error $ "Cannot find Solidity contract " <> Text.unpack cid - pure ((fromMaybe err . Map.lookup ("hevm.sol" <> ":" <> cid) $ sol').creationCode, - (fromMaybe err . Map.lookup ("hevm.sol" <> ":" <> cid) $ sol').runtimeCode) -bytecodes cid VyperLayout src = do - json <- vyper cid src - let contracts = fromJust $ readVyperJSON json - let err = error $ "Cannot find Solidity contract " <> Text.unpack cid - pure (fromMaybe err . lookup (cid <> ".vy" <> ":" <> cid) $ contracts) - -vyper :: Text -> Text -> IO Text -vyper cid src = Text.pack <$> (readProcess "vyper" ["--standard-json"] (Text.unpack $ stdVyperJson cid src)) - -stdVyperJson :: Text -> Text -> Text -stdVyperJson cid src = decodeUtf8 $ BS.toStrict $ encode $ vyperToJSON cid src - -vyperToJSON :: Text -> Text -> Value -vyperToJSON cid src = - object [ "language" .= (toJSON :: String -> Value) ("Vyper" :: String) - , "sources" .= object [ Key.fromText (cid <> ".vy") .= object ["content" .= src]] - , "settings" .= - object [ "outputSelection" .= - object ["*" .= - object ["*" .= ((toJSON :: [String] -> Value) - ["metadata" :: String, - "evm.bytecode", - "evm.deployedBytecode", - "abi", - --"storageLayout", - "evm.bytecode.sourceMap", - --"evm.bytecode.linkReferences", - --"evm.bytecode.generatedSources", - "evm.deployedBytecode.sourceMap" - --"evm.deployedBytecode.linkReferences", - --"evm.deployedBytecode.generatedSources", - --"evm.deployedBytecode.immutableReferences" - ]), - "" .= ((toJSON :: [String] -> Value) ["ast" :: String]) - ] - ] - ] - - ] - --- | Parses the standard json output from solc -readVyperJSON :: Text -> Maybe [(Text,(ByteString, ByteString))] -readVyperJSON json = do - contracts <- KeyMap.toHashMapText <$> json ^? key "contracts" % _Object - let contractMap = f contracts - pure $ Map.toList contractMap - where - f :: (AsValue s) => HMap.HashMap Text s -> (Map Text (ByteString, ByteString)) - f x = Map.fromList . (concatMap g) . HMap.toList $ x - g (s, x) = h s <$> HMap.toList (KeyMap.toHashMapText (fromMaybe (error "Could not parse json object") (preview _Object x))) - h :: Text -> (Text, Value) -> (Text, (ByteString, ByteString)) - h s (c, x) = - let - evmstuff = x ^?! key "evm" - sc = s <> ":" <> c - runtime = evmstuff ^?! key "deployedBytecode" - creation = evmstuff ^?! key "bytecode" - theRuntimeCode = (toCode sc) $ fromMaybe "" $ runtime ^? key "object" % _String - theCreationCode = (toCode sc) $ fromMaybe "" $ creation ^? key "object" % _String - in (sc, (theCreationCode, theRuntimeCode)) - -toCode :: Text -> Text -> ByteString -toCode contractName t = case BS16.decodeBase16Untyped (encodeUtf8 (Text.drop 2 t)) of + pure $ Map.fromList $ map (\(fn,c) -> (Just $ Text.unpack $ snd $ Text.breakOnEnd ":" fn, (c.creationCode, c.runtimeCode))) $ Map.toList sol' +bytecodes srcFile VyperLayout = Map.singleton Nothing <$> vyper srcFile + +-- Compile vyper source file +vyper :: FilePath -> IO (BS.ByteString, BS.ByteString) +vyper src = do + -- Must drop initial "0x" and trailing "\n" + bc <- toCode src . Text.dropEnd 1 . Text.drop 2 . Text.pack <$> (readProcess "vyper" ["-f", "bytecode", src] []) + bcr <- toCode src . Text.dropEnd 1 . Text.drop 2 . Text.pack <$> (readProcess "vyper" ["-f", "bytecode_runtime", src] []) + pure (bc, bcr) + +-- Convert bytecode from hex string representation to binary +toCode :: FilePath -> Text -> ByteString +toCode fromFile t = case BS16.decodeBase16Untyped (encodeUtf8 t) of Right d -> d Left e -> if containsLinkerHole t - then error $ Text.unpack ("Error toCode: unlinked libraries detected in bytecode, in " <> contractName) - else error $ Text.unpack ("Error toCode:" <> e <> ", in " <> contractName) + then error ("Error toCode: unlinked libraries detected in bytecode, in " <> fromFile) + else error ("Error toCode:" <> Text.unpack e <> ", in " <> fromFile) ------------------- -- *** Util *** --- @@ -369,7 +393,7 @@ toCode contractName t = case BS16.decodeBase16Untyped (encodeUtf8 (Text.drop 2 t -- | Fail on error, or proceed with continuation proceed :: Validate err => String -> err (NonEmpty (Pn, String)) a -> (a -> IO ()) -> IO () -proceed contents comp continue = validation (prettyErrs contents) continue (comp LensGetter.^. revalidate) +proceed contents comp continue = validation (prettyErrs contents) continue (comp ^. revalidate) compile :: String -> Error String Act compile = pure . annotate <==< typecheck <==< parse . lexer diff --git a/src/Act/Consistency.hs b/src/Act/Consistency.hs index bdb11da0..40cdc639 100644 --- a/src/Act/Consistency.hs +++ b/src/Act/Consistency.hs @@ -104,7 +104,7 @@ mkCaseQuery _ [] = error "Internal error: behaviours cannot be empty" -- | Checks nonoverlapping and exhaustiveness of cases checkCases :: Act -> Solvers.Solver -> Maybe Integer -> Bool -> IO () checkCases (Act _ contracts) solver' smttimeout debug = do - let groups = concatMap (\(Contract _ _ behvs) -> groupBy sameIface behvs) contracts + let groups = concatMap (\(Contract _ behvs) -> groupBy sameIface behvs) contracts let config = SMT.SMTConfig solver' (fromMaybe 20000 smttimeout) debug solver <- spawnSolver config let qs = mkCaseQuery mkNonoverlapAssertion <$> groups @@ -189,7 +189,7 @@ mkBehvArrayBoundsQuery behv@(Behaviour _ _ (Interface ifaceName decls) _ precond checkArrayBounds :: Act -> Solvers.Solver -> Maybe Integer -> Bool -> IO () checkArrayBounds (Act _ contracts) solver' smttimeout debug = - forM_ contracts (\(Contract _ constr behvs) -> do + forM_ contracts (\(Contract constr behvs) -> do let config = SMT.SMTConfig solver' (fromMaybe 20000 smttimeout) debug solver <- spawnSolver config let constrQs = mkConstrArrayBoundsQuery constr @@ -315,7 +315,7 @@ mkAliasingQuery behv@(Behaviour _ _ (Interface ifaceName decls) _ preconds casec checkRewriteAliasing :: Act -> Solvers.Solver -> Maybe Integer -> Bool -> IO () checkRewriteAliasing (Act _ contracts) solver' smttimeout debug = - forM_ contracts (\(Contract _ _ behvs) -> do + forM_ contracts (\(Contract _ behvs) -> do let config = SMT.SMTConfig solver' (fromMaybe 20000 smttimeout) debug solver <- spawnSolver config let behvQs = mkAliasingQuery <$> behvs diff --git a/src/Act/Coq.hs b/src/Act/Coq.hs index 1b202fc6..1f880aa1 100644 --- a/src/Act/Coq.hs +++ b/src/Act/Coq.hs @@ -48,7 +48,7 @@ coq (Act store contracts) = header <> (T.intercalate "\n\n" $ contractCode store <$> contracts) contractCode :: Store -> Contract -> T.Text -contractCode store (Contract _ ctor@Constructor{..} behvs) = T.unlines $ +contractCode store (Contract ctor@Constructor{..} behvs) = T.unlines $ [ "Module " <> T.pack _cname <> ".\n" ] <> [ stateRecord ] <> [ base store ctor ] @@ -187,7 +187,7 @@ stateval store contract handler updates = T.unwords $ contractStore :: Id -> Store -> Map Id (SlotType, Integer) contractStore contract store = case M.lookup contract store of - Just s -> snd s + Just s -> s Nothing -> error "Internal error: cannot find constructor in store" diff --git a/src/Act/Decompile.hs b/src/Act/Decompile.hs index 39e2fc52..bec142e9 100644 --- a/src/Act/Decompile.hs +++ b/src/Act/Decompile.hs @@ -184,13 +184,13 @@ translate :: EVMContract -> Either Text Act translate c = do ctor <- mkConstructor c behvs <- mkBehvs c - let contract = Contract SolidityLayout ctor behvs + let contract = Contract ctor behvs let store = mkStore c pure $ Act store [contract] -- | Build an Act Store from a solc storage layout mkStore :: EVMContract -> Store -mkStore c = Map.singleton (T.unpack c.name) (SolidityLayout, Map.mapKeys T.unpack $ fmap fromitem c.storageLayout) +mkStore c = Map.singleton (T.unpack c.name) (Map.mapKeys T.unpack $ fmap fromitem c.storageLayout) where fromitem item = (convslot item.slotType, toInteger item.slot) @@ -456,11 +456,11 @@ fromWord layout w = simplify <$> go w -- This compiles the generated act spec back down to an Expr and then checks that the two are equivalent verifyDecompilation :: App m => SolverGroup -> ByteString -> ByteString -> Act -> m (Error String ()) verifyDecompilation solvers creation runtime (Act store spec) = do - let cmap = case spec of - [con@(Contract _ cnstr _)] -> - Map.insert (_cname cnstr) (con, creation, runtime) mempty + let (cmap,lmap) = case spec of + [con@(Contract cnstr _)] -> + (Map.insert (_cname cnstr) (con, creation, runtime) mempty, Map.insert (_cname cnstr) SolidityLayout mempty) _ -> error "TODO multiple contracts" - checkContracts solvers store cmap + checkContracts solvers store lmap cmap -- Helpers ----------------------------------------------------------------------------------------- diff --git a/src/Act/HEVM.hs b/src/Act/HEVM.hs index a9ee488a..5153d2c7 100644 --- a/src/Act/HEVM.hs +++ b/src/Act/HEVM.hs @@ -43,6 +43,7 @@ import Act.Syntax import Act.Error import qualified Act.Syntax.Typed as TA import Act.Syntax.Timing +import Act.Bounds (mkLocationBounds) import EVM.ABI (Sig(..)) import qualified EVM hiding (bytecode) @@ -54,7 +55,6 @@ import EVM.Solvers import EVM.Effects import EVM.Format as Format import EVM.Traversals -import Debug.Trace type family ExprType a where ExprType 'AInteger = EVM.EWord @@ -65,6 +65,8 @@ type family ExprType a where -- variables to their slot, offset, and size in bytes in memory type Layout = M.Map Id (LayoutMode, M.Map Id (Int, Int,Int)) +data LayoutMode = SolidityLayout | VyperLayout + type ContractMap = M.Map (EVM.Expr EVM.EAddr) (EVM.Expr EVM.EContract, Id) -- | For each contract in the Act spec, put in a codemap its Act @@ -77,11 +79,11 @@ type EquivResult = EVM.ProofResult (String, EVM.SMTCex) String initAddr :: EVM.Expr EVM.EAddr initAddr = EVM.SymAddr "entrypoint" -slotMap :: Store -> Layout -slotMap store = - M.map (\cstore -> - let vars = sortOn (snd . snd) $ M.toList $ snd cstore - layoutMode = fst cstore +slotMap :: Store -> M.Map Id LayoutMode -> Layout +slotMap store lmap = + M.mapWithKey (\cid cstore -> + let vars = sortOn (snd . snd) $ M.toList cstore + layoutMode = fromJust $ M.lookup cid lmap in (layoutMode, M.fromList $ makeLayout layoutMode vars 0 0) ) store @@ -182,13 +184,30 @@ getCaller = do -- * Act translation -translateConstructor :: Monad m => BS.ByteString -> LayoutMode -> Constructor -> ContractMap -> ActT m ([EVM.Expr EVM.End], Calldata, Sig, ContractMap) -translateConstructor bytecode layoutMode (Constructor cid iface _ preconds _ _ upds) cmap = do - let initmap = M.insert initAddr (initcontract, cid) cmap +storageBounds :: forall m . Monad m => ContractMap -> [Location] -> ActT m [EVM.Prop] +storageBounds contractMap locs = do + mapM (toProp contractMap) $ mkLocationBounds $ filter (Prelude.not . locInCalldata) locs + where + locInCalldata :: Location -> Bool + locInCalldata (Loc _ _ (Item _ _ ref)) = refInCalldata ref + + refInCalldata :: Ref k -> Bool + refInCalldata (CVar _ _ _) = True + refInCalldata (SVar _ _ _) = False + refInCalldata (SArray _ r _ _) = refInCalldata r + refInCalldata (SMapping _ _ _ _) = False + refInCalldata (SField _ _ _ _) = False + +translateConstructor :: Monad m => BS.ByteString -> Constructor -> ContractMap -> ActT m ([EVM.Expr EVM.End], Calldata, Sig, ContractMap, [EVM.Prop]) +translateConstructor bytecode (Constructor cid iface _ preconds _ _ upds) cmap = do + let initmap = M.insert initAddr (initcontract, cid) cmap preconds' <- mapM (toProp initmap) preconds - cmap' <- applyUpdates layoutMode initmap initmap upds + cmap' <- applyUpdates initmap initmap upds + -- After `addBounds`, `preconds` contains all integer locations that have been constrained in the Act spec. + -- All must be enforced again to avoid discrepancies. Necessary for Vyper. + bounds <- storageBounds cmap $ nub $ concatMap locsFromExp preconds let acmap = abstractCmap initAddr cmap' - pure ([simplify $ EVM.Success (snd calldata <> preconds' <> symAddrCnstr acmap) mempty (EVM.ConcreteBuf bytecode) (M.map fst cmap')], calldata, ifaceToSig iface, acmap) + pure ([simplify $ EVM.Success (snd calldata <> preconds' <> symAddrCnstr acmap) mempty (EVM.ConcreteBuf bytecode) (M.map fst cmap')], calldata, ifaceToSig iface, acmap, bounds) where calldata = makeCtrCalldata iface initcontract = EVM.C { EVM.code = EVM.RuntimeCode (EVM.ConcreteRuntimeCode bytecode) @@ -202,12 +221,12 @@ symAddrCnstr :: ContractMap -> [EVM.Prop] symAddrCnstr cmap = (\(a1, a2) -> EVM.PNeg (EVM.PEq (EVM.WAddr a1) (EVM.WAddr a2))) <$> comb (M.keys cmap) -translateBehvs :: Monad m => ContractMap -> LayoutMode -> [Behaviour] -> ActT m [(Id, [(EVM.Expr EVM.End, ContractMap)], Calldata, Sig)] -translateBehvs cmap layoutMode behvs = do +translateBehvs :: Monad m => ContractMap -> [Behaviour] -> ActT m [(Id, [(EVM.Expr EVM.End, ContractMap, [EVM.Prop])], Calldata, Sig)] +translateBehvs cmap behvs = do let groups = (groupBy sameIface behvs) :: [[Behaviour]] mapM (\behvs' -> do let calldata = behvCalldata behvs' - exprs <- mapM (translateBehv cmap (snd calldata) layoutMode) behvs' + exprs <- mapM (translateBehv cmap (snd calldata)) behvs' pure (behvName behvs', exprs, calldata, behvSig behvs)) groups where behvCalldata (Behaviour _ _ iface _ _ _ _ _ _:_) = makeCalldata iface @@ -228,20 +247,21 @@ ifaceToSig (Interface name args) = Sig (T.pack name) (fmap fromdecl args) where fromdecl (Decl t _) = t -translateBehv :: Monad m => ContractMap -> [EVM.Prop] -> LayoutMode -> Behaviour -> ActT m (EVM.Expr EVM.End, ContractMap) -translateBehv cmap cdataprops layoutMode (Behaviour _ _ _ _ preconds caseconds _ upds ret) = do +translateBehv :: Monad m => ContractMap -> [EVM.Prop] -> Behaviour -> ActT m (EVM.Expr EVM.End, ContractMap, [EVM.Prop]) +translateBehv cmap cdataprops (Behaviour _ _ _ _ preconds caseconds _ upds ret) = do preconds' <- mapM (toProp cmap) preconds caseconds' <- mapM (toProp cmap) caseconds ret' <- returnsToExpr cmap ret - cmap' <- applyUpdates layoutMode cmap cmap upds + cmap' <- applyUpdates cmap cmap upds let acmap = abstractCmap initAddr cmap' - pure (EVM.Success (preconds' <> caseconds' <> cdataprops <> symAddrCnstr cmap') mempty ret' (M.map fst cmap'), acmap) + bounds <- storageBounds cmap $ nub $ concatMap locsFromExp preconds + pure (EVM.Success (preconds' <> caseconds' <> cdataprops <> symAddrCnstr cmap') mempty ret' (M.map fst cmap'), acmap, bounds) -applyUpdates :: Monad m => LayoutMode -> ContractMap -> ContractMap -> [StorageUpdate] -> ActT m ContractMap -applyUpdates layoutMode readMap writeMap upds = foldM (applyUpdate layoutMode readMap) writeMap upds +applyUpdates :: Monad m => ContractMap -> ContractMap -> [StorageUpdate] -> ActT m ContractMap +applyUpdates readMap writeMap upds = foldM (applyUpdate readMap) writeMap upds -applyUpdate :: Monad m => LayoutMode -> ContractMap -> ContractMap -> StorageUpdate -> ActT m ContractMap -applyUpdate layoutMode readMap writeMap (Update typ (Item _ _ ref) e) = do +applyUpdate :: Monad m => ContractMap -> ContractMap -> StorageUpdate -> ActT m ContractMap +applyUpdate readMap writeMap (Update typ (Item _ _ ref) e) = do caddr' <- baseAddr readMap ref (addr, offset, size, _) <- refOffset readMap ref let (contract, cid) = fromMaybe (error $ "Internal error: contract not found\n" <> show e) $ M.lookup caddr' writeMap @@ -294,7 +314,7 @@ createContract :: Monad m => ContractMap -> ContractMap -> EVM.Expr EVM.EAddr -> createContract readMap writeMap freshAddr (Create _ cid args) = do codemap <- getCodemap case M.lookup cid codemap of - Just (Contract layoutMode (Constructor _ iface _ _ _ _ upds) _, _, bytecode) -> do + Just (Contract (Constructor _ iface _ _ _ _ upds) _, _, bytecode) -> do let contract = EVM.C { EVM.code = EVM.RuntimeCode (EVM.ConcreteRuntimeCode bytecode) , EVM.storage = EVM.ConcreteStore mempty , EVM.tStorage = EVM.ConcreteStore mempty @@ -304,7 +324,7 @@ createContract readMap writeMap freshAddr (Create _ cid args) = do let subst = makeSubstMap iface args let upds' = substUpds subst upds - applyUpdates layoutMode (M.insert freshAddr (contract, cid) readMap) (M.insert freshAddr (contract, cid) writeMap) upds' + applyUpdates (M.insert freshAddr (contract, cid) readMap) (M.insert freshAddr (contract, cid) writeMap) upds' Nothing -> error "Internal error: constructor not found" createContract _ _ _ _ = error "Internal error: constructor call expected" -- TODO needs to propagate up preconditions and check pointer constraints @@ -438,12 +458,6 @@ expToBuf cmap styp e = do SByteStr -> toExpr cmap e SSArray _ -> error "TODO arrays" -getLayoutMode :: Layout -> Id -> LayoutMode -getLayoutMode layout cid = - case M.lookup cid layout of - Just (lm, _) -> lm - Nothing -> error "Internal error: invalid contract name" - -- | Get the slot and the offset of a storage variable in storage getPosition :: Layout -> Id -> Id -> (Int, Int, Int, LayoutMode) getPosition layout cid name = @@ -459,10 +473,13 @@ refOffset :: Monad m => ContractMap -> Ref k -> ActT m (EVM.Expr EVM.EWord, EVM. refOffset _ (CVar _ _ _) = error "Internal error: ill-typed entry" refOffset _ (SVar _ cid name) = do layout <- getLayout - let (slot, off, size, layoutMode) = getPosition layout cid name + let (slot, off, size, layoutMode) = getPosition layout cid name pure (EVM.Lit (fromIntegral slot), EVM.Lit $ fromIntegral off, size, layoutMode) refOffset cmap (SMapping _ ref typ ixs) = do (slot, _, _, layoutMode) <- refOffset cmap ref + let size = case layoutMode of + SolidityLayout -> sizeOfValue typ + VyperLayout -> 32 addr <- foldM (\slot' i -> do buf <- typedExpToBuf cmap i let concatenation = @@ -470,10 +487,10 @@ refOffset cmap (SMapping _ ref typ ixs) = do SolidityLayout -> buf <> (wordToBuf slot') VyperLayout -> (wordToBuf slot') <> buf pure (EVM.keccak concatenation)) slot ixs - pure (addr, EVM.Lit 0, sizeOfValue typ, layoutMode) + pure (addr, EVM.Lit 0, size, layoutMode) refOffset _ (SField _ _ cid name) = do layout <- getLayout - let (slot, off, size, layoutMode) = getPosition layout cid name + let (slot, off, size, layoutMode) = getPosition layout cid name pure (EVM.Lit (fromIntegral slot), EVM.Lit $ fromIntegral off, size, layoutMode) refOffset _ (SArray _ _ _ _) = error "TODO" @@ -669,6 +686,7 @@ inRange :: AbiType -> Exp AInteger -> Exp ABoolean -- if the type has the type of machine word then check per operation inRange (AbiUIntType 256) e = checkOp e inRange (AbiIntType 256) _ = error "TODO signed integers" +-- otherwise insert range bounds inRange t e = bound t e @@ -727,7 +745,7 @@ getInitContractState solvers iface pointers preconds cmap = do let addr = EVM.SymAddr $ T.pack x codemap <- getCodemap case M.lookup cid codemap of - Just (Contract layoutMode (Constructor _ iface' pointers' preconds' _ _ upds) _, _, bytecode) -> do + Just (Contract (Constructor _ iface' pointers' preconds' _ _ upds) _, _, bytecode) -> do (icmap, check) <- getInitContractState solvers iface' pointers' preconds' M.empty let contract = EVM.C { EVM.code = EVM.RuntimeCode (EVM.ConcreteRuntimeCode bytecode) , EVM.storage = EVM.ConcreteStore mempty @@ -736,7 +754,7 @@ getInitContractState solvers iface pointers preconds cmap = do , EVM.nonce = Just 1 } let icmap' = M.insert addr (contract, cid) icmap - cmap' <- localCaddr addr $ applyUpdates layoutMode icmap' icmap' upds + cmap' <- localCaddr addr $ applyUpdates icmap' icmap' upds pure (abstractCmap addr cmap', check) Nothing -> error $ "Internal error: Contract " <> cid <> " not found\n" <> show codemap getContractState [] = error "Internal error: Cast cannot be empty" @@ -780,45 +798,36 @@ comb :: Show a => [a] -> [(a,a)] comb xs = [(x,y) | (x:ys) <- tails xs, y <- ys] checkConstructors :: App m => SolverGroup -> ByteString -> ByteString -> Contract -> ActT m (Error String ContractMap) -checkConstructors solvers initcode runtimecode (Contract layoutMode ctor@(Constructor _ iface pointers preconds _ _ _) _) = do +checkConstructors solvers initcode runtimecode (Contract ctor@(Constructor _ iface pointers preconds _ _ _) _) = do -- Construct the initial contract state (actinitmap, checks) <- getInitContractState solvers iface pointers preconds M.empty let hevminitmap = translateCmap actinitmap -- Translate Act constructor to Expr fresh <- getFresh - (actbehvs, calldata, sig, cmap) <- translateConstructor runtimecode layoutMode ctor actinitmap + (actbehvs, calldata, sig, cmap, bounds) <- translateConstructor runtimecode ctor actinitmap -- Symbolically execute bytecode -- TODO check if contrainsts about preexistsing fresh symbolic addresses are necessary - solbehvs <- lift $ removeFails <$> getInitcodeBranches solvers initcode hevminitmap calldata [] fresh + solbehvs <- lift $ removeFails <$> getInitcodeBranches solvers initcode hevminitmap calldata bounds fresh -- Check equivalence lift $ showMsg "\x1b[1mChecking if constructor results are equivalent.\x1b[m" res1 <- lift $ checkResult calldata (Just sig) =<< checkEquiv solvers solbehvs actbehvs lift $ showMsg "\x1b[1mChecking if constructor input spaces are the same.\x1b[m" - res2 <- lift $ checkResult calldata (Just sig) =<< checkInputSpaces solvers - solbehvs actbehvs + res2 <- lift $ checkResult calldata (Just sig) =<< checkInputSpaces solvers solbehvs actbehvs pure $ checks *> res1 *> res2 *> Success cmap where removeFails branches = filter isSuccess branches -localStorageBounds :: forall m . App m => Constructor -> ContractMap -> ActT m [EVM.Prop] -localStorageBounds (Constructor _ _ _ _ _ _ initState) contractMap = do - mapM (toProp contractMap) $ concatMap updateBound initState - where - updateBound :: StorageUpdate -> [Exp ABoolean] - updateBound (Update SInteger item@(Item _ (PrimitiveType at) _) _) = [bound at (VarRef nowhere Pre SStorage item)] - updateBound _ = [] checkBehaviours :: forall m. App m => SolverGroup -> Contract -> ContractMap -> ActT m (Error String ()) -checkBehaviours solvers (Contract layoutMode constr behvs) actstorage = do +checkBehaviours solvers (Contract _ behvs) actstorage = do let hevmstorage = translateCmap actstorage fresh <- getFresh - actbehvs <- translateBehvs actstorage layoutMode behvs - (fmap $ concatError def) $ forM actbehvs $ \(name,actbehv,calldata, sig) -> do - let (behvs', fcmaps) = unzip actbehv + actbehvs <- translateBehvs actstorage behvs + (fmap $ concatError def) $ forM actbehvs $ \(name,actbehv,calldata,sig) -> do + let (behvs', fcmaps, bounds) = unzip3 actbehv - localBounds <- localStorageBounds constr actstorage - solbehvs <- lift $ removeFails <$> getRuntimeBranches solvers hevmstorage calldata localBounds fresh + solbehvs <- lift $ removeFails <$> getRuntimeBranches solvers hevmstorage calldata (concat bounds) fresh lift $ showMsg $ "\x1b[1mChecking behavior \x1b[4m" <> name <> "\x1b[m of Act\x1b[m" -- equivalence check @@ -827,7 +836,6 @@ checkBehaviours solvers (Contract layoutMode constr behvs) actstorage = do -- input space exhaustiveness check lift $ showMsg "\x1b[1mChecking if the input spaces are the same\x1b[m" res2 <- lift $ checkResult calldata (Just sig) =<< checkInputSpaces solvers solbehvs behvs' - --(trace (showBehvs solbehvs) solbehvs) (trace (showBehvs behvs') behvs') pure $ traverse_ (checkStoreIsomorphism actstorage) fcmaps *> res1 *> res2 where @@ -917,7 +925,7 @@ pruneContractState entryaddr cmap = -- | Check if two contract maps are isomorphic -- Perform a breadth first traversal and try to find a bijection between the addresses of the two stores --- Note that is problem is not as difficult as graph isomorphism since edges are labeld. +-- Note that this problem is not as difficult as graph isomorphism since edges are labeld. -- Assumes that the stores are abstracted, pruned, and simplified. -- All writes are to a unique concrete slot and the value is a simbolic address. checkStoreIsomorphism :: ContractMap -> ContractMap -> Error String () @@ -977,7 +985,7 @@ inputSpace exprs = map aux exprs -- | Check whether two lists of behaviours cover exactly the same input space checkInputSpaces :: App m => SolverGroup -> [EVM.Expr EVM.End] -> [EVM.Expr EVM.End] -> m [EquivResult] checkInputSpaces solvers l1 l2 = do - let p1 = inputSpace l1 --trace (show(l1) <> " and " <> show(l2)) $ inputSpace l1 + let p1 = inputSpace l1 let p2 = inputSpace l2 conf <- readConfig @@ -1013,7 +1021,7 @@ checkAbi solver contract cmap = do where actSig (Behaviour _ _ iface _ _ _ _ _ _) = T.pack $ makeIface iface - actSigs (Contract _ _ behvs) = actSig <$> behvs + actSigs (Contract _ behvs) = actSig <$> behvs checkBehv :: [EVM.Prop] -> EVM.Expr EVM.End -> [EVM.Prop] checkBehv assertions (EVM.Success cnstr _ _ _) = assertions <> cnstr @@ -1024,9 +1032,9 @@ checkAbi solver contract cmap = do msg = "\x1b[1mThe following function selector results in behaviors not covered by the Act spec:\x1b[m" -checkContracts :: forall m. App m => SolverGroup -> Store -> M.Map Id (Contract, BS.ByteString, BS.ByteString) -> m (Error String ()) -checkContracts solvers store codemap = - let actenv = ActEnv codemap 0 (slotMap store) (EVM.SymAddr "entrypoint") Nothing in +checkContracts :: forall m. App m => SolverGroup -> Store -> M.Map Id LayoutMode -> M.Map Id (Contract, BS.ByteString, BS.ByteString) -> m (Error String ()) +checkContracts solvers store layoutmap codemap = + let actenv = ActEnv codemap 0 (slotMap store layoutmap) (EVM.SymAddr "entrypoint") Nothing in fmap (concatError def) $ forM (M.toList codemap) (\(_, (contract, initcode, bytecode)) -> do showMsg $ "\x1b[1mChecking contract \x1b[4m" <> nameOfContract contract <> "\x1b[m" (res, actenv') <- flip runStateT actenv $ checkConstructors solvers initcode bytecode contract @@ -1071,7 +1079,6 @@ toVRes msg res = case res of EVM.Qed -> EVM.Qed EVM.Error e -> EVM.Error e - checkResult :: App m => Calldata -> Maybe Sig -> [EquivResult] -> m (Error String ()) checkResult calldata sig res = case any EVM.isCex res of diff --git a/src/Act/Lex.x b/src/Act/Lex.x index ed524489..b33f827d 100644 --- a/src/Act/Lex.x +++ b/src/Act/Lex.x @@ -58,9 +58,6 @@ tokens :- pre { mk PRE } post { mk POST } - -- pragmas - layout { mk LAYOUT } - -- builtin types uint $digit+ { \ p s -> L (UINT (read (drop 4 s))) p } int $digit+ { \ p s -> L (INT (read (drop 3 s))) p } @@ -117,7 +114,6 @@ tokens :- "_" { mk SCORE } "." { mk DOT } "," { mk COMMA } - "#" { mk HASHTAG } "//" [.]* ; -- Toss single line comments -- identifiers $ident ($ident | $digit)* { \ p s -> L (ID s) p } @@ -161,9 +157,6 @@ data LEX = | PRE | POST - -- pragmas - | LAYOUT - -- builtin types | UINT Int | INT Int @@ -216,7 +209,6 @@ data LEX = | SCORE | DOT | COMMA - | HASHTAG -- identifiers | ID String diff --git a/src/Act/Parse.y b/src/Act/Parse.y index f80bf545..6351fbde 100644 --- a/src/Act/Parse.y +++ b/src/Act/Parse.y @@ -47,9 +47,6 @@ import Act.Error 'pre' { L PRE _ } 'post' { L POST _ } - -- pragmas - 'layout' { L LAYOUT _ } - -- builtin types 'uint' { L (UINT $$) _ } 'int' { L (INT $$) _ } @@ -104,7 +101,6 @@ import Act.Error '_' { L SCORE _ } '.' { L DOT _ } ',' { L COMMA _ } - '#' { L HASHTAG _ } id { L (ID _) _ } @@ -178,17 +174,14 @@ Transition : 'behaviour' id 'of' id Ensures { Transition (posn $1) (name $2) (name $4) $5 $6 $7 $8 $9 } -Constructor : list(Pragma) - 'constructor' 'of' id +Constructor : 'constructor' 'of' id CInterface Pointers Precondition Creation Ensures - Invariants { Constructor (posn $4) (name $4) - $1 $5 $6 $7 $8 $9 $10 } - -Pragma : '#' 'layout' id { LayoutMode (posn $1) (name $3) } + Invariants { Constructor (posn $3) (name $3) + $4 $5 $6 $7 $8 $9 } Ensures : optblock('ensures', Expr) { $1 } @@ -340,6 +333,6 @@ parseError ((L token pn):_) = show token]) emptyConstructor :: Transition -> Constructor -emptyConstructor (Transition _ _ c _ _ _ _ _) = Constructor nowhere c [] ( Interface "constructor" []) [] [] (Creates []) [] [] +emptyConstructor (Transition _ _ c _ _ _ _ _) = Constructor nowhere c (Interface "constructor" []) [] [] (Creates []) [] [] } diff --git a/src/Act/Print.hs b/src/Act/Print.hs index ee00aa95..f6f3ed5a 100644 --- a/src/Act/Print.hs +++ b/src/Act/Print.hs @@ -28,7 +28,7 @@ prettyStore :: Store -> String prettyStore = show prettyContract :: Contract t -> String -prettyContract (Contract _ ctor behvs) = unlines $ intersperse "\n" $ (prettyCtor ctor):(fmap prettyBehaviour behvs) +prettyContract (Contract ctor behvs) = unlines $ intersperse "\n" $ (prettyCtor ctor):(fmap prettyBehaviour behvs) prettyCtor :: Constructor t -> String prettyCtor (Constructor name interface ptrs pres posts invs initStore) diff --git a/src/Act/SMT.hs b/src/Act/SMT.hs index 669ce465..028fb24d 100644 --- a/src/Act/SMT.hs +++ b/src/Act/SMT.hs @@ -228,7 +228,7 @@ mkDefaultSMT isCtor activeSLocs activeCLocs envs ifaceName decls preconds extrac mkPostconditionQueries :: Act -> [Query] mkPostconditionQueries (Act _ contr) = concatMap mkPostconditionQueriesContract contr where - mkPostconditionQueriesContract (Contract _ constr behvs) = + mkPostconditionQueriesContract (Contract constr behvs) = mkPostconditionQueriesConstr constr <> concatMap mkPostconditionQueriesBehv behvs mkPostconditionQueriesBehv :: Behaviour -> [Query] @@ -274,7 +274,7 @@ mkInvariantQueries (Act _ contracts) = fmap mkQuery gathered mkQuery (inv, ctor, behvs) = Inv inv (mkInit inv ctor) (fmap (mkBehv inv ctor) behvs) gathered = concatMap getInvariants contracts - getInvariants (Contract _ (c@Constructor{..}) behvs) = fmap (, c, behvs) _invariants + getInvariants (Contract (c@Constructor{..}) behvs) = fmap (, c, behvs) _invariants mkInit :: Invariant -> Constructor -> (Constructor, SMTExp) mkInit (Invariant _ invConds _ (PredTimed _ invPost)) ctor@(Constructor _ (Interface ifaceName decls) _ preconds _ _ initialStorage) = (ctor, mksmt invPost) @@ -373,6 +373,12 @@ solverArgs (SMTConfig solver timeout _) = case solver of , "--print-success" , "--arrays-exp" , "--tlimit-per=" <> show timeout] + Bitwuzla -> + [ "--lang=smt2" + , "--produce-models" + , "--time-limit-per=" <> show timeout + , "--bv-solver=preprop" + ] _ -> error "Unsupported solver" -- | Spawns a solver instance, and sets the various global config options that we use for our queries diff --git a/src/Act/Syntax.hs b/src/Act/Syntax.hs index cb6eede5..47408560 100644 --- a/src/Act/Syntax.hs +++ b/src/Act/Syntax.hs @@ -59,16 +59,16 @@ locsFromConstrInvariant (Invariant _ pre _ (PredTimed _ predpost)) = ------------------------------------ nameOfContract :: Contract t -> Id -nameOfContract (Contract _ (Constructor cname _ _ _ _ _ _) _) = cname +nameOfContract (Contract (Constructor cname _ _ _ _ _ _) _) = cname behvsFromAct :: Typed.Act t -> [Behaviour t] behvsFromAct (Act _ contracts) = behvsFromContracts contracts behvsFromContracts :: [Contract t] -> [Behaviour t] -behvsFromContracts contracts = concatMap (\(Contract _ _ b) -> b) contracts +behvsFromContracts contracts = concatMap (\(Contract _ b) -> b) contracts constrFromContracts :: [Contract t] -> [Constructor t] -constrFromContracts contracts = fmap (\(Contract _ c _) -> c) contracts +constrFromContracts contracts = fmap (\(Contract c _) -> c) contracts isLocalLoc :: Location t -> Bool isLocalLoc (Loc _ SStorage item) = isLocalItem item @@ -193,7 +193,7 @@ createsFromTypedExp :: TypedExp t -> [Id] createsFromTypedExp (TExp _ _ e) = createsFromExp e createsFromContract :: Contract t -> [Id] -createsFromContract (Contract _ constr behvs) = +createsFromContract (Contract constr behvs) = createsFromConstructor constr <> concatMap createsFromBehaviour behvs createsFromConstructor :: Constructor t -> [Id] @@ -224,7 +224,7 @@ createsFromBehaviour (Behaviour _ _ _ _ _ preconds postconds rewrites returns) = pointersFromContract :: Contract t -> [Id] -pointersFromContract (Contract _ constr behvs) = +pointersFromContract (Contract constr behvs) = nub $ pointersFromConstructor constr <> concatMap pointersFromBehaviour behvs pointersFromConstructor :: Constructor t -> [Id] diff --git a/src/Act/Syntax/Typed.hs b/src/Act/Syntax/Typed.hs index 2ce4b552..c7caa29a 100644 --- a/src/Act/Syntax/Typed.hs +++ b/src/Act/Syntax/Typed.hs @@ -41,7 +41,6 @@ import Data.ByteString (ByteString) import qualified Data.ByteString as BS import Data.List (genericTake,genericDrop) import Data.Map.Strict (Map) -import qualified Data.Map.Strict as StrictMap (map) import Data.String (fromString) import Data.Text (pack) import Data.Vector (fromList) @@ -60,12 +59,12 @@ import Act.Syntax.Untyped as Act.Syntax.Typed (Id, Pn, Interface(..), EthEnv(..) data Act t = Act Store [Contract t] deriving (Show, Eq) -data Contract t = Contract LayoutMode (Constructor t) [Behaviour t] +data Contract t = Contract (Constructor t) [Behaviour t] deriving (Show, Eq) -- For each contract, it stores the type of a storage variables and -- the order in which they are declared -type Store = Map Id (LayoutMode, (Map Id (SlotType, Integer))) +type Store = Map Id (Map Id (SlotType, Integer)) -- | Represents a contract level invariant. The invariant is defined in the @@ -103,9 +102,6 @@ data Constructor t = Constructor , _initialStorage :: [StorageUpdate t] } deriving (Show, Eq) -data LayoutMode = SolidityLayout | VyperLayout - deriving (Show, Eq) - -- After typing each behavior may be split to multiple behaviors, one for each case branch. -- In this case, only the `_caseconditions`, `_stateUpdates`, and `_returns` fields are different. data Behaviour t = Behaviour @@ -153,7 +149,7 @@ type instance Sing = SRefKind instance Show (SRefKind a) where show = \case - SStorage -> "SSTorage" + SStorage -> "SStorage" SCalldata -> "SCalldata" instance TestEquality SRefKind where @@ -413,13 +409,13 @@ instance ToJSON (Act t) where , "contracts" .= toJSON contracts ] instance ToJSON (Contract t) where - toJSON (Contract _ ctor behv) = object [ "kind" .= String "Contract" + toJSON (Contract ctor behv) = object [ "kind" .= String "Contract" , "constructor" .= toJSON ctor , "behaviours" .= toJSON behv ] storeJSON :: Store -> Value storeJSON storages = object [ "kind" .= String "Storages" - , "storages" .= toJSON (StrictMap.map snd storages)] + , "storages" .= toJSON storages] instance ToJSON (Constructor t) where toJSON Constructor{..} = object [ "kind" .= String "Constructor" diff --git a/src/Act/Syntax/TypedExplicit.hs b/src/Act/Syntax/TypedExplicit.hs index dfa02504..4bcfefcd 100644 --- a/src/Act/Syntax/TypedExplicit.hs +++ b/src/Act/Syntax/TypedExplicit.hs @@ -39,7 +39,7 @@ instance Annotatable Typed.Act where annotate (Typed.Act store act) = Typed.Act store $ fmap annotate act instance Annotatable Typed.Contract where - annotate (Typed.Contract layout ctor behv) = Typed.Contract layout (annotate ctor) (fmap annotate behv) + annotate (Typed.Contract ctor behv) = Typed.Contract (annotate ctor) (fmap annotate behv) instance Annotatable Typed.Invariant where annotate inv@Invariant{..} = inv diff --git a/src/Act/Syntax/Untyped.hs b/src/Act/Syntax/Untyped.hs index 05e478fd..1234c374 100644 --- a/src/Act/Syntax/Untyped.hs +++ b/src/Act/Syntax/Untyped.hs @@ -22,15 +22,12 @@ newtype Act = Main [Contract] data Contract = Contract Constructor [Transition] deriving (Eq, Show) -data Constructor = Constructor Pn Id [Pragma] Interface [Pointer] Iff Creates Ensures Invariants +data Constructor = Constructor Pn Id Interface [Pointer] Iff Creates Ensures Invariants deriving (Eq, Show) data Transition = Transition Pn Id Id Interface [Pointer] Iff Cases Ensures deriving (Eq, Show) -data Pragma = LayoutMode Pn String - deriving (Eq, Show) - type Iff = [Expr] type Ensures = [Expr] diff --git a/src/Act/Type.hs b/src/Act/Type.hs index 1690e7dc..c5864c9e 100644 --- a/src/Act/Type.hs +++ b/src/Act/Type.hs @@ -56,7 +56,7 @@ typecheck' (U.Main contracts) = Act store <$> traverse (checkContract store cons <* noDuplicateContracts <* noDuplicateBehaviourNames <* noDuplicateInterfaces - <* traverse noDuplicateVars [creates | U.Contract (U.Constructor _ _ _ _ _ _ creates _ _) _ <- contracts] + <* traverse noDuplicateVars [creates | U.Contract (U.Constructor _ _ _ _ _ creates _ _) _ <- contracts] where store = lookupVars contracts constructors = lookupConstructors contracts @@ -64,7 +64,7 @@ typecheck' (U.Main contracts) = Act store <$> traverse (checkContract store cons transitions = concatMap (\(U.Contract _ ts) -> ts) contracts noDuplicateContracts :: Err () - noDuplicateContracts = noDuplicates [(pn,contract) | U.Contract (U.Constructor pn contract _ _ _ _ _ _ _) _ <- contracts] + noDuplicateContracts = noDuplicates [(pn,contract) | U.Contract (U.Constructor pn contract _ _ _ _ _ _) _ <- contracts] $ \c -> "Multiple definitions of Contract " <> c noDuplicateVars :: U.Creates -> Err () @@ -129,37 +129,24 @@ topologicalSort (Act store contracts) = -- map a contract name to the list of contracts that it calls and its code findCreates :: Contract -> (Id, ([Id], Contract)) - findCreates c@(Contract _ (Constructor cname _ _ _ _ _ _) _) = (cname, (createsFromContract c <> pointersFromContract c, c)) + findCreates c@(Contract (Constructor cname _ _ _ _ _ _) _) = (cname, (createsFromContract c <> pointersFromContract c, c)) --- Finds storage declarations from constructors lookupVars :: [U.Contract] -> Store lookupVars = foldMap $ \case - U.Contract (U.Constructor _ contract pragmas _ _ _ (U.Creates assigns) _ _) _ -> - Map.singleton contract . (checkLayout pragmas, ) . Map.fromList $ addSlot $ snd . fromAssign <$> assigns + U.Contract (U.Constructor _ contract _ _ _ (U.Creates assigns) _ _) _ -> + Map.singleton contract . Map.fromList $ addSlot $ snd . fromAssign <$> assigns where addSlot :: [(Id, SlotType)] -> [(Id, (SlotType, Integer))] addSlot l = zipWith (\(name, typ) slot -> (name, (typ, slot))) l [0..] - checkLayout :: [U.Pragma] -> LayoutMode - checkLayout pragmas = let layouts = filter isLayout pragmas in - case layouts of - [] -> SolidityLayout - [l] -> getLayout l - (U.LayoutMode pn _):_ -> error $ (show pn) <> "Multiple layout pragmas" - where - isLayout (U.LayoutMode _ _) = True - - getLayout (U.LayoutMode _ "Vyper") = VyperLayout - getLayout (U.LayoutMode _ "Solidity") = SolidityLayout - getLayout (U.LayoutMode pn s) = error $ (show pn) <> ": unknown layout: " <> s - -- | A map containing the interfaces of all available constructors together with pointer constraints type Constructors = Map Id [(AbiType, Maybe Id)] -- | Construct the constructor map for the given spec lookupConstructors :: [U.Contract] -> Constructors lookupConstructors = foldMap $ \case - U.Contract (U.Constructor _ contract _ (Interface _ decls) pointers _ _ _ _) _ -> + U.Contract (U.Constructor _ contract (Interface _ decls) pointers _ _ _ _) _ -> let ptrs = Map.fromList $ map (\(PointsTo _ x c) -> (x, c)) pointers in Map.singleton contract (map (\(Decl t x) -> (t, Map.lookup x ptrs)) decls) @@ -203,7 +190,7 @@ globalEnv = mkEnv :: Id -> Store -> Constructors -> Env mkEnv contract store constructors = Env { contract = contract - , store = Map.map fst $ snd $ fromMaybe (SolidityLayout,mempty) (Map.lookup contract store) + , store = Map.map fst $ fromMaybe mempty (Map.lookup contract store) , theirs = store , calldata = mempty , pointers = mempty @@ -224,8 +211,8 @@ addPointers decls env = env{ pointers = ptrs } -- Type check a contract checkContract :: Store -> Constructors -> U.Contract -> Err Contract -checkContract store constructors (U.Contract constr@(U.Constructor cpn cid pragmas _ _ _ _ _ _) trans) = - Contract <$> checkLayout <*> checkConstructor env constr <*> (concat <$> traverse (checkBehavior env) trans) <* namesConsistent +checkContract store constructors (U.Contract constr@(U.Constructor _ cid _ _ _ _ _ _) trans) = + Contract <$> checkConstructor env constr <*> (concat <$> traverse (checkBehavior env) trans) <* namesConsistent where env :: Env env = mkEnv cid store constructors @@ -236,19 +223,6 @@ checkContract store constructors (U.Contract constr@(U.Constructor cpn cid pragm errmsg pn cid' = (pn, "Behavior must belong to contract " <> show cid <> " but belongs to contract " <> cid') - checkLayout :: Err LayoutMode - checkLayout = let layouts = filter isLayout pragmas in - case layouts of - [] -> Success SolidityLayout - [l] -> getLayout l - _ -> throw (cpn, "Multiple layout pragmas") - where - isLayout (U.LayoutMode _ _) = True - - getLayout (U.LayoutMode _ "Vyper") = Success VyperLayout - getLayout (U.LayoutMode _ "Solidity") = Success SolidityLayout - getLayout (U.LayoutMode pn s) = throw (pn, "Unknown layout: " <> s) - -- Type check a behavior checkBehavior :: Env -> U.Transition -> Err [Behaviour] @@ -284,9 +258,8 @@ checkBehavior env (U.Transition _ name contract iface@(Interface _ decls) ptrs i makeBehv pres posts' (casecond,storage,ret) = Behaviour name contract iface ptrs pres casecond posts' storage ret checkConstructor :: Env -> U.Constructor -> Err Constructor -checkConstructor env (U.Constructor _ contract _ (Interface _ decls) ptrs iffs (U.Creates assigns) postcs invs) = +checkConstructor env (U.Constructor _ contract (Interface _ decls) ptrs iffs (U.Creates assigns) postcs invs) = do - --layout <- checkLayout traverse_ (checkPointer env') ptrs stateUpdates <- concat <$> traverse (checkAssign env') assigns iffs' <- checkIffs envNoStorage iffs @@ -299,19 +272,6 @@ checkConstructor env (U.Constructor _ contract _ (Interface _ decls) ptrs iffs ( -- type checking environment prior to storage creation of this contract envNoStorage = env'{ store = mempty } - --checkLayout :: Err LayoutMode - --checkLayout = let layouts = filter isLayout pragmas in - -- case layouts of - -- [] -> Success SolidityLayout - -- [l] -> getLayout l - -- _ -> throw (pn, "Multiple layout pragmas") - -- where - -- isLayout (U.LayoutMode _) = True - -- - -- getLayout (U.LayoutMode "Vyper") = Success VyperLayout - -- getLayout (U.LayoutMode "Solidity") = Success SolidityLayout - -- getLayout (U.LayoutMode s) = throw (pn, "Unknown layout: " <> s) - -- | Checks that a pointer declaration x |-> A is valid. This consists of -- checking that x is a calldata variable that has address type and A is a valid -- contract type. @@ -422,7 +382,7 @@ checkEntry env kind (U.EIndexed p e args) = checkEntry env@Env{theirs} kind (U.EField p e x) = checkEntry env kind e `bindValidation` \(_, oc, ref) -> case oc of Just c -> case Map.lookup c theirs of - Just cenv -> case Map.lookup x (snd cenv) of + Just cenv -> case Map.lookup x cenv of Just (st@(StorageValue (ContractType c')), _) -> pure (st, Just c', SField p ref c x) Just (st, _) -> pure (st, Nothing, SField p ref c x) Nothing -> throw (p, "Contract " <> c <> " does not have field " <> x) diff --git a/tests/frontend/pass/array/array.act.typed.json b/tests/frontend/pass/array/array.act.typed.json index e02f718e..80dbd60f 100644 --- a/tests/frontend/pass/array/array.act.typed.json +++ b/tests/frontend/pass/array/array.act.typed.json @@ -31,7 +31,100 @@ "name": "f", "pointers": [], "postConditions": [], - "preConditions": [], + "preConditions": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "type": "Address" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "xs" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "type": "Address" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "xs" + } + }, + "type": "int" + } + }, + { + "literal": "1461501637330902918203684832716283019655932542975", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], "returns": { "expression": { "timing": "Pre", diff --git a/tests/frontend/pass/array/array_composite_post.act.typed.json b/tests/frontend/pass/array/array_composite_post.act.typed.json index d99ccdd1..667dc48d 100644 --- a/tests/frontend/pass/array/array_composite_post.act.typed.json +++ b/tests/frontend/pass/array/array_composite_post.act.typed.json @@ -1492,6 +1492,602 @@ ], "arity": 2, "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "size": "256", + "type": "UInt" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "a" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "size": "256", + "type": "UInt" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "a" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "size": "256", + "type": "UInt" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "a" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "size": "256", + "type": "UInt" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "a" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" } ], "returns": null, @@ -1719,7 +2315,416 @@ "invariants": [], "kind": "Constructor", "pointers": [], - "postConditions": [], + "postConditions": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], "preConditions": [] }, "kind": "Contract" diff --git a/tests/frontend/pass/array/array_exp_rewrite.act.typed.json b/tests/frontend/pass/array/array_exp_rewrite.act.typed.json index b93c6047..aa9e7518 100644 --- a/tests/frontend/pass/array/array_exp_rewrite.act.typed.json +++ b/tests/frontend/pass/array/array_exp_rewrite.act.typed.json @@ -18,296 +18,6647 @@ "kind": "Behaviour", "name": "f", "pointers": [], - "postConditions": [], - "preConditions": [], - "returns": null, - "stateUpdates": [ + "postConditions": [ { - "location": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "1", - "type": "int" + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } }, - "kind": "TypedExpr", "type": "int" - }, - 2 - ] + } + } ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "x" - } + "arity": 2, + "symbol": "<=" }, - "type": "int array array" - }, - "value": { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "0", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } }, - 1 - ], - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } }, - 2 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "y" + "type": "int" + } } - }, - "type": "int array array" + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" } - } - } - ] - } - ], - "constructor": { - "contract": "A", - "initialStorage": [ - { - "location": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int array array array" + ], + "arity": 2, + "symbol": "and" }, - "value": { + { "args": [ { "args": [ { - "args": [ - { - "literal": "0", - "type": "int" + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } }, - { - "literal": "0", - "type": "int" + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } }, - { - "literal": "0", - "type": "int" + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], + "preConditions": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], + "returns": null, + "stateUpdates": [ + { + "location": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int array array" + }, + "value": { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int array array" + } + } + } + ] + } + ], + "constructor": { + "contract": "A", + "initialStorage": [ + { + "location": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "x" + }, + "type": "int array array array" + }, + "value": { + "args": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + } + }, + { + "location": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "y" + }, + "type": "int array array array array" + }, + "value": { + "args": [ + { + "args": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + } + ], + "arity": 1, + "symbol": "[]" + } + } + ], + "interface": { + "args": [], + "id": "\"A\"", + "kind": "Interface" + }, + "invariants": [], + "kind": "Constructor", + "pointers": [], + "postConditions": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" } - ], - "arity": 3, - "symbol": "[]" - }, - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" } - ], - "arity": 3, - "symbol": "[]" + }, + "type": "int" } - ], - "arity": 2, - "symbol": "[]" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" } - ], - "arity": 3, - "symbol": "[]" - }, - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" } - ], - "arity": 3, - "symbol": "[]" + }, + "type": "int" } - ], - "arity": 2, - "symbol": "[]" - } - ], - "arity": 2, - "symbol": "[]" - } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" }, { - "location": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int array array array array" - }, - "value": { - "args": [ - { - "args": [ - { - "args": [ - { - "args": [ + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ { - "literal": "0", + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", "type": "int" }, + 1 + ], + [ { - "literal": "0", + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", "type": "int" }, + 2 + ], + [ { - "literal": "0", + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", "type": "int" - } + }, + 2 ], - "arity": 3, - "symbol": "[]" - }, - { - "args": [ + [ { - "literal": "0", + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", "type": "int" }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ { - "literal": "0", + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", "type": "int" }, + 1 + ], + [ { - "literal": "0", + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", "type": "int" - } + }, + 2 ], - "arity": 3, - "symbol": "[]" + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" } - ], - "arity": 2, - "symbol": "[]" - }, - { - "args": [ - { - "args": [ + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ { - "literal": "0", + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", "type": "int" }, + 1 + ], + [ { - "literal": "0", + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", "type": "int" }, + 2 + ], + [ { - "literal": "0", + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", "type": "int" - } + }, + 2 ], - "arity": 3, - "symbol": "[]" - }, - { - "args": [ + [ { - "literal": "0", + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", "type": "int" }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ { - "literal": "0", + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", "type": "int" }, + 1 + ], + [ { - "literal": "0", + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", "type": "int" - } + }, + 2 ], - "arity": 3, - "symbol": "[]" + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" } - ], - "arity": 2, - "symbol": "[]" + }, + "type": "int" } - ], - "arity": 2, - "symbol": "[]" - } - ], - "arity": 1, - "symbol": "[]" - } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" } ], - "interface": { - "args": [], - "id": "\"A\"", - "kind": "Interface" - }, - "invariants": [], - "kind": "Constructor", - "pointers": [], - "postConditions": [], "preConditions": [] }, "kind": "Contract" diff --git a/tests/frontend/pass/array/array_post.act.typed.json b/tests/frontend/pass/array/array_post.act.typed.json index d6ae61ab..0c678190 100644 --- a/tests/frontend/pass/array/array_post.act.typed.json +++ b/tests/frontend/pass/array/array_post.act.typed.json @@ -790,6 +790,246 @@ "arity": 2, "symbol": "and" }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, { "args": [ { @@ -1006,7 +1246,248 @@ "invariants": [], "kind": "Constructor", "pointers": [], - "postConditions": [], + "postConditions": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], "preConditions": [] }, "kind": "Contract" diff --git a/tests/frontend/pass/array/array_update.act.typed.json b/tests/frontend/pass/array/array_update.act.typed.json index fb16c6eb..a31ecea9 100644 --- a/tests/frontend/pass/array/array_update.act.typed.json +++ b/tests/frontend/pass/array/array_update.act.typed.json @@ -122,70 +122,130 @@ ], "arity": 2, "symbol": "=/=" - } - ], - "preConditions": [ + }, { "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "literal": "0", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 2 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "y" - } - }, - "type": "int array" - } - }, { "args": [ { - "literal": "1", + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", "type": "int" }, { - "literal": "2", - "type": "int" + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } }, { - "literal": "3", + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", "type": "int" } ], - "arity": 3, - "symbol": "[]" + "arity": 2, + "symbol": "<=" } ], "arity": 2, - "symbol": "==" + "symbol": "and" }, { "args": [ @@ -196,14 +256,14 @@ "type": "int" }, { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ [ { "expression": { - "literal": "1", + "literal": "0", "type": "int" }, "kind": "TypedExpr", @@ -225,7 +285,7 @@ [ { "expression": { - "literal": "0", + "literal": "1", "type": "int" }, "kind": "TypedExpr", @@ -251,14 +311,14 @@ { "args": [ { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ [ { "expression": { - "literal": "1", + "literal": "0", "type": "int" }, "kind": "TypedExpr", @@ -280,7 +340,7 @@ [ { "expression": { - "literal": "0", + "literal": "1", "type": "int" }, "kind": "TypedExpr", @@ -310,319 +370,6080 @@ ], "arity": 2, "symbol": "and" - } - ], - "returns": null, - "stateUpdates": [ + }, { - "location": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "0", - "type": "int" + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } }, - "kind": "TypedExpr", "type": "int" - }, - 3 - ] + } + } ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "y" - } + "arity": 2, + "symbol": "<=" }, - "type": "int array array" - }, - "value": { - "args": [ - { - "args": [ - { - "literal": "1", - "type": "int" - }, - { - "literal": "2", - "type": "int" - }, - { - "literal": "3", + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, "type": "int" } - ], - "arity": 3, - "symbol": "[]" + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], + "preConditions": [ + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int array" + } + }, + { + "args": [ + { + "literal": "1", + "type": "int" + }, + { + "literal": "2", + "type": "int" + }, + { + "literal": "3", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "==" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], + "returns": null, + "stateUpdates": [ + { + "location": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int array array" + }, + "value": { + "args": [ + { + "args": [ + { + "literal": "1", + "type": "int" + }, + { + "literal": "2", + "type": "int" + }, + { + "literal": "3", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "4", + "type": "int" + }, + { + "literal": "5", + "type": "int" + }, + { + "literal": "6", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + } + }, + { + "location": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int array" + }, + "value": { + "args": [ + { + "literal": "7", + "type": "int" + }, + { + "literal": "8", + "type": "int" + }, + { + "literal": "9", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + } + ] + } + ], + "constructor": { + "contract": "A", + "initialStorage": [ + { + "location": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "x" + }, + "type": "int array" + }, + "value": { + "args": [ + { + "literal": "1", + "type": "int" + }, + { + "literal": "2", + "type": "int" + }, + { + "literal": "3", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + }, + { + "location": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "y" + }, + "type": "int array array array" + }, + "value": { + "args": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + } + ], + "arity": 3, + "symbol": "[]" + } + } + ], + "interface": { + "args": [], + "id": "\"A\"", + "kind": "Interface" + }, + "invariants": [], + "kind": "Constructor", + "pointers": [], + "postConditions": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } }, { - "args": [ - { - "literal": "4", - "type": "int" + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } }, - { - "literal": "5", - "type": "int" + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } }, - { - "literal": "6", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" } ], "arity": 2, - "symbol": "[]" + "symbol": "<=" } - }, - { - "location": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } }, - 3 - ], - [ - { - "expression": { - "literal": "0", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } }, - 2 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "y" + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" } - }, - "type": "int array" + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" }, - "value": { + { "args": [ { - "literal": "7", + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", "type": "int" }, { - "literal": "8", - "type": "int" + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } }, { - "literal": "9", + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", "type": "int" } ], - "arity": 3, - "symbol": "[]" + "arity": 2, + "symbol": "<=" } - } - ] - } - ], - "constructor": { - "contract": "A", - "initialStorage": [ - { - "location": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int array" - }, - "value": { - "args": [ - { - "literal": "1", - "type": "int" - }, - { - "literal": "2", - "type": "int" - }, - { - "literal": "3", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" - } + ], + "arity": 2, + "symbol": "and" }, { - "location": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int array array array" - }, - "value": { - "args": [ - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" - }, - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" - } - ], - "arity": 2, - "symbol": "[]" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" - }, - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" } - ], - "arity": 3, - "symbol": "[]" + }, + "type": "int" } - ], - "arity": 2, - "symbol": "[]" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" - }, - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" } - ], - "arity": 3, - "symbol": "[]" + }, + "type": "int" } - ], - "arity": 2, - "symbol": "[]" - } - ], - "arity": 3, - "symbol": "[]" - } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" } ], - "interface": { - "args": [], - "id": "\"A\"", - "kind": "Interface" - }, - "invariants": [], - "kind": "Constructor", - "pointers": [], - "postConditions": [], "preConditions": [] }, "kind": "Contract" diff --git a/tests/frontend/pass/array/assignments.act.typed.json b/tests/frontend/pass/array/assignments.act.typed.json index 5e356f6e..2aff4ea0 100644 --- a/tests/frontend/pass/array/assignments.act.typed.json +++ b/tests/frontend/pass/array/assignments.act.typed.json @@ -216,7 +216,2480 @@ "invariants": [], "kind": "Constructor", "pointers": [], - "postConditions": [], + "postConditions": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], "preConditions": [] }, "kind": "Contract" diff --git a/tests/frontend/pass/array/bounds_iff.act.typed.json b/tests/frontend/pass/array/bounds_iff.act.typed.json index c352d327..1bfacd6b 100644 --- a/tests/frontend/pass/array/bounds_iff.act.typed.json +++ b/tests/frontend/pass/array/bounds_iff.act.typed.json @@ -179,54 +179,6 @@ "arity": 2, "symbol": "and" }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "contract": "B", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "B", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, { "args": [ { @@ -389,6 +341,246 @@ ], "arity": 2, "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "a" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "a" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "a" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "a" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "a" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "a" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" } ], "preConditions": [] diff --git a/tests/frontend/pass/array/bounds_postupdate.act.typed.json b/tests/frontend/pass/array/bounds_postupdate.act.typed.json index 1cdbb7df..62152da5 100644 --- a/tests/frontend/pass/array/bounds_postupdate.act.typed.json +++ b/tests/frontend/pass/array/bounds_postupdate.act.typed.json @@ -463,54 +463,6 @@ "arity": 2, "symbol": "and" }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, { "args": [ { @@ -696,6 +648,246 @@ "kind": "Constructor", "pointers": [], "postConditions": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, { "args": [ { diff --git a/tests/frontend/pass/array/bounds_preupdate.act.typed.json b/tests/frontend/pass/array/bounds_preupdate.act.typed.json index 38c560f3..a5d3882b 100644 --- a/tests/frontend/pass/array/bounds_preupdate.act.typed.json +++ b/tests/frontend/pass/array/bounds_preupdate.act.typed.json @@ -484,102 +484,6 @@ "arity": 2, "symbol": "and" }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, { "args": [ { @@ -765,6 +669,246 @@ "kind": "Constructor", "pointers": [], "postConditions": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, { "args": [ { diff --git a/tests/frontend/pass/array/composite_array_exp_rewrite.act.typed.json b/tests/frontend/pass/array/composite_array_exp_rewrite.act.typed.json index 6e740aaa..b0ddb871 100644 --- a/tests/frontend/pass/array/composite_array_exp_rewrite.act.typed.json +++ b/tests/frontend/pass/array/composite_array_exp_rewrite.act.typed.json @@ -35,206 +35,6905 @@ "kind": "Behaviour", "name": "f", "pointers": [], - "postConditions": [], - "preConditions": [], - "returns": null, - "stateUpdates": [ + "postConditions": [ { - "location": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int array array array" - }, - "value": { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "arrayType": { - "arrayType": { - "size": "256", - "type": "UInt" - }, - "size": "3", - "type": "Array" - }, - "size": "2", - "type": "Array" + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } }, - "kind": "Var", - "var": "a" - }, - "type": "int array array" + "type": "int" + } } - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" - }, - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" } - ], - "arity": 3, - "symbol": "[]" + }, + "type": "int" } - ], - "arity": 2, - "symbol": "[]" - } - ], - "arity": 2, - "symbol": "[]" - } - } - ] - } - ], - "constructor": { - "contract": "A", - "initialStorage": [ - { - "location": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int array array array" + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" }, - "value": { + { "args": [ { "args": [ { - "args": [ - { - "literal": "0", - "type": "int" + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } }, - { - "literal": "0", - "type": "int" + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" + "type": "int" + } }, { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" + "type": "int" + } } ], "arity": 2, - "symbol": "[]" + "symbol": "<=" }, { "args": [ { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" + "type": "int" + } }, { - "args": [ - { - "literal": "0", - "type": "int" + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } }, - { - "literal": "0", - "type": "int" + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" } ], "arity": 2, - "symbol": "[]" + "symbol": "<=" } ], "arity": 2, - "symbol": "[]" - } - } - ], - "interface": { - "args": [], - "id": "\"A\"", - "kind": "Interface" - }, - "invariants": [], - "kind": "Constructor", - "pointers": [], - "postConditions": [], + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], + "preConditions": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "arrayType": { + "size": "256", + "type": "UInt" + }, + "size": "3", + "type": "Array" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "a" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "arrayType": { + "size": "256", + "type": "UInt" + }, + "size": "3", + "type": "Array" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "a" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "arrayType": { + "size": "256", + "type": "UInt" + }, + "size": "3", + "type": "Array" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "a" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "arrayType": { + "size": "256", + "type": "UInt" + }, + "size": "3", + "type": "Array" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "a" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "arrayType": { + "size": "256", + "type": "UInt" + }, + "size": "3", + "type": "Array" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "a" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "arrayType": { + "size": "256", + "type": "UInt" + }, + "size": "3", + "type": "Array" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "a" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "arrayType": { + "size": "256", + "type": "UInt" + }, + "size": "3", + "type": "Array" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "a" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "arrayType": { + "size": "256", + "type": "UInt" + }, + "size": "3", + "type": "Array" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "a" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "arrayType": { + "size": "256", + "type": "UInt" + }, + "size": "3", + "type": "Array" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "a" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "arrayType": { + "size": "256", + "type": "UInt" + }, + "size": "3", + "type": "Array" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "a" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "arrayType": { + "size": "256", + "type": "UInt" + }, + "size": "3", + "type": "Array" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "a" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "arrayType": { + "size": "256", + "type": "UInt" + }, + "size": "3", + "type": "Array" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "a" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], + "returns": null, + "stateUpdates": [ + { + "location": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "x" + }, + "type": "int array array array" + }, + "value": { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "arrayType": { + "arrayType": { + "size": "256", + "type": "UInt" + }, + "size": "3", + "type": "Array" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "a" + }, + "type": "int array array" + } + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + } + } + ] + } + ], + "constructor": { + "contract": "A", + "initialStorage": [ + { + "location": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "x" + }, + "type": "int array array array" + }, + "value": { + "args": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + } + } + ], + "interface": { + "args": [], + "id": "\"A\"", + "kind": "Interface" + }, + "invariants": [], + "kind": "Constructor", + "pointers": [], + "postConditions": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], "preConditions": [] }, "kind": "Contract" diff --git a/tests/frontend/pass/array/const_array.act.typed.json b/tests/frontend/pass/array/const_array.act.typed.json index 4d733c26..bcd6aa87 100644 --- a/tests/frontend/pass/array/const_array.act.typed.json +++ b/tests/frontend/pass/array/const_array.act.typed.json @@ -169,9 +169,7 @@ ], "arity": 2, "symbol": ">=" - } - ], - "preConditions": [ + }, { "args": [ { @@ -181,107 +179,15 @@ "type": "int" }, { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ [ { "expression": { - "args": [ - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 2 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "y" - } - }, - "type": "int array" - } - }, - { - "timing": "Post", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 2 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "y" - } - }, - "type": "int array" - } - } - ], - "arity": 2, - "symbol": "==" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "100", - "type": "int" - } - ], - "arity": 3, - "symbol": "ite" + "literal": "0", + "type": "int" }, "kind": "TypedExpr", "type": "int" @@ -328,107 +234,15 @@ { "args": [ { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ [ { "expression": { - "args": [ - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 2 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "y" - } - }, - "type": "int array" - } - }, - { - "timing": "Post", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 2 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "y" - } - }, - "type": "int array" - } - } - ], - "arity": 2, - "symbol": "==" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "100", - "type": "int" - } - ], - "arity": 3, - "symbol": "ite" + "literal": "0", + "type": "int" }, "kind": "TypedExpr", "type": "int" @@ -479,319 +293,6698 @@ ], "arity": 2, "symbol": "and" - } - ], - "returns": null, - "stateUpdates": [ + }, { - "location": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "0", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "y" - } - }, - "type": "int array array" - }, - "value": { - "args": [ - { - "args": [ - { - "literal": "1", - "type": "int" - }, - { - "literal": "2", - "type": "int" - }, - { - "literal": "3", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" - }, - { - "args": [ - { - "literal": "4", - "type": "int" - }, - { - "literal": "5", - "type": "int" - }, - { - "literal": "6", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" - } - ], - "arity": 2, - "symbol": "[]" - } - }, - { - "location": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "literal": "0", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 2 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "y" - } - }, - "type": "int array" - }, - "value": { - "args": [ - { - "literal": "7", - "type": "int" - }, - { - "literal": "8", - "type": "int" - }, - { - "literal": "9", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" - } - } - ] - } - ], - "constructor": { - "contract": "A", - "initialStorage": [ - { - "location": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int array" - }, - "value": { - "args": [ - { - "literal": "1", - "type": "int" - }, - { - "literal": "2", - "type": "int" - }, - { - "literal": "3", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" - } - }, - { - "location": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int array array array" - }, - "value": { "args": [ { "args": [ { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" }, { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" + "type": "int" + } } ], "arity": 2, - "symbol": "[]" + "symbol": "<=" }, { "args": [ { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" + "type": "int" + } }, { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" + "type": "int" + } } ], "arity": 2, - "symbol": "[]" + "symbol": "<=" }, { "args": [ { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" + "type": "int" + } }, { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" } ], "arity": 2, - "symbol": "[]" + "symbol": "<=" } ], - "arity": 3, - "symbol": "[]" - } - } - ], - "interface": { - "args": [], - "id": "\"A\"", - "kind": "Interface" - }, - "invariants": [], - "kind": "Constructor", - "pointers": [], - "postConditions": [], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], + "preConditions": [ + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "args": [ + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int array" + } + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int array" + } + } + ], + "arity": 2, + "symbol": "==" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "100", + "type": "int" + } + ], + "arity": 3, + "symbol": "ite" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "args": [ + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int array" + } + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int array" + } + } + ], + "arity": 2, + "symbol": "==" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "100", + "type": "int" + } + ], + "arity": 3, + "symbol": "ite" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], + "returns": null, + "stateUpdates": [ + { + "location": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int array array" + }, + "value": { + "args": [ + { + "args": [ + { + "literal": "1", + "type": "int" + }, + { + "literal": "2", + "type": "int" + }, + { + "literal": "3", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "4", + "type": "int" + }, + { + "literal": "5", + "type": "int" + }, + { + "literal": "6", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + } + }, + { + "location": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int array" + }, + "value": { + "args": [ + { + "literal": "7", + "type": "int" + }, + { + "literal": "8", + "type": "int" + }, + { + "literal": "9", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + } + ] + } + ], + "constructor": { + "contract": "A", + "initialStorage": [ + { + "location": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "x" + }, + "type": "int array" + }, + "value": { + "args": [ + { + "literal": "1", + "type": "int" + }, + { + "literal": "2", + "type": "int" + }, + { + "literal": "3", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + }, + { + "location": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "y" + }, + "type": "int array array array" + }, + "value": { + "args": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + } + ], + "arity": 3, + "symbol": "[]" + } + } + ], + "interface": { + "args": [], + "id": "\"A\"", + "kind": "Interface" + }, + "invariants": [], + "kind": "Constructor", + "pointers": [], + "postConditions": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], "preConditions": [] }, "kind": "Contract" diff --git a/tests/frontend/pass/array/const_array2.act b/tests/frontend/pass/array/const_array2.act index b9be46e1..deebdaaf 100644 --- a/tests/frontend/pass/array/const_array2.act +++ b/tests/frontend/pass/array/const_array2.act @@ -13,6 +13,9 @@ creates behaviour f of A interface f() +iff + inRange(int, y[1][0][2]+1) + storage y[0] => [ [1,2,3], [4,5,6] ] diff --git a/tests/frontend/pass/array/const_array2.act.parsed.hs b/tests/frontend/pass/array/const_array2.act.parsed.hs index 20dd3ede..a79e5c33 100644 --- a/tests/frontend/pass/array/const_array2.act.parsed.hs +++ b/tests/frontend/pass/array/const_array2.act.parsed.hs @@ -1 +1 @@ -Main [Contract (Constructor (AlexPn 15 1 16) "A" constructor() [] [] (Creates [AssignVal (StorageVar (AlexPn 61 6 11) uint256[3] "x") (EArray (AlexPn 66 6 16) [IntLit (AlexPn 67 6 17) 1,IntLit (AlexPn 70 6 20) 2,IntLit (AlexPn 73 6 23) 3]),AssignVal (StorageVar (AlexPn 91 7 16) int256[3][2][3] "y") (EArray (AlexPn 96 7 21) [EArray (AlexPn 120 8 23) [EArray (AlexPn 122 8 25) [IntLit (AlexPn 123 8 26) 0,IntLit (AlexPn 125 8 28) 0,IntLit (AlexPn 127 8 30) 0],EArray (AlexPn 131 8 34) [IntLit (AlexPn 132 8 35) 0,IntLit (AlexPn 134 8 37) 0,IntLit (AlexPn 136 8 39) 0]],EArray (AlexPn 164 9 23) [EArray (AlexPn 166 9 25) [IntLit (AlexPn 167 9 26) 0,IntLit (AlexPn 169 9 28) 0,IntLit (AlexPn 171 9 30) 0],EArray (AlexPn 175 9 34) [IntLit (AlexPn 176 9 35) 0,IntLit (AlexPn 178 9 37) 0,IntLit (AlexPn 180 9 39) 0]],EArray (AlexPn 208 10 23) [EArray (AlexPn 210 10 25) [IntLit (AlexPn 211 10 26) 0,IntLit (AlexPn 213 10 28) 0,IntLit (AlexPn 215 10 30) 0],EArray (AlexPn 219 10 34) [IntLit (AlexPn 220 10 35) 0,IntLit (AlexPn 222 10 37) 0,IntLit (AlexPn 224 10 39) 0]]])]) [] []) [Transition (AlexPn 252 13 1) "f" "A" f() [] [] (Branches [Case (AlexPn 0 0 0) (BoolLit (AlexPn 0 0 0) True) (Post [Update (EIndexed (AlexPn 296 18 4) (EVar (AlexPn 295 18 3) "y") [IntLit (AlexPn 297 18 5) 0]) (EArray (AlexPn 303 18 11) [EArray (AlexPn 305 18 13) [IntLit (AlexPn 306 18 14) 1,IntLit (AlexPn 308 18 16) 2,IntLit (AlexPn 310 18 18) 3],EArray (AlexPn 314 18 22) [IntLit (AlexPn 315 18 23) 4,IntLit (AlexPn 317 18 25) 5,IntLit (AlexPn 319 18 27) 6]]),Update (EIndexed (AlexPn 327 19 4) (EVar (AlexPn 326 19 3) "y") [IntLit (AlexPn 328 19 5) 1,IntLit (AlexPn 331 19 8) 0]) (EArray (AlexPn 337 19 14) [IntLit (AlexPn 338 19 15) 7,IntLit (AlexPn 340 19 17) 8,EAdd (AlexPn 352 19 29) (EUTEntry (EIndexed (AlexPn 343 19 20) (EVar (AlexPn 342 19 19) "y") [IntLit (AlexPn 344 19 21) 1,IntLit (AlexPn 347 19 24) 0,IntLit (AlexPn 350 19 27) 2])) (IntLit (AlexPn 353 19 30) 1)])] Nothing)]) [EGEQ (AlexPn 428 22 64) (EPostEntry (EIndexed (AlexPn 373 22 9) (EVar (AlexPn 372 22 8) "y") [EITE (AlexPn 375 22 11) (ENeq (AlexPn 388 22 24) (EPreEntry (EIndexed (AlexPn 383 22 19) (EVar (AlexPn 382 22 18) "y") [IntLit (AlexPn 384 22 20) 1])) (EPostEntry (EIndexed (AlexPn 398 22 34) (EVar (AlexPn 397 22 33) "y") [IntLit (AlexPn 399 22 35) 1]))) (IntLit (AlexPn 408 22 44) 0) (IntLit (AlexPn 415 22 51) 100),IntLit (AlexPn 421 22 57) 0,IntLit (AlexPn 424 22 60) 0])) (IntLit (AlexPn 431 22 67) 0)]]] +Main [Contract (Constructor (AlexPn 15 1 16) "A" constructor() [] [] (Creates [AssignVal (StorageVar (AlexPn 61 6 11) uint256[3] "x") (EArray (AlexPn 66 6 16) [IntLit (AlexPn 67 6 17) 1,IntLit (AlexPn 70 6 20) 2,IntLit (AlexPn 73 6 23) 3]),AssignVal (StorageVar (AlexPn 91 7 16) int256[3][2][3] "y") (EArray (AlexPn 96 7 21) [EArray (AlexPn 120 8 23) [EArray (AlexPn 122 8 25) [IntLit (AlexPn 123 8 26) 0,IntLit (AlexPn 125 8 28) 0,IntLit (AlexPn 127 8 30) 0],EArray (AlexPn 131 8 34) [IntLit (AlexPn 132 8 35) 0,IntLit (AlexPn 134 8 37) 0,IntLit (AlexPn 136 8 39) 0]],EArray (AlexPn 164 9 23) [EArray (AlexPn 166 9 25) [IntLit (AlexPn 167 9 26) 0,IntLit (AlexPn 169 9 28) 0,IntLit (AlexPn 171 9 30) 0],EArray (AlexPn 175 9 34) [IntLit (AlexPn 176 9 35) 0,IntLit (AlexPn 178 9 37) 0,IntLit (AlexPn 180 9 39) 0]],EArray (AlexPn 208 10 23) [EArray (AlexPn 210 10 25) [IntLit (AlexPn 211 10 26) 0,IntLit (AlexPn 213 10 28) 0,IntLit (AlexPn 215 10 30) 0],EArray (AlexPn 219 10 34) [IntLit (AlexPn 220 10 35) 0,IntLit (AlexPn 222 10 37) 0,IntLit (AlexPn 224 10 39) 0]]])]) [] []) [Transition (AlexPn 252 13 1) "f" "A" f() [] [EInRange (AlexPn 290 17 3) int256 (EAdd (AlexPn 313 17 26) (EUTEntry (EIndexed (AlexPn 304 17 17) (EVar (AlexPn 303 17 16) "y") [IntLit (AlexPn 305 17 18) 1,IntLit (AlexPn 308 17 21) 0,IntLit (AlexPn 311 17 24) 2])) (IntLit (AlexPn 314 17 27) 1))] (Branches [Case (AlexPn 0 0 0) (BoolLit (AlexPn 0 0 0) True) (Post [Update (EIndexed (AlexPn 330 21 4) (EVar (AlexPn 329 21 3) "y") [IntLit (AlexPn 331 21 5) 0]) (EArray (AlexPn 337 21 11) [EArray (AlexPn 339 21 13) [IntLit (AlexPn 340 21 14) 1,IntLit (AlexPn 342 21 16) 2,IntLit (AlexPn 344 21 18) 3],EArray (AlexPn 348 21 22) [IntLit (AlexPn 349 21 23) 4,IntLit (AlexPn 351 21 25) 5,IntLit (AlexPn 353 21 27) 6]]),Update (EIndexed (AlexPn 361 22 4) (EVar (AlexPn 360 22 3) "y") [IntLit (AlexPn 362 22 5) 1,IntLit (AlexPn 365 22 8) 0]) (EArray (AlexPn 371 22 14) [IntLit (AlexPn 372 22 15) 7,IntLit (AlexPn 374 22 17) 8,EAdd (AlexPn 386 22 29) (EUTEntry (EIndexed (AlexPn 377 22 20) (EVar (AlexPn 376 22 19) "y") [IntLit (AlexPn 378 22 21) 1,IntLit (AlexPn 381 22 24) 0,IntLit (AlexPn 384 22 27) 2])) (IntLit (AlexPn 387 22 30) 1)])] Nothing)]) [EGEQ (AlexPn 462 25 64) (EPostEntry (EIndexed (AlexPn 407 25 9) (EVar (AlexPn 406 25 8) "y") [EITE (AlexPn 409 25 11) (ENeq (AlexPn 422 25 24) (EPreEntry (EIndexed (AlexPn 417 25 19) (EVar (AlexPn 416 25 18) "y") [IntLit (AlexPn 418 25 20) 1])) (EPostEntry (EIndexed (AlexPn 432 25 34) (EVar (AlexPn 431 25 33) "y") [IntLit (AlexPn 433 25 35) 1]))) (IntLit (AlexPn 442 25 44) 0) (IntLit (AlexPn 449 25 51) 100),IntLit (AlexPn 455 25 57) 0,IntLit (AlexPn 458 25 60) 0])) (IntLit (AlexPn 465 25 67) 0)]]] diff --git a/tests/frontend/pass/array/const_array2.act.typed.json b/tests/frontend/pass/array/const_array2.act.typed.json index 7f001806..9a5f6c72 100644 --- a/tests/frontend/pass/array/const_array2.act.typed.json +++ b/tests/frontend/pass/array/const_array2.act.typed.json @@ -147,9 +147,7 @@ ], "arity": 2, "symbol": ">=" - } - ], - "preConditions": [ + }, { "args": [ { @@ -159,85 +157,15 @@ "type": "int" }, { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ [ { "expression": { - "args": [ - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "y" - } - }, - "type": "int array array" - } - }, - { - "timing": "Post", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "y" - } - }, - "type": "int array array" - } - } - ], - "arity": 2, - "symbol": "=/=" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "100", - "type": "int" - } - ], - "arity": 3, - "symbol": "ite" + "literal": "0", + "type": "int" }, "kind": "TypedExpr", "type": "int" @@ -284,85 +212,15 @@ { "args": [ { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ [ { "expression": { - "args": [ - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "y" - } - }, - "type": "int array array" - } - }, - { - "timing": "Post", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "y" - } - }, - "type": "int array array" - } - } - ], - "arity": 2, - "symbol": "=/=" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "100", - "type": "int" - } - ], - "arity": 3, - "symbol": "ite" + "literal": "0", + "type": "int" }, "kind": "TypedExpr", "type": "int" @@ -423,14 +281,14 @@ "type": "int" }, { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ [ { "expression": { - "literal": "1", + "literal": "0", "type": "int" }, "kind": "TypedExpr", @@ -452,7 +310,7 @@ [ { "expression": { - "literal": "2", + "literal": "1", "type": "int" }, "kind": "TypedExpr", @@ -478,14 +336,14 @@ { "args": [ { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ [ { "expression": { - "literal": "1", + "literal": "0", "type": "int" }, "kind": "TypedExpr", @@ -507,7 +365,7 @@ [ { "expression": { - "literal": "2", + "literal": "1", "type": "int" }, "kind": "TypedExpr", @@ -537,374 +395,7235 @@ ], "arity": 2, "symbol": "and" - } - ], - "returns": null, - "stateUpdates": [ + }, { - "location": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "0", - "type": "int" + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } }, - "kind": "TypedExpr", "type": "int" - }, - 3 - ] + } + } ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "y" - } + "arity": 2, + "symbol": "<=" }, - "type": "int array array" - }, - "value": { - "args": [ - { - "args": [ - { - "literal": "1", - "type": "int" - }, - { - "literal": "2", - "type": "int" - }, - { - "literal": "3", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" - }, - { - "args": [ - { - "literal": "4", - "type": "int" - }, - { - "literal": "5", - "type": "int" - }, - { - "literal": "6", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" - } - ], - "arity": 2, - "symbol": "[]" - } - }, - { - "location": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "literal": "0", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - 2 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "y" - } - }, - "type": "int array" - }, - "value": { - "args": [ - { - "literal": "7", - "type": "int" - }, - { - "literal": "8", - "type": "int" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", "type": "int" }, - 3 - ], - [ - { - "expression": { - "literal": "0", - "type": "int" - }, - "kind": "TypedExpr", + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", "type": "int" }, - 2 - ], - [ - { - "expression": { - "literal": "2", - "type": "int" - }, - "kind": "TypedExpr", + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", "type": "int" }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "y" - } - }, - "type": "int" - } - }, - { - "literal": "1", + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, "type": "int" } - ], - "arity": 2, - "symbol": "+" - } - ], - "arity": 3, - "symbol": "[]" - } - } - ] - } - ], - "constructor": { - "contract": "A", - "initialStorage": [ - { - "location": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int array" - }, - "value": { - "args": [ - { - "literal": "1", - "type": "int" - }, - { - "literal": "2", - "type": "int" - }, - { - "literal": "3", - "type": "int" + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" } ], - "arity": 3, - "symbol": "[]" - } - }, - { - "location": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int array array array" + "arity": 2, + "symbol": "and" }, - "value": { + { "args": [ { "args": [ { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" }, { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } } ], "arity": 2, - "symbol": "[]" + "symbol": "<=" }, { "args": [ { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" + "type": "int" + } }, { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" } ], "arity": 2, - "symbol": "[]" - }, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ { "args": [ { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" }, { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 3, - "symbol": "[]" + "type": "int" + } } ], "arity": 2, - "symbol": "[]" - } - ], - "arity": 3, - "symbol": "[]" - } - } - ], - "interface": { - "args": [], - "id": "\"A\"", - "kind": "Interface" - }, - "invariants": [], - "kind": "Constructor", - "pointers": [], - "postConditions": [], + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], + "preConditions": [ + { + "args": [ + { + "args": [ + { + "size": "256", + "type": "Int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "inrange" + }, + { + "args": [ + { + "args": [ + { + "size": "256", + "type": "Int" + }, + { + "literal": "1", + "type": "int" + } + ], + "arity": 2, + "symbol": "inrange" + }, + { + "args": [ + { + "size": "256", + "type": "Int" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "1", + "type": "int" + } + ], + "arity": 2, + "symbol": "+" + } + ], + "arity": 2, + "symbol": "inrange" + } + ], + "arity": 2, + "symbol": "and" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "args": [ + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int array array" + } + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int array array" + } + } + ], + "arity": 2, + "symbol": "=/=" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "100", + "type": "int" + } + ], + "arity": 3, + "symbol": "ite" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "args": [ + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int array array" + } + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int array array" + } + } + ], + "arity": 2, + "symbol": "=/=" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "100", + "type": "int" + } + ], + "arity": 3, + "symbol": "ite" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], + "returns": null, + "stateUpdates": [ + { + "location": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int array array" + }, + "value": { + "args": [ + { + "args": [ + { + "literal": "1", + "type": "int" + }, + { + "literal": "2", + "type": "int" + }, + { + "literal": "3", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "4", + "type": "int" + }, + { + "literal": "5", + "type": "int" + }, + { + "literal": "6", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + } + }, + { + "location": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int array" + }, + "value": { + "args": [ + { + "literal": "7", + "type": "int" + }, + { + "literal": "8", + "type": "int" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "1", + "type": "int" + } + ], + "arity": 2, + "symbol": "+" + } + ], + "arity": 3, + "symbol": "[]" + } + } + ] + } + ], + "constructor": { + "contract": "A", + "initialStorage": [ + { + "location": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "x" + }, + "type": "int array" + }, + "value": { + "args": [ + { + "literal": "1", + "type": "int" + }, + { + "literal": "2", + "type": "int" + }, + { + "literal": "3", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + }, + { + "location": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "y" + }, + "type": "int array array array" + }, + "value": { + "args": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + }, + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 3, + "symbol": "[]" + } + ], + "arity": 2, + "symbol": "[]" + } + ], + "arity": 3, + "symbol": "[]" + } + } + ], + "interface": { + "args": [], + "id": "\"A\"", + "kind": "Interface" + }, + "invariants": [], + "kind": "Constructor", + "pointers": [], + "postConditions": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "x" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "-57896044618658097711785492504343953926634992332820282019728792003956564819968", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "57896044618658097711785492504343953926634992332820282019728792003956564819967", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], "preConditions": [] }, "kind": "Contract" diff --git a/tests/frontend/pass/array/create.act.typed.json b/tests/frontend/pass/array/create.act.typed.json index f8e80ef3..f71c14e4 100644 --- a/tests/frontend/pass/array/create.act.typed.json +++ b/tests/frontend/pass/array/create.act.typed.json @@ -142,6 +142,210 @@ { "literal": "True", "type": "bool" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" } ], "returns": null, @@ -450,6 +654,618 @@ { "literal": "True", "type": "bool" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "arr" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "arr" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "arr" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "arr" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "arr" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "arr" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "arr" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "arr" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 1 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "y" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" } ], "preConditions": [] diff --git a/tests/frontend/pass/array/cross_contract.act.typed.json b/tests/frontend/pass/array/cross_contract.act.typed.json index c2ceb55a..49eab63a 100644 --- a/tests/frontend/pass/array/cross_contract.act.typed.json +++ b/tests/frontend/pass/array/cross_contract.act.typed.json @@ -42,7 +42,248 @@ "invariants": [], "kind": "Constructor", "pointers": [], - "postConditions": [], + "postConditions": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], "preConditions": [] }, "kind": "Contract" diff --git a/tests/frontend/pass/array/cross_contract2.act.typed.json b/tests/frontend/pass/array/cross_contract2.act.typed.json index ff78e98c..01433887 100644 --- a/tests/frontend/pass/array/cross_contract2.act.typed.json +++ b/tests/frontend/pass/array/cross_contract2.act.typed.json @@ -42,7 +42,248 @@ "invariants": [], "kind": "Constructor", "pointers": [], - "postConditions": [], + "postConditions": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "ar" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + } + ], "preConditions": [] }, "kind": "Contract" diff --git a/tests/frontend/pass/array/cross_inv.act.typed.json b/tests/frontend/pass/array/cross_inv.act.typed.json index 245dbf77..4bbb0fd0 100644 --- a/tests/frontend/pass/array/cross_inv.act.typed.json +++ b/tests/frontend/pass/array/cross_inv.act.typed.json @@ -423,35 +423,86 @@ "var": "a" } ], - "postConditions": [], - "preConditions": [ + "postConditions": [ { "args": [ { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "field": "x", - "kind": "Field", - "reference": { - "abitype": { - "type": "Address" + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "arr" + } }, - "kind": "Var", - "var": "a" + "type": "int" } - }, - "type": "int" - } + } + ], + "arity": 2, + "symbol": "<=" }, { - "literal": "3", - "type": "int" + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "arr" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" } ], "arity": 2, - "symbol": "<" + "symbol": "and" }, { "args": [ @@ -462,14 +513,28 @@ "type": "int" }, { - "timing": "Pre", + "timing": "Post", "var": { "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "a" + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "arr" + } }, "type": "int" } @@ -481,20 +546,34 @@ { "args": [ { - "timing": "Pre", + "timing": "Post", "var": { "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "a" + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "B", + "kind": "SVar", + "svar": "arr" + } }, "type": "int" } }, { - "literal": "1461501637330902918203684832716283019655932542975", + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", "type": "int" } ], @@ -514,18 +593,27 @@ "type": "int" }, { - "timing": "Pre", + "timing": "Post", "var": { "item": { - "contract": "A", - "field": "x", - "kind": "Field", + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", "reference": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "a" + "contract": "B", + "kind": "SVar", + "svar": "arr" } }, "type": "int" @@ -538,18 +626,27 @@ { "args": [ { - "timing": "Pre", + "timing": "Post", "var": { "item": { - "contract": "A", - "field": "x", - "kind": "Field", + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", "reference": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "a" + "contract": "B", + "kind": "SVar", + "svar": "arr" } }, "type": "int" @@ -566,6 +663,36 @@ ], "arity": 2, "symbol": "and" + } + ], + "preConditions": [ + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "contract": "A", + "field": "x", + "kind": "Field", + "reference": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "a" + } + }, + "type": "int" + } + }, + { + "literal": "3", + "type": "int" + } + ], + "arity": 2, + "symbol": "<" }, { "args": [ @@ -579,16 +706,11 @@ "timing": "Pre", "var": { "item": { - "contract": "A", - "field": "x", - "kind": "Field", - "reference": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "a" - } + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "a" }, "type": "int" } @@ -603,22 +725,17 @@ "timing": "Pre", "var": { "item": { - "contract": "A", - "field": "x", - "kind": "Field", - "reference": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "a" - } + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "a" }, "type": "int" } }, { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "literal": "1461501637330902918203684832716283019655932542975", "type": "int" } ], diff --git a/tests/frontend/pass/array/multicase_bounds.act.typed.json b/tests/frontend/pass/array/multicase_bounds.act.typed.json index 1b983ed7..2de35b5a 100644 --- a/tests/frontend/pass/array/multicase_bounds.act.typed.json +++ b/tests/frontend/pass/array/multicase_bounds.act.typed.json @@ -285,6 +285,100 @@ ], "arity": 2, "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "y" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "z" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "y" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "z" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" } ], "returns": { @@ -729,6 +823,100 @@ ], "arity": 2, "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "yn" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "z" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "yn" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "z" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" } ], "returns": { @@ -1054,6 +1242,166 @@ ], "arity": 2, "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "size": "256", + "type": "Int" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "xs" + } + }, + "type": "int" + } + }, + { + "literal": "1", + "type": "int" + } + ], + "arity": 2, + "symbol": "-" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "z" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "size": "256", + "type": "Int" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "xs" + } + }, + "type": "int" + } + }, + { + "literal": "1", + "type": "int" + } + ], + "arity": 2, + "symbol": "-" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "z" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" } ], "returns": { @@ -1531,6 +1879,166 @@ ], "arity": 2, "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "size": "256", + "type": "Int" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "xs" + } + }, + "type": "int" + } + }, + { + "literal": "2", + "type": "int" + } + ], + "arity": 2, + "symbol": "/" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "z" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 2 + ] + ], + "kind": "Array", + "reference": { + "abitype": { + "arrayType": { + "size": "256", + "type": "Int" + }, + "size": "2", + "type": "Array" + }, + "kind": "Var", + "var": "xs" + } + }, + "type": "int" + } + }, + { + "literal": "2", + "type": "int" + } + ], + "arity": 2, + "symbol": "/" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "z" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" } ], "returns": { @@ -1771,6 +2279,246 @@ ], "arity": 2, "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "z" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "z" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "z" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "z" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "z" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "z" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" } ], "preConditions": [] diff --git a/tests/frontend/pass/array/noaliasing.act.typed.json b/tests/frontend/pass/array/noaliasing.act.typed.json index 09f82b84..e6abcefb 100644 --- a/tests/frontend/pass/array/noaliasing.act.typed.json +++ b/tests/frontend/pass/array/noaliasing.act.typed.json @@ -1489,102 +1489,6 @@ "arity": 2, "symbol": "and" }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, { "args": [ { @@ -1735,102 +1639,6 @@ "arity": 2, "symbol": "and" }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, { "args": [ { @@ -1981,102 +1789,6 @@ "arity": 2, "symbol": "and" }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, { "args": [ { @@ -2246,102 +1958,6 @@ ], "arity": 2, "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" } ], "returns": null, @@ -2885,6 +2501,1842 @@ ], "arity": 2, "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr2" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" } ], "preConditions": [] diff --git a/tests/frontend/pass/array/noaliasing2.act.typed.json b/tests/frontend/pass/array/noaliasing2.act.typed.json index d80deb92..62af4d17 100644 --- a/tests/frontend/pass/array/noaliasing2.act.typed.json +++ b/tests/frontend/pass/array/noaliasing2.act.typed.json @@ -1618,9 +1618,12 @@ "timing": "Pre", "var": { "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "a" }, "type": "int" } @@ -1635,9 +1638,12 @@ "timing": "Pre", "var": { "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "a" }, "type": "int" } @@ -1671,7 +1677,7 @@ "type": "UInt" }, "kind": "Var", - "var": "a" + "var": "b" }, "type": "int" } @@ -1691,7 +1697,7 @@ "type": "UInt" }, "kind": "Var", - "var": "a" + "var": "b" }, "type": "int" } @@ -1720,9 +1726,50 @@ "timing": "Pre", "var": { "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" + "indexes": [ + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "x" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "y" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, "type": "int" } @@ -1737,9 +1784,50 @@ "timing": "Pre", "var": { "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" + "indexes": [ + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "x" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "y" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, "type": "int" } @@ -1768,12 +1856,50 @@ "timing": "Pre", "var": { "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "b" + "indexes": [ + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "y" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "x" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, "type": "int" } @@ -1788,12 +1914,50 @@ "timing": "Pre", "var": { "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "b" + "indexes": [ + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "y" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "x" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, "type": "int" } @@ -1822,60 +1986,56 @@ "timing": "Pre", "var": { "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "a" + "indexes": [ + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "a" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "b" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, "type": "int" } @@ -1890,12 +2050,56 @@ "timing": "Pre", "var": { "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "a" + "indexes": [ + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "a" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "b" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, "type": "int" } @@ -1924,9 +2128,56 @@ "timing": "Pre", "var": { "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" + "indexes": [ + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "b" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "a" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, "type": "int" } @@ -1941,9 +2192,56 @@ "timing": "Pre", "var": { "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" + "indexes": [ + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "b" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "a" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, "type": "int" } @@ -1959,218 +2257,314 @@ ], "arity": 2, "symbol": "and" - }, + } + ], + "returns": null, + "stateUpdates": [ { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "b" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "b" + "location": { + "item": { + "indexes": [ + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "x" + }, + "type": "int" + } }, + "kind": "TypedExpr", "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "a" + }, + 3 + ], + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "y" + }, + "type": "int" + } }, + "kind": "TypedExpr", "type": "int" - } - } + }, + 3 + ] ], - "arity": 2, - "symbol": "<=" + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "a" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" + "type": "int" + }, + "value": { + "literal": "1", + "type": "int" + } }, { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "b" + "location": { + "item": { + "indexes": [ + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "y" + }, + "type": "int" + } }, + "kind": "TypedExpr", "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "b" + }, + 3 + ], + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "x" + }, + "type": "int" + } }, + "kind": "TypedExpr", "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } + }, + 3 + ] ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + }, + "value": { + "literal": "2", + "type": "int" + } }, { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" + "location": { + "item": { + "indexes": [ + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "a" + }, + "type": "int" + } }, + "kind": "TypedExpr", "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" + }, + 3 + ], + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "b" + }, + "type": "int" + } }, + "kind": "TypedExpr", "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } + }, + 3 + ] ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + }, + "value": { + "literal": "1", + "type": "int" + } }, { + "location": { + "item": { + "indexes": [ + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "b" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "a" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + }, + "value": { + "literal": "2", + "type": "int" + } + } + ] + } + ], + "constructor": { + "contract": "A", + "initialStorage": [ + { + "location": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "x" + }, + "type": "int" + }, + "value": { + "literal": "0", + "type": "int" + } + }, + { + "location": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "y" + }, + "type": "int" + }, + "value": { + "literal": "0", + "type": "int" + } + }, + { + "location": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "w" + }, + "type": "int" + }, + "value": { + "literal": "0", + "type": "int" + } + }, + { + "location": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "z" + }, + "type": "int" + }, + "value": { + "literal": "0", + "type": "int" + } + }, + { + "location": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + }, + "type": "int array array" + }, + "value": { "args": [ { "args": [ @@ -2179,47 +2573,35 @@ "type": "int" }, { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" } ], - "arity": 2, - "symbol": "<=" + "arity": 3, + "symbol": "[]" }, { "args": [ { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } + "literal": "0", + "type": "int" }, { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "literal": "0", + "type": "int" + }, + { + "literal": "0", "type": "int" } ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ + "arity": 3, + "symbol": "[]" + }, { "args": [ { @@ -2227,1434 +2609,734 @@ "type": "int" }, { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "a" - }, - "type": "int" - } + "literal": "0", + "type": "int" + }, + { + "literal": "0", + "type": "int" } ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "a" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "b" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "b" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "arr1" - } - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "arr1" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "arr1" - } - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "arr1" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "a" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "b" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "arr1" - } - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "a" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "b" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "arr1" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "a" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "a" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" + "arity": 3, + "symbol": "[]" } ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "b" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "b" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "arity": 3, + "symbol": "[]" + } + } + ], + "interface": { + "args": [], + "id": "\"A\"", + "kind": "Interface" + }, + "invariants": [], + "kind": "Constructor", + "pointers": [], + "postConditions": [ + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "x" + }, "type": "int" } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "x" + }, "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "b" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "a" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "arr1" - } - }, - "type": "int" - } } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "b" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "a" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "arr1" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "y" + }, "type": "int" } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "y" + }, "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "b" - }, - "type": "int" - } } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "b" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "w" + }, "type": "int" } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "w" + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "z" + }, "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "a" - }, - "type": "int" - } } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "a" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "contract": "A", + "kind": "SVar", + "svar": "z" + }, "type": "int" } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - } - ], - "returns": null, - "stateUpdates": [ - { - "location": { - "item": { - "indexes": [ - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "arr1" + "type": "int" + } } - }, - "type": "int" + ], + "arity": 2, + "symbol": "<=" }, - "value": { - "literal": "1", - "type": "int" + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" } - }, - { - "location": { - "item": { - "indexes": [ - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, - 3 - ], - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "arr1" + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" } - }, - "type": "int" - }, - "value": { - "literal": "2", - "type": "int" + ], + "arity": 2, + "symbol": "<=" } - }, - { - "location": { - "item": { - "indexes": [ - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" }, - "kind": "Var", - "var": "a" + "kind": "TypedExpr", + "type": "int" }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" }, - "kind": "Var", - "var": "b" + "kind": "TypedExpr", + "type": "int" }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "arr1" + "type": "int" + } } - }, - "type": "int" + ], + "arity": 2, + "symbol": "<=" }, - "value": { - "literal": "1", - "type": "int" - } - }, - { - "location": { - "item": { - "indexes": [ - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "0", + "type": "int" }, - "kind": "Var", - "var": "b" + "kind": "TypedExpr", + "type": "int" }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - 3 - ], - [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" }, - "kind": "Var", - "var": "a" + "kind": "TypedExpr", + "type": "int" }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, - 3 - ] - ], - "kind": "Array", - "reference": { - "contract": "A", - "kind": "SVar", - "svar": "arr1" + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" } - }, - "type": "int" - }, - "value": { - "literal": "2", - "type": "int" + ], + "arity": 2, + "symbol": "<=" } - } - ] - } - ], - "constructor": { - "contract": "A", - "initialStorage": [ - { - "location": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" - }, - "type": "int" - }, - "value": { - "literal": "0", - "type": "int" - } - }, - { - "location": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" - }, - "type": "int" - }, - "value": { - "literal": "0", - "type": "int" - } - }, - { - "location": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "w" - }, - "type": "int" - }, - "value": { - "literal": "0", - "type": "int" - } - }, - { - "location": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "z" - }, - "type": "int" - }, - "value": { - "literal": "0", - "type": "int" - } + ], + "arity": 2, + "symbol": "and" }, { - "location": { - "item": { - "contract": "A", - "kind": "SVar", - "svar": "arr1" - }, - "type": "int array array" - }, - "value": { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, "type": "int" } - ], - "arity": 3, - "symbol": "[]" - }, - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, "type": "int" } - ], - "arity": 3, - "symbol": "[]" - }, - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "literal": "0", + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, "type": "int" - }, - { - "literal": "0", + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Post", + "var": { + "item": { + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } + }, "type": "int" } - ], - "arity": 3, - "symbol": "[]" - } - ], - "arity": 3, - "symbol": "[]" - } - } - ], - "interface": { - "args": [], - "id": "\"A\"", - "kind": "Interface" - }, - "invariants": [], - "kind": "Constructor", - "pointers": [], - "postConditions": [ + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, { "args": [ { @@ -3667,9 +3349,36 @@ "timing": "Post", "var": { "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, "type": "int" } @@ -3684,9 +3393,36 @@ "timing": "Post", "var": { "item": { - "contract": "A", - "kind": "SVar", - "svar": "x" + "indexes": [ + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, "type": "int" } @@ -3715,9 +3451,36 @@ "timing": "Post", "var": { "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, "type": "int" } @@ -3732,9 +3495,36 @@ "timing": "Post", "var": { "item": { - "contract": "A", - "kind": "SVar", - "svar": "y" + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "0", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, "type": "int" } @@ -3763,9 +3553,36 @@ "timing": "Post", "var": { "item": { - "contract": "A", - "kind": "SVar", - "svar": "w" + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, "type": "int" } @@ -3780,9 +3597,36 @@ "timing": "Post", "var": { "item": { - "contract": "A", - "kind": "SVar", - "svar": "w" + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "1", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, "type": "int" } @@ -3811,9 +3655,36 @@ "timing": "Post", "var": { "item": { - "contract": "A", - "kind": "SVar", - "svar": "z" + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, "type": "int" } @@ -3828,9 +3699,36 @@ "timing": "Post", "var": { "item": { - "contract": "A", - "kind": "SVar", - "svar": "z" + "indexes": [ + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ], + [ + { + "expression": { + "literal": "2", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + }, + 3 + ] + ], + "kind": "Array", + "reference": { + "contract": "A", + "kind": "SVar", + "svar": "arr1" + } }, "type": "int" } diff --git a/tests/frontend/pass/case/case.act.typed.json b/tests/frontend/pass/case/case.act.typed.json index 430c66dd..539cef74 100644 --- a/tests/frontend/pass/case/case.act.typed.json +++ b/tests/frontend/pass/case/case.act.typed.json @@ -436,114 +436,6 @@ "arity": 2, "symbol": "and" }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, { "args": [ { @@ -592,60 +484,6 @@ "arity": 2, "symbol": "and" }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, { "args": [ { @@ -1143,114 +981,6 @@ "arity": 2, "symbol": "and" }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, { "args": [ { @@ -1299,60 +1029,6 @@ "arity": 2, "symbol": "and" }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, { "args": [ { @@ -1860,114 +1536,6 @@ "arity": 2, "symbol": "and" }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, { "args": [ { @@ -2016,60 +1584,6 @@ "arity": 2, "symbol": "and" }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "z" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, { "args": [ { diff --git a/tests/frontend/pass/token/transfer.act.typed.json b/tests/frontend/pass/token/transfer.act.typed.json index 9ab558d5..2956791e 100644 --- a/tests/frontend/pass/token/transfer.act.typed.json +++ b/tests/frontend/pass/token/transfer.act.typed.json @@ -935,18 +935,8 @@ "type": "int" }, { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "value" - }, - "type": "int" - } + "ethEnv": "Callvalue", + "type": "int" } ], "arity": 2, @@ -955,18 +945,8 @@ { "args": [ { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "value" - }, - "type": "int" - } + "ethEnv": "Callvalue", + "type": "int" }, { "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", @@ -989,17 +969,8 @@ "type": "int" }, { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "to" - }, - "type": "int" - } + "ethEnv": "Caller", + "type": "int" } ], "arity": 2, @@ -1008,17 +979,8 @@ { "args": [ { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "to" - }, - "type": "int" - } + "ethEnv": "Caller", + "type": "int" }, { "literal": "1461501637330902918203684832716283019655932542975", @@ -1031,233 +993,288 @@ ], "arity": 2, "symbol": "and" + } + ], + "returns": { + "expression": { + "literal": "1", + "type": "int" }, + "kind": "TypedExpr", + "type": "int" + }, + "stateUpdates": [ { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, + "location": { + "item": { + "indexes": [ { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, + "expression": { + "ethEnv": "Caller", "type": "int" - } + }, + "kind": "TypedExpr", + "type": "int" } ], - "arity": 2, - "symbol": "<=" + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", + "type": "int" + }, + "value": { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "ethEnv": "Caller", "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" + }, + "kind": "TypedExpr", + "type": "int" } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + } + }, + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "kind": "Var", + "var": "value" + }, "type": "int" } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" + } + ], + "arity": 2, + "symbol": "-" + } }, { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "value" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ + "location": { + "item": { + "indexes": [ { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "to" }, - "kind": "Var", - "var": "value" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + }, + "kind": "TypedExpr", "type": "int" } ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "to" + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + }, + "value": { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" + "kind": "Var", + "var": "to" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + } + }, + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" }, - "type": "int" - } + "kind": "Var", + "var": "value" + }, + "type": "int" } - ], - "arity": 2, - "symbol": "<=" + } + ], + "arity": 2, + "symbol": "+" + } + } + ] + }, + { + "case": [ + { + "args": [ + { + "ethEnv": "Caller", + "type": "int" }, { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "to" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "to" + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "==" + } + ], + "contract": "Token", + "interface": { + "args": [ + { + "abitype": { + "size": "256", + "type": "UInt" + }, + "id": "\"value\"", + "kind": "Declaration" + }, + { + "abitype": { + "type": "Address" + }, + "id": "\"to\"", + "kind": "Declaration" + } + ], + "id": "\"transfer\"", + "kind": "Interface" + }, + "kind": "Behaviour", + "name": "transfer", + "pointers": [], + "postConditions": [], + "preConditions": [ + { + "args": [ + { + "ethEnv": "Callvalue", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 2, + "symbol": "==" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "value" + }, + "type": "int" + } + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "ethEnv": "Caller", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" } }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" + "type": "int" + } } ], "arity": 2, - "symbol": "and" + "symbol": "<=" }, { "args": [ { "args": [ { - "literal": "0", + "ethEnv": "Caller", "type": "int" }, { @@ -1275,34 +1292,84 @@ } ], "arity": 2, - "symbol": "<=" + "symbol": "=/=" }, { "args": [ { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "to" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "to" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + } + }, + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "value" + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "+" + }, + { + "args": [ + { + "literal": "2", + "type": "int" + }, + { + "literal": "256", + "type": "int" + } + ], + "arity": 2, + "symbol": "^" + } + ], + "arity": 2, + "symbol": "<" } ], "arity": 2, - "symbol": "and" + "symbol": "=>" }, { "args": [ @@ -1367,8 +1434,17 @@ "type": "int" }, { - "ethEnv": "Callvalue", - "type": "int" + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "to" + }, + "type": "int" + } } ], "arity": 2, @@ -1377,11 +1453,20 @@ { "args": [ { - "ethEnv": "Callvalue", - "type": "int" + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "to" + }, + "type": "int" + } }, { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "literal": "1461501637330902918203684832716283019655932542975", "type": "int" } ], @@ -1401,8 +1486,18 @@ "type": "int" }, { - "ethEnv": "Caller", - "type": "int" + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "value" + }, + "type": "int" + } } ], "arity": 2, @@ -1411,11 +1506,21 @@ { "args": [ { - "ethEnv": "Caller", - "type": "int" + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "value" + }, + "type": "int" + } }, { - "literal": "1461501637330902918203684832716283019655932542975", + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", "type": "int" } ], @@ -1425,383 +1530,224 @@ ], "arity": 2, "symbol": "and" - } - ], - "returns": { - "expression": { - "literal": "1", - "type": "int" }, - "kind": "TypedExpr", - "type": "int" - }, - "stateUpdates": [ { - "location": { - "item": { - "indexes": [ + "args": [ + { + "args": [ { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", + "literal": "0", "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "ethEnv": "Caller", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + } } ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } + "arity": 2, + "symbol": "<=" }, - "type": "int" - }, - "value": { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "ethEnv": "Caller", + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "ethEnv": "Caller", + "type": "int" + }, + "kind": "TypedExpr", "type": "int" - }, - "kind": "TypedExpr", - "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" }, - "kind": "Var", - "var": "value" - }, + "type": "int" + } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", "type": "int" } - } - ], - "arity": 2, - "symbol": "-" - } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" }, { - "location": { - "item": { - "indexes": [ + "args": [ + { + "args": [ { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "to" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - }, - "value": { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "to" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, + "literal": "0", "type": "int" - } - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" + }, + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "to" }, - "kind": "Var", - "var": "value" - }, - "type": "int" + "type": "int" + } } - } - ], - "arity": 2, - "symbol": "+" - } - } - ] - }, - { - "case": [ - { - "args": [ - { - "ethEnv": "Caller", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "to" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "==" - } - ], - "contract": "Token", - "interface": { - "args": [ - { - "abitype": { - "size": "256", - "type": "UInt" - }, - "id": "\"value\"", - "kind": "Declaration" - }, - { - "abitype": { - "type": "Address" - }, - "id": "\"to\"", - "kind": "Declaration" - } - ], - "id": "\"transfer\"", - "kind": "Interface" - }, - "kind": "Behaviour", - "name": "transfer", - "pointers": [], - "postConditions": [], - "preConditions": [ - { - "args": [ - { - "ethEnv": "Callvalue", - "type": "int" - }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 2, - "symbol": "==" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "value" - }, - "type": "int" - } + ], + "arity": 2, + "symbol": "<=" }, { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "ethEnv": "Caller", - "type": "int" + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" + "kind": "Var", + "var": "to" + }, + "type": "int" } }, - "type": "int" - } + { + "literal": "1461501637330902918203684832716283019655932542975", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" } ], "arity": 2, - "symbol": "<=" + "symbol": "and" }, { "args": [ { "args": [ { - "ethEnv": "Caller", + "literal": "0", "type": "int" }, { "timing": "Pre", "var": { "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "to" + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "to" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } }, "type": "int" } } ], "arity": 2, - "symbol": "=/=" + "symbol": "<=" }, { "args": [ { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "to" - }, - "type": "int" - } + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "to" }, - "kind": "TypedExpr", "type": "int" } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" }, - "kind": "Var", - "var": "value" - }, - "type": "int" + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" } - } - ], - "arity": 2, - "symbol": "+" + }, + "type": "int" + } }, { - "args": [ - { - "literal": "2", - "type": "int" - }, - { - "literal": "256", - "type": "int" - } - ], - "arity": 2, - "symbol": "^" + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" } ], "arity": 2, - "symbol": "<" + "symbol": "<=" } ], "arity": 2, - "symbol": "=>" + "symbol": "and" }, { "args": [ @@ -1812,18 +1758,8 @@ "type": "int" }, { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "value" - }, - "type": "int" - } + "ethEnv": "Callvalue", + "type": "int" } ], "arity": 2, @@ -1832,18 +1768,8 @@ { "args": [ { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "value" - }, - "type": "int" - } + "ethEnv": "Callvalue", + "type": "int" }, { "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", @@ -1866,17 +1792,8 @@ "type": "int" }, { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "to" - }, - "type": "int" - } + "ethEnv": "Caller", + "type": "int" } ], "arity": 2, @@ -1885,17 +1802,8 @@ { "args": [ { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "to" - }, - "type": "int" - } + "ethEnv": "Caller", + "type": "int" }, { "literal": "1461501637330902918203684832716283019655932542975", @@ -1908,61 +1816,115 @@ ], "arity": 2, "symbol": "and" + } + ], + "returns": { + "expression": { + "literal": "1", + "type": "int" }, + "kind": "TypedExpr", + "type": "int" + }, + "stateUpdates": [] + }, + { + "case": [ { "args": [ { "args": [ { - "literal": "0", - "type": "int" + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } }, { "timing": "Pre", "var": { "item": { "abitype": { - "size": "256", - "type": "UInt" + "type": "Address" }, "kind": "Var", - "var": "value" + "var": "dst" }, "type": "int" } } ], "arity": 2, - "symbol": "<=" + "symbol": "=/=" }, { "args": [ + { + "ethEnv": "Caller", + "type": "int" + }, { "timing": "Pre", "var": { "item": { "abitype": { - "size": "256", - "type": "UInt" + "type": "Address" }, "kind": "Var", - "var": "value" + "var": "src" }, "type": "int" } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" } ], "arity": 2, - "symbol": "<=" + "symbol": "==" } ], "arity": 2, "symbol": "and" - }, + } + ], + "contract": "Token", + "interface": { + "args": [ + { + "abitype": { + "type": "Address" + }, + "id": "\"src\"", + "kind": "Declaration" + }, + { + "abitype": { + "type": "Address" + }, + "id": "\"dst\"", + "kind": "Declaration" + }, + { + "abitype": { + "size": "256", + "type": "UInt" + }, + "id": "\"amount\"", + "kind": "Declaration" + } + ], + "id": "\"transferFrom\"", + "kind": "Interface" + }, + "kind": "Behaviour", + "name": "transferFrom", + "pointers": [], + "postConditions": [ { "args": [ { @@ -1972,14 +1934,23 @@ "type": "int" }, { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ { "expression": { - "ethEnv": "Caller", - "type": "int" + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } }, "kind": "TypedExpr", "type": "int" @@ -2002,23 +1973,32 @@ { "args": [ { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ { "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", "svar": "balanceOf" } }, @@ -2046,59 +2026,7 @@ "type": "int" }, { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "to" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "to" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ @@ -2111,7 +2039,7 @@ "type": "Address" }, "kind": "Var", - "var": "to" + "var": "dst" }, "type": "int" } @@ -2137,7 +2065,7 @@ { "args": [ { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ @@ -2150,7 +2078,7 @@ "type": "Address" }, "kind": "Var", - "var": "to" + "var": "dst" }, "type": "int" } @@ -2180,67 +2108,179 @@ ], "arity": 2, "symbol": "and" + } + ], + "preConditions": [ + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "amount" + }, + "type": "int" + } + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" }, { "args": [ { "args": [ - { - "literal": "0", - "type": "int" - }, { "timing": "Pre", "var": { "item": { "abitype": { - "size": "256", - "type": "UInt" + "type": "Address" }, "kind": "Var", - "var": "value" + "var": "src" }, "type": "int" } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ + }, { "timing": "Pre", "var": { "item": { "abitype": { - "size": "256", - "type": "UInt" + "type": "Address" }, "kind": "Var", - "var": "value" + "var": "dst" }, "type": "int" } + } + ], + "arity": 2, + "symbol": "=/=" + }, + { + "args": [ + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + } + }, + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "amount" + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "+" }, { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" + "args": [ + { + "literal": "2", + "type": "int" + }, + { + "literal": "256", + "type": "int" + } + ], + "arity": 2, + "symbol": "^" } ], "arity": 2, - "symbol": "<=" + "symbol": "<" } ], "arity": 2, - "symbol": "and" + "symbol": "=>" }, { "args": [ { "args": [ { - "literal": "0", + "ethEnv": "Caller", "type": "int" }, { @@ -2251,41 +2291,103 @@ "type": "Address" }, "kind": "Var", - "var": "to" + "var": "src" }, "type": "int" } } ], "arity": 2, - "symbol": "<=" + "symbol": "=/=" }, { "args": [ { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "to" - }, - "type": "int" - } + "literal": "0", + "type": "int" }, { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + { + "expression": { + "ethEnv": "Caller", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "allowance" + } + }, + "type": "int" + } + }, + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "amount" + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "-" + } ], "arity": 2, "symbol": "<=" } ], "arity": 2, - "symbol": "and" + "symbol": "=>" + }, + { + "args": [ + { + "ethEnv": "Callvalue", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 2, + "symbol": "==" }, { "args": [ @@ -2296,8 +2398,17 @@ "type": "int" }, { - "ethEnv": "Callvalue", - "type": "int" + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } } ], "arity": 2, @@ -2306,11 +2417,20 @@ { "args": [ { - "ethEnv": "Callvalue", - "type": "int" + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } }, { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "literal": "1461501637330902918203684832716283019655932542975", "type": "int" } ], @@ -2330,8 +2450,17 @@ "type": "int" }, { - "ethEnv": "Caller", - "type": "int" + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" + }, + "type": "int" + } } ], "arity": 2, @@ -2340,8 +2469,17 @@ { "args": [ { - "ethEnv": "Caller", - "type": "int" + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" + }, + "type": "int" + } }, { "literal": "1461501637330902918203684832716283019655932542975", @@ -2354,115 +2492,61 @@ ], "arity": 2, "symbol": "and" - } - ], - "returns": { - "expression": { - "literal": "1", - "type": "int" }, - "kind": "TypedExpr", - "type": "int" - }, - "stateUpdates": [] - }, - { - "case": [ { "args": [ { "args": [ { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } + "literal": "0", + "type": "int" }, { "timing": "Pre", "var": { "item": { "abitype": { - "type": "Address" + "size": "256", + "type": "UInt" }, "kind": "Var", - "var": "dst" + "var": "amount" }, "type": "int" } } ], "arity": 2, - "symbol": "=/=" + "symbol": "<=" }, { "args": [ - { - "ethEnv": "Caller", - "type": "int" - }, { "timing": "Pre", "var": { "item": { "abitype": { - "type": "Address" + "size": "256", + "type": "UInt" }, "kind": "Var", - "var": "src" + "var": "amount" }, "type": "int" } + }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" } ], "arity": 2, - "symbol": "==" + "symbol": "<=" } ], "arity": 2, "symbol": "and" - } - ], - "contract": "Token", - "interface": { - "args": [ - { - "abitype": { - "type": "Address" - }, - "id": "\"src\"", - "kind": "Declaration" - }, - { - "abitype": { - "type": "Address" - }, - "id": "\"dst\"", - "kind": "Declaration" - }, - { - "abitype": { - "size": "256", - "type": "UInt" - }, - "id": "\"amount\"", - "kind": "Declaration" - } - ], - "id": "\"transferFrom\"", - "kind": "Interface" - }, - "kind": "Behaviour", - "name": "transferFrom", - "pointers": [], - "postConditions": [ + }, { "args": [ { @@ -2472,7 +2556,7 @@ "type": "int" }, { - "timing": "Post", + "timing": "Pre", "var": { "item": { "indexes": [ @@ -2511,7 +2595,7 @@ { "args": [ { - "timing": "Post", + "timing": "Pre", "var": { "item": { "indexes": [ @@ -2564,7 +2648,7 @@ "type": "int" }, { - "timing": "Post", + "timing": "Pre", "var": { "item": { "indexes": [ @@ -2603,7 +2687,7 @@ { "args": [ { - "timing": "Post", + "timing": "Pre", "var": { "item": { "indexes": [ @@ -2646,79 +2730,161 @@ ], "arity": 2, "symbol": "and" - } - ], - "preConditions": [ + }, { "args": [ { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" + "args": [ + { + "literal": "0", + "type": "int" }, - "type": "int" - } - }, - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" + "kind": "Var", + "var": "amount" + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "amount" + }, + "type": "int" } }, - "type": "int" - } + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" } ], "arity": 2, - "symbol": "<=" + "symbol": "and" }, { "args": [ { "args": [ + { + "literal": "0", + "type": "int" + }, { "timing": "Pre", "var": { "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } }, "type": "int" } }, + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ + { + "args": [ + { + "literal": "0", + "type": "int" + }, { "timing": "Pre", "var": { @@ -2727,98 +2893,48 @@ "type": "Address" }, "kind": "Var", - "var": "dst" + "var": "src" }, "type": "int" } } ], "arity": 2, - "symbol": "=/=" + "symbol": "<=" }, { "args": [ { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "+" + "type": "int" + } }, { - "args": [ - { - "literal": "2", - "type": "int" - }, - { - "literal": "256", - "type": "int" - } - ], - "arity": 2, - "symbol": "^" + "literal": "1461501637330902918203684832716283019655932542975", + "type": "int" } ], "arity": 2, - "symbol": "<" + "symbol": "<=" } ], "arity": 2, - "symbol": "=>" + "symbol": "and" }, { "args": [ { "args": [ { - "ethEnv": "Caller", + "literal": "0", "type": "int" }, { @@ -2829,195 +2945,29 @@ "type": "Address" }, "kind": "Var", - "var": "src" + "var": "dst" }, "type": "int" } } ], "arity": 2, - "symbol": "=/=" + "symbol": "<=" }, { "args": [ { - "literal": "0", - "type": "int" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "allowance" - } - }, - "type": "int" - } - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "-" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "=>" - }, - { - "args": [ - { - "ethEnv": "Callvalue", - "type": "int" - }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 2, - "symbol": "==" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" + }, + "type": "int" + } }, { "literal": "1461501637330902918203684832716283019655932542975", @@ -3031,60 +2981,6 @@ "arity": 2, "symbol": "and" }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, { "args": [ { @@ -3107,7 +3003,7 @@ "type": "Address" }, "kind": "Var", - "var": "src" + "var": "dst" }, "type": "int" } @@ -3146,7 +3042,7 @@ "type": "Address" }, "kind": "Var", - "var": "src" + "var": "dst" }, "type": "int" } @@ -3199,20 +3095,28 @@ "type": "Address" }, "kind": "Var", - "var": "dst" + "var": "src" }, "type": "int" } }, "kind": "TypedExpr", "type": "int" + }, + { + "expression": { + "ethEnv": "Caller", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" } ], "kind": "Mapping", "reference": { "contract": "Token", "kind": "SVar", - "svar": "balanceOf" + "svar": "allowance" } }, "type": "int" @@ -3238,20 +3142,28 @@ "type": "Address" }, "kind": "Var", - "var": "dst" + "var": "src" }, "type": "int" } }, "kind": "TypedExpr", "type": "int" + }, + { + "expression": { + "ethEnv": "Caller", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" } ], "kind": "Mapping", "reference": { "contract": "Token", "kind": "SVar", - "svar": "balanceOf" + "svar": "allowance" } }, "type": "int" @@ -3278,18 +3190,8 @@ "type": "int" }, { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } + "ethEnv": "Caller", + "type": "int" } ], "arity": 2, @@ -3298,21 +3200,11 @@ { "args": [ { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } + "ethEnv": "Caller", + "type": "int" }, { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "literal": "1461501637330902918203684832716283019655932542975", "type": "int" } ], @@ -3332,37 +3224,8 @@ "type": "int" }, { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } + "ethEnv": "Callvalue", + "type": "int" } ], "arity": 2, @@ -3371,37 +3234,8 @@ { "args": [ { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } + "ethEnv": "Callvalue", + "type": "int" }, { "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", @@ -3414,135 +3248,253 @@ ], "arity": 2, "symbol": "and" + } + ], + "returns": { + "expression": { + "literal": "1", + "type": "int" }, + "kind": "TypedExpr", + "type": "int" + }, + "stateUpdates": [ { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, + "location": { + "item": { + "indexes": [ { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" } ], - "arity": 2, - "symbol": "<=" + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" + "type": "int" + }, + "value": { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + } + }, + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", + "kind": "Var", + "var": "amount" + }, "type": "int" } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" + } + ], + "arity": 2, + "symbol": "-" + } }, { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, + "location": { + "item": { + "indexes": [ { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" } ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + }, + "value": { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + } + }, + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", + "kind": "Var", + "var": "amount" + }, "type": "int" } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, + } + ], + "arity": 2, + "symbol": "+" + } + } + ] + }, + { + "case": [ { "args": [ { "args": [ { - "literal": "0", - "type": "int" + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "=/=" }, { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" + "args": [ + { + "ethEnv": "Caller", + "type": "int" }, - "type": "int" - } + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "=/=" } ], "arity": 2, - "symbol": "<=" + "symbol": "and" }, { "args": [ @@ -3550,27 +3502,109 @@ "timing": "Pre", "var": { "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + { + "expression": { + "ethEnv": "Caller", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "allowance" + } }, "type": "int" } }, { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" + "args": [ + { + "args": [ + { + "literal": "2", + "type": "int" + }, + { + "literal": "256", + "type": "int" + } + ], + "arity": 2, + "symbol": "^" + }, + { + "literal": "1", + "type": "int" + } + ], + "arity": 2, + "symbol": "-" } ], "arity": 2, - "symbol": "<=" + "symbol": "==" } ], "arity": 2, "symbol": "and" - }, + } + ], + "contract": "Token", + "interface": { + "args": [ + { + "abitype": { + "type": "Address" + }, + "id": "\"src\"", + "kind": "Declaration" + }, + { + "abitype": { + "type": "Address" + }, + "id": "\"dst\"", + "kind": "Declaration" + }, + { + "abitype": { + "size": "256", + "type": "UInt" + }, + "id": "\"amount\"", + "kind": "Declaration" + } + ], + "id": "\"transferFrom\"", + "kind": "Interface" + }, + "kind": "Behaviour", + "name": "transferFrom", + "pointers": [], + "postConditions": [ { "args": [ { @@ -3580,7 +3614,7 @@ "type": "int" }, { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ @@ -3593,7 +3627,7 @@ "type": "Address" }, "kind": "Var", - "var": "dst" + "var": "src" }, "type": "int" } @@ -3619,7 +3653,7 @@ { "args": [ { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ @@ -3632,7 +3666,7 @@ "type": "Address" }, "kind": "Var", - "var": "dst" + "var": "src" }, "type": "int" } @@ -3672,113 +3706,7 @@ "type": "int" }, { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ @@ -3791,28 +3719,20 @@ "type": "Address" }, "kind": "Var", - "var": "src" + "var": "dst" }, "type": "int" } }, "kind": "TypedExpr", "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" } ], "kind": "Mapping", "reference": { "contract": "Token", "kind": "SVar", - "svar": "allowance" + "svar": "balanceOf" } }, "type": "int" @@ -3825,7 +3745,7 @@ { "args": [ { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ @@ -3838,28 +3758,20 @@ "type": "Address" }, "kind": "Var", - "var": "src" + "var": "dst" }, "type": "int" } }, "kind": "TypedExpr", "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" } ], "kind": "Mapping", "reference": { "contract": "Token", "kind": "SVar", - "svar": "allowance" + "svar": "balanceOf" } }, "type": "int" @@ -3876,69 +3788,66 @@ ], "arity": 2, "symbol": "and" - }, + } + ], + "preConditions": [ { "args": [ { - "args": [ - { - "literal": "0", - "type": "int" + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "amount" }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" + "type": "int" + } }, { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } }, - "kind": "Var", - "var": "amount" - }, - "type": "int" + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" } }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" + "type": "int" + } } ], "arity": 2, - "symbol": "and" + "symbol": "<=" }, { "args": [ { "args": [ - { - "literal": "0", - "type": "int" - }, { "timing": "Pre", "var": { @@ -3951,13 +3860,7 @@ }, "type": "int" } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ + }, { "timing": "Pre", "var": { @@ -3966,50 +3869,100 @@ "type": "Address" }, "kind": "Var", - "var": "src" + "var": "dst" }, "type": "int" } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" } ], "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ + "symbol": "=/=" + }, { "args": [ { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + } }, - "type": "int" - } + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "amount" + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "+" + }, + { + "args": [ + { + "literal": "2", + "type": "int" + }, + { + "literal": "256", + "type": "int" + } + ], + "arity": 2, + "symbol": "^" } ], "arity": 2, - "symbol": "<=" - }, + "symbol": "<" + } + ], + "arity": 2, + "symbol": "=>" + }, + { + "args": [ { "args": [ + { + "ethEnv": "Caller", + "type": "int" + }, { "timing": "Pre", "var": { @@ -4018,14 +3971,81 @@ "type": "Address" }, "kind": "Var", - "var": "dst" + "var": "src" }, "type": "int" } - }, + } + ], + "arity": 2, + "symbol": "=/=" + }, + { + "args": [ { - "literal": "1461501637330902918203684832716283019655932542975", + "literal": "0", "type": "int" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + { + "expression": { + "ethEnv": "Caller", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "allowance" + } + }, + "type": "int" + } + }, + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "amount" + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "-" } ], "arity": 2, @@ -4033,7 +4053,21 @@ } ], "arity": 2, - "symbol": "and" + "symbol": "=>" + }, + { + "args": [ + { + "ethEnv": "Callvalue", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 2, + "symbol": "==" }, { "args": [ @@ -4047,31 +4081,11 @@ "timing": "Pre", "var": { "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" }, "type": "int" } @@ -4086,37 +4100,17 @@ "timing": "Pre", "var": { "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" }, "type": "int" } }, { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "literal": "1461501637330902918203684832716283019655932542975", "type": "int" } ], @@ -4143,7 +4137,7 @@ "type": "Address" }, "kind": "Var", - "var": "src" + "var": "dst" }, "type": "int" } @@ -4162,7 +4156,7 @@ "type": "Address" }, "kind": "Var", - "var": "src" + "var": "dst" }, "type": "int" } @@ -4255,7 +4249,7 @@ "type": "Address" }, "kind": "Var", - "var": "dst" + "var": "src" }, "type": "int" } @@ -4294,7 +4288,7 @@ "type": "Address" }, "kind": "Var", - "var": "dst" + "var": "src" }, "type": "int" } @@ -4337,18 +4331,38 @@ "timing": "Pre", "var": { "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" }, { "args": [ @@ -4356,17 +4370,37 @@ "timing": "Pre", "var": { "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } }, "type": "int" } }, { - "literal": "1461501637330902918203684832716283019655932542975", + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", "type": "int" } ], @@ -4440,8 +4474,37 @@ "type": "int" }, { - "ethEnv": "Caller", - "type": "int" + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + } } ], "arity": 2, @@ -4450,11 +4513,40 @@ { "args": [ { - "ethEnv": "Caller", - "type": "int" + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + } }, { - "literal": "1461501637330902918203684832716283019655932542975", + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", "type": "int" } ], @@ -4474,8 +4566,17 @@ "type": "int" }, { - "ethEnv": "Callvalue", - "type": "int" + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } } ], "arity": 2, @@ -4484,11 +4585,20 @@ { "args": [ { - "ethEnv": "Callvalue", - "type": "int" + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } }, { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "literal": "1461501637330902918203684832716283019655932542975", "type": "int" } ], @@ -4498,256 +4608,159 @@ ], "arity": 2, "symbol": "and" - } - ], - "returns": { - "expression": { - "literal": "1", - "type": "int" }, - "kind": "TypedExpr", - "type": "int" - }, - "stateUpdates": [ { - "location": { - "item": { - "indexes": [ + "args": [ + { + "args": [ { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", + "literal": "0", "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" + }, + "type": "int" + } } ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } + "arity": 2, + "symbol": "<=" }, - "type": "int" - }, - "value": { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" }, - "kind": "Var", - "var": "amount" - }, + "type": "int" + } + }, + { + "literal": "1461501637330902918203684832716283019655932542975", "type": "int" } - } - ], - "arity": 2, - "symbol": "-" - } + ], + "arity": 2, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" }, { - "location": { - "item": { - "indexes": [ + "args": [ + { + "args": [ { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - "kind": "TypedExpr", + "literal": "0", "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - }, - "value": { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" }, - "kind": "Var", - "var": "amount" - }, - "type": "int" + "type": "int" + } } - } - ], - "arity": 2, - "symbol": "+" - } - } - ] - }, - { - "case": [ - { - "args": [ + ], + "arity": 2, + "symbol": "<=" + }, { "args": [ { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" + }, + "type": "int" + } }, - "kind": "Var", - "var": "src" - }, - "type": "int" + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" } }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "=/=" + "type": "int" + } }, { - "args": [ - { - "ethEnv": "Caller", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "=/=" + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" } ], "arity": 2, - "symbol": "and" - }, + "symbol": "<=" + } + ], + "arity": 2, + "symbol": "and" + }, + { + "args": [ { "args": [ + { + "literal": "0", + "type": "int" + }, { "timing": "Pre", "var": { @@ -4788,83 +4801,15 @@ }, "type": "int" } - }, + } + ], + "arity": 2, + "symbol": "<=" + }, + { + "args": [ { - "args": [ - { - "args": [ - { - "literal": "2", - "type": "int" - }, - { - "literal": "256", - "type": "int" - } - ], - "arity": 2, - "symbol": "^" - }, - { - "literal": "1", - "type": "int" - } - ], - "arity": 2, - "symbol": "-" - } - ], - "arity": 2, - "symbol": "==" - } - ], - "arity": 2, - "symbol": "and" - } - ], - "contract": "Token", - "interface": { - "args": [ - { - "abitype": { - "type": "Address" - }, - "id": "\"src\"", - "kind": "Declaration" - }, - { - "abitype": { - "type": "Address" - }, - "id": "\"dst\"", - "kind": "Declaration" - }, - { - "abitype": { - "size": "256", - "type": "UInt" - }, - "id": "\"amount\"", - "kind": "Declaration" - } - ], - "id": "\"transferFrom\"", - "kind": "Interface" - }, - "kind": "Behaviour", - "name": "transferFrom", - "pointers": [], - "postConditions": [ - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Post", + "timing": "Pre", "var": { "item": { "indexes": [ @@ -4884,42 +4829,11 @@ }, "kind": "TypedExpr", "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Post", - "var": { - "item": { - "indexes": [ + }, { "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } + "ethEnv": "Caller", + "type": "int" }, "kind": "TypedExpr", "type": "int" @@ -4929,7 +4843,7 @@ "reference": { "contract": "Token", "kind": "SVar", - "svar": "balanceOf" + "svar": "allowance" } }, "type": "int" @@ -4956,37 +4870,8 @@ "type": "int" }, { - "timing": "Post", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } + "ethEnv": "Caller", + "type": "int" } ], "arity": 2, @@ -4995,40 +4880,11 @@ { "args": [ { - "timing": "Post", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } + "ethEnv": "Caller", + "type": "int" }, { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "literal": "1461501637330902918203684832716283019655932542975", "type": "int" } ], @@ -5038,3205 +4894,287 @@ ], "arity": 2, "symbol": "and" - } - ], - "preConditions": [ + }, { "args": [ { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" + "args": [ + { + "literal": "0", + "type": "int" }, - "type": "int" - } + { + "ethEnv": "Callvalue", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" }, { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } + "args": [ + { + "ethEnv": "Callvalue", + "type": "int" }, - "type": "int" - } + { + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "type": "int" + } + ], + "arity": 2, + "symbol": "<=" } ], "arity": 2, - "symbol": "<=" + "symbol": "and" + } + ], + "returns": { + "expression": { + "literal": "1", + "type": "int" }, - { - "args": [ - { - "args": [ + "kind": "TypedExpr", + "type": "int" + }, + "stateUpdates": [ + { + "location": { + "item": { + "indexes": [ { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" }, - "kind": "Var", - "var": "src" + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + }, + "value": { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + } + }, + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" }, - "type": "int" - } - }, + "kind": "Var", + "var": "amount" + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "-" + } + }, + { + "location": { + "item": { + "indexes": [ { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" } ], - "arity": 2, - "symbol": "=/=" + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } }, - { - "args": [ - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } + "type": "int" + }, + "value": { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" + "kind": "Var", + "var": "dst" + }, + "type": "int" } }, + "kind": "TypedExpr", "type": "int" } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + } + }, + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" }, + "kind": "Var", + "var": "amount" + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "+" + } + } + ] + }, + { + "case": [ + { + "args": [ + { + "args": [ + { + "args": [ { "timing": "Pre", "var": { "item": { "abitype": { - "size": "256", - "type": "UInt" + "type": "Address" }, "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "+" - }, - { - "args": [ - { - "literal": "2", - "type": "int" - }, - { - "literal": "256", - "type": "int" - } - ], - "arity": 2, - "symbol": "^" - } - ], - "arity": 2, - "symbol": "<" - } - ], - "arity": 2, - "symbol": "=>" - }, - { - "args": [ - { - "args": [ - { - "ethEnv": "Caller", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "=/=" - }, - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "allowance" - } + "var": "src" }, "type": "int" } }, { "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "-" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "=>" - }, - { - "args": [ - { - "ethEnv": "Callvalue", - "type": "int" - }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 2, - "symbol": "==" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "allowance" - } - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "allowance" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "allowance" - } - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "allowance" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "ethEnv": "Caller", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "ethEnv": "Caller", - "type": "int" - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "ethEnv": "Callvalue", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "ethEnv": "Callvalue", - "type": "int" - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - } - ], - "returns": { - "expression": { - "literal": "1", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - }, - "stateUpdates": [ - { - "location": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - }, - "value": { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "-" - } - }, - { - "location": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - }, - "value": { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "+" - } - } - ] - }, - { - "case": [ - { - "args": [ - { - "args": [ - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "=/=" - }, - { - "args": [ - { - "ethEnv": "Caller", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "=/=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "allowance" - } - }, - "type": "int" - } - }, - { - "args": [ - { - "args": [ - { - "literal": "2", - "type": "int" - }, - { - "literal": "256", - "type": "int" - } - ], - "arity": 2, - "symbol": "^" - }, - { - "literal": "1", - "type": "int" - } - ], - "arity": 2, - "symbol": "-" - } - ], - "arity": 2, - "symbol": "<" - } - ], - "arity": 2, - "symbol": "and" - } - ], - "contract": "Token", - "interface": { - "args": [ - { - "abitype": { - "type": "Address" - }, - "id": "\"src\"", - "kind": "Declaration" - }, - { - "abitype": { - "type": "Address" - }, - "id": "\"dst\"", - "kind": "Declaration" - }, - { - "abitype": { - "size": "256", - "type": "UInt" - }, - "id": "\"amount\"", - "kind": "Declaration" - } - ], - "id": "\"transferFrom\"", - "kind": "Interface" - }, - "kind": "Behaviour", - "name": "transferFrom", - "pointers": [], - "postConditions": [ - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Post", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "allowance" - } - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Post", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "allowance" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Post", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Post", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Post", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Post", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - } - ], - "preConditions": [ - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - }, - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "=/=" - }, - { - "args": [ - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "+" - }, - { - "args": [ - { - "literal": "2", - "type": "int" - }, - { - "literal": "256", - "type": "int" - } - ], - "arity": 2, - "symbol": "^" - } - ], - "arity": 2, - "symbol": "<" - } - ], - "arity": 2, - "symbol": "=>" - }, - { - "args": [ - { - "args": [ - { - "ethEnv": "Caller", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "=/=" - }, - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "allowance" - } - }, - "type": "int" - } - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "-" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "=>" - }, - { - "args": [ - { - "ethEnv": "Callvalue", - "type": "int" - }, - { - "literal": "0", - "type": "int" - } - ], - "arity": 2, - "symbol": "==" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "allowance" - } - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "allowance" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "=/=" }, { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } + "args": [ + { + "ethEnv": "Caller", + "type": "int" + }, + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" + "kind": "Var", + "var": "src" + }, + "type": "int" } - }, - "type": "int" - } + } + ], + "arity": 2, + "symbol": "=/=" } ], "arity": 2, - "symbol": "<=" + "symbol": "and" }, { "args": [ @@ -8261,56 +5199,11 @@ }, "kind": "TypedExpr", "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "indexes": [ + }, { "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } + "ethEnv": "Caller", + "type": "int" }, "kind": "TypedExpr", "type": "int" @@ -8320,117 +5213,78 @@ "reference": { "contract": "Token", "kind": "SVar", - "svar": "balanceOf" + "svar": "allowance" } }, "type": "int" } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ + }, { - "timing": "Pre", - "var": { - "item": { - "indexes": [ + "args": [ + { + "args": [ { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - "kind": "TypedExpr", + "literal": "2", + "type": "int" + }, + { + "literal": "256", "type": "int" } ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } + "arity": 2, + "symbol": "^" }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" + { + "literal": "1", + "type": "int" + } + ], + "arity": 2, + "symbol": "-" } ], "arity": 2, - "symbol": "<=" + "symbol": "<" } ], "arity": 2, "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" + } + ], + "contract": "Token", + "interface": { + "args": [ + { + "abitype": { + "type": "Address" }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, + "id": "\"src\"", + "kind": "Declaration" + }, + { + "abitype": { + "type": "Address" + }, + "id": "\"dst\"", + "kind": "Declaration" + }, + { + "abitype": { + "size": "256", + "type": "UInt" + }, + "id": "\"amount\"", + "kind": "Declaration" + } + ], + "id": "\"transferFrom\"", + "kind": "Interface" + }, + "kind": "Behaviour", + "name": "transferFrom", + "pointers": [], + "postConditions": [ { "args": [ { @@ -8440,7 +5294,7 @@ "type": "int" }, { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ @@ -8460,13 +5314,21 @@ }, "kind": "TypedExpr", "type": "int" + }, + { + "expression": { + "ethEnv": "Caller", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" } ], "kind": "Mapping", "reference": { "contract": "Token", "kind": "SVar", - "svar": "balanceOf" + "svar": "allowance" } }, "type": "int" @@ -8479,7 +5341,7 @@ { "args": [ { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ @@ -8499,13 +5361,21 @@ }, "kind": "TypedExpr", "type": "int" + }, + { + "expression": { + "ethEnv": "Caller", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" } ], "kind": "Mapping", "reference": { "contract": "Token", "kind": "SVar", - "svar": "balanceOf" + "svar": "allowance" } }, "type": "int" @@ -8532,163 +5402,7 @@ "type": "int" }, { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ @@ -8701,7 +5415,7 @@ "type": "Address" }, "kind": "Var", - "var": "dst" + "var": "src" }, "type": "int" } @@ -8727,7 +5441,7 @@ { "args": [ { - "timing": "Pre", + "timing": "Post", "var": { "item": { "indexes": [ @@ -8740,7 +5454,7 @@ "type": "Address" }, "kind": "Var", - "var": "dst" + "var": "src" }, "type": "int" } @@ -8780,15 +5494,34 @@ "type": "int" }, { - "timing": "Pre", + "timing": "Post", "var": { "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } }, "type": "int" } @@ -8800,15 +5533,34 @@ { "args": [ { - "timing": "Pre", + "timing": "Post", "var": { "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } }, "type": "int" } @@ -8824,15 +5576,66 @@ ], "arity": 2, "symbol": "and" + } + ], + "preConditions": [ + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "amount" + }, + "type": "int" + } + }, + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "<=" }, { "args": [ { "args": [ - { - "literal": "0", - "type": "int" - }, { "timing": "Pre", "var": { @@ -8845,13 +5648,7 @@ }, "type": "int" } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ + }, { "timing": "Pre", "var": { @@ -8860,122 +5657,183 @@ "type": "Address" }, "kind": "Var", - "var": "src" + "var": "dst" }, "type": "int" } + } + ], + "arity": 2, + "symbol": "=/=" + }, + { + "args": [ + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } + }, + "type": "int" + } + }, + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" + }, + "kind": "Var", + "var": "amount" + }, + "type": "int" + } + } + ], + "arity": 2, + "symbol": "+" }, { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" + "args": [ + { + "literal": "2", + "type": "int" + }, + { + "literal": "256", + "type": "int" + } + ], + "arity": 2, + "symbol": "^" } ], "arity": 2, - "symbol": "<=" + "symbol": "<" } ], "arity": 2, - "symbol": "and" + "symbol": "=>" }, { "args": [ { "args": [ { - "literal": "0", + "ethEnv": "Caller", "type": "int" }, { "timing": "Pre", "var": { "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "allowance" - } + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" }, "type": "int" } } ], "arity": 2, - "symbol": "<=" + "symbol": "=/=" }, { "args": [ { - "timing": "Pre", - "var": { - "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" + "literal": "0", + "type": "int" + }, + { + "args": [ + { + "timing": "Pre", + "var": { + "item": { + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + { + "expression": { + "ethEnv": "Caller", + "type": "int" }, + "kind": "TypedExpr", "type": "int" } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "allowance" + } + }, + "type": "int" + } + }, + { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "size": "256", + "type": "UInt" }, - "kind": "TypedExpr", - "type": "int" + "kind": "Var", + "var": "amount" }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "allowance" + "type": "int" } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" + } + ], + "arity": 2, + "symbol": "-" } ], "arity": 2, @@ -8983,7 +5841,21 @@ } ], "arity": 2, - "symbol": "and" + "symbol": "=>" + }, + { + "args": [ + { + "ethEnv": "Callvalue", + "type": "int" + }, + { + "literal": "0", + "type": "int" + } + ], + "arity": 2, + "symbol": "==" }, { "args": [ @@ -8998,11 +5870,10 @@ "var": { "item": { "abitype": { - "size": "256", - "type": "UInt" + "type": "Address" }, "kind": "Var", - "var": "amount" + "var": "src" }, "type": "int" } @@ -9018,17 +5889,16 @@ "var": { "item": { "abitype": { - "size": "256", - "type": "UInt" + "type": "Address" }, "kind": "Var", - "var": "amount" + "var": "src" }, "type": "int" } }, { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "literal": "1461501637330902918203684832716283019655932542975", "type": "int" } ], @@ -9055,7 +5925,7 @@ "type": "Address" }, "kind": "Var", - "var": "src" + "var": "dst" }, "type": "int" } @@ -9074,7 +5944,7 @@ "type": "Address" }, "kind": "Var", - "var": "src" + "var": "dst" }, "type": "int" } @@ -9104,10 +5974,11 @@ "var": { "item": { "abitype": { - "type": "Address" + "size": "256", + "type": "UInt" }, "kind": "Var", - "var": "dst" + "var": "amount" }, "type": "int" } @@ -9123,16 +5994,17 @@ "var": { "item": { "abitype": { - "type": "Address" + "size": "256", + "type": "UInt" }, "kind": "Var", - "var": "dst" + "var": "amount" }, "type": "int" } }, { - "literal": "1461501637330902918203684832716283019655932542975", + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", "type": "int" } ], @@ -9280,21 +6152,13 @@ }, "kind": "TypedExpr", "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" } ], "kind": "Mapping", "reference": { "contract": "Token", "kind": "SVar", - "svar": "allowance" + "svar": "balanceOf" } }, "type": "int" @@ -9327,21 +6191,13 @@ }, "kind": "TypedExpr", "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" } ], "kind": "Mapping", "reference": { "contract": "Token", "kind": "SVar", - "svar": "allowance" + "svar": "balanceOf" } }, "type": "int" @@ -9371,11 +6227,31 @@ "timing": "Pre", "var": { "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } }, "type": "int" } @@ -9390,17 +6266,37 @@ "timing": "Pre", "var": { "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "dst" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } }, "type": "int" } }, { - "literal": "1461501637330902918203684832716283019655932542975", + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", "type": "int" } ], @@ -9622,11 +6518,10 @@ "var": { "item": { "abitype": { - "size": "256", - "type": "UInt" + "type": "Address" }, "kind": "Var", - "var": "amount" + "var": "dst" }, "type": "int" } @@ -9642,17 +6537,16 @@ "var": { "item": { "abitype": { - "size": "256", - "type": "UInt" + "type": "Address" }, "kind": "Var", - "var": "amount" + "var": "dst" }, "type": "int" } }, { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "literal": "1461501637330902918203684832716283019655932542975", "type": "int" } ], @@ -9767,64 +6661,39 @@ "timing": "Pre", "var": { "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + { + "expression": { + "ethEnv": "Caller", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "allowance" + } }, "type": "int" } @@ -9839,12 +6708,39 @@ "timing": "Pre", "var": { "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + { + "expression": { + "ethEnv": "Caller", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "allowance" + } }, "type": "int" } @@ -10552,224 +7448,12 @@ "type": "int" }, { - "literal": "0", - "type": "int" - } - ], - "arity": 2, - "symbol": "==" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" - }, - "type": "int" - } - }, - { - "literal": "1461501637330902918203684832716283019655932542975", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" + "literal": "0", + "type": "int" } ], "arity": 2, - "symbol": "and" + "symbol": "==" }, { "args": [ @@ -10783,31 +7467,11 @@ "timing": "Pre", "var": { "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" }, "type": "int" } @@ -10822,37 +7486,17 @@ "timing": "Pre", "var": { "item": { - "indexes": [ - { - "expression": { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "balanceOf" - } + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" }, "type": "int" } }, { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "literal": "1461501637330902918203684832716283019655932542975", "type": "int" } ], @@ -10879,7 +7523,7 @@ "type": "Address" }, "kind": "Var", - "var": "src" + "var": "dst" }, "type": "int" } @@ -10898,7 +7542,7 @@ "type": "Address" }, "kind": "Var", - "var": "src" + "var": "dst" }, "type": "int" } @@ -10928,10 +7572,11 @@ "var": { "item": { "abitype": { - "type": "Address" + "size": "256", + "type": "UInt" }, "kind": "Var", - "var": "src" + "var": "amount" }, "type": "int" } @@ -10947,16 +7592,17 @@ "var": { "item": { "abitype": { - "type": "Address" + "size": "256", + "type": "UInt" }, "kind": "Var", - "var": "src" + "var": "amount" }, "type": "int" } }, { - "literal": "1461501637330902918203684832716283019655932542975", + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", "type": "int" } ], @@ -10980,10 +7626,11 @@ "var": { "item": { "abitype": { - "type": "Address" + "size": "256", + "type": "UInt" }, "kind": "Var", - "var": "dst" + "var": "amount" }, "type": "int" } @@ -10999,16 +7646,17 @@ "var": { "item": { "abitype": { - "type": "Address" + "size": "256", + "type": "UInt" }, "kind": "Var", - "var": "dst" + "var": "amount" }, "type": "int" } }, { - "literal": "1461501637330902918203684832716283019655932542975", + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", "type": "int" } ], @@ -11041,7 +7689,7 @@ "type": "Address" }, "kind": "Var", - "var": "dst" + "var": "src" }, "type": "int" } @@ -11080,7 +7728,7 @@ "type": "Address" }, "kind": "Var", - "var": "dst" + "var": "src" }, "type": "int" } @@ -11124,11 +7772,10 @@ "var": { "item": { "abitype": { - "size": "256", - "type": "UInt" + "type": "Address" }, "kind": "Var", - "var": "amount" + "var": "src" }, "type": "int" } @@ -11144,17 +7791,16 @@ "var": { "item": { "abitype": { - "size": "256", - "type": "UInt" + "type": "Address" }, "kind": "Var", - "var": "amount" + "var": "src" }, "type": "int" } }, { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "literal": "1461501637330902918203684832716283019655932542975", "type": "int" } ], @@ -11181,7 +7827,7 @@ "type": "Address" }, "kind": "Var", - "var": "src" + "var": "dst" }, "type": "int" } @@ -11200,7 +7846,7 @@ "type": "Address" }, "kind": "Var", - "var": "src" + "var": "dst" }, "type": "int" } @@ -11239,28 +7885,20 @@ "type": "Address" }, "kind": "Var", - "var": "src" + "var": "dst" }, "type": "int" } }, "kind": "TypedExpr", "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" } ], "kind": "Mapping", "reference": { "contract": "Token", "kind": "SVar", - "svar": "allowance" + "svar": "balanceOf" } }, "type": "int" @@ -11286,141 +7924,27 @@ "type": "Address" }, "kind": "Var", - "var": "src" - }, - "type": "int" - } - }, - "kind": "TypedExpr", - "type": "int" - }, - { - "expression": { - "ethEnv": "Caller", - "type": "int" - }, - "kind": "TypedExpr", - "type": "int" - } - ], - "kind": "Mapping", - "reference": { - "contract": "Token", - "kind": "SVar", - "svar": "allowance" - } - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "amount" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "src" + "var": "dst" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "balanceOf" + } }, "type": "int" } }, { - "literal": "1461501637330902918203684832716283019655932542975", + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", "type": "int" } ], @@ -11443,11 +7967,39 @@ "timing": "Pre", "var": { "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + { + "expression": { + "ethEnv": "Caller", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "allowance" + } }, "type": "int" } @@ -11462,17 +8014,45 @@ "timing": "Pre", "var": { "item": { - "abitype": { - "type": "Address" - }, - "kind": "Var", - "var": "dst" + "indexes": [ + { + "expression": { + "timing": "Pre", + "var": { + "item": { + "abitype": { + "type": "Address" + }, + "kind": "Var", + "var": "src" + }, + "type": "int" + } + }, + "kind": "TypedExpr", + "type": "int" + }, + { + "expression": { + "ethEnv": "Caller", + "type": "int" + }, + "kind": "TypedExpr", + "type": "int" + } + ], + "kind": "Mapping", + "reference": { + "contract": "Token", + "kind": "SVar", + "svar": "allowance" + } }, "type": "int" } }, { - "literal": "1461501637330902918203684832716283019655932542975", + "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", "type": "int" } ], @@ -12312,168 +8892,6 @@ "arity": 2, "symbol": "and" }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "_totalSupply" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "_totalSupply" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "_totalSupply" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "_totalSupply" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, - { - "args": [ - { - "args": [ - { - "literal": "0", - "type": "int" - }, - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "_totalSupply" - }, - "type": "int" - } - } - ], - "arity": 2, - "symbol": "<=" - }, - { - "args": [ - { - "timing": "Pre", - "var": { - "item": { - "abitype": { - "size": "256", - "type": "UInt" - }, - "kind": "Var", - "var": "_totalSupply" - }, - "type": "int" - } - }, - { - "literal": "115792089237316195423570985008687907853269984665640564039457584007913129639935", - "type": "int" - } - ], - "arity": 2, - "symbol": "<=" - } - ], - "arity": 2, - "symbol": "and" - }, { "args": [ { diff --git a/tests/hevm/pass/multisource/multi1/file1.sol b/tests/hevm/pass/multisource/multi1/file1.sol new file mode 100644 index 00000000..eb17542e --- /dev/null +++ b/tests/hevm/pass/multisource/multi1/file1.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +interface A1 { + function setx(uint128 n) external; +} + +contract A2 { + A1 a; + + constructor(address c) { + a = A1(c); + } + + function setA1x(uint128 n) public { + a.setx(n); + } +} diff --git a/tests/hevm/pass/multisource/multi1/file2.vy b/tests/hevm/pass/multisource/multi1/file2.vy new file mode 100644 index 00000000..469312e8 --- /dev/null +++ b/tests/hevm/pass/multisource/multi1/file2.vy @@ -0,0 +1,10 @@ + +x: uint128 + +@deploy +def __init__(): + self.x = 0 + +@external +def setx(a: uint128): + self.x = a diff --git a/tests/hevm/pass/multisource/multi1/multi1.act b/tests/hevm/pass/multisource/multi1/multi1.act new file mode 100644 index 00000000..fd807911 --- /dev/null +++ b/tests/hevm/pass/multisource/multi1/multi1.act @@ -0,0 +1,37 @@ +constructor of A1 +interface constructor() + +iff + CALLVALUE == 0 + +creates + uint128 x := 0 + +behaviour setx of A1 +interface setx(uint128 n) + +iff + CALLVALUE == 0 + +storage + x => n + +constructor of A2 +interface constructor(address a) +pointers + a |-> A1 + +iff + CALLVALUE == 0 + +creates + A1 y := a + +behaviour setA1x of A2 +interface setA1x(uint128 n) + +iff + CALLVALUE == 0 + +storage + y.x => n diff --git a/tests/hevm/pass/multisource/multi1/multi1.json b/tests/hevm/pass/multisource/multi1/multi1.json new file mode 100644 index 00000000..d723f07a --- /dev/null +++ b/tests/hevm/pass/multisource/multi1/multi1.json @@ -0,0 +1,18 @@ +{ + "sources": { + "file1.sol" : { + "language" : "Solidity" + }, + "file2.vy" : { + "language" : "Vyper" + } + }, + "contracts" : { + "A1" : { + "source" : "file2.vy" + }, + "A2" : { + "source" : "file1.sol" + } + } +} diff --git a/tests/hevm/pass/multisource/multi2/file1.vy b/tests/hevm/pass/multisource/multi2/file1.vy new file mode 100644 index 00000000..c86d4167 --- /dev/null +++ b/tests/hevm/pass/multisource/multi2/file1.vy @@ -0,0 +1,12 @@ +interface A1: + def setx(n: uint128): nonpayable + +a: A1 + +@deploy +def __init__(c: address): + self.a = A1(c) + +@external +def setA1x(n: uint128): + extcall self.a.setx(n) diff --git a/tests/hevm/pass/multisource/multi2/file2.sol b/tests/hevm/pass/multisource/multi2/file2.sol new file mode 100644 index 00000000..4ae09b62 --- /dev/null +++ b/tests/hevm/pass/multisource/multi2/file2.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +contract A1 { + uint128 x = 0; + + + function setx(uint128 a) public { + x = a; + } +} diff --git a/tests/hevm/pass/multisource/multi2/multi2.act b/tests/hevm/pass/multisource/multi2/multi2.act new file mode 100644 index 00000000..7a773c2d --- /dev/null +++ b/tests/hevm/pass/multisource/multi2/multi2.act @@ -0,0 +1,37 @@ +constructor of A1 +interface constructor() + +iff + CALLVALUE == 0 + +creates + uint128 x := 0 + +behaviour setx of A1 +interface setx(uint128 n) + +iff + CALLVALUE == 0 + +storage + x => n + +constructor of A2 +interface constructor(address c) +pointers + c |-> A1 + +iff + CALLVALUE == 0 + +creates + A1 y := c + +behaviour setA1x of A2 +interface setA1x(uint128 n) + +iff + CALLVALUE == 0 + +storage + y.x => n diff --git a/tests/hevm/pass/multisource/multi2/multi2.json b/tests/hevm/pass/multisource/multi2/multi2.json new file mode 100644 index 00000000..9909cd80 --- /dev/null +++ b/tests/hevm/pass/multisource/multi2/multi2.json @@ -0,0 +1,18 @@ +{ + "sources": { + "file1.vy": { + "language" : "Vyper" + }, + "file2.sol" : { + "language" : "Solidity" + } + }, + "contracts" : { + "A1" : { + "source" : "file2.sol" + }, + "A2" : { + "source" : "file1.vy" + } + } +} diff --git a/tests/hevm/pass/vyper/erc20/erc20.act b/tests/hevm/pass/vyper/erc20/erc20.act new file mode 100644 index 00000000..abe97226 --- /dev/null +++ b/tests/hevm/pass/vyper/erc20/erc20.act @@ -0,0 +1,214 @@ +constructor of Token +interface constructor(uint256 _totalSupply) + +iff CALLVALUE == 0 + +creates + + uint256 totalSupply := _totalSupply + mapping(address => uint) balanceOf := [CALLER := _totalSupply] + mapping(address=>mapping(address=>uint)) allowance := [] + + +behaviour transfer of Token +interface transfer(uint256 value, address to) + +iff + + CALLVALUE == 0 + inRange(uint256, balanceOf[CALLER] - value) + CALLER =/= to => inRange(uint256, balanceOf[to] + value) + +case CALLER =/= to: + + storage + + balanceOf[CALLER] => balanceOf[CALLER] - value + balanceOf[to] => balanceOf[to] + value + + returns 1 + +case CALLER == to: + + returns 1 + + +behaviour transferFrom of Token +interface transferFrom(address src, address dst, uint amount) + +iff + + amount <= balanceOf[src] + src =/= dst => inRange(uint256, balanceOf[dst] + amount) + CALLER =/= src => inRange(uint256, allowance[src][CALLER] - amount) + CALLVALUE == 0 + +case src =/= dst and CALLER == src: + + storage + + balanceOf[src] => balanceOf[src] - amount + balanceOf[dst] => balanceOf[dst] + amount + + returns 1 + +case src =/= dst and CALLER =/= src and allowance[src][CALLER] == 2^256 - 1: + + storage + + balanceOf[src] => balanceOf[src] - amount + balanceOf[dst] => balanceOf[dst] + amount + + returns 1 + +case src =/= dst and CALLER =/= src and allowance[src][CALLER] < 2^256 - 1: + + storage + + allowance[src][CALLER] => allowance[src][CALLER] - amount + balanceOf[src] => balanceOf[src] - amount + balanceOf[dst] => balanceOf[dst] + amount + + returns 1 + +case src == dst and CALLER =/= src and allowance[src][CALLER] < 2^256 - 1: + + storage + + allowance[src][CALLER] => allowance[src][CALLER] - amount + + returns 1 + +case src == dst and (CALLER == src or allowance[src][CALLER] == 2^256 - 1): + + returns 1 + + +behaviour approve of Token +interface approve(address spender, uint amount) + +iff + + inRange(uint256, amount) + CALLVALUE == 0 + +case CALLER =/= spender: + + storage + + allowance[CALLER][spender] => amount + + returns 1 + +case CALLER == spender: + + returns 1 + + +behaviour burn of Token +interface burn(uint256 amount) + +iff + + CALLVALUE == 0 + inRange(uint256, totalSupply - amount) + inRange(uint256, balanceOf[CALLER] - amount) + +storage + + totalSupply => totalSupply - amount + balanceOf[CALLER] => balanceOf[CALLER] - amount + +returns 1 + + +behaviour burnFrom of Token +interface burnFrom(address src, uint256 amount) + +iff + amount <= totalSupply + amount <= balanceOf[src] + CALLER =/= src => amount <= allowance[src][CALLER] + CALLVALUE == 0 + +case CALLER =/= src and allowance[src][CALLER] == 2^256 - 1: + + storage + + totalSupply => totalSupply - amount + balanceOf[src] => balanceOf[src] - amount + + returns 1 + +case CALLER =/= src and allowance[src][CALLER] < 2^256 - 1: + + storage + + totalSupply => totalSupply - amount + allowance[src][CALLER] => allowance[src][CALLER] - amount + balanceOf[src] => balanceOf[src] - amount + + returns 1 + +case CALLER == src: + + storage + + totalSupply => totalSupply - amount + balanceOf[src] => balanceOf[src] - amount + + returns 1 + +ensures + + pre(balanceOf[src]) - post(balanceOf[src]) == pre(totalSupply) - post(totalSupply) + + +behaviour mint of Token +interface mint(address dst, uint256 amount) + +iff in range uint256 + + totalSupply + amount + balanceOf[dst] + amount + +iff + + CALLVALUE == 0 + +storage + + totalSupply => totalSupply + amount + balanceOf[dst] => balanceOf[dst] + amount + +returns 1 + + +// View functions: + +behaviour totalSupply of Token +interface totalSupply() + +iff + + CALLVALUE == 0 + +returns pre(totalSupply) + +behaviour balanceOf of Token +interface balanceOf(address idx) + +iff + + CALLVALUE == 0 + +returns pre(balanceOf[idx]) + +behaviour allowance of Token +interface allowance(address idx1, address idx2) + +iff + + CALLVALUE == 0 + +returns pre(allowance[idx1][idx2]) diff --git a/tests/hevm/pass/vyper/erc20/erc20.vy b/tests/hevm/pass/vyper/erc20/erc20.vy new file mode 100644 index 00000000..3e3764fd --- /dev/null +++ b/tests/hevm/pass/vyper/erc20/erc20.vy @@ -0,0 +1,51 @@ +# @version ^0.4.0 + +totalSupply: public(uint256) +balanceOf: public(HashMap[address, uint256]) +allowance: public(HashMap[address, HashMap[address, uint256]]) + +@deploy +def __init__(_totalSupply: uint256): + self.totalSupply = _totalSupply + self.balanceOf[msg.sender] = _totalSupply + +@external +def approve(spender: address, value_: uint256) -> bool: + if spender != msg.sender: + self.allowance[msg.sender][spender] = value_ + return True + +@external +def transfer(value_: uint256, to: address) -> bool: + self.balanceOf[msg.sender] = self.balanceOf[msg.sender] - value_ + self.balanceOf[to] = self.balanceOf[to] + value_ + return True + +@external +def transferFrom(from_: address, to: address, value_: uint256) -> bool: + if from_ != msg.sender and self.allowance[from_][msg.sender] != max_value(uint256): + self.allowance[from_][msg.sender] = self.allowance[from_][msg.sender] - value_ + self.balanceOf[from_] = self.balanceOf[from_] - value_ + self.balanceOf[to] = self.balanceOf[to] + value_ + return True + +@external +def burn(value_: uint256) -> bool: + self.totalSupply -= value_ + self.balanceOf[msg.sender] = self.balanceOf[msg.sender] - value_ + return True + +@external +def burnFrom(account: address, value_: uint256) -> bool: + if account != msg.sender and self.allowance[account][msg.sender] != max_value(uint256): + self.allowance[account][msg.sender] -= value_ + self.totalSupply -= value_ + self.balanceOf[account] -= value_ + return True + +@external +def mint(account: address, value_: uint256) -> bool: + self.totalSupply += value_ + self.balanceOf[account] += value_ + return True + diff --git a/tests/hevm/pass/vyper/short_ints_mapping/mapping.act b/tests/hevm/pass/vyper/short_ints_mapping/mapping.act new file mode 100644 index 00000000..94cc11d9 --- /dev/null +++ b/tests/hevm/pass/vyper/short_ints_mapping/mapping.act @@ -0,0 +1,26 @@ +constructor of A +interface constructor() + +iff + CALLVALUE == 0 + +creates + mapping(uint64 => mapping(uint128 => uint32)) m := [] + + +behaviour setm of A +interface setm(uint64 a, uint128 b, uint32 c) + +iff + CALLVALUE == 0 + +storage + m[a][b] => c + + +behaviour m of A +interface m(uint64 idx1, uint128 idx2) + +iff CALLVALUE == 0 + +returns pre(m[idx1][idx2]) diff --git a/tests/hevm/pass/vyper/short_ints_mapping/mapping.vy b/tests/hevm/pass/vyper/short_ints_mapping/mapping.vy new file mode 100644 index 00000000..fbe71cf1 --- /dev/null +++ b/tests/hevm/pass/vyper/short_ints_mapping/mapping.vy @@ -0,0 +1,10 @@ +m: public(HashMap[uint64, HashMap[uint128, uint32]]) + +@deploy +def __init__(a: uint64, b: uint128, c: uint32): + self.m[a][b] = c + +@external +def setm(a: uint64, b: uint128, c: uint32): + self.m[a][b] = c + From 200572178f5a62e75c0d12c0e2bb0de2719ccc76 Mon Sep 17 00:00:00 2001 From: lefterislazar Date: Mon, 29 Sep 2025 05:27:05 +0300 Subject: [PATCH 4/6] minor restoration --- src/Act/Syntax/Typed.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Act/Syntax/Typed.hs b/src/Act/Syntax/Typed.hs index c7caa29a..00ec70f5 100644 --- a/src/Act/Syntax/Typed.hs +++ b/src/Act/Syntax/Typed.hs @@ -102,6 +102,7 @@ data Constructor t = Constructor , _initialStorage :: [StorageUpdate t] } deriving (Show, Eq) + -- After typing each behavior may be split to multiple behaviors, one for each case branch. -- In this case, only the `_caseconditions`, `_stateUpdates`, and `_returns` fields are different. data Behaviour t = Behaviour From 28db59ce48aa16adfa37ac4766cadc50b1219eba Mon Sep 17 00:00:00 2001 From: lefterislazar Date: Mon, 29 Sep 2025 05:28:31 +0300 Subject: [PATCH 5/6] minor restoration 2 --- src/Act/HEVM.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Act/HEVM.hs b/src/Act/HEVM.hs index 5153d2c7..e764fd16 100644 --- a/src/Act/HEVM.hs +++ b/src/Act/HEVM.hs @@ -1079,6 +1079,7 @@ toVRes msg res = case res of EVM.Qed -> EVM.Qed EVM.Error e -> EVM.Error e + checkResult :: App m => Calldata -> Maybe Sig -> [EquivResult] -> m (Error String ()) checkResult calldata sig res = case any EVM.isCex res of From 003c0ed2f471f7c154fa1d77f3b65dc36e8d7485 Mon Sep 17 00:00:00 2001 From: lefterislazar Date: Thu, 2 Oct 2025 03:51:27 +0300 Subject: [PATCH 6/6] Code review corrections and test restructuring --- Makefile | 12 +- src/Act/CLI.hs | 106 ++++----- src/Act/Decompile.hs | 6 +- src/Act/HEVM.hs | 43 ++-- tests/coq/ERC20/erc20.act | 2 +- tests/hevm/pass/amm/amm.sol | 51 ----- tests/hevm/pass/{ => multisource}/amm/amm.act | 74 +++--- tests/hevm/pass/multisource/amm/amm.sol | 39 ++++ tests/hevm/pass/multisource/amm/amm.vy | 36 +++ tests/hevm/pass/multisource/amm/sol_sol.json | 12 + .../hevm/pass/multisource/amm/sol_vyper.json | 12 + .../hevm/pass/multisource/amm/vyper_sol.json | 12 + .../pass/{ => multisource}/erc20/erc20.act | 0 .../pass/{ => multisource}/erc20/erc20.sol | 0 .../{vyper => multisource}/erc20/erc20.vy | 0 tests/hevm/pass/multisource/erc20/sol.json | 10 + tests/hevm/pass/multisource/erc20/vyper.json | 10 + .../hevm/pass/multisource/multi1/multi1.json | 1 + .../hevm/pass/multisource/multi2/multi2.json | 1 + tests/hevm/pass/vyper/cases/cases.act | 34 +++ tests/hevm/pass/vyper/cases/cases.vy | 18 ++ tests/hevm/pass/vyper/erc20/erc20.act | 214 ------------------ .../pass/vyper/short_ints_mapping/mapping.act | 1 - 23 files changed, 307 insertions(+), 387 deletions(-) delete mode 100644 tests/hevm/pass/amm/amm.sol rename tests/hevm/pass/{ => multisource}/amm/amm.act (65%) create mode 100644 tests/hevm/pass/multisource/amm/amm.sol create mode 100644 tests/hevm/pass/multisource/amm/amm.vy create mode 100644 tests/hevm/pass/multisource/amm/sol_sol.json create mode 100644 tests/hevm/pass/multisource/amm/sol_vyper.json create mode 100644 tests/hevm/pass/multisource/amm/vyper_sol.json rename tests/hevm/pass/{ => multisource}/erc20/erc20.act (100%) rename tests/hevm/pass/{ => multisource}/erc20/erc20.sol (100%) rename tests/hevm/pass/{vyper => multisource}/erc20/erc20.vy (100%) create mode 100644 tests/hevm/pass/multisource/erc20/sol.json create mode 100644 tests/hevm/pass/multisource/erc20/vyper.json create mode 100644 tests/hevm/pass/vyper/cases/cases.act create mode 100644 tests/hevm/pass/vyper/cases/cases.vy delete mode 100644 tests/hevm/pass/vyper/erc20/erc20.act diff --git a/Makefile b/Makefile index 3356ee4c..659cbd32 100644 --- a/Makefile +++ b/Makefile @@ -42,17 +42,19 @@ postcondition_pass=$(wildcard tests/postconditions/pass/*.act) $(typing_pass) postcondition_fail=$(wildcard tests/postconditions/fail/*.act) # supposed to pass, but timeout -hevm_buggy=tests/hevm/pass/transfer/transfer.act +hevm_buggy=tests/hevm/pass/transfer/transfer.act tests/hevm/pass/multisource/amm/sol_vyper.json tests/hevm/pass/multisource/amm/vyper_sol.json # supposed to pass hevm_pass=$(filter-out $(hevm_buggy), $(wildcard tests/hevm/pass/*/*.act)) hevm_vy_pass=$(wildcard tests/hevm/pass/vyper/*/*.act) -hevm_multi_pass=$(wildcard tests/hevm/pass/multisource/*/*.act) +hevm_multi_pass=$(filter-out $(hevm_buggy), $(wildcard tests/hevm/pass/multisource/*/*.json)) # supposed to fail hevm_fail=$(wildcard tests/hevm/fail/*/*.act) # supposed to pass hevm_slow=tests/hevm/pass/amm/amm.act tests/hevm/pass/amm-2/amm-2.act +hevm_multi_slow=$(wildcard tests/hevm/pass/multisource/amm/*.json) $(wildcard tests/hevm/pass/multisource/erc20/*.json) # supposed to pass, no slow tests hevm_fast=$(filter-out $(hevm_slow), $(hevm_pass)) +hevm_multi_fast=$(filter-out $(hevm_multi_slow), $(hevm_multi_pass)) # supposed to pass failing_typing=tests/frontend/pass/dss/vat.act tests/frontend/pass/creation/createMultiple.act tests/frontend/pass/staticstore/staticstore.act @@ -71,7 +73,7 @@ test-type: parser compiler $(typing_pass:=.type.pass) $(typing_fail:=.type.fail) test-invariant: parser compiler $(invariant_pass:=.invariant.pass) $(invariant_fail:=.invariant.fail) test-postcondition: parser compiler $(postcondition_pass:=.postcondition.pass) $(postcondition_fail:=.postcondition.fail) test-hevm: parser compiler $(hevm_pass:=.hevm.pass) $(hevm_vy_pass:=.hevm.vy.pass) $(hevm_multi_pass:=.hevm.multi.pass) $(hevm_fail:=.hevm.fail) -test-hevm-fast: parser compiler $(hevm_fast:=.hevm.pass.fast) $(hevm_vy_pass:=.hevm.vy.pass) $(hevm_fail:=.hevm.fail) +test-hevm-fast: parser compiler $(hevm_fast:=.hevm.pass.fast) $(hevm_vy_pass:=.hevm.vy.pass) $(hevm_multi_fast:=.hevm.multi.pass) $(hevm_fail:=.hevm.fail) test-cabal: src/*.hs cabal v2-run test @@ -116,8 +118,8 @@ tests/hevm/pass/%.act.hevm.vy.pass: $(eval CONTRACT := $(shell awk '/contract/{ print $$2 }' tests/hevm/pass/$*.vy)) ./bin/act hevm --spec tests/hevm/pass/$*.act --vy tests/hevm/pass/$*.vy --solver bitwuzla --smttimeout 100000000 -tests/hevm/pass/%.act.hevm.multi.pass: - ./bin/act hevm --spec tests/hevm/pass/$*.act --sources tests/hevm/pass/$*.json --solver bitwuzla --smttimeout 100000000 +tests/hevm/pass/%.json.hevm.multi.pass: + ./bin/act hevm --sources tests/hevm/pass/$*.json --solver bitwuzla --smttimeout 100000000 tests/hevm/fail/%.act.hevm.fail: $(eval CONTRACT := $(shell awk '/contract/{ print $$2 }' tests/hevm/fail/$*.sol)) diff --git a/src/Act/CLI.hs b/src/Act/CLI.hs index 5ccd89cf..5b163f8f 100644 --- a/src/Act/CLI.hs +++ b/src/Act/CLI.hs @@ -82,7 +82,7 @@ data Command w , debug :: w ::: Bool "Print verbose SMT output (default: False)" } - | HEVM { spec :: w ::: String "Path to spec" + | HEVM { spec :: w ::: Maybe String "Path to spec" , sol :: w ::: Maybe String "Path to .sol" , vy :: w ::: Maybe String "Path to .vy" , code :: w ::: Maybe ByteString "Runtime code" @@ -252,96 +252,98 @@ decompile' solFile' cid solver' timeout debug' = do putStrLn (prettyAct s) -hevm :: FilePath -> Maybe FilePath -> Maybe FilePath -> Maybe ByteString -> Maybe ByteString -> Maybe FilePath -> Solvers.Solver -> Maybe Integer -> Bool -> IO () +hevm :: Maybe FilePath -> Maybe FilePath -> Maybe FilePath -> Maybe ByteString -> Maybe ByteString -> Maybe FilePath -> Solvers.Solver -> Maybe Integer -> Bool -> IO () hevm actspec sol' vy' code' initcode' sources' solver' timeout debug' = do let config = if debug' then debugActConfig else defaultActConfig cores <- liftM fromIntegral getNumProcessors - specContents <- readFile actspec - inputsMap <- processSources - proceed specContents (addBounds <$> compile specContents) $ \ (Act store contracts) -> do - (cmap, lmap) <- createContractMap contracts inputsMap + (actspecs, inputsMap) <- processSources + specsContents <- intercalate "\n" <$> traverse readFile actspecs + proceed specsContents (addBounds <$> compile specsContents) $ \ (Act store contracts) -> do + cmap <- createContractMap contracts inputsMap res <- runEnv (Env config) $ Solvers.withSolvers solver' cores 1 (naturalFromInteger <$> timeout) $ \solvers -> - checkContracts solvers store lmap cmap + checkContracts solvers store cmap case res of Success _ -> pure () Failure err -> prettyErrs "" err where -- Creates maps of storage layout modes and bytecodes, for all contracts contained in the given Act specification - createContractMap :: [Contract] -> Map (Maybe Id) (LayoutMode, ByteString, ByteString) -> IO (Map Id (Contract, BS.ByteString, BS.ByteString), Map Id LayoutMode) + createContractMap :: [Contract] -> Map (Maybe Id) (LayoutMode, ByteString, ByteString) -> IO (Map Id (Contract, BS.ByteString, BS.ByteString, LayoutMode)) createContractMap contracts inputsMap | Map.keys inputsMap == [Nothing] = -- Singleton inputsMap with Nothing as contract Id means that '--vy' was given case contracts of [spec'@(Contract cnstr _)] -> do let cid = _cname cnstr (_, initcode'', runtimecode') = fromJust $ Map.lookup Nothing inputsMap - pure (Map.singleton cid (spec', initcode'', runtimecode'), Map.singleton cid VyperLayout) - _ -> do - render (yellow "Warning: " <> text "Multiple contracts in spec mapped to a single Vyper file" <> line) - let (_, initcode'', runtimecode') = fromJust $ Map.lookup Nothing inputsMap - pure $ foldr (\spec'@(Contract cnstr _) (cmap, lmap) -> - let cid = _cname cnstr - in (Map.insert cid (spec', initcode'', runtimecode') cmap, Map.insert cid VyperLayout lmap) - ) (mempty,mempty) contracts + pure (Map.singleton cid (spec', initcode'', runtimecode', VyperLayout)) + _ -> render (text "Vyper file represents a single contract, while specification contains multiple contracts" <> line) >> exitFailure createContractMap contracts inputsMap = do - pure $ foldr (\spec'@(Contract cnstr _) (cmap, lmap) -> + pure $ foldr (\spec'@(Contract cnstr _) cmap -> let cid = _cname cnstr (layoutMode, initcode'', runtimecode') = fromMaybe (error $ "Contract " <> cid <> "not found in sources") $ Map.lookup (Just cid) inputsMap - in (Map.insert cid (spec', initcode'', runtimecode') cmap, Map.insert cid layoutMode lmap) - ) (mempty,mempty) contracts + in (Map.insert cid (spec', initcode'', runtimecode', layoutMode) cmap) + ) mempty contracts -- Creates a map of information for contracts available from source code or bytecode arguments - processSources :: IO (Map (Maybe Id) (LayoutMode, ByteString, ByteString)) + processSources :: IO ([FilePath], Map (Maybe Id) (LayoutMode, ByteString, ByteString)) processSources = - case (sources', sol', vy', code', initcode') of - (Just f, Nothing, Nothing, Nothing, Nothing) -> do + case (sources', actspec, sol', vy', code', initcode') of + (Just f, Nothing, Nothing, Nothing, Nothing, Nothing) -> do jsonContents <- TIO.readFile f - let (contractSources, sourceLangs) = + let (specs, contractSources, sourceLangs) = case readSourcesJSON jsonContents of Right res -> res Left err -> error err + let specs' = locateSpecs f specs let sourceLayouts = checkLanguages sourceLangs bytecodeMap <- compileSources f sourceLayouts - pure $ Map.fromList $ map (\(cid,src) -> - let src' = Text.unpack src - cid' = Text.unpack cid - sourceMap = fromMaybe (error $ "Source " <> Text.unpack src <> " of " <> cid' <> " not found in sources") $ Map.lookup src' bytecodeMap - layoutMode = fromJust $ Map.lookup src sourceLayouts - (initcode'', runtimecode') = case layoutMode of - SolidityLayout -> fromMaybe (error $ "Contract " <> cid' <> " not found in " <> src') $ Map.lookup (Just cid') sourceMap - VyperLayout -> fromJust $ Map.lookup Nothing sourceMap - in (Just cid', (layoutMode, initcode'', runtimecode'))) $ Map.toList contractSources - (Just _, Just _, _, _, _) -> render (text "Both a sources JSON file and Solidity file are given. Please specify only one.") >> exitFailure - (Just _, _, Just _, _, _) -> render (text "Both a sources JSON file and Vyper file are given. Please specify only one.") >> exitFailure - (Just _, _, _, Just _, _) -> render (text "Both a sources JSON file and runtime code are given. Please specify only one.") >> exitFailure - (Just _, _, _, _, Just _) -> render (text "Both a sources JSON file and initcode code are given. Please specify only one.") >> exitFailure - (Nothing, Just f, Nothing, Nothing, Nothing) -> do + let contractMap = Map.fromList $ map (\(cid,src) -> + let src' = Text.unpack src + cid' = Text.unpack cid + sourceMap = fromMaybe (error $ "Source " <> Text.unpack src <> " of " <> cid' <> " not found in sources") $ Map.lookup src' bytecodeMap + layoutMode = fromMaybe (error $ "Source " <> Text.unpack src <> " of " <> cid' <> " not found in sources") $ Map.lookup src sourceLayouts + (initcode'', runtimecode') = case layoutMode of + SolidityLayout -> fromMaybe (error $ "Contract " <> cid' <> " not found in " <> src') $ Map.lookup (Just cid') sourceMap + VyperLayout -> fromJust $ Map.lookup Nothing sourceMap + in (Just cid', (layoutMode, initcode'', runtimecode'))) $ Map.toList contractSources + pure (specs', contractMap) + (Just _, Just _, _, _, _, _) -> render (text "Both a sources JSON file and Act spec file are given. Please specify only one.") >> exitFailure + (Just _, _, Just _, _, _, _) -> render (text "Both a sources JSON file and Solidity file are given. Please specify only one.") >> exitFailure + (Just _, _, _, Just _, _, _) -> render (text "Both a sources JSON file and Vyper file are given. Please specify only one.") >> exitFailure + (Just _, _, _, _, Just _, _) -> render (text "Both a sources JSON file and runtime code are given. Please specify only one.") >> exitFailure + (Just _, _, _, _, _, Just _) -> render (text "Both a sources JSON file and initcode code are given. Please specify only one.") >> exitFailure + (Nothing, Nothing, _, _, _, _) -> render (text "No Act specification is given" <> line) >> exitFailure + (Nothing, Just a, Just f, Nothing, Nothing, Nothing) -> do bcs <- bytecodes f SolidityLayout - pure $ Map.map (\(b1,b2) -> (SolidityLayout, b1, b2)) bcs - (Nothing, Just _, Just _, _, _) -> render (text "Both Solidity and Vyper file are given. Please specify only one." <> line) >> exitFailure - (Nothing, Just _, _, Just _, _) -> render (text "Both Solidity file and runtime code are given. Please specify only one." <> line) >> exitFailure - (Nothing, Just _, _, _, Just _) -> render (text "Both Solidity file and initial code are given. Please specify only one." <> line) >> exitFailure - (Nothing, Nothing, Just f, Nothing, Nothing) -> do + pure ([a], Map.map (\(b1,b2) -> (SolidityLayout, b1, b2)) bcs) + (Nothing, _, Just _, Just _, _, _) -> render (text "Both Solidity and Vyper file are given. Please specify only one." <> line) >> exitFailure + (Nothing, _, Just _, _, Just _, _) -> render (text "Both Solidity file and runtime code are given. Please specify only one." <> line) >> exitFailure + (Nothing, _, Just _, _, _, Just _) -> render (text "Both Solidity file and initial code are given. Please specify only one." <> line) >> exitFailure + (Nothing, Just a, Nothing, Just f, Nothing, Nothing) -> do bcs <- bytecodes f VyperLayout - pure $ Map.map (\(b1,b2) -> (VyperLayout, b1, b2)) bcs - (Nothing, Nothing, Just _, Just _, _) -> render (text "Both Vyper file and runtime code are given. Please specify only one." <> line) >> exitFailure - (Nothing, Nothing, Just _, _, Just _) -> render (text "Both Vyper file and initial code are given. Please specify only one." <> line) >> exitFailure - (Nothing, Nothing, Nothing, Nothing, _) -> render (text "No runtime code is given" <> line) >> exitFailure - (Nothing, Nothing, Nothing, _, Nothing) -> render (text "No initial code is given" <> line) >> exitFailure - (Nothing, Nothing, Nothing, Just _, Just _) -> render (text "Only Solidity or Vyper files supported") >> exitFailure -- TODO pure (i, c) + pure ([a], Map.map (\(b1,b2) -> (VyperLayout, b1, b2)) bcs) + (Nothing, _, Nothing, Just _, Just _, _) -> render (text "Both Vyper file and runtime code are given. Please specify only one." <> line) >> exitFailure + (Nothing, _, Nothing, Just _, _, Just _) -> render (text "Both Vyper file and initial code are given. Please specify only one." <> line) >> exitFailure + (Nothing, _, Nothing, Nothing, Nothing, _) -> render (text "No runtime code is given" <> line) >> exitFailure + (Nothing, _, Nothing, Nothing, _, Nothing) -> render (text "No initial code is given" <> line) >> exitFailure + (Nothing, _, Nothing, Nothing, Just _, Just _) -> render (text "Only Solidity or Vyper files supported") >> exitFailure -- TODO pure (i, c) -readSourcesJSON :: Text -> Either String (Map Text Text, Map Text Text) +readSourcesJSON :: Text -> Either String ([Text], Map Text Text, Map Text Text) readSourcesJSON json = case eitherDecode $ BS.fromStrict $ encodeUtf8 json of Left s -> error s Right decoded -> do - (contractObjs,sourcesObjs) <- flip parseEither decoded $ \obj -> do + (specs, contractObjs, sourcesObjs) <- flip parseEither decoded $ \obj -> do + specs <- obj .: "specifications" contractsObjs <- obj .: "contracts" sourcesObjs <- obj .: "sources" - pure (contractsObjs, sourcesObjs) + pure (specs, contractsObjs, sourcesObjs) contractSources <- sequence (Map.map (parseEither (.: "source")) contractObjs) sourceLangs <- sequence (Map.map (parseEither (.: "language")) sourcesObjs) - pure (contractSources, sourceLangs) + pure (specs, contractSources, sourceLangs) + +locateSpecs :: FilePath -> [Text] -> [FilePath] +locateSpecs jsonPath specs = (() (takeDirectory jsonPath) . Text.unpack) <$> specs checkLanguages :: Map Text Text -> Map Text LayoutMode checkLanguages = Map.map (fromMaybe (error "Unknown language") . checkLanguage) diff --git a/src/Act/Decompile.hs b/src/Act/Decompile.hs index bec142e9..c8da786a 100644 --- a/src/Act/Decompile.hs +++ b/src/Act/Decompile.hs @@ -456,11 +456,11 @@ fromWord layout w = simplify <$> go w -- This compiles the generated act spec back down to an Expr and then checks that the two are equivalent verifyDecompilation :: App m => SolverGroup -> ByteString -> ByteString -> Act -> m (Error String ()) verifyDecompilation solvers creation runtime (Act store spec) = do - let (cmap,lmap) = case spec of + let cmap = case spec of [con@(Contract cnstr _)] -> - (Map.insert (_cname cnstr) (con, creation, runtime) mempty, Map.insert (_cname cnstr) SolidityLayout mempty) + (Map.insert (_cname cnstr) (con, creation, runtime, SolidityLayout) mempty) _ -> error "TODO multiple contracts" - checkContracts solvers store lmap cmap + checkContracts solvers store cmap -- Helpers ----------------------------------------------------------------------------------------- diff --git a/src/Act/HEVM.hs b/src/Act/HEVM.hs index e4dd90fb..75abe6dc 100644 --- a/src/Act/HEVM.hs +++ b/src/Act/HEVM.hs @@ -206,6 +206,8 @@ translateConstructor bytecode (Constructor cid iface _ preconds _ _ upds) cmap = cmap' <- applyUpdates initmap initmap upds -- After `addBounds`, `preconds` contains all integer locations that have been constrained in the Act spec. -- All must be enforced again to avoid discrepancies. Necessary for Vyper. + -- Note that since all locations are already in `preconds`, + -- there is no need to look at other fields. bounds <- storageBounds cmap $ nub $ concatMap locsFromExp preconds let acmap = abstractCmap initAddr cmap' pure ([simplify $ EVM.Success (snd calldata <> preconds' <> symAddrCnstr acmap) mempty (EVM.ConcreteBuf bytecode) (M.map fst cmap')], calldata, ifaceToSig iface, acmap, bounds) @@ -222,13 +224,21 @@ symAddrCnstr :: ContractMap -> [EVM.Prop] symAddrCnstr cmap = (\(a1, a2) -> EVM.PNeg (EVM.PEq (EVM.WAddr a1) (EVM.WAddr a2))) <$> comb (M.keys cmap) -translateBehvs :: Monad m => ContractMap -> [Behaviour] -> ActT m [(Id, [(EVM.Expr EVM.End, ContractMap, [EVM.Prop])], Calldata, Sig)] +translateBehvs :: Monad m => ContractMap -> [Behaviour] -> ActT m [(Id, [(EVM.Expr EVM.End, ContractMap)], Calldata, Sig, [EVM.Prop])] translateBehvs cmap behvs = do let groups = (groupBy sameIface behvs) :: [[Behaviour]] mapM (\behvs' -> do let calldata = behvCalldata behvs' - exprs <- mapM (translateBehv cmap (snd calldata)) behvs' - pure (behvName behvs', exprs, calldata, behvSig behvs)) groups + -- We collect all integer bounds from all cases of a given behaviour. + -- See `translateConstructor` on why only `_preconditions` are examined. + -- These bounds are set as preconditions for all cases of a behaviour, + -- even if some are not necessary for all cases, because the input space + -- must be compared against that of the symbolic execution. On that side, + -- it is not possible to distinguish between cases, so we make no distinction + -- here either. + bounds <- storageBounds cmap $ nub $ concatMap (concatMap locsFromExp . _preconditions) behvs' + exprs <- mapM (translateBehv cmap (snd calldata) bounds) behvs' + pure (behvName behvs', exprs, calldata, behvSig behvs, bounds)) groups where behvCalldata (Behaviour _ _ iface _ _ _ _ _ _:_) = makeCalldata iface behvCalldata [] = error "Internal error: behaviour groups cannot be empty" @@ -248,15 +258,14 @@ ifaceToSig (Interface name args) = Sig (T.pack name) (fmap fromdecl args) where fromdecl (Decl t _) = t -translateBehv :: Monad m => ContractMap -> [EVM.Prop] -> Behaviour -> ActT m (EVM.Expr EVM.End, ContractMap, [EVM.Prop]) -translateBehv cmap cdataprops (Behaviour _ _ _ _ preconds caseconds _ upds ret) = do +translateBehv :: Monad m => ContractMap -> [EVM.Prop] -> [EVM.Prop] -> Behaviour -> ActT m (EVM.Expr EVM.End, ContractMap) +translateBehv cmap cdataprops bounds (Behaviour _ _ _ _ preconds caseconds _ upds ret) = do preconds' <- mapM (toProp cmap) preconds caseconds' <- mapM (toProp cmap) caseconds ret' <- returnsToExpr cmap ret cmap' <- applyUpdates cmap cmap upds let acmap = abstractCmap initAddr cmap' - bounds <- storageBounds cmap $ nub $ concatMap locsFromExp preconds - pure (simplify $ EVM.Success (preconds' <> caseconds' <> cdataprops <> symAddrCnstr cmap') mempty ret' (M.map fst cmap'), acmap, bounds) + pure (simplify $ EVM.Success (preconds' <> bounds <> caseconds' <> cdataprops <> symAddrCnstr cmap') mempty ret' (M.map fst cmap'), acmap) applyUpdates :: Monad m => ContractMap -> ContractMap -> [StorageUpdate] -> ActT m ContractMap applyUpdates readMap writeMap upds = foldM (applyUpdate readMap) writeMap upds @@ -474,7 +483,7 @@ refOffset :: Monad m => ContractMap -> Ref k -> ActT m (EVM.Expr EVM.EWord, EVM. refOffset _ (CVar _ _ _) = error "Internal error: ill-typed entry" refOffset _ (SVar _ cid name) = do layout <- getLayout - let (slot, off, size, layoutMode) = getPosition layout cid name + let (slot, off, size, layoutMode) = getPosition layout cid name pure (EVM.Lit (fromIntegral slot), EVM.Lit $ fromIntegral off, size, layoutMode) refOffset cmap (SMapping _ ref typ ixs) = do (slot, _, _, layoutMode) <- refOffset cmap ref @@ -491,7 +500,7 @@ refOffset cmap (SMapping _ ref typ ixs) = do pure (addr, EVM.Lit 0, size, layoutMode) refOffset _ (SField _ _ cid name) = do layout <- getLayout - let (slot, off, size, layoutMode) = getPosition layout cid name + let (slot, off, size, layoutMode) = getPosition layout cid name pure (EVM.Lit (fromIntegral slot), EVM.Lit $ fromIntegral off, size, layoutMode) refOffset _ (SArray _ _ _ _) = error "TODO" @@ -788,7 +797,7 @@ getInitContractState solvers iface pointers preconds cmap = do -- currently we check that all symbolic addresses are globaly unique, and fail otherwise -- (this is required for aliasing check to be sound when merging graphs -- In the future, we should implement an internal renaming of variables to ensure global - -- uniqueness of symbolic a)ddresses. + -- uniqueness of symbolic addresses.) checkUniqueAddr :: [ContractMap] -> Error String () checkUniqueAddr cmaps = @@ -825,10 +834,10 @@ checkBehaviours solvers (Contract _ behvs) actstorage = do let hevmstorage = translateCmap actstorage fresh <- getFresh actbehvs <- translateBehvs actstorage behvs - (fmap $ concatError def) $ forM actbehvs $ \(name,actbehv,calldata,sig) -> do - let (behvs', fcmaps, bounds) = unzip3 actbehv + (fmap $ concatError def) $ forM actbehvs $ \(name,actbehv,calldata,sig,bounds) -> do + let (behvs', fcmaps) = unzip actbehv - solbehvs <- lift $ removeFails <$> getRuntimeBranches solvers hevmstorage calldata (concat bounds) fresh + solbehvs <- lift $ removeFails <$> getRuntimeBranches solvers hevmstorage calldata bounds fresh lift $ showMsg $ "\x1b[1mChecking behavior \x1b[4m" <> name <> "\x1b[m of Act\x1b[m" -- equivalence check @@ -1033,9 +1042,11 @@ checkAbi solver contract cmap = do msg = "\x1b[1mThe following function selector results in behaviors not covered by the Act spec:\x1b[m" -checkContracts :: forall m. App m => SolverGroup -> Store -> M.Map Id LayoutMode -> M.Map Id (Contract, BS.ByteString, BS.ByteString) -> m (Error String ()) -checkContracts solvers store layoutmap codemap = - let actenv = ActEnv codemap 0 (slotMap store layoutmap) (EVM.SymAddr "entrypoint") Nothing in +checkContracts :: forall m. App m => SolverGroup -> Store -> M.Map Id (Contract, BS.ByteString, BS.ByteString, LayoutMode) -> m (Error String ()) +checkContracts solvers store codeLayoutMap = + let codemap = M.map (\(c,b1,b2,_) -> (c,b1,b2)) codeLayoutMap + layoutmap = M.map (\(_,_,_,l) -> l) codeLayoutMap + actenv = ActEnv codemap 0 (slotMap store layoutmap) (EVM.SymAddr "entrypoint") Nothing in fmap (concatError def) $ forM (M.toList codemap) (\(_, (contract, initcode, bytecode)) -> do showMsg $ "\x1b[1mChecking contract \x1b[4m" <> nameOfContract contract <> "\x1b[m" (res, actenv') <- flip runStateT actenv $ checkConstructors solvers initcode bytecode contract diff --git a/tests/coq/ERC20/erc20.act b/tests/coq/ERC20/erc20.act index 0e4bae8f..0a66752b 120000 --- a/tests/coq/ERC20/erc20.act +++ b/tests/coq/ERC20/erc20.act @@ -1 +1 @@ -../../hevm/pass/erc20/erc20.act \ No newline at end of file +../../hevm/pass/multisource/erc20/erc20.act \ No newline at end of file diff --git a/tests/hevm/pass/amm/amm.sol b/tests/hevm/pass/amm/amm.sol deleted file mode 100644 index 9e87dc06..00000000 --- a/tests/hevm/pass/amm/amm.sol +++ /dev/null @@ -1,51 +0,0 @@ -pragma solidity >=0.8.0; - -contract Token { - mapping (address => uint) public balanceOf; - - constructor(uint _totalSupply) { - balanceOf[msg.sender] = _totalSupply; - } - - - function transferFrom(uint256 value, address from, address to) public returns (uint) { - balanceOf[from] = balanceOf[from] - value; - balanceOf[to] = balanceOf[to] + value; - return 1; - } - -} - - -contract Amm { - - Token token0; - Token token1; - - constructor(address t0, address t1) { - require (t0 != t1); - token0 = Token(t0); - token1 = Token(t1); - } - - function swap0(uint256 amt) public returns (uint) { - uint256 reserve0 = token0.balanceOf(address(this)); - uint256 reserve1 = token1.balanceOf(address(this)); - - token0.transferFrom(amt, msg.sender, address(this)); - token1.transferFrom((reserve1*amt)/(reserve0+amt), address(this), msg.sender); - - return 1; - } - - function swap1(uint256 amt) public returns (uint) { - uint256 reserve0 = token0.balanceOf(address(this)); - uint256 reserve1 = token1.balanceOf(address(this)); - - token1.transferFrom(amt, msg.sender, address(this)); - token0.transferFrom((reserve0*amt)/(reserve1+amt), address(this), msg.sender); - - return 1; - } - -} diff --git a/tests/hevm/pass/amm/amm.act b/tests/hevm/pass/multisource/amm/amm.act similarity index 65% rename from tests/hevm/pass/amm/amm.act rename to tests/hevm/pass/multisource/amm/amm.act index e7a880eb..55ee98a1 100644 --- a/tests/hevm/pass/amm/amm.act +++ b/tests/hevm/pass/multisource/amm/amm.act @@ -1,45 +1,3 @@ -constructor of Token -interface constructor(uint _supply) - -iff - CALLVALUE == 0 - -creates - mapping(address => uint) balanceOf := [CALLER := _supply] - -behaviour balanceOf of Token -interface balanceOf(address a) - -iff - - CALLVALUE == 0 - -returns pre(balanceOf[a]) - - -behaviour transferFrom of Token -interface transferFrom(uint256 value, address from, address to) - -iff - - CALLVALUE == 0 - from =/= to => inRange(uint256, balanceOf[to] + value) - inRange(uint256,balanceOf[from] - value) - -case from =/= to: - - storage - - balanceOf[from] => balanceOf[from] - value - balanceOf[to] => balanceOf[to] + value - - returns 1 - -case from == to: - - returns 1 - - constructor of Amm interface constructor(address t0, address t1) @@ -64,13 +22,14 @@ iff CALLVALUE == 0 inRange(uint256,token0.balanceOf[CALLER] - amt) CALLER =/= THIS => inRange(uint256,token0.balanceOf[THIS] + amt) + CALLER =/= THIS => inRange(uint256,token0.allowance[CALLER][THIS] - amt) inRange(uint256,token1.balanceOf[THIS] - ((token1.balanceOf[THIS] * amt) / (token0.balanceOf[THIS] + amt))) CALLER =/= THIS => inRange(uint256,token1.balanceOf[CALLER] + ((token1.balanceOf[THIS] * amt) / (token0.balanceOf[THIS] + amt))) token0.balanceOf[THIS] + amt =/= 0 -case CALLER =/= THIS: +case CALLER =/= THIS and token0.allowance[CALLER][THIS] == 2^256 - 1: storage @@ -82,6 +41,19 @@ storage returns 1 +case CALLER =/= THIS and token0.allowance[CALLER][THIS] < 2^256 - 1: + +storage + + token0.balanceOf[CALLER] => token0.balanceOf[CALLER] - amt + token0.balanceOf[THIS] => token0.balanceOf[THIS] + amt + token0.allowance[CALLER][THIS] => token0.allowance[CALLER][THIS] - amt + + token1.balanceOf[THIS] => token1.balanceOf[THIS] - ((token1.balanceOf[THIS] * amt) / (token0.balanceOf[THIS] + amt)) + token1.balanceOf[CALLER] => token1.balanceOf[CALLER] + ((token1.balanceOf[THIS] * amt) / (token0.balanceOf[THIS] + amt)) + +returns 1 + case CALLER == THIS: returns 1 @@ -99,18 +71,32 @@ iff CALLVALUE == 0 inRange(uint256,token1.balanceOf[CALLER] - amt) CALLER =/= THIS => inRange(uint256,token1.balanceOf[THIS] + amt) + CALLER =/= THIS => inRange(uint256,token1.allowance[CALLER][THIS] - amt) inRange(uint256,token0.balanceOf[THIS] - ((token0.balanceOf[THIS] * amt) / (token1.balanceOf[THIS] + amt))) CALLER =/= THIS => inRange(uint256,token0.balanceOf[CALLER] + ((token0.balanceOf[THIS] * amt) / (token1.balanceOf[THIS] + amt))) token1.balanceOf[THIS] + amt =/= 0 -case CALLER =/= THIS: +case CALLER =/= THIS and token1.allowance[CALLER][THIS] == 2^256 - 1: + +storage + + token1.balanceOf[CALLER] => token1.balanceOf[CALLER] - amt + token1.balanceOf[THIS] => token1.balanceOf[THIS] + amt + + token0.balanceOf[THIS] => token0.balanceOf[THIS] - ((token0.balanceOf[THIS] * amt) / (token1.balanceOf[THIS] + amt)) + token0.balanceOf[CALLER] => token0.balanceOf[CALLER] + ((token0.balanceOf[THIS] * amt) / (token1.balanceOf[THIS] + amt)) + +returns 1 + +case CALLER =/= THIS and token1.allowance[CALLER][THIS] < 2^256 - 1: storage token1.balanceOf[CALLER] => token1.balanceOf[CALLER] - amt token1.balanceOf[THIS] => token1.balanceOf[THIS] + amt + token1.allowance[CALLER][THIS] => token1.allowance[CALLER][THIS] - amt token0.balanceOf[THIS] => token0.balanceOf[THIS] - ((token0.balanceOf[THIS] * amt) / (token1.balanceOf[THIS] + amt)) token0.balanceOf[CALLER] => token0.balanceOf[CALLER] + ((token0.balanceOf[THIS] * amt) / (token1.balanceOf[THIS] + amt)) diff --git a/tests/hevm/pass/multisource/amm/amm.sol b/tests/hevm/pass/multisource/amm/amm.sol new file mode 100644 index 00000000..6281fa9a --- /dev/null +++ b/tests/hevm/pass/multisource/amm/amm.sol @@ -0,0 +1,39 @@ +pragma solidity >=0.8.0; + +interface Token { + function balanceOf(address) external view returns (uint256); + function transferFrom(address from, address to, uint256 value) external returns (uint); +} + +contract Amm { + + Token token0; + Token token1; + + constructor(address t0, address t1) { + require (t0 != t1); + token0 = Token(t0); + token1 = Token(t1); + } + + function swap0(uint256 amt) public returns (uint) { + uint256 reserve0 = token0.balanceOf(address(this)); + uint256 reserve1 = token1.balanceOf(address(this)); + + token0.transferFrom(msg.sender, address(this), amt); + token1.transferFrom(address(this), msg.sender, (reserve1*amt)/(reserve0+amt)); + + return 1; + } + + function swap1(uint256 amt) public returns (uint) { + uint256 reserve0 = token0.balanceOf(address(this)); + uint256 reserve1 = token1.balanceOf(address(this)); + + token1.transferFrom(msg.sender, address(this), amt); + token0.transferFrom(address(this), msg.sender, (reserve0*amt)/(reserve1+amt)); + + return 1; + } + +} diff --git a/tests/hevm/pass/multisource/amm/amm.vy b/tests/hevm/pass/multisource/amm/amm.vy new file mode 100644 index 00000000..1d0a5f15 --- /dev/null +++ b/tests/hevm/pass/multisource/amm/amm.vy @@ -0,0 +1,36 @@ +#interface Token +# function balanceOf(address) external view returns (uint256); +# function transferFrom(address from, address to, uint256 value) external returns (uint); +#} +interface Token: + def balanceOf(of: address) -> uint256: view + def transferFrom(_from: address, _to: address, _value: uint256) -> uint256: nonpayable + +token0 : Token +token1 : Token + +@deploy +def __init__(t0: address, t1: address): + assert (t0 != t1) + self.token0 = Token(t0) + self.token1 = Token(t1) + +@external +def swap0(amt: uint256) -> uint256: + reserve0 : uint256 = staticcall self.token0.balanceOf(self) + reserve1 : uint256 = staticcall self.token1.balanceOf(self) + + extcall self.token0.transferFrom(msg.sender, self, amt) + extcall self.token1.transferFrom(self, msg.sender, (reserve1*amt)//(reserve0+amt)) + + return 1 + +@external +def swap1(amt: uint256) -> uint256: + reserve0 : uint256 = staticcall self.token0.balanceOf(self) + reserve1 : uint256 = staticcall self.token1.balanceOf(self) + + extcall self.token1.transferFrom(msg.sender, self, amt) + extcall self.token0.transferFrom(self, msg.sender, (reserve1*amt)//(reserve0+amt)) + + return 1 diff --git a/tests/hevm/pass/multisource/amm/sol_sol.json b/tests/hevm/pass/multisource/amm/sol_sol.json new file mode 100644 index 00000000..5bd61197 --- /dev/null +++ b/tests/hevm/pass/multisource/amm/sol_sol.json @@ -0,0 +1,12 @@ +{ + "specifications" : ["amm.act", "../erc20/erc20.act"], + "sources" : { + "../erc20/erc20.sol" : { "language" : "Solidity" }, + "amm.sol" : { "language" : "Solidity" } + }, + "contracts" : { + "Token" : { "source" : "../erc20/erc20.sol"}, + "Amm" : { "source" : "amm.sol"} + } +} + diff --git a/tests/hevm/pass/multisource/amm/sol_vyper.json b/tests/hevm/pass/multisource/amm/sol_vyper.json new file mode 100644 index 00000000..2d0b3f97 --- /dev/null +++ b/tests/hevm/pass/multisource/amm/sol_vyper.json @@ -0,0 +1,12 @@ +{ + "specifications" : ["amm.act", "../erc20/erc20.act"], + "sources" : { + "../erc20/erc20.vy" : { "language" : "Vyper" }, + "amm.sol" : { "language" : "Solidity" } + }, + "contracts" : { + "Token" : { "source" : "../erc20/erc20.vy"}, + "Amm" : { "source" : "amm.sol"} + } +} + diff --git a/tests/hevm/pass/multisource/amm/vyper_sol.json b/tests/hevm/pass/multisource/amm/vyper_sol.json new file mode 100644 index 00000000..66f4c0b6 --- /dev/null +++ b/tests/hevm/pass/multisource/amm/vyper_sol.json @@ -0,0 +1,12 @@ +{ + "specifications" : ["amm.act", "../erc20/erc20.act"], + "sources" : { + "../erc20/erc20.sol" : { "language" : "Solidity" }, + "amm.vy" : { "language" : "Vyper" } + }, + "contracts" : { + "Token" : { "source" : "../erc20/erc20.sol"}, + "Amm" : { "source" : "amm.vy"} + } +} + diff --git a/tests/hevm/pass/erc20/erc20.act b/tests/hevm/pass/multisource/erc20/erc20.act similarity index 100% rename from tests/hevm/pass/erc20/erc20.act rename to tests/hevm/pass/multisource/erc20/erc20.act diff --git a/tests/hevm/pass/erc20/erc20.sol b/tests/hevm/pass/multisource/erc20/erc20.sol similarity index 100% rename from tests/hevm/pass/erc20/erc20.sol rename to tests/hevm/pass/multisource/erc20/erc20.sol diff --git a/tests/hevm/pass/vyper/erc20/erc20.vy b/tests/hevm/pass/multisource/erc20/erc20.vy similarity index 100% rename from tests/hevm/pass/vyper/erc20/erc20.vy rename to tests/hevm/pass/multisource/erc20/erc20.vy diff --git a/tests/hevm/pass/multisource/erc20/sol.json b/tests/hevm/pass/multisource/erc20/sol.json new file mode 100644 index 00000000..fdc09733 --- /dev/null +++ b/tests/hevm/pass/multisource/erc20/sol.json @@ -0,0 +1,10 @@ +{ + "specifications" : ["erc20.act"], + "sources" : { + "erc20.sol" : { "language" : "Solidity" } + }, + "contracts" : { + "Token" : { "source" : "erc20.sol"} + } +} + diff --git a/tests/hevm/pass/multisource/erc20/vyper.json b/tests/hevm/pass/multisource/erc20/vyper.json new file mode 100644 index 00000000..1e9be1cf --- /dev/null +++ b/tests/hevm/pass/multisource/erc20/vyper.json @@ -0,0 +1,10 @@ +{ + "specifications" : ["erc20.act"], + "sources" : { + "erc20.vy" : { "language" : "Vyper" } + }, + "contracts" : { + "Token" : { "source" : "erc20.vy"} + } +} + diff --git a/tests/hevm/pass/multisource/multi1/multi1.json b/tests/hevm/pass/multisource/multi1/multi1.json index d723f07a..a09f4f1b 100644 --- a/tests/hevm/pass/multisource/multi1/multi1.json +++ b/tests/hevm/pass/multisource/multi1/multi1.json @@ -1,4 +1,5 @@ { + "specifications" : ["multi1.act"], "sources": { "file1.sol" : { "language" : "Solidity" diff --git a/tests/hevm/pass/multisource/multi2/multi2.json b/tests/hevm/pass/multisource/multi2/multi2.json index 9909cd80..206ded1d 100644 --- a/tests/hevm/pass/multisource/multi2/multi2.json +++ b/tests/hevm/pass/multisource/multi2/multi2.json @@ -1,4 +1,5 @@ { + "specifications" : ["multi2.act"], "sources": { "file1.vy": { "language" : "Vyper" diff --git a/tests/hevm/pass/vyper/cases/cases.act b/tests/hevm/pass/vyper/cases/cases.act new file mode 100644 index 00000000..ff5914e0 --- /dev/null +++ b/tests/hevm/pass/vyper/cases/cases.act @@ -0,0 +1,34 @@ +constructor of A +interface constructor() + +iff + CALLVALUE == 0 + +creates + uint128 x := 0 + mapping(uint128 => uint128) m := [] + + +behaviour f of A +interface f() + +iff + CALLVALUE == 0 + +case x > 2: + + storage + + x => m[2] + +case 1 <= x and x <= 2: + + storage + + x => m[3] + +case x < 1: + + storage + + x => m[x] diff --git a/tests/hevm/pass/vyper/cases/cases.vy b/tests/hevm/pass/vyper/cases/cases.vy new file mode 100644 index 00000000..95eddbf5 --- /dev/null +++ b/tests/hevm/pass/vyper/cases/cases.vy @@ -0,0 +1,18 @@ +# @version ^0.4.0 + +x: uint128 +m: HashMap[uint128, uint128] + +@deploy +def __init__(): + self.x = 0 + +@external +def f(): + if self.x > 2: + self.x = self.m[2] + else: + if 1 <= self.x and self.x <= 2: + self.x = self.m[3] + else: + self.x = self.m[self.x] diff --git a/tests/hevm/pass/vyper/erc20/erc20.act b/tests/hevm/pass/vyper/erc20/erc20.act deleted file mode 100644 index abe97226..00000000 --- a/tests/hevm/pass/vyper/erc20/erc20.act +++ /dev/null @@ -1,214 +0,0 @@ -constructor of Token -interface constructor(uint256 _totalSupply) - -iff CALLVALUE == 0 - -creates - - uint256 totalSupply := _totalSupply - mapping(address => uint) balanceOf := [CALLER := _totalSupply] - mapping(address=>mapping(address=>uint)) allowance := [] - - -behaviour transfer of Token -interface transfer(uint256 value, address to) - -iff - - CALLVALUE == 0 - inRange(uint256, balanceOf[CALLER] - value) - CALLER =/= to => inRange(uint256, balanceOf[to] + value) - -case CALLER =/= to: - - storage - - balanceOf[CALLER] => balanceOf[CALLER] - value - balanceOf[to] => balanceOf[to] + value - - returns 1 - -case CALLER == to: - - returns 1 - - -behaviour transferFrom of Token -interface transferFrom(address src, address dst, uint amount) - -iff - - amount <= balanceOf[src] - src =/= dst => inRange(uint256, balanceOf[dst] + amount) - CALLER =/= src => inRange(uint256, allowance[src][CALLER] - amount) - CALLVALUE == 0 - -case src =/= dst and CALLER == src: - - storage - - balanceOf[src] => balanceOf[src] - amount - balanceOf[dst] => balanceOf[dst] + amount - - returns 1 - -case src =/= dst and CALLER =/= src and allowance[src][CALLER] == 2^256 - 1: - - storage - - balanceOf[src] => balanceOf[src] - amount - balanceOf[dst] => balanceOf[dst] + amount - - returns 1 - -case src =/= dst and CALLER =/= src and allowance[src][CALLER] < 2^256 - 1: - - storage - - allowance[src][CALLER] => allowance[src][CALLER] - amount - balanceOf[src] => balanceOf[src] - amount - balanceOf[dst] => balanceOf[dst] + amount - - returns 1 - -case src == dst and CALLER =/= src and allowance[src][CALLER] < 2^256 - 1: - - storage - - allowance[src][CALLER] => allowance[src][CALLER] - amount - - returns 1 - -case src == dst and (CALLER == src or allowance[src][CALLER] == 2^256 - 1): - - returns 1 - - -behaviour approve of Token -interface approve(address spender, uint amount) - -iff - - inRange(uint256, amount) - CALLVALUE == 0 - -case CALLER =/= spender: - - storage - - allowance[CALLER][spender] => amount - - returns 1 - -case CALLER == spender: - - returns 1 - - -behaviour burn of Token -interface burn(uint256 amount) - -iff - - CALLVALUE == 0 - inRange(uint256, totalSupply - amount) - inRange(uint256, balanceOf[CALLER] - amount) - -storage - - totalSupply => totalSupply - amount - balanceOf[CALLER] => balanceOf[CALLER] - amount - -returns 1 - - -behaviour burnFrom of Token -interface burnFrom(address src, uint256 amount) - -iff - amount <= totalSupply - amount <= balanceOf[src] - CALLER =/= src => amount <= allowance[src][CALLER] - CALLVALUE == 0 - -case CALLER =/= src and allowance[src][CALLER] == 2^256 - 1: - - storage - - totalSupply => totalSupply - amount - balanceOf[src] => balanceOf[src] - amount - - returns 1 - -case CALLER =/= src and allowance[src][CALLER] < 2^256 - 1: - - storage - - totalSupply => totalSupply - amount - allowance[src][CALLER] => allowance[src][CALLER] - amount - balanceOf[src] => balanceOf[src] - amount - - returns 1 - -case CALLER == src: - - storage - - totalSupply => totalSupply - amount - balanceOf[src] => balanceOf[src] - amount - - returns 1 - -ensures - - pre(balanceOf[src]) - post(balanceOf[src]) == pre(totalSupply) - post(totalSupply) - - -behaviour mint of Token -interface mint(address dst, uint256 amount) - -iff in range uint256 - - totalSupply + amount - balanceOf[dst] + amount - -iff - - CALLVALUE == 0 - -storage - - totalSupply => totalSupply + amount - balanceOf[dst] => balanceOf[dst] + amount - -returns 1 - - -// View functions: - -behaviour totalSupply of Token -interface totalSupply() - -iff - - CALLVALUE == 0 - -returns pre(totalSupply) - -behaviour balanceOf of Token -interface balanceOf(address idx) - -iff - - CALLVALUE == 0 - -returns pre(balanceOf[idx]) - -behaviour allowance of Token -interface allowance(address idx1, address idx2) - -iff - - CALLVALUE == 0 - -returns pre(allowance[idx1][idx2]) diff --git a/tests/hevm/pass/vyper/short_ints_mapping/mapping.act b/tests/hevm/pass/vyper/short_ints_mapping/mapping.act index 94cc11d9..1d74b739 100644 --- a/tests/hevm/pass/vyper/short_ints_mapping/mapping.act +++ b/tests/hevm/pass/vyper/short_ints_mapping/mapping.act @@ -1,6 +1,5 @@ constructor of A interface constructor() - iff CALLVALUE == 0