From 4bb43181a948f21c8930301b25b63b0b88fe451e Mon Sep 17 00:00:00 2001 From: Stevengre Date: Sat, 18 Apr 2026 16:27:39 +0800 Subject: [PATCH 01/19] refactor(rt): externalize locals into slot-backed frames --- .gitignore | 3 +- kmir/src/kmir/_prove.py | 59 +- kmir/src/kmir/kast.py | 43 +- .../kmir/kdist/mir-semantics/intrinsics.md | 69 ++- kmir/src/kmir/kdist/mir-semantics/kmir-ast.md | 2 + kmir/src/kmir/kdist/mir-semantics/kmir.md | 168 +++--- .../kdist/mir-semantics/lemmas/kmir-lemmas.md | 40 +- .../kdist/mir-semantics/rt/configuration.md | 9 +- kmir/src/kmir/kdist/mir-semantics/rt/data.md | 538 ++++++------------ kmir/src/kmir/kdist/mir-semantics/rt/value.md | 22 +- kmir/src/kmir/kmir.py | 9 +- kmir/src/kmir/utils.py | 87 +-- kmir/src/kmir/value.py | 21 +- .../exec-smir/intrinsic/raw_eq_simple.state | 26 +- ...sert-true.main.cli-custom-printer.expected | 2 +- ...ert-true.main.cli-default-printer.expected | 2 +- .../prove-rs/slotstore-symbolic-branch.rs | 16 + .../tests/integration/test_decode_value.py | 2 + .../src/tests/integration/test_integration.py | 2 + 19 files changed, 534 insertions(+), 586 deletions(-) create mode 100644 kmir/src/tests/integration/data/prove-rs/slotstore-symbolic-branch.rs diff --git a/.gitignore b/.gitignore index 50c30ef5d..9670a8068 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ __pycache__/ kmir/src/tests/integration/data/**/target .DS_Store proof/ -/result* \ No newline at end of file +/result* +tmp* \ No newline at end of file diff --git a/kmir/src/kmir/_prove.py b/kmir/src/kmir/_prove.py index 61d2a352d..66115d88a 100644 --- a/kmir/src/kmir/_prove.py +++ b/kmir/src/kmir/_prove.py @@ -11,7 +11,7 @@ from pyk.kast.manip import abstract_term_safely, split_config_from from pyk.kcfg import KCFG from pyk.kcfg.explore import KCFGExplore -from pyk.kore.rpc import BoosterServer, KoreClient +from pyk.kore.rpc import BoosterServer, DefaultError, KoreClient from pyk.proof.proof import parallel_advance_proof from pyk.proof.reachability import APRProof, APRProver @@ -42,14 +42,14 @@ def prove(opts: ProveOpts) -> APRProof: if opts.proof_dir is not None: target_path = opts.proof_dir / label - return _prove(opts, target_path, label) + return _prove(opts, target_path, label, allow_rpc_recovery=False) with tempfile.TemporaryDirectory() as tmp_dir: target_path = Path(tmp_dir) - return _prove(opts, target_path, label) + return _prove(opts, target_path, label, allow_rpc_recovery=True) -def _prove(opts: ProveOpts, target_path: Path, label: str) -> APRProof: +def _prove(opts: ProveOpts, target_path: Path, label: str, *, allow_rpc_recovery: bool) -> APRProof: if not opts.reload and opts.proof_dir is not None and APRProof.proof_data_exists(label, opts.proof_dir): _LOGGER.info(f'Reading proof from disc: {opts.proof_dir}, {label}') proof = APRProof.read_proof_data(opts.proof_dir, label) @@ -97,12 +97,13 @@ def _prove(opts: ProveOpts, target_path: Path, label: str) -> APRProof: break_on_function=opts.break_on_function or None, ) + proof_root = opts.proof_dir if opts.proof_dir is not None else target_path proof = apr_proof_from_smir( kmir, label, smir_info, start_symbol=opts.start_symbol, - proof_dir=opts.proof_dir, + proof_dir=proof_root, ) if proof.proof_dir is not None and (proof.proof_dir / label).is_dir(): smir_info.dump(proof.proof_dir / proof.id / 'smir.json') @@ -127,12 +128,17 @@ def _prove(opts: ProveOpts, target_path: Path, label: str) -> APRProof: break_every_step=opts.break_every_step, break_on_function=opts.break_on_function, ) - - if opts.max_workers and opts.max_workers > 1: - _prove_parallel(kmir, proof, opts=opts, label=label, cut_point_rules=cut_point_rules) - else: - _prove_sequential(kmir, proof, opts=opts, label=label, cut_point_rules=cut_point_rules) - return proof + try: + if opts.max_workers and opts.max_workers > 1: + _prove_parallel(kmir, proof, opts=opts, label=label, cut_point_rules=cut_point_rules) + else: + _prove_sequential(kmir, proof, opts=opts, label=label, cut_point_rules=cut_point_rules) + return proof + except (DefaultError, RuntimeError) as err: + recovered = _recover_proof_on_rpc_error(proof, err, allow_rpc_recovery=allow_rpc_recovery) + if recovered is not None: + return recovered + raise def _prove_parallel( @@ -167,6 +173,7 @@ def create_prover() -> APRProver: cterm_symbolic = CTermSymbolic( client, kmir.definition, + log_succ_rewrites=_record_proof_logs(opts), ) kcfg_explore = KCFGExplore( cterm_symbolic, @@ -197,7 +204,11 @@ def _prove_sequential( label: str, cut_point_rules: list[str], ) -> None: - with kmir.kcfg_explore(label, terminate_on_thunk=opts.terminate_on_thunk) as kcfg_explore: + with kmir.kcfg_explore( + label, + terminate_on_thunk=opts.terminate_on_thunk, + log_succ_rewrites=_record_proof_logs(opts), + ) as kcfg_explore: prover = APRProver( kcfg_explore, execute_depth=opts.max_depth, @@ -211,6 +222,30 @@ def _prove_sequential( ) +def _record_proof_logs(opts: ProveOpts) -> bool: + # Persisted proofs may later be sectioned using stored rewrite logs. + # Ephemeral test proofs do not need them, and omitting them avoids huge RPC payloads. + return opts.proof_dir is not None + + +def _recover_proof_on_rpc_error(proof: APRProof, err: Exception, *, allow_rpc_recovery: bool) -> APRProof | None: + if not allow_rpc_recovery: + return None + + if proof.proof_dir is None or not APRProof.proof_data_exists(proof.id, proof.proof_dir): + return None + + if isinstance(err, RuntimeError) and str(err) != 'Empty response received': + return None + + recovered = APRProof.read_proof_data(proof.proof_dir, proof.id) + if recovered.passed or recovered.failed: + _LOGGER.warning(f'Recovered saved proof after RPC error: {proof.id}') + return recovered + + return None + + def apr_proof_from_smir( kmir: KMIR, id: str, diff --git a/kmir/src/kmir/kast.py b/kmir/src/kmir/kast.py index 7268cf755..def071d46 100644 --- a/kmir/src/kmir/kast.py +++ b/kmir/src/kmir/kast.py @@ -7,7 +7,7 @@ from pyk.kast.inner import KApply, KSequence, KSort, KVariable, Subst, build_cons from pyk.kast.manip import free_vars, split_config_from -from pyk.kast.prelude.collections import list_empty, list_of +from pyk.kast.prelude.collections import list_empty, list_of, map_of from pyk.kast.prelude.kint import eqInt, intToken, leInt from pyk.kast.prelude.ml import mlEqualsTrue from pyk.kast.prelude.utils import token @@ -19,12 +19,11 @@ BoolValue, DynamicSize, IntValue, - Local, Metadata, - Place, PtrLocalValue, RangeValue, RefValue, + SlotPlace, StaticSize, ) @@ -192,12 +191,16 @@ def init_subst() -> dict[str, KInner]: k_cell, ) + slot_ids = [token(i) for i in range(len(localvars))] subst = Subst( { **init_subst(), **{ 'K_CELL': k_cell, - 'LOCALS_CELL': list_of(localvars), + 'LOCALS_CELL': list_of(slot_ids), + 'SLOTSTORE_CELL': map_of(zip(slot_ids, localvars, strict=True)), + 'NEXTSLOT_CELL': token(len(slot_ids)), + 'GENERATEDCOUNTER_CELL': token(len(slot_ids)), }, } ) @@ -215,11 +218,15 @@ def _make_symbolic_call_config( types: Mapping[Ty, TypeMetadata], ) -> tuple[KInner, list[KInner]]: locals, constraints = _symbolic_locals(fn_data.args, types) + slot_ids = [token(i) for i in range(len(locals))] subst = Subst( { 'K_CELL': fn_data.call_terminator, 'STACK_CELL': list_empty(), # FIXME see #560, problems matching a symbolic stack - 'LOCALS_CELL': list_of(locals), + 'LOCALS_CELL': list_of(slot_ids), + 'SLOTSTORE_CELL': map_of(zip(slot_ids, locals, strict=True)), + 'NEXTSLOT_CELL': token(len(slot_ids)), + 'GENERATEDCOUNTER_CELL': token(len(slot_ids)), }, ) empty_config = definition.empty_config(KSort('GeneratedTopCell')) @@ -373,7 +380,11 @@ def _symbolic_value(self, ty: Ty, mutable: bool) -> tuple[KInner, Iterable[KInne mlEqualsTrue(leInt(variant_var, token(max_variant))), ] args = self._fresh_var('ENUM_ARGS') - return KApply('Value::Aggregate', (KApply('variantIdx', (variant_var,)), args)), idx_range, None + return ( + KApply('Value::Aggregate', (KApply('variantIdx', (variant_var,)), args)), + idx_range + [mlEqualsTrue(KApply('allValues', (args,)))], + None, + ) case StructT(_, _, fields): field_vars: list[KInner] = [] @@ -390,14 +401,18 @@ def _symbolic_value(self, ty: Ty, mutable: bool) -> tuple[KInner, Iterable[KInne case UnionT(): args = self._fresh_var('ARG_UNION') - return KApply('Value::Aggregate', (KApply('variantIdx', (token(0),)), args)), [], None + return ( + KApply('Value::Aggregate', (KApply('variantIdx', (token(0),)), args)), + [mlEqualsTrue(KApply('allValues', (args,)))], + None, + ) case ArrayT(_, None): elems = self._fresh_var('ARG_ARRAY') l = self._fresh_var('ARG_ARRAY_LEN') return ( KApply('Value::Range', (elems,)), - [mlEqualsTrue(eqInt(KApply('sizeList', (elems,)), l))], + [mlEqualsTrue(eqInt(KApply('sizeList', (elems,)), l)), mlEqualsTrue(KApply('allValues', (elems,)))], KApply( 'Metadata', ( @@ -450,8 +465,7 @@ def _symbolic_value(self, ty: Ty, mutable: bool) -> tuple[KInner, Iterable[KInne KApply( 'Value::Reference', ( - token(0), # Stack OFFSET field - KApply('place', (KApply('local', (token(ref),)), KApply('ProjectionElems::empty', ()))), + KApply('SlotPlace', (token(ref), KApply('ProjectionElems::empty', ()))), KApply('Mutability::Mut', ()) if mutable else KApply('Mutability::Not', ()), metadata if metadata is not None else no_metadata, ), @@ -468,8 +482,7 @@ def _symbolic_value(self, ty: Ty, mutable: bool) -> tuple[KInner, Iterable[KInne KApply( 'Value::PtrLocal', ( - token(0), - KApply('place', (KApply('local', (token(ref),)), KApply('ProjectionElems::empty', ()))), + KApply('SlotPlace', (token(ref), KApply('ProjectionElems::empty', ()))), KApply('Mutability::Mut', ()) if mutable else KApply('Mutability::Not', ()), metadata if metadata is not None else no_metadata, ), @@ -652,15 +665,13 @@ def _random_ptr_value(self, mut: bool, type_info: PtrT | RefT) -> PtrLocalValue match type_info: case PtrT(): return PtrLocalValue( - stack_depth=0, - place=Place(local=Local(ref)), + place=SlotPlace(slot=ref), mut=mut, metadata=metadata, ) case RefT(): return RefValue( - stack_depth=0, - place=Place(local=Local(ref)), + place=SlotPlace(slot=ref), mut=mut, metadata=metadata, ) diff --git a/kmir/src/kmir/kdist/mir-semantics/intrinsics.md b/kmir/src/kmir/kdist/mir-semantics/intrinsics.md index 8788d9861..6b5e5a709 100644 --- a/kmir/src/kmir/kdist/mir-semantics/intrinsics.md +++ b/kmir/src/kmir/kdist/mir-semantics/intrinsics.md @@ -87,21 +87,54 @@ The implementation requires operands to have identical types (`TY1 ==K TY2`) bef Execution gets stuck (no matching rule) when operands have different types or unknown type information. ```k - // Raw eq: dereference operands, extract types, and delegate to typed comparison + syntax KItem ::= #getType(Operand) + | #execRawEqCheck(KItem) + | #execRawEqValues(Place, Evaluation, Evaluation) [seqstrict(2,3)] + + // Raw eq: first verify type equality, then compare dereferenced values. rule #execIntrinsic(IntrinsicFunction(symbol("raw_eq")), ARG1:Operand ARG2:Operand .Operands, PLACE, _SPAN) - => #execRawEqTyped(PLACE, #withDeref(ARG1), #extractOperandType(#withDeref(ARG1), LOCALS), - #withDeref(ARG2), #extractOperandType(#withDeref(ARG2), LOCALS)) + => #getType(#withDeref(ARG1)) + ~> #execRawEqCheck(#getType(#withDeref(ARG2))) + ~> #execRawEqValues(PLACE, #withDeref(ARG1), #withDeref(ARG2)) ... - LOCALS - // Compare values only if types are identical - syntax KItem ::= #execRawEqTyped(Place, Evaluation, MaybeTy, Evaluation, MaybeTy) [seqstrict(2,4)] - rule #execRawEqTyped(DEST, VAL1:Value, TY1:Ty, VAL2:Value, TY2:Ty) - => #setLocalValue(DEST, BoolVal(VAL1 ==K VAL2)) + rule #getType(operandCopy(place(local(I), PROJS))) + => getTyOf(tyOfLocal(LOCAL), PROJS) + ... + SLOTS ... + ... SLOT:Int |-> LOCAL:TypedLocal ... + requires 0 <=Int I andBool I #getType(operandMove(place(local(I), PROJS))) + => getTyOf(tyOfLocal(LOCAL), PROJS) + ... + SLOTS ... + ... SLOT:Int |-> LOCAL:TypedLocal ... + requires 0 <=Int I andBool I #getType(operandConstant(constOperand(_, _, mirConst(_, TY, _)))) => TY ... + + rule #getType(_OP) => TyUnknown ... [owise] + + rule TY1:Ty ~> #execRawEqCheck(#getType(ARG2)) + => #getType(ARG2) + ~> #execRawEqCheck(TY1) + ... + + rule TY2:Ty ~> #execRawEqCheck(TY1:Ty) + => .K ... requires TY1 ==K TY2 [preserves-definedness] + rule #execRawEqValues(DEST, VAL1:Value, VAL2:Value) + => #setLocalValue(DEST, BoolVal(VAL1 ==K VAL2)) + ... + // Add deref projection to operands syntax Operand ::= #withDeref(Operand) [function, total] rule #withDeref(operandCopy(place(LOCAL, PROJ))) @@ -111,18 +144,6 @@ Execution gets stuck (no matching rule) when operands have different types or un // must not overwrite the value, just the reference is moved! rule #withDeref(OP) => OP [owise] - // Extract type from operands (locals with projections, constants, fallback to unknown) - syntax MaybeTy ::= #extractOperandType(Operand, List) [function, total] - rule #extractOperandType(operandCopy(place(local(I), PROJS)), LOCALS) - => getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS) - requires 0 <=Int I andBool I getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS) - requires 0 <=Int I andBool I TY - rule #extractOperandType(_, _) => TyUnknown [owise] ``` #### Volatile Store (`std::intrinsics::volatile_store`, `std::ptr::write_volatile`) @@ -191,8 +212,8 @@ the second argument, so the returned difference is always positive. rule #ptrOffsetDiff( - PtrLocal(HEIGHT, PLACE, _, metadata( _ , OFF1, _)), - PtrLocal(HEIGHT, PLACE, _, metadata( _ , OFF2, _)), + PtrLocal(PLACE, _, metadata( _ , OFF1, _)), + PtrLocal(PLACE, _, metadata( _ , OFF2, _)), SIGNED_FLAG, DEST ) => #setLocalValue(DEST, Integer(OFF1 -Int OFF2, 64, SIGNED_FLAG)) @@ -202,8 +223,8 @@ the second argument, so the returned difference is always positive. rule #ptrOffsetDiff( - PtrLocal(_, _, _, _) #as PTR1, - PtrLocal(_, _, _, _) #as PTR2, + PtrLocal(_, _, _) #as PTR1, + PtrLocal(_, _, _) #as PTR2, SIGNED_FLAG, _DEST ) => #UBErrorPtrOffsetDiff(PTR1, PTR2, SIGNED_FLAG) diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir-ast.md b/kmir/src/kmir/kdist/mir-semantics/kmir-ast.md index 8000aa5b6..8bd0ea121 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir-ast.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir-ast.md @@ -33,5 +33,7 @@ module KMIR-AST syntax TypeMappings ::= List{TypeMapping, ""} [group(mir-list), symbol(TypeMappings::append), terminator-symbol(TypeMappings::empty)] + syntax Bool ::= allValues ( List ) [function, total, symbol(allValues)] + endmodule ``` diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 82c28b3f0..6ce7df932 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -104,9 +104,10 @@ will effectively be no-ops at this level). #setLocalValue(PLACE, RVAL) ... - LOCALS - requires 0 <=Int I andBool I SLOTS ... + ... #frameSlotId(SLOTS, I) |-> LOCAL:TypedLocal ... + requires 0 <=Int I andBool I #execStmt(statement(statementKindAssign(place(local(I), _PROJ) #as PLACE, RVAL), _SPAN)) @@ -114,9 +115,10 @@ will effectively be no-ops at this level). #setLocalValue(PLACE, #evalUnion(RVAL)) ... - LOCALS - requires 0 <=Int I andBool I SLOTS ... + ... #frameSlotId(SLOTS, I) |-> LOCAL:TypedLocal ... + requires 0 <=Int I andBool I #dropSlots(SLOTS) => .K ... + STORE => removeAll(STORE, List2Set(SLOTS)) + rule [termReturnSome]: #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _ => - #setLocalValue(DEST, #decrementRef(VAL)) ~> #execBlockIdx(TARGET) + #setLocalValue(DEST, VAL) ~> #dropSlots(SLOTS) ~> #execBlockIdx(TARGET) _ => CALLER // @@ -230,15 +234,16 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f DEST => NEWDEST someBasicBlockIdx(TARGET) => NEWTARGET _ => UNWIND - ListItem(typedValue(VAL:Value, _, _)) _ => NEWLOCALS + SLOTS => NEWSLOTS // + ... #frameSlotId(SLOTS, 0) |-> typedValue(VAL:Value, _, _) ... // remaining call stack (without top frame) - ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK + ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWSLOTS)) STACK => STACK // no value to return, skip writing rule [termReturnNone]: #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _ => - #execBlockIdx(TARGET) + #dropSlots(SLOTS) ~> #execBlockIdx(TARGET) _ => CALLER // @@ -247,10 +252,11 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f _ => NEWDEST someBasicBlockIdx(TARGET) => NEWTARGET _ => UNWIND - ListItem(_:NewLocal) _ => NEWLOCALS + SLOTS => NEWSLOTS // + ... #frameSlotId(SLOTS, 0) |-> newLocal(_, _) ... // remaining call stack (without top frame) - ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK + ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWSLOTS)) STACK => STACK syntax List ::= #getBlocks( Ty ) [function, total] | #getBlocksAux( MonoItemKind ) [function, total] @@ -287,9 +293,10 @@ The call stack is not necessarily empty at this point so it is left untouched. _ => return(VAL) noBasicBlockIdx - ListItem(typedValue(VAL, _, _)) ... + SLOTS ... + ... #frameSlotId(SLOTS, 0) |-> typedValue(VAL:Value, _, _) ... rule [endprogram-no-return]: #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _ @@ -298,9 +305,10 @@ The call stack is not necessarily empty at this point so it is left untouched. noBasicBlockIdx - ListItem(newLocal(_, _)) ... + SLOTS ... + ... #frameSlotId(SLOTS, 0) |-> newLocal(_, _) ... ``` @@ -316,23 +324,15 @@ where the returned result should go. rule #execTerminator(terminator(terminatorKindCall(operandMove(place(local(I), PROJS)), ARGS, DEST, TARGET, UNWIND), SPAN)) - => #execTerminatorCall({#projectedCallTy(I, PROJS, LOCALS)}:>Ty, lookupFunction({#projectedCallTy(I, PROJS, LOCALS)}:>Ty), ARGS, DEST, TARGET, UNWIND, SPAN) + => #execTerminatorCall({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty, lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty), ARGS, DEST, TARGET, UNWIND, SPAN) ... - LOCALS - requires isTy(#projectedCallTy(I, PROJS, LOCALS)) + SLOTS ... + ... #frameSlotId(SLOTS, I) |-> LOCAL:TypedLocal ... + requires 0 <=Int I andBool I getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS) - requires 0 <=Int I andBool I TyUnknown [owise] - // Intrinsic function call - execute directly without state switching rule [termCallIntrinsic]: #execTerminatorCall(_, FUNC, ARGS, DEST, TARGET, _UNWIND, SPAN) ~> _ @@ -361,9 +361,9 @@ where the returned result should go. OLDDEST => DEST OLDTARGET => TARGET OLDUNWIND => UNWIND - LOCALS + SLOTS - STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK + STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, SLOTS)) STACK requires notBool isIntrinsicFunction(FUNC) andBool notBool #functionNameMatchesEnv(getFunctionName(FUNC)) @@ -379,9 +379,9 @@ where the returned result should go. OLDDEST => DEST OLDTARGET => TARGET OLDUNWIND => UNWIND - LOCALS + SLOTS - STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK + STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, SLOTS)) STACK requires notBool isIntrinsicFunction(FUNC) andBool #functionNameMatchesEnv(getFunctionName(FUNC)) @@ -436,12 +436,11 @@ where the returned result should go. rule #continueAt(noBasicBlockIdx) => .K ... ``` -The local data has to be set up for the call, which requires information about the local variables of a call. This step is separate from the above call stack setup because it needs to retrieve the locals declaration from the body. Arguments to the call are `Operands` which refer to the old locals (`OLDLOCALS` below), and the data is either _copied_ into the new locals using `#setArgs`, or it needs to be _shared_ via references. - -An operand may be a `Reference` (the only way a function could access another function call's `local` variables). For this case, the stack height in the `Reference` must be incremented because a stack frame is added. +The local data has to be set up for the call, which requires information about the local variables of a call. This step is separate from the above call stack setup because it needs to retrieve the locals declaration from the body. Arguments to the call are `Operands` which refer to the caller's runtime slots, and the data is either _copied_ into the new locals using `#setArgs`, or it needs to be _shared_ via references. ```k syntax KItem ::= #setUpCalleeData(MonoItemKind, Operands, Span) + | #reserveSlots(LocalDecls) // reserve space for local variables and copy/move arguments from old locals into their place rule [setupCalleeData]: #setUpCalleeData( @@ -450,7 +449,7 @@ An operand may be a `Reference` (the only way a function could access another fu _SPAN ) => - #setArgsFromStack(1, ARGS) ~> #execBlock(FIRST) + #reserveSlots(NEWLOCALS) ~> #setArgsFromStack(1, ARGS) ~> #execBlock(FIRST) ... // CALLEE @@ -460,19 +459,21 @@ An operand may be a `Reference` (the only way a function could access another fu // DEST // TARGET // UNWIND - _ => #reserveFor(NEWLOCALS) + _ => .List // assumption: arguments stored as _1 .. _n before actual "local" data ... // TODO: Haven't handled "noBody" case - syntax List ::= #reserveFor( LocalDecls ) [function, total] - - rule #reserveFor(.LocalDecls) => .List + rule #reserveSlots(.LocalDecls) => .K ... - rule #reserveFor(localDecl(TY, _, MUT) REST:LocalDecls) - => - ListItem(newLocal(TY, MUT)) #reserveFor(REST) + rule #reserveSlots(localDecl(TY, _, MUT) REST:LocalDecls) => #reserveSlots(REST) ... + NEXT:Int => NEXT +Int 1 + + SLOTS => SLOTS ListItem(NEXT) + ... + + STORE => STORE[NEXT <- newLocal(TY, MUT)] syntax KItem ::= #setArgsFromStack ( Int, Operands) | #setArgFromStack ( Int, Operand) @@ -495,26 +496,28 @@ An operand may be a `Reference` (the only way a function could access another fu rule #setArgFromStack(IDX, operandCopy(place(local(I), .ProjectionElems))) => - #setLocalValue(place(local(IDX), .ProjectionElems), #incrementRef(getValue(CALLERLOCALS, I))) + #setLocalValue(place(local(IDX), .ProjectionElems), VAL) ... - ListItem(StackFrame(_, _, _, _, CALLERLOCALS)) _:List + ListItem(StackFrame(_, _, _, _, CALLERSLOTS)) _:List + ... #frameSlotId(CALLERSLOTS, I) |-> typedValue(VAL:Value, _, _) ... requires 0 <=Int I - andBool I #setArgFromStack(IDX, operandMove(place(local(I), _))) => - #setLocalValue(place(local(IDX), .ProjectionElems), #incrementRef(getValue(CALLERLOCALS, I))) + #setLocalValue(place(local(IDX), .ProjectionElems), VAL) ... - (ListItem(StackFrame(_, _, _, _, CALLERLOCALS) #as CALLERFRAME => #updateStackLocal(CALLERFRAME, I, Moved))) _:List - + ListItem(StackFrame(_, _, _, _, CALLERSLOTS)) _:List + + ... #frameSlotId(CALLERSLOTS, I) |-> (typedValue(VAL:Value, TY:Ty, _) + => typedValue(Moved, TY, mutabilityMut)) ... + requires 0 <=Int I - andBool I - #setTupleArgs(2, getValue(LOCALS, TUPLE)) ~> #execBlock(FIRST) + #reserveSlots(NEWLOCALS) ~> #setTupleArgs(2, TUPLEVAL) ~> #execBlock(FIRST) // arguments are tuple components, stored as _2 .. _n ... _ => toKList(BLOCKS) - LOCALS => #reserveFor(NEWLOCALS) - - (ListItem(CALLERFRAME => #updateStackLocal(#updateStackLocal(CALLERFRAME, TUPLE, Moved), CLOSURE, Moved))) - _:List - + CALLERSLOTS => .List ... - requires 0 <=Int CLOSURE andBool CLOSURE TypedLocal))) - andBool isTypedLocal(LOCALS[CLOSURE]) + + ... #frameSlotId(CALLERSLOTS, TUPLE) |-> (typedValue(TUPLEVAL:Value, TUPLETY:Ty, _) => typedValue(Moved, TUPLETY, mutabilityMut)) + #frameSlotId(CALLERSLOTS, CLOSURE) |-> (CLOSURELOCAL:TypedLocal => typedValue(Moved, tyOfLocal(CLOSURELOCAL), mutabilityMut)) ... + + requires 0 <=Int CLOSURE andBool CLOSURE TypedLocal)) - orBool isFunType(lookupTy(tyOfLocal({LOCALS[CLOSURE]}:>TypedLocal))) + typeInfoVoidType ==K lookupTy(tyOfLocal(CLOSURELOCAL)) + orBool isFunType(lookupTy(tyOfLocal(CLOSURELOCAL))) ) [priority(40), preserves-definedness] @@ -574,31 +576,29 @@ Therefore a heuristics is used here: _SPAN ) => - #setLocalValue(place(local(1), .ProjectionElems), #incrementRef(getValue(LOCALS, CLOSURE))) - ~> #setTupleArgs(2, getValue(LOCALS, TUPLE)) ~> #execBlock(FIRST) + #reserveSlots(NEWLOCALS) ~> #setLocalValue(place(local(1), .ProjectionElems), CLOSUREVAL) + ~> #setTupleArgs(2, TUPLEVAL) ~> #execBlock(FIRST) // arguments are tuple components, stored as _2 .. _n ... _ => toKList(BLOCKS) - LOCALS => #reserveFor(NEWLOCALS) - - (ListItem(CALLERFRAME => #updateStackLocal(#updateStackLocal(CALLERFRAME, TUPLE, Moved), CLOSURE, Moved))) - _:List - + CALLERSLOTS => .List ... - requires 0 <=Int CLOSURE andBool CLOSURE TypedLocal))) - andBool isTypedLocal(LOCALS[CLOSURE]) + + ... #frameSlotId(CALLERSLOTS, TUPLE) |-> (typedValue(TUPLEVAL:Value, TUPLETY:Ty, _) => typedValue(Moved, TUPLETY, mutabilityMut)) + #frameSlotId(CALLERSLOTS, CLOSURE) |-> (typedValue(CLOSUREVAL:Value, CLOSURETY:Ty, _) => typedValue(Moved, CLOSURETY, mutabilityMut)) ... + + requires 0 <=Int CLOSURE andBool CLOSURE TypedLocal))) - andBool isTy(pointeeTy(lookupTy(tyOfLocal({LOCALS[CLOSURE]}:>TypedLocal)))) + andBool isRefType(lookupTy(CLOSURETY)) + andBool isTy(pointeeTy(lookupTy(CLOSURETY))) andBool ( - lookupTy({pointeeTy(lookupTy(tyOfLocal({LOCALS[CLOSURE]}:>TypedLocal)))}:>Ty) ==K typeInfoVoidType - orBool isFunType(lookupTy({pointeeTy(lookupTy(tyOfLocal({LOCALS[CLOSURE]}:>TypedLocal)))}:>Ty)) + lookupTy({pointeeTy(lookupTy(CLOSURETY))}:>Ty) ==K typeInfoVoidType + orBool isFunType(lookupTy({pointeeTy(lookupTy(CLOSURETY))}:>Ty)) ) [priority(45), preserves-definedness] @@ -627,7 +627,7 @@ Therefore a heuristics is used here: rule #setTupleArgs(_, .List ) => .K ... rule #setTupleArgs(IDX, ListItem(VAL) REST:List) - => #setLocalValue(place(local(IDX), .ProjectionElems), #incrementRef(VAL)) ~> #setTupleArgs(IDX +Int 1, REST) + => #setLocalValue(place(local(IDX), .ProjectionElems), VAL) ~> #setTupleArgs(IDX +Int 1, REST) ... ``` diff --git a/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md b/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md index 121ad10f3..99618a13e 100644 --- a/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md +++ b/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md @@ -16,6 +16,7 @@ module KMIR-LEMMAS imports INT-SYMBOLIC imports BOOL + imports KMIR-AST imports RT-DATA ``` ## Simplifications for lists to avoid spurious branching on error cases in control flow @@ -33,6 +34,22 @@ The lists used in the semantics are cons-lists, so only rules with a head elemen [simplification, symbolic(REST)] rule 0 <=Int size(_LIST:List) => true [simplification] + + // -------------------------------------------------- + rule allValues(.List) => true + rule allValues(ListItem(_:Value) REST) => allValues(REST) + rule allValues(ListItem(_) _REST) => false [owise] + + // Symbolic prove-rs inputs use fresh `List` variables to stand for arrays, slices, + // and aggregate argument lists whose elements are still runtime `Value`s. The core + // semantics checks this invariant explicitly with `allValues(...)`; this lemma keeps + // the corresponding builtin `List:set` definedness from forking on impossible cases. + + rule #Ceil(ELEMS[IDX <- _VAL:Value]) + => #Ceil(ELEMS) + #And {true #Equals allValues(ELEMS)} + #And {true #Equals 0 <=Int IDX andBool IDX #Ceil(L) #And #Ceil(A) #And #Ceil(B) #And {true #Equals A +Int B <=Int size(L)} [simplification] ``` -The `#mapOffset` function maps `#adjustRef` over a lists of `Value`s, leaving the list length unchanged. -Definedness of the list and list elements is also guaranteed. - -```k - rule size(#mapOffset(L, _)) => size(L) [simplification, preserves-definedness] - - rule #Ceil(#mapOffset(L, _)[I]) => #Ceil(L) #And {true #Equals 0 <=Int I} #And {true #Equals I #Ceil(L) [simplification] - - rule #adjustRef(VAL:Value, 0) => VAL [simplification] - - rule #adjustRef(#adjustRef(VAL, OFFSET1), OFFSET2) - => #adjustRef(VAL, OFFSET1 +Int OFFSET2) - [simplification] - - rule #mapOffset(L, 0) => L [simplification] - - rule #mapOffset(#mapOffset(L, OFFSET1), OFFSET2) - => #mapOffset(L, OFFSET1 +Int OFFSET2) - [simplification] -``` - ## Simplifications for `enum` Discriminants and Variant Indexes For symbolic enum values, the variant index remains unevaluated but the original (symbolic) discriminant can be restored: diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/configuration.md b/kmir/src/kmir/kdist/mir-semantics/rt/configuration.md index c5d764361..0e52fa985 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/configuration.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/configuration.md @@ -11,7 +11,8 @@ Essential parts of the configuration: The entire program's return value (`retVal`) is held in a separate cell. -Besides the `caller` (to return to) and `dest` and `target` to specify where the return value should be written, a `StackFrame` includes information about the `locals` of the currently-executing function/item. Each function's code will only access local values (or heap data referenced by them). Local variables carry type information (see `RT-DATA`). +Besides the `caller` (to return to) and `dest` and `target` to specify where the return value should be written, a `StackFrame` includes the runtime slots owned by the currently-executing function/item. Each function's MIR still accesses locals by relative `local(i)` indexes, but those are resolved through the frame's ordered slot list into stable runtime slot handles stored globally in ``. +The next unused runtime slot handle is tracked in ``. ```k requires "./value.md" @@ -19,6 +20,7 @@ requires "./value.md" module KMIR-CONFIGURATION imports INT-SYNTAX imports BOOL-SYNTAX + imports MAP imports RT-VALUE-SYNTAX syntax RetVal ::= return( Value ) @@ -28,7 +30,7 @@ module KMIR-CONFIGURATION dest:Place, // place to store return value target:MaybeBasicBlockIdx, // basic block to return to UnwindAction, // action to perform on panic - locals:List) // return val, args, local variables + locals:List) // runtime slot ids for return val, args, and local variables configuration $PGM:KItem @@ -45,6 +47,9 @@ module KMIR-CONFIGURATION // remaining call stack (without top frame) .List + // global store of runtime stack slots + .Map + 0 ``` diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/data.md b/kmir/src/kmir/kdist/mir-semantics/rt/data.md index 2cc068084..3005c8773 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/data.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/data.md @@ -23,6 +23,7 @@ module RT-DATA imports BODY imports TYPES + imports KMIR-AST imports RT-VALUE-SYNTAX imports RT-NUMBERS imports RT-DECODING @@ -31,35 +32,29 @@ module RT-DATA ``` -## Operations on local variables +## Operations on runtime slots -### Indexing into the List of Local Variables in a Stack Frame +### Resolving MIR locals to runtime slots -The semantics uses lists for stack frames and locals. -More often than not, an element of the list must be selected by index and is required to be of a certain sort. -In case of the ``, we only expect `TypedLocal` to be in the list, and use a dedicated indexing function. -The same holds for lists used as arguments in the `Value` sort. +The semantics uses a global `` for runtime local storage. +Each frame keeps an ordered `locals` list mapping MIR `local(i)` indexes to stable runtime slot handles. +More often than not, a slot or list element must be selected by index and is required to be of a certain sort. ```k - syntax TypedLocal ::= getLocal ( List, Int ) [function] - // ---------------------------------------------- - rule getLocal(LOCALS, IDX) => {LOCALS[IDX]}:>TypedLocal - requires 0 <=Int IDX andBool IDX {SLOTS[IDX]}:>Int + requires 0 <=Int IDX andBool IDX {valueOf({LOCALS[IDX]}:>TypedValue)}:>Value - requires 0 <=Int IDX andBool IDX TypedValue)) - [preserves-definedness] // valid indexing and sort coercion checked + // ------------------------------------- rule getValue(VALUES, IDX) => {VALUES[IDX]}:>Value requires 0 <=Int IDX andBool IDX Value) => #Ceil(X) requires isValue(X) [simplification] + ``` ### Evaluating Items to `Value`s @@ -108,9 +104,9 @@ It is also useful to capture unimplemented semantic constructs so that we can ha ### Errors Related to Accessing Local Variables Access to a `TypedLocal` (whether reading or writing) may fail for a number of reasons. -It is an error to read a `Moved` local or an uninitialised `NewLocal`. -Also, locals are accessed via their index in list `` in a stack frame, which may be out of bounds (but the compiler should guarantee that all local indexes are valid). -Types (`Ty`, an opaque number assigned by the Stable MIR extraction) are not checked, the local's type is used. +It is an error to read a `Moved` slot or an uninitialised `NewLocal`. +MIR locals are first resolved through the current frame's `locals` list, then looked up in ``. +Types (`Ty`, an opaque number assigned by the Stable MIR extraction) are not checked, the slot's stored type is used. ### Reading Operands (Local Variables and Constants) @@ -148,13 +144,13 @@ We ensure that any projections of the copy operation are traversed appropriately ```k rule operandCopy(place(local(I), PROJECTIONS)) - => #traverseProjection(toLocal(I), getValue(LOCALS, I), PROJECTIONS, .Contexts) + => #traverseProjection(toSlot(#frameSlotId(SLOTS, I)), VAL, PROJECTIONS, .Contexts) ~> #readProjection(false) ... - LOCALS - requires 0 <=Int I andBool I SLOTS ... + ... #frameSlotId(SLOTS, I) |-> typedValue(VAL:Value, _, _) ... + requires 0 <=Int I andBool I operandMove(place(local(I), PROJECTIONS)) - => #traverseProjection(toLocal(I), getValue(LOCALS, I), PROJECTIONS, .Contexts) + => #traverseProjection(toSlot(#frameSlotId(SLOTS, I)), VAL, PROJECTIONS, .Contexts) ~> #readProjection(true) ... - LOCALS - requires 0 <=Int I andBool I SLOTS ... + ... #frameSlotId(SLOTS, I) |-> typedValue(VAL:Value, _, _) ... + requires 0 <=Int I andBool I `. If we are setting a value at a `Place` which has `Projection`s in it, then we must first traverse the projections before setting the value. **Note on mutability:** The Rust compiler validates assignment legality and may reuse immutable locals in MIR (e.g., loop variables), so `#setLocalValue` does not guard on mutability. ```k syntax KItem ::= #setLocalValue( Place, Evaluation ) [strict(2)] - - rule #setLocalValue(place(local(I), .ProjectionElems), VAL) => .K ... - - LOCALS => LOCALS[I <- typedValue(VAL, tyOfLocal(getLocal(LOCALS, I)), mutabilityOf(getLocal(LOCALS, I)))] - - requires 0 <=Int I andBool I #setLocalValue(place(local(I), .ProjectionElems), VAL) => .K ... - - LOCALS => LOCALS[I <- typedValue(VAL, tyOfLocal(getLocal(LOCALS, I)), mutabilityOf(getLocal(LOCALS, I)))] - - requires 0 <=Int I andBool I #setLocalValue(place(local(I), PROJ), VAL) - => #traverseProjection(toLocal(I), getValue(LOCALS, I), PROJ, .Contexts) + | #setSlotValue ( Int, Evaluation ) [strict(2)] + + rule #setSlotValue(SLOT, VAL) => .K ... + ... SLOT |-> (typedValue(_:Value, TY:Ty, MUT:Mutability) => typedValue(VAL, TY, MUT)) ... + [preserves-definedness] // valid lookup checked + + rule #setSlotValue(SLOT, VAL) => .K ... + ... SLOT |-> (newLocal(TY:Ty, MUT:Mutability) => typedValue(VAL, TY, MUT)) ... + [preserves-definedness] // valid lookup checked + + rule #setLocalValue(place(local(I), .ProjectionElems), VAL:Value) => .K ... + SLOTS ... + ... #frameSlotId(SLOTS, I) |-> (typedValue(_:Value, TY:Ty, MUT:Mutability) => typedValue(VAL, TY, MUT)) ... + requires 0 <=Int I andBool I #setLocalValue(place(local(I), .ProjectionElems), VAL:Value) => .K ... + SLOTS ... + ... #frameSlotId(SLOTS, I) |-> (newLocal(TY:Ty, MUT:Mutability) => typedValue(VAL, TY, MUT)) ... + requires 0 <=Int I andBool I #setLocalValue(place(local(I), PROJ), VAL:Value) + => #traverseProjection(toSlot(#frameSlotId(SLOTS, I)), CURVAL, PROJ, .Contexts) ~> #writeProjection(VAL) ... - LOCALS + SLOTS ... + ... #frameSlotId(SLOTS, I) |-> typedValue(CURVAL:Value, _, _) ... requires 0 <=Int I - andBool I #traverseProjection(_, VAL, .ProjectionElems, _) ~> #readProjection(false) => VAL ... rule #traverseProjection(_, VAL, .ProjectionElems, _) ~> (#readProjection(true) => #writeMoved ~> VAL) ... - rule #traverseProjection(toLocal(I), _ORIGINAL, .ProjectionElems, CONTEXTS) + rule #traverseProjection(toSlot(SLOT), _ORIGINAL, .ProjectionElems, CONTEXTS) ~> #writeProjection(NEW) - => #setLocalValue(place(local(I), .ProjectionElems), #buildUpdate(NEW, CONTEXTS)) + => #setSlotValue(SLOT, #buildUpdate(NEW, CONTEXTS)) ... [preserves-definedness] // valid context ensured upon context construction - rule #traverseProjection(toLocal(I), _ORIGINAL, .ProjectionElems, CONTEXTS) + rule #traverseProjection(toSlot(SLOT), _ORIGINAL, .ProjectionElems, CONTEXTS) ~> #writeMoved - => #setLocalValue(place(local(I), .ProjectionElems), #buildUpdate(Moved, CONTEXTS)) // TODO retain Ty and Mutability from _ORIGINAL + => #setSlotValue(SLOT, #buildUpdate(Moved, CONTEXTS)) // TODO retain Ty and Mutability from _ORIGINAL ... [preserves-definedness] // valid context ensured upon context construction - rule #traverseProjection(toStack(FRAME, local(I)), _ORIGINAL, .ProjectionElems, CONTEXTS) - ~> #writeProjection(NEW) - => .K - ... - - STACK - => STACK[(FRAME -Int 1) <- - #updateStackLocal( - {STACK[FRAME -Int 1]}:>StackFrame, - I, - #adjustRef(#buildUpdate(NEW, CONTEXTS), 0 -Int FRAME) - ) - ] - - requires 0 #traverseProjection(toStack(FRAME, local(I)), _ORIGINAL, .ProjectionElems, CONTEXTS) - ~> #writeMoved - => .K - ... - - STACK - => STACK[(FRAME -Int 1) <- - #updateStackLocal( - {STACK[FRAME -Int 1]}:>StackFrame, - I, - #adjustRef(#buildUpdate(Moved, CONTEXTS), 0 -Int FRAME) - ) // TODO retain Ty and Mutability from _ORIGINAL - ] - - requires 0 VAL [preserves-definedness] + rule #setRangeElem(ELEMS, IDX, VAL) + => ELEMS[IDX <- VAL] + requires 0 <=Int IDX andBool IDX #buildUpdate(Aggregate(IDX, ARGS[I <- VAL]), CTXS) [preserves-definedness] // valid list indexing checked upon context construction @@ -340,7 +312,7 @@ These helpers mark down, as we traverse the projection, what `Place` we are curr [preserves-definedness] rule #buildUpdate(VAL, CtxIndex(ELEMS, I) CTXS) - => #buildUpdate(Range(ELEMS[I <- VAL]), CTXS) + => #buildUpdate(Range(#setRangeElem(ELEMS, I, VAL)), CTXS) [preserves-definedness] // valid list indexing checked upon context construction // we don't expect an update to happen on an entire _subslice_ but define a rule for it anyway @@ -359,16 +331,6 @@ These helpers mark down, as we traverse the projection, what `Place` we are curr rule #buildUpdate(Aggregate(variantIdx(0), ListItem(VALUE) .List), CtxWrapStruct CTXS) => #buildUpdate(VALUE, CTXS) - - syntax StackFrame ::= #updateStackLocal ( StackFrame, Int, Value ) [function] - - rule #updateStackLocal(StackFrame(CALLER, DEST, TARGET, UNWIND, LOCALS), I, VAL) - => StackFrame(CALLER, DEST, TARGET, UNWIND, LOCALS[I <- typedValue(VAL, tyOfLocal(getLocal(LOCALS, I)), mutabilityMut)]) - requires 0 <=Int I - andBool I PS [priority(40)] rule consP(projectionElemFromZST, projectionElemToZST PS:ProjectionElems) => PS [priority(40)] - syntax Value ::= #localFromFrame ( StackFrame, Local, Int ) [function] - - rule #localFromFrame(StackFrame(... locals: LOCALS), local(I:Int), OFFSET) => #adjustRef(getValue(LOCALS, I), OFFSET) - requires 0 <=Int I - andBool I Reference(HEIGHT +Int OFFSET, PLACE, REFMUT, META) - rule #adjustRef(PtrLocal(HEIGHT, PLACE, REFMUT, META), OFFSET) - => PtrLocal(HEIGHT +Int OFFSET, PLACE, REFMUT, META) - rule #adjustRef(Aggregate(IDX, ARGS), OFFSET) - => Aggregate(IDX, #mapOffset(ARGS, OFFSET)) - rule #adjustRef(Range(ELEMS), OFFSET) - => Range(#mapOffset(ELEMS, OFFSET)) - rule #adjustRef(TL, _) => TL [owise] - - syntax List ::= #mapOffset ( List, Int ) [function, total] - // ------------------------------------------------------- - rule #mapOffset(.List, _) - => .List - rule #mapOffset(ListItem(ELEM:Value) REST, OFFSET) - => ListItem(#adjustRef(ELEM, OFFSET)) #mapOffset(REST, OFFSET) - rule #mapOffset(OTHER, _) - => OTHER [owise] // should not happen - - syntax Value ::= #incrementRef ( Value ) [function, total] - | #decrementRef ( Value ) [function, total] - // -------------------------------------------------------- - rule #incrementRef(TL) => #adjustRef(TL, 1) - rule #decrementRef(TL) => #adjustRef(TL, -1) - syntax Int ::= originSize ( MetadataSize ) [function, total] // --------------------------------------------------------------------- rule originSize(noMetadataSize) => 0 // TODO: Is this fair, noMetadataSize does not really mean zero @@ -458,7 +385,7 @@ This is done without consideration of the validity of the Downcast[^downcast]. ... requires 0 <=Int I andBool I #traverseProjection( @@ -548,18 +475,18 @@ In case of a `ConstantIndex`, the index is provided as an immediate value, toget ) => #traverseProjection( DEST, - getValue(ELEMENTS, #expectUsize(getValue(LOCALS, LOCAL))), + getValue(ELEMENTS, #expectUsize(INDEXVAL)), PROJS, - CtxIndex(ELEMENTS, #expectUsize(getValue(LOCALS, LOCAL))) CTXTS + CtxIndex(ELEMENTS, #expectUsize(INDEXVAL)) CTXTS ) ... - LOCALS - requires 0 <=Int LOCAL andBool LOCAL SLOTS ... + ... #frameSlotId(SLOTS, LOCAL) |-> typedValue(INDEXVAL:Value, _, _) ... + requires 0 <=Int LOCAL andBool LOCAL #traverseProjection( @@ -577,7 +504,7 @@ In case of a `ConstantIndex`, the index is provided as an immediate value, toget ... requires 0 <=Int OFFSET andBool OFFSET #traverseProjection( @@ -596,7 +523,7 @@ In case of a `ConstantIndex`, the index is provided as an immediate value, toget requires 0 [preserves-definedness] - // Ref, 0 < OFFSET, 0 < PTR_OFFSET, ToStack rule #traverseProjection( _DEST, - Reference(OFFSET, place(LOCAL, PLACEPROJ), _MUT, metadata(SIZE, PTR_OFFSET, ORIGIN_SIZE)), + Reference(slotPlace(SLOT, PLACEPROJ), _MUT, metadata(SIZE, PTR_OFFSET, ORIGIN_SIZE)), projectionElemDeref PROJS, _CTXTS ) => #traverseProjection( - toStack(OFFSET, LOCAL), - #localFromFrame({STACK[OFFSET -Int 1]}:>StackFrame, LOCAL, OFFSET), - appendP(PLACEPROJ, PointerOffset(PTR_OFFSET, originSize(ORIGIN_SIZE))), // apply reference projections with pointer offset + toSlot(SLOT), + VAL, + appendP(PLACEPROJ, PointerOffset(PTR_OFFSET, originSize(ORIGIN_SIZE))), .Contexts ) - ~> #derefTruncate(SIZE, PROJS) // then truncate, then continue with remaining projections + ~> #derefTruncate(SIZE, PROJS) ... - STACK - requires 0 ... SLOT |-> typedValue(VAL:Value, _, _) ... + requires 0 #traverseProjection( _DEST, - Reference(OFFSET, place(LOCAL, PLACEPROJ), _MUT, metadata(SIZE, PTR_OFFSET, _ORIGIN_SIZE)), + Reference(slotPlace(SLOT, PLACEPROJ), _MUT, metadata(SIZE, PTR_OFFSET, _ORIGIN_SIZE)), projectionElemDeref PROJS, _CTXTS ) => #traverseProjection( - toStack(OFFSET, LOCAL), - #localFromFrame({STACK[OFFSET -Int 1]}:>StackFrame, LOCAL, OFFSET), - PLACEPROJ, // apply reference projections with pointer offset + toSlot(SLOT), + VAL, + PLACEPROJ, .Contexts ) - ~> #derefTruncate(SIZE, PROJS) // then truncate, then continue with remaining projections + ~> #derefTruncate(SIZE, PROJS) ... - STACK - requires 0 ... SLOT |-> typedValue(VAL:Value, _, _) ... + requires PTR_OFFSET ==Int 0 [preserves-definedness] - // Ref, 0 == OFFSET, 0 < PTR_OFFSET, Local rule #traverseProjection( _DEST, - Reference(OFFSET, place(local(I), PLACEPROJ), _MUT, metadata(SIZE, PTR_OFFSET, ORIGIN_SIZE)), + PtrLocal(slotPlace(SLOT, PLACEPROJ), _MUT, metadata(SIZE, PTR_OFFSET, ORIGIN_SIZE)), projectionElemDeref PROJS, _CTXTS ) => #traverseProjection( - toLocal(I), - getValue(LOCALS, I), - appendP(PLACEPROJ, PointerOffset(PTR_OFFSET, originSize(ORIGIN_SIZE))), // apply reference projections with pointer offset + toSlot(SLOT), + VAL, + appendP(PLACEPROJ, PointerOffset(PTR_OFFSET, originSize(ORIGIN_SIZE))), .Contexts ) - ~> #derefTruncate(SIZE, PROJS) // then truncate, then continue with remaining projections + ~> #derefTruncate(SIZE, PROJS) ... - LOCALS - requires OFFSET ==Int 0 - andBool 0 <=Int I andBool I ... SLOT |-> typedValue(VAL:Value, _, _) ... + requires 0 #traverseProjection( _DEST, - Reference(OFFSET, place(local(I), PLACEPROJ), _MUT, metadata(SIZE, PTR_OFFSET, _ORIGIN_SIZE)), + PtrLocal(slotPlace(SLOT, PLACEPROJ), _MUT, metadata(SIZE, PTR_OFFSET, _ORIGIN_SIZE)), projectionElemDeref PROJS, _CTXTS ) => #traverseProjection( - toLocal(I), - getValue(LOCALS, I), + toSlot(SLOT), + VAL, PLACEPROJ, .Contexts ) - ~> #derefTruncate(SIZE, PROJS) // then truncate, then continue with remaining projections - ... - - LOCALS - requires OFFSET ==Int 0 - andBool 0 <=Int I andBool I #traverseProjection( - _DEST, - PtrLocal(OFFSET, place(LOCAL, PLACEPROJ), _MUT, metadata(SIZE, PTR_OFFSET, ORIGIN_SIZE)), - projectionElemDeref PROJS, - _CTXTS - ) - => #traverseProjection( - toStack(OFFSET, LOCAL), - #localFromFrame({STACK[OFFSET -Int 1]}:>StackFrame, LOCAL, OFFSET), - appendP(PLACEPROJ, PointerOffset(PTR_OFFSET, originSize(ORIGIN_SIZE))), // apply reference projections with pointer offset - .Contexts // previous contexts obsolete - ) - ~> #derefTruncate(SIZE, PROJS) // then truncate, then continue with remaining projections - ... - - STACK - requires 0 #traverseProjection( - _DEST, - PtrLocal(OFFSET, place(LOCAL, PLACEPROJ), _MUT, metadata(SIZE, PTR_OFFSET, _ORIGIN_SIZE)), - projectionElemDeref PROJS, - _CTXTS - ) - => #traverseProjection( - toStack(OFFSET, LOCAL), - #localFromFrame({STACK[OFFSET -Int 1]}:>StackFrame, LOCAL, OFFSET), - PLACEPROJ, // apply reference projections - .Contexts // add pointer offset context - ) - ~> #derefTruncate(SIZE, PROJS) // then truncate, then continue with remaining projections - ... - - STACK - requires 0 #traverseProjection( - _DEST, - PtrLocal(OFFSET, place(local(I), PLACEPROJ), _MUT, metadata(SIZE, PTR_OFFSET, ORIGIN_SIZE)), - projectionElemDeref PROJS, - _CTXTS - ) - => #traverseProjection( - toLocal(I), - getValue(LOCALS, I), - appendP(PLACEPROJ, PointerOffset(PTR_OFFSET, originSize(ORIGIN_SIZE))), // apply reference projections with pointer offset - .Contexts // previous contexts obsolete - ) - ~> #derefTruncate(SIZE, PROJS) // then truncate, then continue with remaining projections - ... - - LOCALS - requires OFFSET ==Int 0 - andBool 0 <=Int I andBool I #traverseProjection( - _DEST, - PtrLocal(OFFSET, place(local(I), PLACEPROJ), _MUT, metadata(SIZE, PTR_OFFSET, _ORIGIN_SIZE)), - projectionElemDeref PROJS, - _CTXTS - ) - => #traverseProjection( - toLocal(I), - getValue(LOCALS, I), - PLACEPROJ, // apply reference projections - .Contexts // add pointer offset context - ) - ~> #derefTruncate(SIZE, PROJS) // then truncate, then continue with remaining projections + ~> #derefTruncate(SIZE, PROJS) ... - LOCALS - requires OFFSET ==Int 0 - andBool 0 <=Int I andBool I ... SLOT |-> typedValue(VAL:Value, _, _) ... + requires 0 ==Int PTR_OFFSET [preserves-definedness] ``` @@ -952,17 +775,19 @@ The most basic ones are simply accessing an operand, either directly or by way o rule rvalueUse(OPERAND) => OPERAND ... rule rvalueCast(CASTKIND, operandCopy(place(local(I), PROJS)) #as OPERAND, TY) - => #cast(OPERAND, CASTKIND, getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS), TY) ... - LOCALS - requires 0 <=Int I andBool I #cast(OPERAND, CASTKIND, getTyOf(tyOfLocal(LOCAL), PROJS), TY) ... + SLOTS ... + ... #frameSlotId(SLOTS, I) |-> LOCAL:TypedLocal ... + requires 0 <=Int I andBool I rvalueCast(CASTKIND, operandMove(place(local(I), PROJS)) #as OPERAND, TY) - => #cast(OPERAND, CASTKIND, getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS), TY) ... - LOCALS - requires 0 <=Int I andBool I #cast(OPERAND, CASTKIND, getTyOf(tyOfLocal(LOCAL), PROJS), TY) ... + SLOTS ... + ... #frameSlotId(SLOTS, I) |-> LOCAL:TypedLocal ... + requires 0 <=Int I andBool I rvalueCast(CASTKIND, operandConstant(constOperand(_, _, mirConst(_, CONST_TY, _))) #as OPERAND, TY) @@ -1108,18 +933,18 @@ and an array of the indeicated size gets reconstructed if the provided metadata (potentially removing an indexing operation to get the element). ```k - rule ListItem(PtrLocal(OFFSET, place(LOCAL, PROJS), _, metadata(_SIZE, PTR_OFFSET, ORIGIN_SIZE))) + rule ListItem(PtrLocal(slotPlace(SLOT, PROJS), _, metadata(_SIZE, PTR_OFFSET, ORIGIN_SIZE))) ListItem(Integer(LENGTH, 64, false)) ~> #mkAggregate(aggregateKindRawPtr(_TY, MUT)) - => PtrLocal(OFFSET, place(LOCAL, removeIndexTail(PROJS)), MUT, metadata(dynamicSize(LENGTH), PTR_OFFSET, ORIGIN_SIZE)) + => PtrLocal(slotPlace(SLOT, removeIndexTail(PROJS)), MUT, metadata(dynamicSize(LENGTH), PTR_OFFSET, ORIGIN_SIZE)) ... // requires LENGTH +Int PTR_OFFSET <=Int ORIGIN_SIZE // refuse to create an invalid fat pointer // andBool dynamicSize(1) ==K #metadataSize(lookupTy(_TY)) // expect a slice type // andBool hasIndexTail(PROJS) ??? - rule ListItem(PtrLocal(OFFSET, PLACE, _, metadata(_SIZE, PTR_OFFSET, ORIGIN_SIZE))) ListItem(Aggregate(_, .List)) ~> #mkAggregate(aggregateKindRawPtr(_TY, MUT)) - => PtrLocal(OFFSET, PLACE, MUT, metadata(noMetadataSize, PTR_OFFSET, ORIGIN_SIZE)) + rule ListItem(PtrLocal(PLACE, _, metadata(_SIZE, PTR_OFFSET, ORIGIN_SIZE))) ListItem(Aggregate(_, .List)) ~> #mkAggregate(aggregateKindRawPtr(_TY, MUT)) + => PtrLocal(PLACE, MUT, metadata(noMetadataSize, PTR_OFFSET, ORIGIN_SIZE)) ... @@ -1149,10 +974,11 @@ The `getTyOf` helper applies the projections from the `Place` to determine the ` ```k rule rvalueDiscriminant(place(local(I), PROJS) #as PLACE) - => #discriminant(operandCopy(PLACE), getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS)) ... - LOCALS - requires 0 <=Int I andBool I #discriminant(operandCopy(PLACE), getTyOf(tyOfLocal(LOCAL), PROJS)) ... + SLOTS ... + ... #frameSlotId(SLOTS, I) |-> LOCAL:TypedLocal ... + requires 0 <=Int I andBool I rvalueRef(REGION, KIND, place(local(I), PROJS)) ... - LOCALS - requires 0 <=Int I andBool I SLOTS ... + ... #frameSlotId(SLOTS, I) |-> newLocal(TY:Ty, _:Mutability) ... + requires 0 <=Int I andBool I rvalueRef(_REGION, KIND, place(local(I), PROJS)) - => #traverseProjection(toLocal(I), getValue(LOCALS, I), PROJS, .Contexts) - ~> #forRef(#mutabilityOf(KIND), metadata(#metadataSize(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS), 0, noMetadataSize)) // TODO: Sus on this rule + => #traverseProjection(toSlot(#frameSlotId(SLOTS, I)), CURVAL, PROJS, .Contexts) + ~> #forRef(#mutabilityOf(KIND), metadata(#metadataSize(TY, PROJS), 0, noMetadataSize)) // TODO: Sus on this rule ... - LOCALS - requires 0 <=Int I andBool I SLOTS ... + ... #frameSlotId(SLOTS, I) |-> typedValue(CURVAL:Value, TY:Ty, _:Mutability) ... + requires 0 <=Int I andBool I #traverseProjection(DEST, VAL:Value, .ProjectionElems, CTXTS) ~> #forRef(MUT, metadata(SIZE, OFFSET, ORIGIN_SIZE)) => #mkRef(DEST, #projectionsFor(CTXTS), MUT, metadata(#maybeDynamicSize(SIZE, VAL), OFFSET, ORIGIN_SIZE) ) ... @@ -1266,11 +1092,8 @@ This eliminates any `Deref` projections from the place, and also resolves `Index syntax Evaluation ::= #mkRef( WriteTo , ProjectionElems , Mutability , Metadata ) // [function, total] // ----------------------------------------------------------------------------------------------- - // Create Reference for local variable (stack depth 0, no offset) - rule #mkRef( toLocal(I) , PROJS, MUT, META) => Reference( 0 , place(local(I), PROJS), MUT, META) ... - - // Create Reference for stack frame variable (stack depth OFFSET, with pointer offset) - rule #mkRef(toStack(OFFSET, LOCAL), PROJS, MUT, META) => Reference(OFFSET, place( LOCAL , PROJS), MUT, META) ... + // Create Reference to a runtime slot. + rule #mkRef(toSlot(SLOT), PROJS, MUT, META) => Reference(slotPlace(SLOT, PROJS), MUT, META) ... // Create AllocRef for heap allocation (assumed zero offset, no offset concept for heap) rule #mkRef(toAlloc(ALLOC_ID) , PROJS, _ , META) => AllocRef(ALLOC_ID, PROJS, META) ... @@ -1306,17 +1129,17 @@ The operation typically creates a pointer with empty metadata. rule rvalueAddressOf(MUT, place(local(I), PROJS)) => - #traverseProjection(toLocal(I), getValue(LOCALS, I), PROJS, .Contexts) - ~> #forPtr(MUT, metadata(#metadataSize(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS), 0, noMetadataSize)) // TODO These initial values might get overwrote + #traverseProjection(toSlot(#frameSlotId(SLOTS, I)), CURVAL, PROJS, .Contexts) + ~> #forPtr(MUT, metadata(#metadataSize(TY, PROJS), 0, noMetadataSize)) // TODO These initial values might get overwrote // we should use #alignOf to emulate the address ... - LOCALS - requires 0 <=Int I andBool I SLOTS ... + ... #frameSlotId(SLOTS, I) |-> typedValue(CURVAL:Value, TY:Ty, _:Mutability) ... + requires 0 <=Int I andBool I #traverseProjection(DEST, VAL:Value, .ProjectionElems, CTXTS) ~> #forPtr(MUT, metadata(SIZE, OFFSET, ORIGIN_SIZE)) => #mkPtr(DEST, #projectionsFor(CTXTS), MUT, metadata(#maybeDynamicSize(SIZE, VAL), OFFSET, ORIGIN_SIZE)) ... @@ -1324,8 +1147,7 @@ The operation typically creates a pointer with empty metadata. syntax Evaluation ::= #mkPtr ( WriteTo, ProjectionElems, Mutability , Metadata ) // [function, total] // ------------------------------------------------------------------------------------------ - rule #mkPtr( toLocal(I) , PROJS, MUT, META) => PtrLocal( 0 , place(local(I), PROJS), MUT, META) ... - rule #mkPtr(toStack(STACK_OFFSET, LOCAL), PROJS, MUT, META) => PtrLocal(STACK_OFFSET, place( LOCAL , PROJS), MUT, META) ... + rule #mkPtr(toSlot(SLOT), PROJS, MUT, META) => PtrLocal(slotPlace(SLOT, PROJS), MUT, META) ... ``` In practice, the `AddressOf` can often be found applied to references that get dereferenced first, @@ -1335,25 +1157,25 @@ a special rule for this case is applied with higher priority. ```k rule rvalueAddressOf(MUT, place(local(I), projectionElemDeref .ProjectionElems)) => - refToPtrLocal(getValue(LOCALS, I), MUT) + refToPtrLocal(CURVAL, MUT) // we should use #alignOf to emulate the address ... - LOCALS + SLOTS ... + ... #frameSlotId(SLOTS, I) |-> typedValue(CURVAL:Value, _:Ty, _:Mutability) ... requires 0 <=Int I - andBool I true - rule isRef( _OTHER ) => false [owise] + rule isRef(Reference(_, _, _)) => true + rule isRef( _OTHER ) => false [owise] syntax Value ::= refToPtrLocal ( Value , Mutability ) [function] - rule refToPtrLocal(Reference(STACK_OFFSET, PLACE, _, META), MUT) => PtrLocal(STACK_OFFSET, PLACE, MUT, META) + rule refToPtrLocal(Reference(PLACE, _, META), MUT) => PtrLocal(PLACE, MUT, META) ``` ## Type casts @@ -1435,8 +1257,8 @@ When the source and target types are pointer types with the same pointee type (i the cast preserves the source pointer and its metadata unchanged. ```k - rule #cast(PtrLocal(OFFSET, PLACE, MUT, META), castKindPtrToPtr, TY_SOURCE, TY_TARGET) - => PtrLocal(OFFSET, PLACE, MUT, META) + rule #cast(PtrLocal(PLACE, MUT, META), castKindPtrToPtr, TY_SOURCE, TY_TARGET) + => PtrLocal(PLACE, MUT, META) ... requires pointeeTy(lookupTy(TY_SOURCE)) ==K pointeeTy(lookupTy(TY_TARGET)) @@ -1446,11 +1268,10 @@ the cast preserves the source pointer and its metadata unchanged. Otherwise, compute the type projection and convert metadata accordingly. ```k - rule #cast(PtrLocal(OFFSET, place(LOCAL, PROJS), MUT, META), castKindPtrToPtr, TY_SOURCE, TY_TARGET) + rule #cast(PtrLocal(slotPlace(SLOT, PROJS), MUT, META), castKindPtrToPtr, TY_SOURCE, TY_TARGET) => PtrLocal( - OFFSET, - place(LOCAL, appendP(PROJS, {#typeProjection(lookupTy(TY_SOURCE), lookupTy(TY_TARGET))}:>ProjectionElems)), + slotPlace(SLOT, appendP(PROJS, {#typeProjection(lookupTy(TY_SOURCE), lookupTy(TY_TARGET))}:>ProjectionElems)), MUT, #convertMetadata(META, lookupTy(TY_TARGET)) ) @@ -1543,15 +1364,15 @@ Specifically, pointers to arrays of statically-known length are cast to pointers The original metadata is therefore already stored as `staticSize` to avoid having to look it up here. ```k - rule #cast(PtrLocal(OFFSET, PLACE, MUT, metadata(staticSize(SIZE), PTR_OFFSET, ORIGIN_SIZE)), castKindPointerCoercion(pointerCoercionUnsize), _TY_SOURCE, _TY_TARGET) + rule #cast(PtrLocal(PLACE, MUT, metadata(staticSize(SIZE), PTR_OFFSET, ORIGIN_SIZE)), castKindPointerCoercion(pointerCoercionUnsize), _TY_SOURCE, _TY_TARGET) => - PtrLocal(OFFSET, PLACE, MUT, metadata(dynamicSize(SIZE), PTR_OFFSET, ORIGIN_SIZE)) + PtrLocal(PLACE, MUT, metadata(dynamicSize(SIZE), PTR_OFFSET, ORIGIN_SIZE)) ... - rule #cast(Reference(OFFSET, PLACE, MUT, metadata(staticSize(SIZE), PTR_OFFSET, ORIGIN_SIZE)), castKindPointerCoercion(pointerCoercionUnsize), _TY_SOURCE, _TY_TARGET) + rule #cast(Reference(PLACE, MUT, metadata(staticSize(SIZE), PTR_OFFSET, ORIGIN_SIZE)), castKindPointerCoercion(pointerCoercionUnsize), _TY_SOURCE, _TY_TARGET) => - Reference(OFFSET, PLACE, MUT, metadata(dynamicSize(SIZE), PTR_OFFSET, ORIGIN_SIZE)) + Reference(PLACE, MUT, metadata(dynamicSize(SIZE), PTR_OFFSET, ORIGIN_SIZE)) ... @@ -1571,13 +1392,13 @@ Support for `castKindTransmute` in this semantics is very limited because of the What can be supported without additional layout consideration is trivial casts between the same underlying type (mutable or not). ```k - rule #cast(Reference(_, _, _, _) #as REF, castKindTransmute, TY_SOURCE, TY_TARGET) => REF ... + rule #cast(Reference(_, _, _) #as REF, castKindTransmute, TY_SOURCE, TY_TARGET) => REF ... requires lookupTy(TY_SOURCE) ==K lookupTy(TY_TARGET) rule #cast(AllocRef(_, _, _) #as REF, castKindTransmute, TY_SOURCE, TY_TARGET) => REF ... requires lookupTy(TY_SOURCE) ==K lookupTy(TY_TARGET) - rule #cast(PtrLocal(_, _, _, _) #as PTR, castKindTransmute, TY_SOURCE, TY_TARGET) => PTR ... + rule #cast(PtrLocal(_, _, _) #as PTR, castKindTransmute, TY_SOURCE, TY_TARGET) => PTR ... requires lookupTy(TY_SOURCE) ==K lookupTy(TY_TARGET) ``` @@ -2336,8 +2157,8 @@ The unary operation `unOpPtrMetadata`, when given a reference or pointer to a sl * For values with statically-known size, this operation returns a _unit_ value. However, these calls should not occur in practical programs. ```k - rule #applyUnOp(unOpPtrMetadata, Reference(_, _, _, metadata(dynamicSize(SIZE), _, _))) => Integer(SIZE, 64, false) ... - rule #applyUnOp(unOpPtrMetadata, PtrLocal(_, _, _, metadata(dynamicSize(SIZE), _, _))) => Integer(SIZE, 64, false) ... + rule #applyUnOp(unOpPtrMetadata, Reference(_, _, metadata(dynamicSize(SIZE), _, _))) => Integer(SIZE, 64, false) ... + rule #applyUnOp(unOpPtrMetadata, PtrLocal(_, _, metadata(dynamicSize(SIZE), _, _))) => Integer(SIZE, 64, false) ... rule #applyUnOp(unOpPtrMetadata, AllocRef( _ , _, metadata(dynamicSize(SIZE), _, _))) => Integer(SIZE, 64, false) ... // could add a rule for cases without metadata @@ -2351,26 +2172,25 @@ Raw pointer comparisons ignore mutability, but require the address and metadata syntax Bool ::= #ptrLocalEq(Value, Value) [function, total] rule #ptrLocalEq( - PtrLocal(OFFSET1, PLACE1, _, PTRMETA1), - PtrLocal(OFFSET2, PLACE2, _, PTRMETA2) + PtrLocal(PLACE1, _, PTRMETA1), + PtrLocal(PLACE2, _, PTRMETA2) ) - => OFFSET1 ==Int OFFSET2 - andBool PLACE1 ==K PLACE2 + => PLACE1 ==K PLACE2 andBool PTRMETA1 ==K PTRMETA2 rule #ptrLocalEq(_, _) => false [owise] rule #applyBinOp( binOpEq, - PtrLocal(_, _, _, _) #as PTR1, - PtrLocal(_, _, _, _) #as PTR2, + PtrLocal(_, _, _) #as PTR1, + PtrLocal(_, _, _) #as PTR2, _ ) => BoolVal(#ptrLocalEq(PTR1, PTR2)) rule #applyBinOp( binOpNe, - PtrLocal(_, _, _, _) #as PTR1, - PtrLocal(_, _, _, _) #as PTR2, + PtrLocal(_, _, _) #as PTR1, + PtrLocal(_, _, _) #as PTR2, _ ) => BoolVal(notBool #ptrLocalEq(PTR1, PTR2)) @@ -2388,22 +2208,22 @@ A trivial case where `binOpOffset` applies an offset of `0` is added with higher // Trivial case when adding 0 - valid for any pointer rule #applyBinOp( binOpOffset, - PtrLocal( STACK_DEPTH , PLACE , MUT, POINTEE_METADATA ), + PtrLocal( PLACE , MUT, POINTEE_METADATA ), Integer(VAL, _WIDTH, _SIGNED), // Trivial case when adding 0 _CHECKED) => - PtrLocal( STACK_DEPTH , PLACE , MUT, POINTEE_METADATA ) + PtrLocal( PLACE , MUT, POINTEE_METADATA ) requires VAL ==Int 0 [preserves-definedness, priority(40)] // Check offset bounds against origin pointer with dynamicSize metadata rule #applyBinOp( binOpOffset, - PtrLocal( STACK_DEPTH , PLACE , MUT, metadata(CURRENT_SIZE, CURRENT_OFFSET, dynamicSize(ORIGIN_SIZE)) ), + PtrLocal( PLACE , MUT, metadata(CURRENT_SIZE, CURRENT_OFFSET, dynamicSize(ORIGIN_SIZE)) ), Integer(OFFSET_VAL, _WIDTH, _SIGN), // offset: signed (for stable offset) or unsigned (for get_unchecked) _CHECKED) => - PtrLocal( STACK_DEPTH , PLACE , MUT, metadata(CURRENT_SIZE, CURRENT_OFFSET +Int OFFSET_VAL, dynamicSize(ORIGIN_SIZE)) ) + PtrLocal( PLACE , MUT, metadata(CURRENT_SIZE, CURRENT_OFFSET +Int OFFSET_VAL, dynamicSize(ORIGIN_SIZE)) ) requires OFFSET_VAL >=Int 0 andBool CURRENT_OFFSET +Int OFFSET_VAL <=Int ORIGIN_SIZE [preserves-definedness] @@ -2411,11 +2231,11 @@ A trivial case where `binOpOffset` applies an offset of `0` is added with higher // Check offset bounds against origin pointer with staticSize metadata rule #applyBinOp( binOpOffset, - PtrLocal( STACK_DEPTH , PLACE , MUT, metadata(CURRENT_SIZE, CURRENT_OFFSET, staticSize(ORIGIN_SIZE)) ), + PtrLocal( PLACE , MUT, metadata(CURRENT_SIZE, CURRENT_OFFSET, staticSize(ORIGIN_SIZE)) ), Integer(OFFSET_VAL, _WIDTH, _SIGN), // offset: signed (for stable offset) or unsigned (for get_unchecked) _CHECKED) => - PtrLocal( STACK_DEPTH , PLACE , MUT, metadata(CURRENT_SIZE, CURRENT_OFFSET +Int OFFSET_VAL, staticSize(ORIGIN_SIZE)) ) + PtrLocal( PLACE , MUT, metadata(CURRENT_SIZE, CURRENT_OFFSET +Int OFFSET_VAL, staticSize(ORIGIN_SIZE)) ) requires OFFSET_VAL >=Int 0 andBool CURRENT_OFFSET +Int OFFSET_VAL <=Int ORIGIN_SIZE [preserves-definedness] diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/value.md b/kmir/src/kmir/kdist/mir-semantics/rt/value.md index 676784869..5b4f58d64 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/value.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/value.md @@ -22,13 +22,16 @@ Values in MIR are represented at a certain abstraction level, interpreting the g High-level values can be - a range of built-in types (signed and unsigned integer numbers, floats, `str` and `bool`) - built-in product type constructs (`struct`s, `enum`s, and tuples, with heterogenous component types) -- references to a place in the current or an enclosing stack frame +- references to a runtime slot stored in the global slot store - arrays and slices (with homogenous element types) The special `Moved` value represents values that have been used and should not be accessed any more. `Moved` values may be overwritten with a new value but using them will halt execution. ```k + syntax SlotPlace ::= slotPlace ( Int , ProjectionElems ) [symbol(SlotPlace)] + // runtime slot handle, projections within the pointee + syntax Value ::= Integer( Int, Int, Bool ) [symbol(Value::Integer)] // value, bit-width, signedness for un/signed int | BoolVal( Bool ) [symbol(Value::BoolVal)] @@ -42,15 +45,14 @@ The special `Moved` value represents values that have been used and should not b // The Value is the data, and FieldIdx determines the type from the union's fields | Float( Float, Int ) [symbol(Value::Float)] // value, bit-width for f16-f128 - | Reference( Int , Place , Mutability , Metadata ) + | Reference( SlotPlace , Mutability , Metadata ) [symbol(Value::Reference)] - // stack depth (initially 0), place, borrow kind, metadata (size, pointer offset, origin size) + // absolute runtime slot place, borrow kind, metadata (size, pointer offset, origin size) | Range( List ) [symbol(Value::Range)] // homogenous values for array/slice - | PtrLocal( Int , Place , Mutability, Metadata ) + | PtrLocal( SlotPlace , Mutability, Metadata ) [symbol(Value::PtrLocal)] - // pointer to a local TypedValue (on the stack) - // fields are the same as in Reference + // pointer to a runtime slot, fields are the same as in Reference | FunPtr ( Ty ) // function pointer, created by operandConstant only. Ty is a key in the function table | AllocRef ( AllocId , ProjectionElems , Metadata ) @@ -86,14 +88,14 @@ Other types without metadata use `noMetadataSize`. ## Local variables -A list `locals` of local variables of a stack frame is stored as values together -with their type information (to enable type-checking assignments). Also, the -`Mutability` is remembered to prevent mutation of immutable values. +A runtime slot stores a `TypedLocal` together with its type information (to +enable type-checking assignments). Also, the `Mutability` is remembered to +prevent mutation of immutable values. The local variables may be actual values (`typedValue`) or uninitialised (`NewLocal`). ```k - // local storage of the stack frame + // value stored in a runtime slot syntax TypedLocal ::= TypedValue | NewLocal syntax TypedValue ::= typedValue ( Value , Ty , Mutability ) [symbol(typedValue)] diff --git a/kmir/src/kmir/kmir.py b/kmir/src/kmir/kmir.py index 77f83c46e..cdd880d9b 100644 --- a/kmir/src/kmir/kmir.py +++ b/kmir/src/kmir/kmir.py @@ -89,7 +89,13 @@ def parser(self) -> Parser: return Parser(self.definition) @contextmanager - def kcfg_explore(self, label: str | None = None, terminate_on_thunk: bool = False) -> Iterator[KCFGExplore]: + def kcfg_explore( + self, + label: str | None = None, + terminate_on_thunk: bool = False, + *, + log_succ_rewrites: bool = True, + ) -> Iterator[KCFGExplore]: with cterm_symbolic( self.definition, self.definition_dir, @@ -97,6 +103,7 @@ def kcfg_explore(self, label: str | None = None, terminate_on_thunk: bool = Fals bug_report=self.bug_report, id=label if self.bug_report is not None else None, # NB bug report arg.s must be coherent simplify_each=30, + log_succ_rewrites=log_succ_rewrites, ) as cts: yield KCFGExplore(cts, kcfg_semantics=KMIRSemantics(terminate_on_thunk=terminate_on_thunk)) diff --git a/kmir/src/kmir/utils.py b/kmir/src/kmir/utils.py index 8feb00ca5..ca86c4a34 100644 --- a/kmir/src/kmir/utils.py +++ b/kmir/src/kmir/utils.py @@ -1,5 +1,6 @@ from __future__ import annotations +import heapq import re from pathlib import Path from typing import TYPE_CHECKING, Sequence @@ -9,7 +10,6 @@ if TYPE_CHECKING: from pyk.cterm.show import CTermShow from pyk.kast.inner import KInner - from pyk.kcfg.kcfg import KCFG from pyk.proof.reachability import APRProof from .smir import SMIRInfo @@ -177,53 +177,62 @@ def classify(node_id: int) -> str: reachable_leaf_count = 0 leaf_lines: list[str] = [] - def _path_nodes(source_id: int, path: Sequence[KCFG.Successor]) -> list[int]: + def _successor_edges(source_id: int) -> list[tuple[int, int]]: from pyk.kcfg.kcfg import KCFG as _KCFG - node_ids = [source_id] - current = source_id - for succ in path: - target_id: int | None = None - if isinstance(succ, _KCFG.EdgeLike): - target_id = succ.target.id - elif isinstance(succ, _KCFG.MultiEdge): - targets = list(succ.targets) - if len(targets) == 1: - target_id = targets[0].id - if target_id is not None and target_id != current: - node_ids.append(target_id) - current = target_id - return node_ids - - for leaf in sorted(leaves, key=lambda n: n.id): - paths = kcfg.paths_between(proof.init, leaf.id) - if not paths: - leaf_lines.append(f' leaf {leaf.id}: unreachable from init') - continue + edges: list[tuple[int, int]] = [] + for succ in kcfg.successors(source_id): + match succ: + case _KCFG.Edge(target=target, depth=depth): + edges.append((target.id, depth)) + case _KCFG.MergedEdge(target=target, edges=merged_edges): + edges.append((target.id, min(edge.depth for edge in merged_edges))) + case _KCFG.Cover(target=target): + edges.append((target.id, 0)) + case _KCFG.Split(targets=targets): + edges.extend((target.id, 0) for target in targets) + case _KCFG.NDBranch(targets=targets): + edges.extend((target.id, 1) for target in targets) + case _: + raise ValueError(f'Cannot handle Successor type: {type(succ)}') + return edges - path_infos: list[tuple[int, tuple[int, ...]]] = [] - seen_sequences: set[tuple[int, ...]] = set() + shortest_steps: dict[int, int] = {proof.init: 0} + shortest_prev: dict[int, int] = {} + worklist: list[tuple[int, int]] = [(0, proof.init)] - for path in paths: - steps = kcfg.path_length(path) - node_seq = tuple(_path_nodes(proof.init, path)) - if node_seq in seen_sequences: - continue - seen_sequences.add(node_seq) - path_infos.append((steps, node_seq)) + while worklist: + curr_steps, node_id = heapq.heappop(worklist) + if curr_steps != shortest_steps.get(node_id): + continue + for target_id, weight in sorted(_successor_edges(node_id)): + next_steps = curr_steps + weight + prev_steps = shortest_steps.get(target_id) + # Keep the first equal-cost predecessor. Rewriting predecessors on + # ties can create zero-cost cycles through Cover/Split edges and + # make path reconstruction loop forever. + if prev_steps is None or next_steps < prev_steps: + shortest_steps[target_id] = next_steps + shortest_prev[target_id] = node_id + heapq.heappush(worklist, (next_steps, target_id)) + + def _shortest_path_nodes(target_id: int) -> list[int]: + node_ids = [target_id] + while node_ids[-1] != proof.init: + node_ids.append(shortest_prev[node_ids[-1]]) + node_ids.reverse() + return node_ids - if not path_infos: + for leaf in sorted(leaves, key=lambda n: n.id): + min_steps = shortest_steps.get(leaf.id) + if min_steps is None: leaf_lines.append(f' leaf {leaf.id}: unreachable from init') continue - total_steps += min(steps for steps, _ in path_infos) + total_steps += min_steps reachable_leaf_count += 1 - path_infos.sort(key=lambda info: (info[0], info[1])) - - for idx, (steps, node_seq) in enumerate(path_infos, start=1): - suffix = '' if len(path_infos) == 1 else f' (path {idx}/{len(path_infos)})' - seq_str = ' -> '.join(str(nid) for nid in node_seq) - leaf_lines.append(f' leaf {leaf.id}{suffix}: steps {steps}, path {seq_str}') + seq_str = ' -> '.join(str(nid) for nid in _shortest_path_nodes(leaf.id)) + leaf_lines.append(f' leaf {leaf.id}: shortest steps {min_steps}, path {seq_str}') lines.append(f' total leaves (non-root): {len(leaves)}') lines.append(f' reachable leaves : {reachable_leaf_count}') diff --git a/kmir/src/kmir/value.py b/kmir/src/kmir/value.py index e1374422c..f8345fcc9 100644 --- a/kmir/src/kmir/value.py +++ b/kmir/src/kmir/value.py @@ -91,15 +91,13 @@ def to_kast(self) -> KInner: @dataclass class RefValue(Value): - stack_depth: int - place: Place + place: SlotPlace mut: bool metadata: Metadata def to_kast(self) -> KInner: return KApply( 'Value::Reference', - intToken(self.stack_depth), self.place.to_kast(), KApply('Mutability::Mut') if self.mut else KApply('Mutability::Not'), self.metadata.to_kast(), @@ -108,15 +106,13 @@ def to_kast(self) -> KInner: @dataclass class PtrLocalValue(Value): - stack_depth: int - place: Place + place: SlotPlace mut: bool metadata: Metadata def to_kast(self) -> KInner: return KApply( 'Value::PtrLocal', - intToken(self.stack_depth), self.place.to_kast(), KApply('Mutability::Mut') if self.mut else KApply('Mutability::Not'), self.metadata.to_kast(), @@ -151,6 +147,19 @@ def to_kast(self) -> KInner: ) +@dataclass +class SlotPlace: + slot: int + # projection_elems: tuple[ProjectionElem, ...] + + def to_kast(self) -> KInner: + return KApply( + 'SlotPlace', + intToken(self.slot), + KApply('ProjectionElems::empty'), # TODO + ) + + @dataclass class Metadata: size: MetadataSize diff --git a/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.state b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.state index baeb2b64a..cd3d1607a 100644 --- a/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.state +++ b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.state @@ -28,16 +28,28 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 42 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 42 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Integer ( 42 , 32 , true ) , ty ( 16 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 42 , 32 , true ) , ty ( 16 ) , mutabilityNot ) + 3 |-> typedValue ( BoolVal ( true ) , ty ( 28 ) , mutabilityNot ) + 4 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 29 ) , mutabilityNot ) + 5 |-> typedValue ( Reference ( slotPlace ( 2 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 29 ) , mutabilityNot ) + 6 |-> newLocal ( ty ( 30 ) , mutabilityMut ) + + + 7 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-custom-printer.expected b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-custom-printer.expected index bd2fdf0a9..ae26a36c1 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-custom-printer.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-custom-printer.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: src/rust/library/std/src/rt.rs:194 │ -│ (7 steps) +│ (9 steps) ├─ 3 (terminal) │ #EndProgram ~> .K │ function: main diff --git a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-default-printer.expected b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-default-printer.expected index bd2fdf0a9..ae26a36c1 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-default-printer.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-default-printer.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: src/rust/library/std/src/rt.rs:194 │ -│ (7 steps) +│ (9 steps) ├─ 3 (terminal) │ #EndProgram ~> .K │ function: main diff --git a/kmir/src/tests/integration/data/prove-rs/slotstore-symbolic-branch.rs b/kmir/src/tests/integration/data/prove-rs/slotstore-symbolic-branch.rs new file mode 100644 index 000000000..3075b3cf7 --- /dev/null +++ b/kmir/src/tests/integration/data/prove-rs/slotstore-symbolic-branch.rs @@ -0,0 +1,16 @@ +fn classify(x: u32) -> u32 { + if x > 10 { + 1 + } else { + 0 + } +} + +fn caller(a: u32) { + let result = classify(a); + assert!(result <= 1); +} + +fn main() { + caller(5); +} diff --git a/kmir/src/tests/integration/test_decode_value.py b/kmir/src/tests/integration/test_decode_value.py index afbcb2560..012a7add9 100644 --- a/kmir/src/tests/integration/test_decode_value.py +++ b/kmir/src/tests/integration/test_decode_value.py @@ -85,6 +85,8 @@ def dedent(s: str) -> str: Lbl'-LT-'locals'-GT-'{}(Lbl'Stop'List{}()) ), Lbl'-LT-'stack'-GT-'{}(Lbl'Stop'List{}()), + Lbl'-LT-'slotStore'-GT-'{}(Lbl'Stop'Map{}()), + Lbl'-LT-'nextSlot'-GT-'{}(\dv{SortInt{}}("0")) ), Lbl'-LT-'generatedCounter'-GT-'{}(\dv{SortInt{}}("0")) ) diff --git a/kmir/src/tests/integration/test_integration.py b/kmir/src/tests/integration/test_integration.py index d6e891398..790159d86 100644 --- a/kmir/src/tests/integration/test_integration.py +++ b/kmir/src/tests/integration/test_integration.py @@ -28,6 +28,7 @@ PROVE_DIR = (Path(__file__).parent / 'data' / 'prove-rs').resolve(strict=True) PROVE_FILES = list(PROVE_DIR.glob('*.*')) PROVE_START_SYMBOLS = { + 'slotstore-symbolic-branch': ['caller'], 'symbolic-args-fail': ['main', 'eats_all_args'], 'symbolic-structs-fail': ['eats_struct_args'], 'unchecked_arithmetic': ['unchecked_add_i32', 'unchecked_sub_usize', 'unchecked_mul_isize'], @@ -42,6 +43,7 @@ 'spl-multisig-iter-eq-copied-next': ['repro'], } PROVE_SHOW_SPECS = [ + 'slotstore-symbolic-branch', 'local-raw-fail', 'interior-mut-fail', 'interior-mut3-fail', From dfb9c71edbc42b82a780ed8dd4efb3e2cd90731a Mon Sep 17 00:00:00 2001 From: Stevengre Date: Sat, 18 Apr 2026 16:59:30 +0800 Subject: [PATCH 02/19] refactor(rt): derive reserved slots with total functions --- kmir/src/kmir/kdist/mir-semantics/kmir.md | 22 +++++++--- .../slotstore-symbolic-branch.caller.expected | 44 +++++++++++++++++++ 2 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 kmir/src/tests/integration/data/prove-rs/show/slotstore-symbolic-branch.caller.expected diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 6ce7df932..8e62f46cc 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -465,15 +465,27 @@ The local data has to be set up for the call, which requires information about t // TODO: Haven't handled "noBody" case - rule #reserveSlots(.LocalDecls) => .K ... + syntax Int ::= #reserveNextSlot(Int, LocalDecls) [function, total] + syntax List ::= #reserveLocals(Int, LocalDecls) [function, total] + syntax Map ::= #reserveSlotStore(Map, Int, LocalDecls) [function, total] - rule #reserveSlots(localDecl(TY, _, MUT) REST:LocalDecls) => #reserveSlots(REST) ... - NEXT:Int => NEXT +Int 1 + rule #reserveNextSlot(NEXT, .LocalDecls) => NEXT + rule #reserveNextSlot(NEXT, localDecl(_, _, _) REST:LocalDecls) => #reserveNextSlot(NEXT +Int 1, REST) + + rule #reserveLocals(_, .LocalDecls) => .List + rule #reserveLocals(NEXT, localDecl(_, _, _) REST:LocalDecls) => ListItem(NEXT) #reserveLocals(NEXT +Int 1, REST) + + rule #reserveSlotStore(STORE, _, .LocalDecls) => STORE + rule #reserveSlotStore(STORE, NEXT, localDecl(TY, _, MUT) REST:LocalDecls) + => #reserveSlotStore(STORE[NEXT <- newLocal(TY, MUT)], NEXT +Int 1, REST) + + rule #reserveSlots(DECLS:LocalDecls) => .K ... + NEXT:Int => #reserveNextSlot(NEXT, DECLS) - SLOTS => SLOTS ListItem(NEXT) + _ => #reserveLocals(NEXT, DECLS) ... - STORE => STORE[NEXT <- newLocal(TY, MUT)] + STORE => #reserveSlotStore(STORE, NEXT, DECLS) syntax KItem ::= #setArgsFromStack ( Int, Operands) | #setArgFromStack ( Int, Operand) diff --git a/kmir/src/tests/integration/data/prove-rs/show/slotstore-symbolic-branch.caller.expected b/kmir/src/tests/integration/data/prove-rs/show/slotstore-symbolic-branch.caller.expected new file mode 100644 index 000000000..48d1d60a7 --- /dev/null +++ b/kmir/src/tests/integration/data/prove-rs/show/slotstore-symbolic-branch.caller.expected @@ -0,0 +1,44 @@ + +┌─ 1 (root, init) +│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ span: 0 +│ +│ (42 steps) +├─ 3 (split) +│ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 2 ) ) +┃ +┃ (branch) +┣━━┓ subst: .Subst +┃ ┃ constraint: +┃ ┃ notBool ARG_UINT1:Int >Int 10 +┃ │ +┃ ├─ 4 +┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 2 ) ) +┃ │ +┃ │ (50 steps) +┃ ├─ 6 (terminal) +┃ │ #EndProgram ~> .K +┃ │ +┃ ┊ constraint: true +┃ ┊ subst: ... +┃ └─ 2 (leaf, target, terminal) +┃ #EndProgram ~> .K +┃ +┗━━┓ subst: .Subst + ┃ constraint: + ┃ ARG_UINT1:Int >Int 10 + │ + ├─ 5 + │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 2 ) ) + │ + │ (51 steps) + ├─ 7 (terminal) + │ #EndProgram ~> .K + │ + ┊ constraint: true + ┊ subst: ... + └─ 2 (leaf, target, terminal) + #EndProgram ~> .K + + + From 3a796ea892adc4bb3181dd3a8afd03038cc32f7f Mon Sep 17 00:00:00 2001 From: Stevengre Date: Sat, 18 Apr 2026 17:03:31 +0800 Subject: [PATCH 03/19] chore(kmir): drop unrelated proof utility changes --- kmir/src/kmir/_prove.py | 54 +++--------- kmir/src/kmir/kmir.py | 9 +- kmir/src/kmir/utils.py | 86 ++++++++----------- ...sert-true.main.cli-custom-printer.expected | 4 +- ...ert-true.main.cli-default-printer.expected | 4 +- 5 files changed, 53 insertions(+), 104 deletions(-) diff --git a/kmir/src/kmir/_prove.py b/kmir/src/kmir/_prove.py index 66115d88a..5b391d698 100644 --- a/kmir/src/kmir/_prove.py +++ b/kmir/src/kmir/_prove.py @@ -11,7 +11,7 @@ from pyk.kast.manip import abstract_term_safely, split_config_from from pyk.kcfg import KCFG from pyk.kcfg.explore import KCFGExplore -from pyk.kore.rpc import BoosterServer, DefaultError, KoreClient +from pyk.kore.rpc import BoosterServer, KoreClient from pyk.proof.proof import parallel_advance_proof from pyk.proof.reachability import APRProof, APRProver @@ -42,14 +42,14 @@ def prove(opts: ProveOpts) -> APRProof: if opts.proof_dir is not None: target_path = opts.proof_dir / label - return _prove(opts, target_path, label, allow_rpc_recovery=False) + return _prove(opts, target_path, label) with tempfile.TemporaryDirectory() as tmp_dir: target_path = Path(tmp_dir) - return _prove(opts, target_path, label, allow_rpc_recovery=True) + return _prove(opts, target_path, label) -def _prove(opts: ProveOpts, target_path: Path, label: str, *, allow_rpc_recovery: bool) -> APRProof: +def _prove(opts: ProveOpts, target_path: Path, label: str) -> APRProof: if not opts.reload and opts.proof_dir is not None and APRProof.proof_data_exists(label, opts.proof_dir): _LOGGER.info(f'Reading proof from disc: {opts.proof_dir}, {label}') proof = APRProof.read_proof_data(opts.proof_dir, label) @@ -97,13 +97,12 @@ def _prove(opts: ProveOpts, target_path: Path, label: str, *, allow_rpc_recovery break_on_function=opts.break_on_function or None, ) - proof_root = opts.proof_dir if opts.proof_dir is not None else target_path proof = apr_proof_from_smir( kmir, label, smir_info, start_symbol=opts.start_symbol, - proof_dir=proof_root, + proof_dir=opts.proof_dir, ) if proof.proof_dir is not None and (proof.proof_dir / label).is_dir(): smir_info.dump(proof.proof_dir / proof.id / 'smir.json') @@ -128,17 +127,11 @@ def _prove(opts: ProveOpts, target_path: Path, label: str, *, allow_rpc_recovery break_every_step=opts.break_every_step, break_on_function=opts.break_on_function, ) - try: - if opts.max_workers and opts.max_workers > 1: - _prove_parallel(kmir, proof, opts=opts, label=label, cut_point_rules=cut_point_rules) - else: - _prove_sequential(kmir, proof, opts=opts, label=label, cut_point_rules=cut_point_rules) - return proof - except (DefaultError, RuntimeError) as err: - recovered = _recover_proof_on_rpc_error(proof, err, allow_rpc_recovery=allow_rpc_recovery) - if recovered is not None: - return recovered - raise + if opts.max_workers and opts.max_workers > 1: + _prove_parallel(kmir, proof, opts=opts, label=label, cut_point_rules=cut_point_rules) + else: + _prove_sequential(kmir, proof, opts=opts, label=label, cut_point_rules=cut_point_rules) + return proof def _prove_parallel( @@ -173,7 +166,6 @@ def create_prover() -> APRProver: cterm_symbolic = CTermSymbolic( client, kmir.definition, - log_succ_rewrites=_record_proof_logs(opts), ) kcfg_explore = KCFGExplore( cterm_symbolic, @@ -207,7 +199,6 @@ def _prove_sequential( with kmir.kcfg_explore( label, terminate_on_thunk=opts.terminate_on_thunk, - log_succ_rewrites=_record_proof_logs(opts), ) as kcfg_explore: prover = APRProver( kcfg_explore, @@ -221,31 +212,6 @@ def _prove_sequential( maintenance_rate=opts.maintenance_rate, ) - -def _record_proof_logs(opts: ProveOpts) -> bool: - # Persisted proofs may later be sectioned using stored rewrite logs. - # Ephemeral test proofs do not need them, and omitting them avoids huge RPC payloads. - return opts.proof_dir is not None - - -def _recover_proof_on_rpc_error(proof: APRProof, err: Exception, *, allow_rpc_recovery: bool) -> APRProof | None: - if not allow_rpc_recovery: - return None - - if proof.proof_dir is None or not APRProof.proof_data_exists(proof.id, proof.proof_dir): - return None - - if isinstance(err, RuntimeError) and str(err) != 'Empty response received': - return None - - recovered = APRProof.read_proof_data(proof.proof_dir, proof.id) - if recovered.passed or recovered.failed: - _LOGGER.warning(f'Recovered saved proof after RPC error: {proof.id}') - return recovered - - return None - - def apr_proof_from_smir( kmir: KMIR, id: str, diff --git a/kmir/src/kmir/kmir.py b/kmir/src/kmir/kmir.py index cdd880d9b..77f83c46e 100644 --- a/kmir/src/kmir/kmir.py +++ b/kmir/src/kmir/kmir.py @@ -89,13 +89,7 @@ def parser(self) -> Parser: return Parser(self.definition) @contextmanager - def kcfg_explore( - self, - label: str | None = None, - terminate_on_thunk: bool = False, - *, - log_succ_rewrites: bool = True, - ) -> Iterator[KCFGExplore]: + def kcfg_explore(self, label: str | None = None, terminate_on_thunk: bool = False) -> Iterator[KCFGExplore]: with cterm_symbolic( self.definition, self.definition_dir, @@ -103,7 +97,6 @@ def kcfg_explore( bug_report=self.bug_report, id=label if self.bug_report is not None else None, # NB bug report arg.s must be coherent simplify_each=30, - log_succ_rewrites=log_succ_rewrites, ) as cts: yield KCFGExplore(cts, kcfg_semantics=KMIRSemantics(terminate_on_thunk=terminate_on_thunk)) diff --git a/kmir/src/kmir/utils.py b/kmir/src/kmir/utils.py index ca86c4a34..1c8e0ef89 100644 --- a/kmir/src/kmir/utils.py +++ b/kmir/src/kmir/utils.py @@ -1,6 +1,5 @@ from __future__ import annotations -import heapq import re from pathlib import Path from typing import TYPE_CHECKING, Sequence @@ -177,62 +176,53 @@ def classify(node_id: int) -> str: reachable_leaf_count = 0 leaf_lines: list[str] = [] - def _successor_edges(source_id: int) -> list[tuple[int, int]]: + def _path_nodes(source_id: int, path: Sequence[KCFG.Successor]) -> list[int]: from pyk.kcfg.kcfg import KCFG as _KCFG - edges: list[tuple[int, int]] = [] - for succ in kcfg.successors(source_id): - match succ: - case _KCFG.Edge(target=target, depth=depth): - edges.append((target.id, depth)) - case _KCFG.MergedEdge(target=target, edges=merged_edges): - edges.append((target.id, min(edge.depth for edge in merged_edges))) - case _KCFG.Cover(target=target): - edges.append((target.id, 0)) - case _KCFG.Split(targets=targets): - edges.extend((target.id, 0) for target in targets) - case _KCFG.NDBranch(targets=targets): - edges.extend((target.id, 1) for target in targets) - case _: - raise ValueError(f'Cannot handle Successor type: {type(succ)}') - return edges - - shortest_steps: dict[int, int] = {proof.init: 0} - shortest_prev: dict[int, int] = {} - worklist: list[tuple[int, int]] = [(0, proof.init)] - - while worklist: - curr_steps, node_id = heapq.heappop(worklist) - if curr_steps != shortest_steps.get(node_id): - continue - for target_id, weight in sorted(_successor_edges(node_id)): - next_steps = curr_steps + weight - prev_steps = shortest_steps.get(target_id) - # Keep the first equal-cost predecessor. Rewriting predecessors on - # ties can create zero-cost cycles through Cover/Split edges and - # make path reconstruction loop forever. - if prev_steps is None or next_steps < prev_steps: - shortest_steps[target_id] = next_steps - shortest_prev[target_id] = node_id - heapq.heappush(worklist, (next_steps, target_id)) - - def _shortest_path_nodes(target_id: int) -> list[int]: - node_ids = [target_id] - while node_ids[-1] != proof.init: - node_ids.append(shortest_prev[node_ids[-1]]) - node_ids.reverse() + node_ids = [source_id] + current = source_id + for succ in path: + target_id: int | None = None + if isinstance(succ, _KCFG.EdgeLike): + target_id = succ.target.id + elif isinstance(succ, _KCFG.MultiEdge): + targets = list(succ.targets) + if len(targets) == 1: + target_id = targets[0].id + if target_id is not None and target_id != current: + node_ids.append(target_id) + current = target_id return node_ids for leaf in sorted(leaves, key=lambda n: n.id): - min_steps = shortest_steps.get(leaf.id) - if min_steps is None: + paths = kcfg.paths_between(proof.init, leaf.id) + if not paths: + leaf_lines.append(f' leaf {leaf.id}: unreachable from init') + continue + + path_infos: list[tuple[int, tuple[int, ...]]] = [] + seen_sequences: set[tuple[int, ...]] = set() + + for path in paths: + steps = kcfg.path_length(path) + node_seq = tuple(_path_nodes(proof.init, path)) + if node_seq in seen_sequences: + continue + seen_sequences.add(node_seq) + path_infos.append((steps, node_seq)) + + if not path_infos: leaf_lines.append(f' leaf {leaf.id}: unreachable from init') continue - total_steps += min_steps + total_steps += min(steps for steps, _ in path_infos) reachable_leaf_count += 1 - seq_str = ' -> '.join(str(nid) for nid in _shortest_path_nodes(leaf.id)) - leaf_lines.append(f' leaf {leaf.id}: shortest steps {min_steps}, path {seq_str}') + path_infos.sort(key=lambda info: (info[0], info[1])) + + for idx, (steps, node_seq) in enumerate(path_infos, start=1): + suffix = '' if len(path_infos) == 1 else f' (path {idx}/{len(path_infos)})' + seq_str = ' -> '.join(str(nid) for nid in node_seq) + leaf_lines.append(f' leaf {leaf.id}{suffix}: steps {steps}, path {seq_str}') lines.append(f' total leaves (non-root): {len(leaves)}') lines.append(f' reachable leaves : {reachable_leaf_count}') diff --git a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-custom-printer.expected b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-custom-printer.expected index ae26a36c1..675b464a9 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-custom-printer.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-custom-printer.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: src/rust/library/std/src/rt.rs:194 │ -│ (9 steps) +│ (7 steps) ├─ 3 (terminal) │ #EndProgram ~> .K │ function: main @@ -11,4 +11,4 @@ ┊ constraint: true ┊ subst: ... └─ 2 (leaf, target, terminal) - #EndProgram ~> .K \ No newline at end of file + #EndProgram ~> .K diff --git a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-default-printer.expected b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-default-printer.expected index ae26a36c1..675b464a9 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-default-printer.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-default-printer.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: src/rust/library/std/src/rt.rs:194 │ -│ (9 steps) +│ (7 steps) ├─ 3 (terminal) │ #EndProgram ~> .K │ function: main @@ -11,4 +11,4 @@ ┊ constraint: true ┊ subst: ... └─ 2 (leaf, target, terminal) - #EndProgram ~> .K \ No newline at end of file + #EndProgram ~> .K From 047dc132bbf89f76cdc9cc1b174c24fa4f6bb30c Mon Sep 17 00:00:00 2001 From: Stevengre Date: Sat, 18 Apr 2026 17:15:32 +0800 Subject: [PATCH 04/19] chore(kmir): restore _prove formatting --- kmir/src/kmir/_prove.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kmir/src/kmir/_prove.py b/kmir/src/kmir/_prove.py index 5b391d698..d705b85e5 100644 --- a/kmir/src/kmir/_prove.py +++ b/kmir/src/kmir/_prove.py @@ -196,10 +196,7 @@ def _prove_sequential( label: str, cut_point_rules: list[str], ) -> None: - with kmir.kcfg_explore( - label, - terminate_on_thunk=opts.terminate_on_thunk, - ) as kcfg_explore: + with kmir.kcfg_explore(label, terminate_on_thunk=opts.terminate_on_thunk) as kcfg_explore: prover = APRProver( kcfg_explore, execute_depth=opts.max_depth, @@ -211,7 +208,6 @@ def _prove_sequential( fail_fast=opts.fail_fast, maintenance_rate=opts.maintenance_rate, ) - def apr_proof_from_smir( kmir: KMIR, id: str, From 5a470e1848ecae3d13e00f4775133a1c7e283241 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Sat, 18 Apr 2026 17:17:09 +0800 Subject: [PATCH 05/19] chore(kmir): match _prove spacing with master --- kmir/src/kmir/_prove.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kmir/src/kmir/_prove.py b/kmir/src/kmir/_prove.py index d705b85e5..61d2a352d 100644 --- a/kmir/src/kmir/_prove.py +++ b/kmir/src/kmir/_prove.py @@ -127,6 +127,7 @@ def _prove(opts: ProveOpts, target_path: Path, label: str) -> APRProof: break_every_step=opts.break_every_step, break_on_function=opts.break_on_function, ) + if opts.max_workers and opts.max_workers > 1: _prove_parallel(kmir, proof, opts=opts, label=label, cut_point_rules=cut_point_rules) else: @@ -208,6 +209,8 @@ def _prove_sequential( fail_fast=opts.fail_fast, maintenance_rate=opts.maintenance_rate, ) + + def apr_proof_from_smir( kmir: KMIR, id: str, From 3a7d80b167e94f4c81805c26661b8d35eead52cd Mon Sep 17 00:00:00 2001 From: Stevengre Date: Sat, 18 Apr 2026 17:27:48 +0800 Subject: [PATCH 06/19] fix(kmir): reset generated counter in call configs --- kmir/src/kmir/kast.py | 4 ++-- kmir/src/kmir/utils.py | 1 + .../show/assert-true.main.cli-custom-printer.expected | 4 ++-- .../show/assert-true.main.cli-default-printer.expected | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/kmir/src/kmir/kast.py b/kmir/src/kmir/kast.py index def071d46..61561d3cc 100644 --- a/kmir/src/kmir/kast.py +++ b/kmir/src/kmir/kast.py @@ -200,7 +200,7 @@ def init_subst() -> dict[str, KInner]: 'LOCALS_CELL': list_of(slot_ids), 'SLOTSTORE_CELL': map_of(zip(slot_ids, localvars, strict=True)), 'NEXTSLOT_CELL': token(len(slot_ids)), - 'GENERATEDCOUNTER_CELL': token(len(slot_ids)), + 'GENERATEDCOUNTER_CELL': token(0), }, } ) @@ -226,7 +226,7 @@ def _make_symbolic_call_config( 'LOCALS_CELL': list_of(slot_ids), 'SLOTSTORE_CELL': map_of(zip(slot_ids, locals, strict=True)), 'NEXTSLOT_CELL': token(len(slot_ids)), - 'GENERATEDCOUNTER_CELL': token(len(slot_ids)), + 'GENERATEDCOUNTER_CELL': token(0), }, ) empty_config = definition.empty_config(KSort('GeneratedTopCell')) diff --git a/kmir/src/kmir/utils.py b/kmir/src/kmir/utils.py index 1c8e0ef89..8feb00ca5 100644 --- a/kmir/src/kmir/utils.py +++ b/kmir/src/kmir/utils.py @@ -9,6 +9,7 @@ if TYPE_CHECKING: from pyk.cterm.show import CTermShow from pyk.kast.inner import KInner + from pyk.kcfg.kcfg import KCFG from pyk.proof.reachability import APRProof from .smir import SMIRInfo diff --git a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-custom-printer.expected b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-custom-printer.expected index 675b464a9..5fa941c89 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-custom-printer.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-custom-printer.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: src/rust/library/std/src/rt.rs:194 │ -│ (7 steps) +│ (8 steps) ├─ 3 (terminal) │ #EndProgram ~> .K │ function: main @@ -11,4 +11,4 @@ ┊ constraint: true ┊ subst: ... └─ 2 (leaf, target, terminal) - #EndProgram ~> .K + #EndProgram ~> .K \ No newline at end of file diff --git a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-default-printer.expected b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-default-printer.expected index 675b464a9..5fa941c89 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-default-printer.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-default-printer.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: src/rust/library/std/src/rt.rs:194 │ -│ (7 steps) +│ (8 steps) ├─ 3 (terminal) │ #EndProgram ~> .K │ function: main @@ -11,4 +11,4 @@ ┊ constraint: true ┊ subst: ... └─ 2 (leaf, target, terminal) - #EndProgram ~> .K + #EndProgram ~> .K \ No newline at end of file From 6b250dd56b06fc69e2c2a15d0ab2c02d13e701ff Mon Sep 17 00:00:00 2001 From: Stevengre Date: Sat, 18 Apr 2026 17:38:30 +0800 Subject: [PATCH 07/19] refactor(rt): move allValues into rt-data --- kmir/src/kmir/kdist/mir-semantics/kmir-ast.md | 2 -- kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md | 5 ----- kmir/src/kmir/kdist/mir-semantics/rt/data.md | 6 ++++++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir-ast.md b/kmir/src/kmir/kdist/mir-semantics/kmir-ast.md index 8bd0ea121..8000aa5b6 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir-ast.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir-ast.md @@ -33,7 +33,5 @@ module KMIR-AST syntax TypeMappings ::= List{TypeMapping, ""} [group(mir-list), symbol(TypeMappings::append), terminator-symbol(TypeMappings::empty)] - syntax Bool ::= allValues ( List ) [function, total, symbol(allValues)] - endmodule ``` diff --git a/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md b/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md index 99618a13e..fc568d7a1 100644 --- a/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md +++ b/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md @@ -35,11 +35,6 @@ The lists used in the semantics are cons-lists, so only rules with a head elemen rule 0 <=Int size(_LIST:List) => true [simplification] - // -------------------------------------------------- - rule allValues(.List) => true - rule allValues(ListItem(_:Value) REST) => allValues(REST) - rule allValues(ListItem(_) _REST) => false [owise] - // Symbolic prove-rs inputs use fresh `List` variables to stand for arrays, slices, // and aggregate argument lists whose elements are still runtime `Value`s. The core // semantics checks this invariant explicitly with `allValues(...)`; this lemma keeps diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/data.md b/kmir/src/kmir/kdist/mir-semantics/rt/data.md index 3005c8773..22ebee03b 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/data.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/data.md @@ -41,6 +41,8 @@ Each frame keeps an ordered `locals` list mapping MIR `local(i)` indexes to stab More often than not, a slot or list element must be selected by index and is required to be of a certain sort. ```k + syntax Bool ::= allValues ( List ) [function, total, symbol(allValues)] + syntax Int ::= #frameSlotId ( List, Int ) [function] // ------------------------------------------------- rule #frameSlotId(SLOTS, IDX) => {SLOTS[IDX]}:>Int @@ -56,6 +58,10 @@ More often than not, a slot or list element must be selected by index and is req requires 0 <=Int IDX andBool IDX true + rule allValues(ListItem(_:Value) REST) => allValues(REST) + rule allValues(ListItem(_) _REST) => false [owise] ``` To ensure the sort coercions above do not cause any harm, some definedness-related rules are added here: From f937f24551a566a6b3af5295348eb2c91ea56d1e Mon Sep 17 00:00:00 2001 From: Stevengre Date: Sat, 18 Apr 2026 20:25:26 +0800 Subject: [PATCH 08/19] docs(kmir): clarify allValues lemma rationale --- .../src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md b/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md index fc568d7a1..a74fcd9d4 100644 --- a/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md +++ b/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md @@ -16,7 +16,6 @@ module KMIR-LEMMAS imports INT-SYMBOLIC imports BOOL - imports KMIR-AST imports RT-DATA ``` ## Simplifications for lists to avoid spurious branching on error cases in control flow @@ -35,16 +34,17 @@ The lists used in the semantics are cons-lists, so only rules with a head elemen rule 0 <=Int size(_LIST:List) => true [simplification] - // Symbolic prove-rs inputs use fresh `List` variables to stand for arrays, slices, - // and aggregate argument lists whose elements are still runtime `Value`s. The core - // semantics checks this invariant explicitly with `allValues(...)`; this lemma keeps - // the corresponding builtin `List:set` definedness from forking on impossible cases. + // In symbolic-args-fail.rs:eats_all_args, the branch `if x6.len() > 0 { x6[0] = ...; }` + // updates a symbolic array via `ELEMS[0 <- VAL]`. The backend needs both + // `allValues(ELEMS)` and an in-bounds index to treat that builtin update as defined. + // Without this lemma, the proof bottoms out before the write rule can fire. rule #Ceil(ELEMS[IDX <- _VAL:Value]) => #Ceil(ELEMS) #And {true #Equals allValues(ELEMS)} #And {true #Equals 0 <=Int IDX andBool IDX Date: Sat, 18 Apr 2026 20:28:02 +0800 Subject: [PATCH 09/19] style(rt): group allValues syntax and rules --- kmir/src/kmir/kdist/mir-semantics/rt/data.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/data.md b/kmir/src/kmir/kdist/mir-semantics/rt/data.md index 22ebee03b..7738f93a9 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/data.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/data.md @@ -43,6 +43,10 @@ More often than not, a slot or list element must be selected by index and is req ```k syntax Bool ::= allValues ( List ) [function, total, symbol(allValues)] + rule allValues(.List) => true + rule allValues(ListItem(_:Value) REST) => allValues(REST) + rule allValues(ListItem(_) _REST) => false [owise] + syntax Int ::= #frameSlotId ( List, Int ) [function] // ------------------------------------------------- rule #frameSlotId(SLOTS, IDX) => {SLOTS[IDX]}:>Int @@ -58,10 +62,6 @@ More often than not, a slot or list element must be selected by index and is req requires 0 <=Int IDX andBool IDX true - rule allValues(ListItem(_:Value) REST) => allValues(REST) - rule allValues(ListItem(_) _REST) => false [owise] ``` To ensure the sort coercions above do not cause any harm, some definedness-related rules are added here: From 377bf338e2aeec42cab12d6bd9379c5976e4839c Mon Sep 17 00:00:00 2001 From: Stevengre Date: Sat, 18 Apr 2026 20:54:24 +0800 Subject: [PATCH 10/19] refactor(rt): inline range element updates --- kmir/src/kmir/kdist/mir-semantics/rt/data.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/data.md b/kmir/src/kmir/kdist/mir-semantics/rt/data.md index 7738f93a9..297c6d21e 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/data.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/data.md @@ -298,17 +298,10 @@ These helpers mark down, as we traverse the projection, what `Place` we are curr syntax Contexts ::= List{Context, ""} syntax Value ::= #buildUpdate ( Value , Contexts ) [function] - syntax List ::= #setRangeElem ( List , Int , Value ) [function] // ---------------------------------------------------------- rule #buildUpdate(VAL, .Contexts) => VAL [preserves-definedness] - rule #setRangeElem(ELEMS, IDX, VAL) - => ELEMS[IDX <- VAL] - requires 0 <=Int IDX andBool IDX #buildUpdate(Aggregate(IDX, ARGS[I <- VAL]), CTXS) [preserves-definedness] // valid list indexing checked upon context construction @@ -318,7 +311,7 @@ These helpers mark down, as we traverse the projection, what `Place` we are curr [preserves-definedness] rule #buildUpdate(VAL, CtxIndex(ELEMS, I) CTXS) - => #buildUpdate(Range(#setRangeElem(ELEMS, I, VAL)), CTXS) + => #buildUpdate(Range(ELEMS[I <- VAL]), CTXS) [preserves-definedness] // valid list indexing checked upon context construction // we don't expect an update to happen on an entire _subslice_ but define a rule for it anyway From 7afc245b7aa195978a1480b8406118840dee0ac9 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Sat, 18 Apr 2026 20:57:38 +0800 Subject: [PATCH 11/19] style(kmir): minimize locals naming churn --- .../kmir/kdist/mir-semantics/intrinsics.md | 12 +-- kmir/src/kmir/kdist/mir-semantics/kmir.md | 82 ++++++++-------- kmir/src/kmir/kdist/mir-semantics/rt/data.md | 94 +++++++++---------- 3 files changed, 94 insertions(+), 94 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/intrinsics.md b/kmir/src/kmir/kdist/mir-semantics/intrinsics.md index 6b5e5a709..94ed1ef18 100644 --- a/kmir/src/kmir/kdist/mir-semantics/intrinsics.md +++ b/kmir/src/kmir/kdist/mir-semantics/intrinsics.md @@ -101,19 +101,19 @@ Execution gets stuck (no matching rule) when operands have different types or un rule #getType(operandCopy(place(local(I), PROJS))) => getTyOf(tyOfLocal(LOCAL), PROJS) ... - SLOTS ... + LOCALS ... SLOT:Int |-> LOCAL:TypedLocal ... - requires 0 <=Int I andBool I #getType(operandMove(place(local(I), PROJS))) => getTyOf(tyOfLocal(LOCAL), PROJS) ... - SLOTS ... + LOCALS ... SLOT:Int |-> LOCAL:TypedLocal ... - requires 0 <=Int I andBool I #getType(operandConstant(constOperand(_, _, mirConst(_, TY, _)))) => TY ... diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 8e62f46cc..627f860a3 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -104,9 +104,9 @@ will effectively be no-ops at this level). #setLocalValue(PLACE, RVAL) ... - SLOTS ... - ... #frameSlotId(SLOTS, I) |-> LOCAL:TypedLocal ... - requires 0 <=Int I andBool I LOCALS + ... #frameSlotId(LOCALS, I) |-> LOCAL:TypedLocal ... + requires 0 <=Int I andBool I - SLOTS ... - ... #frameSlotId(SLOTS, I) |-> LOCAL:TypedLocal ... - requires 0 <=Int I andBool I LOCALS + ... #frameSlotId(LOCALS, I) |-> LOCAL:TypedLocal ... + requires 0 <=Int I andBool I #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _ => - #setLocalValue(DEST, VAL) ~> #dropSlots(SLOTS) ~> #execBlockIdx(TARGET) + #setLocalValue(DEST, VAL) ~> #dropSlots(LOCALS) ~> #execBlockIdx(TARGET) _ => CALLER // @@ -234,16 +234,16 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f DEST => NEWDEST someBasicBlockIdx(TARGET) => NEWTARGET _ => UNWIND - SLOTS => NEWSLOTS + LOCALS => NEWLOCALS // - ... #frameSlotId(SLOTS, 0) |-> typedValue(VAL:Value, _, _) ... + ... #frameSlotId(LOCALS, 0) |-> typedValue(VAL:Value, _, _) ... // remaining call stack (without top frame) - ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWSLOTS)) STACK => STACK + ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK // no value to return, skip writing rule [termReturnNone]: #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _ => - #dropSlots(SLOTS) ~> #execBlockIdx(TARGET) + #dropSlots(LOCALS) ~> #execBlockIdx(TARGET) _ => CALLER // @@ -252,11 +252,11 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f _ => NEWDEST someBasicBlockIdx(TARGET) => NEWTARGET _ => UNWIND - SLOTS => NEWSLOTS + LOCALS => NEWLOCALS // - ... #frameSlotId(SLOTS, 0) |-> newLocal(_, _) ... + ... #frameSlotId(LOCALS, 0) |-> newLocal(_, _) ... // remaining call stack (without top frame) - ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWSLOTS)) STACK => STACK + ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK syntax List ::= #getBlocks( Ty ) [function, total] | #getBlocksAux( MonoItemKind ) [function, total] @@ -293,10 +293,10 @@ The call stack is not necessarily empty at this point so it is left untouched. _ => return(VAL) noBasicBlockIdx - SLOTS + LOCALS ... - ... #frameSlotId(SLOTS, 0) |-> typedValue(VAL:Value, _, _) ... + ... #frameSlotId(LOCALS, 0) |-> typedValue(VAL:Value, _, _) ... rule [endprogram-no-return]: #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _ @@ -305,10 +305,10 @@ The call stack is not necessarily empty at this point so it is left untouched. noBasicBlockIdx - SLOTS + LOCALS ... - ... #frameSlotId(SLOTS, 0) |-> newLocal(_, _) ... + ... #frameSlotId(LOCALS, 0) |-> newLocal(_, _) ... ``` @@ -327,9 +327,9 @@ where the returned result should go. => #execTerminatorCall({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty, lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty), ARGS, DEST, TARGET, UNWIND, SPAN) ... - SLOTS ... - ... #frameSlotId(SLOTS, I) |-> LOCAL:TypedLocal ... - requires 0 <=Int I andBool I LOCALS + ... #frameSlotId(LOCALS, I) |-> LOCAL:TypedLocal ... + requires 0 <=Int I andBool I OLDDEST => DEST OLDTARGET => TARGET OLDUNWIND => UNWIND - SLOTS + LOCALS - STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, SLOTS)) STACK + STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK requires notBool isIntrinsicFunction(FUNC) andBool notBool #functionNameMatchesEnv(getFunctionName(FUNC)) @@ -379,9 +379,9 @@ where the returned result should go. OLDDEST => DEST OLDTARGET => TARGET OLDUNWIND => UNWIND - SLOTS + LOCALS - STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, SLOTS)) STACK + STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK requires notBool isIntrinsicFunction(FUNC) andBool #functionNameMatchesEnv(getFunctionName(FUNC)) @@ -511,10 +511,10 @@ The local data has to be set up for the call, which requires information about t #setLocalValue(place(local(IDX), .ProjectionElems), VAL) ... - ListItem(StackFrame(_, _, _, _, CALLERSLOTS)) _:List - ... #frameSlotId(CALLERSLOTS, I) |-> typedValue(VAL:Value, _, _) ... + ListItem(StackFrame(_, _, _, _, CALLERLOCALS)) _:List + ... #frameSlotId(CALLERLOCALS, I) |-> typedValue(VAL:Value, _, _) ... requires 0 <=Int I - andBool I - ListItem(StackFrame(_, _, _, _, CALLERSLOTS)) _:List + ListItem(StackFrame(_, _, _, _, CALLERLOCALS)) _:List - ... #frameSlotId(CALLERSLOTS, I) |-> (typedValue(VAL:Value, TY:Ty, _) + ... #frameSlotId(CALLERLOCALS, I) |-> (typedValue(VAL:Value, TY:Ty, _) => typedValue(Moved, TY, mutabilityMut)) ... requires 0 <=Int I - andBool I _ => toKList(BLOCKS) - CALLERSLOTS => .List + CALLERLOCALS => .List ... - ... #frameSlotId(CALLERSLOTS, TUPLE) |-> (typedValue(TUPLEVAL:Value, TUPLETY:Ty, _) => typedValue(Moved, TUPLETY, mutabilityMut)) - #frameSlotId(CALLERSLOTS, CLOSURE) |-> (CLOSURELOCAL:TypedLocal => typedValue(Moved, tyOfLocal(CLOSURELOCAL), mutabilityMut)) ... + ... #frameSlotId(CALLERLOCALS, TUPLE) |-> (typedValue(TUPLEVAL:Value, TUPLETY:Ty, _) => typedValue(Moved, TUPLETY, mutabilityMut)) + #frameSlotId(CALLERLOCALS, CLOSURE) |-> (CLOSURELOCAL:TypedLocal => typedValue(Moved, tyOfLocal(CLOSURELOCAL), mutabilityMut)) ... - requires 0 <=Int CLOSURE andBool CLOSURE _ => toKList(BLOCKS) - CALLERSLOTS => .List + CALLERLOCALS => .List ... - ... #frameSlotId(CALLERSLOTS, TUPLE) |-> (typedValue(TUPLEVAL:Value, TUPLETY:Ty, _) => typedValue(Moved, TUPLETY, mutabilityMut)) - #frameSlotId(CALLERSLOTS, CLOSURE) |-> (typedValue(CLOSUREVAL:Value, CLOSURETY:Ty, _) => typedValue(Moved, CLOSURETY, mutabilityMut)) ... + ... #frameSlotId(CALLERLOCALS, TUPLE) |-> (typedValue(TUPLEVAL:Value, TUPLETY:Ty, _) => typedValue(Moved, TUPLETY, mutabilityMut)) + #frameSlotId(CALLERLOCALS, CLOSURE) |-> (typedValue(CLOSUREVAL:Value, CLOSURETY:Ty, _) => typedValue(Moved, CLOSURETY, mutabilityMut)) ... - requires 0 <=Int CLOSURE andBool CLOSURE {SLOTS[IDX]}:>Int - requires 0 <=Int IDX andBool IDX {LOCALS[IDX]}:>Int + requires 0 <=Int IDX andBool IDX operandCopy(place(local(I), PROJECTIONS)) - => #traverseProjection(toSlot(#frameSlotId(SLOTS, I)), VAL, PROJECTIONS, .Contexts) + => #traverseProjection(toSlot(#frameSlotId(LOCALS, I)), VAL, PROJECTIONS, .Contexts) ~> #readProjection(false) ... - SLOTS ... - ... #frameSlotId(SLOTS, I) |-> typedValue(VAL:Value, _, _) ... - requires 0 <=Int I andBool I LOCALS + ... #frameSlotId(LOCALS, I) |-> typedValue(VAL:Value, _, _) ... + requires 0 <=Int I andBool I operandMove(place(local(I), PROJECTIONS)) - => #traverseProjection(toSlot(#frameSlotId(SLOTS, I)), VAL, PROJECTIONS, .Contexts) + => #traverseProjection(toSlot(#frameSlotId(LOCALS, I)), VAL, PROJECTIONS, .Contexts) ~> #readProjection(true) ... - SLOTS ... - ... #frameSlotId(SLOTS, I) |-> typedValue(VAL:Value, _, _) ... - requires 0 <=Int I andBool I LOCALS + ... #frameSlotId(LOCALS, I) |-> typedValue(VAL:Value, _, _) ... + requires 0 <=Int I andBool I #setLocalValue(place(local(I), .ProjectionElems), VAL:Value) => .K ... - SLOTS ... - ... #frameSlotId(SLOTS, I) |-> (typedValue(_:Value, TY:Ty, MUT:Mutability) => typedValue(VAL, TY, MUT)) ... - requires 0 <=Int I andBool I LOCALS + ... #frameSlotId(LOCALS, I) |-> (typedValue(_:Value, TY:Ty, MUT:Mutability) => typedValue(VAL, TY, MUT)) ... + requires 0 <=Int I andBool I #setLocalValue(place(local(I), .ProjectionElems), VAL:Value) => .K ... - SLOTS ... - ... #frameSlotId(SLOTS, I) |-> (newLocal(TY:Ty, MUT:Mutability) => typedValue(VAL, TY, MUT)) ... - requires 0 <=Int I andBool I LOCALS + ... #frameSlotId(LOCALS, I) |-> (newLocal(TY:Ty, MUT:Mutability) => typedValue(VAL, TY, MUT)) ... + requires 0 <=Int I andBool I #setLocalValue(place(local(I), PROJ), VAL:Value) - => #traverseProjection(toSlot(#frameSlotId(SLOTS, I)), CURVAL, PROJ, .Contexts) + => #traverseProjection(toSlot(#frameSlotId(LOCALS, I)), CURVAL, PROJ, .Contexts) ~> #writeProjection(VAL) ... - SLOTS ... - ... #frameSlotId(SLOTS, I) |-> typedValue(CURVAL:Value, _, _) ... + LOCALS + ... #frameSlotId(LOCALS, I) |-> typedValue(CURVAL:Value, _, _) ... requires 0 <=Int I - andBool I - SLOTS ... - ... #frameSlotId(SLOTS, LOCAL) |-> typedValue(INDEXVAL:Value, _, _) ... - requires 0 <=Int LOCAL andBool LOCAL LOCALS + ... #frameSlotId(LOCALS, LOCAL) |-> typedValue(INDEXVAL:Value, _, _) ... + requires 0 <=Int LOCAL andBool LOCAL rvalueCast(CASTKIND, operandCopy(place(local(I), PROJS)) #as OPERAND, TY) => #cast(OPERAND, CASTKIND, getTyOf(tyOfLocal(LOCAL), PROJS), TY) ... - SLOTS ... - ... #frameSlotId(SLOTS, I) |-> LOCAL:TypedLocal ... - requires 0 <=Int I andBool I LOCALS + ... #frameSlotId(LOCALS, I) |-> LOCAL:TypedLocal ... + requires 0 <=Int I andBool I rvalueCast(CASTKIND, operandMove(place(local(I), PROJS)) #as OPERAND, TY) => #cast(OPERAND, CASTKIND, getTyOf(tyOfLocal(LOCAL), PROJS), TY) ... - SLOTS ... - ... #frameSlotId(SLOTS, I) |-> LOCAL:TypedLocal ... - requires 0 <=Int I andBool I LOCALS + ... #frameSlotId(LOCALS, I) |-> LOCAL:TypedLocal ... + requires 0 <=Int I andBool I rvalueDiscriminant(place(local(I), PROJS) #as PLACE) => #discriminant(operandCopy(PLACE), getTyOf(tyOfLocal(LOCAL), PROJS)) ... - SLOTS ... - ... #frameSlotId(SLOTS, I) |-> LOCAL:TypedLocal ... - requires 0 <=Int I andBool I LOCALS + ... #frameSlotId(LOCALS, I) |-> LOCAL:TypedLocal ... + requires 0 <=Int I andBool I rvalueRef(REGION, KIND, place(local(I), PROJS)) ... - SLOTS ... - ... #frameSlotId(SLOTS, I) |-> newLocal(TY:Ty, _:Mutability) ... - requires 0 <=Int I andBool I LOCALS + ... #frameSlotId(LOCALS, I) |-> newLocal(TY:Ty, _:Mutability) ... + requires 0 <=Int I andBool I rvalueRef(_REGION, KIND, place(local(I), PROJS)) - => #traverseProjection(toSlot(#frameSlotId(SLOTS, I)), CURVAL, PROJS, .Contexts) + => #traverseProjection(toSlot(#frameSlotId(LOCALS, I)), CURVAL, PROJS, .Contexts) ~> #forRef(#mutabilityOf(KIND), metadata(#metadataSize(TY, PROJS), 0, noMetadataSize)) // TODO: Sus on this rule ... - SLOTS ... - ... #frameSlotId(SLOTS, I) |-> typedValue(CURVAL:Value, TY:Ty, _:Mutability) ... - requires 0 <=Int I andBool I LOCALS + ... #frameSlotId(LOCALS, I) |-> typedValue(CURVAL:Value, TY:Ty, _:Mutability) ... + requires 0 <=Int I andBool I rvalueAddressOf(MUT, place(local(I), PROJS)) => - #traverseProjection(toSlot(#frameSlotId(SLOTS, I)), CURVAL, PROJS, .Contexts) + #traverseProjection(toSlot(#frameSlotId(LOCALS, I)), CURVAL, PROJS, .Contexts) ~> #forPtr(MUT, metadata(#metadataSize(TY, PROJS), 0, noMetadataSize)) // TODO These initial values might get overwrote // we should use #alignOf to emulate the address ... - SLOTS ... - ... #frameSlotId(SLOTS, I) |-> typedValue(CURVAL:Value, TY:Ty, _:Mutability) ... - requires 0 <=Int I andBool I LOCALS + ... #frameSlotId(LOCALS, I) |-> typedValue(CURVAL:Value, TY:Ty, _:Mutability) ... + requires 0 <=Int I andBool I - SLOTS ... - ... #frameSlotId(SLOTS, I) |-> typedValue(CURVAL:Value, _:Ty, _:Mutability) ... + LOCALS + ... #frameSlotId(LOCALS, I) |-> typedValue(CURVAL:Value, _:Ty, _:Mutability) ... requires 0 <=Int I - andBool I Date: Sat, 18 Apr 2026 21:45:08 +0800 Subject: [PATCH 12/19] refactor(kmir): inline callee entry into call rules --- kmir/src/kmir/kdist/mir-semantics/kmir.md | 197 ++++++++---------- .../slotstore-symbolic-branch.caller.expected | 2 +- 2 files changed, 86 insertions(+), 113 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 627f860a3..57c4778d4 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -349,37 +349,57 @@ where the returned result should go. requires isIntrinsicFunction(FUNC) andBool #functionNameMatchesEnv(getFunctionName(FUNC)) - // Regular function call - full state switching and stack setup + // Regular function call - state switch into the callee and defer argument materialization. rule [termCallFunction]: - #execTerminatorCall(FTY, FUNC, ARGS, DEST, TARGET, UNWIND, SPAN) ~> _ - => #setUpCalleeData(FUNC, ARGS, SPAN) + #execTerminatorCall( + FTY, + monoItemFn(_, _, someBody(body((FIRST:BasicBlock _) #as BLOCKS, NEWLOCALS, _, _, _, _))) #as FUNC, + ARGS, + DEST, + TARGET, + UNWIND, + _SPAN + ) ~> _ + => #loadCallArgs(FUNC, ARGS) ~> #execBlock(FIRST) CALLER => FTY + NEXT:Int => #reserveNextSlot(NEXT, NEWLOCALS) + STORE => #reserveSlotStore(STORE, NEXT, NEWLOCALS) - _ + _ => toKList(BLOCKS) OLDCALLER => CALLER OLDDEST => DEST OLDTARGET => TARGET OLDUNWIND => UNWIND - LOCALS + LOCALS => #reserveLocals(NEXT, NEWLOCALS) STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK requires notBool isIntrinsicFunction(FUNC) andBool notBool #functionNameMatchesEnv(getFunctionName(FUNC)) - // Function call to a function in the break-on set - same as termCallFunction but separate rule id for cut-point + // Same as termCallFunction but separate rule id for cut-point filtering. rule [termCallFunctionFilter]: - #execTerminatorCall(FTY, FUNC, ARGS, DEST, TARGET, UNWIND, SPAN) ~> _ - => #setUpCalleeData(FUNC, ARGS, SPAN) + #execTerminatorCall( + FTY, + monoItemFn(_, _, someBody(body((FIRST:BasicBlock _) #as BLOCKS, NEWLOCALS, _, _, _, _))) #as FUNC, + ARGS, + DEST, + TARGET, + UNWIND, + _SPAN + ) ~> _ + => #loadCallArgs(FUNC, ARGS) ~> #execBlock(FIRST) CALLER => FTY + NEXT:Int => #reserveNextSlot(NEXT, NEWLOCALS) + STORE => #reserveSlotStore(STORE, NEXT, NEWLOCALS) - _ + _ => toKList(BLOCKS) OLDCALLER => CALLER OLDDEST => DEST OLDTARGET => TARGET OLDUNWIND => UNWIND - LOCALS + LOCALS => #reserveLocals(NEXT, NEWLOCALS) STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK requires notBool isIntrinsicFunction(FUNC) @@ -436,35 +456,10 @@ where the returned result should go. rule #continueAt(noBasicBlockIdx) => .K ... ``` -The local data has to be set up for the call, which requires information about the local variables of a call. This step is separate from the above call stack setup because it needs to retrieve the locals declaration from the body. Arguments to the call are `Operands` which refer to the caller's runtime slots, and the data is either _copied_ into the new locals using `#setArgs`, or it needs to be _shared_ via references. +After entering the callee, argument materialization is performed separately. +Arguments refer to the caller's runtime slots on the stack, while the current frame already contains the reserved callee locals. ```k - syntax KItem ::= #setUpCalleeData(MonoItemKind, Operands, Span) - | #reserveSlots(LocalDecls) - - // reserve space for local variables and copy/move arguments from old locals into their place - rule [setupCalleeData]: #setUpCalleeData( - monoItemFn(_, _, someBody(body((FIRST:BasicBlock _) #as BLOCKS, NEWLOCALS, _, _, _, _))), - ARGS, - _SPAN - ) - => - #reserveSlots(NEWLOCALS) ~> #setArgsFromStack(1, ARGS) ~> #execBlock(FIRST) - ... - - // CALLEE - - _ => toKList(BLOCKS) - // CALLER - // DEST - // TARGET - // UNWIND - _ => .List - // assumption: arguments stored as _1 .. _n before actual "local" data - ... - - // TODO: Haven't handled "noBody" case - syntax Int ::= #reserveNextSlot(Int, LocalDecls) [function, total] syntax List ::= #reserveLocals(Int, LocalDecls) [function, total] syntax Map ::= #reserveSlotStore(Map, Int, LocalDecls) [function, total] @@ -479,18 +474,62 @@ The local data has to be set up for the call, which requires information about t rule #reserveSlotStore(STORE, NEXT, localDecl(TY, _, MUT) REST:LocalDecls) => #reserveSlotStore(STORE[NEXT <- newLocal(TY, MUT)], NEXT +Int 1, REST) - rule #reserveSlots(DECLS:LocalDecls) => .K ... - NEXT:Int => #reserveNextSlot(NEXT, DECLS) - - _ => #reserveLocals(NEXT, DECLS) - ... - - STORE => #reserveSlotStore(STORE, NEXT, DECLS) - - syntax KItem ::= #setArgsFromStack ( Int, Operands) + syntax KItem ::= #loadCallArgs(MonoItemKind, Operands) + | #setArgsFromStack ( Int, Operands) | #setArgFromStack ( Int, Operand) | #execIntrinsic ( MonoItemKind, Operands, Place, Span ) + rule #loadCallArgs( + monoItemFn(_, _, someBody(body(_, _, _, _, _, _))), + operandMove(place(local(CLOSURE:Int), .ProjectionElems)) + operandMove(place(local(TUPLE), .ProjectionElems)) + .Operands + ) + => #setTupleArgs(2, TUPLEVAL) + ... + + ListItem(StackFrame(_, _, _, _, CALLERLOCALS)) _:List + + ... #frameSlotId(CALLERLOCALS, TUPLE) |-> (typedValue(TUPLEVAL:Value, TUPLETY:Ty, _) => typedValue(Moved, TUPLETY, mutabilityMut)) + #frameSlotId(CALLERLOCALS, CLOSURE) |-> (CLOSURELOCAL:TypedLocal => typedValue(Moved, tyOfLocal(CLOSURELOCAL), mutabilityMut)) ... + + requires 0 <=Int CLOSURE andBool CLOSURE #loadCallArgs( + monoItemFn(_, _, someBody(body(_, _, _, _, _, _))), + operandMove(place(local(CLOSURE:Int), .ProjectionElems)) + operandMove(place(local(TUPLE), .ProjectionElems)) + .Operands + ) + => #setLocalValue(place(local(1), .ProjectionElems), CLOSUREVAL) ~> #setTupleArgs(2, TUPLEVAL) + ... + + ListItem(StackFrame(_, _, _, _, CALLERLOCALS)) _:List + + ... #frameSlotId(CALLERLOCALS, TUPLE) |-> (typedValue(TUPLEVAL:Value, TUPLETY:Ty, _) => typedValue(Moved, TUPLETY, mutabilityMut)) + #frameSlotId(CALLERLOCALS, CLOSURE) |-> (typedValue(CLOSUREVAL:Value, CLOSURETY:Ty, _) => typedValue(Moved, CLOSURETY, mutabilityMut)) ... + + requires 0 <=Int CLOSURE andBool CLOSURE Ty) ==K typeInfoVoidType + orBool isFunType(lookupTy({pointeeTy(lookupTy(CLOSURETY))}:>Ty)) + ) + [priority(45), preserves-definedness] + + rule #loadCallArgs(_FUNC, ARGS) => #setArgsFromStack(1, ARGS) ... [owise] + // once all arguments have been retrieved, execute rule #setArgsFromStack(_, .Operands) ~> CONT => CONT @@ -548,72 +587,6 @@ Therefore a heuristics is used here: [^spread_arg]: https://doc.rust-lang.org/beta/nightly-rustc/rustc_public/mir/body/struct.Body.html#structfield.spread_arg ```k - // reserve space for local variables and copy/move arguments from a tuple inside the old locals into their place - rule [setupCalleeClosure]: #setUpCalleeData( - monoItemFn(_, _, someBody(body((FIRST:BasicBlock _) #as BLOCKS, NEWLOCALS, _, _, _, _))), - operandMove(place(local(CLOSURE:Int), .ProjectionElems)) - operandMove(place(local(TUPLE), .ProjectionElems)) - .Operands, - _SPAN - ) - => - #reserveSlots(NEWLOCALS) ~> #setTupleArgs(2, TUPLEVAL) ~> #execBlock(FIRST) - // arguments are tuple components, stored as _2 .. _n - ... - - - _ => toKList(BLOCKS) - CALLERLOCALS => .List - ... - - - ... #frameSlotId(CALLERLOCALS, TUPLE) |-> (typedValue(TUPLEVAL:Value, TUPLETY:Ty, _) => typedValue(Moved, TUPLETY, mutabilityMut)) - #frameSlotId(CALLERLOCALS, CLOSURE) |-> (CLOSURELOCAL:TypedLocal => typedValue(Moved, tyOfLocal(CLOSURELOCAL), mutabilityMut)) ... - - requires 0 <=Int CLOSURE andBool CLOSURE #setUpCalleeData( - monoItemFn(_, _, someBody(body((FIRST:BasicBlock _) #as BLOCKS, NEWLOCALS, _, _, _, _))), - operandMove(place(local(CLOSURE:Int), .ProjectionElems)) - operandMove(place(local(TUPLE), .ProjectionElems)) - .Operands, - _SPAN - ) - => - #reserveSlots(NEWLOCALS) ~> #setLocalValue(place(local(1), .ProjectionElems), CLOSUREVAL) - ~> #setTupleArgs(2, TUPLEVAL) ~> #execBlock(FIRST) - // arguments are tuple components, stored as _2 .. _n - ... - - - _ => toKList(BLOCKS) - CALLERLOCALS => .List - ... - - - ... #frameSlotId(CALLERLOCALS, TUPLE) |-> (typedValue(TUPLEVAL:Value, TUPLETY:Ty, _) => typedValue(Moved, TUPLETY, mutabilityMut)) - #frameSlotId(CALLERLOCALS, CLOSURE) |-> (typedValue(CLOSUREVAL:Value, CLOSURETY:Ty, _) => typedValue(Moved, CLOSURETY, mutabilityMut)) ... - - requires 0 <=Int CLOSURE andBool CLOSURE Ty) ==K typeInfoVoidType - orBool isFunType(lookupTy({pointeeTy(lookupTy(CLOSURETY))}:>Ty)) - ) - [priority(45), preserves-definedness] - syntax Bool ::= isTupleType ( TypeInfo ) [function, total] | isRefType ( TypeInfo ) [function, total] | isFunType ( TypeInfo ) [function, total] diff --git a/kmir/src/tests/integration/data/prove-rs/show/slotstore-symbolic-branch.caller.expected b/kmir/src/tests/integration/data/prove-rs/show/slotstore-symbolic-branch.caller.expected index 48d1d60a7..95cb27db5 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/slotstore-symbolic-branch.caller.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/slotstore-symbolic-branch.caller.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (42 steps) +│ (40 steps) ├─ 3 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 2 ) ) ┃ From c35f14efe4e1a6d693da73940d9ba3cf48325f06 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Sun, 19 Apr 2026 00:58:07 +0800 Subject: [PATCH 13/19] refactor(kmir): normalize call argument setup --- kmir/src/kmir/_prove.py | 14 +- kmir/src/kmir/kdist/mir-semantics/kmir.md | 318 +++++++++--------- .../call-with-args/closure-call.state | 47 ++- 3 files changed, 200 insertions(+), 179 deletions(-) diff --git a/kmir/src/kmir/_prove.py b/kmir/src/kmir/_prove.py index 61d2a352d..0feeae179 100644 --- a/kmir/src/kmir/_prove.py +++ b/kmir/src/kmir/_prove.py @@ -287,7 +287,12 @@ def _cut_point_rules( or break_every_terminator or break_every_step ): - cut_point_rules.append('KMIR-CONTROL-FLOW.termCallIntrinsic') + cut_point_rules.extend( + [ + 'KMIR-CONTROL-FLOW.termCallIntrinsic', + 'KMIR-CONTROL-FLOW.termCallIntrinsicLocal', + ] + ) if ( break_on_function_calls or break_on_calls @@ -298,7 +303,12 @@ def _cut_point_rules( cut_point_rules.append('KMIR-CONTROL-FLOW.termCallFunction') if break_on_function: cut_point_rules.append('KMIR-CONTROL-FLOW.termCallFunctionFilter') - cut_point_rules.append('KMIR-CONTROL-FLOW.termCallIntrinsicFilter') + cut_point_rules.extend( + [ + 'KMIR-CONTROL-FLOW.termCallIntrinsicFilter', + 'KMIR-CONTROL-FLOW.termCallIntrinsicFilterLocal', + ] + ) if break_on_terminator_assert or break_every_terminator or break_every_step: cut_point_rules.append('KMIR-CONTROL-FLOW.termAssert') if break_on_terminator_drop or break_every_terminator or break_every_step: diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 57c4778d4..be1c0602c 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -316,55 +316,122 @@ The call stack is not necessarily empty at this point so it is left untouched. where the returned result should go. ```k - syntax KItem ::= #execTerminatorCall(fty: Ty, func: MonoItemKind, args: Operands, destination: Place, target: MaybeBasicBlockIdx, unwind: UnwindAction, Span) + syntax CallableKind ::= "callableFn" + | "callableStatic" + | "callableGlobalAsm" + | "callableIntrinsic" + + syntax KItem ::= #prepareTerminatorCall(List, CallableKind, String, Body, Operands, fty: Ty, destination: Place, target: MaybeBasicBlockIdx, unwind: UnwindAction, Span) + | #execTerminatorCall(kind: CallableKind, functionName: String, args: List, body: Body, fty: Ty, destination: Place, target: MaybeBasicBlockIdx, unwind: UnwindAction, Span) + | #execIntrinsic(MonoItemKind, Operands, Place, Span) rule #execTerminator(terminator(terminatorKindCall(operandConstant(constOperand(_, _, mirConst(constantKindZeroSized, Ty, _))), ARGS, DEST, TARGET, UNWIND), SPAN)) - => #execTerminatorCall(Ty, lookupFunction(Ty), ARGS, DEST, TARGET, UNWIND, SPAN) + => #prepareTerminatorCall(.List, getCallableKind(lookupFunction(Ty)), getFunctionName(lookupFunction(Ty)), #callBody(lookupFunction(Ty)), ARGS, Ty, DEST, TARGET, UNWIND, SPAN) ... + requires notBool isIntrinsicFunction(lookupFunction(Ty)) + andBool #hasCallBody(lookupFunction(Ty)) rule #execTerminator(terminator(terminatorKindCall(operandMove(place(local(I), PROJS)), ARGS, DEST, TARGET, UNWIND), SPAN)) - => #execTerminatorCall({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty, lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty), ARGS, DEST, TARGET, UNWIND, SPAN) + => #prepareTerminatorCall( + .List, + getCallableKind(lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty)), + getFunctionName(lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty)), + #callBody(lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty)), + ARGS, + {getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty, + DEST, + TARGET, + UNWIND, + SPAN + ) ... LOCALS ... #frameSlotId(LOCALS, I) |-> LOCAL:TypedLocal ... requires 0 <=Int I andBool I Ty)) + andBool #hasCallBody(lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty)) [preserves-definedness] // valid local indexing checked, projected call target must resolve to a Ty - // Intrinsic function call - execute directly without state switching + // Intrinsic calls still operate on the original operands because some intrinsic semantics + // inspect the operand shape directly instead of only its evaluated value. rule [termCallIntrinsic]: - #execTerminatorCall(_, FUNC, ARGS, DEST, TARGET, _UNWIND, SPAN) ~> _ - => #execIntrinsic(FUNC, ARGS, DEST, SPAN) ~> #continueAt(TARGET) + #execTerminator(terminator(terminatorKindCall(operandConstant(constOperand(_, _, mirConst(constantKindZeroSized, Ty, _))), ARGS, DEST, TARGET, _UNWIND), SPAN)) ~> _ + => #execIntrinsic(lookupFunction(Ty), ARGS, DEST, SPAN) ~> #continueAt(TARGET) - requires isIntrinsicFunction(FUNC) - andBool notBool #functionNameMatchesEnv(getFunctionName(FUNC)) + requires isIntrinsicFunction(lookupFunction(Ty)) + andBool notBool #functionNameMatchesEnv(getFunctionName(lookupFunction(Ty))) // Intrinsic function call to a function in the break-on set - same as termCallIntrinsic but separate rule id for cut-point rule [termCallIntrinsicFilter]: - #execTerminatorCall(_, FUNC, ARGS, DEST, TARGET, _UNWIND, SPAN) ~> _ - => #execIntrinsic(FUNC, ARGS, DEST, SPAN) ~> #continueAt(TARGET) + #execTerminator(terminator(terminatorKindCall(operandConstant(constOperand(_, _, mirConst(constantKindZeroSized, Ty, _))), ARGS, DEST, TARGET, _UNWIND), SPAN)) ~> _ + => #execIntrinsic(lookupFunction(Ty), ARGS, DEST, SPAN) ~> #continueAt(TARGET) + + requires isIntrinsicFunction(lookupFunction(Ty)) + andBool #functionNameMatchesEnv(getFunctionName(lookupFunction(Ty))) + + rule [termCallIntrinsicLocal]: + #execTerminator(terminator(terminatorKindCall(operandMove(place(local(I), PROJS)), ARGS, DEST, TARGET, _UNWIND), SPAN)) ~> _ + => #execIntrinsic(lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty), ARGS, DEST, SPAN) ~> #continueAt(TARGET) - requires isIntrinsicFunction(FUNC) - andBool #functionNameMatchesEnv(getFunctionName(FUNC)) + LOCALS + ... #frameSlotId(LOCALS, I) |-> LOCAL:TypedLocal ... + requires 0 <=Int I andBool I Ty)) + andBool notBool #functionNameMatchesEnv(getFunctionName(lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty))) + [preserves-definedness] - // Regular function call - state switch into the callee and defer argument materialization. + rule [termCallIntrinsicFilterLocal]: + #execTerminator(terminator(terminatorKindCall(operandMove(place(local(I), PROJS)), ARGS, DEST, TARGET, _UNWIND), SPAN)) ~> _ + => #execIntrinsic(lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty), ARGS, DEST, SPAN) ~> #continueAt(TARGET) + + LOCALS + ... #frameSlotId(LOCALS, I) |-> LOCAL:TypedLocal ... + requires 0 <=Int I andBool I Ty)) + andBool #functionNameMatchesEnv(getFunctionName(lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty))) + [preserves-definedness] + + // Non-intrinsic calls materialize their arguments while the caller frame is still current. + // `spread_arg` is handled before entering the callee, so the callee only sees a flat list + // of values to assign to locals `_1`, `_2`, ... + rule #prepareTerminatorCall(ACC, KIND, NAME, BODY, .Operands, FTY, DEST, TARGET, UNWIND, SPAN) + => #execTerminatorCall(KIND, NAME, #normalizeCallValues(NAME, BODY, ACC), BODY, FTY, DEST, TARGET, UNWIND, SPAN) + ... + + + rule #prepareTerminatorCall(ACC, KIND, NAME, BODY, OP:Operand REST:Operands, FTY, DEST, TARGET, UNWIND, SPAN) + => OP ~> #prepareTerminatorCall(ACC, KIND, NAME, BODY, REST, FTY, DEST, TARGET, UNWIND, SPAN) + ... + + + rule VAL:Value ~> #prepareTerminatorCall(ACC, KIND, NAME, BODY, REST:Operands, FTY, DEST, TARGET, UNWIND, SPAN) + => #prepareTerminatorCall(ACC ListItem(VAL), KIND, NAME, BODY, REST, FTY, DEST, TARGET, UNWIND, SPAN) + ... + + + // Regular function call - state switch into the callee after argument preprocessing is done. rule [termCallFunction]: #execTerminatorCall( - FTY, - monoItemFn(_, _, someBody(body((FIRST:BasicBlock _) #as BLOCKS, NEWLOCALS, _, _, _, _))) #as FUNC, + callableFn, + NAME, ARGS, + body((FIRST:BasicBlock _) #as BLOCKS, NEWLOCALS, _, _, _SPREADARG, _), + FTY, DEST, TARGET, UNWIND, _SPAN ) ~> _ - => #loadCallArgs(FUNC, ARGS) ~> #execBlock(FIRST) + => #execBlock(FIRST) CALLER => FTY NEXT:Int => #reserveNextSlot(NEXT, NEWLOCALS) - STORE => #reserveSlotStore(STORE, NEXT, NEWLOCALS) + STORE => #reserveSlotStore(STORE, NEXT, NEWLOCALS, ARGS) _ => toKList(BLOCKS) OLDCALLER => CALLER @@ -374,25 +441,27 @@ where the returned result should go. LOCALS => #reserveLocals(NEXT, NEWLOCALS) STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK - requires notBool isIntrinsicFunction(FUNC) - andBool notBool #functionNameMatchesEnv(getFunctionName(FUNC)) + requires size(ARGS) #execTerminatorCall( - FTY, - monoItemFn(_, _, someBody(body((FIRST:BasicBlock _) #as BLOCKS, NEWLOCALS, _, _, _, _))) #as FUNC, + callableFn, + NAME, ARGS, + body((FIRST:BasicBlock _) #as BLOCKS, NEWLOCALS, _, _, _SPREADARG, _), + FTY, DEST, TARGET, UNWIND, _SPAN ) ~> _ - => #loadCallArgs(FUNC, ARGS) ~> #execBlock(FIRST) + => #execBlock(FIRST) CALLER => FTY NEXT:Int => #reserveNextSlot(NEXT, NEWLOCALS) - STORE => #reserveSlotStore(STORE, NEXT, NEWLOCALS) + STORE => #reserveSlotStore(STORE, NEXT, NEWLOCALS, ARGS) _ => toKList(BLOCKS) OLDCALLER => CALLER @@ -402,13 +471,26 @@ where the returned result should go. LOCALS => #reserveLocals(NEXT, NEWLOCALS) STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK - requires notBool isIntrinsicFunction(FUNC) - andBool #functionNameMatchesEnv(getFunctionName(FUNC)) + requires size(ARGS) true rule isIntrinsicFunction(_) => false [owise] + syntax CallableKind ::= getCallableKind(MonoItemKind) [function, total] + rule getCallableKind(monoItemFn(_, _, _)) => callableFn + rule getCallableKind(monoItemStatic(_, _, _)) => callableStatic + rule getCallableKind(monoItemGlobalAsm(_)) => callableGlobalAsm + rule getCallableKind(IntrinsicFunction(_)) => callableIntrinsic + + syntax Bool ::= #hasCallBody(MonoItemKind) [function, total] + rule #hasCallBody(monoItemFn(_, _, someBody(_))) => true + rule #hasCallBody(_) => false [owise] + + syntax Body ::= #callBody(MonoItemKind) [function] + rule #callBody(monoItemFn(_, _, someBody(BODY))) => BODY + syntax String ::= getFunctionName(MonoItemKind) [function, total] //--------------------------------------------------------------- rule getFunctionName(monoItemFn(symbol(NAME), _, _)) => NAME @@ -456,13 +538,13 @@ where the returned result should go. rule #continueAt(noBasicBlockIdx) => .K ... ``` -After entering the callee, argument materialization is performed separately. -Arguments refer to the caller's runtime slots on the stack, while the current frame already contains the reserved callee locals. +Caller-side slot allocation now also initializes the callee argument slots directly. ```k syntax Int ::= #reserveNextSlot(Int, LocalDecls) [function, total] syntax List ::= #reserveLocals(Int, LocalDecls) [function, total] - syntax Map ::= #reserveSlotStore(Map, Int, LocalDecls) [function, total] + syntax Map ::= #reserveSlotStore(Map, Int, LocalDecls, List) [function] + | #reserveSlotStoreAux(Map, Int, Bool, LocalDecls, List) [function] rule #reserveNextSlot(NEXT, .LocalDecls) => NEXT rule #reserveNextSlot(NEXT, localDecl(_, _, _) REST:LocalDecls) => #reserveNextSlot(NEXT +Int 1, REST) @@ -470,151 +552,63 @@ Arguments refer to the caller's runtime slots on the stack, while the current fr rule #reserveLocals(_, .LocalDecls) => .List rule #reserveLocals(NEXT, localDecl(_, _, _) REST:LocalDecls) => ListItem(NEXT) #reserveLocals(NEXT +Int 1, REST) - rule #reserveSlotStore(STORE, _, .LocalDecls) => STORE - rule #reserveSlotStore(STORE, NEXT, localDecl(TY, _, MUT) REST:LocalDecls) - => #reserveSlotStore(STORE[NEXT <- newLocal(TY, MUT)], NEXT +Int 1, REST) - - syntax KItem ::= #loadCallArgs(MonoItemKind, Operands) - | #setArgsFromStack ( Int, Operands) - | #setArgFromStack ( Int, Operand) - | #execIntrinsic ( MonoItemKind, Operands, Place, Span ) - - rule #loadCallArgs( - monoItemFn(_, _, someBody(body(_, _, _, _, _, _))), - operandMove(place(local(CLOSURE:Int), .ProjectionElems)) - operandMove(place(local(TUPLE), .ProjectionElems)) - .Operands - ) - => #setTupleArgs(2, TUPLEVAL) - ... - - ListItem(StackFrame(_, _, _, _, CALLERLOCALS)) _:List - - ... #frameSlotId(CALLERLOCALS, TUPLE) |-> (typedValue(TUPLEVAL:Value, TUPLETY:Ty, _) => typedValue(Moved, TUPLETY, mutabilityMut)) - #frameSlotId(CALLERLOCALS, CLOSURE) |-> (CLOSURELOCAL:TypedLocal => typedValue(Moved, tyOfLocal(CLOSURELOCAL), mutabilityMut)) ... - - requires 0 <=Int CLOSURE andBool CLOSURE #loadCallArgs( - monoItemFn(_, _, someBody(body(_, _, _, _, _, _))), - operandMove(place(local(CLOSURE:Int), .ProjectionElems)) - operandMove(place(local(TUPLE), .ProjectionElems)) - .Operands - ) - => #setLocalValue(place(local(1), .ProjectionElems), CLOSUREVAL) ~> #setTupleArgs(2, TUPLEVAL) - ... - - ListItem(StackFrame(_, _, _, _, CALLERLOCALS)) _:List - - ... #frameSlotId(CALLERLOCALS, TUPLE) |-> (typedValue(TUPLEVAL:Value, TUPLETY:Ty, _) => typedValue(Moved, TUPLETY, mutabilityMut)) - #frameSlotId(CALLERLOCALS, CLOSURE) |-> (typedValue(CLOSUREVAL:Value, CLOSURETY:Ty, _) => typedValue(Moved, CLOSURETY, mutabilityMut)) ... - - requires 0 <=Int CLOSURE andBool CLOSURE Ty) ==K typeInfoVoidType - orBool isFunType(lookupTy({pointeeTy(lookupTy(CLOSURETY))}:>Ty)) - ) - [priority(45), preserves-definedness] - - rule #loadCallArgs(_FUNC, ARGS) => #setArgsFromStack(1, ARGS) ... [owise] - - // once all arguments have been retrieved, execute - rule #setArgsFromStack(_, .Operands) ~> CONT => CONT - - // set arguments one by one, marking off moved operands in the provided (caller) LOCALS - rule #setArgsFromStack(IDX, OP:Operand MORE:Operands) ~> CONT - => - #setArgFromStack(IDX, OP) ~> #setArgsFromStack(IDX +Int 1, MORE) ~> CONT - + rule #reserveSlotStore(STORE, NEXT, DECLS, ARGS) => #reserveSlotStoreAux(STORE, NEXT, false, DECLS, ARGS) + [preserves-definedness] - rule #setArgFromStack(IDX, operandConstant(_) #as CONSTOPERAND) - => - #setLocalValue(place(local(IDX), .ProjectionElems), CONSTOPERAND) - ... - + rule #reserveSlotStoreAux(STORE, _, _, .LocalDecls, _ARGS) => STORE + [preserves-definedness] - rule #setArgFromStack(IDX, operandCopy(place(local(I), .ProjectionElems))) - => - #setLocalValue(place(local(IDX), .ProjectionElems), VAL) - ... - - ListItem(StackFrame(_, _, _, _, CALLERLOCALS)) _:List - ... #frameSlotId(CALLERLOCALS, I) |-> typedValue(VAL:Value, _, _) ... - requires 0 <=Int I - andBool I #reserveSlotStoreAux(STORE[NEXT <- newLocal(TY, MUT)], NEXT +Int 1, true, REST, ARGS) + [preserves-definedness] - // TODO: This is not safe, need to add more checks to this. - rule #setArgFromStack(IDX, operandMove(place(local(I), _))) - => - #setLocalValue(place(local(IDX), .ProjectionElems), VAL) - ... - - ListItem(StackFrame(_, _, _, _, CALLERLOCALS)) _:List - - ... #frameSlotId(CALLERLOCALS, I) |-> (typedValue(VAL:Value, TY:Ty, _) - => typedValue(Moved, TY, mutabilityMut)) ... - - requires 0 <=Int I - andBool I #reserveSlotStoreAux(STORE[NEXT <- typedValue(VAL, TY, MUT)], NEXT +Int 1, true, REST, ARGREST) + [preserves-definedness] -For closures (like `|x,y| { things using x and y }`), a special calling convention is in effect: -The first argument of the closure is its environment. -Its type is currently not extracted (KMIR does not currently support variable-capturing) and it is not initialised. -The second argument is a _tuple_ of all the arguments, however the function body expects these arguments as single locals. + rule #reserveSlotStoreAux(STORE, NEXT, true, localDecl(TY, _, MUT) REST:LocalDecls, .List) + => #reserveSlotStoreAux(STORE[NEXT <- newLocal(TY, MUT)], NEXT +Int 1, true, REST, .List) + [preserves-definedness] +``` -Using this calling convention should be indicated by the `spread_arg` field in the function body.[^spread_arg] -However, this field is usually `None` for _closures_, it is only set for internal functions of the Rust execution mechanism. -Therefore a heuristics is used here: -* The function has two arguments, -* the 1st argument has an unknown type (or refers to one), -* and the 2nd argument is a tuple. +For calls using Rust's `rust-call` ABI, the function body identifies the tuple-packed +arguments via its `spread_arg` field.[^spread_arg] +The caller-side operand traversal first materializes the original MIR arguments as values, +then expands the final spread argument into the flat callee argument list. [^spread_arg]: https://doc.rust-lang.org/beta/nightly-rustc/rustc_public/mir/body/struct.Body.html#structfield.spread_arg ```k - syntax Bool ::= isTupleType ( TypeInfo ) [function, total] - | isRefType ( TypeInfo ) [function, total] - | isFunType ( TypeInfo ) [function, total] - // ------------------------------------------------------- - rule isTupleType(typeInfoTupleType(_, _)) => true - rule isTupleType( _ ) => false [owise] - rule isRefType(typeInfoRefType(_)) => true - rule isRefType( _ ) => false [owise] - rule isFunType(typeInfoFunType(_)) => true - rule isFunType( _ ) => false [owise] - - syntax KItem ::= #setTupleArgs ( Int , Value ) - | #setTupleArgs ( Int , List ) - - // unpack tuple and set arguments individually - rule #setTupleArgs(IDX, Aggregate(variantIdx(0), ARGS)) => #setTupleArgs(IDX, ARGS) ... - - rule #setTupleArgs(IDX, VAL:Value) - => #setTupleArgs(IDX, ListItem(VAL)) - ... - [owise] + syntax List ::= #normalizeCallValues(String, Body, List) [function] + | #normalizeRustCallValues(Int, Int, List) [function] + | #spreadArgValues(Value) [function] + syntax Bool ::= #isClosureFunction(String) [function, total] - rule #setTupleArgs(_, .List ) => .K ... + // The preferred source of truth is `spread_arg`: for rust-call bodies it marks + // the final tuple-packed argument that must be flattened before entering the callee. + rule #normalizeCallValues(_NAME, body(_, _, _, _, someLocal(local(SPREAD)), _), VALS) + => #normalizeRustCallValues(1, SPREAD, VALS) - rule #setTupleArgs(IDX, ListItem(VAL) REST:List) - => #setLocalValue(place(local(IDX), .ProjectionElems), VAL) ~> #setTupleArgs(IDX +Int 1, REST) - ... - + // StableMIR currently leaves `spread_arg` unset on closure shim bodies, so keep a + // narrow fallback for the observed receiver-plus-tuple shape. + rule #normalizeCallValues(NAME, body(_, _, _, _, noLocal, _), ListItem(CLOSURE) ListItem(TUPLE) .List) + => ListItem(CLOSURE) #spreadArgValues(TUPLE) + requires #isClosureFunction(NAME) + + rule #normalizeCallValues(_NAME, body(_, _, _, _, noLocal, _), VALS) => VALS [owise] + + rule #normalizeRustCallValues(IDX, SPREAD, ListItem(VAL) REST:List) + => ListItem(VAL) #normalizeRustCallValues(IDX +Int 1, SPREAD, REST) + requires IDX #spreadArgValues(VAL) + requires IDX ==Int SPREAD + + rule #spreadArgValues(Aggregate(variantIdx(0), ARGS)) => ARGS + rule #spreadArgValues(VAL:Value) => ListItem(VAL) [owise] + + rule #isClosureFunction(NAME) => 0 <=Int findString(NAME, "{closure#", 0) ``` diff --git a/kmir/src/tests/integration/data/exec-smir/call-with-args/closure-call.state b/kmir/src/tests/integration/data/exec-smir/call-with-args/closure-call.state index db13358c2..490d892b5 100644 --- a/kmir/src/tests/integration/data/exec-smir/call-with-args/closure-call.state +++ b/kmir/src/tests/integration/data/exec-smir/call-with-args/closure-call.state @@ -28,24 +28,41 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 32 , 32 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 32 , 32 , false ) ) ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32 , 32 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( thunk ( #decodeConstant ( constantKindZeroSized , ty ( 30 ) , typeInfoVoidType ) ) , ty ( 30 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32 , 32 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 31 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 32 , 32 , false ) ) ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 32 , 32 , false ) ) - ListItem ( Integer ( 32 , 32 , false ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( thunk ( #decodeConstant ( constantKindZeroSized , ty ( 33 ) , typeInfoVoidType ) ) , ty ( 33 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 9 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 34 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 32 , 32 , false ) ) - ListItem ( Integer ( 32 , 32 , false ) ) ) , ty ( 32 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Integer ( 32 , 32 , false ) , ty ( 25 ) , mutabilityNot ) + 2 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 32 , 32 , false ) ) ) , ty ( 26 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( 32 , 32 , false ) , ty ( 25 ) , mutabilityNot ) + 4 |-> typedValue ( thunk ( #decodeConstant ( constantKindZeroSized , ty ( 30 ) , typeInfoVoidType ) ) , ty ( 30 ) , mutabilityNot ) + 5 |-> typedValue ( Integer ( 32 , 32 , false ) , ty ( 25 ) , mutabilityNot ) + 6 |-> typedValue ( Moved , ty ( 31 ) , mutabilityMut ) + 7 |-> typedValue ( Moved , ty ( 26 ) , mutabilityMut ) + 8 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 32 , 32 , false ) ) + ListItem ( Integer ( 32 , 32 , false ) ) ) , ty ( 32 ) , mutabilityNot ) + 9 |-> typedValue ( thunk ( #decodeConstant ( constantKindZeroSized , ty ( 33 ) , typeInfoVoidType ) ) , ty ( 33 ) , mutabilityNot ) + 10 |-> newLocal ( ty ( 1 ) , mutabilityNot ) + 11 |-> typedValue ( Moved , ty ( 34 ) , mutabilityMut ) + 12 |-> typedValue ( Moved , ty ( 32 ) , mutabilityMut ) + + + 24 + \ No newline at end of file From 613a61447de932fb1c01c49b50b0e39f87d37d53 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Sun, 19 Apr 2026 10:30:52 +0800 Subject: [PATCH 14/19] refactor(kmir): split call preparation dispatch --- kmir/src/kmir/_prove.py | 14 +--- kmir/src/kmir/kdist/mir-semantics/kmir.md | 75 +++++++------------ .../slotstore-symbolic-branch.caller.expected | 2 +- 3 files changed, 28 insertions(+), 63 deletions(-) diff --git a/kmir/src/kmir/_prove.py b/kmir/src/kmir/_prove.py index 0feeae179..61d2a352d 100644 --- a/kmir/src/kmir/_prove.py +++ b/kmir/src/kmir/_prove.py @@ -287,12 +287,7 @@ def _cut_point_rules( or break_every_terminator or break_every_step ): - cut_point_rules.extend( - [ - 'KMIR-CONTROL-FLOW.termCallIntrinsic', - 'KMIR-CONTROL-FLOW.termCallIntrinsicLocal', - ] - ) + cut_point_rules.append('KMIR-CONTROL-FLOW.termCallIntrinsic') if ( break_on_function_calls or break_on_calls @@ -303,12 +298,7 @@ def _cut_point_rules( cut_point_rules.append('KMIR-CONTROL-FLOW.termCallFunction') if break_on_function: cut_point_rules.append('KMIR-CONTROL-FLOW.termCallFunctionFilter') - cut_point_rules.extend( - [ - 'KMIR-CONTROL-FLOW.termCallIntrinsicFilter', - 'KMIR-CONTROL-FLOW.termCallIntrinsicFilterLocal', - ] - ) + cut_point_rules.append('KMIR-CONTROL-FLOW.termCallIntrinsicFilter') if break_on_terminator_assert or break_every_terminator or break_every_step: cut_point_rules.append('KMIR-CONTROL-FLOW.termAssert') if break_on_terminator_drop or break_every_terminator or break_every_step: diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index be1c0602c..23d2ac0fc 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -321,25 +321,21 @@ where the returned result should go. | "callableGlobalAsm" | "callableIntrinsic" - syntax KItem ::= #prepareTerminatorCall(List, CallableKind, String, Body, Operands, fty: Ty, destination: Place, target: MaybeBasicBlockIdx, unwind: UnwindAction, Span) + syntax KItem ::= #prepareTerminatorCall(fty: Ty, func: MonoItemKind, args: Operands, destination: Place, target: MaybeBasicBlockIdx, unwind: UnwindAction, Span) + | #prepareBodyCall(List, CallableKind, String, Body, Operands, fty: Ty, destination: Place, target: MaybeBasicBlockIdx, unwind: UnwindAction, Span) | #execTerminatorCall(kind: CallableKind, functionName: String, args: List, body: Body, fty: Ty, destination: Place, target: MaybeBasicBlockIdx, unwind: UnwindAction, Span) | #execIntrinsic(MonoItemKind, Operands, Place, Span) rule #execTerminator(terminator(terminatorKindCall(operandConstant(constOperand(_, _, mirConst(constantKindZeroSized, Ty, _))), ARGS, DEST, TARGET, UNWIND), SPAN)) - => #prepareTerminatorCall(.List, getCallableKind(lookupFunction(Ty)), getFunctionName(lookupFunction(Ty)), #callBody(lookupFunction(Ty)), ARGS, Ty, DEST, TARGET, UNWIND, SPAN) + => #prepareTerminatorCall(Ty, lookupFunction(Ty), ARGS, DEST, TARGET, UNWIND, SPAN) ... - requires notBool isIntrinsicFunction(lookupFunction(Ty)) - andBool #hasCallBody(lookupFunction(Ty)) rule #execTerminator(terminator(terminatorKindCall(operandMove(place(local(I), PROJS)), ARGS, DEST, TARGET, UNWIND), SPAN)) => #prepareTerminatorCall( - .List, - getCallableKind(lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty)), - getFunctionName(lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty)), - #callBody(lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty)), - ARGS, {getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty, + lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty), + ARGS, DEST, TARGET, UNWIND, @@ -351,66 +347,45 @@ where the returned result should go. ... #frameSlotId(LOCALS, I) |-> LOCAL:TypedLocal ... requires 0 <=Int I andBool I Ty)) - andBool #hasCallBody(lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty)) [preserves-definedness] // valid local indexing checked, projected call target must resolve to a Ty - // Intrinsic calls still operate on the original operands because some intrinsic semantics - // inspect the operand shape directly instead of only its evaluated value. + // Dispatch resolved call targets before any body-specific preprocessing. rule [termCallIntrinsic]: - #execTerminator(terminator(terminatorKindCall(operandConstant(constOperand(_, _, mirConst(constantKindZeroSized, Ty, _))), ARGS, DEST, TARGET, _UNWIND), SPAN)) ~> _ - => #execIntrinsic(lookupFunction(Ty), ARGS, DEST, SPAN) ~> #continueAt(TARGET) + #prepareTerminatorCall(_FTY, FUNC, ARGS, DEST, TARGET, _UNWIND, SPAN) ~> _ + => #execIntrinsic(FUNC, ARGS, DEST, SPAN) ~> #continueAt(TARGET) - requires isIntrinsicFunction(lookupFunction(Ty)) - andBool notBool #functionNameMatchesEnv(getFunctionName(lookupFunction(Ty))) + requires isIntrinsicFunction(FUNC) + andBool notBool #functionNameMatchesEnv(getFunctionName(FUNC)) // Intrinsic function call to a function in the break-on set - same as termCallIntrinsic but separate rule id for cut-point rule [termCallIntrinsicFilter]: - #execTerminator(terminator(terminatorKindCall(operandConstant(constOperand(_, _, mirConst(constantKindZeroSized, Ty, _))), ARGS, DEST, TARGET, _UNWIND), SPAN)) ~> _ - => #execIntrinsic(lookupFunction(Ty), ARGS, DEST, SPAN) ~> #continueAt(TARGET) - - requires isIntrinsicFunction(lookupFunction(Ty)) - andBool #functionNameMatchesEnv(getFunctionName(lookupFunction(Ty))) - - rule [termCallIntrinsicLocal]: - #execTerminator(terminator(terminatorKindCall(operandMove(place(local(I), PROJS)), ARGS, DEST, TARGET, _UNWIND), SPAN)) ~> _ - => #execIntrinsic(lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty), ARGS, DEST, SPAN) ~> #continueAt(TARGET) - - LOCALS - ... #frameSlotId(LOCALS, I) |-> LOCAL:TypedLocal ... - requires 0 <=Int I andBool I Ty)) - andBool notBool #functionNameMatchesEnv(getFunctionName(lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty))) - [preserves-definedness] - - rule [termCallIntrinsicFilterLocal]: - #execTerminator(terminator(terminatorKindCall(operandMove(place(local(I), PROJS)), ARGS, DEST, TARGET, _UNWIND), SPAN)) ~> _ - => #execIntrinsic(lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty), ARGS, DEST, SPAN) ~> #continueAt(TARGET) + #prepareTerminatorCall(_FTY, FUNC, ARGS, DEST, TARGET, _UNWIND, SPAN) ~> _ + => #execIntrinsic(FUNC, ARGS, DEST, SPAN) ~> #continueAt(TARGET) - LOCALS - ... #frameSlotId(LOCALS, I) |-> LOCAL:TypedLocal ... - requires 0 <=Int I andBool I Ty)) - andBool #functionNameMatchesEnv(getFunctionName(lookupFunction({getTyOf(tyOfLocal(LOCAL), PROJS)}:>Ty))) - [preserves-definedness] + requires isIntrinsicFunction(FUNC) + andBool #functionNameMatchesEnv(getFunctionName(FUNC)) // Non-intrinsic calls materialize their arguments while the caller frame is still current. // `spread_arg` is handled before entering the callee, so the callee only sees a flat list // of values to assign to locals `_1`, `_2`, ... - rule #prepareTerminatorCall(ACC, KIND, NAME, BODY, .Operands, FTY, DEST, TARGET, UNWIND, SPAN) + rule #prepareTerminatorCall(FTY, FUNC, ARGS, DEST, TARGET, UNWIND, SPAN) + => #prepareBodyCall(.List, getCallableKind(FUNC), getFunctionName(FUNC), #callBody(FUNC), ARGS, FTY, DEST, TARGET, UNWIND, SPAN) + + requires notBool isIntrinsicFunction(FUNC) + andBool #hasCallBody(FUNC) + + rule #prepareBodyCall(ACC, KIND, NAME, BODY, .Operands, FTY, DEST, TARGET, UNWIND, SPAN) => #execTerminatorCall(KIND, NAME, #normalizeCallValues(NAME, BODY, ACC), BODY, FTY, DEST, TARGET, UNWIND, SPAN) ... - rule #prepareTerminatorCall(ACC, KIND, NAME, BODY, OP:Operand REST:Operands, FTY, DEST, TARGET, UNWIND, SPAN) - => OP ~> #prepareTerminatorCall(ACC, KIND, NAME, BODY, REST, FTY, DEST, TARGET, UNWIND, SPAN) + rule #prepareBodyCall(ACC, KIND, NAME, BODY, OP:Operand REST:Operands, FTY, DEST, TARGET, UNWIND, SPAN) + => OP ~> #prepareBodyCall(ACC, KIND, NAME, BODY, REST, FTY, DEST, TARGET, UNWIND, SPAN) ... - rule VAL:Value ~> #prepareTerminatorCall(ACC, KIND, NAME, BODY, REST:Operands, FTY, DEST, TARGET, UNWIND, SPAN) - => #prepareTerminatorCall(ACC ListItem(VAL), KIND, NAME, BODY, REST, FTY, DEST, TARGET, UNWIND, SPAN) + rule VAL:Value ~> #prepareBodyCall(ACC, KIND, NAME, BODY, REST:Operands, FTY, DEST, TARGET, UNWIND, SPAN) + => #prepareBodyCall(ACC ListItem(VAL), KIND, NAME, BODY, REST, FTY, DEST, TARGET, UNWIND, SPAN) ... diff --git a/kmir/src/tests/integration/data/prove-rs/show/slotstore-symbolic-branch.caller.expected b/kmir/src/tests/integration/data/prove-rs/show/slotstore-symbolic-branch.caller.expected index 95cb27db5..48d1d60a7 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/slotstore-symbolic-branch.caller.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/slotstore-symbolic-branch.caller.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (40 steps) +│ (42 steps) ├─ 3 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 2 ) ) ┃ From 8e2e2ea9ef00028d6b34c7bb64a22909aeb8c6ef Mon Sep 17 00:00:00 2001 From: Stevengre Date: Sun, 19 Apr 2026 10:33:01 +0800 Subject: [PATCH 15/19] chore(kmir): drop unused KMIR AST import --- kmir/src/kmir/kdist/mir-semantics/rt/data.md | 1 - 1 file changed, 1 deletion(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/data.md b/kmir/src/kmir/kdist/mir-semantics/rt/data.md index 3428a3467..047bf93b4 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/data.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/data.md @@ -23,7 +23,6 @@ module RT-DATA imports BODY imports TYPES - imports KMIR-AST imports RT-VALUE-SYNTAX imports RT-NUMBERS imports RT-DECODING From 96fa40f1e93c143f1868e632cfa25624a206dc4e Mon Sep 17 00:00:00 2001 From: Stevengre Date: Sun, 19 Apr 2026 13:06:45 +0800 Subject: [PATCH 16/19] fix(kmir): avoid slot id list cast in frame lookup --- kmir/src/kmir/kdist/mir-semantics/rt/data.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/data.md b/kmir/src/kmir/kdist/mir-semantics/rt/data.md index 047bf93b4..d4ebe3e52 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/data.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/data.md @@ -48,10 +48,10 @@ More often than not, a slot or list element must be selected by index and is req syntax Int ::= #frameSlotId ( List, Int ) [function] // ------------------------------------------------- - rule #frameSlotId(LOCALS, IDX) => {LOCALS[IDX]}:>Int - requires 0 <=Int IDX andBool IDX SLOT + rule #frameSlotId(ListItem(_) REST:List, IDX) => #frameSlotId(REST, IDX -Int 1) + requires 0 Date: Sun, 19 Apr 2026 10:46:31 +0000 Subject: [PATCH 17/19] update expected files --- .../single_exe::a_module::twice.expected | 4 +- .../single-bin/single_exe::main.expected | 2 +- .../small_test_dylib::add.expected | 2 +- ...t_lib::testing::test_add_in_range.expected | 8 +- .../two-crate-bin/crate2::main.expected | 2 +- .../crate2::test_crate1_with.expected | 2 +- .../allocs/array_const_compare.state | 43 +- .../exec-smir/allocs/array_nest_compare.state | 74 ++-- .../exec-smir/allocs/enum-two-refs-fail.state | 128 ++++-- .../data/exec-smir/allocs/option_consts.state | 185 ++++++--- .../arithmetic-unchecked-runs.state | 55 ++- .../exec-smir/arithmetic/arithmetic.state | 84 ++-- .../data/exec-smir/arithmetic/unary.state | 31 +- .../exec-smir/arrays/array_indexing.state | 47 ++- .../data/exec-smir/arrays/array_inlined.state | 150 ++++--- .../data/exec-smir/arrays/array_write.state | 68 ++-- .../exec-smir/assign-cast/assign-cast.state | 53 ++- .../call-with-args/main-a-b-with-int.state | 26 +- .../data/exec-smir/enum/enum.state | 53 ++- .../data/exec-smir/intrinsic/blackbox.state | 52 ++- .../exec-smir/main-a-b-c/main-a-b-c.run.state | 8 +- .../exec-smir/main-a-b-c/main-a-b-c.state | 17 +- .../newtype-pubkey/newtype-pubkey.state | 82 ++-- .../exec-smir/niche-enum/niche-enum.state | 104 +++-- .../pointers/offset_get_unchecked.state | 45 ++- .../data/exec-smir/pointers/offset_read.state | 39 +- .../pointers/offset_struct_field_read.state | 42 +- .../pointers/offset_struct_field_write.state | 48 ++- .../exec-smir/pointers/offset_write.state | 45 ++- .../pointer-cast-length-test-fail.state | 124 ++++-- .../exec-smir/pointers/pointer-cast-zst.state | 55 ++- .../exec-smir/pointers/ref_ptr_cases.state | 20 +- .../exec-smir/references/array_elem_ref.state | 38 +- .../data/exec-smir/references/doubleRef.state | 47 ++- .../exec-smir/references/mutableRef.state | 32 +- .../data/exec-smir/references/refAsArg.state | 23 +- .../data/exec-smir/references/refAsArg2.state | 23 +- .../exec-smir/references/refReturned.state | 26 +- .../data/exec-smir/references/simple.state | 23 +- .../data/exec-smir/references/weirdRefs.state | 84 ++-- .../exec-smir/struct-multi/struct-multi.state | 51 ++- .../structs-tuples/struct_field_update.state | 28 +- .../structs-tuples/structs-tuples.state | 66 ++-- ...sert-true.main.cli-custom-printer.expected | 2 +- ...ert-true.main.cli-default-printer.expected | 2 +- .../show/assert-true.main.to-module.json | 367 +++++++++++++----- .../show/assert-true.main.to-module.k | 10 +- .../show/box_heap_alloc-fail.main.expected | 2 +- .../show/interior-mut-fail.main.expected | 4 +- .../prove-rs/show/iter_next_3.main.expected | 2 +- .../show/local-raw-fail.main.expected | 4 +- .../prove-rs/show/niche-enum.main.expected | 2 +- ...he-enum.smir.foo.cli-stats-leaves.expected | 10 +- .../show/offset-u8-fail.main.expected | 2 +- ...-length-test-fail.array_cast_test.expected | 26 +- ...r-cast-array-to-wrapper-fail.main.expected | 4 +- .../ptr-through-wrapper-fail.main.expected | 4 +- .../show/ref-ptr-cast-elem-fail.main.expected | 4 +- ...ef-ptr-cast-elem-offset-fail.main.expected | 6 +- .../symbolic-args-fail.eats_all_args.expected | 80 ++-- ...c-args-fail.main.cli-stats-leaves.expected | 14 +- .../show/symbolic-args-fail.main.expected | 5 +- ...lic-structs-fail.eats_struct_args.expected | 6 +- .../test_offset_from-fail.testing.expected | 14 +- .../prove-rs/show/unions-fail.main.expected | 2 +- .../complex-types/final-0.expected | 306 ++++++++++----- .../complex-types/final-1.expected | 300 +++++++++----- .../complex-types/final-2.expected | 308 +++++++++------ .../complex-types/final-3.expected | 308 +++++++++------ .../complex-types/final-4.expected | 308 +++++++++------ .../complex-types/final-5.expected | 316 +++++++++------ .../complex-types/final-6.expected | 316 +++++++++------ .../complex-types/final-7.expected | 211 ++++++---- .../complex-types/final-8.expected | 308 +++++++++------ .../complex-types/final-9.expected | 314 +++++++++------ .../complex-types/init-0.expected | 46 ++- .../complex-types/init-1.expected | 44 ++- .../complex-types/init-2.expected | 52 ++- .../complex-types/init-3.expected | 56 +-- .../complex-types/init-4.expected | 82 ++-- .../complex-types/init-5.expected | 82 ++-- .../complex-types/init-6.expected | 96 +++-- .../complex-types/init-7.expected | 42 +- .../complex-types/init-8.expected | 96 +++-- .../complex-types/init-9.expected | 54 +-- .../simple-types/final-0.expected | 110 ++++-- .../simple-types/final-1.expected | 112 ++++-- .../simple-types/final-2.expected | 110 ++++-- .../simple-types/final-3.expected | 112 ++++-- .../simple-types/final-4.expected | 112 ++++-- .../simple-types/final-5.expected | 112 ++++-- .../simple-types/final-6.expected | 110 ++++-- .../simple-types/final-7.expected | 112 ++++-- .../simple-types/final-8.expected | 112 ++++-- .../simple-types/final-9.expected | 112 ++++-- .../simple-types/init-0.expected | 17 +- .../simple-types/init-1.expected | 17 +- .../simple-types/init-2.expected | 17 +- .../simple-types/init-3.expected | 17 +- .../simple-types/init-4.expected | 17 +- .../simple-types/init-5.expected | 17 +- .../simple-types/init-6.expected | 17 +- .../simple-types/init-7.expected | 17 +- .../simple-types/init-8.expected | 17 +- .../simple-types/init-9.expected | 17 +- ...ecked_add-fail.unchecked_add_i128.expected | 4 +- ...hecked_add-fail.unchecked_add_i16.expected | 4 +- ...hecked_add-fail.unchecked_add_i32.expected | 4 +- ...hecked_add-fail.unchecked_add_i64.expected | 4 +- ...checked_add-fail.unchecked_add_i8.expected | 4 +- ...ecked_add-fail.unchecked_add_u128.expected | 4 +- ...hecked_add-fail.unchecked_add_u16.expected | 4 +- ...hecked_add-fail.unchecked_add_u32.expected | 4 +- ...hecked_add-fail.unchecked_add_u64.expected | 4 +- ...checked_add-fail.unchecked_add_u8.expected | 4 +- ...ecked_shl-fail.unchecked_shl_i128.expected | 4 +- ...hecked_shl-fail.unchecked_shl_i16.expected | 4 +- ...hecked_shl-fail.unchecked_shl_i32.expected | 4 +- ...hecked_shl-fail.unchecked_shl_i64.expected | 4 +- ...checked_shl-fail.unchecked_shl_i8.expected | 4 +- ...ecked_shl-fail.unchecked_shl_u128.expected | 4 +- ...hecked_shl-fail.unchecked_shl_u16.expected | 4 +- ...hecked_shl-fail.unchecked_shl_u32.expected | 4 +- ...hecked_shl-fail.unchecked_shl_u64.expected | 4 +- ...checked_shl-fail.unchecked_shl_u8.expected | 4 +- 125 files changed, 5038 insertions(+), 2682 deletions(-) diff --git a/kmir/src/tests/integration/data/crate-tests/single-bin/single_exe::a_module::twice.expected b/kmir/src/tests/integration/data/crate-tests/single-bin/single_exe::a_module::twice.expected index 2609e8676..4a55ae14c 100644 --- a/kmir/src/tests/integration/data/crate-tests/single-bin/single_exe::a_module::twice.expected +++ b/kmir/src/tests/integration/data/crate-tests/single-bin/single_exe::a_module::twice.expected @@ -2,7 +2,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ -│ (44 steps) +│ (47 steps) ├─ 3 (split) │ #expect ( BoolVal ( notBool ARG_UINT1:Int +Int ARG_UINT1:Int &Int 18446744073709 ┃ @@ -25,7 +25,7 @@ ├─ 5 │ #expect ( BoolVal ( notBool ARG_UINT1:Int +Int ARG_UINT1:Int &Int 18446744073709 │ - │ (21 steps) + │ (22 steps) ├─ 7 (terminal) │ #EndProgram ~> .K │ diff --git a/kmir/src/tests/integration/data/crate-tests/single-bin/single_exe::main.expected b/kmir/src/tests/integration/data/crate-tests/single-bin/single_exe::main.expected index 3edeb4f48..2fc8e423b 100644 --- a/kmir/src/tests/integration/data/crate-tests/single-bin/single_exe::main.expected +++ b/kmir/src/tests/integration/data/crate-tests/single-bin/single_exe::main.expected @@ -2,7 +2,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ -│ (228 steps) +│ (233 steps) ├─ 3 (terminal) │ #EndProgram ~> .K │ diff --git a/kmir/src/tests/integration/data/crate-tests/single-dylib/small_test_dylib::add.expected b/kmir/src/tests/integration/data/crate-tests/single-dylib/small_test_dylib::add.expected index 76fa2d153..6b478d354 100644 --- a/kmir/src/tests/integration/data/crate-tests/single-dylib/small_test_dylib::add.expected +++ b/kmir/src/tests/integration/data/crate-tests/single-dylib/small_test_dylib::add.expected @@ -2,7 +2,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ -│ (35 steps) +│ (37 steps) ├─ 3 (split) │ #expect ( BoolVal ( notBool ARG_UINT1:Int +Int ARG_UINT2:Int &Int 18446744073709 ┃ diff --git a/kmir/src/tests/integration/data/crate-tests/single-lib/small_test_lib::testing::test_add_in_range.expected b/kmir/src/tests/integration/data/crate-tests/single-lib/small_test_lib::testing::test_add_in_range.expected index 3cb67eec2..d573960e8 100644 --- a/kmir/src/tests/integration/data/crate-tests/single-lib/small_test_lib::testing::test_add_in_range.expected +++ b/kmir/src/tests/integration/data/crate-tests/single-lib/small_test_lib::testing::test_add_in_range.expected @@ -2,7 +2,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ -│ (114 steps) +│ (119 steps) ├─ 3 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 1 ) ) ┃ @@ -14,9 +14,9 @@ ┃ ├─ 4 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 1 ) ) ┃ │ -┃ │ (6 steps) +┃ │ (5 steps) ┃ └─ 6 (stuck, leaf) -┃ #setUpCalleeData ( monoItemFn ( ... name: symbol ( "_ZN3std7process4exit17h +┃ #prepareTerminatorCall ( ty ( 25 ) , monoItemFn ( ... name: symbol ( "_ZN3std7pr ┃ ┗━━┓ subst: .Subst ┃ constraint: @@ -25,7 +25,7 @@ ├─ 5 │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 1 ) ) │ - │ (182 steps) + │ (186 steps) ├─ 7 (terminal) │ #EndProgram ~> .K │ diff --git a/kmir/src/tests/integration/data/crate-tests/two-crate-bin/crate2::main.expected b/kmir/src/tests/integration/data/crate-tests/two-crate-bin/crate2::main.expected index 544958705..dc404af32 100644 --- a/kmir/src/tests/integration/data/crate-tests/two-crate-bin/crate2::main.expected +++ b/kmir/src/tests/integration/data/crate-tests/two-crate-bin/crate2::main.expected @@ -2,7 +2,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ -│ (737 steps) +│ (772 steps) ├─ 3 (terminal) │ #EndProgram ~> .K │ diff --git a/kmir/src/tests/integration/data/crate-tests/two-crate-dylib/crate2::test_crate1_with.expected b/kmir/src/tests/integration/data/crate-tests/two-crate-dylib/crate2::test_crate1_with.expected index bd3076868..29d4cc599 100644 --- a/kmir/src/tests/integration/data/crate-tests/two-crate-dylib/crate2::test_crate1_with.expected +++ b/kmir/src/tests/integration/data/crate-tests/two-crate-dylib/crate2::test_crate1_with.expected @@ -2,7 +2,7 @@ ┌─ 1 (root, init) │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ -│ (216 steps) +│ (226 steps) ├─ 3 (terminal) │ #EndProgram ~> .K │ diff --git a/kmir/src/tests/integration/data/exec-smir/allocs/array_const_compare.state b/kmir/src/tests/integration/data/exec-smir/allocs/array_const_compare.state index 5c2707c89..5e0cc9ac7 100644 --- a/kmir/src/tests/integration/data/exec-smir/allocs/array_const_compare.state +++ b/kmir/src/tests/integration/data/exec-smir/allocs/array_const_compare.state @@ -31,22 +31,39 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( AllocRef ( allocId ( 0 ) , .ProjectionElems , metadata ( staticSize ( 3 ) , 0 , staticSize ( 3 ) ) ) ) - ListItem ( AllocRef ( allocId ( 1 ) , .ProjectionElems , metadata ( staticSize ( 3 ) , 0 , staticSize ( 3 ) ) ) ) ) , ty ( 86 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 0 ) , .ProjectionElems , metadata ( staticSize ( 3 ) , 0 , staticSize ( 3 ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 1 ) , .ProjectionElems , metadata ( staticSize ( 3 ) , 0 , staticSize ( 3 ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 30 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 68 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 30 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 68 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( AllocRef ( allocId ( 0 ) , .ProjectionElems , metadata ( staticSize ( 3 ) , 0 , staticSize ( 3 ) ) ) ) + ListItem ( AllocRef ( allocId ( 1 ) , .ProjectionElems , metadata ( staticSize ( 3 ) , 0 , staticSize ( 3 ) ) ) ) ) , ty ( 86 ) , mutabilityMut ) + 2 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 3 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 4 |-> typedValue ( AllocRef ( allocId ( 0 ) , .ProjectionElems , metadata ( staticSize ( 3 ) , 0 , staticSize ( 3 ) ) ) , ty ( 25 ) , mutabilityNot ) + 5 |-> typedValue ( AllocRef ( allocId ( 1 ) , .ProjectionElems , metadata ( staticSize ( 3 ) , 0 , staticSize ( 3 ) ) ) , ty ( 25 ) , mutabilityNot ) + 6 |-> typedValue ( Moved , ty ( 30 ) , mutabilityMut ) + 7 |-> newLocal ( ty ( 69 ) , mutabilityNot ) + 8 |-> newLocal ( ty ( 68 ) , mutabilityNot ) + 9 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 30 ) , mutabilityMut ) + 11 |-> newLocal ( ty ( 68 ) , mutabilityMut ) + + + 30 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/allocs/array_nest_compare.state b/kmir/src/tests/integration/data/exec-smir/allocs/array_nest_compare.state index 6c3fa5051..e523236ed 100644 --- a/kmir/src/tests/integration/data/exec-smir/allocs/array_nest_compare.state +++ b/kmir/src/tests/integration/data/exec-smir/allocs/array_nest_compare.state @@ -35,34 +35,58 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( AllocRef ( allocId ( 0 ) , .ProjectionElems , metadata ( staticSize ( 2 ) , 0 , staticSize ( 2 ) ) ) ) - ListItem ( AllocRef ( allocId ( 1 ) , .ProjectionElems , metadata ( staticSize ( 2 ) , 0 , staticSize ( 2 ) ) ) ) ) , ty ( 107 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 0 ) , .ProjectionElems , metadata ( staticSize ( 2 ) , 0 , staticSize ( 2 ) ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 1 ) , .ProjectionElems , metadata ( staticSize ( 2 ) , 0 , staticSize ( 2 ) ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 30 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 85 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 84 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 86 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 30 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 84 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 30 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 48 ) , mutabilityMut ) ) - ListItem ( typedValue ( Range ( ListItem ( Range ( ListItem ( Integer ( 100 , 16 , false ) ) - ListItem ( Integer ( 200 , 16 , false ) ) - ListItem ( Integer ( 300 , 16 , false ) ) ) ) - ListItem ( Range ( ListItem ( Integer ( 100 , 16 , false ) ) - ListItem ( Integer ( 200 , 16 , false ) ) - ListItem ( Integer ( 300 , 16 , false ) ) ) ) ) , ty ( 106 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 0 , 64 , false ) , ty ( 42 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 2 , 64 , false ) , ty ( 42 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 30 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 84 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( AllocRef ( allocId ( 0 ) , .ProjectionElems , metadata ( staticSize ( 2 ) , 0 , staticSize ( 2 ) ) ) ) + ListItem ( AllocRef ( allocId ( 1 ) , .ProjectionElems , metadata ( staticSize ( 2 ) , 0 , staticSize ( 2 ) ) ) ) ) , ty ( 107 ) , mutabilityMut ) + 2 |-> typedValue ( Moved , ty ( 28 ) , mutabilityMut ) + 3 |-> typedValue ( Moved , ty ( 28 ) , mutabilityMut ) + 4 |-> typedValue ( AllocRef ( allocId ( 0 ) , .ProjectionElems , metadata ( staticSize ( 2 ) , 0 , staticSize ( 2 ) ) ) , ty ( 28 ) , mutabilityNot ) + 5 |-> typedValue ( AllocRef ( allocId ( 1 ) , .ProjectionElems , metadata ( staticSize ( 2 ) , 0 , staticSize ( 2 ) ) ) , ty ( 28 ) , mutabilityNot ) + 6 |-> typedValue ( Moved , ty ( 30 ) , mutabilityMut ) + 7 |-> newLocal ( ty ( 85 ) , mutabilityNot ) + 8 |-> newLocal ( ty ( 84 ) , mutabilityNot ) + 9 |-> newLocal ( ty ( 86 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 30 ) , mutabilityMut ) + 11 |-> newLocal ( ty ( 84 ) , mutabilityMut ) + 12 |-> typedValue ( Moved , ty ( 30 ) , mutabilityMut ) + 13 |-> typedValue ( Moved , ty ( 48 ) , mutabilityMut ) + 14 |-> typedValue ( Range ( ListItem ( Range ( ListItem ( Integer ( 100 , 16 , false ) ) + ListItem ( Integer ( 200 , 16 , false ) ) + ListItem ( Integer ( 300 , 16 , false ) ) ) ) + ListItem ( Range ( ListItem ( Integer ( 100 , 16 , false ) ) + ListItem ( Integer ( 200 , 16 , false ) ) + ListItem ( Integer ( 300 , 16 , false ) ) ) ) ) , ty ( 106 ) , mutabilityMut ) + 15 |-> typedValue ( Integer ( 0 , 64 , false ) , ty ( 42 ) , mutabilityNot ) + 16 |-> typedValue ( Integer ( 2 , 64 , false ) , ty ( 42 ) , mutabilityMut ) + 17 |-> typedValue ( Moved , ty ( 30 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 84 ) , mutabilityMut ) + + + 56 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/allocs/enum-two-refs-fail.state b/kmir/src/tests/integration/data/exec-smir/allocs/enum-two-refs-fail.state index a1a21b0dc..940667708 100644 --- a/kmir/src/tests/integration/data/exec-smir/allocs/enum-two-refs-fail.state +++ b/kmir/src/tests/integration/data/exec-smir/allocs/enum-two-refs-fail.state @@ -1,6 +1,6 @@ - #traverseProjection ( toLocal ( 13 ) , thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) , projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 37 ) ) .ProjectionElems , .Contexts ) ~> #forRef ( mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ~> #freezer#setLocalValue(_,_)_RT-DATA_KItem_Place_Evaluation1_ ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ~> .K ) ~> #execStmts ( statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 25 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 14 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 45 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) , span: span ( 145 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 15 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 37 ) ) .ProjectionElems ) ) ) , span: span ( 145 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 16 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 45 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) , span: span ( 145 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 6 ) , projection: .ProjectionElems ) ) ) , span: span ( 145 ) ) .Statements ) ~> #execTerminator ( terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 145 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 93 ) , id: mirConstId ( 47 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 145 ) ) ) ~> .K + #traverseProjection ( toSlot ( 35 ) , thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) , projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 37 ) ) .ProjectionElems , .Contexts ) ~> #forRef ( mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ~> #freezer#setLocalValue(_,_)_RT-DATA_KItem_Place_Evaluation1_ ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ~> .K ) ~> #execStmts ( statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 25 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 14 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 45 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) , span: span ( 145 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 15 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 37 ) ) .ProjectionElems ) ) ) , span: span ( 145 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 16 ) , projection: projectionElemDeref projectionElemDowncast ( variantIdx ( 0 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 45 ) ) .ProjectionElems ) ) ) , span: span ( 147 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) , span: span ( 145 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 6 ) , projection: .ProjectionElems ) ) ) , span: span ( 145 ) ) .Statements ) ~> #execTerminator ( terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 145 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 93 ) , id: mirConstId ( 47 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 145 ) ) ) ~> .K noReturn @@ -29,50 +29,94 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 43 ) , mutabilityMut ) ) - ListItem ( typedValue ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) ) - ListItem ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) ) ) , ty ( 91 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 43 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 54 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 54 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) - ListItem ( typedValue ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) , ty ( 25 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 25 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 25 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 25 ) , mutabilityMut ) ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) + ListItem ( 35 ) + ListItem ( 36 ) + ListItem ( 37 ) + ListItem ( 38 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) ) - ListItem ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) ) ) , ty ( 91 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 43 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 83 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 82 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 84 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 92 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 34 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 34 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 34 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 34 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 43 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 83 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 82 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 84 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 68 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) ) ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) ) + ListItem ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) ) ) , ty ( 91 ) , mutabilityMut ) + 2 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 3 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 4 |-> typedValue ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) , ty ( 25 ) , mutabilityNot ) + 5 |-> typedValue ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) , ty ( 25 ) , mutabilityNot ) + 6 |-> newLocal ( ty ( 43 ) , mutabilityMut ) + 7 |-> newLocal ( ty ( 83 ) , mutabilityNot ) + 8 |-> newLocal ( ty ( 82 ) , mutabilityNot ) + 9 |-> newLocal ( ty ( 84 ) , mutabilityMut ) + 10 |-> newLocal ( ty ( 92 ) , mutabilityMut ) + 11 |-> newLocal ( ty ( 34 ) , mutabilityMut ) + 12 |-> newLocal ( ty ( 34 ) , mutabilityMut ) + 13 |-> newLocal ( ty ( 34 ) , mutabilityNot ) + 14 |-> newLocal ( ty ( 34 ) , mutabilityNot ) + 15 |-> newLocal ( ty ( 43 ) , mutabilityMut ) + 16 |-> newLocal ( ty ( 83 ) , mutabilityNot ) + 17 |-> newLocal ( ty ( 82 ) , mutabilityNot ) + 18 |-> newLocal ( ty ( 84 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 1 ) , mutabilityNot ) + 20 |-> newLocal ( ty ( 68 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 69 ) , mutabilityNot ) + 22 |-> newLocal ( ty ( 43 ) , mutabilityMut ) + 23 |-> typedValue ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) , ty ( 25 ) , mutabilityNot ) + 24 |-> typedValue ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) , ty ( 25 ) , mutabilityNot ) + 25 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) ) + ListItem ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) ) ) , ty ( 91 ) , mutabilityMut ) + 26 |-> newLocal ( ty ( 36 ) , mutabilityNot ) + 27 |-> newLocal ( ty ( 31 ) , mutabilityNot ) + 28 |-> newLocal ( ty ( 36 ) , mutabilityNot ) + 29 |-> newLocal ( ty ( 31 ) , mutabilityNot ) + 30 |-> newLocal ( ty ( 43 ) , mutabilityMut ) + 31 |-> newLocal ( ty ( 54 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 54 ) , mutabilityMut ) + 33 |-> newLocal ( ty ( 30 ) , mutabilityMut ) + 34 |-> newLocal ( ty ( 30 ) , mutabilityMut ) + 35 |-> typedValue ( thunk ( #decodeConstant ( constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty ( 25 ) , typeInfoRefType ( ty ( 109 ) ) ) ) , ty ( 25 ) , mutabilityMut ) + 36 |-> newLocal ( ty ( 25 ) , mutabilityMut ) + 37 |-> newLocal ( ty ( 25 ) , mutabilityMut ) + 38 |-> newLocal ( ty ( 25 ) , mutabilityMut ) + + + 39 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/allocs/option_consts.state b/kmir/src/tests/integration/data/exec-smir/allocs/option_consts.state index 4186cc79a..c22189b5e 100644 --- a/kmir/src/tests/integration/data/exec-smir/allocs/option_consts.state +++ b/kmir/src/tests/integration/data/exec-smir/allocs/option_consts.state @@ -44,72 +44,131 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 1 , 32 , false ) , ty ( 44 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 112 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) - ListItem ( AllocRef ( allocId ( 6 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 113 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 36 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 36 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 36 ) , mutabilityNot ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 6 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 36 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 41 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 85 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 84 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 86 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( AllocRef ( allocId ( 7 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) - ListItem ( Reference ( 0 , place (... local: local ( 15 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 114 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 39 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 39 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 42 , 64 , false ) ) ) , ty ( 115 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 58 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 1 , 64 , false ) , ty ( 58 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 116 ) , mutabilityMut ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 7 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 39 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 15 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 39 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 41 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 85 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 84 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 86 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 41 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 84 ) , mutabilityMut ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 0 , 32 , false ) ) - ListItem ( Integer ( 0 , 32 , false ) ) - ListItem ( Integer ( 0 , 32 , false ) ) ) , ty ( 117 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( 0 , place (... local: local ( 31 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) - ListItem ( AllocRef ( allocId ( 10 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 118 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 119 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 28 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 3 ) , 0 , noMetadataSize ) ) , ty ( 33 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 31 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 10 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 41 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 85 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 84 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 86 ) , mutabilityMut ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 1 , 32 , false ) ) - ListItem ( Integer ( 1 , 32 , false ) ) - ListItem ( Integer ( 1 , 32 , false ) ) ) , ty ( 117 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( 0 , place (... local: local ( 43 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) - ListItem ( Reference ( 0 , place (... local: local ( 46 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 118 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Reference ( 0 , place (... local: local ( 40 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 3 ) , 0 , noMetadataSize ) ) ) ) , ty ( 119 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 40 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 3 ) , 0 , noMetadataSize ) ) , ty ( 33 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Reference ( 0 , place (... local: local ( 40 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 3 ) , 0 , noMetadataSize ) ) ) ) , ty ( 119 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 33 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 43 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 46 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 41 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 85 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 84 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 86 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) + ListItem ( 35 ) + ListItem ( 36 ) + ListItem ( 37 ) + ListItem ( 38 ) + ListItem ( 39 ) + ListItem ( 40 ) + ListItem ( 41 ) + ListItem ( 42 ) + ListItem ( 43 ) + ListItem ( 44 ) + ListItem ( 45 ) + ListItem ( 46 ) + ListItem ( 47 ) + ListItem ( 48 ) + ListItem ( 49 ) + ListItem ( 50 ) + ListItem ( 51 ) + ListItem ( 52 ) + ListItem ( 53 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Integer ( 1 , 32 , false ) , ty ( 44 ) , mutabilityNot ) + 2 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 112 ) , mutabilityNot ) + 3 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( slotPlace ( 2 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) + ListItem ( AllocRef ( allocId ( 6 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 113 ) , mutabilityMut ) + 4 |-> typedValue ( Moved , ty ( 36 ) , mutabilityMut ) + 5 |-> typedValue ( Moved , ty ( 36 ) , mutabilityMut ) + 6 |-> typedValue ( Reference ( slotPlace ( 2 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 36 ) , mutabilityNot ) + 7 |-> typedValue ( AllocRef ( allocId ( 6 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 36 ) , mutabilityNot ) + 8 |-> typedValue ( Moved , ty ( 41 ) , mutabilityMut ) + 9 |-> newLocal ( ty ( 85 ) , mutabilityNot ) + 10 |-> newLocal ( ty ( 84 ) , mutabilityNot ) + 11 |-> newLocal ( ty ( 86 ) , mutabilityMut ) + 12 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( AllocRef ( allocId ( 7 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) + ListItem ( Reference ( slotPlace ( 15 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 114 ) , mutabilityMut ) + 13 |-> typedValue ( Moved , ty ( 39 ) , mutabilityMut ) + 14 |-> typedValue ( Moved , ty ( 39 ) , mutabilityMut ) + 15 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 42 , 64 , false ) ) ) , ty ( 115 ) , mutabilityNot ) + 16 |-> typedValue ( Moved , ty ( 58 ) , mutabilityMut ) + 17 |-> typedValue ( Integer ( 1 , 64 , false ) , ty ( 58 ) , mutabilityMut ) + 18 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 116 ) , mutabilityMut ) + 19 |-> typedValue ( AllocRef ( allocId ( 7 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 39 ) , mutabilityNot ) + 20 |-> typedValue ( Reference ( slotPlace ( 15 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 39 ) , mutabilityNot ) + 21 |-> typedValue ( Moved , ty ( 41 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 85 ) , mutabilityNot ) + 23 |-> newLocal ( ty ( 84 ) , mutabilityNot ) + 24 |-> newLocal ( ty ( 86 ) , mutabilityMut ) + 25 |-> typedValue ( Moved , ty ( 41 ) , mutabilityMut ) + 26 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 27 |-> newLocal ( ty ( 84 ) , mutabilityMut ) + 28 |-> typedValue ( Range ( ListItem ( Integer ( 0 , 32 , false ) ) + ListItem ( Integer ( 0 , 32 , false ) ) + ListItem ( Integer ( 0 , 32 , false ) ) ) , ty ( 117 ) , mutabilityNot ) + 29 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( slotPlace ( 31 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) + ListItem ( AllocRef ( allocId ( 10 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 118 ) , mutabilityMut ) + 30 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 31 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 119 ) , mutabilityNot ) + 32 |-> typedValue ( Reference ( slotPlace ( 28 , .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 3 ) , 0 , noMetadataSize ) ) , ty ( 33 ) , mutabilityNot ) + 33 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 34 |-> typedValue ( Reference ( slotPlace ( 31 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) + 35 |-> typedValue ( AllocRef ( allocId ( 10 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) + 36 |-> typedValue ( Moved , ty ( 41 ) , mutabilityMut ) + 37 |-> newLocal ( ty ( 85 ) , mutabilityNot ) + 38 |-> newLocal ( ty ( 84 ) , mutabilityNot ) + 39 |-> newLocal ( ty ( 86 ) , mutabilityMut ) + 40 |-> typedValue ( Range ( ListItem ( Integer ( 1 , 32 , false ) ) + ListItem ( Integer ( 1 , 32 , false ) ) + ListItem ( Integer ( 1 , 32 , false ) ) ) , ty ( 117 ) , mutabilityNot ) + 41 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( slotPlace ( 43 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) + ListItem ( Reference ( slotPlace ( 46 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 118 ) , mutabilityMut ) + 42 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 43 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Reference ( slotPlace ( 40 , .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 3 ) , 0 , noMetadataSize ) ) ) ) , ty ( 119 ) , mutabilityNot ) + 44 |-> typedValue ( Reference ( slotPlace ( 40 , .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 3 ) , 0 , noMetadataSize ) ) , ty ( 33 ) , mutabilityNot ) + 45 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 46 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Reference ( slotPlace ( 40 , .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 3 ) , 0 , noMetadataSize ) ) ) ) , ty ( 119 ) , mutabilityNot ) + 47 |-> typedValue ( Moved , ty ( 33 ) , mutabilityMut ) + 48 |-> typedValue ( Reference ( slotPlace ( 43 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) + 49 |-> typedValue ( Reference ( slotPlace ( 46 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) + 50 |-> typedValue ( Moved , ty ( 41 ) , mutabilityMut ) + 51 |-> newLocal ( ty ( 85 ) , mutabilityNot ) + 52 |-> newLocal ( ty ( 84 ) , mutabilityNot ) + 53 |-> newLocal ( ty ( 86 ) , mutabilityMut ) + + + 125 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state index 09d56cea7..cdc80e8fc 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state @@ -31,27 +31,46 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 254 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -100 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -32640 , 16 , true ) , ty ( 35 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 255 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 36 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -32768 , 16 , true ) , ty ( 35 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 36 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Integer ( 254 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 2 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 28 ) , mutabilityMut ) + 3 |-> typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 4 |-> typedValue ( Integer ( -100 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 5 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 26 ) , mutabilityMut ) + 6 |-> typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 7 |-> typedValue ( Integer ( -32640 , 16 , true ) , ty ( 35 ) , mutabilityNot ) + 8 |-> typedValue ( Integer ( 255 , 16 , true ) , ty ( 35 ) , mutabilityMut ) + 9 |-> typedValue ( Integer ( -128 , 16 , true ) , ty ( 35 ) , mutabilityMut ) + 10 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 36 ) , mutabilityMut ) + 11 |-> typedValue ( Integer ( -32768 , 16 , true ) , ty ( 35 ) , mutabilityNot ) + 12 |-> typedValue ( Integer ( -128 , 16 , true ) , ty ( 35 ) , mutabilityMut ) + 13 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 36 ) , mutabilityMut ) + + + 24 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state index a2940d22a..282cf6115 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state @@ -33,38 +33,64 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -100 , 8 , true ) , ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -32640 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 255 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -32768 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 2 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) + 3 |-> typedValue ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 4 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) + 5 |-> typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 6 |-> typedValue ( Integer ( -100 , 8 , true ) , ty ( 2 ) , mutabilityMut ) + 7 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 28 ) , mutabilityMut ) + 8 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 28 ) , mutabilityMut ) + 9 |-> typedValue ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 10 |-> typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityMut ) + 11 |-> typedValue ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityMut ) + 12 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) + 13 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) + 14 |-> typedValue ( Integer ( -32640 , 16 , true ) , ty ( 26 ) , mutabilityNot ) + 15 |-> typedValue ( Integer ( 255 , 16 , true ) , ty ( 26 ) , mutabilityMut ) + 16 |-> typedValue ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityMut ) + 17 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 29 ) , mutabilityMut ) + 18 |-> typedValue ( Integer ( -32768 , 16 , true ) , ty ( 26 ) , mutabilityNot ) + 19 |-> typedValue ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityMut ) + 20 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 29 ) , mutabilityMut ) + + + 21 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state index 97333b1b7..93caa3f78 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state @@ -27,18 +27,31 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 122 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -122 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 2 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 26 ) , mutabilityMut ) + 3 |-> typedValue ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 4 |-> typedValue ( Integer ( 122 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 5 |-> typedValue ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) + 6 |-> typedValue ( Integer ( -122 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 7 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + + + 8 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/arrays/array_indexing.state b/kmir/src/tests/integration/data/exec-smir/arrays/array_indexing.state index d905964fc..996038ac8 100644 --- a/kmir/src/tests/integration/data/exec-smir/arrays/array_indexing.state +++ b/kmir/src/tests/integration/data/exec-smir/arrays/array_indexing.state @@ -29,24 +29,41 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 1 , 16 , true ) ) - ListItem ( Integer ( 1 , 16 , true ) ) - ListItem ( Integer ( 1 , 16 , true ) ) - ListItem ( Integer ( 1 , 16 , true ) ) ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 0 , 64 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 4 , 64 , false ) , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 30 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 1 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1 , 64 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 4 , 64 , false ) , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 30 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 30 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Range ( ListItem ( Integer ( 1 , 16 , true ) ) + ListItem ( Integer ( 1 , 16 , true ) ) + ListItem ( Integer ( 1 , 16 , true ) ) + ListItem ( Integer ( 1 , 16 , true ) ) ) , ty ( 29 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 1 , 16 , true ) , ty ( 26 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( 0 , 64 , false ) , ty ( 25 ) , mutabilityNot ) + 4 |-> typedValue ( Integer ( 4 , 64 , false ) , ty ( 25 ) , mutabilityMut ) + 5 |-> typedValue ( Moved , ty ( 30 ) , mutabilityMut ) + 6 |-> typedValue ( Integer ( 1 , 16 , true ) , ty ( 26 ) , mutabilityNot ) + 7 |-> typedValue ( Integer ( 1 , 64 , false ) , ty ( 25 ) , mutabilityNot ) + 8 |-> typedValue ( Integer ( 4 , 64 , false ) , ty ( 25 ) , mutabilityMut ) + 9 |-> typedValue ( Moved , ty ( 30 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 30 ) , mutabilityMut ) + 11 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + + + 12 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/arrays/array_inlined.state b/kmir/src/tests/integration/data/exec-smir/arrays/array_inlined.state index 7e5876270..bfa85a0ae 100644 --- a/kmir/src/tests/integration/data/exec-smir/arrays/array_inlined.state +++ b/kmir/src/tests/integration/data/exec-smir/arrays/array_inlined.state @@ -34,62 +34,106 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -2 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1 , 8 , true ) , ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 1 , 8 , true ) ) - ListItem ( Integer ( -2 , 8 , true ) ) - ListItem ( Integer ( 3 , 8 , true ) ) ) , ty ( 40 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 0 , 64 , false ) , ty ( 41 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 3 , 64 , false ) , ty ( 41 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 42 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -2 , 8 , true ) , ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 1 , 8 , true ) ) - ListItem ( Integer ( -2 , 8 , true ) ) - ListItem ( Integer ( 3 , 8 , true ) ) ) , ty ( 40 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 1 , 64 , false ) , ty ( 41 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 3 , 64 , false ) , ty ( 41 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 42 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 46 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -200 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityMut ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 10 , 32 , true ) ) - ListItem ( Integer ( -20 , 32 , true ) ) - ListItem ( Integer ( 30 , 32 , true ) ) - ListItem ( Integer ( -40 , 32 , true ) ) ) , ty ( 43 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 0 , 64 , false ) , ty ( 41 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 4 , 64 , false ) , ty ( 41 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 42 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -20 , 32 , true ) , ty ( 16 ) , mutabilityMut ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 10 , 32 , true ) ) - ListItem ( Integer ( -20 , 32 , true ) ) - ListItem ( Integer ( 30 , 32 , true ) ) - ListItem ( Integer ( -40 , 32 , true ) ) ) , ty ( 43 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 1 , 64 , false ) , ty ( 41 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 4 , 64 , false ) , ty ( 41 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 42 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 47 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( 0 , place (... local: local ( 27 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) - ListItem ( Reference ( 0 , place (... local: local ( 13 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 48 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -200 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -2 , 32 , true ) , ty ( 16 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 47 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 27 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 13 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 42 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 16 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 16 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 38 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 37 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 39 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) + ListItem ( 35 ) + ListItem ( 36 ) + ListItem ( 37 ) + ListItem ( 38 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Integer ( -2 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 1 , 8 , true ) , ty ( 2 ) , mutabilityMut ) + 3 |-> typedValue ( Range ( ListItem ( Integer ( 1 , 8 , true ) ) + ListItem ( Integer ( -2 , 8 , true ) ) + ListItem ( Integer ( 3 , 8 , true ) ) ) , ty ( 40 ) , mutabilityMut ) + 4 |-> typedValue ( Integer ( 0 , 64 , false ) , ty ( 41 ) , mutabilityNot ) + 5 |-> typedValue ( Integer ( 3 , 64 , false ) , ty ( 41 ) , mutabilityMut ) + 6 |-> typedValue ( Moved , ty ( 42 ) , mutabilityMut ) + 7 |-> typedValue ( Integer ( -2 , 8 , true ) , ty ( 2 ) , mutabilityMut ) + 8 |-> typedValue ( Range ( ListItem ( Integer ( 1 , 8 , true ) ) + ListItem ( Integer ( -2 , 8 , true ) ) + ListItem ( Integer ( 3 , 8 , true ) ) ) , ty ( 40 ) , mutabilityMut ) + 9 |-> typedValue ( Integer ( 1 , 64 , false ) , ty ( 41 ) , mutabilityNot ) + 10 |-> typedValue ( Integer ( 3 , 64 , false ) , ty ( 41 ) , mutabilityMut ) + 11 |-> typedValue ( Moved , ty ( 42 ) , mutabilityMut ) + 12 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 46 ) , mutabilityMut ) + 13 |-> typedValue ( Integer ( -200 , 32 , true ) , ty ( 16 ) , mutabilityNot ) + 14 |-> typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityMut ) + 15 |-> typedValue ( Range ( ListItem ( Integer ( 10 , 32 , true ) ) + ListItem ( Integer ( -20 , 32 , true ) ) + ListItem ( Integer ( 30 , 32 , true ) ) + ListItem ( Integer ( -40 , 32 , true ) ) ) , ty ( 43 ) , mutabilityMut ) + 16 |-> typedValue ( Integer ( 0 , 64 , false ) , ty ( 41 ) , mutabilityNot ) + 17 |-> typedValue ( Integer ( 4 , 64 , false ) , ty ( 41 ) , mutabilityMut ) + 18 |-> typedValue ( Moved , ty ( 42 ) , mutabilityMut ) + 19 |-> typedValue ( Integer ( -20 , 32 , true ) , ty ( 16 ) , mutabilityMut ) + 20 |-> typedValue ( Range ( ListItem ( Integer ( 10 , 32 , true ) ) + ListItem ( Integer ( -20 , 32 , true ) ) + ListItem ( Integer ( 30 , 32 , true ) ) + ListItem ( Integer ( -40 , 32 , true ) ) ) , ty ( 43 ) , mutabilityMut ) + 21 |-> typedValue ( Integer ( 1 , 64 , false ) , ty ( 41 ) , mutabilityNot ) + 22 |-> typedValue ( Integer ( 4 , 64 , false ) , ty ( 41 ) , mutabilityMut ) + 23 |-> typedValue ( Moved , ty ( 42 ) , mutabilityMut ) + 24 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 47 ) , mutabilityMut ) + 25 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( slotPlace ( 27 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) + ListItem ( Reference ( slotPlace ( 13 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 48 ) , mutabilityMut ) + 26 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 27 |-> typedValue ( Integer ( -200 , 32 , true ) , ty ( 16 ) , mutabilityNot ) + 28 |-> typedValue ( Integer ( -2 , 32 , true ) , ty ( 16 ) , mutabilityMut ) + 29 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 47 ) , mutabilityMut ) + 30 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 31 |-> typedValue ( Reference ( slotPlace ( 27 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) + 32 |-> typedValue ( Reference ( slotPlace ( 13 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) + 33 |-> typedValue ( Moved , ty ( 42 ) , mutabilityMut ) + 34 |-> typedValue ( Moved , ty ( 16 ) , mutabilityMut ) + 35 |-> typedValue ( Moved , ty ( 16 ) , mutabilityMut ) + 36 |-> newLocal ( ty ( 38 ) , mutabilityNot ) + 37 |-> newLocal ( ty ( 37 ) , mutabilityNot ) + 38 |-> newLocal ( ty ( 39 ) , mutabilityMut ) + + + 39 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/arrays/array_write.state b/kmir/src/tests/integration/data/exec-smir/arrays/array_write.state index 861180b8d..bdc09e856 100644 --- a/kmir/src/tests/integration/data/exec-smir/arrays/array_write.state +++ b/kmir/src/tests/integration/data/exec-smir/arrays/array_write.state @@ -31,31 +31,55 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 2 , 16 , true ) ) - ListItem ( Integer ( 2 , 16 , true ) ) - ListItem ( Integer ( 1 , 16 , true ) ) - ListItem ( Integer ( 1 , 16 , true ) ) ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 0 , 64 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 4 , 64 , false ) , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 30 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemConstantIndex (... offset: 1 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 31 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1 , 64 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 4 , 64 , false ) , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 30 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 30 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 0 , 64 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 4 , 64 , false ) , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 30 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 1 , 64 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 4 , 64 , false ) , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 30 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Range ( ListItem ( Integer ( 2 , 16 , true ) ) + ListItem ( Integer ( 2 , 16 , true ) ) + ListItem ( Integer ( 1 , 16 , true ) ) + ListItem ( Integer ( 1 , 16 , true ) ) ) , ty ( 29 ) , mutabilityMut ) + 2 |-> typedValue ( Integer ( 0 , 64 , false ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( 4 , 64 , false ) , ty ( 25 ) , mutabilityMut ) + 4 |-> typedValue ( Moved , ty ( 30 ) , mutabilityMut ) + 5 |-> typedValue ( Reference ( slotPlace ( 1 , projectionElemConstantIndex (... offset: 1 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 31 ) , mutabilityNot ) + 6 |-> typedValue ( Integer ( 1 , 64 , false ) , ty ( 25 ) , mutabilityNot ) + 7 |-> typedValue ( Integer ( 4 , 64 , false ) , ty ( 25 ) , mutabilityMut ) + 8 |-> typedValue ( Moved , ty ( 30 ) , mutabilityMut ) + 9 |-> typedValue ( Moved , ty ( 30 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 26 ) , mutabilityMut ) + 11 |-> typedValue ( Integer ( 0 , 64 , false ) , ty ( 25 ) , mutabilityNot ) + 12 |-> typedValue ( Integer ( 4 , 64 , false ) , ty ( 25 ) , mutabilityMut ) + 13 |-> typedValue ( Moved , ty ( 30 ) , mutabilityMut ) + 14 |-> typedValue ( Moved , ty ( 26 ) , mutabilityMut ) + 15 |-> typedValue ( Integer ( 1 , 64 , false ) , ty ( 25 ) , mutabilityNot ) + 16 |-> typedValue ( Integer ( 4 , 64 , false ) , ty ( 25 ) , mutabilityMut ) + 17 |-> typedValue ( Moved , ty ( 30 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 32 ) , mutabilityMut ) + + + 19 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state index b2f9a3ef5..db365061e 100644 --- a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state +++ b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state @@ -25,25 +25,46 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 32896 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -32640 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32896 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32896 , 64 , true ) , ty ( 27 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32896 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32896 , 32 , false ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 65408 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32896 , 64 , false ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32896 , 32 , false ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Integer ( 32896 , 16 , false ) , ty ( 25 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( -32640 , 16 , true ) , ty ( 26 ) , mutabilityNot ) + 4 |-> typedValue ( Integer ( 32896 , 32 , true ) , ty ( 16 ) , mutabilityNot ) + 5 |-> typedValue ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityNot ) + 6 |-> typedValue ( Integer ( 32896 , 64 , true ) , ty ( 27 ) , mutabilityNot ) + 7 |-> typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 8 |-> typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 9 |-> typedValue ( Integer ( 32896 , 16 , false ) , ty ( 25 ) , mutabilityNot ) + 10 |-> typedValue ( Integer ( 32896 , 32 , false ) , ty ( 28 ) , mutabilityNot ) + 11 |-> typedValue ( Integer ( 65408 , 16 , false ) , ty ( 25 ) , mutabilityNot ) + 12 |-> typedValue ( Integer ( 32896 , 64 , false ) , ty ( 29 ) , mutabilityNot ) + 13 |-> typedValue ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 14 |-> typedValue ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 15 |-> typedValue ( Integer ( 32896 , 32 , false ) , ty ( 28 ) , mutabilityNot ) + + + 16 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.state b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.state index 056091d15..e6b3fcf8d 100644 --- a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.state +++ b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.state @@ -1,19 +1,20 @@ - #execBlock ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) ) ~> .K + #execBlock ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) ) ~> .K noReturn - ty ( 27 ) + ty ( 25 ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 58 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) ) - ty ( 25 ) + ty ( -1 ) place (... local: local ( 0 ) , projection: .ProjectionElems ) @@ -25,15 +26,20 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 11 , 16 , true ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( 1 ) + ListItem ( 2 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( 0 ) ) ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 2 |-> typedValue ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) + + + 6 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/enum/enum.state b/kmir/src/tests/integration/data/exec-smir/enum/enum.state index 16e4c197d..02bc79a2c 100644 --- a/kmir/src/tests/integration/data/exec-smir/enum/enum.state +++ b/kmir/src/tests/integration/data/exec-smir/enum/enum.state @@ -33,26 +33,45 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 27 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 42 , 32 , true ) ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 42 , 16 , true ) ) - ListItem ( BoolVal ( false ) ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 3 ) , ListItem ( Integer ( 42 , 8 , true ) ) - ListItem ( Integer ( 43 , 8 , true ) ) - ListItem ( BoolVal ( true ) ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 29 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 16 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 9090 , 0 , false ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 26 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 27 ) , mutabilityNot ) + 2 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 28 ) , mutabilityNot ) + 3 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 42 , 32 , true ) ) ) , ty ( 28 ) , mutabilityNot ) + 4 |-> typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 42 , 16 , true ) ) + ListItem ( BoolVal ( false ) ) ) , ty ( 28 ) , mutabilityNot ) + 5 |-> typedValue ( Aggregate ( variantIdx ( 3 ) , ListItem ( Integer ( 42 , 8 , true ) ) + ListItem ( Integer ( 43 , 8 , true ) ) + ListItem ( BoolVal ( true ) ) ) , ty ( 28 ) , mutabilityNot ) + 6 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 7 |-> typedValue ( Moved , ty ( 29 ) , mutabilityMut ) + 8 |-> newLocal ( ty ( 16 ) , mutabilityNot ) + 9 |-> newLocal ( ty ( 28 ) , mutabilityNot ) + 10 |-> typedValue ( Moved , ty ( 6 ) , mutabilityMut ) + 11 |-> typedValue ( Integer ( 9090 , 0 , false ) , ty ( 29 ) , mutabilityMut ) + 12 |-> newLocal ( ty ( 26 ) , mutabilityNot ) + 13 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + + + 14 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/intrinsic/blackbox.state b/kmir/src/tests/integration/data/exec-smir/intrinsic/blackbox.state index b05e88c0e..677720fde 100644 --- a/kmir/src/tests/integration/data/exec-smir/intrinsic/blackbox.state +++ b/kmir/src/tests/integration/data/exec-smir/intrinsic/blackbox.state @@ -29,25 +29,45 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 11 , 32 , false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) - ListItem ( AllocRef ( allocId ( 0 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 47 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 0 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 41 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 26 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 39 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 38 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 40 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Integer ( 11 , 32 , false ) , ty ( 26 ) , mutabilityNot ) + 2 |-> typedValue ( Moved , ty ( 26 ) , mutabilityMut ) + 3 |-> typedValue ( Moved , ty ( 26 ) , mutabilityMut ) + 4 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) + ListItem ( AllocRef ( allocId ( 0 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 47 ) , mutabilityMut ) + 5 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 6 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 7 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) + 8 |-> typedValue ( AllocRef ( allocId ( 0 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) + 9 |-> typedValue ( Moved , ty ( 41 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 26 ) , mutabilityMut ) + 11 |-> typedValue ( Moved , ty ( 26 ) , mutabilityMut ) + 12 |-> newLocal ( ty ( 39 ) , mutabilityNot ) + 13 |-> newLocal ( ty ( 38 ) , mutabilityNot ) + 14 |-> newLocal ( ty ( 40 ) , mutabilityMut ) + + + 20 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state index 596624cb4..52e5f1854 100644 --- a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state +++ b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state @@ -26,10 +26,16 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( 0 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + + + 4 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.state b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.state index a8b20314b..2f7fad10b 100644 --- a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.state +++ b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.state @@ -25,13 +25,22 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( 3 ) - ListItem ( StackFrame ( ty ( 25 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( 25 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( 2 ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( 1 ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( 0 ) ) ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 2 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 3 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + + + 4 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.state b/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.state index ac4b58c68..dd7b4b086 100644 --- a/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.state +++ b/kmir/src/tests/integration/data/exec-smir/newtype-pubkey/newtype-pubkey.state @@ -27,45 +27,55 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Integer ( 0 , 8 , false ) ) - ListItem ( Integer ( 1 , 8 , false ) ) - ListItem ( Integer ( 2 , 8 , false ) ) - ListItem ( Integer ( 3 , 8 , false ) ) - ListItem ( Integer ( 4 , 8 , false ) ) - ListItem ( Integer ( 5 , 8 , false ) ) - ListItem ( Integer ( 6 , 8 , false ) ) - ListItem ( Integer ( 7 , 8 , false ) ) - ListItem ( Integer ( 8 , 8 , false ) ) - ListItem ( Integer ( 9 , 8 , false ) ) - ListItem ( Integer ( 10 , 8 , false ) ) - ListItem ( Integer ( 11 , 8 , false ) ) - ListItem ( Integer ( 12 , 8 , false ) ) - ListItem ( Integer ( 13 , 8 , false ) ) - ListItem ( Integer ( 14 , 8 , false ) ) - ListItem ( Integer ( 15 , 8 , false ) ) - ListItem ( Integer ( 16 , 8 , false ) ) - ListItem ( Integer ( 17 , 8 , false ) ) - ListItem ( Integer ( 18 , 8 , false ) ) - ListItem ( Integer ( 19 , 8 , false ) ) - ListItem ( Integer ( 20 , 8 , false ) ) - ListItem ( Integer ( 21 , 8 , false ) ) - ListItem ( Integer ( 22 , 8 , false ) ) - ListItem ( Integer ( 23 , 8 , false ) ) - ListItem ( Integer ( 24 , 8 , false ) ) - ListItem ( Integer ( 25 , 8 , false ) ) - ListItem ( Integer ( 26 , 8 , false ) ) - ListItem ( Integer ( 27 , 8 , false ) ) - ListItem ( Integer ( 28 , 8 , false ) ) - ListItem ( Integer ( 29 , 8 , false ) ) - ListItem ( Integer ( 30 , 8 , false ) ) - ListItem ( Integer ( 31 , 8 , false ) ) ) ) ) , ty ( 30 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 31 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 32 ) , 0 , noMetadataSize ) ) , ty ( 27 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Integer ( 0 , 8 , false ) ) + ListItem ( Integer ( 1 , 8 , false ) ) + ListItem ( Integer ( 2 , 8 , false ) ) + ListItem ( Integer ( 3 , 8 , false ) ) + ListItem ( Integer ( 4 , 8 , false ) ) + ListItem ( Integer ( 5 , 8 , false ) ) + ListItem ( Integer ( 6 , 8 , false ) ) + ListItem ( Integer ( 7 , 8 , false ) ) + ListItem ( Integer ( 8 , 8 , false ) ) + ListItem ( Integer ( 9 , 8 , false ) ) + ListItem ( Integer ( 10 , 8 , false ) ) + ListItem ( Integer ( 11 , 8 , false ) ) + ListItem ( Integer ( 12 , 8 , false ) ) + ListItem ( Integer ( 13 , 8 , false ) ) + ListItem ( Integer ( 14 , 8 , false ) ) + ListItem ( Integer ( 15 , 8 , false ) ) + ListItem ( Integer ( 16 , 8 , false ) ) + ListItem ( Integer ( 17 , 8 , false ) ) + ListItem ( Integer ( 18 , 8 , false ) ) + ListItem ( Integer ( 19 , 8 , false ) ) + ListItem ( Integer ( 20 , 8 , false ) ) + ListItem ( Integer ( 21 , 8 , false ) ) + ListItem ( Integer ( 22 , 8 , false ) ) + ListItem ( Integer ( 23 , 8 , false ) ) + ListItem ( Integer ( 24 , 8 , false ) ) + ListItem ( Integer ( 25 , 8 , false ) ) + ListItem ( Integer ( 26 , 8 , false ) ) + ListItem ( Integer ( 27 , 8 , false ) ) + ListItem ( Integer ( 28 , 8 , false ) ) + ListItem ( Integer ( 29 , 8 , false ) ) + ListItem ( Integer ( 30 , 8 , false ) ) + ListItem ( Integer ( 31 , 8 , false ) ) ) ) ) , ty ( 30 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 32 , 64 , false ) , ty ( 26 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 1 , projectionElemField ( fieldIdx ( 0 ) , ty ( 31 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 32 ) , 0 , noMetadataSize ) ) , ty ( 27 ) , mutabilityNot ) + 4 |-> typedValue ( Integer ( 32 , 64 , false ) , ty ( 26 ) , mutabilityNot ) + + + 13 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/niche-enum/niche-enum.state b/kmir/src/tests/integration/data/exec-smir/niche-enum/niche-enum.state index 2f67853c8..047c7c11f 100644 --- a/kmir/src/tests/integration/data/exec-smir/niche-enum/niche-enum.state +++ b/kmir/src/tests/integration/data/exec-smir/niche-enum/niche-enum.state @@ -37,43 +37,79 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( 0 , place (... local: local ( 3 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) - ListItem ( AllocRef ( allocId ( 2 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 51 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 46 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 3 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 2 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 44 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 38 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 37 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 39 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( 0 , place (... local: local ( 13 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) - ListItem ( AllocRef ( allocId ( 3 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 51 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , .List ) ) ) , ty ( 46 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 13 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 3 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 44 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 38 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 37 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 39 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( 0 , place (... local: local ( 23 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) - ListItem ( AllocRef ( allocId ( 4 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 51 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 1 ) , .List ) ) ) , ty ( 46 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 23 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 4 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 44 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 38 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 37 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 39 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( slotPlace ( 3 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) + ListItem ( AllocRef ( allocId ( 2 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 51 ) , mutabilityMut ) + 2 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 3 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 46 ) , mutabilityNot ) + 4 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 5 |-> typedValue ( Reference ( slotPlace ( 3 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) + 6 |-> typedValue ( AllocRef ( allocId ( 2 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) + 7 |-> typedValue ( Moved , ty ( 44 ) , mutabilityMut ) + 8 |-> newLocal ( ty ( 38 ) , mutabilityNot ) + 9 |-> newLocal ( ty ( 37 ) , mutabilityNot ) + 10 |-> newLocal ( ty ( 39 ) , mutabilityMut ) + 11 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( slotPlace ( 13 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) + ListItem ( AllocRef ( allocId ( 3 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 51 ) , mutabilityMut ) + 12 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 13 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , .List ) ) ) , ty ( 46 ) , mutabilityNot ) + 14 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 15 |-> typedValue ( Reference ( slotPlace ( 13 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) + 16 |-> typedValue ( AllocRef ( allocId ( 3 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) + 17 |-> typedValue ( Moved , ty ( 44 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 38 ) , mutabilityNot ) + 19 |-> newLocal ( ty ( 37 ) , mutabilityNot ) + 20 |-> newLocal ( ty ( 39 ) , mutabilityMut ) + 21 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( slotPlace ( 23 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) + ListItem ( AllocRef ( allocId ( 4 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 51 ) , mutabilityMut ) + 22 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 23 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 1 ) , .List ) ) ) , ty ( 46 ) , mutabilityNot ) + 24 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 25 |-> typedValue ( Reference ( slotPlace ( 23 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) + 26 |-> typedValue ( AllocRef ( allocId ( 4 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) + 27 |-> typedValue ( Moved , ty ( 44 ) , mutabilityMut ) + 28 |-> newLocal ( ty ( 38 ) , mutabilityNot ) + 29 |-> newLocal ( ty ( 37 ) , mutabilityNot ) + 30 |-> newLocal ( ty ( 39 ) , mutabilityMut ) + + + 77 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/pointers/offset_get_unchecked.state b/kmir/src/tests/integration/data/exec-smir/pointers/offset_get_unchecked.state index 93cab02ec..9005cbadb 100644 --- a/kmir/src/tests/integration/data/exec-smir/pointers/offset_get_unchecked.state +++ b/kmir/src/tests/integration/data/exec-smir/pointers/offset_get_unchecked.state @@ -31,23 +31,40 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 11 , 32 , true ) ) - ListItem ( Integer ( 22 , 32 , true ) ) - ListItem ( Integer ( 33 , 32 , true ) ) ) , ty ( 38 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemConstantIndex (... offset: 1 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 39 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 22 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 35 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemConstantIndex (... offset: 2 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 39 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 16 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 35 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Range ( ListItem ( Integer ( 11 , 32 , true ) ) + ListItem ( Integer ( 22 , 32 , true ) ) + ListItem ( Integer ( 33 , 32 , true ) ) ) , ty ( 38 ) , mutabilityNot ) + 2 |-> typedValue ( Reference ( slotPlace ( 1 , projectionElemConstantIndex (... offset: 1 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 26 ) , mutabilityNot ) + 3 |-> typedValue ( Moved , ty ( 27 ) , mutabilityMut ) + 4 |-> typedValue ( Moved , ty ( 39 ) , mutabilityMut ) + 5 |-> typedValue ( Integer ( 22 , 32 , true ) , ty ( 16 ) , mutabilityNot ) + 6 |-> newLocal ( ty ( 35 ) , mutabilityMut ) + 7 |-> typedValue ( Reference ( slotPlace ( 1 , projectionElemConstantIndex (... offset: 2 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 26 ) , mutabilityNot ) + 8 |-> typedValue ( Moved , ty ( 27 ) , mutabilityMut ) + 9 |-> typedValue ( Moved , ty ( 39 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 16 ) , mutabilityMut ) + 11 |-> newLocal ( ty ( 35 ) , mutabilityMut ) + + + 40 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/pointers/offset_read.state b/kmir/src/tests/integration/data/exec-smir/pointers/offset_read.state index db78dd210..ce1010acf 100644 --- a/kmir/src/tests/integration/data/exec-smir/pointers/offset_read.state +++ b/kmir/src/tests/integration/data/exec-smir/pointers/offset_read.state @@ -29,21 +29,36 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 11 , 32 , true ) ) - ListItem ( Integer ( 22 , 32 , true ) ) - ListItem ( Integer ( 33 , 32 , true ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: PointerOffset ( 1 , 3 ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 2 ) , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: PointerOffset ( 1 , 3 ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 2 ) , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 39 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 11 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 47 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 42 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 1 |-> typedValue ( Range ( ListItem ( Integer ( 11 , 32 , true ) ) + ListItem ( Integer ( 22 , 32 , true ) ) + ListItem ( Integer ( 33 , 32 , true ) ) ) , ty ( 53 ) , mutabilityNot ) + 2 |-> typedValue ( Reference ( slotPlace ( 1 , PointerOffset ( 1 , 3 ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 2 ) , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 1 , PointerOffset ( 1 , 3 ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 2 ) , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) + 4 |-> typedValue ( Moved , ty ( 39 ) , mutabilityMut ) + 5 |-> typedValue ( Moved , ty ( 11 ) , mutabilityMut ) + 6 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 7 |-> typedValue ( Moved , ty ( 47 ) , mutabilityMut ) + 8 |-> typedValue ( Moved , ty ( 42 ) , mutabilityMut ) + 9 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + + + 51 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/pointers/offset_struct_field_read.state b/kmir/src/tests/integration/data/exec-smir/pointers/offset_struct_field_read.state index 57c58de76..92c654c94 100644 --- a/kmir/src/tests/integration/data/exec-smir/pointers/offset_struct_field_read.state +++ b/kmir/src/tests/integration/data/exec-smir/pointers/offset_struct_field_read.state @@ -29,22 +29,38 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Integer ( 11 , 16 , false ) ) - ListItem ( Integer ( 22 , 16 , false ) ) - ListItem ( Integer ( 33 , 16 , false ) ) ) ) ) , ty ( 55 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 52 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 52 ) ) PointerOffset ( 1 , 3 ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 2 ) , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 52 ) ) PointerOffset ( 1 , 3 ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 2 ) , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 39 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 11 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 47 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 42 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Integer ( 11 , 16 , false ) ) + ListItem ( Integer ( 22 , 16 , false ) ) + ListItem ( Integer ( 33 , 16 , false ) ) ) ) ) , ty ( 55 ) , mutabilityNot ) + 2 |-> typedValue ( Moved , ty ( 52 ) , mutabilityMut ) + 3 |-> typedValue ( Reference ( slotPlace ( 1 , projectionElemField ( fieldIdx ( 0 ) , ty ( 52 ) ) PointerOffset ( 1 , 3 ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 2 ) , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) + 4 |-> typedValue ( Reference ( slotPlace ( 1 , projectionElemField ( fieldIdx ( 0 ) , ty ( 52 ) ) PointerOffset ( 1 , 3 ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 2 ) , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) + 5 |-> typedValue ( Moved , ty ( 39 ) , mutabilityMut ) + 6 |-> typedValue ( Moved , ty ( 11 ) , mutabilityMut ) + 7 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 8 |-> typedValue ( Moved , ty ( 47 ) , mutabilityMut ) + 9 |-> typedValue ( Moved , ty ( 42 ) , mutabilityMut ) + 10 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + + + 52 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/pointers/offset_struct_field_write.state b/kmir/src/tests/integration/data/exec-smir/pointers/offset_struct_field_write.state index fb4462dbf..5b0a5e397 100644 --- a/kmir/src/tests/integration/data/exec-smir/pointers/offset_struct_field_write.state +++ b/kmir/src/tests/integration/data/exec-smir/pointers/offset_struct_field_write.state @@ -30,24 +30,42 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Integer ( 11 , 16 , false ) ) - ListItem ( Integer ( 44 , 16 , false ) ) - ListItem ( Integer ( 33 , 16 , false ) ) ) ) ) , ty ( 50 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 47 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 47 ) ) PointerOffset ( 1 , 3 ) .ProjectionElems ) , mutabilityMut , metadata ( dynamicSize ( 2 ) , 0 , noMetadataSize ) ) , ty ( 11 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 40 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 0 , 64 , false ) , ty ( 3 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 2 , 64 , false ) , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 42 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 42 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Integer ( 11 , 16 , false ) ) + ListItem ( Integer ( 44 , 16 , false ) ) + ListItem ( Integer ( 33 , 16 , false ) ) ) ) ) , ty ( 50 ) , mutabilityMut ) + 2 |-> typedValue ( Moved , ty ( 47 ) , mutabilityMut ) + 3 |-> typedValue ( Reference ( slotPlace ( 1 , projectionElemField ( fieldIdx ( 0 ) , ty ( 47 ) ) PointerOffset ( 1 , 3 ) .ProjectionElems ) , mutabilityMut , metadata ( dynamicSize ( 2 ) , 0 , noMetadataSize ) ) , ty ( 11 ) , mutabilityMut ) + 4 |-> typedValue ( Moved , ty ( 40 ) , mutabilityMut ) + 5 |-> typedValue ( Moved , ty ( 12 ) , mutabilityMut ) + 6 |-> typedValue ( Integer ( 0 , 64 , false ) , ty ( 3 ) , mutabilityNot ) + 7 |-> typedValue ( Integer ( 2 , 64 , false ) , ty ( 3 ) , mutabilityMut ) + 8 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 9 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 42 ) , mutabilityMut ) + 11 |-> typedValue ( Moved , ty ( 42 ) , mutabilityMut ) + 12 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + + + 42 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/pointers/offset_write.state b/kmir/src/tests/integration/data/exec-smir/pointers/offset_write.state index 1919e7923..29da9930c 100644 --- a/kmir/src/tests/integration/data/exec-smir/pointers/offset_write.state +++ b/kmir/src/tests/integration/data/exec-smir/pointers/offset_write.state @@ -30,23 +30,40 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 11 , 32 , true ) ) - ListItem ( Integer ( 44 , 32 , true ) ) - ListItem ( Integer ( 33 , 32 , true ) ) ) , ty ( 48 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: PointerOffset ( 1 , 3 ) .ProjectionElems ) , mutabilityMut , metadata ( dynamicSize ( 2 ) , 0 , noMetadataSize ) ) , ty ( 11 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 40 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 0 , 64 , false ) , ty ( 3 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 2 , 64 , false ) , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 42 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 42 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 1 |-> typedValue ( Range ( ListItem ( Integer ( 11 , 32 , true ) ) + ListItem ( Integer ( 44 , 32 , true ) ) + ListItem ( Integer ( 33 , 32 , true ) ) ) , ty ( 48 ) , mutabilityMut ) + 2 |-> typedValue ( Reference ( slotPlace ( 1 , PointerOffset ( 1 , 3 ) .ProjectionElems ) , mutabilityMut , metadata ( dynamicSize ( 2 ) , 0 , noMetadataSize ) ) , ty ( 11 ) , mutabilityMut ) + 3 |-> typedValue ( Moved , ty ( 40 ) , mutabilityMut ) + 4 |-> typedValue ( Moved , ty ( 12 ) , mutabilityMut ) + 5 |-> typedValue ( Integer ( 0 , 64 , false ) , ty ( 3 ) , mutabilityNot ) + 6 |-> typedValue ( Integer ( 2 , 64 , false ) , ty ( 3 ) , mutabilityMut ) + 7 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 8 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 9 |-> typedValue ( Moved , ty ( 42 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 42 ) , mutabilityMut ) + 11 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + + + 41 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-length-test-fail.state b/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-length-test-fail.state index 133db0c7a..f555d5412 100644 --- a/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-length-test-fail.state +++ b/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-length-test-fail.state @@ -1,6 +1,6 @@ - #traverseProjection ( toLocal ( 5 ) , Range ( ListItem ( Integer ( 42 , 8 , false ) ) + #traverseProjection ( toSlot ( 10 ) , Range ( ListItem ( Integer ( 42 , 8 , false ) ) ListItem ( Integer ( 42 , 8 , false ) ) ListItem ( Integer ( 42 , 8 , false ) ) ListItem ( Integer ( 42 , 8 , false ) ) ) , .ProjectionElems , .Contexts ) ~> #derefTruncate ( staticSize ( 9 ) , .ProjectionElems ) ~> #readProjection ( false ) ~> #freezer#setLocalValue(_,_)_RT-DATA_KItem_Place_Evaluation1_ ( place (... local: local ( 23 ) , projection: .ProjectionElems ) ~> .K ) ~> #execStmts ( statement (... kind: statementKindAssign (... place: place (... local: local ( 28 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 23 ) , projection: .ProjectionElems ) ) ) , span: span ( 97 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 27 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandMove ( place (... local: local ( 28 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 97 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 26 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpPtrMetadata , operandMove ( place (... local: local ( 27 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 98 ) ) .Statements ) ~> #execTerminator ( terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 26 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 9 , basicBlockIdx ( 11 ) ) .Branches , otherwise: basicBlockIdx ( 12 ) ) ) , span: span ( 94 ) ) ) ~> .K @@ -40,50 +40,90 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 38 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 29 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 39 ) , mutabilityMut ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 42 , 8 , false ) ) - ListItem ( Integer ( 42 , 8 , false ) ) - ListItem ( Integer ( 42 , 8 , false ) ) - ListItem ( Integer ( 42 , 8 , false ) ) ) , ty ( 40 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 4 ) , 0 , dynamicSize ( 8 ) ) ) , ty ( 35 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 41 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 39 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 4 ) , 0 , dynamicSize ( 8 ) ) ) , ty ( 36 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 1 , 64 , false ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 4 , 64 , false ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 38 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 4 , 64 , false ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 41 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 39 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 5 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 4 ) , 0 , noMetadataSize ) ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 5 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 4 ) , 0 , noMetadataSize ) ) , ty ( 41 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 42 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 0 , place (... local: local ( 5 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 9 ) , 0 , dynamicSize ( 4 ) ) ) , ty ( 37 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 26 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 43 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 39 ) , mutabilityMut ) ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 42 , 8 , false ) ) - ListItem ( Integer ( 41 , 8 , false ) ) - ListItem ( Integer ( 42 , 8 , false ) ) - ListItem ( Integer ( 42 , 8 , false ) ) ) , ty ( 30 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 31 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) ) ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Range ( ListItem ( Integer ( 42 , 8 , false ) ) + ListItem ( Integer ( 41 , 8 , false ) ) + ListItem ( Integer ( 42 , 8 , false ) ) + ListItem ( Integer ( 42 , 8 , false ) ) ) , ty ( 30 ) , mutabilityNot ) + 2 |-> newLocal ( ty ( 1 ) , mutabilityNot ) + 3 |-> typedValue ( Moved , ty ( 26 ) , mutabilityMut ) + 4 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 31 ) , mutabilityNot ) + 5 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 6 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 26 ) , mutabilityNot ) + 7 |-> typedValue ( Moved , ty ( 38 ) , mutabilityMut ) + 8 |-> typedValue ( Moved , ty ( 29 ) , mutabilityMut ) + 9 |-> newLocal ( ty ( 39 ) , mutabilityMut ) + 10 |-> typedValue ( Range ( ListItem ( Integer ( 42 , 8 , false ) ) + ListItem ( Integer ( 42 , 8 , false ) ) + ListItem ( Integer ( 42 , 8 , false ) ) + ListItem ( Integer ( 42 , 8 , false ) ) ) , ty ( 40 ) , mutabilityNot ) + 11 |-> typedValue ( PtrLocal ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 4 ) , 0 , dynamicSize ( 8 ) ) ) , ty ( 35 ) , mutabilityMut ) + 12 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 13 |-> typedValue ( Moved , ty ( 29 ) , mutabilityMut ) + 14 |-> typedValue ( Moved , ty ( 26 ) , mutabilityMut ) + 15 |-> typedValue ( Moved , ty ( 41 ) , mutabilityMut ) + 16 |-> newLocal ( ty ( 39 ) , mutabilityMut ) + 17 |-> typedValue ( PtrLocal ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 4 ) , 0 , dynamicSize ( 8 ) ) ) , ty ( 36 ) , mutabilityNot ) + 18 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 19 |-> typedValue ( Integer ( 1 , 64 , false ) , ty ( 29 ) , mutabilityNot ) + 20 |-> typedValue ( Integer ( 4 , 64 , false ) , ty ( 29 ) , mutabilityMut ) + 21 |-> typedValue ( Moved , ty ( 38 ) , mutabilityMut ) + 22 |-> typedValue ( Integer ( 4 , 64 , false ) , ty ( 29 ) , mutabilityNot ) + 23 |-> typedValue ( Moved , ty ( 26 ) , mutabilityMut ) + 24 |-> typedValue ( Moved , ty ( 41 ) , mutabilityMut ) + 25 |-> newLocal ( ty ( 39 ) , mutabilityMut ) + 26 |-> typedValue ( Reference ( slotPlace ( 10 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 4 ) , 0 , noMetadataSize ) ) , ty ( 26 ) , mutabilityMut ) + 27 |-> typedValue ( Reference ( slotPlace ( 10 , .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 4 ) , 0 , noMetadataSize ) ) , ty ( 41 ) , mutabilityNot ) + 28 |-> newLocal ( ty ( 42 ) , mutabilityNot ) + 29 |-> typedValue ( PtrLocal ( slotPlace ( 10 , .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 9 ) , 0 , dynamicSize ( 4 ) ) ) , ty ( 37 ) , mutabilityMut ) + 30 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 31 |-> newLocal ( ty ( 29 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 26 ) , mutabilityMut ) + 33 |-> newLocal ( ty ( 43 ) , mutabilityMut ) + 34 |-> newLocal ( ty ( 39 ) , mutabilityMut ) + + + 44 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-zst.state b/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-zst.state index 691092911..abd5fd0ac 100644 --- a/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-zst.state +++ b/kmir/src/tests/integration/data/exec-smir/pointers/pointer-cast-zst.state @@ -1,6 +1,6 @@ - PtrLocal ( 1 , place (... local: local ( 1 ) , projection: projectionElemToZST .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ~> #freezer#setLocalValue(_,_)_RT-DATA_KItem_Place_Evaluation1_ ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ~> .K ) ~> #execStmts ( statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPtrToPtr , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPtrToPtr , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindTransmute , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 27 ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpAlignOf , ty ( 28 ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpBitAnd , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 50 ) ) .Statements ) ~> #execTerminator ( terminator (... kind: assert (... cond: operandCopy ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageMisalignedPointerDereference (... required: operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , found: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionUnreachable ) , span: span ( 50 ) ) ) ~> .K + #traverseProjection ( toSlot ( 7 ) , PtrLocal ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , .ProjectionElems , .Contexts ) ~> #readProjection ( false ) ~> #freezer#cast(_,_,_,_)_RT-DATA_Evaluation_Evaluation_CastKind_MaybeTy_Ty0_ ( castKindPtrToPtr ~> .K , ty ( 26 ) ~> .K , ty ( 25 ) ~> .K ) ~> #freezer#setLocalValue(_,_)_RT-DATA_KItem_Place_Evaluation1_ ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ~> .K ) ~> #execStmts ( statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPtrToPtr , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPtrToPtr , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindTransmute , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 27 ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpAlignOf , ty ( 28 ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpBitAnd , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 50 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 50 ) ) .Statements ) ~> #execTerminator ( terminator (... kind: assert (... cond: operandCopy ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , expected: true , msg: assertMessageMisalignedPointerDereference (... required: operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , found: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionUnreachable ) , span: span ( 50 ) ) ) ~> .K noReturn @@ -26,25 +26,46 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 25 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 26 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 25 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 27 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 27 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 27 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 27 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 3405691582 , 32 , false ) ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 34 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 35 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) ) ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 3405691582 , 32 , false ) ) ) , ty ( 28 ) , mutabilityNot ) + 2 |-> newLocal ( ty ( 29 ) , mutabilityMut ) + 3 |-> typedValue ( Moved , ty ( 26 ) , mutabilityMut ) + 4 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 34 ) , mutabilityNot ) + 5 |-> newLocal ( ty ( 35 ) , mutabilityMut ) + 6 |-> newLocal ( ty ( 29 ) , mutabilityMut ) + 7 |-> typedValue ( PtrLocal ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 26 ) , mutabilityNot ) + 8 |-> newLocal ( ty ( 25 ) , mutabilityNot ) + 9 |-> newLocal ( ty ( 26 ) , mutabilityNot ) + 10 |-> newLocal ( ty ( 25 ) , mutabilityMut ) + 11 |-> newLocal ( ty ( 27 ) , mutabilityMut ) + 12 |-> newLocal ( ty ( 27 ) , mutabilityMut ) + 13 |-> newLocal ( ty ( 27 ) , mutabilityMut ) + 14 |-> newLocal ( ty ( 27 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 30 ) , mutabilityMut ) + + + 16 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/pointers/ref_ptr_cases.state b/kmir/src/tests/integration/data/exec-smir/pointers/ref_ptr_cases.state index 06612f321..e2adae4d9 100644 --- a/kmir/src/tests/integration/data/exec-smir/pointers/ref_ptr_cases.state +++ b/kmir/src/tests/integration/data/exec-smir/pointers/ref_ptr_cases.state @@ -29,14 +29,24 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> newLocal ( ty ( 1 ) , mutabilityNot ) + 2 |-> newLocal ( ty ( 1 ) , mutabilityNot ) + 3 |-> newLocal ( ty ( 1 ) , mutabilityNot ) + 4 |-> newLocal ( ty ( 1 ) , mutabilityNot ) + + + 66 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/array_elem_ref.state b/kmir/src/tests/integration/data/exec-smir/references/array_elem_ref.state index c90e1b425..348b5c257 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/array_elem_ref.state +++ b/kmir/src/tests/integration/data/exec-smir/references/array_elem_ref.state @@ -28,21 +28,35 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 0 , 32 , false ) ) - ListItem ( Integer ( 0 , 32 , false ) ) - ListItem ( Integer ( 0 , 32 , false ) ) - ListItem ( Integer ( 0 , 32 , false ) ) ) , ty ( 34 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemConstantIndex (... offset: 3 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 27 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 3 , 64 , false ) , ty ( 31 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 4 , 64 , false ) , ty ( 31 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 35 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 0 , place (... local: local ( 1 ) , projection: projectionElemConstantIndex (... offset: 3 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 30 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Range ( ListItem ( Integer ( 0 , 32 , false ) ) + ListItem ( Integer ( 0 , 32 , false ) ) + ListItem ( Integer ( 0 , 32 , false ) ) + ListItem ( Integer ( 0 , 32 , false ) ) ) , ty ( 34 ) , mutabilityNot ) + 2 |-> typedValue ( Reference ( slotPlace ( 1 , projectionElemConstantIndex (... offset: 3 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 27 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( 3 , 64 , false ) , ty ( 31 ) , mutabilityNot ) + 4 |-> typedValue ( Integer ( 4 , 64 , false ) , ty ( 31 ) , mutabilityMut ) + 5 |-> typedValue ( Moved , ty ( 35 ) , mutabilityMut ) + 6 |-> typedValue ( PtrLocal ( slotPlace ( 1 , projectionElemConstantIndex (... offset: 3 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 30 ) , mutabilityNot ) + 7 |-> newLocal ( ty ( 1 ) , mutabilityNot ) + 8 |-> newLocal ( ty ( 1 ) , mutabilityNot ) + + + 15 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state index de694867d..510c61d02 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state +++ b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state @@ -30,23 +30,42 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 22 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 21 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 34 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 21 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 11 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 22 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 34 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 22 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 2 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 22 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 2 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) + 4 |-> typedValue ( Moved , ty ( 21 ) , mutabilityMut ) + 5 |-> typedValue ( Moved , ty ( 2 ) , mutabilityMut ) + 6 |-> newLocal ( ty ( 34 ) , mutabilityMut ) + 7 |-> typedValue ( Moved , ty ( 21 ) , mutabilityMut ) + 8 |-> typedValue ( Moved , ty ( 24 ) , mutabilityMut ) + 9 |-> typedValue ( Moved , ty ( 24 ) , mutabilityMut ) + 10 |-> typedValue ( Reference ( slotPlace ( 11 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 25 ) , mutabilityNot ) + 11 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 22 ) , mutabilityNot ) + 12 |-> newLocal ( ty ( 34 ) , mutabilityMut ) + 13 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 22 ) , mutabilityMut ) + + + 29 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state index 951a10279..a7f297371 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state +++ b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state @@ -30,18 +30,32 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 22 , 8 , true ) , ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Integer ( 22 , 8 , true ) , ty ( 2 ) , mutabilityMut ) + 2 |-> newLocal ( ty ( 1 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 28 ) , mutabilityMut ) + 4 |-> typedValue ( Moved , ty ( 2 ) , mutabilityMut ) + 5 |-> newLocal ( ty ( 29 ) , mutabilityMut ) + 6 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 28 ) , mutabilityNot ) + 7 |-> typedValue ( Moved , ty ( 2 ) , mutabilityMut ) + 8 |-> newLocal ( ty ( 29 ) , mutabilityMut ) + + + 11 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state index 043aae9d7..246a2c256 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state @@ -28,15 +28,26 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 29 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 28 ) , mutabilityNot ) + 4 |-> typedValue ( Moved , ty ( 29 ) , mutabilityMut ) + 5 |-> newLocal ( ty ( 30 ) , mutabilityMut ) + + + 8 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state index 043aae9d7..6c148100c 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state @@ -28,15 +28,26 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 29 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 28 ) , mutabilityNot ) + 4 |-> typedValue ( Moved , ty ( 29 ) , mutabilityMut ) + 5 |-> newLocal ( ty ( 30 ) , mutabilityMut ) + + + 10 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/refReturned.state b/kmir/src/tests/integration/data/exec-smir/references/refReturned.state index 7301205f2..a56e3abfe 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refReturned.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refReturned.state @@ -28,16 +28,28 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 29 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 2 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 28 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 28 ) , mutabilityNot ) + 4 |-> typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 5 |-> typedValue ( Moved , ty ( 29 ) , mutabilityMut ) + 6 |-> newLocal ( ty ( 30 ) , mutabilityMut ) + + + 11 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/simple.state b/kmir/src/tests/integration/data/exec-smir/references/simple.state index 86f6e5353..e5be47bd2 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/simple.state +++ b/kmir/src/tests/integration/data/exec-smir/references/simple.state @@ -27,15 +27,26 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 27 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 2 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 27 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 4 |-> typedValue ( Moved , ty ( 28 ) , mutabilityMut ) + 5 |-> newLocal ( ty ( 29 ) , mutabilityMut ) + + + 6 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state index 454f37867..61d33b191 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state +++ b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state @@ -35,36 +35,66 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 43 , 8 , true ) ) - ListItem ( BoolVal ( true ) ) - ListItem ( Integer ( 43 , 64 , false ) ) ) , ty ( 30 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 31 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 31 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 5 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 33 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 34 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 9 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 35 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 43 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 36 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 25 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 26 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 31 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 43 , 8 , true ) ) + ListItem ( BoolVal ( true ) ) + ListItem ( Integer ( 43 , 64 , false ) ) ) , ty ( 30 ) , mutabilityMut ) + 2 |-> typedValue ( Reference ( slotPlace ( 1 , projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 31 ) , mutabilityNot ) + 3 |-> typedValue ( Moved , ty ( 2 ) , mutabilityMut ) + 4 |-> newLocal ( ty ( 32 ) , mutabilityMut ) + 5 |-> typedValue ( Reference ( slotPlace ( 1 , projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 31 ) , mutabilityMut ) + 6 |-> typedValue ( Reference ( slotPlace ( 5 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 33 ) , mutabilityNot ) + 7 |-> typedValue ( Moved , ty ( 2 ) , mutabilityMut ) + 8 |-> newLocal ( ty ( 32 ) , mutabilityMut ) + 9 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 34 ) , mutabilityMut ) + 10 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 29 ) , mutabilityMut ) + 11 |-> typedValue ( Reference ( slotPlace ( 9 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 35 ) , mutabilityNot ) + 12 |-> typedValue ( Integer ( 43 , 8 , true ) , ty ( 2 ) , mutabilityNot ) + 13 |-> newLocal ( ty ( 32 ) , mutabilityMut ) + 14 |-> typedValue ( Reference ( slotPlace ( 1 , projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 36 ) , mutabilityNot ) + 15 |-> typedValue ( Moved , ty ( 2 ) , mutabilityMut ) + 16 |-> typedValue ( Moved , ty ( 25 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 32 ) , mutabilityMut ) + 18 |-> typedValue ( Moved , ty ( 26 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 32 ) , mutabilityMut ) + 20 |-> typedValue ( Reference ( slotPlace ( 1 , projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 31 ) , mutabilityMut ) + 21 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 29 ) , mutabilityMut ) + 22 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 29 ) , mutabilityMut ) + 23 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 29 ) , mutabilityMut ) + 24 |-> typedValue ( Reference ( slotPlace ( 1 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 29 ) , mutabilityMut ) + + + 25 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state index 17f4708f6..2c6a21577 100644 --- a/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state +++ b/kmir/src/tests/integration/data/exec-smir/struct-multi/struct-multi.state @@ -34,25 +34,44 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 0 , 8 , false ) ) - ListItem ( Integer ( 31 , 8 , false ) ) - ListItem ( BoolVal ( false ) ) ) , ty ( 36 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 4 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 0 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 1 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 1 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 1 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( AllocRef ( allocId ( 2 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 1 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 39 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 6 ) , mutabilityMut ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 0 , 8 , false ) ) + ListItem ( Integer ( 31 , 8 , false ) ) + ListItem ( BoolVal ( false ) ) ) , ty ( 36 ) , mutabilityNot ) + 2 |-> typedValue ( BoolVal ( true ) , ty ( 4 ) , mutabilityNot ) + 3 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 4 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 5 |-> typedValue ( AllocRef ( allocId ( 0 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 1 ) , mutabilityNot ) + 6 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 7 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 8 |-> typedValue ( AllocRef ( allocId ( 1 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 1 ) , mutabilityNot ) + 9 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 11 |-> typedValue ( AllocRef ( allocId ( 2 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 1 ) , mutabilityNot ) + 12 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 13 |-> newLocal ( ty ( 39 ) , mutabilityMut ) + + + 149 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state b/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state index 57665d4db..9ef4d2725 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state @@ -25,18 +25,28 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 1 , 32 , true ) ) - ListItem ( BoolVal ( true ) ) - ListItem ( thunk ( UnableToDecode ( b"33333sE@" , typeInfoPrimitiveType ( primTypeFloat ( floatTyF64 ) ) ) ) ) - ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 1 , 32 , true ) ) - ListItem ( Integer ( 10 , 32 , true ) ) ) ) ) , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 16 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 16 ) , mutabilityMut ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 1 , 32 , true ) ) + ListItem ( BoolVal ( true ) ) + ListItem ( thunk ( UnableToDecode ( b"33333sE@" , typeInfoPrimitiveType ( primTypeFloat ( floatTyF64 ) ) ) ) ) + ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 1 , 32 , true ) ) + ListItem ( Integer ( 10 , 32 , true ) ) ) ) ) , ty ( 28 ) , mutabilityMut ) + 2 |-> typedValue ( Moved , ty ( 27 ) , mutabilityMut ) + 3 |-> typedValue ( Moved , ty ( 16 ) , mutabilityMut ) + 4 |-> typedValue ( Moved , ty ( 16 ) , mutabilityMut ) + + + 5 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.state b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.state index 47b68a635..9ad15900e 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.state +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.state @@ -1,53 +1,69 @@ - #execStmts ( .Statements ) ~> #execTerminator ( terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) ~> .K + #prepareBodyCall ( ListItem ( Integer ( 10 , 32 , true ) ) + ListItem ( BoolVal ( false ) ) , callableFn , "foo" , body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 77 ) , mut: mutabilityNot ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "_i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_b" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "_f" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) , operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , ty ( 25 ) , place (... local: local ( 4 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , span ( 51 ) ) ~> .K noReturn - ty ( 25 ) + ty ( -1 ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 13 ) ) ) ) operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 14 ) ) ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) ) ty ( -1 ) - place (... local: local ( 4 ) , projection: .ProjectionElems ) + place (... local: local ( 0 ) , projection: .ProjectionElems ) - someBasicBlockIdx ( basicBlockIdx ( 1 ) ) + noBasicBlockIdx unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( thunk ( UnableToDecode ( b"\x00\x00\x00\x00\x00\x00$@" , typeInfoPrimitiveType ( primTypeFloat ( floatTyF64 ) ) ) ) , ty ( 27 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 10 , 32 , true ) ) - ListItem ( BoolVal ( false ) ) - ListItem ( thunk ( UnableToDecode ( b"\x00\x00\x00\x00\x00\x00$@" , typeInfoPrimitiveType ( primTypeFloat ( floatTyF64 ) ) ) ) ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 11 , 32 , true ) ) - ListItem ( BoolVal ( true ) ) - ListItem ( thunk ( UnableToDecode ( b"\x00\x00\x00\x00\x00\x00$@" , typeInfoPrimitiveType ( primTypeFloat ( floatTyF64 ) ) ) ) ) ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 27 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 16 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 27 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 16 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 26 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 27 ) , mutabilityMut ) ) ) ) ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + 0 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 10 , 32 , true ) ) + ListItem ( BoolVal ( false ) ) + ListItem ( thunk ( UnableToDecode ( b"\x00\x00\x00\x00\x00\x00$@" , typeInfoPrimitiveType ( primTypeFloat ( floatTyF64 ) ) ) ) ) ) , ty ( 28 ) , mutabilityNot ) + 2 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 11 , 32 , true ) ) + ListItem ( BoolVal ( true ) ) + ListItem ( thunk ( UnableToDecode ( b"\x00\x00\x00\x00\x00\x00$@" , typeInfoPrimitiveType ( primTypeFloat ( floatTyF64 ) ) ) ) ) ) , ty ( 29 ) , mutabilityNot ) + 3 |-> typedValue ( Moved , ty ( 27 ) , mutabilityMut ) + 4 |-> newLocal ( ty ( 1 ) , mutabilityNot ) + 5 |-> typedValue ( Moved , ty ( 16 ) , mutabilityMut ) + 6 |-> typedValue ( Moved , ty ( 26 ) , mutabilityMut ) + 7 |-> typedValue ( thunk ( UnableToDecode ( b"\x00\x00\x00\x00\x00\x00$@" , typeInfoPrimitiveType ( primTypeFloat ( floatTyF64 ) ) ) ) , ty ( 27 ) , mutabilityMut ) + 8 |-> newLocal ( ty ( 1 ) , mutabilityNot ) + 9 |-> newLocal ( ty ( 16 ) , mutabilityMut ) + 10 |-> newLocal ( ty ( 26 ) , mutabilityMut ) + 11 |-> newLocal ( ty ( 27 ) , mutabilityMut ) + + + 12 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-custom-printer.expected b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-custom-printer.expected index 5fa941c89..bd2fdf0a9 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-custom-printer.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-custom-printer.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: src/rust/library/std/src/rt.rs:194 │ -│ (8 steps) +│ (7 steps) ├─ 3 (terminal) │ #EndProgram ~> .K │ function: main diff --git a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-default-printer.expected b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-default-printer.expected index 5fa941c89..bd2fdf0a9 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-default-printer.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.cli-default-printer.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: src/rust/library/std/src/rt.rs:194 │ -│ (8 steps) +│ (7 steps) ├─ 3 (terminal) │ #EndProgram ~> .K │ function: main diff --git a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.to-module.json b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.to-module.json index 9cf02027b..05ceb962d 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.to-module.json +++ b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.to-module.json @@ -628,72 +628,23 @@ }, "args": [ { - "node": "KApply", - "label": { - "node": "KLabel", - "name": "newLocal", - "params": [] + "node": "KRewrite", + "lhs": { + "node": "KToken", + "token": "0", + "sort": { + "node": "KSort", + "name": "Int" + } }, - "args": [ - { - "node": "KApply", - "label": { - "node": "KLabel", - "name": "ty", - "params": [] - }, - "args": [ - { - "node": "KRewrite", - "lhs": { - "node": "KToken", - "token": "0", - "sort": { - "node": "KSort", - "name": "Int" - } - }, - "rhs": { - "node": "KToken", - "token": "1", - "sort": { - "node": "KSort", - "name": "Int" - } - } - } - ], - "arity": 1, - "variable": false - }, - { - "node": "KRewrite", - "lhs": { - "node": "KApply", - "label": { - "node": "KLabel", - "name": "Mutability::Not", - "params": [] - }, - "args": [], - "arity": 0, - "variable": false - }, - "rhs": { - "node": "KApply", - "label": { - "node": "KLabel", - "name": "Mutability::Mut", - "params": [] - }, - "args": [], - "arity": 0, - "variable": false - } + "rhs": { + "node": "KToken", + "token": "1", + "sort": { + "node": "KSort", + "name": "Int" } - ], - "arity": 2, - "variable": false + } } ], "arity": 1, @@ -783,69 +734,281 @@ "name": "ListItem", "params": [] }, + "args": [ + { + "node": "KToken", + "token": "0", + "sort": { + "node": "KSort", + "name": "Int" + } + } + ], + "arity": 1, + "variable": false + } + ], + "arity": 5, + "variable": false + } + ], + "arity": 1, + "variable": false + } + } + ], + "arity": 1, + "variable": false + }, + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "", + "params": [] + }, + "args": [ + { + "node": "KRewrite", + "lhs": { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "_|->_", + "params": [] + }, + "args": [ + { + "node": "KToken", + "token": "0", + "sort": { + "node": "KSort", + "name": "Int" + } + }, + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "newLocal", + "params": [] + }, + "args": [ + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "ty", + "params": [] + }, + "args": [ + { + "node": "KToken", + "token": "0", + "sort": { + "node": "KSort", + "name": "Int" + } + } + ], + "arity": 1, + "variable": false + }, + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "Mutability::Not", + "params": [] + }, + "args": [], + "arity": 0, + "variable": false + } + ], + "arity": 2, + "variable": false + } + ], + "arity": 2, + "variable": false + }, + "rhs": { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "_Map_", + "params": [] + }, + "args": [ + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "_|->_", + "params": [] + }, + "args": [ + { + "node": "KToken", + "token": "0", + "sort": { + "node": "KSort", + "name": "Int" + } + }, + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "newLocal", + "params": [] + }, "args": [ { "node": "KApply", "label": { "node": "KLabel", - "name": "newLocal", + "name": "ty", "params": [] }, "args": [ { - "node": "KApply", - "label": { - "node": "KLabel", - "name": "ty", - "params": [] - }, - "args": [ - { - "node": "KToken", - "token": "0", - "sort": { - "node": "KSort", - "name": "Int" - } - } - ], - "arity": 1, - "variable": false - }, + "node": "KToken", + "token": "0", + "sort": { + "node": "KSort", + "name": "Int" + } + } + ], + "arity": 1, + "variable": false + }, + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "Mutability::Not", + "params": [] + }, + "args": [], + "arity": 0, + "variable": false + } + ], + "arity": 2, + "variable": false + } + ], + "arity": 2, + "variable": false + }, + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "_|->_", + "params": [] + }, + "args": [ + { + "node": "KToken", + "token": "1", + "sort": { + "node": "KSort", + "name": "Int" + } + }, + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "newLocal", + "params": [] + }, + "args": [ + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "ty", + "params": [] + }, + "args": [ { - "node": "KApply", - "label": { - "node": "KLabel", - "name": "Mutability::Not", - "params": [] - }, - "args": [], - "arity": 0, - "variable": false + "node": "KToken", + "token": "1", + "sort": { + "node": "KSort", + "name": "Int" + } } ], - "arity": 2, + "arity": 1, + "variable": false + }, + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "Mutability::Mut", + "params": [] + }, + "args": [], + "arity": 0, "variable": false } ], - "arity": 1, + "arity": 2, "variable": false } ], - "arity": 5, + "arity": 2, "variable": false } ], - "arity": 1, + "arity": 2, "variable": false } } ], "arity": 1, "variable": false + }, + { + "node": "KApply", + "label": { + "node": "KLabel", + "name": "", + "params": [] + }, + "args": [ + { + "node": "KRewrite", + "lhs": { + "node": "KToken", + "token": "1", + "sort": { + "node": "KSort", + "name": "Int" + } + }, + "rhs": { + "node": "KToken", + "token": "2", + "sort": { + "node": "KSort", + "name": "Int" + } + } + } + ], + "arity": 1, + "variable": false } ], - "arity": 5, + "arity": 7, "variable": false }, { @@ -857,8 +1020,12 @@ }, "args": [ { - "node": "KVariable", - "name": "_GENERATEDCOUNTER_CELL" + "node": "KToken", + "token": "0", + "sort": { + "node": "KSort", + "name": "Int" + } } ], "arity": 1, diff --git a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.to-module.k b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.to-module.k index 58b96e706..d3d84a88e 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.to-module.k +++ b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.to-module.k @@ -28,12 +28,18 @@ module ASSERT-TRUE-MAIN-SUMMARY ( UNWIND_CELL => unwindActionContinue ) - ListItem ( newLocal ( ty ( ( 0 => 1 ) ) , ( mutabilityNot => mutabilityMut ) ) ) + ListItem ( ( 0 => 1 ) ) - ( .List => ListItem ( StackFrame ( CALLER_CELL:Ty , DEST_CELL:Place , TARGET_CELL:MaybeBasicBlockIdx , UNWIND_CELL:UnwindAction , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ) ) ) + ( .List => ListItem ( StackFrame ( CALLER_CELL:Ty , DEST_CELL:Place , TARGET_CELL:MaybeBasicBlockIdx , UNWIND_CELL:UnwindAction , ListItem ( 0 ) ) ) ) + + ( 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) => 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) 1 |-> newLocal ( ty ( 1 ) , mutabilityMut ) ) + + + ( 1 => 2 ) + [priority(20), label(BASIC-BLOCK-1-TO-3)] diff --git a/kmir/src/tests/integration/data/prove-rs/show/box_heap_alloc-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/box_heap_alloc-fail.main.expected index 3993211b3..410680575 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/box_heap_alloc-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/box_heap_alloc-fail.main.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (73 steps) +│ (76 steps) ├─ 3 │ #cast ( Integer ( 4 , 64 , false ) , castKindTransmute , ty ( 29 ) , ty ( 50 ) ) │ span: 186 diff --git a/kmir/src/tests/integration/data/prove-rs/show/interior-mut-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/interior-mut-fail.main.expected index 4c165cf72..f5efeac93 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/interior-mut-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/interior-mut-fail.main.expected @@ -3,9 +3,9 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (877 steps) +│ (904 steps) └─ 3 (stuck, leaf) - #setUpCalleeData ( monoItemFn ( ... name: symbol ( "_ZN4core4cell22panic_already + #prepareTerminatorCall ( ty ( 43 ) , monoItemFn ( ... name: symbol ( "_ZN4core4c span: 32 diff --git a/kmir/src/tests/integration/data/prove-rs/show/iter_next_3.main.expected b/kmir/src/tests/integration/data/prove-rs/show/iter_next_3.main.expected index a4c5bdc3d..3283c79fb 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/iter_next_3.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/iter_next_3.main.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (2028 steps) +│ (2053 steps) ├─ 3 (terminal) │ #EndProgram ~> .K │ function: main diff --git a/kmir/src/tests/integration/data/prove-rs/show/local-raw-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/local-raw-fail.main.expected index 193e3e171..8b3c233f1 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/local-raw-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/local-raw-fail.main.expected @@ -5,13 +5,13 @@ │ │ (46 steps) ├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl +│ #cast ( PtrLocal ( slotPlace ( 2 , projectionElemToZST .ProjectionElems ) , mut │ function: main │ span: 50 │ │ (1 step) └─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj + thunk ( #cast ( PtrLocal ( slotPlace ( 2 , projectionElemToZST .ProjectionElems function: main span: 50 diff --git a/kmir/src/tests/integration/data/prove-rs/show/niche-enum.main.expected b/kmir/src/tests/integration/data/prove-rs/show/niche-enum.main.expected index 586c10ed1..a1fea98a9 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/niche-enum.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/niche-enum.main.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (740 steps) +│ (757 steps) ├─ 3 (terminal) │ #EndProgram ~> .K │ function: main diff --git a/kmir/src/tests/integration/data/prove-rs/show/niche-enum.smir.foo.cli-stats-leaves.expected b/kmir/src/tests/integration/data/prove-rs/show/niche-enum.smir.foo.cli-stats-leaves.expected index b9454d080..dbd10237d 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/niche-enum.smir.foo.cli-stats-leaves.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/niche-enum.smir.foo.cli-stats-leaves.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: src/rust/library/std/src/rt.rs:194 │ -│ (14 steps) +│ (15 steps) ├─ 3 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 1 , basicBlockIdx ( 3 ) ) │ function: foo @@ -94,11 +94,11 @@ Node roles (exclusive): Leaf paths from init: total leaves (non-root): 1 reachable leaves : 1 - total steps : 34 + total steps : 35 - leaf 2 (path 1/3): steps 34, path 1 -> 3 -> 5 -> 7 -> 9 -> 11 -> 2 - leaf 2 (path 2/3): steps 47, path 1 -> 3 -> 4 -> 6 -> 2 - leaf 2 (path 3/3): steps 48, path 1 -> 3 -> 5 -> 7 -> 8 -> 10 -> 2 + leaf 2 (path 1/3): steps 35, path 1 -> 3 -> 5 -> 7 -> 9 -> 11 -> 2 + leaf 2 (path 2/3): steps 48, path 1 -> 3 -> 4 -> 6 -> 2 + leaf 2 (path 3/3): steps 49, path 1 -> 3 -> 5 -> 7 -> 8 -> 10 -> 2 LEAF CELLS --------------- diff --git a/kmir/src/tests/integration/data/prove-rs/show/offset-u8-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/offset-u8-fail.main.expected index c373bdd71..be1eb6697 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/offset-u8-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/offset-u8-fail.main.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (35 steps) +│ (36 steps) └─ 3 (stuck, leaf) #traverseProjection ( toAlloc ( allocId ( 0 ) ) , StringVal ( "123" ) , .Project span: 48 diff --git a/kmir/src/tests/integration/data/prove-rs/show/pointer-cast-length-test-fail.array_cast_test.expected b/kmir/src/tests/integration/data/prove-rs/show/pointer-cast-length-test-fail.array_cast_test.expected index 9198552ba..a2751ecf2 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/pointer-cast-length-test-fail.array_cast_test.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/pointer-cast-length-test-fail.array_cast_test.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (44 steps) +│ (45 steps) ├─ 3 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 2 ) ) ┃ @@ -15,9 +15,9 @@ ┃ ├─ 4 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 2 ) ) ┃ │ -┃ │ (6 steps) +┃ │ (5 steps) ┃ └─ 6 (stuck, leaf) -┃ #setUpCalleeData ( monoItemFn ( ... name: symbol ( "_ZN4core9panicking5panic17h +┃ #prepareTerminatorCall ( ty ( 33 ) , monoItemFn ( ... name: symbol ( "_ZN4core9p ┃ span: 32 ┃ ┗━━┓ subst: .Subst @@ -27,45 +27,45 @@ ├─ 5 │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 2 ) ) │ - │ (211 steps) + │ (215 steps) ├─ 7 - │ #traverseProjection ( toStack ( 1 , local ( 2 ) ) , Range ( range ( #mapOffset ( + │ #traverseProjection ( toSlot ( 2 ) , Range ( range ( ARG_ARRAY1:List , 0 , size │ span: 87 ┃ ┃ (1 step) ┣━━┓ ┃ │ ┃ ├─ 8 - ┃ │ #traverseProjection ( toStack ( 1 , local ( 2 ) ) , project:Value ( range ( #map + ┃ │ #traverseProjection ( toSlot ( 2 ) , project:Value ( range ( ARG_ARRAY1:List , 0 ┃ │ span: 87 ┃ │ - ┃ │ (6 steps) + ┃ │ (7 steps) ┃ ├─ 10 - ┃ │ #traverseProjection ( toStack ( 1 , local ( 2 ) ) , Range ( range ( #mapOffset ( + ┃ │ #traverseProjection ( toSlot ( 2 ) , Range ( range ( ARG_ARRAY1:List , 0 , size ┃ │ span: 87 ┃ ┃ ┃ ┃ (1 step) ┃ ┣━━┓ ┃ ┃ │ ┃ ┃ ├─ 11 - ┃ ┃ │ #traverseProjection ( toStack ( 1 , local ( 2 ) ) , Range ( range ( range ( #map + ┃ ┃ │ #traverseProjection ( toSlot ( 2 ) , Range ( range ( range ( ARG_ARRAY1:List , 0 ┃ ┃ │ span: 87 ┃ ┃ │ - ┃ ┃ │ (114 steps) + ┃ ┃ │ (116 steps) ┃ ┃ └─ 13 (stuck, leaf) - ┃ ┃ #traverseProjection ( toLocal ( 5 ) , Range ( range ( #mapOffset ( ARG_ARRAY1:Li + ┃ ┃ #traverseProjection ( toSlot ( 8 ) , Range ( range ( ARG_ARRAY1:List , 0 , size ┃ ┃ span: 97 ┃ ┃ ┃ ┗━━┓ ┃ │ ┃ └─ 12 (stuck, leaf) - ┃ #traverseProjection ( toStack ( 1 , local ( 2 ) ) , Range ( range ( #mapOffset ( + ┃ #traverseProjection ( toSlot ( 2 ) , Range ( range ( ARG_ARRAY1:List , 0 , size ┃ span: 87 ┃ ┗━━┓ │ └─ 9 (stuck, leaf) - #traverseProjection ( toStack ( 1 , local ( 2 ) ) , Range ( range ( #mapOffset ( + #traverseProjection ( toSlot ( 2 ) , Range ( range ( ARG_ARRAY1:List , 0 , size span: 87 diff --git a/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-wrapper-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-wrapper-fail.main.expected index 28b856633..48bac3978 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-wrapper-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-wrapper-fail.main.expected @@ -5,13 +5,13 @@ │ │ (68 steps) ├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl +│ #cast ( PtrLocal ( slotPlace ( 2 , projectionElemWrapStruct projectionElemToZST │ function: main │ span: 270 │ │ (1 step) └─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj + thunk ( #cast ( PtrLocal ( slotPlace ( 2 , projectionElemWrapStruct projectionE function: main span: 270 diff --git a/kmir/src/tests/integration/data/prove-rs/show/ptr-through-wrapper-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/ptr-through-wrapper-fail.main.expected index 193e3e171..8b3c233f1 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/ptr-through-wrapper-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/ptr-through-wrapper-fail.main.expected @@ -5,13 +5,13 @@ │ │ (46 steps) ├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl +│ #cast ( PtrLocal ( slotPlace ( 2 , projectionElemToZST .ProjectionElems ) , mut │ function: main │ span: 50 │ │ (1 step) └─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj + thunk ( #cast ( PtrLocal ( slotPlace ( 2 , projectionElemToZST .ProjectionElems function: main span: 50 diff --git a/kmir/src/tests/integration/data/prove-rs/show/ref-ptr-cast-elem-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/ref-ptr-cast-elem-fail.main.expected index 0f38a6cfb..37eed8f3d 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/ref-ptr-cast-elem-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/ref-ptr-cast-elem-fail.main.expected @@ -5,13 +5,13 @@ │ │ (64 steps) ├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl +│ #cast ( PtrLocal ( slotPlace ( 2 , projectionElemConstantIndex ( ... offset: 0 , │ function: main │ span: 50 │ │ (1 step) └─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj + thunk ( #cast ( PtrLocal ( slotPlace ( 2 , projectionElemConstantIndex ( ... off function: main span: 50 diff --git a/kmir/src/tests/integration/data/prove-rs/show/ref-ptr-cast-elem-offset-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/ref-ptr-cast-elem-offset-fail.main.expected index 2dd05b5e9..941e92026 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/ref-ptr-cast-elem-offset-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/ref-ptr-cast-elem-offset-fail.main.expected @@ -3,15 +3,15 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (125 steps) +│ (124 steps) ├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl +│ #cast ( PtrLocal ( slotPlace ( 2 , projectionElemConstantIndex ( ... offset: 0 , │ function: main │ span: 144 │ │ (1 step) └─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj + thunk ( #cast ( PtrLocal ( slotPlace ( 2 , projectionElemConstantIndex ( ... off function: main span: 144 diff --git a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.eats_all_args.expected b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.eats_all_args.expected index d75e7ed57..2b06cacd7 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.eats_all_args.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.eats_all_args.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (52 steps) +│ (62 steps) ├─ 3 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 3 ) ) ┃ @@ -15,7 +15,7 @@ ┃ ├─ 4 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 3 ) ) ┃ │ -┃ │ (136 steps) +┃ │ (137 steps) ┃ ├─ 6 (split) ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 9 ) ) ┃ ┃ @@ -43,33 +43,16 @@ ┃ ├─ 9 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 9 ) ) ┃ │ -┃ │ (119 steps) -┃ ├─ 13 -┃ │ #traverseProjection ( toStack ( 1 , local ( 12 ) ) , Range ( #mapOffset ( ARG_AR -┃ │ span: 69 -┃ ┃ -┃ ┃ (1 step) -┃ ┣━━┓ -┃ ┃ │ -┃ ┃ ├─ 16 -┃ ┃ │ #traverseProjection ( toStack ( 1 , local ( 12 ) ) , project:Value ( #mapOffset -┃ ┃ │ span: 69 -┃ ┃ │ -┃ ┃ │ (7 steps) -┃ ┃ ├─ 20 (terminal) -┃ ┃ │ #EndProgram ~> .K -┃ ┃ │ -┃ ┃ ┊ constraint: -┃ ┃ ┊ Ceil_3c8e32fd -┃ ┃ ┊ subst: ... -┃ ┃ └─ 2 (leaf, target, terminal) -┃ ┃ #EndProgram ~> .K -┃ ┃ -┃ ┗━━┓ -┃ │ -┃ └─ 17 (stuck, leaf) -┃ #traverseProjection ( toStack ( 1 , local ( 12 ) ) , Range ( #mapOffset ( ARG_AR -┃ span: 69 +┃ │ (128 steps) +┃ ├─ 13 (terminal) +┃ │ #EndProgram ~> .K +┃ │ +┃ ┊ constraint: +┃ ┊ 0 .K ┃ ┗━━┓ subst: .Subst ┃ constraint: @@ -78,7 +61,7 @@ ├─ 5 │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 3 ) ) │ - │ (112 steps) + │ (113 steps) ├─ 7 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 9 ) ) ┃ @@ -106,33 +89,16 @@ ├─ 11 │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 9 ) ) │ - │ (119 steps) - ├─ 15 - │ #traverseProjection ( toStack ( 1 , local ( 12 ) ) , Range ( #mapOffset ( ARG_AR - │ span: 69 - ┃ - ┃ (1 step) - ┣━━┓ - ┃ │ - ┃ ├─ 18 - ┃ │ #traverseProjection ( toStack ( 1 , local ( 12 ) ) , project:Value ( #mapOffset - ┃ │ span: 69 - ┃ │ - ┃ │ (7 steps) - ┃ ├─ 21 (terminal) - ┃ │ #EndProgram ~> .K - ┃ │ - ┃ ┊ constraint: - ┃ ┊ Ceil_3c8e32fd - ┃ ┊ subst: ... - ┃ └─ 2 (leaf, target, terminal) - ┃ #EndProgram ~> .K - ┃ - ┗━━┓ - │ - └─ 19 (stuck, leaf) - #traverseProjection ( toStack ( 1 , local ( 12 ) ) , Range ( #mapOffset ( ARG_AR - span: 69 + │ (128 steps) + ├─ 15 (terminal) + │ #EndProgram ~> .K + │ + ┊ constraint: + ┊ 0 .K diff --git a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.cli-stats-leaves.expected b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.cli-stats-leaves.expected index e4e10b74c..4dd504fc2 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.cli-stats-leaves.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.cli-stats-leaves.expected @@ -3,9 +3,10 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: src/rust/library/std/src/rt.rs:194 │ -│ (566 steps) +│ (576 steps) └─ 3 (stuck, leaf) - #setUpCalleeData ( monoItemFn ( ... name: symbol ( "_ZN4core9panicking5panic17h + #prepareTerminatorCall ( ty ( 38 ) , monoItemFn ( ... name: symbol ( "_ZN4core9p + function: main span: no-location:0 @@ -25,14 +26,11 @@ Node roles (exclusive): Leaf paths from init: total leaves (non-root): 1 reachable leaves : 1 - total steps : 566 + total steps : 576 - leaf 3: steps 566, path 1 -> 3 + leaf 3: steps 576, path 1 -> 3 LEAF CELLS --------------- Node 3: - #setUpCalleeData ( monoItemFn ( ... name: symbol ( "_ZN4core9panicking5panic17hE" ) , id: defId ( 38 ) , body: noBody ) , operandConstant ( constOperand ( ... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst ( ... kind: constantKindAllocated ( allocation ( ... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap ( ... ptrs: provenanceMapEntry ( ... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 39 ) , id: mirConstId ( 25 ) ) ) ) .Operands , span ( 117 ) ) ~> .K - >> function: core::panicking::panic::h - >> call span: /kmir/src/tests/integration/data/prove-rs/symbolic-args-fail.rs:53:5 - >> message: 'assertion failed: false' \ No newline at end of file + #prepareTerminatorCall ( ty ( 38 ) , monoItemFn ( ... name: symbol ( "_ZN4core9panicking5panic17hE" ) , id: defId ( 38 ) , body: noBody ) , operandConstant ( constOperand ( ... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst ( ... kind: constantKindAllocated ( allocation ( ... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap ( ... ptrs: provenanceMapEntry ( ... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 39 ) , id: mirConstId ( 25 ) ) ) ) .Operands , place ( ... local: local ( 25 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , span ( 117 ) ) ~> .K \ No newline at end of file diff --git a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.expected index e5b630195..3d2a1670d 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.expected @@ -3,9 +3,10 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (566 steps) +│ (576 steps) └─ 3 (stuck, leaf) - #setUpCalleeData ( monoItemFn ( ... name: symbol ( "_ZN4core9panicking5panic17h + #prepareTerminatorCall ( ty ( 38 ) , monoItemFn ( ... name: symbol ( "_ZN4core9p + function: main span: 32 diff --git a/kmir/src/tests/integration/data/prove-rs/show/symbolic-structs-fail.eats_struct_args.expected b/kmir/src/tests/integration/data/prove-rs/show/symbolic-structs-fail.eats_struct_args.expected index 673eb0193..164b97c99 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/symbolic-structs-fail.eats_struct_args.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/symbolic-structs-fail.eats_struct_args.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (61 steps) +│ (64 steps) ├─ 3 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 2 ) ) ┃ @@ -27,9 +27,9 @@ ┃ ┃ ├─ 8 ┃ ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 5 ) ) ┃ ┃ │ -┃ ┃ │ (6 steps) +┃ ┃ │ (5 steps) ┃ ┃ └─ 10 (stuck, leaf) -┃ ┃ #setUpCalleeData ( monoItemFn ( ... name: symbol ( "_ZN4core9panicking5panic17h +┃ ┃ #prepareTerminatorCall ( ty ( 27 ) , monoItemFn ( ... name: symbol ( "_ZN4core9p ┃ ┃ span: 32 ┃ ┃ ┃ ┗━━┓ subst: .Subst diff --git a/kmir/src/tests/integration/data/prove-rs/show/test_offset_from-fail.testing.expected b/kmir/src/tests/integration/data/prove-rs/show/test_offset_from-fail.testing.expected index 816d1da62..d11638100 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/test_offset_from-fail.testing.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/test_offset_from-fail.testing.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (297 steps) +│ (298 steps) ├─ 3 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 8 ) ) ┃ @@ -15,7 +15,7 @@ ┃ ├─ 4 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 8 ) ) ┃ │ -┃ │ (588 steps) +┃ │ (593 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ @@ -43,9 +43,9 @@ ┃ ├─ 8 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 1 , basicBlockIdx ( 7 ) ) ┃ │ - ┃ │ (101 steps) + ┃ │ (103 steps) ┃ └─ 10 (stuck, leaf) - ┃ #ProgramError ( #UBErrorPtrOffsetDiff ( PtrLocal ( 1 , place ( ... local: local + ┃ #ProgramError ( #UBErrorPtrOffsetDiff ( PtrLocal ( slotPlace ( 4 , projectionEle ┃ ┗━━┓ subst: .Subst ┃ constraint: @@ -66,9 +66,9 @@ ┃ ├─ 12 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 2 , basicBlockIdx ( 6 ) ) ┃ │ - ┃ │ (101 steps) + ┃ │ (103 steps) ┃ └─ 14 (stuck, leaf) - ┃ #ProgramError ( #UBErrorPtrOffsetDiff ( PtrLocal ( 1 , place ( ... local: local + ┃ #ProgramError ( #UBErrorPtrOffsetDiff ( PtrLocal ( slotPlace ( 4 , projectionEle ┃ ┗━━┓ subst: .Subst ┃ constraint: @@ -91,7 +91,7 @@ ┃ │ ┃ │ (17 steps) ┃ └─ 18 (stuck, leaf) - ┃ #ProgramError ( #UBErrorPtrOffsetDiff ( PtrLocal ( 0 , place ( ... local: local + ┃ #ProgramError ( #UBErrorPtrOffsetDiff ( PtrLocal ( slotPlace ( 4 , projectionEle ┃ ┗━━┓ subst: .Subst ┃ constraint: diff --git a/kmir/src/tests/integration/data/prove-rs/show/unions-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/unions-fail.main.expected index dea9bd948..827f44e92 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/unions-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/unions-fail.main.expected @@ -5,7 +5,7 @@ │ │ (76 steps) └─ 3 (stuck, leaf) - #traverseProjection ( toLocal ( 1 ) , Union ( fieldIdx ( 0 ) , Integer ( -1 , 8 + #traverseProjection ( toSlot ( 2 ) , Union ( fieldIdx ( 0 ) , Integer ( -1 , 8 , function: main span: 59 diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-0.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-0.expected index c8bee9fef..25ea57eb9 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-0.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-0.expected @@ -1,6 +1,6 @@ - #traverseProjection ( toStack ( 1 , local ( 30 ) ) , Integer ( 207 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 207 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 207 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 207 , 8 , false ) ) ) ) ) + #traverseProjection ( toSlot ( 35 ) , Integer ( 207 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 207 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 207 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 207 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 155 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 244 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 183 , 8 , false ) ) ) ) ) @@ -49,76 +49,156 @@ unwindActionCleanup ( basicBlockIdx ( 35 ) ) - ListItem ( newLocal ( ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 3 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) + ListItem ( 93 ) + ListItem ( 94 ) + ListItem ( 95 ) + ListItem ( 96 ) + ListItem ( 97 ) + ListItem ( 98 ) + ListItem ( 99 ) + ListItem ( 100 ) + ListItem ( 101 ) + ListItem ( 102 ) + ListItem ( 103 ) + ListItem ( 104 ) + ListItem ( 105 ) + ListItem ( 106 ) + ListItem ( 107 ) + ListItem ( 108 ) + ListItem ( 109 ) + ListItem ( 110 ) + ListItem ( 111 ) + ListItem ( 112 ) + ListItem ( 113 ) + ListItem ( 114 ) + ListItem ( 115 ) + ListItem ( 116 ) + ListItem ( 117 ) + ListItem ( 118 ) + ListItem ( 119 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( -341142443 , 32 , true ) ) - ListItem ( Integer ( 48424546 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 207 , 8 , false ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) + ListItem ( 35 ) + ListItem ( 36 ) + ListItem ( 37 ) + ListItem ( 38 ) + ListItem ( 39 ) + ListItem ( 40 ) + ListItem ( 41 ) + ListItem ( 42 ) + ListItem ( 43 ) + ListItem ( 44 ) + ListItem ( 45 ) + ListItem ( 46 ) + ListItem ( 47 ) + ListItem ( 48 ) + ListItem ( 49 ) + ListItem ( 50 ) + ListItem ( 51 ) + ListItem ( 52 ) + ListItem ( 53 ) + ListItem ( 54 ) + ListItem ( 55 ) + ListItem ( 56 ) + ListItem ( 57 ) + ListItem ( 58 ) + ListItem ( 59 ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) ) ) + + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( -341142443 , 32 , true ) ) + ListItem ( Integer ( 48424546 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 207 , 8 , false ) ) + ListItem ( Integer ( 155 , 8 , false ) ) + ListItem ( Integer ( 244 , 8 , false ) ) + ListItem ( Integer ( 183 , 8 , false ) ) + ListItem ( Integer ( 111 , 8 , false ) ) + ListItem ( Integer ( 71 , 8 , false ) ) + ListItem ( Integer ( 144 , 8 , false ) ) + ListItem ( Integer ( 71 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 6 ) , 0 , dynamicSize ( 6 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( 1727289611 , 32 , true ) ) + ListItem ( Integer ( -815409959 , 32 , true ) ) + ListItem ( Integer ( 987119867 , 32 , true ) ) + ListItem ( Integer ( 790204970 , 32 , true ) ) + ListItem ( Integer ( -1714975244 , 32 , true ) ) + ListItem ( Integer ( -282729822 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + 5 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 6 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( -341142443 , 32 , true ) ) + ListItem ( Integer ( 48424546 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) + 7 |-> typedValue ( Range ( ListItem ( Integer ( 207 , 8 , false ) ) ListItem ( Integer ( 155 , 8 , false ) ) ListItem ( Integer ( 244 , 8 , false ) ) ListItem ( Integer ( 183 , 8 , false ) ) ListItem ( Integer ( 111 , 8 , false ) ) ListItem ( Integer ( 71 , 8 , false ) ) ListItem ( Integer ( 144 , 8 , false ) ) - ListItem ( Integer ( 71 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 6 ) , 0 , dynamicSize ( 6 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -341142443 , 32 , true ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 48424546 , 32 , true ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 71 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 72 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 207 , 64 , false ) , ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 207 , 8 , false ) ) ) ) ) + ListItem ( Integer ( 71 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 8 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 6 ) , 0 , dynamicSize ( 6 ) ) ) , ty ( 32 ) , mutabilityNot ) + 9 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 11 |-> typedValue ( Integer ( -341142443 , 32 , true ) , ty ( 28 ) , mutabilityNot ) + 12 |-> typedValue ( Integer ( 48424546 , 32 , true ) , ty ( 28 ) , mutabilityNot ) + 13 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 14 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 16 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 18 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 19 |-> typedValue ( Moved , ty ( 28 ) , mutabilityMut ) + 20 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 70 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 23 ) , mutabilityNot ) + 23 |-> newLocal ( ty ( 23 ) , mutabilityNot ) + 24 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 25 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 26 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 27 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 28 |-> newLocal ( ty ( 71 ) , mutabilityMut ) + 29 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 30 |-> newLocal ( ty ( 23 ) , mutabilityMut ) + 31 |-> newLocal ( ty ( 72 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 33 |-> typedValue ( Integer ( 207 , 64 , false ) , ty ( 6 ) , mutabilityMut ) + 34 |-> typedValue ( Moved , ty ( 24 ) , mutabilityMut ) + 35 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 207 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 155 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 244 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 183 , 8 , false ) ) ) ) ) @@ -127,49 +207,61 @@ ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 144 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 71 , 8 , false ) ) ) ) ) ) ) ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 2 , 64 , false ) ) - ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 207 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 207 , 8 , false ) , ty ( 23 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 207 , 64 , false ) , ty ( 6 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 6 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 40 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 44 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 41 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( -341142443 , 32 , true ) ) - ListItem ( Integer ( 48424546 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 207 , 8 , false ) ) - ListItem ( Integer ( 155 , 8 , false ) ) - ListItem ( Integer ( 244 , 8 , false ) ) - ListItem ( Integer ( 183 , 8 , false ) ) - ListItem ( Integer ( 111 , 8 , false ) ) - ListItem ( Integer ( 71 , 8 , false ) ) - ListItem ( Integer ( 144 , 8 , false ) ) - ListItem ( Integer ( 71 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 6 ) , 0 , dynamicSize ( 6 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 1727289611 , 32 , true ) ) - ListItem ( Integer ( -815409959 , 32 , true ) ) - ListItem ( Integer ( 987119867 , 32 , true ) ) - ListItem ( Integer ( 790204970 , 32 , true ) ) - ListItem ( Integer ( -1714975244 , 32 , true ) ) - ListItem ( Integer ( -282729822 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) - + ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) + 36 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 207 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) + 37 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) + 38 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 39 |-> typedValue ( Integer ( 207 , 8 , false ) , ty ( 23 ) , mutabilityNot ) + 40 |-> typedValue ( Integer ( 207 , 64 , false ) , ty ( 6 ) , mutabilityNot ) + 41 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) + 42 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 43 |-> typedValue ( Moved , ty ( 6 ) , mutabilityMut ) + 44 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 45 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 46 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 47 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 48 |-> newLocal ( ty ( 40 ) , mutabilityMut ) + 49 |-> newLocal ( ty ( 44 ) , mutabilityMut ) + 50 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 51 |-> newLocal ( ty ( 41 ) , mutabilityNot ) + 52 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 53 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 54 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 55 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 56 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 57 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 58 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 59 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 93 |-> newLocal ( ty ( 55 ) , mutabilityMut ) + 94 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) + 95 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) + 96 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) + 97 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 98 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 99 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 100 |-> typedValue ( Reference ( slotPlace ( 96 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) + 101 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 102 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 103 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 104 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 105 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 106 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 107 |-> typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) + 108 |-> newLocal ( ty ( 23 ) , mutabilityMut ) + 109 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) + 110 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 111 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) + 112 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 113 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 114 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 115 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 116 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 117 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) + 118 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 119 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + + + 120 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-1.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-1.expected index 50fb59617..7c5c35eb5 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-1.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-1.expected @@ -1,6 +1,6 @@ - #traverseProjection ( toStack ( 1 , local ( 30 ) ) , Integer ( 32 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 32 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 32 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 32 , 8 , false ) ) ) ) ) + #traverseProjection ( toSlot ( 35 ) , Integer ( 32 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 32 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 32 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 32 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 130 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 60 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 253 , 8 , false ) ) ) ) ) @@ -49,74 +49,153 @@ unwindActionCleanup ( basicBlockIdx ( 35 ) ) - ListItem ( newLocal ( ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 3 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) + ListItem ( 93 ) + ListItem ( 94 ) + ListItem ( 95 ) + ListItem ( 96 ) + ListItem ( 97 ) + ListItem ( 98 ) + ListItem ( 99 ) + ListItem ( 100 ) + ListItem ( 101 ) + ListItem ( 102 ) + ListItem ( 103 ) + ListItem ( 104 ) + ListItem ( 105 ) + ListItem ( 106 ) + ListItem ( 107 ) + ListItem ( 108 ) + ListItem ( 109 ) + ListItem ( 110 ) + ListItem ( 111 ) + ListItem ( 112 ) + ListItem ( 113 ) + ListItem ( 114 ) + ListItem ( 115 ) + ListItem ( 116 ) + ListItem ( 117 ) + ListItem ( 118 ) + ListItem ( 119 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 32 , 8 , false ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) + ListItem ( 35 ) + ListItem ( 36 ) + ListItem ( 37 ) + ListItem ( 38 ) + ListItem ( 39 ) + ListItem ( 40 ) + ListItem ( 41 ) + ListItem ( 42 ) + ListItem ( 43 ) + ListItem ( 44 ) + ListItem ( 45 ) + ListItem ( 46 ) + ListItem ( 47 ) + ListItem ( 48 ) + ListItem ( 49 ) + ListItem ( 50 ) + ListItem ( 51 ) + ListItem ( 52 ) + ListItem ( 53 ) + ListItem ( 54 ) + ListItem ( 55 ) + ListItem ( 56 ) + ListItem ( 57 ) + ListItem ( 58 ) + ListItem ( 59 ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) ) ) + + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 32 , 8 , false ) ) + ListItem ( Integer ( 130 , 8 , false ) ) + ListItem ( Integer ( 60 , 8 , false ) ) + ListItem ( Integer ( 253 , 8 , false ) ) + ListItem ( Integer ( 230 , 8 , false ) ) + ListItem ( Integer ( 241 , 8 , false ) ) + ListItem ( Integer ( 194 , 8 , false ) ) + ListItem ( Integer ( 107 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 6 ) , 0 , dynamicSize ( 6 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( -52155262 , 32 , true ) ) + ListItem ( Integer ( -473267571 , 32 , true ) ) + ListItem ( Integer ( 1147433305 , 32 , true ) ) + ListItem ( Integer ( 841095768 , 32 , true ) ) + ListItem ( Integer ( 1296334389 , 32 , true ) ) + ListItem ( Integer ( -784133741 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + 5 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 6 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) + 7 |-> typedValue ( Range ( ListItem ( Integer ( 32 , 8 , false ) ) ListItem ( Integer ( 130 , 8 , false ) ) ListItem ( Integer ( 60 , 8 , false ) ) ListItem ( Integer ( 253 , 8 , false ) ) ListItem ( Integer ( 230 , 8 , false ) ) ListItem ( Integer ( 241 , 8 , false ) ) ListItem ( Integer ( 194 , 8 , false ) ) - ListItem ( Integer ( 107 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 6 ) , 0 , dynamicSize ( 6 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 71 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 72 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 32 , 64 , false ) , ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 32 , 8 , false ) ) ) ) ) + ListItem ( Integer ( 107 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 8 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 6 ) , 0 , dynamicSize ( 6 ) ) ) , ty ( 32 ) , mutabilityNot ) + 9 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 11 |-> newLocal ( ty ( 28 ) , mutabilityNot ) + 12 |-> newLocal ( ty ( 28 ) , mutabilityNot ) + 13 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 14 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 16 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 23 ) , mutabilityNot ) + 23 |-> newLocal ( ty ( 23 ) , mutabilityNot ) + 24 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 25 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 26 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 27 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 28 |-> newLocal ( ty ( 71 ) , mutabilityMut ) + 29 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 30 |-> newLocal ( ty ( 23 ) , mutabilityMut ) + 31 |-> newLocal ( ty ( 72 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 33 |-> typedValue ( Integer ( 32 , 64 , false ) , ty ( 6 ) , mutabilityMut ) + 34 |-> typedValue ( Moved , ty ( 24 ) , mutabilityMut ) + 35 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 32 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 130 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 60 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 253 , 8 , false ) ) ) ) ) @@ -125,48 +204,61 @@ ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 194 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 107 , 8 , false ) ) ) ) ) ) ) ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 2 , 64 , false ) ) - ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 32 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 32 , 8 , false ) , ty ( 23 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32 , 64 , false ) , ty ( 6 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 6 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 40 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 44 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 41 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 32 , 8 , false ) ) - ListItem ( Integer ( 130 , 8 , false ) ) - ListItem ( Integer ( 60 , 8 , false ) ) - ListItem ( Integer ( 253 , 8 , false ) ) - ListItem ( Integer ( 230 , 8 , false ) ) - ListItem ( Integer ( 241 , 8 , false ) ) - ListItem ( Integer ( 194 , 8 , false ) ) - ListItem ( Integer ( 107 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 6 ) , 0 , dynamicSize ( 6 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( -52155262 , 32 , true ) ) - ListItem ( Integer ( -473267571 , 32 , true ) ) - ListItem ( Integer ( 1147433305 , 32 , true ) ) - ListItem ( Integer ( 841095768 , 32 , true ) ) - ListItem ( Integer ( 1296334389 , 32 , true ) ) - ListItem ( Integer ( -784133741 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) - + ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) + 36 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 32 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) + 37 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) + 38 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 39 |-> typedValue ( Integer ( 32 , 8 , false ) , ty ( 23 ) , mutabilityNot ) + 40 |-> typedValue ( Integer ( 32 , 64 , false ) , ty ( 6 ) , mutabilityNot ) + 41 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) + 42 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 43 |-> typedValue ( Moved , ty ( 6 ) , mutabilityMut ) + 44 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 45 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 46 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 47 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 48 |-> newLocal ( ty ( 40 ) , mutabilityMut ) + 49 |-> newLocal ( ty ( 44 ) , mutabilityMut ) + 50 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 51 |-> newLocal ( ty ( 41 ) , mutabilityNot ) + 52 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 53 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 54 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 55 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 56 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 57 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 58 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 59 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 93 |-> newLocal ( ty ( 55 ) , mutabilityMut ) + 94 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) + 95 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) + 96 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) + 97 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 98 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 99 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 100 |-> typedValue ( Reference ( slotPlace ( 96 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) + 101 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 102 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 103 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 104 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 105 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 106 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 107 |-> typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) + 108 |-> newLocal ( ty ( 23 ) , mutabilityMut ) + 109 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) + 110 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 111 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) + 112 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 113 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 114 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 115 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 116 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 117 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) + 118 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 119 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + + + 120 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-2.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-2.expected index 66dbadacc..27e0dc2cf 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-2.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-2.expected @@ -1,6 +1,6 @@ - #traverseProjection ( toStack ( 1 , local ( 30 ) ) , Integer ( 46 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 46 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 46 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 46 , 8 , false ) ) ) ) ) + #traverseProjection ( toSlot ( 35 ) , Integer ( 46 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 46 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 46 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 46 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 43 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 184 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 86 , 8 , false ) ) ) ) ) @@ -49,120 +49,110 @@ unwindActionCleanup ( basicBlockIdx ( 35 ) ) - ListItem ( newLocal ( ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 3 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) + ListItem ( 93 ) + ListItem ( 94 ) + ListItem ( 95 ) + ListItem ( 96 ) + ListItem ( 97 ) + ListItem ( 98 ) + ListItem ( 99 ) + ListItem ( 100 ) + ListItem ( 101 ) + ListItem ( 102 ) + ListItem ( 103 ) + ListItem ( 104 ) + ListItem ( 105 ) + ListItem ( 106 ) + ListItem ( 107 ) + ListItem ( 108 ) + ListItem ( 109 ) + ListItem ( 110 ) + ListItem ( 111 ) + ListItem ( 112 ) + ListItem ( 113 ) + ListItem ( 114 ) + ListItem ( 115 ) + ListItem ( 116 ) + ListItem ( 117 ) + ListItem ( 118 ) + ListItem ( 119 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 46 , 8 , false ) ) - ListItem ( Integer ( 43 , 8 , false ) ) - ListItem ( Integer ( 184 , 8 , false ) ) - ListItem ( Integer ( 86 , 8 , false ) ) - ListItem ( Integer ( 157 , 8 , false ) ) - ListItem ( Integer ( 128 , 8 , false ) ) - ListItem ( Integer ( 108 , 8 , false ) ) - ListItem ( Integer ( 18 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 10 ) , 0 , dynamicSize ( 10 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 71 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 72 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 46 , 64 , false ) , ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 46 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 43 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 184 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 86 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 157 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 128 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 108 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 18 , 8 , false ) ) ) ) ) ) ) - ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 2 , 64 , false ) ) - ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 46 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 46 , 8 , false ) , ty ( 23 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 46 , 64 , false ) , ty ( 6 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 6 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 40 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 44 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 41 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 46 , 8 , false ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) + ListItem ( 35 ) + ListItem ( 36 ) + ListItem ( 37 ) + ListItem ( 38 ) + ListItem ( 39 ) + ListItem ( 40 ) + ListItem ( 41 ) + ListItem ( 42 ) + ListItem ( 43 ) + ListItem ( 44 ) + ListItem ( 45 ) + ListItem ( 46 ) + ListItem ( 47 ) + ListItem ( 48 ) + ListItem ( 49 ) + ListItem ( 50 ) + ListItem ( 51 ) + ListItem ( 52 ) + ListItem ( 53 ) + ListItem ( 54 ) + ListItem ( 55 ) + ListItem ( 56 ) + ListItem ( 57 ) + ListItem ( 58 ) + ListItem ( 59 ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) ) ) + + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 46 , 8 , false ) ) ListItem ( Integer ( 43 , 8 , false ) ) ListItem ( Integer ( 184 , 8 , false ) ) ListItem ( Integer ( 86 , 8 , false ) ) ListItem ( Integer ( 157 , 8 , false ) ) ListItem ( Integer ( 128 , 8 , false ) ) ListItem ( Integer ( 108 , 8 , false ) ) - ListItem ( Integer ( 18 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 10 ) , 0 , dynamicSize ( 10 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 2146275893 , 32 , true ) ) + ListItem ( Integer ( 18 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 10 ) , 0 , dynamicSize ( 10 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( 2146275893 , 32 , true ) ) ListItem ( Integer ( 594729871 , 32 , true ) ) ListItem ( Integer ( 1871367442 , 32 , true ) ) ListItem ( Integer ( 8878959 , 32 , true ) ) @@ -171,6 +161,108 @@ ListItem ( Integer ( -584053575 , 32 , true ) ) ListItem ( Integer ( 1854766825 , 32 , true ) ) ListItem ( Integer ( 1751273387 , 32 , true ) ) - ListItem ( Integer ( -1385399937 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) - + ListItem ( Integer ( -1385399937 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + 5 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 6 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) + 7 |-> typedValue ( Range ( ListItem ( Integer ( 46 , 8 , false ) ) + ListItem ( Integer ( 43 , 8 , false ) ) + ListItem ( Integer ( 184 , 8 , false ) ) + ListItem ( Integer ( 86 , 8 , false ) ) + ListItem ( Integer ( 157 , 8 , false ) ) + ListItem ( Integer ( 128 , 8 , false ) ) + ListItem ( Integer ( 108 , 8 , false ) ) + ListItem ( Integer ( 18 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 8 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 10 ) , 0 , dynamicSize ( 10 ) ) ) , ty ( 32 ) , mutabilityNot ) + 9 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 11 |-> newLocal ( ty ( 28 ) , mutabilityNot ) + 12 |-> newLocal ( ty ( 28 ) , mutabilityNot ) + 13 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 14 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 16 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 23 ) , mutabilityNot ) + 23 |-> newLocal ( ty ( 23 ) , mutabilityNot ) + 24 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 25 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 26 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 27 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 28 |-> newLocal ( ty ( 71 ) , mutabilityMut ) + 29 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 30 |-> newLocal ( ty ( 23 ) , mutabilityMut ) + 31 |-> newLocal ( ty ( 72 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 33 |-> typedValue ( Integer ( 46 , 64 , false ) , ty ( 6 ) , mutabilityMut ) + 34 |-> typedValue ( Moved , ty ( 24 ) , mutabilityMut ) + 35 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 46 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 43 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 184 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 86 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 157 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 128 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 108 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 18 , 8 , false ) ) ) ) ) ) ) + ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 2 , 64 , false ) ) + ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) + 36 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 46 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) + 37 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) + 38 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 39 |-> typedValue ( Integer ( 46 , 8 , false ) , ty ( 23 ) , mutabilityNot ) + 40 |-> typedValue ( Integer ( 46 , 64 , false ) , ty ( 6 ) , mutabilityNot ) + 41 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) + 42 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 43 |-> typedValue ( Moved , ty ( 6 ) , mutabilityMut ) + 44 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 45 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 46 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 47 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 48 |-> newLocal ( ty ( 40 ) , mutabilityMut ) + 49 |-> newLocal ( ty ( 44 ) , mutabilityMut ) + 50 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 51 |-> newLocal ( ty ( 41 ) , mutabilityNot ) + 52 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 53 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 54 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 55 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 56 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 57 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 58 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 59 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 93 |-> newLocal ( ty ( 55 ) , mutabilityMut ) + 94 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) + 95 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) + 96 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) + 97 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 98 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 99 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 100 |-> typedValue ( Reference ( slotPlace ( 96 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) + 101 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 102 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 103 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 104 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 105 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 106 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 107 |-> typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) + 108 |-> newLocal ( ty ( 23 ) , mutabilityMut ) + 109 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) + 110 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 111 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) + 112 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 113 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 114 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 115 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 116 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 117 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) + 118 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 119 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + + + 120 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-3.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-3.expected index d408600a9..93fb8801b 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-3.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-3.expected @@ -1,6 +1,6 @@ - #traverseProjection ( toStack ( 1 , local ( 30 ) ) , Integer ( 66 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 66 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 66 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 66 , 8 , false ) ) ) ) ) + #traverseProjection ( toSlot ( 35 ) , Integer ( 66 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 66 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 66 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 66 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 189 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 242 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 33 , 8 , false ) ) ) ) ) @@ -49,120 +49,110 @@ unwindActionCleanup ( basicBlockIdx ( 35 ) ) - ListItem ( newLocal ( ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 3 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) + ListItem ( 93 ) + ListItem ( 94 ) + ListItem ( 95 ) + ListItem ( 96 ) + ListItem ( 97 ) + ListItem ( 98 ) + ListItem ( 99 ) + ListItem ( 100 ) + ListItem ( 101 ) + ListItem ( 102 ) + ListItem ( 103 ) + ListItem ( 104 ) + ListItem ( 105 ) + ListItem ( 106 ) + ListItem ( 107 ) + ListItem ( 108 ) + ListItem ( 109 ) + ListItem ( 110 ) + ListItem ( 111 ) + ListItem ( 112 ) + ListItem ( 113 ) + ListItem ( 114 ) + ListItem ( 115 ) + ListItem ( 116 ) + ListItem ( 117 ) + ListItem ( 118 ) + ListItem ( 119 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 66 , 8 , false ) ) - ListItem ( Integer ( 189 , 8 , false ) ) - ListItem ( Integer ( 242 , 8 , false ) ) - ListItem ( Integer ( 33 , 8 , false ) ) - ListItem ( Integer ( 6 , 8 , false ) ) - ListItem ( Integer ( 240 , 8 , false ) ) - ListItem ( Integer ( 132 , 8 , false ) ) - ListItem ( Integer ( 119 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 12 ) , 0 , dynamicSize ( 12 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 71 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 72 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 66 , 64 , false ) , ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 66 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 189 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 242 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 33 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 6 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 240 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 132 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 119 , 8 , false ) ) ) ) ) ) ) - ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 2 , 64 , false ) ) - ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 66 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 66 , 8 , false ) , ty ( 23 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 66 , 64 , false ) , ty ( 6 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 6 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 40 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 44 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 41 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 66 , 8 , false ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) + ListItem ( 35 ) + ListItem ( 36 ) + ListItem ( 37 ) + ListItem ( 38 ) + ListItem ( 39 ) + ListItem ( 40 ) + ListItem ( 41 ) + ListItem ( 42 ) + ListItem ( 43 ) + ListItem ( 44 ) + ListItem ( 45 ) + ListItem ( 46 ) + ListItem ( 47 ) + ListItem ( 48 ) + ListItem ( 49 ) + ListItem ( 50 ) + ListItem ( 51 ) + ListItem ( 52 ) + ListItem ( 53 ) + ListItem ( 54 ) + ListItem ( 55 ) + ListItem ( 56 ) + ListItem ( 57 ) + ListItem ( 58 ) + ListItem ( 59 ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) ) ) + + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 66 , 8 , false ) ) ListItem ( Integer ( 189 , 8 , false ) ) ListItem ( Integer ( 242 , 8 , false ) ) ListItem ( Integer ( 33 , 8 , false ) ) ListItem ( Integer ( 6 , 8 , false ) ) ListItem ( Integer ( 240 , 8 , false ) ) ListItem ( Integer ( 132 , 8 , false ) ) - ListItem ( Integer ( 119 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 12 ) , 0 , dynamicSize ( 12 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( -101562192 , 32 , true ) ) + ListItem ( Integer ( 119 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 12 ) , 0 , dynamicSize ( 12 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( -101562192 , 32 , true ) ) ListItem ( Integer ( -1500591035 , 32 , true ) ) ListItem ( Integer ( 579222143 , 32 , true ) ) ListItem ( Integer ( 99562544 , 32 , true ) ) @@ -173,6 +163,108 @@ ListItem ( Integer ( 1626988600 , 32 , true ) ) ListItem ( Integer ( 1808605022 , 32 , true ) ) ListItem ( Integer ( 1870830728 , 32 , true ) ) - ListItem ( Integer ( 1627219933 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) - + ListItem ( Integer ( 1627219933 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + 5 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 6 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) + 7 |-> typedValue ( Range ( ListItem ( Integer ( 66 , 8 , false ) ) + ListItem ( Integer ( 189 , 8 , false ) ) + ListItem ( Integer ( 242 , 8 , false ) ) + ListItem ( Integer ( 33 , 8 , false ) ) + ListItem ( Integer ( 6 , 8 , false ) ) + ListItem ( Integer ( 240 , 8 , false ) ) + ListItem ( Integer ( 132 , 8 , false ) ) + ListItem ( Integer ( 119 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 8 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 12 ) , 0 , dynamicSize ( 12 ) ) ) , ty ( 32 ) , mutabilityNot ) + 9 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 11 |-> newLocal ( ty ( 28 ) , mutabilityNot ) + 12 |-> newLocal ( ty ( 28 ) , mutabilityNot ) + 13 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 14 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 16 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 23 ) , mutabilityNot ) + 23 |-> newLocal ( ty ( 23 ) , mutabilityNot ) + 24 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 25 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 26 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 27 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 28 |-> newLocal ( ty ( 71 ) , mutabilityMut ) + 29 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 30 |-> newLocal ( ty ( 23 ) , mutabilityMut ) + 31 |-> newLocal ( ty ( 72 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 33 |-> typedValue ( Integer ( 66 , 64 , false ) , ty ( 6 ) , mutabilityMut ) + 34 |-> typedValue ( Moved , ty ( 24 ) , mutabilityMut ) + 35 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 66 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 189 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 242 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 33 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 6 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 240 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 132 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 119 , 8 , false ) ) ) ) ) ) ) + ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 2 , 64 , false ) ) + ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) + 36 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 66 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) + 37 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) + 38 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 39 |-> typedValue ( Integer ( 66 , 8 , false ) , ty ( 23 ) , mutabilityNot ) + 40 |-> typedValue ( Integer ( 66 , 64 , false ) , ty ( 6 ) , mutabilityNot ) + 41 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) + 42 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 43 |-> typedValue ( Moved , ty ( 6 ) , mutabilityMut ) + 44 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 45 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 46 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 47 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 48 |-> newLocal ( ty ( 40 ) , mutabilityMut ) + 49 |-> newLocal ( ty ( 44 ) , mutabilityMut ) + 50 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 51 |-> newLocal ( ty ( 41 ) , mutabilityNot ) + 52 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 53 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 54 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 55 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 56 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 57 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 58 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 59 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 93 |-> newLocal ( ty ( 55 ) , mutabilityMut ) + 94 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) + 95 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) + 96 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) + 97 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 98 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 99 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 100 |-> typedValue ( Reference ( slotPlace ( 96 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) + 101 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 102 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 103 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 104 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 105 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 106 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 107 |-> typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) + 108 |-> newLocal ( ty ( 23 ) , mutabilityMut ) + 109 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) + 110 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 111 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) + 112 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 113 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 114 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 115 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 116 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 117 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) + 118 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 119 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + + + 120 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-4.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-4.expected index 2b6e8720c..0967a75f9 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-4.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-4.expected @@ -1,6 +1,6 @@ - #traverseProjection ( toStack ( 1 , local ( 30 ) ) , Integer ( 155 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 155 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 155 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 155 , 8 , false ) ) ) ) ) + #traverseProjection ( toSlot ( 35 ) , Integer ( 155 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 155 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 155 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 155 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 52 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 202 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 245 , 8 , false ) ) ) ) ) @@ -49,120 +49,110 @@ unwindActionCleanup ( basicBlockIdx ( 35 ) ) - ListItem ( newLocal ( ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 3 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) + ListItem ( 93 ) + ListItem ( 94 ) + ListItem ( 95 ) + ListItem ( 96 ) + ListItem ( 97 ) + ListItem ( 98 ) + ListItem ( 99 ) + ListItem ( 100 ) + ListItem ( 101 ) + ListItem ( 102 ) + ListItem ( 103 ) + ListItem ( 104 ) + ListItem ( 105 ) + ListItem ( 106 ) + ListItem ( 107 ) + ListItem ( 108 ) + ListItem ( 109 ) + ListItem ( 110 ) + ListItem ( 111 ) + ListItem ( 112 ) + ListItem ( 113 ) + ListItem ( 114 ) + ListItem ( 115 ) + ListItem ( 116 ) + ListItem ( 117 ) + ListItem ( 118 ) + ListItem ( 119 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 155 , 8 , false ) ) - ListItem ( Integer ( 52 , 8 , false ) ) - ListItem ( Integer ( 202 , 8 , false ) ) - ListItem ( Integer ( 245 , 8 , false ) ) - ListItem ( Integer ( 79 , 8 , false ) ) - ListItem ( Integer ( 46 , 8 , false ) ) - ListItem ( Integer ( 34 , 8 , false ) ) - ListItem ( Integer ( 10 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 25 ) , 0 , dynamicSize ( 25 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 71 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 72 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 155 , 64 , false ) , ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 155 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 52 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 202 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 245 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 79 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 46 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 34 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 10 , 8 , false ) ) ) ) ) ) ) - ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 2 , 64 , false ) ) - ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 155 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 155 , 8 , false ) , ty ( 23 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 155 , 64 , false ) , ty ( 6 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 6 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 40 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 44 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 41 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 155 , 8 , false ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) + ListItem ( 35 ) + ListItem ( 36 ) + ListItem ( 37 ) + ListItem ( 38 ) + ListItem ( 39 ) + ListItem ( 40 ) + ListItem ( 41 ) + ListItem ( 42 ) + ListItem ( 43 ) + ListItem ( 44 ) + ListItem ( 45 ) + ListItem ( 46 ) + ListItem ( 47 ) + ListItem ( 48 ) + ListItem ( 49 ) + ListItem ( 50 ) + ListItem ( 51 ) + ListItem ( 52 ) + ListItem ( 53 ) + ListItem ( 54 ) + ListItem ( 55 ) + ListItem ( 56 ) + ListItem ( 57 ) + ListItem ( 58 ) + ListItem ( 59 ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) ) ) + + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 155 , 8 , false ) ) ListItem ( Integer ( 52 , 8 , false ) ) ListItem ( Integer ( 202 , 8 , false ) ) ListItem ( Integer ( 245 , 8 , false ) ) ListItem ( Integer ( 79 , 8 , false ) ) ListItem ( Integer ( 46 , 8 , false ) ) ListItem ( Integer ( 34 , 8 , false ) ) - ListItem ( Integer ( 10 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 25 ) , 0 , dynamicSize ( 25 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( -1894737466 , 32 , true ) ) + ListItem ( Integer ( 10 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 25 ) , 0 , dynamicSize ( 25 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( -1894737466 , 32 , true ) ) ListItem ( Integer ( -600243533 , 32 , true ) ) ListItem ( Integer ( 1201498003 , 32 , true ) ) ListItem ( Integer ( 1403903179 , 32 , true ) ) @@ -186,6 +176,108 @@ ListItem ( Integer ( 746374308 , 32 , true ) ) ListItem ( Integer ( -1862132578 , 32 , true ) ) ListItem ( Integer ( 1776105656 , 32 , true ) ) - ListItem ( Integer ( -252750415 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) - + ListItem ( Integer ( -252750415 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + 5 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 6 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) + 7 |-> typedValue ( Range ( ListItem ( Integer ( 155 , 8 , false ) ) + ListItem ( Integer ( 52 , 8 , false ) ) + ListItem ( Integer ( 202 , 8 , false ) ) + ListItem ( Integer ( 245 , 8 , false ) ) + ListItem ( Integer ( 79 , 8 , false ) ) + ListItem ( Integer ( 46 , 8 , false ) ) + ListItem ( Integer ( 34 , 8 , false ) ) + ListItem ( Integer ( 10 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 8 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 25 ) , 0 , dynamicSize ( 25 ) ) ) , ty ( 32 ) , mutabilityNot ) + 9 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 11 |-> newLocal ( ty ( 28 ) , mutabilityNot ) + 12 |-> newLocal ( ty ( 28 ) , mutabilityNot ) + 13 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 14 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 16 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 23 ) , mutabilityNot ) + 23 |-> newLocal ( ty ( 23 ) , mutabilityNot ) + 24 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 25 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 26 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 27 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 28 |-> newLocal ( ty ( 71 ) , mutabilityMut ) + 29 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 30 |-> newLocal ( ty ( 23 ) , mutabilityMut ) + 31 |-> newLocal ( ty ( 72 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 33 |-> typedValue ( Integer ( 155 , 64 , false ) , ty ( 6 ) , mutabilityMut ) + 34 |-> typedValue ( Moved , ty ( 24 ) , mutabilityMut ) + 35 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 155 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 52 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 202 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 245 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 79 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 46 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 34 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 10 , 8 , false ) ) ) ) ) ) ) + ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 2 , 64 , false ) ) + ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) + 36 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 155 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) + 37 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) + 38 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 39 |-> typedValue ( Integer ( 155 , 8 , false ) , ty ( 23 ) , mutabilityNot ) + 40 |-> typedValue ( Integer ( 155 , 64 , false ) , ty ( 6 ) , mutabilityNot ) + 41 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) + 42 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 43 |-> typedValue ( Moved , ty ( 6 ) , mutabilityMut ) + 44 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 45 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 46 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 47 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 48 |-> newLocal ( ty ( 40 ) , mutabilityMut ) + 49 |-> newLocal ( ty ( 44 ) , mutabilityMut ) + 50 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 51 |-> newLocal ( ty ( 41 ) , mutabilityNot ) + 52 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 53 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 54 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 55 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 56 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 57 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 58 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 59 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 93 |-> newLocal ( ty ( 55 ) , mutabilityMut ) + 94 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) + 95 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) + 96 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) + 97 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 98 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 99 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 100 |-> typedValue ( Reference ( slotPlace ( 96 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) + 101 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 102 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 103 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 104 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 105 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 106 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 107 |-> typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) + 108 |-> newLocal ( ty ( 23 ) , mutabilityMut ) + 109 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) + 110 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 111 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) + 112 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 113 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 114 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 115 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 116 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 117 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) + 118 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 119 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + + + 120 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-5.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-5.expected index 73d82794e..6ddf3bedb 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-5.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-5.expected @@ -1,6 +1,6 @@ - #traverseProjection ( toStack ( 1 , local ( 30 ) ) , Integer ( 238 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 238 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 238 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 238 , 8 , false ) ) ) ) ) + #traverseProjection ( toSlot ( 35 ) , Integer ( 238 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 238 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 238 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 238 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 127 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 26 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 80 , 8 , false ) ) ) ) ) @@ -49,124 +49,111 @@ unwindActionCleanup ( basicBlockIdx ( 35 ) ) - ListItem ( newLocal ( ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 3 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) + ListItem ( 99 ) + ListItem ( 100 ) + ListItem ( 101 ) + ListItem ( 102 ) + ListItem ( 103 ) + ListItem ( 104 ) + ListItem ( 105 ) + ListItem ( 106 ) + ListItem ( 107 ) + ListItem ( 108 ) + ListItem ( 109 ) + ListItem ( 110 ) + ListItem ( 111 ) + ListItem ( 112 ) + ListItem ( 113 ) + ListItem ( 114 ) + ListItem ( 115 ) + ListItem ( 116 ) + ListItem ( 117 ) + ListItem ( 118 ) + ListItem ( 119 ) + ListItem ( 120 ) + ListItem ( 121 ) + ListItem ( 122 ) + ListItem ( 123 ) + ListItem ( 124 ) + ListItem ( 125 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 130 , 8 , false ) ) - ListItem ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 14 , 8 , false ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 238 , 8 , false ) ) - ListItem ( Integer ( 127 , 8 , false ) ) - ListItem ( Integer ( 26 , 8 , false ) ) - ListItem ( Integer ( 80 , 8 , false ) ) - ListItem ( Integer ( 57 , 8 , false ) ) - ListItem ( Integer ( 190 , 8 , false ) ) - ListItem ( Integer ( 240 , 8 , false ) ) - ListItem ( Integer ( 126 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 24 ) , 0 , dynamicSize ( 24 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 130 , 8 , false ) , ty ( 23 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 14 , 8 , false ) , ty ( 23 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 36 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 130 , 16 , false ) , ty ( 36 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 14 , 16 , false ) , ty ( 36 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 71 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 36 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 23 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 72 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 238 , 64 , false ) , ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 238 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 127 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 26 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 80 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 57 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 190 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 240 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 126 , 8 , false ) ) ) ) ) ) ) - ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 2 , 64 , false ) ) - ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 238 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 238 , 8 , false ) , ty ( 23 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 238 , 64 , false ) , ty ( 6 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 6 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 40 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 44 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 41 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 130 , 8 , false ) ) - ListItem ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 14 , 8 , false ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 238 , 8 , false ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) + ListItem ( 35 ) + ListItem ( 36 ) + ListItem ( 37 ) + ListItem ( 38 ) + ListItem ( 39 ) + ListItem ( 40 ) + ListItem ( 41 ) + ListItem ( 42 ) + ListItem ( 43 ) + ListItem ( 44 ) + ListItem ( 45 ) + ListItem ( 46 ) + ListItem ( 47 ) + ListItem ( 48 ) + ListItem ( 49 ) + ListItem ( 50 ) + ListItem ( 51 ) + ListItem ( 52 ) + ListItem ( 53 ) + ListItem ( 54 ) + ListItem ( 55 ) + ListItem ( 56 ) + ListItem ( 57 ) + ListItem ( 58 ) + ListItem ( 59 ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) ) ) + + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 130 , 8 , false ) ) + ListItem ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 14 , 8 , false ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 238 , 8 , false ) ) ListItem ( Integer ( 127 , 8 , false ) ) ListItem ( Integer ( 26 , 8 , false ) ) ListItem ( Integer ( 80 , 8 , false ) ) ListItem ( Integer ( 57 , 8 , false ) ) ListItem ( Integer ( 190 , 8 , false ) ) ListItem ( Integer ( 240 , 8 , false ) ) - ListItem ( Integer ( 126 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 24 ) , 0 , dynamicSize ( 24 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 187951464 , 32 , true ) ) + ListItem ( Integer ( 126 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 24 ) , 0 , dynamicSize ( 24 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( 187951464 , 32 , true ) ) ListItem ( Integer ( 317574981 , 32 , true ) ) ListItem ( Integer ( -1216636254 , 32 , true ) ) ListItem ( Integer ( -947116003 , 32 , true ) ) @@ -189,6 +176,111 @@ ListItem ( Integer ( -696227655 , 32 , true ) ) ListItem ( Integer ( -816224473 , 32 , true ) ) ListItem ( Integer ( 1368024730 , 32 , true ) ) - ListItem ( Integer ( -791162561 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) - + ListItem ( Integer ( -791162561 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + 5 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 6 |-> typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 130 , 8 , false ) ) + ListItem ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 14 , 8 , false ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) + 7 |-> typedValue ( Range ( ListItem ( Integer ( 238 , 8 , false ) ) + ListItem ( Integer ( 127 , 8 , false ) ) + ListItem ( Integer ( 26 , 8 , false ) ) + ListItem ( Integer ( 80 , 8 , false ) ) + ListItem ( Integer ( 57 , 8 , false ) ) + ListItem ( Integer ( 190 , 8 , false ) ) + ListItem ( Integer ( 240 , 8 , false ) ) + ListItem ( Integer ( 126 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 8 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 24 ) , 0 , dynamicSize ( 24 ) ) ) , ty ( 32 ) , mutabilityNot ) + 9 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 11 |-> newLocal ( ty ( 28 ) , mutabilityNot ) + 12 |-> newLocal ( ty ( 28 ) , mutabilityNot ) + 13 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 14 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 16 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 22 |-> typedValue ( Integer ( 130 , 8 , false ) , ty ( 23 ) , mutabilityNot ) + 23 |-> typedValue ( Integer ( 14 , 8 , false ) , ty ( 23 ) , mutabilityNot ) + 24 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 25 |-> typedValue ( Moved , ty ( 36 ) , mutabilityMut ) + 26 |-> typedValue ( Integer ( 130 , 16 , false ) , ty ( 36 ) , mutabilityMut ) + 27 |-> typedValue ( Integer ( 14 , 16 , false ) , ty ( 36 ) , mutabilityMut ) + 28 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 71 ) , mutabilityMut ) + 29 |-> typedValue ( Moved , ty ( 36 ) , mutabilityMut ) + 30 |-> typedValue ( Moved , ty ( 23 ) , mutabilityMut ) + 31 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 72 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 33 |-> typedValue ( Integer ( 238 , 64 , false ) , ty ( 6 ) , mutabilityMut ) + 34 |-> typedValue ( Moved , ty ( 24 ) , mutabilityMut ) + 35 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 238 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 127 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 26 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 80 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 57 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 190 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 240 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 126 , 8 , false ) ) ) ) ) ) ) + ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 2 , 64 , false ) ) + ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) + 36 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 238 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) + 37 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) + 38 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 39 |-> typedValue ( Integer ( 238 , 8 , false ) , ty ( 23 ) , mutabilityNot ) + 40 |-> typedValue ( Integer ( 238 , 64 , false ) , ty ( 6 ) , mutabilityNot ) + 41 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) + 42 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 43 |-> typedValue ( Moved , ty ( 6 ) , mutabilityMut ) + 44 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 45 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 46 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 47 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 48 |-> newLocal ( ty ( 40 ) , mutabilityMut ) + 49 |-> newLocal ( ty ( 44 ) , mutabilityMut ) + 50 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 51 |-> newLocal ( ty ( 41 ) , mutabilityNot ) + 52 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 53 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 54 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 55 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 56 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 57 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 58 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 59 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 99 |-> newLocal ( ty ( 55 ) , mutabilityMut ) + 100 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) + 101 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) + 102 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) + 103 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 104 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 105 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 106 |-> typedValue ( Reference ( slotPlace ( 102 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) + 107 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 108 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 109 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 110 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 111 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 112 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 113 |-> typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) + 114 |-> newLocal ( ty ( 23 ) , mutabilityMut ) + 115 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) + 116 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 117 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) + 118 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 119 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 120 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 121 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 122 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 123 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) + 124 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 125 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + + + 126 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-6.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-6.expected index 3a3a93c89..7a7ad9424 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-6.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-6.expected @@ -1,6 +1,6 @@ - #traverseProjection ( toStack ( 1 , local ( 30 ) ) , Integer ( 18 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 18 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 18 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 18 , 8 , false ) ) ) ) ) + #traverseProjection ( toSlot ( 35 ) , Integer ( 18 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 18 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 18 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 18 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 0 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 74 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 240 , 8 , false ) ) ) ) ) @@ -49,124 +49,111 @@ unwindActionCleanup ( basicBlockIdx ( 35 ) ) - ListItem ( newLocal ( ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 3 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) + ListItem ( 99 ) + ListItem ( 100 ) + ListItem ( 101 ) + ListItem ( 102 ) + ListItem ( 103 ) + ListItem ( 104 ) + ListItem ( 105 ) + ListItem ( 106 ) + ListItem ( 107 ) + ListItem ( 108 ) + ListItem ( 109 ) + ListItem ( 110 ) + ListItem ( 111 ) + ListItem ( 112 ) + ListItem ( 113 ) + ListItem ( 114 ) + ListItem ( 115 ) + ListItem ( 116 ) + ListItem ( 117 ) + ListItem ( 118 ) + ListItem ( 119 ) + ListItem ( 120 ) + ListItem ( 121 ) + ListItem ( 122 ) + ListItem ( 123 ) + ListItem ( 124 ) + ListItem ( 125 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 41 , 8 , false ) ) - ListItem ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 133 , 8 , false ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 18 , 8 , false ) ) - ListItem ( Integer ( 0 , 8 , false ) ) - ListItem ( Integer ( 74 , 8 , false ) ) - ListItem ( Integer ( 240 , 8 , false ) ) - ListItem ( Integer ( 191 , 8 , false ) ) - ListItem ( Integer ( 163 , 8 , false ) ) - ListItem ( Integer ( 11 , 8 , false ) ) - ListItem ( Integer ( 139 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 31 ) , 0 , dynamicSize ( 31 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 41 , 8 , false ) , ty ( 23 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 133 , 8 , false ) , ty ( 23 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 36 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 41 , 16 , false ) , ty ( 36 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 133 , 16 , false ) , ty ( 36 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 71 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 36 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 23 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 72 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 18 , 64 , false ) , ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 18 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 0 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 74 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 240 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 191 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 163 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 11 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 139 , 8 , false ) ) ) ) ) ) ) - ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 2 , 64 , false ) ) - ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 18 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 18 , 8 , false ) , ty ( 23 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 18 , 64 , false ) , ty ( 6 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 6 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 40 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 44 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 41 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 41 , 8 , false ) ) - ListItem ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 133 , 8 , false ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 18 , 8 , false ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) + ListItem ( 35 ) + ListItem ( 36 ) + ListItem ( 37 ) + ListItem ( 38 ) + ListItem ( 39 ) + ListItem ( 40 ) + ListItem ( 41 ) + ListItem ( 42 ) + ListItem ( 43 ) + ListItem ( 44 ) + ListItem ( 45 ) + ListItem ( 46 ) + ListItem ( 47 ) + ListItem ( 48 ) + ListItem ( 49 ) + ListItem ( 50 ) + ListItem ( 51 ) + ListItem ( 52 ) + ListItem ( 53 ) + ListItem ( 54 ) + ListItem ( 55 ) + ListItem ( 56 ) + ListItem ( 57 ) + ListItem ( 58 ) + ListItem ( 59 ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) ) ) + + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 41 , 8 , false ) ) + ListItem ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 133 , 8 , false ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 18 , 8 , false ) ) ListItem ( Integer ( 0 , 8 , false ) ) ListItem ( Integer ( 74 , 8 , false ) ) ListItem ( Integer ( 240 , 8 , false ) ) ListItem ( Integer ( 191 , 8 , false ) ) ListItem ( Integer ( 163 , 8 , false ) ) ListItem ( Integer ( 11 , 8 , false ) ) - ListItem ( Integer ( 139 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 31 ) , 0 , dynamicSize ( 31 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 1296717143 , 32 , true ) ) + ListItem ( Integer ( 139 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 31 ) , 0 , dynamicSize ( 31 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( 1296717143 , 32 , true ) ) ListItem ( Integer ( 781906281 , 32 , true ) ) ListItem ( Integer ( 797531995 , 32 , true ) ) ListItem ( Integer ( 1478681337 , 32 , true ) ) @@ -196,6 +183,111 @@ ListItem ( Integer ( 2058389020 , 32 , true ) ) ListItem ( Integer ( 1672943655 , 32 , true ) ) ListItem ( Integer ( 1422748784 , 32 , true ) ) - ListItem ( Integer ( 1271734833 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) - + ListItem ( Integer ( 1271734833 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + 5 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 6 |-> typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 41 , 8 , false ) ) + ListItem ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 133 , 8 , false ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) + 7 |-> typedValue ( Range ( ListItem ( Integer ( 18 , 8 , false ) ) + ListItem ( Integer ( 0 , 8 , false ) ) + ListItem ( Integer ( 74 , 8 , false ) ) + ListItem ( Integer ( 240 , 8 , false ) ) + ListItem ( Integer ( 191 , 8 , false ) ) + ListItem ( Integer ( 163 , 8 , false ) ) + ListItem ( Integer ( 11 , 8 , false ) ) + ListItem ( Integer ( 139 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 8 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 31 ) , 0 , dynamicSize ( 31 ) ) ) , ty ( 32 ) , mutabilityNot ) + 9 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 11 |-> newLocal ( ty ( 28 ) , mutabilityNot ) + 12 |-> newLocal ( ty ( 28 ) , mutabilityNot ) + 13 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 14 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 16 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 22 |-> typedValue ( Integer ( 41 , 8 , false ) , ty ( 23 ) , mutabilityNot ) + 23 |-> typedValue ( Integer ( 133 , 8 , false ) , ty ( 23 ) , mutabilityNot ) + 24 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 25 |-> typedValue ( Moved , ty ( 36 ) , mutabilityMut ) + 26 |-> typedValue ( Integer ( 41 , 16 , false ) , ty ( 36 ) , mutabilityMut ) + 27 |-> typedValue ( Integer ( 133 , 16 , false ) , ty ( 36 ) , mutabilityMut ) + 28 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 71 ) , mutabilityMut ) + 29 |-> typedValue ( Moved , ty ( 36 ) , mutabilityMut ) + 30 |-> typedValue ( Moved , ty ( 23 ) , mutabilityMut ) + 31 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 72 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 33 |-> typedValue ( Integer ( 18 , 64 , false ) , ty ( 6 ) , mutabilityMut ) + 34 |-> typedValue ( Moved , ty ( 24 ) , mutabilityMut ) + 35 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 18 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 0 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 74 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 240 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 191 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 163 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 11 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 139 , 8 , false ) ) ) ) ) ) ) + ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 2 , 64 , false ) ) + ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) + 36 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 18 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) + 37 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) + 38 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 39 |-> typedValue ( Integer ( 18 , 8 , false ) , ty ( 23 ) , mutabilityNot ) + 40 |-> typedValue ( Integer ( 18 , 64 , false ) , ty ( 6 ) , mutabilityNot ) + 41 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) + 42 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 43 |-> typedValue ( Moved , ty ( 6 ) , mutabilityMut ) + 44 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 45 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 46 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 47 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 48 |-> newLocal ( ty ( 40 ) , mutabilityMut ) + 49 |-> newLocal ( ty ( 44 ) , mutabilityMut ) + 50 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 51 |-> newLocal ( ty ( 41 ) , mutabilityNot ) + 52 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 53 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 54 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 55 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 56 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 57 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 58 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 59 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 99 |-> newLocal ( ty ( 55 ) , mutabilityMut ) + 100 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) + 101 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) + 102 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) + 103 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 104 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 105 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 106 |-> typedValue ( Reference ( slotPlace ( 102 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) + 107 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 108 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 109 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 110 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 111 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 112 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 113 |-> typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) + 114 |-> newLocal ( ty ( 23 ) , mutabilityMut ) + 115 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) + 116 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 117 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) + 118 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 119 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 120 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 121 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 122 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 123 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) + 124 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 125 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + + + 126 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-7.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-7.expected index 8bdd69426..15270026d 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-7.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-7.expected @@ -61,88 +61,153 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 1923567076 , 32 , true ) ) - ListItem ( Integer ( -1940095024 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 48 , 8 , false ) ) - ListItem ( Integer ( 187 , 8 , false ) ) - ListItem ( Integer ( 29 , 8 , false ) ) - ListItem ( Integer ( 109 , 8 , false ) ) - ListItem ( Integer ( 19 , 8 , false ) ) - ListItem ( Integer ( 44 , 8 , false ) ) - ListItem ( Integer ( 222 , 8 , false ) ) - ListItem ( Integer ( 214 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 4 ) , 0 , dynamicSize ( 4 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 1923567076 , 32 , true ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -1940095024 , 32 , true ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( -431305196 , 32 , true ) ) - ListItem ( Moved ) ) , ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 71 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 72 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 6 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 24 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 24 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 55 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 10 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 6 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 7 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 6 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 40 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 44 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 41 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) + ListItem ( 35 ) + ListItem ( 36 ) + ListItem ( 37 ) + ListItem ( 38 ) + ListItem ( 39 ) + ListItem ( 40 ) + ListItem ( 41 ) + ListItem ( 42 ) + ListItem ( 43 ) + ListItem ( 44 ) + ListItem ( 45 ) + ListItem ( 46 ) + ListItem ( 47 ) + ListItem ( 48 ) + ListItem ( 49 ) + ListItem ( 50 ) + ListItem ( 51 ) + ListItem ( 52 ) + ListItem ( 53 ) + ListItem ( 54 ) + ListItem ( 55 ) + ListItem ( 56 ) + ListItem ( 57 ) + ListItem ( 58 ) + ListItem ( 59 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 1923567076 , 32 , true ) ) - ListItem ( Integer ( -1940095024 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 48 , 8 , false ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) ) ) + + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 1923567076 , 32 , true ) ) + ListItem ( Integer ( -1940095024 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 48 , 8 , false ) ) ListItem ( Integer ( 187 , 8 , false ) ) ListItem ( Integer ( 29 , 8 , false ) ) ListItem ( Integer ( 109 , 8 , false ) ) ListItem ( Integer ( 19 , 8 , false ) ) ListItem ( Integer ( 44 , 8 , false ) ) ListItem ( Integer ( 222 , 8 , false ) ) - ListItem ( Integer ( 214 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 4 ) , 0 , dynamicSize ( 4 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( -1113843932 , 32 , true ) ) + ListItem ( Integer ( 214 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 4 ) , 0 , dynamicSize ( 4 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( -1113843932 , 32 , true ) ) ListItem ( Integer ( 219246286 , 32 , true ) ) ListItem ( Integer ( 281121487 , 32 , true ) ) - ListItem ( Integer ( 1921781853 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) - + ListItem ( Integer ( 1921781853 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + 5 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 6 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 1923567076 , 32 , true ) ) + ListItem ( Integer ( -1940095024 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) + 7 |-> typedValue ( Range ( ListItem ( Integer ( 48 , 8 , false ) ) + ListItem ( Integer ( 187 , 8 , false ) ) + ListItem ( Integer ( 29 , 8 , false ) ) + ListItem ( Integer ( 109 , 8 , false ) ) + ListItem ( Integer ( 19 , 8 , false ) ) + ListItem ( Integer ( 44 , 8 , false ) ) + ListItem ( Integer ( 222 , 8 , false ) ) + ListItem ( Integer ( 214 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 8 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 4 ) , 0 , dynamicSize ( 4 ) ) ) , ty ( 32 ) , mutabilityNot ) + 9 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 11 |-> typedValue ( Integer ( 1923567076 , 32 , true ) , ty ( 28 ) , mutabilityNot ) + 12 |-> typedValue ( Integer ( -1940095024 , 32 , true ) , ty ( 28 ) , mutabilityNot ) + 13 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 14 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 16 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( -431305196 , 32 , true ) ) + ListItem ( Moved ) ) , ty ( 70 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 23 ) , mutabilityNot ) + 23 |-> newLocal ( ty ( 23 ) , mutabilityNot ) + 24 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 25 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 26 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 27 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 28 |-> newLocal ( ty ( 71 ) , mutabilityMut ) + 29 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 30 |-> newLocal ( ty ( 23 ) , mutabilityMut ) + 31 |-> newLocal ( ty ( 72 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 33 |-> newLocal ( ty ( 6 ) , mutabilityMut ) + 34 |-> newLocal ( ty ( 24 ) , mutabilityMut ) + 35 |-> newLocal ( ty ( 24 ) , mutabilityMut ) + 36 |-> newLocal ( ty ( 55 ) , mutabilityMut ) + 37 |-> newLocal ( ty ( 10 ) , mutabilityMut ) + 38 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 39 |-> newLocal ( ty ( 23 ) , mutabilityNot ) + 40 |-> newLocal ( ty ( 6 ) , mutabilityNot ) + 41 |-> newLocal ( ty ( 7 ) , mutabilityMut ) + 42 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 43 |-> newLocal ( ty ( 6 ) , mutabilityMut ) + 44 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 45 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 46 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 47 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 48 |-> newLocal ( ty ( 40 ) , mutabilityMut ) + 49 |-> newLocal ( ty ( 44 ) , mutabilityMut ) + 50 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 51 |-> newLocal ( ty ( 41 ) , mutabilityNot ) + 52 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 53 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 54 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 55 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 56 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 57 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 58 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 59 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + + + 60 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-8.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-8.expected index 056a32057..dd2e19cc6 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-8.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-8.expected @@ -1,6 +1,6 @@ - #traverseProjection ( toStack ( 1 , local ( 30 ) ) , Integer ( 189 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 189 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 189 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 189 , 8 , false ) ) ) ) ) + #traverseProjection ( toSlot ( 35 ) , Integer ( 189 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 189 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 189 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 189 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 192 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 64 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 98 , 8 , false ) ) ) ) ) @@ -49,120 +49,110 @@ unwindActionCleanup ( basicBlockIdx ( 35 ) ) - ListItem ( newLocal ( ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 3 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) + ListItem ( 93 ) + ListItem ( 94 ) + ListItem ( 95 ) + ListItem ( 96 ) + ListItem ( 97 ) + ListItem ( 98 ) + ListItem ( 99 ) + ListItem ( 100 ) + ListItem ( 101 ) + ListItem ( 102 ) + ListItem ( 103 ) + ListItem ( 104 ) + ListItem ( 105 ) + ListItem ( 106 ) + ListItem ( 107 ) + ListItem ( 108 ) + ListItem ( 109 ) + ListItem ( 110 ) + ListItem ( 111 ) + ListItem ( 112 ) + ListItem ( 113 ) + ListItem ( 114 ) + ListItem ( 115 ) + ListItem ( 116 ) + ListItem ( 117 ) + ListItem ( 118 ) + ListItem ( 119 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 189 , 8 , false ) ) - ListItem ( Integer ( 192 , 8 , false ) ) - ListItem ( Integer ( 64 , 8 , false ) ) - ListItem ( Integer ( 98 , 8 , false ) ) - ListItem ( Integer ( 22 , 8 , false ) ) - ListItem ( Integer ( 43 , 8 , false ) ) - ListItem ( Integer ( 70 , 8 , false ) ) - ListItem ( Integer ( 126 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 32 ) , 0 , dynamicSize ( 32 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 71 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 72 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 189 , 64 , false ) , ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 189 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 192 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 64 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 98 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 22 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 43 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 70 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 126 , 8 , false ) ) ) ) ) ) ) - ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 2 , 64 , false ) ) - ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 189 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 189 , 8 , false ) , ty ( 23 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 189 , 64 , false ) , ty ( 6 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 6 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 40 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 44 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 41 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 189 , 8 , false ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) + ListItem ( 35 ) + ListItem ( 36 ) + ListItem ( 37 ) + ListItem ( 38 ) + ListItem ( 39 ) + ListItem ( 40 ) + ListItem ( 41 ) + ListItem ( 42 ) + ListItem ( 43 ) + ListItem ( 44 ) + ListItem ( 45 ) + ListItem ( 46 ) + ListItem ( 47 ) + ListItem ( 48 ) + ListItem ( 49 ) + ListItem ( 50 ) + ListItem ( 51 ) + ListItem ( 52 ) + ListItem ( 53 ) + ListItem ( 54 ) + ListItem ( 55 ) + ListItem ( 56 ) + ListItem ( 57 ) + ListItem ( 58 ) + ListItem ( 59 ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) ) ) + + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 189 , 8 , false ) ) ListItem ( Integer ( 192 , 8 , false ) ) ListItem ( Integer ( 64 , 8 , false ) ) ListItem ( Integer ( 98 , 8 , false ) ) ListItem ( Integer ( 22 , 8 , false ) ) ListItem ( Integer ( 43 , 8 , false ) ) ListItem ( Integer ( 70 , 8 , false ) ) - ListItem ( Integer ( 126 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 32 ) , 0 , dynamicSize ( 32 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( -1248127672 , 32 , true ) ) + ListItem ( Integer ( 126 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 32 ) , 0 , dynamicSize ( 32 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( -1248127672 , 32 , true ) ) ListItem ( Integer ( 609320300 , 32 , true ) ) ListItem ( Integer ( -175519158 , 32 , true ) ) ListItem ( Integer ( -201294668 , 32 , true ) ) @@ -193,6 +183,108 @@ ListItem ( Integer ( -673316532 , 32 , true ) ) ListItem ( Integer ( -1001404679 , 32 , true ) ) ListItem ( Integer ( -328986497 , 32 , true ) ) - ListItem ( Integer ( -528598575 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) - + ListItem ( Integer ( -528598575 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + 5 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 6 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) + 7 |-> typedValue ( Range ( ListItem ( Integer ( 189 , 8 , false ) ) + ListItem ( Integer ( 192 , 8 , false ) ) + ListItem ( Integer ( 64 , 8 , false ) ) + ListItem ( Integer ( 98 , 8 , false ) ) + ListItem ( Integer ( 22 , 8 , false ) ) + ListItem ( Integer ( 43 , 8 , false ) ) + ListItem ( Integer ( 70 , 8 , false ) ) + ListItem ( Integer ( 126 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 8 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 32 ) , 0 , dynamicSize ( 32 ) ) ) , ty ( 32 ) , mutabilityNot ) + 9 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 11 |-> newLocal ( ty ( 28 ) , mutabilityNot ) + 12 |-> newLocal ( ty ( 28 ) , mutabilityNot ) + 13 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 14 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 16 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 23 ) , mutabilityNot ) + 23 |-> newLocal ( ty ( 23 ) , mutabilityNot ) + 24 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 25 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 26 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 27 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 28 |-> newLocal ( ty ( 71 ) , mutabilityMut ) + 29 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 30 |-> newLocal ( ty ( 23 ) , mutabilityMut ) + 31 |-> newLocal ( ty ( 72 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 33 |-> typedValue ( Integer ( 189 , 64 , false ) , ty ( 6 ) , mutabilityMut ) + 34 |-> typedValue ( Moved , ty ( 24 ) , mutabilityMut ) + 35 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 189 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 192 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 64 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 98 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 22 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 43 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 70 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 126 , 8 , false ) ) ) ) ) ) ) + ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 2 , 64 , false ) ) + ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) + 36 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 189 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) + 37 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) + 38 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 39 |-> typedValue ( Integer ( 189 , 8 , false ) , ty ( 23 ) , mutabilityNot ) + 40 |-> typedValue ( Integer ( 189 , 64 , false ) , ty ( 6 ) , mutabilityNot ) + 41 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) + 42 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 43 |-> typedValue ( Moved , ty ( 6 ) , mutabilityMut ) + 44 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 45 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 46 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 47 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 48 |-> newLocal ( ty ( 40 ) , mutabilityMut ) + 49 |-> newLocal ( ty ( 44 ) , mutabilityMut ) + 50 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 51 |-> newLocal ( ty ( 41 ) , mutabilityNot ) + 52 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 53 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 54 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 55 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 56 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 57 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 58 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 59 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 93 |-> newLocal ( ty ( 55 ) , mutabilityMut ) + 94 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) + 95 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) + 96 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) + 97 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 98 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 99 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 100 |-> typedValue ( Reference ( slotPlace ( 96 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) + 101 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 102 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 103 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 104 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 105 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 106 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 107 |-> typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) + 108 |-> newLocal ( ty ( 23 ) , mutabilityMut ) + 109 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) + 110 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 111 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) + 112 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 113 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 114 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 115 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 116 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 117 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) + 118 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 119 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + + + 120 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-9.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-9.expected index 92a082106..62ad43c2d 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/final-9.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/final-9.expected @@ -1,6 +1,6 @@ - #traverseProjection ( toStack ( 1 , local ( 30 ) ) , Integer ( 95 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 95 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 95 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 95 , 8 , false ) ) ) ) ) + #traverseProjection ( toSlot ( 35 ) , Integer ( 95 , 8 , false ) , PointerOffset ( 1 , 8 ) .ProjectionElems , CtxField ( variantIdx ( 0 ) , ListItem ( Integer ( 95 , 8 , false ) ) , 0 , ty ( 23 ) ) CtxFieldUnion ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 95 , 8 , false ) ) ) , ty ( 74 ) ) CtxIndex ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 95 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 3 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 173 , 8 , false ) ) ) ) ) ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 237 , 8 , false ) ) ) ) ) @@ -49,123 +49,111 @@ unwindActionCleanup ( basicBlockIdx ( 35 ) ) - ListItem ( newLocal ( ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 3 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 3 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( PtrLocal ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 30 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) ) + ListItem ( 93 ) + ListItem ( 94 ) + ListItem ( 95 ) + ListItem ( 96 ) + ListItem ( 97 ) + ListItem ( 98 ) + ListItem ( 99 ) + ListItem ( 100 ) + ListItem ( 101 ) + ListItem ( 102 ) + ListItem ( 103 ) + ListItem ( 104 ) + ListItem ( 105 ) + ListItem ( 106 ) + ListItem ( 107 ) + ListItem ( 108 ) + ListItem ( 109 ) + ListItem ( 110 ) + ListItem ( 111 ) + ListItem ( 112 ) + ListItem ( 113 ) + ListItem ( 114 ) + ListItem ( 115 ) + ListItem ( 116 ) + ListItem ( 117 ) + ListItem ( 118 ) + ListItem ( 119 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 486255726 , 32 , true ) ) - ListItem ( Integer ( -1000150020 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 95 , 8 , false ) ) - ListItem ( Integer ( 3 , 8 , false ) ) - ListItem ( Integer ( 173 , 8 , false ) ) - ListItem ( Integer ( 237 , 8 , false ) ) - ListItem ( Integer ( 41 , 8 , false ) ) - ListItem ( Integer ( 171 , 8 , false ) ) - ListItem ( Integer ( 20 , 8 , false ) ) - ListItem ( Integer ( 194 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 1 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 10 ) , 0 , dynamicSize ( 10 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 486255726 , 32 , true ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -1000150020 , 32 , true ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 70 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 71 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 36 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 23 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 72 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 95 , 64 , false ) , ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 95 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 3 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 173 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 237 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 41 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 171 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 20 , 8 , false ) ) ) ) ) - ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 194 , 8 , false ) ) ) ) ) ) ) - ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 2 , 64 , false ) ) - ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 95 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 30 ) , projection: .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 69 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 95 , 8 , false ) , ty ( 23 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 95 , 64 , false ) , ty ( 6 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 4 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 6 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 31 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 40 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 44 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 69 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 41 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 4 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 5 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 486255726 , 32 , true ) ) - ListItem ( Integer ( -1000150020 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 95 , 8 , false ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) + ListItem ( 35 ) + ListItem ( 36 ) + ListItem ( 37 ) + ListItem ( 38 ) + ListItem ( 39 ) + ListItem ( 40 ) + ListItem ( 41 ) + ListItem ( 42 ) + ListItem ( 43 ) + ListItem ( 44 ) + ListItem ( 45 ) + ListItem ( 46 ) + ListItem ( 47 ) + ListItem ( 48 ) + ListItem ( 49 ) + ListItem ( 50 ) + ListItem ( 51 ) + ListItem ( 52 ) + ListItem ( 53 ) + ListItem ( 54 ) + ListItem ( 55 ) + ListItem ( 56 ) + ListItem ( 57 ) + ListItem ( 58 ) + ListItem ( 59 ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) ) ) + + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 486255726 , 32 , true ) ) + ListItem ( Integer ( -1000150020 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 95 , 8 , false ) ) ListItem ( Integer ( 3 , 8 , false ) ) ListItem ( Integer ( 173 , 8 , false ) ) ListItem ( Integer ( 237 , 8 , false ) ) ListItem ( Integer ( 41 , 8 , false ) ) ListItem ( Integer ( 171 , 8 , false ) ) ListItem ( Integer ( 20 , 8 , false ) ) - ListItem ( Integer ( 194 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 10 ) , 0 , dynamicSize ( 10 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 966648405 , 32 , true ) ) + ListItem ( Integer ( 194 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 10 ) , 0 , dynamicSize ( 10 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( 966648405 , 32 , true ) ) ListItem ( Integer ( -1472498778 , 32 , true ) ) ListItem ( Integer ( -1125229012 , 32 , true ) ) ListItem ( Integer ( -1670967639 , 32 , true ) ) @@ -174,6 +162,110 @@ ListItem ( Integer ( 748337932 , 32 , true ) ) ListItem ( Integer ( -1246012399 , 32 , true ) ) ListItem ( Integer ( -939805772 , 32 , true ) ) - ListItem ( Integer ( 1329338341 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) ) ) - + ListItem ( Integer ( 1329338341 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + 5 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 6 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 486255726 , 32 , true ) ) + ListItem ( Integer ( -1000150020 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) + 7 |-> typedValue ( Range ( ListItem ( Integer ( 95 , 8 , false ) ) + ListItem ( Integer ( 3 , 8 , false ) ) + ListItem ( Integer ( 173 , 8 , false ) ) + ListItem ( Integer ( 237 , 8 , false ) ) + ListItem ( Integer ( 41 , 8 , false ) ) + ListItem ( Integer ( 171 , 8 , false ) ) + ListItem ( Integer ( 20 , 8 , false ) ) + ListItem ( Integer ( 194 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 8 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 10 ) , 0 , dynamicSize ( 10 ) ) ) , ty ( 32 ) , mutabilityNot ) + 9 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 10 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 11 |-> typedValue ( Integer ( 486255726 , 32 , true ) , ty ( 28 ) , mutabilityNot ) + 12 |-> typedValue ( Integer ( -1000150020 , 32 , true ) , ty ( 28 ) , mutabilityNot ) + 13 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 14 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 15 |-> typedValue ( Moved , ty ( 28 ) , mutabilityMut ) + 16 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 70 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 70 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 23 ) , mutabilityNot ) + 23 |-> newLocal ( ty ( 23 ) , mutabilityNot ) + 24 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 25 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 26 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 27 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 28 |-> newLocal ( ty ( 71 ) , mutabilityMut ) + 29 |-> newLocal ( ty ( 36 ) , mutabilityMut ) + 30 |-> newLocal ( ty ( 23 ) , mutabilityMut ) + 31 |-> newLocal ( ty ( 72 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 33 |-> typedValue ( Integer ( 95 , 64 , false ) , ty ( 6 ) , mutabilityMut ) + 34 |-> typedValue ( Moved , ty ( 24 ) , mutabilityMut ) + 35 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Range ( ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 95 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 3 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 173 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 237 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 41 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 171 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 20 , 8 , false ) ) ) ) ) + ListItem ( Union ( fieldIdx ( 1 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 194 , 8 , false ) ) ) ) ) ) ) + ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 2 , 64 , false ) ) + ListItem ( Integer ( 8 , 64 , false ) ) ) ) ) , ty ( 24 ) , mutabilityMut ) + 36 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 95 , 8 , false ) ) ) , ty ( 55 ) , mutabilityMut ) + 37 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityMut ) + 38 |-> typedValue ( Moved , ty ( 69 ) , mutabilityMut ) + 39 |-> typedValue ( Integer ( 95 , 8 , false ) , ty ( 23 ) , mutabilityNot ) + 40 |-> typedValue ( Integer ( 95 , 64 , false ) , ty ( 6 ) , mutabilityNot ) + 41 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 7 ) , mutabilityMut ) + 42 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 43 |-> typedValue ( Moved , ty ( 6 ) , mutabilityMut ) + 44 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 45 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 46 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 47 |-> newLocal ( ty ( 31 ) , mutabilityMut ) + 48 |-> newLocal ( ty ( 40 ) , mutabilityMut ) + 49 |-> newLocal ( ty ( 44 ) , mutabilityMut ) + 50 |-> newLocal ( ty ( 69 ) , mutabilityMut ) + 51 |-> newLocal ( ty ( 41 ) , mutabilityNot ) + 52 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 53 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 54 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 55 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 56 |-> newLocal ( ty ( 4 ) , mutabilityMut ) + 57 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 58 |-> newLocal ( ty ( 28 ) , mutabilityMut ) + 59 |-> newLocal ( ty ( 5 ) , mutabilityMut ) + 93 |-> newLocal ( ty ( 55 ) , mutabilityMut ) + 94 |-> typedValue ( Reference ( slotPlace ( 35 , .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 10 ) , mutabilityNot ) + 95 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Moved ) ) , ty ( 48 ) , mutabilityMut ) + 96 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 1 ) , ty ( 13 ) ) .ProjectionElems ) , mutabilityMut , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 56 ) , mutabilityMut ) + 97 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 98 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 99 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 100 |-> typedValue ( Reference ( slotPlace ( 96 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 58 ) , mutabilityMut ) + 101 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 102 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 103 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 104 |-> typedValue ( Moved , ty ( 3 ) , mutabilityMut ) + 105 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 106 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 107 |-> typedValue ( Integer ( 1 , 64 , false ) , ty ( 3 ) , mutabilityNot ) + 108 |-> newLocal ( ty ( 23 ) , mutabilityMut ) + 109 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 50 ) , mutabilityMut ) + 110 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 111 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 15 ) , mutabilityMut ) + 112 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 113 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 114 |-> typedValue ( Moved , ty ( 4 ) , mutabilityMut ) + 115 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , dynamicSize ( 8 ) ) ) , ty ( 53 ) , mutabilityNot ) + 116 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 117 |-> typedValue ( PtrLocal ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) projectionElemConstantIndex (... offset: 0 , minLength: 0 , fromEnd: false ) projectionElemField ( fieldIdx ( 1 ) , ty ( 74 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 1 , dynamicSize ( 8 ) ) ) , ty ( 54 ) , mutabilityMut ) + 118 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + 119 |-> typedValue ( Reference ( slotPlace ( 35 , projectionElemField ( fieldIdx ( 0 ) , ty ( 11 ) ) .ProjectionElems ) , mutabilityNot , metadata ( staticSize ( 8 ) , 0 , noMetadataSize ) ) , ty ( 57 ) , mutabilityMut ) + + + 120 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-0.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-0.expected index 7e6b4e60a..bdfb3a53e 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-0.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-0.expected @@ -25,27 +25,37 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( -341142443 , 32 , true ) ) - ListItem ( Integer ( 48424546 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 207 , 8 , false ) ) - ListItem ( Integer ( 155 , 8 , false ) ) - ListItem ( Integer ( 244 , 8 , false ) ) - ListItem ( Integer ( 183 , 8 , false ) ) - ListItem ( Integer ( 111 , 8 , false ) ) - ListItem ( Integer ( 71 , 8 , false ) ) - ListItem ( Integer ( 144 , 8 , false ) ) - ListItem ( Integer ( 71 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 6 ) , 0 , dynamicSize ( 6 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 1727289611 , 32 , true ) ) - ListItem ( Integer ( -815409959 , 32 , true ) ) - ListItem ( Integer ( 987119867 , 32 , true ) ) - ListItem ( Integer ( 790204970 , 32 , true ) ) - ListItem ( Integer ( -1714975244 , 32 , true ) ) - ListItem ( Integer ( -282729822 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( -341142443 , 32 , true ) ) + ListItem ( Integer ( 48424546 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 207 , 8 , false ) ) + ListItem ( Integer ( 155 , 8 , false ) ) + ListItem ( Integer ( 244 , 8 , false ) ) + ListItem ( Integer ( 183 , 8 , false ) ) + ListItem ( Integer ( 111 , 8 , false ) ) + ListItem ( Integer ( 71 , 8 , false ) ) + ListItem ( Integer ( 144 , 8 , false ) ) + ListItem ( Integer ( 71 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 6 ) , 0 , dynamicSize ( 6 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( 1727289611 , 32 , true ) ) + ListItem ( Integer ( -815409959 , 32 , true ) ) + ListItem ( Integer ( 987119867 , 32 , true ) ) + ListItem ( Integer ( 790204970 , 32 , true ) ) + ListItem ( Integer ( -1714975244 , 32 , true ) ) + ListItem ( Integer ( -282729822 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + + + 5 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-1.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-1.expected index 8d4f34f7d..b7446a184 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-1.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-1.expected @@ -25,26 +25,36 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 32 , 8 , false ) ) - ListItem ( Integer ( 130 , 8 , false ) ) - ListItem ( Integer ( 60 , 8 , false ) ) - ListItem ( Integer ( 253 , 8 , false ) ) - ListItem ( Integer ( 230 , 8 , false ) ) - ListItem ( Integer ( 241 , 8 , false ) ) - ListItem ( Integer ( 194 , 8 , false ) ) - ListItem ( Integer ( 107 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 6 ) , 0 , dynamicSize ( 6 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( -52155262 , 32 , true ) ) - ListItem ( Integer ( -473267571 , 32 , true ) ) - ListItem ( Integer ( 1147433305 , 32 , true ) ) - ListItem ( Integer ( 841095768 , 32 , true ) ) - ListItem ( Integer ( 1296334389 , 32 , true ) ) - ListItem ( Integer ( -784133741 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 32 , 8 , false ) ) + ListItem ( Integer ( 130 , 8 , false ) ) + ListItem ( Integer ( 60 , 8 , false ) ) + ListItem ( Integer ( 253 , 8 , false ) ) + ListItem ( Integer ( 230 , 8 , false ) ) + ListItem ( Integer ( 241 , 8 , false ) ) + ListItem ( Integer ( 194 , 8 , false ) ) + ListItem ( Integer ( 107 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 6 ) , 0 , dynamicSize ( 6 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( -52155262 , 32 , true ) ) + ListItem ( Integer ( -473267571 , 32 , true ) ) + ListItem ( Integer ( 1147433305 , 32 , true ) ) + ListItem ( Integer ( 841095768 , 32 , true ) ) + ListItem ( Integer ( 1296334389 , 32 , true ) ) + ListItem ( Integer ( -784133741 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + + + 5 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-2.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-2.expected index 6bbd4c726..7581e9139 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-2.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-2.expected @@ -25,30 +25,40 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 46 , 8 , false ) ) - ListItem ( Integer ( 43 , 8 , false ) ) - ListItem ( Integer ( 184 , 8 , false ) ) - ListItem ( Integer ( 86 , 8 , false ) ) - ListItem ( Integer ( 157 , 8 , false ) ) - ListItem ( Integer ( 128 , 8 , false ) ) - ListItem ( Integer ( 108 , 8 , false ) ) - ListItem ( Integer ( 18 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 10 ) , 0 , dynamicSize ( 10 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 2146275893 , 32 , true ) ) - ListItem ( Integer ( 594729871 , 32 , true ) ) - ListItem ( Integer ( 1871367442 , 32 , true ) ) - ListItem ( Integer ( 8878959 , 32 , true ) ) - ListItem ( Integer ( 1723174375 , 32 , true ) ) - ListItem ( Integer ( 1593574474 , 32 , true ) ) - ListItem ( Integer ( -584053575 , 32 , true ) ) - ListItem ( Integer ( 1854766825 , 32 , true ) ) - ListItem ( Integer ( 1751273387 , 32 , true ) ) - ListItem ( Integer ( -1385399937 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 46 , 8 , false ) ) + ListItem ( Integer ( 43 , 8 , false ) ) + ListItem ( Integer ( 184 , 8 , false ) ) + ListItem ( Integer ( 86 , 8 , false ) ) + ListItem ( Integer ( 157 , 8 , false ) ) + ListItem ( Integer ( 128 , 8 , false ) ) + ListItem ( Integer ( 108 , 8 , false ) ) + ListItem ( Integer ( 18 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 10 ) , 0 , dynamicSize ( 10 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( 2146275893 , 32 , true ) ) + ListItem ( Integer ( 594729871 , 32 , true ) ) + ListItem ( Integer ( 1871367442 , 32 , true ) ) + ListItem ( Integer ( 8878959 , 32 , true ) ) + ListItem ( Integer ( 1723174375 , 32 , true ) ) + ListItem ( Integer ( 1593574474 , 32 , true ) ) + ListItem ( Integer ( -584053575 , 32 , true ) ) + ListItem ( Integer ( 1854766825 , 32 , true ) ) + ListItem ( Integer ( 1751273387 , 32 , true ) ) + ListItem ( Integer ( -1385399937 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + + + 5 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-3.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-3.expected index a46aea65e..e2f346f33 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-3.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-3.expected @@ -25,32 +25,42 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 66 , 8 , false ) ) - ListItem ( Integer ( 189 , 8 , false ) ) - ListItem ( Integer ( 242 , 8 , false ) ) - ListItem ( Integer ( 33 , 8 , false ) ) - ListItem ( Integer ( 6 , 8 , false ) ) - ListItem ( Integer ( 240 , 8 , false ) ) - ListItem ( Integer ( 132 , 8 , false ) ) - ListItem ( Integer ( 119 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 12 ) , 0 , dynamicSize ( 12 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( -101562192 , 32 , true ) ) - ListItem ( Integer ( -1500591035 , 32 , true ) ) - ListItem ( Integer ( 579222143 , 32 , true ) ) - ListItem ( Integer ( 99562544 , 32 , true ) ) - ListItem ( Integer ( 1036168857 , 32 , true ) ) - ListItem ( Integer ( -1872470703 , 32 , true ) ) - ListItem ( Integer ( 391269738 , 32 , true ) ) - ListItem ( Integer ( 1569927520 , 32 , true ) ) - ListItem ( Integer ( 1626988600 , 32 , true ) ) - ListItem ( Integer ( 1808605022 , 32 , true ) ) - ListItem ( Integer ( 1870830728 , 32 , true ) ) - ListItem ( Integer ( 1627219933 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 66 , 8 , false ) ) + ListItem ( Integer ( 189 , 8 , false ) ) + ListItem ( Integer ( 242 , 8 , false ) ) + ListItem ( Integer ( 33 , 8 , false ) ) + ListItem ( Integer ( 6 , 8 , false ) ) + ListItem ( Integer ( 240 , 8 , false ) ) + ListItem ( Integer ( 132 , 8 , false ) ) + ListItem ( Integer ( 119 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 12 ) , 0 , dynamicSize ( 12 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( -101562192 , 32 , true ) ) + ListItem ( Integer ( -1500591035 , 32 , true ) ) + ListItem ( Integer ( 579222143 , 32 , true ) ) + ListItem ( Integer ( 99562544 , 32 , true ) ) + ListItem ( Integer ( 1036168857 , 32 , true ) ) + ListItem ( Integer ( -1872470703 , 32 , true ) ) + ListItem ( Integer ( 391269738 , 32 , true ) ) + ListItem ( Integer ( 1569927520 , 32 , true ) ) + ListItem ( Integer ( 1626988600 , 32 , true ) ) + ListItem ( Integer ( 1808605022 , 32 , true ) ) + ListItem ( Integer ( 1870830728 , 32 , true ) ) + ListItem ( Integer ( 1627219933 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + + + 5 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-4.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-4.expected index 77d20383f..e1cb492a5 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-4.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-4.expected @@ -25,45 +25,55 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 155 , 8 , false ) ) - ListItem ( Integer ( 52 , 8 , false ) ) - ListItem ( Integer ( 202 , 8 , false ) ) - ListItem ( Integer ( 245 , 8 , false ) ) - ListItem ( Integer ( 79 , 8 , false ) ) - ListItem ( Integer ( 46 , 8 , false ) ) - ListItem ( Integer ( 34 , 8 , false ) ) - ListItem ( Integer ( 10 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 25 ) , 0 , dynamicSize ( 25 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( -1894737466 , 32 , true ) ) - ListItem ( Integer ( -600243533 , 32 , true ) ) - ListItem ( Integer ( 1201498003 , 32 , true ) ) - ListItem ( Integer ( 1403903179 , 32 , true ) ) - ListItem ( Integer ( -1023406624 , 32 , true ) ) - ListItem ( Integer ( -980335906 , 32 , true ) ) - ListItem ( Integer ( -1439594619 , 32 , true ) ) - ListItem ( Integer ( -548067469 , 32 , true ) ) - ListItem ( Integer ( -1078579924 , 32 , true ) ) - ListItem ( Integer ( -1085242807 , 32 , true ) ) - ListItem ( Integer ( -944903130 , 32 , true ) ) - ListItem ( Integer ( 1462276086 , 32 , true ) ) - ListItem ( Integer ( -1309427421 , 32 , true ) ) - ListItem ( Integer ( -909658725 , 32 , true ) ) - ListItem ( Integer ( -208853958 , 32 , true ) ) - ListItem ( Integer ( -1145789072 , 32 , true ) ) - ListItem ( Integer ( 1277283976 , 32 , true ) ) - ListItem ( Integer ( -1799267183 , 32 , true ) ) - ListItem ( Integer ( 2136625905 , 32 , true ) ) - ListItem ( Integer ( 635646923 , 32 , true ) ) - ListItem ( Integer ( 862767530 , 32 , true ) ) - ListItem ( Integer ( 746374308 , 32 , true ) ) - ListItem ( Integer ( -1862132578 , 32 , true ) ) - ListItem ( Integer ( 1776105656 , 32 , true ) ) - ListItem ( Integer ( -252750415 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 155 , 8 , false ) ) + ListItem ( Integer ( 52 , 8 , false ) ) + ListItem ( Integer ( 202 , 8 , false ) ) + ListItem ( Integer ( 245 , 8 , false ) ) + ListItem ( Integer ( 79 , 8 , false ) ) + ListItem ( Integer ( 46 , 8 , false ) ) + ListItem ( Integer ( 34 , 8 , false ) ) + ListItem ( Integer ( 10 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 25 ) , 0 , dynamicSize ( 25 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( -1894737466 , 32 , true ) ) + ListItem ( Integer ( -600243533 , 32 , true ) ) + ListItem ( Integer ( 1201498003 , 32 , true ) ) + ListItem ( Integer ( 1403903179 , 32 , true ) ) + ListItem ( Integer ( -1023406624 , 32 , true ) ) + ListItem ( Integer ( -980335906 , 32 , true ) ) + ListItem ( Integer ( -1439594619 , 32 , true ) ) + ListItem ( Integer ( -548067469 , 32 , true ) ) + ListItem ( Integer ( -1078579924 , 32 , true ) ) + ListItem ( Integer ( -1085242807 , 32 , true ) ) + ListItem ( Integer ( -944903130 , 32 , true ) ) + ListItem ( Integer ( 1462276086 , 32 , true ) ) + ListItem ( Integer ( -1309427421 , 32 , true ) ) + ListItem ( Integer ( -909658725 , 32 , true ) ) + ListItem ( Integer ( -208853958 , 32 , true ) ) + ListItem ( Integer ( -1145789072 , 32 , true ) ) + ListItem ( Integer ( 1277283976 , 32 , true ) ) + ListItem ( Integer ( -1799267183 , 32 , true ) ) + ListItem ( Integer ( 2136625905 , 32 , true ) ) + ListItem ( Integer ( 635646923 , 32 , true ) ) + ListItem ( Integer ( 862767530 , 32 , true ) ) + ListItem ( Integer ( 746374308 , 32 , true ) ) + ListItem ( Integer ( -1862132578 , 32 , true ) ) + ListItem ( Integer ( 1776105656 , 32 , true ) ) + ListItem ( Integer ( -252750415 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + + + 5 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-5.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-5.expected index b2eeca22a..c14db1c4b 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-5.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-5.expected @@ -25,45 +25,55 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 130 , 8 , false ) ) - ListItem ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 14 , 8 , false ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 238 , 8 , false ) ) - ListItem ( Integer ( 127 , 8 , false ) ) - ListItem ( Integer ( 26 , 8 , false ) ) - ListItem ( Integer ( 80 , 8 , false ) ) - ListItem ( Integer ( 57 , 8 , false ) ) - ListItem ( Integer ( 190 , 8 , false ) ) - ListItem ( Integer ( 240 , 8 , false ) ) - ListItem ( Integer ( 126 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 24 ) , 0 , dynamicSize ( 24 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 187951464 , 32 , true ) ) - ListItem ( Integer ( 317574981 , 32 , true ) ) - ListItem ( Integer ( -1216636254 , 32 , true ) ) - ListItem ( Integer ( -947116003 , 32 , true ) ) - ListItem ( Integer ( 1141282117 , 32 , true ) ) - ListItem ( Integer ( 1276236631 , 32 , true ) ) - ListItem ( Integer ( 504454731 , 32 , true ) ) - ListItem ( Integer ( -1603314586 , 32 , true ) ) - ListItem ( Integer ( 1595171242 , 32 , true ) ) - ListItem ( Integer ( 2071982903 , 32 , true ) ) - ListItem ( Integer ( 1599479168 , 32 , true ) ) - ListItem ( Integer ( -904927395 , 32 , true ) ) - ListItem ( Integer ( 1982032882 , 32 , true ) ) - ListItem ( Integer ( -1267962325 , 32 , true ) ) - ListItem ( Integer ( 818800919 , 32 , true ) ) - ListItem ( Integer ( 1691107634 , 32 , true ) ) - ListItem ( Integer ( -864195088 , 32 , true ) ) - ListItem ( Integer ( -596184694 , 32 , true ) ) - ListItem ( Integer ( -1521698716 , 32 , true ) ) - ListItem ( Integer ( -1867710720 , 32 , true ) ) - ListItem ( Integer ( -696227655 , 32 , true ) ) - ListItem ( Integer ( -816224473 , 32 , true ) ) - ListItem ( Integer ( 1368024730 , 32 , true ) ) - ListItem ( Integer ( -791162561 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 130 , 8 , false ) ) + ListItem ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 14 , 8 , false ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 238 , 8 , false ) ) + ListItem ( Integer ( 127 , 8 , false ) ) + ListItem ( Integer ( 26 , 8 , false ) ) + ListItem ( Integer ( 80 , 8 , false ) ) + ListItem ( Integer ( 57 , 8 , false ) ) + ListItem ( Integer ( 190 , 8 , false ) ) + ListItem ( Integer ( 240 , 8 , false ) ) + ListItem ( Integer ( 126 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 24 ) , 0 , dynamicSize ( 24 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( 187951464 , 32 , true ) ) + ListItem ( Integer ( 317574981 , 32 , true ) ) + ListItem ( Integer ( -1216636254 , 32 , true ) ) + ListItem ( Integer ( -947116003 , 32 , true ) ) + ListItem ( Integer ( 1141282117 , 32 , true ) ) + ListItem ( Integer ( 1276236631 , 32 , true ) ) + ListItem ( Integer ( 504454731 , 32 , true ) ) + ListItem ( Integer ( -1603314586 , 32 , true ) ) + ListItem ( Integer ( 1595171242 , 32 , true ) ) + ListItem ( Integer ( 2071982903 , 32 , true ) ) + ListItem ( Integer ( 1599479168 , 32 , true ) ) + ListItem ( Integer ( -904927395 , 32 , true ) ) + ListItem ( Integer ( 1982032882 , 32 , true ) ) + ListItem ( Integer ( -1267962325 , 32 , true ) ) + ListItem ( Integer ( 818800919 , 32 , true ) ) + ListItem ( Integer ( 1691107634 , 32 , true ) ) + ListItem ( Integer ( -864195088 , 32 , true ) ) + ListItem ( Integer ( -596184694 , 32 , true ) ) + ListItem ( Integer ( -1521698716 , 32 , true ) ) + ListItem ( Integer ( -1867710720 , 32 , true ) ) + ListItem ( Integer ( -696227655 , 32 , true ) ) + ListItem ( Integer ( -816224473 , 32 , true ) ) + ListItem ( Integer ( 1368024730 , 32 , true ) ) + ListItem ( Integer ( -791162561 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + + + 5 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-6.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-6.expected index 175fabdab..2d5582821 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-6.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-6.expected @@ -25,52 +25,62 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 41 , 8 , false ) ) - ListItem ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 133 , 8 , false ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 18 , 8 , false ) ) - ListItem ( Integer ( 0 , 8 , false ) ) - ListItem ( Integer ( 74 , 8 , false ) ) - ListItem ( Integer ( 240 , 8 , false ) ) - ListItem ( Integer ( 191 , 8 , false ) ) - ListItem ( Integer ( 163 , 8 , false ) ) - ListItem ( Integer ( 11 , 8 , false ) ) - ListItem ( Integer ( 139 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 31 ) , 0 , dynamicSize ( 31 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 1296717143 , 32 , true ) ) - ListItem ( Integer ( 781906281 , 32 , true ) ) - ListItem ( Integer ( 797531995 , 32 , true ) ) - ListItem ( Integer ( 1478681337 , 32 , true ) ) - ListItem ( Integer ( -1747473626 , 32 , true ) ) - ListItem ( Integer ( 1289704459 , 32 , true ) ) - ListItem ( Integer ( 1309026637 , 32 , true ) ) - ListItem ( Integer ( -896859768 , 32 , true ) ) - ListItem ( Integer ( 1938632292 , 32 , true ) ) - ListItem ( Integer ( -599665211 , 32 , true ) ) - ListItem ( Integer ( 1758837219 , 32 , true ) ) - ListItem ( Integer ( -595383727 , 32 , true ) ) - ListItem ( Integer ( 437001078 , 32 , true ) ) - ListItem ( Integer ( -840420274 , 32 , true ) ) - ListItem ( Integer ( 382925280 , 32 , true ) ) - ListItem ( Integer ( 108504562 , 32 , true ) ) - ListItem ( Integer ( 698968001 , 32 , true ) ) - ListItem ( Integer ( -1304707409 , 32 , true ) ) - ListItem ( Integer ( -69817790 , 32 , true ) ) - ListItem ( Integer ( -2093699045 , 32 , true ) ) - ListItem ( Integer ( 1194247920 , 32 , true ) ) - ListItem ( Integer ( -832688831 , 32 , true ) ) - ListItem ( Integer ( -476030203 , 32 , true ) ) - ListItem ( Integer ( 2146962235 , 32 , true ) ) - ListItem ( Integer ( -1916319312 , 32 , true ) ) - ListItem ( Integer ( -439098984 , 32 , true ) ) - ListItem ( Integer ( 2065765568 , 32 , true ) ) - ListItem ( Integer ( 2058389020 , 32 , true ) ) - ListItem ( Integer ( 1672943655 , 32 , true ) ) - ListItem ( Integer ( 1422748784 , 32 , true ) ) - ListItem ( Integer ( 1271734833 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 2 ) , ListItem ( Integer ( 41 , 8 , false ) ) + ListItem ( Aggregate ( variantIdx ( 1 ) , ListItem ( Integer ( 133 , 8 , false ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 18 , 8 , false ) ) + ListItem ( Integer ( 0 , 8 , false ) ) + ListItem ( Integer ( 74 , 8 , false ) ) + ListItem ( Integer ( 240 , 8 , false ) ) + ListItem ( Integer ( 191 , 8 , false ) ) + ListItem ( Integer ( 163 , 8 , false ) ) + ListItem ( Integer ( 11 , 8 , false ) ) + ListItem ( Integer ( 139 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 31 ) , 0 , dynamicSize ( 31 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( 1296717143 , 32 , true ) ) + ListItem ( Integer ( 781906281 , 32 , true ) ) + ListItem ( Integer ( 797531995 , 32 , true ) ) + ListItem ( Integer ( 1478681337 , 32 , true ) ) + ListItem ( Integer ( -1747473626 , 32 , true ) ) + ListItem ( Integer ( 1289704459 , 32 , true ) ) + ListItem ( Integer ( 1309026637 , 32 , true ) ) + ListItem ( Integer ( -896859768 , 32 , true ) ) + ListItem ( Integer ( 1938632292 , 32 , true ) ) + ListItem ( Integer ( -599665211 , 32 , true ) ) + ListItem ( Integer ( 1758837219 , 32 , true ) ) + ListItem ( Integer ( -595383727 , 32 , true ) ) + ListItem ( Integer ( 437001078 , 32 , true ) ) + ListItem ( Integer ( -840420274 , 32 , true ) ) + ListItem ( Integer ( 382925280 , 32 , true ) ) + ListItem ( Integer ( 108504562 , 32 , true ) ) + ListItem ( Integer ( 698968001 , 32 , true ) ) + ListItem ( Integer ( -1304707409 , 32 , true ) ) + ListItem ( Integer ( -69817790 , 32 , true ) ) + ListItem ( Integer ( -2093699045 , 32 , true ) ) + ListItem ( Integer ( 1194247920 , 32 , true ) ) + ListItem ( Integer ( -832688831 , 32 , true ) ) + ListItem ( Integer ( -476030203 , 32 , true ) ) + ListItem ( Integer ( 2146962235 , 32 , true ) ) + ListItem ( Integer ( -1916319312 , 32 , true ) ) + ListItem ( Integer ( -439098984 , 32 , true ) ) + ListItem ( Integer ( 2065765568 , 32 , true ) ) + ListItem ( Integer ( 2058389020 , 32 , true ) ) + ListItem ( Integer ( 1672943655 , 32 , true ) ) + ListItem ( Integer ( 1422748784 , 32 , true ) ) + ListItem ( Integer ( 1271734833 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + + + 5 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-7.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-7.expected index d186da3b3..608b89c5e 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-7.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-7.expected @@ -25,25 +25,35 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 1923567076 , 32 , true ) ) - ListItem ( Integer ( -1940095024 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 48 , 8 , false ) ) - ListItem ( Integer ( 187 , 8 , false ) ) - ListItem ( Integer ( 29 , 8 , false ) ) - ListItem ( Integer ( 109 , 8 , false ) ) - ListItem ( Integer ( 19 , 8 , false ) ) - ListItem ( Integer ( 44 , 8 , false ) ) - ListItem ( Integer ( 222 , 8 , false ) ) - ListItem ( Integer ( 214 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 4 ) , 0 , dynamicSize ( 4 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( -1113843932 , 32 , true ) ) - ListItem ( Integer ( 219246286 , 32 , true ) ) - ListItem ( Integer ( 281121487 , 32 , true ) ) - ListItem ( Integer ( 1921781853 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 1923567076 , 32 , true ) ) + ListItem ( Integer ( -1940095024 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 48 , 8 , false ) ) + ListItem ( Integer ( 187 , 8 , false ) ) + ListItem ( Integer ( 29 , 8 , false ) ) + ListItem ( Integer ( 109 , 8 , false ) ) + ListItem ( Integer ( 19 , 8 , false ) ) + ListItem ( Integer ( 44 , 8 , false ) ) + ListItem ( Integer ( 222 , 8 , false ) ) + ListItem ( Integer ( 214 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 4 ) , 0 , dynamicSize ( 4 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( -1113843932 , 32 , true ) ) + ListItem ( Integer ( 219246286 , 32 , true ) ) + ListItem ( Integer ( 281121487 , 32 , true ) ) + ListItem ( Integer ( 1921781853 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + + + 5 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-8.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-8.expected index 5a1813338..7f382e8c8 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-8.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-8.expected @@ -25,52 +25,62 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 189 , 8 , false ) ) - ListItem ( Integer ( 192 , 8 , false ) ) - ListItem ( Integer ( 64 , 8 , false ) ) - ListItem ( Integer ( 98 , 8 , false ) ) - ListItem ( Integer ( 22 , 8 , false ) ) - ListItem ( Integer ( 43 , 8 , false ) ) - ListItem ( Integer ( 70 , 8 , false ) ) - ListItem ( Integer ( 126 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 32 ) , 0 , dynamicSize ( 32 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( -1248127672 , 32 , true ) ) - ListItem ( Integer ( 609320300 , 32 , true ) ) - ListItem ( Integer ( -175519158 , 32 , true ) ) - ListItem ( Integer ( -201294668 , 32 , true ) ) - ListItem ( Integer ( 1419578049 , 32 , true ) ) - ListItem ( Integer ( -1762802220 , 32 , true ) ) - ListItem ( Integer ( -396580689 , 32 , true ) ) - ListItem ( Integer ( -1037850026 , 32 , true ) ) - ListItem ( Integer ( -1876519824 , 32 , true ) ) - ListItem ( Integer ( -527399931 , 32 , true ) ) - ListItem ( Integer ( 690816163 , 32 , true ) ) - ListItem ( Integer ( -693900969 , 32 , true ) ) - ListItem ( Integer ( 821629702 , 32 , true ) ) - ListItem ( Integer ( 1723892329 , 32 , true ) ) - ListItem ( Integer ( 1915776330 , 32 , true ) ) - ListItem ( Integer ( -1314887044 , 32 , true ) ) - ListItem ( Integer ( 339138294 , 32 , true ) ) - ListItem ( Integer ( 1636209378 , 32 , true ) ) - ListItem ( Integer ( 1623826238 , 32 , true ) ) - ListItem ( Integer ( -1567767271 , 32 , true ) ) - ListItem ( Integer ( 816822302 , 32 , true ) ) - ListItem ( Integer ( 868207965 , 32 , true ) ) - ListItem ( Integer ( 1475291067 , 32 , true ) ) - ListItem ( Integer ( -1298591270 , 32 , true ) ) - ListItem ( Integer ( -1502551912 , 32 , true ) ) - ListItem ( Integer ( 123352306 , 32 , true ) ) - ListItem ( Integer ( -1202783990 , 32 , true ) ) - ListItem ( Integer ( -2096304035 , 32 , true ) ) - ListItem ( Integer ( -673316532 , 32 , true ) ) - ListItem ( Integer ( -1001404679 , 32 , true ) ) - ListItem ( Integer ( -328986497 , 32 , true ) ) - ListItem ( Integer ( -528598575 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , .List ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 189 , 8 , false ) ) + ListItem ( Integer ( 192 , 8 , false ) ) + ListItem ( Integer ( 64 , 8 , false ) ) + ListItem ( Integer ( 98 , 8 , false ) ) + ListItem ( Integer ( 22 , 8 , false ) ) + ListItem ( Integer ( 43 , 8 , false ) ) + ListItem ( Integer ( 70 , 8 , false ) ) + ListItem ( Integer ( 126 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 32 ) , 0 , dynamicSize ( 32 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( -1248127672 , 32 , true ) ) + ListItem ( Integer ( 609320300 , 32 , true ) ) + ListItem ( Integer ( -175519158 , 32 , true ) ) + ListItem ( Integer ( -201294668 , 32 , true ) ) + ListItem ( Integer ( 1419578049 , 32 , true ) ) + ListItem ( Integer ( -1762802220 , 32 , true ) ) + ListItem ( Integer ( -396580689 , 32 , true ) ) + ListItem ( Integer ( -1037850026 , 32 , true ) ) + ListItem ( Integer ( -1876519824 , 32 , true ) ) + ListItem ( Integer ( -527399931 , 32 , true ) ) + ListItem ( Integer ( 690816163 , 32 , true ) ) + ListItem ( Integer ( -693900969 , 32 , true ) ) + ListItem ( Integer ( 821629702 , 32 , true ) ) + ListItem ( Integer ( 1723892329 , 32 , true ) ) + ListItem ( Integer ( 1915776330 , 32 , true ) ) + ListItem ( Integer ( -1314887044 , 32 , true ) ) + ListItem ( Integer ( 339138294 , 32 , true ) ) + ListItem ( Integer ( 1636209378 , 32 , true ) ) + ListItem ( Integer ( 1623826238 , 32 , true ) ) + ListItem ( Integer ( -1567767271 , 32 , true ) ) + ListItem ( Integer ( 816822302 , 32 , true ) ) + ListItem ( Integer ( 868207965 , 32 , true ) ) + ListItem ( Integer ( 1475291067 , 32 , true ) ) + ListItem ( Integer ( -1298591270 , 32 , true ) ) + ListItem ( Integer ( -1502551912 , 32 , true ) ) + ListItem ( Integer ( 123352306 , 32 , true ) ) + ListItem ( Integer ( -1202783990 , 32 , true ) ) + ListItem ( Integer ( -2096304035 , 32 , true ) ) + ListItem ( Integer ( -673316532 , 32 , true ) ) + ListItem ( Integer ( -1001404679 , 32 , true ) ) + ListItem ( Integer ( -328986497 , 32 , true ) ) + ListItem ( Integer ( -528598575 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + + + 5 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-9.expected b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-9.expected index edca97d9f..81976eb7d 100644 --- a/kmir/src/tests/integration/data/run-smir-random/complex-types/init-9.expected +++ b/kmir/src/tests/integration/data/run-smir-random/complex-types/init-9.expected @@ -25,31 +25,41 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 486255726 , 32 , true ) ) - ListItem ( Integer ( -1000150020 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 95 , 8 , false ) ) - ListItem ( Integer ( 3 , 8 , false ) ) - ListItem ( Integer ( 173 , 8 , false ) ) - ListItem ( Integer ( 237 , 8 , false ) ) - ListItem ( Integer ( 41 , 8 , false ) ) - ListItem ( Integer ( 171 , 8 , false ) ) - ListItem ( Integer ( 20 , 8 , false ) ) - ListItem ( Integer ( 194 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 4 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 10 ) , 0 , dynamicSize ( 10 ) ) ) , ty ( 32 ) , mutabilityNot ) ) - ListItem ( typedValue ( Range ( ListItem ( Integer ( 966648405 , 32 , true ) ) - ListItem ( Integer ( -1472498778 , 32 , true ) ) - ListItem ( Integer ( -1125229012 , 32 , true ) ) - ListItem ( Integer ( -1670967639 , 32 , true ) ) - ListItem ( Integer ( 388387290 , 32 , true ) ) - ListItem ( Integer ( -896883309 , 32 , true ) ) - ListItem ( Integer ( 748337932 , 32 , true ) ) - ListItem ( Integer ( -1246012399 , 32 , true ) ) - ListItem ( Integer ( -939805772 , 32 , true ) ) - ListItem ( Integer ( 1329338341 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( Aggregate ( variantIdx ( 1 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 486255726 , 32 , true ) ) + ListItem ( Integer ( -1000150020 , 32 , true ) ) ) ) ) , ty ( 68 ) , mutabilityNot ) + 2 |-> typedValue ( Range ( ListItem ( Integer ( 95 , 8 , false ) ) + ListItem ( Integer ( 3 , 8 , false ) ) + ListItem ( Integer ( 173 , 8 , false ) ) + ListItem ( Integer ( 237 , 8 , false ) ) + ListItem ( Integer ( 41 , 8 , false ) ) + ListItem ( Integer ( 171 , 8 , false ) ) + ListItem ( Integer ( 20 , 8 , false ) ) + ListItem ( Integer ( 194 , 8 , false ) ) ) , ty ( 25 ) , mutabilityNot ) + 3 |-> typedValue ( Reference ( slotPlace ( 4 , .ProjectionElems ) , mutabilityNot , metadata ( dynamicSize ( 10 ) , 0 , dynamicSize ( 10 ) ) ) , ty ( 32 ) , mutabilityNot ) + 4 |-> typedValue ( Range ( ListItem ( Integer ( 966648405 , 32 , true ) ) + ListItem ( Integer ( -1472498778 , 32 , true ) ) + ListItem ( Integer ( -1125229012 , 32 , true ) ) + ListItem ( Integer ( -1670967639 , 32 , true ) ) + ListItem ( Integer ( 388387290 , 32 , true ) ) + ListItem ( Integer ( -896883309 , 32 , true ) ) + ListItem ( Integer ( 748337932 , 32 , true ) ) + ListItem ( Integer ( -1246012399 , 32 , true ) ) + ListItem ( Integer ( -939805772 , 32 , true ) ) + ListItem ( Integer ( 1329338341 , 32 , true ) ) ) , ty ( 26 ) , mutabilityNot ) + + + 5 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-0.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-0.expected index f041f3897..f7535f8e8 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-0.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-0.expected @@ -41,43 +41,83 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 197 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -341142443 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 197 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 8 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 8 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 22 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 13 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 14 ) , mutabilityMut ) ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 197 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -341142443 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) ) ) + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 197 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( -341142443 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 4 |-> newLocal ( ty ( 6 ) , mutabilityMut ) + 5 |-> typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) + 6 |-> typedValue ( Integer ( 197 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 7 |-> typedValue ( Integer ( -341142443 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 8 |-> typedValue ( Integer ( 197 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 9 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 10 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 11 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 12 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 13 |-> newLocal ( ty ( 8 ) , mutabilityMut ) + 14 |-> newLocal ( ty ( 21 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 16 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 8 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 21 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 21 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 23 |-> newLocal ( ty ( 22 ) , mutabilityMut ) + 24 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 25 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 26 |-> newLocal ( ty ( 18 ) , mutabilityNot ) + 27 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 28 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 29 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 30 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 31 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 13 ) , mutabilityNot ) + 33 |-> newLocal ( ty ( 12 ) , mutabilityNot ) + 34 |-> newLocal ( ty ( 14 ) , mutabilityMut ) + + + 37 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-1.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-1.expected index d4175ed23..f8db49973 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-1.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-1.expected @@ -41,44 +41,84 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -1051970500 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 8 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 8 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) - ListItem ( Reference ( 0 , place (... local: local ( 22 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 22 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 22 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 13 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 14 ) , mutabilityMut ) ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -1051970500 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) ) ) + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 32 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( -1051970500 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 4 |-> newLocal ( ty ( 6 ) , mutabilityMut ) + 5 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 6 |-> typedValue ( Integer ( 32 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 7 |-> typedValue ( Integer ( -1051970500 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 8 |-> typedValue ( Integer ( 32 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 9 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 10 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 11 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 12 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 13 |-> newLocal ( ty ( 8 ) , mutabilityMut ) + 14 |-> newLocal ( ty ( 21 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 16 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 8 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 21 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 23 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( slotPlace ( 5 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) + ListItem ( Reference ( slotPlace ( 26 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 22 ) , mutabilityMut ) + 24 |-> typedValue ( Moved , ty ( 2 ) , mutabilityMut ) + 25 |-> typedValue ( Moved , ty ( 2 ) , mutabilityMut ) + 26 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 27 |-> typedValue ( Reference ( slotPlace ( 5 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 2 ) , mutabilityNot ) + 28 |-> typedValue ( Reference ( slotPlace ( 26 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 2 ) , mutabilityNot ) + 29 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 30 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 31 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 13 ) , mutabilityNot ) + 33 |-> newLocal ( ty ( 12 ) , mutabilityNot ) + 34 |-> newLocal ( ty ( 14 ) , mutabilityMut ) + + + 37 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-2.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-2.expected index c9b4a3ba5..1bc586dd6 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-2.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-2.expected @@ -41,43 +41,83 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 28 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -1754129965 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 28 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 8 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 8 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 22 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 13 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 14 ) , mutabilityMut ) ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 28 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -1754129965 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) ) ) + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 28 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( -1754129965 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 4 |-> newLocal ( ty ( 6 ) , mutabilityMut ) + 5 |-> typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) + 6 |-> typedValue ( Integer ( 28 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 7 |-> typedValue ( Integer ( -1754129965 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 8 |-> typedValue ( Integer ( 28 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 9 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 10 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 11 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 12 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 13 |-> newLocal ( ty ( 8 ) , mutabilityMut ) + 14 |-> newLocal ( ty ( 21 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 16 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 8 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 21 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 21 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 23 |-> newLocal ( ty ( 22 ) , mutabilityMut ) + 24 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 25 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 26 |-> newLocal ( ty ( 18 ) , mutabilityNot ) + 27 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 28 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 29 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 30 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 31 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 13 ) , mutabilityNot ) + 33 |-> newLocal ( ty ( 12 ) , mutabilityNot ) + 34 |-> newLocal ( ty ( 14 ) , mutabilityMut ) + + + 37 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-3.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-3.expected index 09fef980f..689d79549 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-3.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-3.expected @@ -41,44 +41,84 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 66 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 446333181 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 66 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 8 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 8 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 22 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 13 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 14 ) , mutabilityMut ) ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 66 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 446333181 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) ) ) + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 66 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( 446333181 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 4 |-> newLocal ( ty ( 6 ) , mutabilityMut ) + 5 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 6 |-> typedValue ( Integer ( 66 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 7 |-> typedValue ( Integer ( 446333181 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 8 |-> typedValue ( Integer ( 66 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 9 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 10 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 11 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 12 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 13 |-> typedValue ( Moved , ty ( 8 ) , mutabilityMut ) + 14 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 21 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 16 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 8 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 21 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 23 |-> newLocal ( ty ( 22 ) , mutabilityMut ) + 24 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 25 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 26 |-> newLocal ( ty ( 18 ) , mutabilityNot ) + 27 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 28 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 29 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 30 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 31 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 13 ) , mutabilityNot ) + 33 |-> newLocal ( ty ( 12 ) , mutabilityNot ) + 34 |-> newLocal ( ty ( 14 ) , mutabilityMut ) + + + 37 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-4.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-4.expected index fe0fc56a4..951ffdb6f 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-4.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-4.expected @@ -41,44 +41,84 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 155 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -446426455 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 155 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 8 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 8 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) - ListItem ( Reference ( 0 , place (... local: local ( 22 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 22 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 22 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 13 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 14 ) , mutabilityMut ) ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 155 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -446426455 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) ) ) + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 155 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( -446426455 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 4 |-> newLocal ( ty ( 6 ) , mutabilityMut ) + 5 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 6 |-> typedValue ( Integer ( 155 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 7 |-> typedValue ( Integer ( -446426455 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 8 |-> typedValue ( Integer ( 155 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 9 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 10 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 11 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 12 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 13 |-> newLocal ( ty ( 8 ) , mutabilityMut ) + 14 |-> newLocal ( ty ( 21 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 16 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 8 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 21 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 23 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( slotPlace ( 5 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) + ListItem ( Reference ( slotPlace ( 26 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 22 ) , mutabilityMut ) + 24 |-> typedValue ( Moved , ty ( 2 ) , mutabilityMut ) + 25 |-> typedValue ( Moved , ty ( 2 ) , mutabilityMut ) + 26 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 27 |-> typedValue ( Reference ( slotPlace ( 5 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 2 ) , mutabilityNot ) + 28 |-> typedValue ( Reference ( slotPlace ( 26 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 2 ) , mutabilityNot ) + 29 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 30 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 31 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 13 ) , mutabilityNot ) + 33 |-> newLocal ( ty ( 12 ) , mutabilityNot ) + 34 |-> newLocal ( ty ( 14 ) , mutabilityMut ) + + + 37 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-5.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-5.expected index 451c52bb4..d0ea2eb20 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-5.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-5.expected @@ -41,44 +41,84 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 130 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1038467225 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 130 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 8 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 8 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 22 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 13 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 14 ) , mutabilityMut ) ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 130 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1038467225 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) ) ) + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 130 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( 1038467225 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 4 |-> newLocal ( ty ( 6 ) , mutabilityMut ) + 5 |-> typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) + 6 |-> typedValue ( Integer ( 130 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 7 |-> typedValue ( Integer ( 1038467225 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 8 |-> typedValue ( Integer ( 130 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 9 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 10 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 11 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 12 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 13 |-> typedValue ( Moved , ty ( 8 ) , mutabilityMut ) + 14 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 21 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 16 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 8 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 21 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 23 |-> newLocal ( ty ( 22 ) , mutabilityMut ) + 24 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 25 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 26 |-> newLocal ( ty ( 18 ) , mutabilityNot ) + 27 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 28 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 29 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 30 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 31 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 13 ) , mutabilityNot ) + 33 |-> newLocal ( ty ( 12 ) , mutabilityNot ) + 34 |-> newLocal ( ty ( 14 ) , mutabilityMut ) + + + 37 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-6.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-6.expected index 0ccc56705..58392e6bf 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-6.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-6.expected @@ -41,43 +41,83 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 41 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -1023827911 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 41 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 8 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 8 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 22 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 13 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 14 ) , mutabilityMut ) ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 41 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -1023827911 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) ) ) + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 41 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( -1023827911 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 4 |-> newLocal ( ty ( 6 ) , mutabilityMut ) + 5 |-> typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) + 6 |-> typedValue ( Integer ( 41 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 7 |-> typedValue ( Integer ( -1023827911 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 8 |-> typedValue ( Integer ( 41 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 9 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 10 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 11 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 12 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 13 |-> newLocal ( ty ( 8 ) , mutabilityMut ) + 14 |-> newLocal ( ty ( 21 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 16 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 8 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 21 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 21 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 23 |-> newLocal ( ty ( 22 ) , mutabilityMut ) + 24 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 25 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 26 |-> newLocal ( ty ( 18 ) , mutabilityNot ) + 27 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 28 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 29 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 30 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 31 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 13 ) , mutabilityNot ) + 33 |-> newLocal ( ty ( 12 ) , mutabilityNot ) + 34 |-> newLocal ( ty ( 14 ) , mutabilityMut ) + + + 37 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-7.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-7.expected index f39dc9787..025afac98 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-7.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-7.expected @@ -41,44 +41,84 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 77 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -1940095024 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 77 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 8 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 8 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) - ListItem ( Reference ( 0 , place (... local: local ( 22 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 22 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 22 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 13 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 14 ) , mutabilityMut ) ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 77 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -1940095024 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) ) ) + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 77 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( -1940095024 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 4 |-> newLocal ( ty ( 6 ) , mutabilityMut ) + 5 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 6 |-> typedValue ( Integer ( 77 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 7 |-> typedValue ( Integer ( -1940095024 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 8 |-> typedValue ( Integer ( 77 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 9 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 10 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 11 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 12 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 13 |-> newLocal ( ty ( 8 ) , mutabilityMut ) + 14 |-> newLocal ( ty ( 21 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 16 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 8 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 21 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 23 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( slotPlace ( 5 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) + ListItem ( Reference ( slotPlace ( 26 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 22 ) , mutabilityMut ) + 24 |-> typedValue ( Moved , ty ( 2 ) , mutabilityMut ) + 25 |-> typedValue ( Moved , ty ( 2 ) , mutabilityMut ) + 26 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 27 |-> typedValue ( Reference ( slotPlace ( 5 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 2 ) , mutabilityNot ) + 28 |-> typedValue ( Reference ( slotPlace ( 26 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 2 ) , mutabilityNot ) + 29 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 30 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 31 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 13 ) , mutabilityNot ) + 33 |-> newLocal ( ty ( 12 ) , mutabilityNot ) + 34 |-> newLocal ( ty ( 14 ) , mutabilityMut ) + + + 37 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-8.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-8.expected index ef460d19e..6bcb4ed6b 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-8.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-8.expected @@ -41,44 +41,84 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 189 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1985542055 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 189 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 8 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) - ListItem ( Moved ) ) , ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 8 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 22 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 2 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 13 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 14 ) , mutabilityMut ) ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 189 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1985542055 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) ) ) + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 189 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( 1985542055 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 4 |-> newLocal ( ty ( 6 ) , mutabilityMut ) + 5 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 6 |-> typedValue ( Integer ( 189 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 7 |-> typedValue ( Integer ( 1985542055 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 8 |-> typedValue ( Integer ( 189 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 9 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 10 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 11 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 12 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 13 |-> typedValue ( Moved , ty ( 8 ) , mutabilityMut ) + 14 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Moved ) + ListItem ( Moved ) ) , ty ( 21 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 16 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 8 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 21 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 23 |-> newLocal ( ty ( 22 ) , mutabilityMut ) + 24 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 25 |-> newLocal ( ty ( 2 ) , mutabilityMut ) + 26 |-> newLocal ( ty ( 18 ) , mutabilityNot ) + 27 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 28 |-> newLocal ( ty ( 2 ) , mutabilityNot ) + 29 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 30 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 31 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 13 ) , mutabilityNot ) + 33 |-> newLocal ( ty ( 12 ) , mutabilityNot ) + 34 |-> newLocal ( ty ( 14 ) , mutabilityMut ) + + + 37 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-9.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-9.expected index 3bd535f28..26e23f10b 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/final-9.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/final-9.expected @@ -41,44 +41,84 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 6 ) , mutabilityMut ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 191 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -1000150020 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 191 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 8 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 8 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 21 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) - ListItem ( Reference ( 0 , place (... local: local ( 22 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 22 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 22 ) , projection: .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( typedValue ( Moved , ty ( 18 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 13 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 12 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 14 ) , mutabilityMut ) ) + ListItem ( 4 ) + ListItem ( 5 ) + ListItem ( 6 ) + ListItem ( 7 ) + ListItem ( 8 ) + ListItem ( 9 ) + ListItem ( 10 ) + ListItem ( 11 ) + ListItem ( 12 ) + ListItem ( 13 ) + ListItem ( 14 ) + ListItem ( 15 ) + ListItem ( 16 ) + ListItem ( 17 ) + ListItem ( 18 ) + ListItem ( 19 ) + ListItem ( 20 ) + ListItem ( 21 ) + ListItem ( 22 ) + ListItem ( 23 ) + ListItem ( 24 ) + ListItem ( 25 ) + ListItem ( 26 ) + ListItem ( 27 ) + ListItem ( 28 ) + ListItem ( 29 ) + ListItem ( 30 ) + ListItem ( 31 ) + ListItem ( 32 ) + ListItem ( 33 ) + ListItem ( 34 ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 191 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -1000150020 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) ) ) + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 191 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( -1000150020 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 4 |-> newLocal ( ty ( 6 ) , mutabilityMut ) + 5 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 6 |-> typedValue ( Integer ( 191 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 7 |-> typedValue ( Integer ( -1000150020 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 8 |-> typedValue ( Integer ( 191 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + 9 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 10 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 11 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 12 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 13 |-> newLocal ( ty ( 8 ) , mutabilityMut ) + 14 |-> newLocal ( ty ( 21 ) , mutabilityMut ) + 15 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 16 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 17 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 18 |-> newLocal ( ty ( 8 ) , mutabilityMut ) + 19 |-> newLocal ( ty ( 21 ) , mutabilityMut ) + 20 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 21 |-> newLocal ( ty ( 18 ) , mutabilityMut ) + 22 |-> newLocal ( ty ( 12 ) , mutabilityMut ) + 23 |-> typedValue ( Aggregate ( variantIdx ( 0 ) , ListItem ( Reference ( slotPlace ( 5 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) + ListItem ( Reference ( slotPlace ( 26 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) ) ) , ty ( 22 ) , mutabilityMut ) + 24 |-> typedValue ( Moved , ty ( 2 ) , mutabilityMut ) + 25 |-> typedValue ( Moved , ty ( 2 ) , mutabilityMut ) + 26 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 27 |-> typedValue ( Reference ( slotPlace ( 5 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 2 ) , mutabilityNot ) + 28 |-> typedValue ( Reference ( slotPlace ( 26 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , ty ( 2 ) , mutabilityNot ) + 29 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 30 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 31 |-> typedValue ( Moved , ty ( 18 ) , mutabilityMut ) + 32 |-> newLocal ( ty ( 13 ) , mutabilityNot ) + 33 |-> newLocal ( ty ( 12 ) , mutabilityNot ) + 34 |-> newLocal ( ty ( 14 ) , mutabilityMut ) + + + 37 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-0.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-0.expected index 821e11dd2..20abb4da0 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-0.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-0.expected @@ -25,13 +25,22 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 197 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -341142443 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 197 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( -341142443 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + + + 4 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-1.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-1.expected index 49c6c69f5..c9d6c3009 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-1.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-1.expected @@ -25,13 +25,22 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -1051970500 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 32 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( -1051970500 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + + + 4 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-2.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-2.expected index d28072381..46e3136c3 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-2.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-2.expected @@ -25,13 +25,22 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 28 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -1754129965 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 28 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( -1754129965 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + + + 4 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-3.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-3.expected index 27c8bd0af..2498b474d 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-3.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-3.expected @@ -25,13 +25,22 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 66 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 446333181 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 66 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( 446333181 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + + + 4 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-4.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-4.expected index 56e7fffcf..20c4fd64b 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-4.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-4.expected @@ -25,13 +25,22 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 155 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -446426455 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 155 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( -446426455 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + + + 4 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-5.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-5.expected index 23a47f9da..9282ba776 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-5.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-5.expected @@ -25,13 +25,22 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 130 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1038467225 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 130 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( 1038467225 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + + + 4 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-6.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-6.expected index 5d3b0ff0c..6fb5cf501 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-6.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-6.expected @@ -25,13 +25,22 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 41 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -1023827911 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( true ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 41 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( -1023827911 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + + + 4 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-7.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-7.expected index 6d7802d4e..ee441adb4 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-7.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-7.expected @@ -25,13 +25,22 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 77 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -1940095024 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 77 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( -1940095024 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + + + 4 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-8.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-8.expected index c2dccad40..e90712abe 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-8.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-8.expected @@ -25,13 +25,22 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 189 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 1985542055 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 189 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( 1985542055 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + + + 4 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-9.expected b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-9.expected index cf31f963d..5a8b10167 100644 --- a/kmir/src/tests/integration/data/run-smir-random/simple-types/init-9.expected +++ b/kmir/src/tests/integration/data/run-smir-random/simple-types/init-9.expected @@ -25,13 +25,22 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 191 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -1000150020 , 32 , true ) , ty ( 8 ) , mutabilityNot ) ) + ListItem ( 0 ) + ListItem ( 1 ) + ListItem ( 2 ) + ListItem ( 3 ) .List + + 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) + 1 |-> typedValue ( BoolVal ( false ) , ty ( 18 ) , mutabilityNot ) + 2 |-> typedValue ( Integer ( 191 , 8 , false ) , ty ( 9 ) , mutabilityNot ) + 3 |-> typedValue ( Integer ( -1000150020 , 32 , true ) , ty ( 8 ) , mutabilityNot ) + + + 4 + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i128.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i128.expected index 8ebaab361..912bde598 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i128.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i128.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpAddUnchecked , Integer ( ARG_INT1:Int , 128 , true ) , Intege │ span: 301 @@ -15,7 +15,7 @@ ┃ │ Integer ( truncate ( ARG_INT1:Int +Int ARG_INT2:Int , 128 , Signed ) , 128 , tru ┃ │ span: 301 ┃ │ -┃ │ (70 steps) +┃ │ (74 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i16.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i16.expected index 469e3ebff..dc556d4c6 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i16.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i16.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpAddUnchecked , Integer ( ARG_INT1:Int , 16 , true ) , Integer │ span: 115 @@ -15,7 +15,7 @@ ┃ │ Integer ( truncate ( ARG_INT1:Int +Int ARG_INT2:Int , 16 , Signed ) , 16 , true ┃ │ span: 115 ┃ │ -┃ │ (70 steps) +┃ │ (74 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i32.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i32.expected index c23b7ba5e..739b8b981 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i32.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i32.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpAddUnchecked , Integer ( ARG_INT1:Int , 32 , true ) , Integer │ span: 146 @@ -15,7 +15,7 @@ ┃ │ Integer ( truncate ( ARG_INT1:Int +Int ARG_INT2:Int , 32 , Signed ) , 32 , true ┃ │ span: 146 ┃ │ -┃ │ (70 steps) +┃ │ (74 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i64.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i64.expected index 57dd3469d..9ecb279f8 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i64.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i64.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpAddUnchecked , Integer ( ARG_INT1:Int , 64 , true ) , Integer │ span: 177 @@ -15,7 +15,7 @@ ┃ │ Integer ( truncate ( ARG_INT1:Int +Int ARG_INT2:Int , 64 , Signed ) , 64 , true ┃ │ span: 177 ┃ │ -┃ │ (70 steps) +┃ │ (74 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i8.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i8.expected index 16b2aeed4..9247da9e5 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i8.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_i8.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpAddUnchecked , Integer ( ARG_INT1:Int , 8 , true ) , Integer │ span: 53 @@ -15,7 +15,7 @@ ┃ │ Integer ( truncate ( ARG_INT1:Int +Int ARG_INT2:Int , 8 , Signed ) , 8 , true ) ┃ │ span: 53 ┃ │ -┃ │ (70 steps) +┃ │ (74 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u128.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u128.expected index 40d83226c..1fe1eccc4 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u128.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u128.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpAddUnchecked , Integer ( ARG_UINT1:Int , 128 , false ) , Inte │ span: 332 @@ -15,7 +15,7 @@ ┃ │ Integer ( ARG_UINT1:Int +Int ARG_UINT2:Int &Int 34028236692093846346337460743176 ┃ │ span: 332 ┃ │ -┃ │ (70 steps) +┃ │ (74 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u16.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u16.expected index 97948e0a6..0a4fec244 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u16.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u16.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpAddUnchecked , Integer ( ARG_UINT1:Int , 16 , false ) , Integ │ span: 208 @@ -16,7 +16,7 @@ ~> #freezer ┃ │ span: 208 ┃ │ -┃ │ (70 steps) +┃ │ (74 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u32.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u32.expected index 1680f4224..542ab06f3 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u32.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u32.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpAddUnchecked , Integer ( ARG_UINT1:Int , 32 , false ) , Integ │ span: 239 @@ -16,7 +16,7 @@ ~> #fr ┃ │ span: 239 ┃ │ -┃ │ (70 steps) +┃ │ (74 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u64.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u64.expected index 412ad1c08..4918e4f7f 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u64.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u64.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpAddUnchecked , Integer ( ARG_UINT1:Int , 64 , false ) , Integ │ span: 270 @@ -15,7 +15,7 @@ ┃ │ Integer ( ARG_UINT1:Int +Int ARG_UINT2:Int &Int 18446744073709551615 , 64 , fals ┃ │ span: 270 ┃ │ -┃ │ (70 steps) +┃ │ (74 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u8.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u8.expected index bd0e55614..1799ceb87 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u8.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_add-fail.unchecked_add_u8.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpAddUnchecked , Integer ( ARG_UINT1:Int , 8 , false ) , Intege │ span: 84 @@ -16,7 +16,7 @@ ~> #freezer#se ┃ │ span: 84 ┃ │ -┃ │ (70 steps) +┃ │ (74 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i128.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i128.expected index 57eaa182d..c78731446 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i128.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i128.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpShlUnchecked , Integer ( ARG_INT1:Int , 128 , true ) , Intege │ span: 274 @@ -15,7 +15,7 @@ ┃ │ Integer ( truncate ( ARG_INT1:Int < .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i16.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i16.expected index 7d5a42edc..c7ca9eb28 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i16.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i16.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpShlUnchecked , Integer ( ARG_INT1:Int , 16 , true ) , Integer │ span: 112 @@ -15,7 +15,7 @@ ┃ │ Integer ( truncate ( ARG_INT1:Int < .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i32.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i32.expected index 052ceb2ce..5564dbc57 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i32.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i32.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpShlUnchecked , Integer ( ARG_INT1:Int , 32 , true ) , Integer │ span: 139 @@ -15,7 +15,7 @@ ┃ │ Integer ( truncate ( ARG_INT1:Int < .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i64.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i64.expected index d2eb45316..26ce0afa0 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i64.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i64.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpShlUnchecked , Integer ( ARG_INT1:Int , 64 , true ) , Integer │ span: 166 @@ -15,7 +15,7 @@ ┃ │ Integer ( truncate ( ARG_INT1:Int < .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i8.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i8.expected index d62c1b8b2..1106bfc46 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i8.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_i8.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpShlUnchecked , Integer ( ARG_INT1:Int , 8 , true ) , Integer │ span: 58 @@ -15,7 +15,7 @@ ┃ │ Integer ( truncate ( ARG_INT1:Int < .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u128.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u128.expected index 29fbeb3d1..fc2ccbc24 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u128.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u128.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpShlUnchecked , Integer ( ARG_UINT1:Int , 128 , false ) , Inte │ span: 301 @@ -15,7 +15,7 @@ ┃ │ Integer ( ARG_UINT1:Int < .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u16.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u16.expected index f188b583b..822ed41e8 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u16.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u16.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpShlUnchecked , Integer ( ARG_UINT1:Int , 16 , false ) , Integ │ span: 193 @@ -16,7 +16,7 @@ ~> #free ┃ │ span: 193 ┃ │ -┃ │ (110 steps) +┃ │ (114 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u32.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u32.expected index cf5f2c5dd..cfd272257 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u32.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u32.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpShlUnchecked , Integer ( ARG_UINT1:Int , 32 , false ) , Integ │ span: 220 @@ -16,7 +16,7 @@ ~> ┃ │ span: 220 ┃ │ -┃ │ (110 steps) +┃ │ (114 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u64.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u64.expected index 6ed421f4d..416b39653 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u64.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u64.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpShlUnchecked , Integer ( ARG_UINT1:Int , 64 , false ) , Integ │ span: 247 @@ -15,7 +15,7 @@ ┃ │ Integer ( ARG_UINT1:Int < .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u8.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u8.expected index 1ffb3dc3e..910f279d1 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u8.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shl-fail.unchecked_shl_u8.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (60 steps) ├─ 3 │ #applyBinOp ( binOpShlUnchecked , Integer ( ARG_UINT1:Int , 8 , false ) , Intege │ span: 85 @@ -16,7 +16,7 @@ ~> #freezer ┃ │ span: 85 ┃ │ -┃ │ (110 steps) +┃ │ (114 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ From e1bac7c5da2db75d289db10d6979b0ffffc41b5b Mon Sep 17 00:00:00 2001 From: Stevengre Date: Sun, 19 Apr 2026 12:13:30 +0000 Subject: [PATCH 18/19] test(kmir): refresh symbolic args fixtures --- .../data/modules/test-add-module-multiple.k | 10 ++++- .../data/modules/test-add-module.k | 10 ++++- .../data/modules/test-add-module.md | 10 ++++- ...c-args-fail.main.cli-stats-leaves.expected | 36 ------------------ .../show/symbolic-args-fail.main.expected | 16 -------- ...d => symbolic-args.eats_all_args.expected} | 0 ...mbolic-args.main.cli-stats-leaves.expected | 38 +++++++++++++++++++ .../prove-rs/show/symbolic-args.main.expected | 14 +++++++ ...symbolic-args-fail.rs => symbolic-args.rs} | 2 - kmir/src/tests/integration/test_cli.py | 8 ++-- .../src/tests/integration/test_integration.py | 4 +- 11 files changed, 82 insertions(+), 66 deletions(-) delete mode 100644 kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.cli-stats-leaves.expected delete mode 100644 kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.expected rename kmir/src/tests/integration/data/prove-rs/show/{symbolic-args-fail.eats_all_args.expected => symbolic-args.eats_all_args.expected} (100%) create mode 100644 kmir/src/tests/integration/data/prove-rs/show/symbolic-args.main.cli-stats-leaves.expected create mode 100644 kmir/src/tests/integration/data/prove-rs/show/symbolic-args.main.expected rename kmir/src/tests/integration/data/prove-rs/{symbolic-args-fail.rs => symbolic-args.rs} (93%) diff --git a/kmir/src/tests/integration/data/modules/test-add-module-multiple.k b/kmir/src/tests/integration/data/modules/test-add-module-multiple.k index eea9602de..caaa7a526 100644 --- a/kmir/src/tests/integration/data/modules/test-add-module-multiple.k +++ b/kmir/src/tests/integration/data/modules/test-add-module-multiple.k @@ -28,12 +28,18 @@ module TEST-ADD-MODULE ( UNWIND_CELL => unwindActionContinue ) - ListItem ( newLocal ( ty ( ( 0 => 1 ) ) , ( mutabilityNot => mutabilityMut ) ) ) + ListItem ( ( 0 => 1 ) ) - ( .List => ListItem ( StackFrame ( CALLER_CELL:Ty , DEST_CELL:Place , TARGET_CELL:MaybeBasicBlockIdx , UNWIND_CELL:UnwindAction , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ) ) ) + ( .List => ListItem ( StackFrame ( CALLER_CELL:Ty , DEST_CELL:Place , TARGET_CELL:MaybeBasicBlockIdx , UNWIND_CELL:UnwindAction , ListItem ( 0 ) ) ) ) + + ( 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) => 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) 1 |-> newLocal ( ty ( 1 ) , mutabilityMut ) ) + + + ( 1 => 2 ) + [priority(20), label(BASIC-BLOCK-1-TO-3)] diff --git a/kmir/src/tests/integration/data/modules/test-add-module.k b/kmir/src/tests/integration/data/modules/test-add-module.k index fe59569cc..f020da791 100644 --- a/kmir/src/tests/integration/data/modules/test-add-module.k +++ b/kmir/src/tests/integration/data/modules/test-add-module.k @@ -28,12 +28,18 @@ module TEST-ADD-MODULE ( UNWIND_CELL => unwindActionContinue ) - ListItem ( newLocal ( ty ( ( 0 => 1 ) ) , ( mutabilityNot => mutabilityMut ) ) ) + ListItem ( ( 0 => 1 ) ) - ( .List => ListItem ( StackFrame ( CALLER_CELL:Ty , DEST_CELL:Place , TARGET_CELL:MaybeBasicBlockIdx , UNWIND_CELL:UnwindAction , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ) ) ) + ( .List => ListItem ( StackFrame ( CALLER_CELL:Ty , DEST_CELL:Place , TARGET_CELL:MaybeBasicBlockIdx , UNWIND_CELL:UnwindAction , ListItem ( 0 ) ) ) ) + + ( 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) => 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) 1 |-> newLocal ( ty ( 1 ) , mutabilityMut ) ) + + + ( 1 => 2 ) + [priority(20), label(BASIC-BLOCK-1-TO-3)] diff --git a/kmir/src/tests/integration/data/modules/test-add-module.md b/kmir/src/tests/integration/data/modules/test-add-module.md index 06776ba27..3d59f5537 100644 --- a/kmir/src/tests/integration/data/modules/test-add-module.md +++ b/kmir/src/tests/integration/data/modules/test-add-module.md @@ -31,12 +31,18 @@ module TEST-ADD-MODULE ( UNWIND_CELL => unwindActionContinue ) - ListItem ( newLocal ( ty ( ( 0 => 1 ) ) , ( mutabilityNot => mutabilityMut ) ) ) + ListItem ( ( 0 => 1 ) ) - ( .List => ListItem ( StackFrame ( CALLER_CELL:Ty , DEST_CELL:Place , TARGET_CELL:MaybeBasicBlockIdx , UNWIND_CELL:UnwindAction , ListItem ( newLocal ( ty ( 0 ) , mutabilityNot ) ) ) ) ) + ( .List => ListItem ( StackFrame ( CALLER_CELL:Ty , DEST_CELL:Place , TARGET_CELL:MaybeBasicBlockIdx , UNWIND_CELL:UnwindAction , ListItem ( 0 ) ) ) ) + + ( 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) => 0 |-> newLocal ( ty ( 0 ) , mutabilityNot ) 1 |-> newLocal ( ty ( 1 ) , mutabilityMut ) ) + + + ( 1 => 2 ) + [priority(20), label(BASIC-BLOCK-1-TO-3)] diff --git a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.cli-stats-leaves.expected b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.cli-stats-leaves.expected deleted file mode 100644 index 4dd504fc2..000000000 --- a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.cli-stats-leaves.expected +++ /dev/null @@ -1,36 +0,0 @@ - -┌─ 1 (root, init) -│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC -│ span: src/rust/library/std/src/rt.rs:194 -│ -│ (576 steps) -└─ 3 (stuck, leaf) - #prepareTerminatorCall ( ty ( 38 ) , monoItemFn ( ... name: symbol ( "_ZN4core9p - function: main - span: no-location:0 - - -┌─ 2 (root, leaf, target, terminal) -│ #EndProgram ~> .K - - - -STATISTICS ------------ -Total nodes: 1 - -Node roles (exclusive): - failing : 1 ids: 3 - (root nodes omitted from totals: 1, 2) - -Leaf paths from init: - total leaves (non-root): 1 - reachable leaves : 1 - total steps : 576 - - leaf 3: steps 576, path 1 -> 3 - -LEAF CELLS ---------------- -Node 3: - #prepareTerminatorCall ( ty ( 38 ) , monoItemFn ( ... name: symbol ( "_ZN4core9panicking5panic17hE" ) , id: defId ( 38 ) , body: noBody ) , operandConstant ( constOperand ( ... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst ( ... kind: constantKindAllocated ( allocation ( ... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap ( ... ptrs: provenanceMapEntry ( ... offset: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 39 ) , id: mirConstId ( 25 ) ) ) ) .Operands , place ( ... local: local ( 25 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionContinue , span ( 117 ) ) ~> .K \ No newline at end of file diff --git a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.expected deleted file mode 100644 index 3d2a1670d..000000000 --- a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.main.expected +++ /dev/null @@ -1,16 +0,0 @@ - -┌─ 1 (root, init) -│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC -│ span: 0 -│ -│ (576 steps) -└─ 3 (stuck, leaf) - #prepareTerminatorCall ( ty ( 38 ) , monoItemFn ( ... name: symbol ( "_ZN4core9p - function: main - span: 32 - - -┌─ 2 (root, leaf, target, terminal) -│ #EndProgram ~> .K - - diff --git a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.eats_all_args.expected b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args.eats_all_args.expected similarity index 100% rename from kmir/src/tests/integration/data/prove-rs/show/symbolic-args-fail.eats_all_args.expected rename to kmir/src/tests/integration/data/prove-rs/show/symbolic-args.eats_all_args.expected diff --git a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args.main.cli-stats-leaves.expected b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args.main.cli-stats-leaves.expected new file mode 100644 index 000000000..9e976f00a --- /dev/null +++ b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args.main.cli-stats-leaves.expected @@ -0,0 +1,38 @@ + +┌─ 1 (root, init) +│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ span: src/rust/library/std/src/rt.rs:194 +│ +│ (576 steps) +├─ 3 (terminal) +│ #EndProgram ~> .K +│ function: main +│ +┊ constraint: true +┊ subst: ... +└─ 2 (leaf, target, terminal) + #EndProgram ~> .K + + + + +STATISTICS +----------- +Total nodes: 2 + +Node roles (exclusive): + target : 1 ids: 2 + terminal: 1 ids: 3 + (root nodes omitted from totals: 1) + +Leaf paths from init: + total leaves (non-root): 1 + reachable leaves : 1 + total steps : 576 + + leaf 2: steps 576, path 1 -> 3 -> 2 + +LEAF CELLS +--------------- +Node 2: + #EndProgram ~> .K \ No newline at end of file diff --git a/kmir/src/tests/integration/data/prove-rs/show/symbolic-args.main.expected b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args.main.expected new file mode 100644 index 000000000..624a092d3 --- /dev/null +++ b/kmir/src/tests/integration/data/prove-rs/show/symbolic-args.main.expected @@ -0,0 +1,14 @@ + +┌─ 1 (root, init) +│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ span: 0 +│ +│ (576 steps) +├─ 3 (terminal) +│ #EndProgram ~> .K +│ function: main +│ +┊ constraint: true +┊ subst: ... +└─ 2 (leaf, target, terminal) + #EndProgram ~> .K diff --git a/kmir/src/tests/integration/data/prove-rs/symbolic-args-fail.rs b/kmir/src/tests/integration/data/prove-rs/symbolic-args.rs similarity index 93% rename from kmir/src/tests/integration/data/prove-rs/symbolic-args-fail.rs rename to kmir/src/tests/integration/data/prove-rs/symbolic-args.rs index eca505036..af235308e 100644 --- a/kmir/src/tests/integration/data/prove-rs/symbolic-args-fail.rs +++ b/kmir/src/tests/integration/data/prove-rs/symbolic-args.rs @@ -49,6 +49,4 @@ fn main() { let mut a1 = [1, 2, 3]; let a2 = [1, 2, 3]; eats_all_args(1, &mut x2, true, my1, e4, &mut a1, &a2, &mut [my2, my3], &my4 as *const MyStruct<'_>); - - assert!(false); // makes the test with main fail, as the other one also fails } diff --git a/kmir/src/tests/integration/test_cli.py b/kmir/src/tests/integration/test_cli.py index 9396e5fc5..0cc2a1bbe 100644 --- a/kmir/src/tests/integration/test_cli.py +++ b/kmir/src/tests/integration/test_cli.py @@ -19,7 +19,7 @@ PROVE_DIR = (Path(__file__).parent / 'data' / 'prove-rs').resolve(strict=True) MODULES_DIR = (Path(__file__).parent / 'data' / 'modules').resolve(strict=True) # Repo root: used to normalise absolute paths in expected-output snapshots so -# they don't differ between local checkouts and CI (e.g. symbolic-args-fail.main.cli-stats-leaves). +# they don't differ between local checkouts and CI (e.g. symbolic-args.main.cli-stats-leaves). _REPO_ROOT = str(Path(__file__).resolve().parents[4]) _PATH_REPLACEMENTS: dict[str, str] = {_REPO_ROOT + '/': '/'} @@ -84,10 +84,10 @@ def test_cli_show_printers_snapshot( 'src,start_symbol,is_smir', [ pytest.param( - (PROVE_DIR / 'symbolic-args-fail.rs'), + (PROVE_DIR / 'symbolic-args.rs'), 'main', False, - id='symbolic-args-fail.main', + id='symbolic-args.main', ), pytest.param( (Path(__file__).parent / 'data' / 'exec-smir' / 'niche-enum' / 'niche-enum.smir.json').resolve(strict=True), @@ -242,7 +242,7 @@ def test_cli_show_to_module( def test_cli_show_minimize_proof(kmir: KMIR, tmp_path: Path, capsys: pytest.CaptureFixture[str]) -> None: """Test --minimize-proof option.""" - rs_file = PROVE_DIR / 'symbolic-args-fail.rs' + rs_file = PROVE_DIR / 'symbolic-args.rs' start_symbol = 'main' # Use limited depth to create a partial proof with intermediate nodes that can be minimized apr_proof = _prove_and_store(kmir, rs_file, tmp_path, start_symbol=start_symbol, is_smir=False, max_depth=5) diff --git a/kmir/src/tests/integration/test_integration.py b/kmir/src/tests/integration/test_integration.py index 790159d86..cbef87bc7 100644 --- a/kmir/src/tests/integration/test_integration.py +++ b/kmir/src/tests/integration/test_integration.py @@ -29,7 +29,7 @@ PROVE_FILES = list(PROVE_DIR.glob('*.*')) PROVE_START_SYMBOLS = { 'slotstore-symbolic-branch': ['caller'], - 'symbolic-args-fail': ['main', 'eats_all_args'], + 'symbolic-args': ['main', 'eats_all_args'], 'symbolic-structs-fail': ['eats_struct_args'], 'unchecked_arithmetic': ['unchecked_add_i32', 'unchecked_sub_usize', 'unchecked_mul_isize'], 'checked_arithmetic-fail': ['checked_add_i32'], @@ -50,7 +50,7 @@ 'iter_next_3', 'assert_eq_exp', 'bitwise-not-shift', - 'symbolic-args-fail', + 'symbolic-args', 'symbolic-structs-fail', 'checked_arithmetic-fail', 'offset-u8-fail', From b5e7cf4ceed66978e337042744473cf0d2d16bfb Mon Sep 17 00:00:00 2001 From: Stevengre Date: Sun, 19 Apr 2026 13:00:26 +0000 Subject: [PATCH 19/19] test(kmir): update break-on-function snapshot --- ...unction.main.cli-break-on-function.expected | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/kmir/src/tests/integration/data/prove-rs/show/break-on-function.main.cli-break-on-function.expected b/kmir/src/tests/integration/data/prove-rs/show/break-on-function.main.cli-break-on-function.expected index 59a3b1f2a..c09afbfd8 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/break-on-function.main.cli-break-on-function.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/break-on-function.main.cli-break-on-function.expected @@ -3,33 +3,33 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: src/rust/library/std/src/rt.rs:194 │ -│ (7 steps) +│ (9 steps) ├─ 3 -│ #execTerminatorCall ( ty ( 31 ) , monoItemFn ( ... name: symbol ( "foo" ) , id: +│ #execTerminatorCall ( callableFn , "foo" , .List , body ( ... blocks: basicBlock │ function: main │ span: /prove-rs/break-on-function.rs:4 │ │ (1 step) ├─ 4 -│ #setUpCalleeData ( monoItemFn ( ... name: symbol ( "foo" ) , id: defId ( 7 ) , b +│ #execBlock ( basicBlock ( ... statements: .Statements , terminator: terminator ( │ function: foo │ span: /prove-rs/break-on-function.rs:4 │ -│ (5 steps) +│ (9 steps) ├─ 5 -│ #execTerminatorCall ( ty ( 26 ) , monoItemFn ( ... name: symbol ( "std::hint::bl +│ #execTerminatorCall ( callableFn , "std::hint::black_box::" , ListItem (Int │ function: foo │ span: /rust/library/core/src/hint.rs:389 │ │ (1 step) ├─ 6 -│ #setUpCalleeData ( monoItemFn ( ... name: symbol ( "std::hint::black_box::" +│ #execBlock ( basicBlock ( ... statements: .Statements , terminator: terminator ( │ function: std::hint::black_box:: │ span: /rust/library/core/src/hint.rs:389 │ -│ (12 steps) +│ (3 steps) ├─ 7 -│ #execTerminatorCall ( ty ( 25 ) , IntrinsicFunction ( symbol ( "black_box" ) ) , +│ #prepareTerminatorCall ( ty ( 25 ) , IntrinsicFunction ( symbol ( "black_box" ) │ function: std::hint::black_box:: │ span: /rust/library/core/src/hint.rs:389 │ @@ -39,7 +39,7 @@ │ function: std::hint::black_box:: │ span: /rust/library/core/src/hint.rs:389 │ -│ (41 steps) +│ (44 steps) ├─ 9 (terminal) │ #EndProgram ~> .K │ function: main