diff --git a/docs/cse-spec.md b/docs/cse-spec.md new file mode 100644 index 000000000..9bf580b34 --- /dev/null +++ b/docs/cse-spec.md @@ -0,0 +1,364 @@ +# CSE (Compositional Symbolic Execution) Specification + +## 1. Overview + +CSE enables modular verification of MIR programs by: +1. **Summarizing** callee functions as rewrite rules (pre-condition → post-condition) +2. **Reusing** those summaries in caller proofs to skip re-executing callee internals + +**Prerequisite**: This specification assumes the `slotStore` refactor (PR #1059), where runtime locals are stored in a global `` map keyed by stable slot handles, and `Value::Reference` uses `slotPlace(SLOT, projections)` instead of stack-relative offsets. + +A summary is a **K rewrite rule** that matches a function call by name and rewrites it to the function's effect: + +```k +rule #execTerminatorCall(_, FUNC, ARGS, DEST, TARGET, _UNWIND, _SPAN) + => #setLocalValue(DEST, RET_VALUE) ~> #execBlockIdx(TARGET) + + ... SLOT_A |-> VAL_A SLOT_B |-> VAL_B ... + requires #functionName(FUNC) ==String "package::module::function_name" + andBool PATH_CONSTRAINTS + [priority(30)] +``` + +This is structurally identical to how p-token cheatcodes work (e.g., `cheatcode_is_account`). CSE summaries are **automatically generated cheatcodes**. + +## 2. Definitions + +- **Callee proof**: A standalone proof of a function `f`, producing summaries +- **Summary rule**: A K rewrite rule encoding one execution path of `f` +- **Reachable slot set**: The set of slotStore entries reachable by following reference chains from `f`'s arguments +- **Terminal value**: A value in slotStore that is not a Reference or PtrLocal (the end of a dereference chain) +- **Caller proof**: A proof that uses summary rules instead of re-executing callee bodies +- **Split**: A deterministic branch with mutually exclusive constraints (from `SwitchInt`) +- **Cover**: A leaf node that is subsumed by the target node + +## 3. Why slotStore Enables CSE + +### 3.1 The Problem with Stack-Relative References (Pre-PR #1059) + +Before slotStore, references encoded stack depth: +``` +Reference(offset=2, place(local(3), proj), mut, meta) +``` +- `#traverseProjection` needed `STACK[offset-1]` to dereference +- Callee summaries were bound to a specific caller stack depth +- Summaries could not be reused across different callers + +### 3.2 Slot-Based References (Post-PR #1059) + +After slotStore, references encode a global slot handle: +``` +Reference(slotPlace(SLOT_ID, proj), mut, meta) +``` +- `#traverseProjection` looks up `[SLOT_ID]` — no stack needed +- `WriteTo` is `toSlot(SLOT_ID)` instead of `toStack(FRAME, LOCAL)` +- `#adjustRef` (stack offset adjustment) is eliminated entirely + +### 3.3 Consequence for CSE + +Summary rules only need `` and optionally ``: +- No `` — push/pop is internal to the callee, invisible in the summary +- No `` — `#setLocalValue` internally resolves the caller's frame +- No `` — replaced by slotStore + +## 4. Summary Rule Format + +### 4.1 Function Name Matching + +Summary rules match by **function name**, not by `Ty` (type ID). This follows the cheatcode pattern: + +```k +requires #functionName(FUNC) ==String "pinocchio_token_program::entrypoint::get_account" +``` + +Rationale: `Ty` is a monomorphization-specific key that may differ across compilations. Function names are stable identifiers. + +### 4.2 Pure Function (No SlotStore Side Effects) + +For functions that only read data through references and return a value: + +```k +rule [cse-get_account-path-1]: + #execTerminatorCall(_, FUNC, ARGS, DEST, TARGET, _UNWIND, _SPAN) + => #setLocalValue(DEST, RET_VALUE_1) ~> #execBlockIdx(TARGET) + + + ... + SLOT_A |-> typedValue(ACCT_INFO_VAL, TY_A, MUT_A) + SLOT_B |-> typedValue(PAccountAccount(PACC, IAcc(MINT, OWNER, AMOUNT, DELEGATE, STATE, ...)), TY_B, MUT_B) + ... + + requires #functionName(FUNC) ==String "pinocchio_token_program::entrypoint::get_account" + andBool STATE ==K accountStateInitialized + [priority(30)] +``` + +The `` appears without `=>` — it is read-only. The `...` on both sides enables partial map matching. + +### 4.3 Function with Side Effects + +For functions that modify data through `&mut` references: + +```k +rule [cse-set_delegate-path-1]: + #execTerminatorCall(_, FUNC, ARGS, DEST, TARGET, _UNWIND, _SPAN) + => #setLocalValue(DEST, RET_VALUE_1) ~> #execBlockIdx(TARGET) + + + ... + SLOT_B |-> (typedValue(OLD_ACCOUNT, TY_B, MUT_B) => typedValue(NEW_ACCOUNT, TY_B, MUT_B)) + ... + + requires #functionName(FUNC) ==String "pinocchio_token_interface::state::account::Account::set_delegate" + andBool PATH_CONSTRAINTS + [priority(30)] +``` + +Only the modified slots have `=>` rewrites. Unmodified slots are matched read-only or omitted entirely. + +### 4.4 Reference Chain Resolution for Slot Selection + +To determine which slots appear in a summary rule, follow the reference chain from each argument: + +``` +Argument: operandCopy(place(local(I), proj)) + → evaluates to Reference(slotPlace(SLOT_A, proj_a), ...) + → SLOT_A |-> typedValue(VAL_A, ...) + → if VAL_A contains Reference(slotPlace(SLOT_B, ...), ...) + → SLOT_B |-> typedValue(VAL_B, ...) + → if VAL_B is NOT a Reference/PtrLocal → STOP (terminal value) +``` + +**Rule**: Follow references until reaching a non-reference value. All slots visited along the chain are included in the rule's `` pattern. This is the **reachable slot set**. + +### 4.5 Variable Scoping + +Summary rules must only reference: +- Variables from the caller's argument operands (which resolve to slot handles) +- SlotStore entries in the reachable slot set +- Fresh variables for return values + +Callee-internal variables (temporaries, inner locals) must be eliminated. They are not visible in the summary because: +- Callee's `ownedSlots` are created by `setupCalleeData` and cleaned up on return +- Only the callee's effects on pre-existing slots (via `&mut` references) persist + +## 5. Callee Proof Requirements + +### 5.1 Initial State + +The callee proof starts from a **normalized** initial state: +- Symbolic arguments matching the function signature +- Standard callee setup (`setupCalleeData`) +- Target set to `noBasicBlockIdx` (standalone callee) +- Symbolic `` with entries for argument-reachable slots + +### 5.2 Proof Completion + +A callee proof is **complete** when all leaf nodes are **covers** (subsumed by target) and there are zero stuck nodes. + +### 5.3 Extracting Summary Rules from Cover Paths + +For each cover node `c` in the callee proof: +1. Trace the path from `init` to `c` through the KCFG +2. Collect all path constraints (from splits along the path) +3. Extract the return value from the final state's `RETVAL_CELL` or `locals[0]` +4. Diff the `` between init and final state to identify modified slots +5. Generate a K rule with: + - LHS: `#execTerminatorCall(_, FUNC, ...)` + slotStore pattern (reachable slots) + - RHS: `#setLocalValue(DEST, RET_VALUE) ~> #execBlockIdx(TARGET)` + slotStore updates + - `requires`: function name match + path constraints + +### 5.4 No Cut-Points for Callee Proofs + +Cut-point rules (e.g., `termReturnSome`, `termReturnNone`) must NOT be used. They block all returns including inner function returns. + +## 6. Interaction with pyk APIs + +### 6.1 Summary Rules via `add-module` + +Summary rules are compiled K rules injected into the backend: + +```python +from pyk.kast.inner import KApply, KVariable, KRewrite, KToken +from pyk.kast.outer import KRule, KFlatModule, KImport + +# Build rule for each callee execution path +rules = [] +for path in callee_paths: + rule = KRule( + body=KRewrite(lhs=..., rhs=...), + requires=path.constraints, + ensures=TRUE, + att=KAtt({'priority': '30', 'label': f'cse-{callee_name}-path-{path.id}'}), + ) + rules.append(rule) + +# Inject as module +module = KFlatModule(f'CSE-SUMMARY-{callee_name}', rules, [KImport('KMIR')]) +module_name = cterm_symbolic.add_module(module, name_as_id=True) +``` + +The backend applies these rules automatically during execution. No `custom_step` needed for summary application. + +### 6.2 When `custom_step` IS Needed + +`custom_step` is only needed during the **gen phase** to: +- Observe call sites and record argument patterns +- Trigger callee proving on first encounter + +During the **reuse phase**, `custom_step` is NOT used for summary application — the compiled rules handle it. + +### 6.3 Split vs NDBranch + +When multiple summary rules exist for the same function (one per execution path), the backend produces a **Split** because the rules have mutually exclusive `requires` clauses. This is the correct behavior — callee paths are deterministic branches. + +`custom_step` must NOT return `NDBranch` for summary application. + +## 7. Which Functions to Summarize + +### 7.1 Selection Criteria + +A function should be summarized if: +1. It has a MIR body (not an intrinsic or extern) +2. It is called by at least one function being verified +3. It is "summary-worthy" (not a trivial std-lib wrapper) +4. Its proof completes within reasonable bounds + +### 7.2 Recursive Summarization + +Functions are summarized bottom-up: +1. Leaf functions (no further callees) are summarized first +2. Their summaries are used to prove intermediate functions +3. Intermediate functions are then summarized +4. A function like `process_approve` CAN be summarized once its callees are + +## 8. Correctness Criteria + +### 8.1 Soundness + +For each summary rule `pre => post requires C`: +- Execution of `f` from states satisfying `C` must produce states subsumed by `post` +- The union of all path constraints must cover all reachable inputs + +### 8.2 Structure Preservation + +When a caller proof uses summaries: +- `reuse_splits == baseline_splits` +- `reuse_covers == baseline_covers` +- `reuse_stuck == 0` +- `reuse_ndbranch == 0` + +### 8.3 Completeness + +A summary is complete if it covers all execution paths of the callee. + +## 9. Implementation Phases + +### Phase A: Single-Function Summaries as K Rules + +1. Rebase CSE on PR #1059 (slotStore) +2. Prove callee functions to completion (all covers) +3. Extract pre/post state pairs, diff slotStore +4. Generate K rewrite rules with function name matching and slot patterns +5. Add rules via `add-module` +6. Prove caller with summary rules active +7. Verify: `reuse_splits == baseline_splits`, `reuse_passed == baseline_passed` + +### Phase B: Multi-Level Composition + +1. Summarize leaf functions first +2. Use leaf summaries to prove and summarize intermediate functions +3. Summary cache persists across the verification suite + +### Phase C: Incremental Re-verification + +1. When a callee changes, re-prove only that callee +2. If summary is equivalent, no caller re-verification needed + +## 10. Repository Structure and Branches + +### 10.1 mir-semantics Repository + +| Branch | Purpose | Base | +|--------|---------|------| +| `master` | Upstream baseline | — | +| PR #1059 | slotStore refactor | `master` | +| `feature/cse` | CSE feature | PR #1059 | +| `feature/cse-p-token` | CSE + p-token cheatcodes | `feature/cse` + p-token | + +**Branch policy**: +- `feature/cse` must NOT contain p-token-specific rules +- `feature/cse` is rebased on PR #1059 +- All CSE logic changes go to `feature/cse` first + +### 10.2 solana-token Repository + +| Branch | Purpose | +|--------|---------| +| `feature/cse-eval` | CSE evaluation harness | + +### 10.3 Branch Sync Flow + +``` +master ──> PR#1059 (slotStore) ──> feature/cse ──> feature/cse-p-token + | + (embedded in solana-token/feature/cse-eval) +``` + +## 11. Validation and Acceptance Testing + +### 11.1 Unit-Level Validation (mir-semantics) + +**Test**: `test_prove[cse-multi-function]` + +Validates: +- CSE proof passes +- Summary generated as K rules (not frontier configs) +- Reuse produces Split (not NDBranch) +- Structure matches baseline + +### 11.2 Integration Validation (p-token) + +**Hard acceptance criteria** (all must hold): + +| # | Criterion | Failure meaning | +|---|-----------|-----------------| +| H1 | CSE reuse PASSES when baseline PASSES | Summary unsound | +| H2 | `reuse_splits == baseline_splits` | Summary loses branches | +| H3 | `reuse_stuck == 0` | Summary incomplete | +| H4 | `reuse_ndbranch == 0` | Using NDBranch instead of Split | +| H5 | Summary rules are K rules via `add-module` | Not compiled rules | +| H6 | Callee proofs have covers, no stuck | Callee proof incomplete | + +**Soft optimization targets**: + +| # | Target | Goal | +|---|--------|------| +| S1 | Per-test speedup | > 1.0x | +| S2 | Geomean speedup | > 3x | +| S3 | Booster fast path | 100% | + +### 11.3 Reproducer Tests + +| Reproducer | Tests | +|------------|-------| +| `cse-multi-function.rs` | Basic summary gen + reuse | +| `cse-branching-callee.rs` | Multiple paths → multiple rules → Split | +| `cse-reference-args.rs` | Reference arguments, slotStore pattern matching | +| `cse-side-effects.rs` | `&mut` reference modifications → slotStore diff | + +## 12. Paper Artifacts + +```bash +cd ~/solana-token-cse-eval/p-token/test-properties +python3 evaluate_cse.py --suite all +``` + +Generates: `cse_evaluation_results.json`, `cse_paper_table.csv`, `cse_paper_table.tex` + +## 13. Non-Goals (Current Scope) + +- Loop summarization (loops are unrolled) +- Concurrent/parallel verification +- Summary inference from tests or specifications +- Cross-crate summary sharing (summaries are per-SMIR) diff --git a/kmir/src/kmir/_cse.py b/kmir/src/kmir/_cse.py new file mode 100644 index 000000000..a2218c8af --- /dev/null +++ b/kmir/src/kmir/_cse.py @@ -0,0 +1,633 @@ +"""Compositional Symbolic Execution (CSE) for KMIR. + +Summary rules are K rewrite rules that match function calls by name and +rewrite them to the function's effect, following the same pattern as +p-token cheatcodes. Rules are injected via ``add-module`` and applied +by the backend automatically — no ``custom_step`` needed for reuse. + +Requires the slotStore refactor (PR #1059). +""" +from __future__ import annotations + +import json +import logging +import time +from dataclasses import dataclass, field +from pathlib import Path +from typing import TYPE_CHECKING + +from pyk.cterm import CTerm +from pyk.kast.inner import KApply, KRewrite, KSequence, KSort, KToken, KVariable, Subst +from pyk.kast.att import Atts as AttKeys +from pyk.kast.att import AttEntry, KAtt +from pyk.kast.outer import KFlatModule, KImport, KRule +from pyk.kast.prelude.ml import mlAnd, mlEqualsTrue +from pyk.proof.reachability import APRProof + +from .kast import SymbolicMode, make_call_config +from .kmir import KMIR, KMIRSemantics + +if TYPE_CHECKING: + from collections.abc import Mapping + + from pyk.cterm import CTerm + from pyk.kast.inner import KInner + from pyk.kcfg import KCFG + + from .options import ProveOpts + from .smir import SMIRInfo, Ty + +_LOGGER = logging.getLogger(__name__) + + +# --------------------------------------------------------------------------- +# Data classes +# --------------------------------------------------------------------------- + + +@dataclass +class CoverPath: + """One execution path through a callee, extracted from a cover node.""" + + node_id: int + constraints: tuple[KInner, ...] + return_value: KInner | None + slot_reads: dict[int, KInner] # slot_handle -> value (read-only) + slot_diffs: dict[int, tuple[KInner, KInner]] # slot_handle -> (old, new) + + +@dataclass +class CalleeSummary: + """Summary for one callee function: a set of K rules.""" + + name: str + rules: list[KRule] = field(default_factory=list) + module: KFlatModule | None = None + prove_time: float = 0.0 + num_covers: int = 0 + num_stuck: int = 0 + + +@dataclass +class CSEResult: + """Result of a full CSE prove run.""" + + final_proof: APRProof | None = None + callee_summaries: dict[str, CalleeSummary] = field(default_factory=dict) + summary_modules: list[KFlatModule] = field(default_factory=list) + + +# --------------------------------------------------------------------------- +# Phase 1: Callee Proof +# --------------------------------------------------------------------------- + + +def prove_callee( + kmir: KMIR, + smir_info: SMIRInfo, + callee_name: str, + *, + proof_dir: Path | None = None, + max_iterations: int = 1000, + max_depth: int = 10000, + init_subst: dict[str, KInner] | None = None, +) -> APRProof: + """Prove a callee function to completion (standalone, no caller context). + + Args: + init_subst: Optional substitution to apply to the init cterm's config. + Use this to pre-condition the symbolic state, e.g. replacing raw + Aggregate slots with domain-specific sorts like PAccountMint. + """ + from ._prove import _prove_sequential + + proof_id = f'cse-callee.{_sanitize_name(callee_name)}' + proof = _make_callee_proof(kmir, smir_info, callee_name, proof_id, proof_dir=proof_dir, init_subst=init_subst) + + from .options import ProveOpts + + opts = ProveOpts( + rs_file=Path('/dev/null'), # not used by _prove_sequential + max_iterations=max_iterations, + max_depth=max_depth, + ) + _prove_sequential( + kmir, + proof, + opts=opts, + label=f'cse-callee-{callee_name}', + cut_point_rules=[], # no cut-points for callee proofs + ) + return proof + + +def _make_callee_proof( + kmir: KMIR, + smir_info: SMIRInfo, + callee_name: str, + proof_id: str, + *, + proof_dir: Path | None = None, + init_subst: dict[str, KInner] | None = None, +) -> APRProof: + """Create an APRProof for a standalone callee function.""" + from pyk.kast.manip import abstract_term_safely, set_cell, split_config_from + + lhs_config, constraints = make_call_config( + kmir.definition, + smir_info=smir_info, + start_symbol=callee_name, + mode=SymbolicMode(), + ) + + # Apply optional substitution to pre-condition the symbolic state + if init_subst: + for cell_name, value in init_subst.items(): + lhs_config = set_cell(lhs_config, cell_name, value) + + lhs = CTerm(lhs_config, constraints) + + var_config, var_subst = split_config_from(lhs_config) + _rhs_subst: dict[str, KInner] = { + v_name: abstract_term_safely(KVariable('_'), base_name=v_name) for v_name in var_subst + } + _rhs_subst['K_CELL'] = KSequence([KMIR.Symbols.END_PROGRAM]) + rhs = CTerm(Subst(_rhs_subst)(var_config)) + + from pyk.kcfg import KCFG + + kcfg = KCFG() + init_node = kcfg.create_node(lhs) + target_node = kcfg.create_node(rhs) + return APRProof(proof_id, kcfg, [], init_node.id, target_node.id, {}, proof_dir=proof_dir) + + +# --------------------------------------------------------------------------- +# Phase 2: Summary Rule Generation +# --------------------------------------------------------------------------- + + +def extract_cover_paths(proof: APRProof) -> list[CoverPath]: + """Extract execution paths from callee proof cover nodes.""" + kcfg = proof.kcfg + init_node = kcfg.node(proof.init) + paths: list[CoverPath] = [] + + for cover in kcfg.covers(): + if cover.target.id != proof.target: + continue + source_node = cover.source + # Collect path constraints by walking from init to this cover + path_constraints = _collect_path_constraints(kcfg, proof.init, source_node.id) + + # Extract return value from RETVAL_CELL + retval = _extract_return_value(source_node.cterm) + + # Diff slotStore between init and cover + init_store = _extract_slot_store(init_node.cterm) + cover_store = _extract_slot_store(source_node.cterm) + slot_reads, slot_diffs = _diff_slot_stores(init_store, cover_store) + + paths.append( + CoverPath( + node_id=source_node.id, + constraints=tuple(path_constraints), + return_value=retval, + slot_reads=slot_reads, + slot_diffs=slot_diffs, + ) + ) + return paths + + +def _collect_path_constraints(kcfg: KCFG, init_id: int, target_id: int) -> list[KInner]: + """Walk KCFG from init to target, collecting split constraints.""" + # Use BFS to find path + parent: dict[int, int] = {} + split_constraints: dict[int, KInner] = {} + visited = {init_id} + queue = [init_id] + + while queue: + node_id = queue.pop(0) + if node_id == target_id: + break + + # Check edges + for edge in kcfg.edges(source_id=node_id): + child = edge.target.id + if child not in visited: + visited.add(child) + parent[child] = node_id + queue.append(child) + + # Check splits + for split in kcfg.splits(source_id=node_id): + for child_id, csubst in split.splits.items(): + if child_id not in visited: + visited.add(child_id) + parent[child_id] = node_id + # Extract constraint from CSubst + if csubst.constraints: + split_constraints[child_id] = mlAnd(list(csubst.constraints)) + queue.append(child_id) + + # Check covers (target might be reached through a cover) + for cover in kcfg.covers(source_id=node_id): + child = cover.target.id + if child not in visited: + visited.add(child) + parent[child] = node_id + queue.append(child) + + # Trace back from target to init, collecting constraints + constraints: list[KInner] = [] + node = target_id + while node in parent: + if node in split_constraints: + constraints.append(split_constraints[node]) + node = parent[node] + + return list(reversed(constraints)) + + +def _extract_return_value(cterm: CTerm) -> KInner | None: + """Extract the return value from RETVAL_CELL.""" + try: + retval_cell = cterm.cell('RETVAL_CELL') + # retval_cell is return(VAL) with full label name return(_)_KMIR-CONFIGURATION_RetVal_Value + if isinstance(retval_cell, KApply) and 'return' in retval_cell.label.name: + return retval_cell.args[0] + except Exception: + pass + return None + + +def _extract_slot_store(cterm: CTerm) -> KInner: + """Extract the cell from a cterm.""" + return cterm.cell('SLOTSTORE_CELL') + + +def _diff_slot_stores( + init_store: KInner, cover_store: KInner +) -> tuple[dict[int, KInner], dict[int, tuple[KInner, KInner]]]: + """Diff two slotStore maps. Returns (read_only_slots, modified_slots).""" + # For now, return empty diffs — we'll refine this when handling side effects + # The initial implementation targets pure functions (no slotStore modification) + return {}, {} + + +def generate_summary_rules( + callee_name: str, + cover_paths: list[CoverPath], + init_cterm: CTerm, +) -> list[KRule]: + """Generate K rewrite rules from callee cover paths.""" + rules: list[KRule] = [] + + for idx, path in enumerate(cover_paths): + rule = _build_summary_rule(callee_name, path, idx, init_cterm) + if rule is not None: + rules.append(rule) + + return rules + + +_EXEC_TERMINATOR_CALL = '#execTerminatorCall(_,_,_,_,_,_,_)_KMIR-CONTROL-FLOW_KItem_Ty_MonoItemKind_Operands_Place_MaybeBasicBlockIdx_UnwindAction_Span' +_SET_LOCAL_VALUE = '#setLocalValue(_,_)_RT-DATA_KItem_Place_Evaluation' +_CONTINUE_AT = '#continueAt(_)_KMIR-CONTROL-FLOW_KItem_MaybeBasicBlockIdx' +_GET_FUNCTION_NAME = 'getFunctionName(_)_KMIR-CONTROL-FLOW_String_MonoItemKind' +_EQ_STRING = '_==String__STRING-COMMON_Bool_String_String' + + +def _build_summary_rule( + callee_name: str, + path: CoverPath, + path_idx: int, + init_cterm: CTerm, +) -> KRule | None: + """Build one K rule for a single execution path. + + Uses cterm_build_rule to construct a properly-structured rule from + init CTerm (at function call) → final CTerm (after return). + The init CTerm's K_CELL is #execTerminatorCall(...) and the final + CTerm's K_CELL is #setLocalValue(DEST, RET) ~> #continueAt(TARGET). + """ + from pyk.cterm.cterm import cterm_build_rule + + if path.return_value is None: + _LOGGER.warning(f'CSE: no return value for {callee_name} path {path_idx}, skipping') + return None + + # Variables for the rule + func_var = KVariable('CSE_FUNC') + dest_var = KVariable('CSE_DEST') + target_var = KVariable('CSE_TARGET') + cont_var = KVariable('CSE_CONT') + + # Build init CTerm: same as init_cterm but with K_CELL = #execTerminatorCall ~> CONT + lhs_k = KSequence([ + KApply(_EXEC_TERMINATOR_CALL, [ + KVariable('CSE_TY'), func_var, KVariable('CSE_ARGS'), + dest_var, target_var, KVariable('CSE_UNWIND'), KVariable('CSE_SPAN'), + ]), + cont_var, + ]) + + # Build final CTerm: same config but K_CELL = #setLocalValue(DEST, RET) ~> #continueAt(TARGET) + rhs_k = KSequence([ + KApply(_SET_LOCAL_VALUE, [dest_var, path.return_value]), + KApply(_CONTINUE_AT, [target_var]), + ]) + + # Clone a cheatcode rule's body structure (with cell wildcards like + # _Gen1:RetValCell) and replace only the cell content. + # This ensures the rule matches any caller state. + # The rule is injected via APRProver(extra_module=...) to be part of + # the execution module chain. + from pyk.kast.manip import set_cell + + # Find a cheatcode rule to use as template for cell structure + template_body = _get_cheatcode_template(init_cterm) + if template_body is None: + _LOGGER.warning(f'CSE: no cheatcode template found, cannot build rule for {callee_name}') + return None + + # Replace K_CELL with our call→return rewrite + body = set_cell(template_body, 'K_CELL', KRewrite(lhs_k, rhs_k)) + + # requires: getFunctionName(FUNC) ==String "callee_name" + func_name_check = KApply(_EQ_STRING, [ + KApply(_GET_FUNCTION_NAME, [func_var]), + KToken(f'"{callee_name}"', KSort('String')), + ]) + + rule_label = f'cse-summary-{_sanitize_name(callee_name)}-path-{path_idx}' + + return KRule( + body=body, + requires=func_name_check, + att=KAtt([AttEntry(AttKeys.PRIORITY, '20'), AttEntry(AttKeys.LABEL, rule_label)]), + ) + + +# Cache for cheatcode template body +_cheatcode_template_cache: KInner | None = None + + +def _get_cheatcode_template(init_cterm: CTerm) -> KInner | None: + """Get a cheatcode rule body as template for CSE rules. + + Returns the body with cell wildcards (_Gen1:RetValCell etc.) that + can be reused by replacing only the cell content. + """ + global _cheatcode_template_cache + if _cheatcode_template_cache is not None: + return _cheatcode_template_cache + + # Build template from empty config with cell variables + # This matches the structure used by compiled cheatcode rules + from pyk.kast.manip import split_config_from + + empty_config = init_cterm.config + var_config, var_subst = split_config_from(empty_config) + + # Create cell-sorted wildcard variables (like _Gen1:RetValCell) + from pyk.kast.manip import abstract_term_safely + + template_subst: dict[str, KInner] = {} + for v_name in var_subst: + if v_name == 'K_CELL': + template_subst[v_name] = KVariable('_K_PLACEHOLDER') # will be replaced + else: + # Use underscore-prefixed names for wildcards + template_subst[v_name] = abstract_term_safely(KVariable('_'), base_name=v_name) + + _cheatcode_template_cache = Subst(template_subst)(var_config) + return _cheatcode_template_cache + + +def _sanitize_name(name: str) -> str: + """Sanitize function name for use as K identifiers (module names, rule labels).""" + import re + + result = name.replace('::', '-').replace('<', '').replace('>', '').replace(' ', '').replace('_', '-') + result = re.sub(r'[^a-zA-Z0-9-]', '', result) + # Kore identifiers must start with a letter + if result and not result[0].isalpha(): + result = 'cse' + result + return result + + +def build_summary_module(callee_name: str, rules: list[KRule]) -> KFlatModule: + """Wrap summary rules in a KFlatModule for add-module injection.""" + module_name = f'CSE-SUMMARY-{_sanitize_name(callee_name).upper()}' + return KFlatModule(module_name, sentences=rules, imports=[KImport('KMIR')]) + + +def merge_summary_modules(modules: list[KFlatModule]) -> KFlatModule: + """Merge multiple summary modules into one for use as APRProver extra_module.""" + all_rules: list[KRule] = [] + for mod in modules: + all_rules.extend(r for r in mod.sentences if isinstance(r, KRule)) + return KFlatModule('CSE-ALL-SUMMARIES', sentences=all_rules, imports=[KImport('KMIR')]) + + +# --------------------------------------------------------------------------- +# Phase 3: Pipeline Orchestration +# --------------------------------------------------------------------------- + + +def cse_prove( + opts: ProveOpts, + *, + summary_dir: Path | None = None, + callee_names: list[str] | None = None, +) -> CSEResult: + """Full CSE pipeline: prove callees, generate summaries, prove caller with summaries.""" + from .kompile import kompile_smir + from .smir import SMIRInfo + + result = CSEResult() + t_start = time.time() + + # Load SMIR + smir_path = opts.rs_file + smir_info = SMIRInfo.load(smir_path) + + # Kompile + kmir = kompile_smir(smir_path, smir_info, proof_dir=opts.proof_dir) + + # Determine callees to summarize + if callee_names is None: + callee_names = _find_summary_worthy_callees(smir_info, opts.start_symbol or 'main') + + _LOGGER.info(f'CSE: {len(callee_names)} callees to summarize') + + # Phase 1+2: For each callee, prove and generate summary + for callee_name in callee_names: + summary = _prove_and_summarize_callee( + kmir, smir_info, callee_name, + proof_dir=opts.proof_dir, + ) + result.callee_summaries[callee_name] = summary + if summary.module is not None: + result.summary_modules.append(summary.module) + _LOGGER.info( + f'CSE: {callee_name}: {summary.num_covers} covers, ' + f'{len(summary.rules)} rules, {summary.prove_time:.1f}s' + ) + else: + _LOGGER.warning(f'CSE: {callee_name}: no summary generated') + + # Phase 3: Prove caller with summary modules + _LOGGER.info(f'CSE: proving caller with {len(result.summary_modules)} summary modules') + result.final_proof = _prove_with_summaries( + kmir, smir_info, opts, result.summary_modules, + ) + + elapsed = time.time() - t_start + status = 'PASSED' if result.final_proof and result.final_proof.passed else 'FAILED' + _LOGGER.info(f'CSE: {status} in {elapsed:.1f}s') + return result + + +def _prove_and_summarize_callee( + kmir: KMIR, + smir_info: SMIRInfo, + callee_name: str, + *, + proof_dir: Path | None = None, + init_subst: dict[str, KInner] | None = None, + dep_modules: list[KFlatModule] | None = None, +) -> CalleeSummary: + """Prove a callee and generate summary rules. + + Args: + init_subst: Optional substitution for PAccount pre-conditioning. + dep_modules: Summary modules of sub-callees to inject via add-module + during the callee proof (multi-level composition). + """ + summary = CalleeSummary(name=callee_name) + t0 = time.time() + + if dep_modules: + # Multi-level: prove callee with sub-callee summaries injected + try: + proof = _prove_callee_with_deps( + kmir, smir_info, callee_name, + dep_modules=dep_modules, + init_subst=init_subst, + proof_dir=proof_dir, + ) + except Exception as e: + _LOGGER.warning(f'CSE: callee proof failed for {callee_name}: {e}') + return summary + else: + try: + proof = prove_callee(kmir, smir_info, callee_name, proof_dir=proof_dir, init_subst=init_subst) + except Exception as e: + _LOGGER.warning(f'CSE: callee proof failed for {callee_name}: {e}') + return summary + + summary.prove_time = time.time() - t0 + summary.num_covers = len([c for c in proof.kcfg.covers() if c.target.id == proof.target]) + summary.num_stuck = len([n for n in proof.kcfg.leaves if proof.kcfg.is_stuck(n.id)]) + + if summary.num_covers == 0: + _LOGGER.warning(f'CSE: callee {callee_name} has 0 covers, skipping summary') + return summary + + if summary.num_stuck > 0: + _LOGGER.warning(f'CSE: callee {callee_name} has {summary.num_stuck} stuck nodes') + + # Extract cover paths and generate rules + init_cterm = proof.kcfg.node(proof.init).cterm + cover_paths = extract_cover_paths(proof) + summary.rules = generate_summary_rules(callee_name, cover_paths, init_cterm) + + if summary.rules: + summary.module = build_summary_module(callee_name, summary.rules) + + return summary + + +def _prove_callee_with_deps( + kmir: KMIR, + smir_info: SMIRInfo, + callee_name: str, + *, + dep_modules: list[KFlatModule], + init_subst: dict[str, KInner] | None = None, + proof_dir: Path | None = None, + max_iterations: int = 1000, + max_depth: int = 10000, +) -> APRProof: + """Prove a callee with dependency summary modules injected (multi-level).""" + from pyk.cterm import cterm_symbolic + from pyk.kcfg.explore import KCFGExplore + from pyk.proof.reachability import APRProver + + proof_id = f'cse-callee.{_sanitize_name(callee_name)}' + proof = _make_callee_proof(kmir, smir_info, callee_name, proof_id, proof_dir=proof_dir, init_subst=init_subst) + + merged = merge_summary_modules(dep_modules) + with cterm_symbolic( + kmir.definition, + kmir.definition_dir, + llvm_definition_dir=kmir.llvm_library_dir, + bug_report=kmir.bug_report, + simplify_each=30, + ) as cts: + kcfg_explore = KCFGExplore(cts, kcfg_semantics=KMIRSemantics()) + prover = APRProver(kcfg_explore, execute_depth=max_depth, extra_module=merged) + prover.advance_proof(proof, max_iterations=max_iterations) + + return proof + + +def _prove_with_summaries( + kmir: KMIR, + smir_info: SMIRInfo, + opts: ProveOpts, + summary_modules: list[KFlatModule], +) -> APRProof: + """Prove the main target with summary modules injected via add-module.""" + from pyk.cterm import cterm_symbolic + from pyk.kcfg.explore import KCFGExplore + from pyk.proof.reachability import APRProver + + from ._prove import apr_proof_from_smir + + start_symbol = opts.start_symbol or 'main' + proof_id = f'cse-reuse.{start_symbol}' + proof = apr_proof_from_smir(kmir, proof_id, smir_info, start_symbol=start_symbol, proof_dir=opts.proof_dir) + + merged = merge_summary_modules(summary_modules) if summary_modules else None + with cterm_symbolic( + kmir.definition, + kmir.definition_dir, + llvm_definition_dir=kmir.llvm_library_dir, + bug_report=kmir.bug_report, + simplify_each=30, + ) as cts: + kcfg_explore = KCFGExplore(cts, kcfg_semantics=KMIRSemantics()) + prover = APRProver(kcfg_explore, execute_depth=opts.max_depth, extra_module=merged) + prover.advance_proof( + proof, + max_iterations=opts.max_iterations, + ) + + return proof + + +# --------------------------------------------------------------------------- +# Callee selection +# --------------------------------------------------------------------------- + + +def _find_summary_worthy_callees(smir_info: SMIRInfo, start_symbol: str) -> list[str]: + """Find functions worth summarizing (non-trivial, non-stdlib callees).""" + # For now, return empty — the caller specifies callees explicitly + # TODO: implement call graph analysis and heuristic filtering + return [] 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..3a16fc01b 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), + 'OWNEDSLOTS_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), + 'OWNEDSLOTS_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/cse-support.md b/kmir/src/kmir/kdist/mir-semantics/cse-support.md new file mode 100644 index 000000000..90e883da1 --- /dev/null +++ b/kmir/src/kmir/kdist/mir-semantics/cse-support.md @@ -0,0 +1,16 @@ +# CSE Support + +Helper constructs for Compositional Symbolic Execution summary rules. + +```k +module KMIR-CSE-SUPPORT + imports KMIR-CONTROL-FLOW + imports RT-DATA + + // Helper for value-returning CSE summaries: evaluates the operand first via seqstrict, + // then sets the local to the computed return value. + syntax KItem ::= "#cseReturn" "(" Place "," Evaluation ")" [seqstrict(2), symbol(cseReturn)] + + rule #cseReturn(DEST, VAL:Value) => #setLocalValue(DEST, VAL) ... +endmodule +``` diff --git a/kmir/src/kmir/kdist/mir-semantics/intrinsics.md b/kmir/src/kmir/kdist/mir-semantics/intrinsics.md index 8788d9861..4a4bf0544 100644 --- a/kmir/src/kmir/kdist/mir-semantics/intrinsics.md +++ b/kmir/src/kmir/kdist/mir-semantics/intrinsics.md @@ -89,10 +89,11 @@ Execution gets stuck (no matching rule) when operands have different types or un ```k // Raw eq: dereference operands, extract types, and delegate to typed comparison 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)) + => #execRawEqTyped(PLACE, #withDeref(ARG1), #extractOperandType(#withDeref(ARG1), STORE, SLOTS), + #withDeref(ARG2), #extractOperandType(#withDeref(ARG2), STORE, SLOTS)) ... - LOCALS + SLOTS ... + STORE // Compare values only if types are identical syntax KItem ::= #execRawEqTyped(Place, Evaluation, MaybeTy, Evaluation, MaybeTy) [seqstrict(2,4)] @@ -112,17 +113,17 @@ Execution gets stuck (no matching rule) when operands have different types or un 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(frameLocal(STORE, SLOTS, I)), PROJS) + requires 0 <=Int I andBool I getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS) - requires 0 <=Int I andBool I getTyOf(tyOfLocal(frameLocal(STORE, SLOTS, I)), PROJS) + requires 0 <=Int I andBool I TY - rule #extractOperandType(_, _) => TyUnknown [owise] + rule #extractOperandType(operandConstant(constOperand(_, _, mirConst(_, TY, _))), _, _) => TY + rule #extractOperandType(_, _, _) => TyUnknown [owise] ``` #### Volatile Store (`std::intrinsics::volatile_store`, `std::ptr::write_volatile`) @@ -191,8 +192,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 +203,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..d89987759 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -7,6 +7,9 @@ requires "rt/configuration.md" requires "lemmas/kmir-lemmas.md" requires "cheatcodes.md" requires "intrinsics.md" +requires "cse-support.md" +requires "symbolic/p-token.md" +requires "symbolic/spl-token.md" ``` ## Syntax of MIR in K @@ -104,9 +107,10 @@ will effectively be no-ops at this level). #setLocalValue(PLACE, RVAL) ... - LOCALS - requires 0 <=Int I andBool I SLOTS ... + STORE + requires 0 <=Int I andBool I #execStmt(statement(statementKindAssign(place(local(I), _PROJ) #as PLACE, RVAL), _SPAN)) @@ -114,9 +118,10 @@ will effectively be no-ops at this level). #setLocalValue(PLACE, #evalUnion(RVAL)) ... - LOCALS - requires 0 <=Int I andBool I SLOTS ... + STORE + 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, frameValue(STORE, SLOTS, 0)) ~> #dropSlots(SLOTS) ~> #execBlockIdx(TARGET) _ => CALLER // @@ -230,15 +237,17 @@ 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 // + STORE // remaining call stack (without top frame) - ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK + ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWSLOTS)) STACK => STACK + requires isTypedValue(frameLocal(STORE, SLOTS, 0)) // no value to return, skip writing rule [termReturnNone]: #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _ => - #execBlockIdx(TARGET) + #dropSlots(SLOTS) ~> #execBlockIdx(TARGET) _ => CALLER // @@ -247,10 +256,12 @@ 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 // + STORE // remaining call stack (without top frame) - ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK + ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWSLOTS)) STACK => STACK + requires isNewLocal(frameLocal(STORE, SLOTS, 0)) syntax List ::= #getBlocks( Ty ) [function, total] | #getBlocksAux( MonoItemKind ) [function, total] @@ -284,12 +295,14 @@ The call stack is not necessarily empty at this point so it is left untouched. => #EndProgram - _ => return(VAL) + _ => return(frameValue(STORE, SLOTS, 0)) noBasicBlockIdx - ListItem(typedValue(VAL, _, _)) ... + SLOTS ... + STORE + requires isTypedValue(frameLocal(STORE, SLOTS, 0)) rule [endprogram-no-return]: #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _ @@ -298,9 +311,11 @@ The call stack is not necessarily empty at this point so it is left untouched. noBasicBlockIdx - ListItem(newLocal(_, _)) ... + SLOTS ... + STORE + requires isNewLocal(frameLocal(STORE, SLOTS, 0)) ``` @@ -316,22 +331,23 @@ 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({#projectedCallTy(I, PROJS, STORE, SLOTS)}:>Ty, lookupFunction({#projectedCallTy(I, PROJS, STORE, SLOTS)}:>Ty), ARGS, DEST, TARGET, UNWIND, SPAN) ... - LOCALS - requires isTy(#projectedCallTy(I, PROJS, LOCALS)) + SLOTS ... + STORE + requires isTy(#projectedCallTy(I, PROJS, STORE, SLOTS)) [preserves-definedness] // valid local indexing checked, projected call target must resolve to a Ty - syntax MaybeTy ::= #projectedCallTy(Int, ProjectionElems, List) [function, total] + syntax MaybeTy ::= #projectedCallTy(Int, ProjectionElems, Map, List) [function, total] - rule #projectedCallTy(I, PROJS, LOCALS) - => getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS) - requires 0 <=Int I andBool I getTyOf(tyOfLocal(frameLocal(STORE, SLOTS, I)), PROJS) + requires 0 <=Int I andBool I TyUnknown [owise] + rule #projectedCallTy(_, _, _, _) => TyUnknown [owise] // Intrinsic function call - execute directly without state switching rule [termCallIntrinsic]: @@ -361,9 +377,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 +395,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 +452,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 +465,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 +475,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 #reserveSlots(.LocalDecls) => .K ... - rule #reserveFor(.LocalDecls) => .List - - 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 +512,29 @@ 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), frameValue(STORE, CALLERSLOTS, I)) ... - ListItem(StackFrame(_, _, _, _, CALLERLOCALS)) _:List + ListItem(StackFrame(_, _, _, _, CALLERSLOTS)) _:List + STORE 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), frameValue(STORE, CALLERSLOTS, I)) ... - (ListItem(StackFrame(_, _, _, _, CALLERLOCALS) #as CALLERFRAME => #updateStackLocal(CALLERFRAME, I, Moved))) _:List - + ListItem(StackFrame(_, _, _, _, CALLERSLOTS)) _:List + + STORE => STORE[#frameSlotId(CALLERSLOTS, I) <- typedValue(Moved, tyOfLocal(frameLocal(STORE, CALLERSLOTS, I)), mutabilityMut)] + requires 0 <=Int I - andBool I - #setTupleArgs(2, getValue(LOCALS, TUPLE)) ~> #execBlock(FIRST) + #reserveSlots(NEWLOCALS) ~> #setTupleArgs(2, frameValue(STORE, CALLERSLOTS, TUPLE)) ~> #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]) + + STORE => STORE[#frameSlotId(CALLERSLOTS, TUPLE) <- typedValue(Moved, tyOfLocal(frameLocal(STORE, CALLERSLOTS, TUPLE)), mutabilityMut)] + [#frameSlotId(CALLERSLOTS, CLOSURE) <- typedValue(Moved, tyOfLocal(frameLocal(STORE, CALLERSLOTS, CLOSURE)), mutabilityMut)] + + requires 0 <=Int CLOSURE andBool CLOSURE TypedLocal)) - orBool isFunType(lookupTy(tyOfLocal({LOCALS[CLOSURE]}:>TypedLocal))) + typeInfoVoidType ==K lookupTy(tyOfLocal(frameLocal(STORE, CALLERSLOTS, CLOSURE))) + orBool isFunType(lookupTy(tyOfLocal(frameLocal(STORE, CALLERSLOTS, CLOSURE)))) ) [priority(40), preserves-definedness] @@ -574,31 +594,31 @@ 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), frameValue(STORE, CALLERSLOTS, CLOSURE)) + ~> #setTupleArgs(2, frameValue(STORE, CALLERSLOTS, TUPLE)) ~> #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]) + + STORE => STORE[#frameSlotId(CALLERSLOTS, TUPLE) <- typedValue(Moved, tyOfLocal(frameLocal(STORE, CALLERSLOTS, TUPLE)), mutabilityMut)] + [#frameSlotId(CALLERSLOTS, CLOSURE) <- typedValue(Moved, tyOfLocal(frameLocal(STORE, CALLERSLOTS, CLOSURE)), mutabilityMut)] + + requires 0 <=Int CLOSURE andBool CLOSURE TypedLocal))) - andBool isTy(pointeeTy(lookupTy(tyOfLocal({LOCALS[CLOSURE]}:>TypedLocal)))) + andBool isRefType(lookupTy(tyOfLocal(frameLocal(STORE, CALLERSLOTS, CLOSURE)))) + andBool isTy(pointeeTy(lookupTy(tyOfLocal(frameLocal(STORE, CALLERSLOTS, CLOSURE))))) andBool ( - lookupTy({pointeeTy(lookupTy(tyOfLocal({LOCALS[CLOSURE]}:>TypedLocal)))}:>Ty) ==K typeInfoVoidType - orBool isFunType(lookupTy({pointeeTy(lookupTy(tyOfLocal({LOCALS[CLOSURE]}:>TypedLocal)))}:>Ty)) + lookupTy({pointeeTy(lookupTy(tyOfLocal(frameLocal(STORE, CALLERSLOTS, CLOSURE))))}:>Ty) ==K typeInfoVoidType + orBool isFunType(lookupTy({pointeeTy(lookupTy(tyOfLocal(frameLocal(STORE, CALLERSLOTS, CLOSURE))))}:>Ty)) ) [priority(45), preserves-definedness] @@ -627,7 +647,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) ... ``` @@ -713,4 +733,7 @@ module KMIR imports KMIR-CHEATCODES imports KMIR-INTRINSICS imports KMIR-LEMMAS + imports KMIR-CSE-SUPPORT + imports KMIR-P-TOKEN // cheat codes for p-token + imports KMIR-SPL-TOKEN // SPL-specific cheat codes 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 121ad10f3..efc51bc3d 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,33 @@ 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] + + // `#reserveSlots` grows `ownedSlots` and `` in lockstep. These simplifications + // let `frameLocal` peel away irrelevant tail updates when reading an older local, and + // directly return the newly-added local when the read reaches the matching tail slot. + rule frameLocal(_STORE[SLOT <- LOCAL], SLOTS ListItem(SLOT), size(SLOTS)) => LOCAL + requires isTypedLocal(LOCAL) + [simplification] + + rule frameLocal(STORE[SLOT <- _], SLOTS ListItem(SLOT), IDX) => frameLocal(STORE, SLOTS, IDX) + requires 0 <=Int IDX andBool IDX 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..d187d9307 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 + ownedSlots:List) // runtime slot handles in MIR local order configuration $PGM:KItem @@ -41,10 +43,13 @@ module KMIR-CONFIGURATION place(local(-1), .ProjectionElems) noBasicBlockIdx unwindActionUnreachable - .List + .List // 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..f2b89d8f5 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,60 @@ 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 `ownedSlots` 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 {STORE[SLOT]}:>TypedLocal + requires SLOT in_keys(STORE) + andBool isTypedLocal(STORE[SLOT]) + [preserves-definedness] // valid lookup and sort coercion checked + + syntax TypedLocal ::= frameLocal ( Map, List, Int ) [function] + // --------------------------------------------------------- + rule frameLocal(STORE, SLOTS, IDX) => getSlot(STORE, #frameSlotId(SLOTS, IDX)) + requires 0 <=Int IDX andBool IDX {valueOf({LOCALS[IDX]}:>TypedValue)}:>Value - requires 0 <=Int IDX andBool IDX TypedValue)) + rule getSlotValue(STORE, SLOT) => {valueOf({STORE[SLOT]}:>TypedValue)}:>Value + requires SLOT in_keys(STORE) + andBool isTypedValue(STORE[SLOT]) + andBool isValue(valueOf({STORE[SLOT]}:>TypedValue)) [preserves-definedness] // valid indexing and sort coercion checked + rule frameValue(STORE, SLOTS, IDX) => getSlotValue(STORE, #frameSlotId(SLOTS, IDX)) + requires 0 <=Int IDX andBool IDX VAL + [simplification] + + rule frameValue(STORE[SLOT <- _], SLOTS ListItem(SLOT), IDX) => frameValue(STORE, SLOTS, IDX) + requires 0 <=Int IDX andBool IDX {VALUES[IDX]}:>Value requires 0 <=Int IDX andBool IDX Value) => #Ceil(X) requires isValue(X) [simplification] + ``` ### Evaluating Items to `Value`s @@ -108,9 +135,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 `ownedSlots` 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 +175,14 @@ 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)), frameValue(STORE, SLOTS, I), PROJECTIONS, .Contexts) ~> #readProjection(false) ... - LOCALS - requires 0 <=Int I andBool I SLOTS ... + STORE + requires 0 <=Int I andBool I operandMove(place(local(I), PROJECTIONS)) - => #traverseProjection(toLocal(I), getValue(LOCALS, I), PROJECTIONS, .Contexts) + => #traverseProjection(toSlot(#frameSlotId(SLOTS, I)), frameValue(STORE, SLOTS, I), PROJECTIONS, .Contexts) ~> #readProjection(true) ... - LOCALS - requires 0 <=Int I andBool I SLOTS ... + STORE + 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 ... + + STORE => STORE[SLOT <- typedValue(VAL, tyOfLocal(getSlot(STORE, SLOT)), mutabilityOf(getSlot(STORE, SLOT)))] + + requires SLOT in_keys(STORE) + andBool isTypedValue(getSlot(STORE, SLOT)) + [preserves-definedness] // valid lookup checked + + rule #setSlotValue(SLOT, VAL) => .K ... + + STORE => STORE[SLOT <- typedValue(VAL, tyOfLocal(getSlot(STORE, SLOT)), mutabilityOf(getSlot(STORE, SLOT)))] + + requires SLOT in_keys(STORE) + andBool isNewLocal(getSlot(STORE, SLOT)) + [preserves-definedness] // valid lookup checked + + rule #setLocalValue(place(local(I), .ProjectionElems), VAL:Value) => .K ... + SLOTS ... + + STORE => STORE[#frameSlotId(SLOTS, I) <- typedValue(VAL, tyOfLocal(frameLocal(STORE, SLOTS, I)), mutabilityOf(frameLocal(STORE, SLOTS, I)))] + + requires 0 <=Int I andBool I #setLocalValue(place(local(I), .ProjectionElems), VAL:Value) => .K ... + SLOTS ... + + STORE => STORE[#frameSlotId(SLOTS, I) <- typedValue(VAL, tyOfLocal(frameLocal(STORE, SLOTS, I)), mutabilityOf(frameLocal(STORE, SLOTS, I)))] + + requires 0 <=Int I andBool I #setLocalValue(place(local(I), PROJ), VAL:Value) + => #traverseProjection(toSlot(#frameSlotId(SLOTS, I)), frameValue(STORE, SLOTS, I), PROJ, .Contexts) ~> #writeProjection(VAL) ... - LOCALS + SLOTS ... + STORE 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 +360,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 +379,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 +433,7 @@ This is done without consideration of the validity of the Downcast[^downcast]. ... requires 0 <=Int I andBool I #traverseProjection( @@ -548,18 +523,19 @@ 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(frameValue(STORE, SLOTS, LOCAL))), PROJS, - CtxIndex(ELEMENTS, #expectUsize(getValue(LOCALS, LOCAL))) CTXTS + CtxIndex(ELEMENTS, #expectUsize(frameValue(STORE, SLOTS, LOCAL))) CTXTS ) ... - LOCALS - requires 0 <=Int LOCAL andBool LOCAL SLOTS ... + STORE + requires 0 <=Int LOCAL andBool LOCAL #traverseProjection( @@ -577,7 +553,7 @@ In case of a `ConstantIndex`, the index is provided as an immediate value, toget ... requires 0 <=Int OFFSET andBool OFFSET #traverseProjection( @@ -596,7 +572,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), + getSlotValue(STORE, SLOT), + 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 STORE + requires SLOT in_keys(STORE) + andBool isTypedValue(getSlot(STORE, SLOT)) andBool 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), + getSlotValue(STORE, SLOT), + PLACEPROJ, .Contexts ) - ~> #derefTruncate(SIZE, PROJS) // then truncate, then continue with remaining projections + ~> #derefTruncate(SIZE, PROJS) ... - STACK - requires 0 STORE + requires SLOT in_keys(STORE) + andBool isTypedValue(getSlot(STORE, SLOT)) andBool 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), + getSlotValue(STORE, SLOT), + 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 STORE + requires SLOT in_keys(STORE) + andBool isTypedValue(getSlot(STORE, SLOT)) andBool 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), + getSlotValue(STORE, SLOT), PLACEPROJ, .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 #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 - ... - - LOCALS - requires OFFSET ==Int 0 - andBool 0 <=Int I andBool I STORE + requires SLOT in_keys(STORE) + andBool isTypedValue(getSlot(STORE, SLOT)) andBool 0 ==Int PTR_OFFSET [preserves-definedness] ``` @@ -952,17 +832,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(frameLocal(STORE, SLOTS, I)), PROJS), TY) ... + SLOTS ... + STORE + 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(frameLocal(STORE, SLOTS, I)), PROJS), TY) ... + SLOTS ... + STORE + requires 0 <=Int I andBool I rvalueCast(CASTKIND, operandConstant(constOperand(_, _, mirConst(_, CONST_TY, _))) #as OPERAND, TY) @@ -1108,18 +990,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 +1031,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(frameLocal(STORE, SLOTS, I)), PROJS)) ... + SLOTS ... + STORE + requires 0 <=Int I andBool I rvalueRef(REGION, KIND, place(local(I), PROJS)) ... - LOCALS - requires 0 <=Int I andBool I SLOTS ... + STORE + 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)), frameValue(STORE, SLOTS, I), PROJS, .Contexts) + ~> #forRef(#mutabilityOf(KIND), metadata(#metadataSize(tyOfLocal(frameLocal(STORE, SLOTS, I)), PROJS), 0, noMetadataSize)) // TODO: Sus on this rule ... - LOCALS - requires 0 <=Int I andBool I SLOTS ... + STORE + 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 +1151,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 +1188,18 @@ 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)), frameValue(STORE, SLOTS, I), PROJS, .Contexts) + ~> #forPtr(MUT, metadata(#metadataSize(tyOfLocal(frameLocal(STORE, SLOTS, I)), 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 ... + STORE + 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 +1207,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 +1217,26 @@ 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(frameValue(STORE, SLOTS, I), MUT) // we should use #alignOf to emulate the address ... - LOCALS + SLOTS ... + STORE 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 +1318,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 +1329,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 +1425,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 +1453,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 +2218,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 +2233,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 +2269,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 +2292,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/kdist/mir-semantics/symbolic/p-token.md b/kmir/src/kmir/kdist/mir-semantics/symbolic/p-token.md new file mode 100644 index 000000000..34f59923b --- /dev/null +++ b/kmir/src/kmir/kdist/mir-semantics/symbolic/p-token.md @@ -0,0 +1,1190 @@ +```k +requires "../kmir-ast.md" +requires "../rt/data.md" +requires "../kmir.md" +requires "../rt/configuration.md" +``` + +This module provides specialised data types and associated access rules +for data used by the p-token contract and its operations. + +```k +module KMIR-P-TOKEN + imports TYPES + imports BODY + imports RT-DATA + imports KMIR-CONTROL-FLOW +``` + +## Special-purpose types for P-token + +The `pinocchio::account_info::AccountInfo` type contains a (mutable) pointer to a `pinocchio::account_info::Account`. +However, in practice the pointed-at memory is assumed to contain additional data _after_ this `Account`. +The additional data is commonly an instance of `Transmutable` (assumed here), which limits the choices to 3 structs: +- `pinocchio_token_interface::state::Account`, modelled as sort `IAcc`; +- `pinocchio_token_interface::state::Mint`, modelled as sort `IMint`; +- `pinocchio_token_interface::state::Multisig`, modelled as sort `IMulti`. + +A fourth kind of struct following the `Account` can be a "rent sysvar". +The `Rent` sysvar holds constants that determine whether or not rent has to be paid for account storage. + +We model this special assumption through a special subsort of `Value` with rules to create and access the contained inner structure as an aggregate of its own. + +```k + syntax Value ::= PAccount + + syntax PAccount ::= + PAccountAccount( PAcc , IAcc ) // p::Account and iface::Account structs + | PAccountMint( PAcc , IMint ) // p::Account and iface::Mint structs + | PAccountMultisig( PAcc , IMulti ) // p::Account and iface::Multisig structs + | PAccountRent ( PAcc, PRent ) // p::Account and p::sysvars::rent::Rent + + syntax PAccount2nd ::= IAcc | IMint | IMulti | PRent // all sorts that can be 2nd component +``` + +### Pinocchio Account + +The `pinocchio::account_info::Account` type is the first "component" of the special data structure. +It is modelled as a `PAcc` sort in K. +The code uses some helper sorts for better readability. + +```k + // pinocchio Account structure + syntax PAcc ::= PAcc ( U8, U8, U8, U8, I32, Key, Key , U64, U64) + | PAccError ( Value ) + + syntax PAcc ::= #toPAcc ( Value ) [function, total] + // ------------------------------------------------------- + rule #toPAcc( + Aggregate(variantIdx(0), + ListItem(Integer(A, 8, false)) // borrow_state (custom solution to manage read/write borrows) + ListItem(Integer(B, 8, false)) // is_signer (comment: whether transaction was signed by this account) + ListItem(Integer(C, 8, false)) // is_writable + ListItem(Integer(D, 8, false)) // executable (comment: whether this account represents a program) + ListItem(Integer(E, 32, true)) // resize_delta (comment: "guaranteed to be zero at start") + ListItem(KEY1BYTES) // account key + ListItem(KEY2BYTES) // owner key + ListItem(Integer(X, 64, false)) // lamports + ListItem(Integer(Y, 64, false)) // data_len (dependent on 2nd component, must be ensured) + )) + => + PAcc (U8(A), U8(B), U8(C), U8(D), I32(E), toKey(KEY1BYTES), toKey(KEY2BYTES), U64(X), U64(Y)) + rule #toPAcc(OTHER) => PAccError(OTHER) [owise] + + + syntax Value ::= #fromPAcc ( PAcc ) [function, total] + // ----------------------------------------------------------- + rule #fromPAcc(PAcc (U8(A), U8(B), U8(C), U8(D), I32(E), KEY1, KEY2, U64(X), U64(Y))) + => + Aggregate(variantIdx(0), + ListItem(Integer(A, 8, false)) + ListItem(Integer(B, 8, false)) + ListItem(Integer(C, 8, false)) + ListItem(Integer(D, 8, false)) + ListItem(Integer(E, 32, true)) + ListItem(fromKey(KEY1)) + ListItem(fromKey(KEY2)) + ListItem(Integer(X, 64, false)) + ListItem(Integer(Y, 64, false)) + ) + rule #fromPAcc(PAccError(OTHER)) => OTHER + + rule #toPAcc(#fromPAcc(PACC)) => PACC [simplification, preserves-definedness] + rule #fromPAcc(#toPAcc(PACC)) => PACC [simplification, preserves-definedness] + + syntax U8 ::= U8( Int ) + syntax I32 ::= I32 ( Int ) + syntax U64 ::= U64 ( Int ) + + syntax Key ::= Key( List ) // 32 bytes + | KeyError ( Value ) + + syntax Key ::= toKey ( Value ) [function, total] + // --------------------------------------------- + rule toKey(Range(ELEMS)) => Key( ELEMS ) requires size(ELEMS) ==Int 32 andBool allBytes(ELEMS) [preserves-definedness] + rule toKey(VAL) => KeyError(VAL) [owise] + + syntax Bool ::= allBytes ( List ) [function, total] + // ------------------------------------------------ + rule allBytes(.List) => true + rule allBytes( ListItem(Integer(_, 8, false)) REST:List) => allBytes(REST) + rule allBytes( ListItem(_OTHER) _:List) => false [owise] + + syntax Value ::= fromKey ( Key ) [function, total] + // ----------------------------------------------- + // We assume that the Key always contains valid data, because it is constructed via toKey. + rule fromKey(KeyError(VAL)) => VAL + rule fromKey(Key(VAL)) => Range(VAL) [preserves-definedness] + syntax Bool ::= #keyEq ( Key, Key ) [function, total] + | #keyNe ( Key, Key ) [function, total] + rule #keyEq(Key(LHS), Key(RHS)) => LHS ==K RHS [preserves-definedness] + rule #keyEq(_, _) => false [owise] + rule #keyNe(Key(LHS), Key(RHS)) => LHS =/=K RHS [preserves-definedness] + rule #keyNe(_, _) => true [owise] +``` +With slotStore, `#mapOffset` and `#adjustRef` are no longer needed (no stack-relative offsets). + + +```k + + syntax Signers ::= Signers ( List ) // 3 Pubkeys, each List of 32 bytes + | SignersError ( Value ) + + syntax Signers ::= toSigners ( Value ) [function, total] + // ----------------------------------------------------- + rule toSigners(Range(ELEMS)) => Signers( toKeys(ELEMS) ) requires size(ELEMS) ==Int 3 andBool allRangeWrappedKeys(ELEMS) + rule toSigners(VAL) => SignersError(VAL) [owise] + + syntax Value ::= fromSigners ( Signers ) [function, total] + // ------------------------------------------------------- + // We assume that the Signers always contains valid data, because it is constructed via toSigners. + rule fromSigners(SignersError(VAL)) => VAL + rule fromSigners(Signers(VAL)) => Range(fromKeys(VAL)) + + syntax List ::= fromKeys ( List ) [function, total] + | toKeys ( List ) [function, total] + // ------------------------------------------------ + rule fromKeys(.List) => .List + rule fromKeys(ListItem(KEY:Key) REST) => ListItem(fromKey(KEY)) fromKeys(REST) + rule fromKeys(ListItem(_NOTKEY) REST) => ListItem(StringVal("Not a Key")) fromKeys(REST) [owise] // HACK + + rule toKeys(.List) => .List + rule toKeys(ListItem(KEYBYTES:Value) REST) => ListItem(toKey(KEYBYTES)) toKeys(REST) + rule toKeys(ListItem( _NOTBYTES ) REST) => ListItem(KeyError(StringVal("Not Bytes"))) toKeys(REST) [owise] + + syntax Bool ::= allKeys ( List ) [function, total] + // ----------------------------------------------------------- + rule allKeys( .List ) => true + rule allKeys( ListItem(ELEMS) REST:List ) => allKeys(REST) requires size(ELEMS) ==Int 32 andBool allBytes(ELEMS) + rule allKeys( ListItem(_OTHER) _:List ) => false [owise] + + syntax Bool ::= allRangeWrappedKeys ( List ) [function, total] + // ----------------------------------------------------------- + rule allRangeWrappedKeys( .List ) => true + rule allRangeWrappedKeys( ListItem(Range(ELEMS)) REST:List ) => allRangeWrappedKeys(REST) requires size(ELEMS) ==Int 32 andBool allBytes(ELEMS) + rule allRangeWrappedKeys( ListItem(_OTHER) _:List ) => false [owise] +``` + +### SPL Token Interface Account + +```k + // interface account structure + syntax IAcc ::= IAcc ( Key, Key, Amount, Flag, Key, U8, Flag, Amount, Amount, Flag, Key ) + | IAccError ( Value ) + + // fromIAcc function to create an Aggregate, used when dereferencing the data pointer + syntax Value ::= #fromIAcc ( IAcc ) [function, total] + // -------------------------------------------------- + rule #fromIAcc(IAcc(MINT, OWNER, AMT, DLG_FLAG, DLG_KEY, U8(STATE), NATIVE_FLAG, NATIVE_AMT, DLG_AMT, CLOSE_FLAG, CLOSE_KEY)) + => + Aggregate(variantIdx(0), + ListItem(fromKey(MINT)) + ListItem(fromKey(OWNER)) + ListItem(fromAmount(AMT)) + ListItem(Aggregate(variantIdx(0), ListItem(fromFlag(DLG_FLAG)) ListItem(fromKey(DLG_KEY)))) + ListItem(Integer(STATE, 8, false)) + ListItem(fromFlag(NATIVE_FLAG)) + ListItem(fromAmount(NATIVE_AMT)) + ListItem(fromAmount(DLG_AMT)) + ListItem(Aggregate(variantIdx(0), ListItem(fromFlag(CLOSE_FLAG)) ListItem(fromKey(CLOSE_KEY)))) + ) + rule #fromIAcc(IAccError(VAL)) => VAL + + syntax IAcc ::= #toIAcc ( Value ) [function, total] + // -------------------------------------------------- + rule #toIAcc( + Aggregate(variantIdx(0), + ListItem(MINT) + ListItem(OWNER) + ListItem(AMT) + ListItem(Aggregate(variantIdx(0), ListItem(DLG_FLAG) ListItem(DLG_KEY))) + ListItem(Integer(STATE, _, false)) // bit width 8 or 0 for a discriminant + ListItem(NATIVE_FLAG) + ListItem(NATIVE_AMT) + ListItem(DLG_AMT) + ListItem(Aggregate(variantIdx(0), ListItem(CLOSE_FLAG) ListItem(CLOSE_KEY))) + ) + ) + => IAcc(toKey(MINT), + toKey(OWNER), + toAmount(AMT), + toFlag(DLG_FLAG), + toKey(DLG_KEY), + U8(STATE), + toFlag(NATIVE_FLAG), + toAmount(NATIVE_AMT), + toAmount(DLG_AMT), + toFlag(CLOSE_FLAG), + toKey(CLOSE_KEY) + ) + rule #toIAcc(OTHER) => IAccError(OTHER) [owise] + + rule #toIAcc(#fromIAcc(IACC)) => IACC [simplification, preserves-definedness] + rule #fromIAcc(#toIAcc(VAL)) => VAL [simplification, preserves-definedness] + + syntax Amount ::= Amount(Int) // 8 bytes , but model as u64. From = LE bytes , to = decode(LE) + | AmountError( Value ) + + syntax Amount ::= toAmount ( Value) [function, total] + // ----------------------------------------------------------- + rule toAmount(Range(AMOUNTBYTES)) => Amount(Bytes2Int(#bytesFrom(AMOUNTBYTES), LE, Unsigned)) + requires allBytes(AMOUNTBYTES) andBool size(AMOUNTBYTES) ==Int 8 [preserves-definedness] + rule toAmount(OTHER) => AmountError(OTHER) [owise] + + syntax Bytes ::= #bytesFrom ( List ) [function] + // -------------------------------------------- + rule #bytesFrom(.List) => .Bytes + rule #bytesFrom(ListItem(Integer(X, 8, false)) REST) => Int2Bytes(1, X, LE) +Bytes #bytesFrom(REST) + + syntax Value ::= fromAmount ( Amount ) [function, total] + // ----------------------------------------------------------- + rule fromAmount(Amount(X)) => Range(#asU8s(X)) [preserves-definedness] + rule fromAmount(AmountError(VAL)) => VAL + + syntax List ::= #asU8s ( Int ) [function, total] + | #asU8List ( List , Int ) [function, total] + // ------------------------------------- + rule #asU8s(X) => #asU8List(.List, X) + rule #asU8List(ACC, _) => ACC requires 8 <=Int size(ACC) [priority(40)] // always cut at 8 bytes + rule #asU8List(ACC, X) => #asU8List( ACC ListItem(Integer( X &Int 255, 8, false)) , X >>Int 8) [preserves-definedness] + + rule toAmount(fromAmount(AMT)) => AMT [simplification, preserves-definedness] + rule fromAmount(toAmount(VAL)) => VAL [simplification, preserves-definedness] + + // Amount Round-trip Simplifications: + rule Bytes2Int( + #bytesFrom( + ListItem(Integer(AMOUNT &Int 255, 8, false)) + ListItem(Integer(AMOUNT >>Int 8 &Int 255, 8, false)) + ListItem(Integer(AMOUNT >>Int 8 >>Int 8 &Int 255, 8, false)) + ListItem(Integer(AMOUNT >>Int 8 >>Int 8 >>Int 8 &Int 255, 8, false)) + ListItem(Integer(AMOUNT >>Int 8 >>Int 8 >>Int 8 >>Int 8 &Int 255, 8, false)) + ListItem(Integer(AMOUNT >>Int 8 >>Int 8 >>Int 8 >>Int 8 >>Int 8 &Int 255, 8, false)) + ListItem(Integer(AMOUNT >>Int 8 >>Int 8 >>Int 8 >>Int 8 >>Int 8 >>Int 8 &Int 255, 8, false)) + ListItem(Integer(AMOUNT >>Int 8 >>Int 8 >>Int 8 >>Int 8 >>Int 8 >>Int 8 >>Int 8 &Int 255, 8, false)) + ) , + LE, + Unsigned + ) => AMOUNT + [simplification, symbolic(AMOUNT), preserves-definedness] + + + + // ------------------------------------------------------------------------------ + + syntax Flag ::= Flag ( Int ) // 4 bytes , first byte representing bool. From = 4 bytes, to = read/check all bytes + | FlagError ( Value ) // to make converters total, add an error constructor + + syntax Value ::= fromFlag ( Flag ) [function, total] + // ----------------------------------------------------------- + rule fromFlag( Flag(B)) => Range(ListItem(Integer(B, 8, false)) ListItem(Integer(0, 8, false)) ListItem(Integer(0, 8, false)) ListItem(Integer(0, 8, false))) + requires 0 <=Int B andBool B <=Int 1 + rule fromFlag( FlagError(VAL)) => VAL + + syntax Flag ::= toFlag ( Value ) [function, total] + // ----------------------------------------------------------- + rule toFlag( Range(ListItem(Integer(X, 8, false)) REST:List)) => Flag(X) + requires 0 <=Int X andBool X <=Int 1 andBool size(REST) ==Int 3 andBool allZeroBytes(REST) + rule toFlag( VAL ) => FlagError(VAL) [owise] + + syntax Bool ::= allZeroBytes(List) [function, total] + // --------------------------------------------- + rule allZeroBytes(.List) => true + rule allZeroBytes(ListItem(Integer(0, 8, false)) REST) => allZeroBytes(REST) + rule allZeroBytes(ListItem(_OTHER) _:List) => false [owise] + + rule fromFlag(toFlag(VAL)) => VAL [simplification, preserves-definedness] + rule toFlag(fromFlag(FLG)) => FLG [simplification, preserves-definedness] +``` + +### SPL Token Interface Mint +```k + // Mint struct: optional mint authority, supply, decimals, initialised flag, optional freeze authority + syntax IMint ::= IMint ( Flag, Key , Amount , U8 , U8 , Flag , Key ) + | IMintError ( Value ) + + syntax IMint ::= #toIMint ( Value ) [function, total] + // ------------------------------------------ + rule #toIMint( + Aggregate(variantIdx(0), + ListItem(Aggregate(variantIdx(0), ListItem(MINT_AUTH_FLAG) ListItem(MINT_AUTH_KEY))) + ListItem(SUPPLY) + ListItem(Integer(DECIMALS, 8, false)) + ListItem(Integer(INITIALISED, 8, false)) + ListItem(Aggregate(variantIdx(0), ListItem(FREEZE_AUTH_FLAG) ListItem(FREEZE_AUTH_KEY))) + ) + ) + => IMint(toFlag(MINT_AUTH_FLAG), + toKey(MINT_AUTH_KEY), + toAmount(SUPPLY), + U8(DECIMALS), + U8(INITIALISED), + toFlag(FREEZE_AUTH_FLAG), + toKey(FREEZE_AUTH_KEY) + ) + + rule #toIMint(OTHER) => IMintError(OTHER) [owise] + + syntax Value ::= #fromIMint ( IMint ) [function, total] + // ---------------------------------------------------- + rule #fromIMint(IMint(MINT_AUTH_FLAG, MINT_AUTH_KEY, SUPPLY, U8(DECIMALS), U8(INITIALISED), FREEZE_AUTH_FLAG, FREEZE_AUTH_KEY)) + => Aggregate(variantIdx(0), + ListItem(Aggregate(variantIdx(0), ListItem(fromFlag(MINT_AUTH_FLAG)) ListItem(fromKey(MINT_AUTH_KEY)))) + ListItem(fromAmount(SUPPLY)) + ListItem(Integer(DECIMALS, 8, false)) + ListItem(Integer(INITIALISED, 8, false)) + ListItem(Aggregate(variantIdx(0), ListItem(fromFlag(FREEZE_AUTH_FLAG)) ListItem(fromKey(FREEZE_AUTH_KEY)))) + ) + rule #fromIMint(IMintError(VAL)) => VAL + + rule #toIMint(#fromIMint(IMINT)) => IMINT [simplification, preserves-definedness] + rule #fromIMint(#toIMint(IMINT)) => IMINT [simplification, preserves-definedness] +``` + +### SPL Token Interface Multisig +```k + // Multisig struct: number of required signers, number of valid signers, initialised flag, array of 3 signers + syntax IMulti ::= IMulti ( U8 , U8 , U8 , Signers ) + | IMultiError ( Value ) + + syntax IMulti ::= #toIMulti ( Value ) [function, total] + // ---------------------------------------------------- + rule #toIMulti( + Aggregate(variantIdx(0), + ListItem(Integer(M, 8, false)) + ListItem(Integer(N, 8, false)) + ListItem(Integer(INITIALISED, 8, false)) + ListItem(SIGNERS) + ) + ) + => IMulti(U8(M), + U8(N), + U8(INITIALISED), + toSigners(SIGNERS) + ) + + rule #toIMulti(OTHER) => IMultiError(OTHER) [owise] + + syntax Value ::= #fromIMulti ( IMulti ) [function, total] + // ------------------------------------------------------ + rule #fromIMulti(IMulti(U8(M), U8(N), U8(INITIALISED), SIGNERS)) + => Aggregate(variantIdx(0), + ListItem(Integer(M, 8, false)) + ListItem(Integer(N, 8, false)) + ListItem(Integer(INITIALISED, 8, false)) + ListItem(fromSigners(SIGNERS)) + ) + rule #fromIMulti(IMultiError(VAL)) => VAL + + rule #toIMulti(#fromIMulti(IMULTI)) => IMULTI [simplification, preserves-definedness] + rule #fromIMulti(#toIMulti(IMULTI)) => IMULTI [simplification, preserves-definedness] +``` + +### Pinocchio Rent sysvar + +```k + syntax F64 ::= F64 ( Float ) + + syntax PRent ::= PRent ( U64, F64 , U8 ) + | PRentError ( Value ) + + syntax PRent ::= #toPRent ( Value ) [function, total] + // -------------------------------------------------- + rule #toPRent( + Aggregate(variantIdx(0), + ListItem(Integer(LMP_PER_BYTEYEAR, 64, false)) + ListItem(Float(EXEMPT_THRESHOLD, 64)) + ListItem(Integer(BURN_PCT, 8, false)) + ) + ) => PRent(U64(LMP_PER_BYTEYEAR), F64(EXEMPT_THRESHOLD), U8(BURN_PCT)) + rule #toPRent(VAL) => PRentError(VAL) [owise] + + syntax Value ::= #fromPRent ( PRent ) [function, total] + // ---------------------------------------------------- + rule #fromPRent(PRent(U64(LMP_PER_BYTEYEAR), F64(EXEMPT_THRESHOLD), U8(BURN_PCT))) + => Aggregate(variantIdx(0), + ListItem(Integer(LMP_PER_BYTEYEAR, 64, false)) + ListItem(Float(EXEMPT_THRESHOLD, 64)) + ListItem(Integer(BURN_PCT, 8, false)) + ) + rule #fromPRent(PRentError(VAL)) => VAL + + rule #fromPRent(#toPRent(VAL)) => VAL [simplification, preserves-definedness] + rule #toPRent(#fromPRent(RNT)) => RNT [simplification, preserves-definedness] + +``` + + +### Access to the pinocchio `Account` struct + +When accessing the special value's fields, it is transformed to a normal `Aggregate` struct on the fly +in order to avoid having to encode each field access individually. + +Read access will only happen in the `traverseProjection` operation (reading fields of the struct. +Write access (as well as moving reads) uses `traverseProjection` and also requires a special context node to reconstruct the custom value. + +```k + // special traverseProjection rules that call fromPAcc on demand when needed. + // NB Only applies when more projections follow. + rule #traverseProjection(DEST, PAccountAccount(PACC, IACC), PROJ PROJS, CTXTS) + => #traverseProjection(DEST, #fromPAcc(PACC) , PROJ PROJS, CtxPAccountPAcc(IACC) CTXTS) + ... + + [priority(30)] + rule #traverseProjection(DEST, PAccountMint(PACC, IMINT), PROJ PROJS, CTXTS) + => #traverseProjection(DEST, #fromPAcc(PACC) , PROJ PROJS, CtxPAccountPAcc(IMINT) CTXTS) + ... + + [priority(30)] + rule #traverseProjection(DEST, PAccountMultisig(PACC, PMULTI), PROJ PROJS, CTXTS) + => #traverseProjection(DEST, #fromPAcc(PACC) , PROJ PROJS, CtxPAccountPAcc(PMULTI) CTXTS) + ... + + [priority(30)] + rule #traverseProjection(DEST, PAccountRent(PACC, PRENT), PROJ PROJS, CTXTS) + => #traverseProjection(DEST, #fromPAcc(PACC) , PROJ PROJS, CtxPAccountPAcc(PRENT) CTXTS) + ... + + [priority(30)] + + // special context node(s) storing the second component + syntax Context ::= CtxPAccountPAcc ( PAccount2nd ) + + // restore the custom value in #buildUpdate + rule #buildUpdate(VAL, CtxPAccountPAcc(IACC:IAcc) CTXS) + => #buildUpdate(PAccountAccount(#toPAcc(VAL), IACC), CTXS) + [preserves-definedness] // by construction, VAL has the correct shape from introducing the context + rule #buildUpdate(VAL, CtxPAccountPAcc(IMINT:IMint) CTXS) + => #buildUpdate(PAccountMint(#toPAcc(VAL), IMINT), CTXS) + [preserves-definedness] // by construction, VAL has the correct shape from introducing the context + rule #buildUpdate(VAL, CtxPAccountPAcc(IMULTISIG:IMulti) CTXS) + => #buildUpdate(PAccountMultisig(#toPAcc(VAL), IMULTISIG), CTXS) + [preserves-definedness] // by construction, VAL has the correct shape from introducing the context + rule #buildUpdate(VAL, CtxPAccountPAcc(PRENT:PRent) CTXS) + => #buildUpdate(PAccountRent(#toPAcc(VAL), PRENT), CTXS) + [preserves-definedness] // by construction, VAL has the correct shape from introducing the context + + // transforming PAccountAccount(PACC, _) to PACC is automatic, no projection required + rule #projectionsFor(CtxPAccountPAcc(_) CTXTS, PROJS) => #projectionsFor(CTXTS, PROJS) + +``` + +### Introducing the special types with a cheat code + +The special values are introduced by special function calls (cheat code functions). +An `AccountInfo` reference is passed to the function. + +```k + syntax String ::= #functionName ( MonoItemKind ) [function, total] + // --------------------------------------------------------------- + rule #functionName(monoItemFn(symbol(NAME), _, _)) => NAME + rule #functionName(monoItemStatic(symbol(NAME), _, _)) => NAME + rule #functionName(monoItemGlobalAsm(_)) => "#ASM" + rule #functionName(IntrinsicFunction(symbol(NAME))) => NAME + + syntax Bool ::= #isPTokenFromRawPartsU8Func(String) [function, total] + | #isPTokenFromRawPartsMutU8Func(String) [function, total] + rule #isPTokenFromRawPartsU8Func("core::slice::from_raw_parts::<'_, u8>") => true + rule #isPTokenFromRawPartsU8Func("core::core::slice::from_raw_parts::<'_, u8>") => true + rule #isPTokenFromRawPartsU8Func(_) => false [owise] + rule #isPTokenFromRawPartsMutU8Func("core::slice::from_raw_parts_mut::<'_, u8>") => true + rule #isPTokenFromRawPartsMutU8Func("core::core::slice::from_raw_parts_mut::<'_, u8>") => true + rule #isPTokenFromRawPartsMutU8Func(_) => false [owise] +``` + +```k + // special rule to intercept the cheat code function calls and replace them by #mkPToken + rule [cheatcode-is-account]: + #execTerminatorCall(_, FUNC, operandCopy(PLACE) .Operands, _DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #mkPTokenAccount(PLACE) ~> #continueAt(TARGET) + + requires #functionName(FUNC) ==String "pinocchio_token_program::entrypoint::cheatcode_is_account" + [priority(30), preserves-definedness] + rule [cheatcode-is-mint]: + #execTerminatorCall(_, FUNC, operandCopy(PLACE) .Operands, _DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #mkPTokenMint(PLACE) ~> #continueAt(TARGET) + + requires #functionName(FUNC) ==String "pinocchio_token_program::entrypoint::cheatcode_is_mint" + [priority(30), preserves-definedness] + rule [cheatcode-is-multisig]: + #execTerminatorCall(_, FUNC, operandCopy(PLACE) .Operands, _DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #mkPTokenMultisig(PLACE) ~> #continueAt(TARGET) + + requires #functionName(FUNC) ==String "pinocchio_token_program::entrypoint::cheatcode_is_multisig" + [priority(30), preserves-definedness] + rule [cheatcode-is-rent]: + #execTerminatorCall(_, FUNC, operandCopy(PLACE) .Operands, _DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #mkPTokenRent(PLACE) ~> #continueAt(TARGET) + + requires #functionName(FUNC) ==String "pinocchio_token_program::entrypoint::cheatcode_is_rent" + [priority(30), preserves-definedness] + + // cheat codes and rules to create a special PTokenAccount flavour + syntax KItem ::= #mkPTokenAccount ( Place ) + | #mkPTokenMint ( Place ) + | #mkPTokenMultisig ( Place ) + | #mkPTokenRent ( Place ) + + // place assumed to be a ref to an AccountInfo, having 1 field holding a pointer to an account + // dereference, then read and dereference pointer in field 1 to read the account data + // modify the pointee, creating additional data (different kinds) with fresh variables + // + rule + #mkPTokenAccount(place(LOCAL, PROJS)) + => #setLocalValue( + place(LOCAL, appendP(PROJS, projectionElemDeref projectionElemField(fieldIdx(0), #hack()) projectionElemDeref .ProjectionElems)), + #addAccount(operandCopy(place(LOCAL, appendP(PROJS, projectionElemDeref projectionElemField(fieldIdx(0), #hack()) projectionElemDeref .ProjectionElems))))) + ... + + + rule + #mkPTokenMint(place(LOCAL, PROJS)) + => #setLocalValue( + place(LOCAL, appendP(PROJS, projectionElemDeref projectionElemField(fieldIdx(0), #hack()) projectionElemDeref .ProjectionElems)), + #addMint(operandCopy(place(LOCAL, appendP(PROJS, projectionElemDeref projectionElemField(fieldIdx(0), #hack()) projectionElemDeref .ProjectionElems))))) + ... + + + rule + #mkPTokenMultisig(place(LOCAL, PROJS)) + => #setLocalValue( + place(LOCAL, appendP(PROJS, projectionElemDeref projectionElemField(fieldIdx(0), #hack()) projectionElemDeref .ProjectionElems)), + #addMultisig(operandCopy(place(LOCAL, appendP(PROJS, projectionElemDeref projectionElemField(fieldIdx(0), #hack()) projectionElemDeref .ProjectionElems))))) + ... + + + rule + #mkPTokenRent(place(LOCAL, PROJS)) + => #setLocalValue( + place(LOCAL, appendP(PROJS, projectionElemDeref projectionElemField(fieldIdx(0), #hack()) projectionElemDeref .ProjectionElems)), + #addRent(operandCopy(place(LOCAL, appendP(PROJS, projectionElemDeref projectionElemField(fieldIdx(0), #hack()) projectionElemDeref .ProjectionElems))))) + ... + +``` + +```k + syntax Ty ::= #hack() [function, total, symbol(#hack)] + rule #hack() => ty(0) +``` + +```k + syntax Evaluation ::= #addAccount ( Evaluation ) [seqstrict()] + | #addMint ( Evaluation ) [seqstrict()] + | #addMultisig ( Evaluation ) [seqstrict()] + | #addRent ( Evaluation ) [seqstrict()] +``` + +#### `#addAccount` + +```{.k .symbolic} + // NB these rewrites also ensure the data_len field in PAcc is set correctly for the given data + rule #addAccount(Aggregate(variantIdx(0), _:List ListItem(Integer(DATA_LEN, 64, false))) #as P_ACC) + => PAccountAccount( + #toPAcc(P_ACC), + IAcc(Key(?MINT), + Key(?OWNER), + Amount(?AMOUNT), + Flag(?DELEGATEFLAG), + Key(?DELEGATE), + U8(?STATE), + Flag(?NATIVEFLAG), + Amount(?NATIVE_AMOUNT), + Amount(?DELEG_AMOUNT), + Flag(?CLOSEFLAG), + Key(?CLOSE_AUTH) + ) + ) + ensures 0 <=Int ?STATE andBool ?STATE PAccountAccount( + #toPAccWithDataLen(P_ACC, 165), // size_of(Account), see pinocchio_token_interface::state::Transmutable instance + IAcc(#randKey(), // mint + #randKey(), // owner + #randAmount(), // amount + Flag(#randU1()), // delegateflag, only 0 or 1 allowed + #randKey(), // delegate + U8(#randU8()), // state + Flag(#randU1()), // nativeflag, only 0 or 1 allowed + #randAmount(), // native_amount + #randAmount(), // deleg_amount + Flag(#randU1()), // closeflag, only 0 or 1 allowed + #randKey() // close_auth + ) + ) +``` + +#### `#addMint` + +```{.k .symbolic} + rule #addMint(Aggregate(variantIdx(0), _:List ListItem(Integer(DATA_LEN, 64, false))) #as P_ACC) + => PAccountMint( + #toPAcc(P_ACC), + IMint(Flag(?MINT_AUTH_FLAG), + Key(?MINT_AUTH_KEY), + Amount(?SUPPLY), + U8(?DECIMALS), + U8(?INITIALISED), + Flag(?FREEZE_AUTH_FLAG), + Key(?FREEZE_AUTH_KEY) + ) + ) + ensures 0 <=Int ?DECIMALS andBool ?DECIMALS PAccountMint( + #toPAccWithDataLen(P_ACC, 82), // size_of(Mint), see pinocchio_token_interface::state::Transmutable instance + IMint(Flag(#randU1()), // mint_auth_flag, only 0 or 1 allowed + #randKey(), // mint_auth_key + #randAmount(), // supply + U8(#randU8()), // decimals + U8(#randU1()), // initialized, only 0 or 1 allowed + Flag(#randU1()), // freeze_auth_flag, only 0 or 1 allowed + #randKey() // freeze_auth_key + ) + ) +``` + +#### `#addMultisig` + +```{.k .symbolic} + rule #addMultisig(Aggregate(variantIdx(0), _:List ListItem(Integer(DATA_LEN, 64, false))) #as P_ACC) + => PAccountMultisig( + #toPAcc(P_ACC), + IMulti(U8(?M), + U8(?N), + U8(?INITIALISED), + Signers( ListItem(Key(?Signer0)) + ListItem(Key(?Signer1)) + ListItem(Key(?Signer2)) + ) + ) + ) + ensures 0 <=Int ?M andBool ?M <=Int 256 + andBool 0 <=Int ?N andBool ?N <=Int 256 + andBool 0 <=Int ?INITIALISED andBool ?INITIALISED <=Int 256 + andBool size(?Signer0) ==Int 32 andBool allBytes(?Signer0) + andBool size(?Signer1) ==Int 32 andBool allBytes(?Signer1) + andBool size(?Signer2) ==Int 32 andBool allBytes(?Signer2) + andBool DATA_LEN ==Int 99 // size_of(Multisig), see pinocchio_token_interface::state::Transmutable instance +``` + +```{.k .concrete} + // FIXME: The randomisation here is too naive, it allows for n < m, and there is no connection between the + // Signers and n. It needs work to create sensible cases. + rule #addMultisig(Aggregate(variantIdx(0), _) #as P_ACC) + => PAccountMultisig( + #toPAccWithDataLen(P_ACC, 99), // size_of(Multisig), see pinocchio_token_interface::state::Transmutable instance + IMulti(U8(#randU8()), // m (number of signers required) + U8(#randU8()), // n (number of valid signers) + U8(#randU8()), // initialized (0 - false, 1 - true, error state owise) + #randSigners() // signers (Signer public keys) + ) + ) +``` + +#### `#addRent` + +```{.k .symbolic} + rule #addRent(Aggregate(variantIdx(0), _:List ListItem(Integer(DATA_LEN, 64, false))) #as P_ACC) + => PAccountRent( + #toPAcc(P_ACC), + PRent( + U64(?LMP_PER_BYTEYEAR), + F64(2.0), // fixed exempt_threshold 2.0 (default) + U8(?BURN_PCT) + ) + ) + ensures 0 <=Int ?LMP_PER_BYTEYEAR andBool ?LMP_PER_BYTEYEAR PAccountRent( + #toPAccWithDataLen(P_ACC, 17), // size_of(Rent), see pinocchio::sysvars::rent::Rent::LEN + PRent( + U64(#randU64()), // lmp_per_byteyear + F64(#randExemptThreshold()), // exempt_threshold + U8(#randU8()) // burn_pct + ) + ) +``` + +### Establishing Access to the Second Component of a `PAccount`-sorted Value + +Access to the data structure that follow a pinocchio account is usually via characteristic sequences of statements: +Code within `pinocchio` itself uses the `Transmutable` methods `load`, `load_mut` or respective `*_unchecked` variants. +- calling `borrow_data_unchecked` or `borrow_mut_data_unchecked` (returns a ref to a `[u8]` slice) +- then calling `load_unchecked` (maybe via `load`) or `load_mut_unchecked` from the desired `Transmutable` instance + - `load_unchecked` checks the slice length and then casts the slice pointer (`slice.as_ptr`) to a `T` pointer and then a reference + - `load` calls `load_unchecked` and then checks for initialisation data + - both functions return the ref within a `Result::Ok` + +Since the access pattern spans several function calls in sequence, we introduce +a special reference-like marker for the intermediate state where `borrow_[mut_]data_unchecked` has been performed, +which gets eliminated by the call to `load_[mut_]unchecked`. + +- identify the call to `borrow_[mut_]data_unchecked` +- the (single) argument (expected to be `&AccountInfo`) is dereferenced, and its field evaluated + - this yields a PtrLocal to the custom data structure of sort `PAccount` (not checked) +- the return value (DEST) is filled with a special reference to where the data is stored, derived from the pointer inside the `AccountInfo` struct. This value has Rust type `*const u8` or `*mut u8`. + +```k + syntax Value ::= PAccByteRef ( SlotPlace , Mutability , Int ) +``` + +`PAccByteRef` now carries a `SlotPlace` (absolute slot handle + projections) instead of a stack offset. +With slotStore, no `#adjustRef` is needed. + +```k +``` + +```k + // intercept calls to `borrow_data_unchecked` and write `PAccountRef` to destination + rule [cheatcode-borrow-data]: + #execTerminatorCall(_, FUNC, operandCopy(place(LOCAL, PROJS)) .Operands, DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #mkPAccByteRef(DEST, operandCopy(place(LOCAL, appendP(PROJS, projectionElemDeref projectionElemField(fieldIdx(0), #hack()) .ProjectionElems))), mutabilityNot) + ~> #continueAt(TARGET) + + requires #functionName(FUNC) ==String "pinocchio::account_info::AccountInfo::borrow_data_unchecked" + [priority(30), preserves-definedness] + + // intercept calls to `borrow_mut_data_unchecked` and write `PAccountRef` to destination + rule [cheatcode-borrow-mut-data]: + #execTerminatorCall(_, FUNC, operandCopy(place(LOCAL, PROJS)) .Operands, DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #mkPAccByteRef(DEST, operandCopy(place(LOCAL, appendP(PROJS, projectionElemDeref projectionElemField(fieldIdx(0), #hack()) .ProjectionElems))), mutabilityMut) + ~> #continueAt(TARGET) + + requires #functionName(FUNC) ==String "pinocchio::account_info::AccountInfo::borrow_mut_data_unchecked" + [priority(30), preserves-definedness] + + syntax KItem ::= #mkPAccByteRef( Place , Evaluation , Mutability ) [seqstrict(2)] + + // Resolve PtrLocal via slotStore to obtain the PAccount value, then determine the byte length + rule #mkPAccByteRef(DEST, PtrLocal(slotPlace(SLOT, .ProjectionElems) #as SPLACE, _MUT, _EMUL), MUT) + => #mkPAccByteRefLen(DEST, SPLACE, MUT, getSlotValue(STORE, SLOT)) + ... + + STORE + requires SLOT in_keys(STORE) + andBool isTypedValue(getSlot(STORE, SLOT)) + [preserves-definedness] +``` + +### Length validation for inlined `from_bytes` function + +The Rust `from_bytes` function is inlined and contains a length check: `if bytes.len() < Self::LEN`. +Since we intercept `from_bytes_unchecked` instead of the inlined `from_bytes`, +we need to handle the length validation ourselves. +We determine the data type (IAcc/IMint/IMulti/PRent) by examining the `PAccount` value and +set an appropriate `LEN` constant in `PAccByteRef` so that `PtrMetadata` operations +(which implement `bytes.len()`) return the correct length. +The expected length is also stored inside the PAcc data structure (last field), +this field is expected to be constrained accordingly in the path condition. + +```k + syntax KItem ::= #mkPAccByteRefLen ( Place , SlotPlace , Mutability , Value ) + // ------------------------------------------------------------------------------------- + rule #mkPAccByteRefLen(DEST, SPLACE, MUT, PAccountAccount(PAcc(_, _, _, _, _, _, _, _, U64(DATA_LEN)), _)) + => #setLocalValue(DEST, PAccByteRef(SPLACE, MUT, 165)) + ... + + requires DATA_LEN ==Int 165 // IAcc length + rule #mkPAccByteRefLen(DEST, SPLACE, MUT, PAccountMint(PAcc(_, _, _, _, _, _, _, _, U64(DATA_LEN)), _)) + => #setLocalValue(DEST, PAccByteRef(SPLACE, MUT, 82)) + ... + + requires DATA_LEN ==Int 82 // IMint length + rule #mkPAccByteRefLen(DEST, SPLACE, MUT, PAccountMultisig(PAcc(_, _, _, _, _, _, _, _, U64(DATA_LEN)), _)) + => #setLocalValue(DEST, PAccByteRef(SPLACE, MUT, 99)) + ... + + requires DATA_LEN ==Int 99 // IMulti length + rule #mkPAccByteRefLen(DEST, SPLACE, MUT, PAccountRent(PAcc(_, _, _, _, _, _, _, _, U64(DATA_LEN)), _)) + => #setLocalValue(DEST, PAccByteRef(SPLACE, MUT, 17)) + ... + + requires DATA_LEN ==Int 17 // PRent length + + // Handle PtrMetadata for PAccByteRef to return the stored length + rule #applyUnOp(unOpPtrMetadata, PAccByteRef(_, _, LEN)) => Integer(LEN, 64, false) ... +``` + +This intermediate representation will be eliminated by an intercepted call to `load_[mut_]unchecked` , the +latter returning a reference to the second data structure within the `PAccount`-sorted value. +While the `PAccByteRef` is generic, the `load_*` functions are specific to the contained type (instances of `Transmutable`). +A (small) complication is that the reference is returned within a `Result` enum. +NB Both `load_unchecked` and `load_mut_unchecked` are intercepted in the same way, mutability information is already held in the `PAccountByteRef`. + +```k + // intercept calls to `load_unchecked` and `load_mut_unchecked` + rule [cheatcode-mk-iface-account-ref]: + #execTerminatorCall(_, FUNC, OPERAND .Operands, DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #mkPAccountRef(DEST, OPERAND, PAccountIAcc, true) + ~> #continueAt(TARGET) + + requires ( + #functionName(FUNC) ==String "pinocchio_token_interface::state::load_unchecked::" + orBool + #functionName(FUNC) ==String "pinocchio_token_interface::state::load_mut_unchecked::" + ) + [priority(30), preserves-definedness] + + rule [cheatcode-mk-imint-ref]: + #execTerminatorCall(_, FUNC, OPERAND .Operands, DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #mkPAccountRef(DEST, OPERAND, PAccountIMint, true) + ~> #continueAt(TARGET) + + requires ( + #functionName(FUNC) ==String "pinocchio_token_interface::state::load_unchecked::" + orBool + #functionName(FUNC) ==String "pinocchio_token_interface::state::load_mut_unchecked::" + ) + [priority(30), preserves-definedness] + + rule [cheatcode-mk-imulti-ref]: + #execTerminatorCall(_, FUNC, OPERAND .Operands, DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #mkPAccountRef(DEST, OPERAND, PAccountIMulti, true) + ~> #continueAt(TARGET) + + requires ( + #functionName(FUNC) ==String "pinocchio_token_interface::state::load_unchecked::" + orBool + #functionName(FUNC) ==String "pinocchio_token_interface::state::load_mut_unchecked::" + ) + [priority(30), preserves-definedness] + + rule [cheatcode-mk-prent-ref]: + #execTerminatorCall(_, FUNC, OPERAND .Operands, DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #mkPAccountRef(DEST, OPERAND, PAccountPRent, false) + ~> #continueAt(TARGET) + + requires #functionName(FUNC) ==String "pinocchio::sysvars::rent::Rent::from_bytes_unchecked" + [priority(30), preserves-definedness] + + // expect the Evaluation to return a `PAccByteRef` referring to a `PAccount` (not checked) + // return a reference to the second component within this PAccount data. + // We could check the pointee and, if it is a different data structure, return an error (as the length check in the original code) + syntax KItem ::= #mkPAccountRef ( Place , Evaluation , ProjectionElem , Bool ) [seqstrict(2)] + + rule #mkPAccountRef(DEST, PAccByteRef(slotPlace(SLOT, PROJS), MUT, _LEN), ACCESS_PROJ, true) + => #setLocalValue( + DEST, + Aggregate(variantIdx(0), + ListItem(Reference(slotPlace(SLOT, appendP(PROJS, ACCESS_PROJ)), MUT, metadata(noMetadataSize, 0, noMetadataSize))) + ) + ) + ... + + rule #mkPAccountRef(DEST, PAccByteRef(slotPlace(SLOT, PROJS), MUT, _LEN), ACCESS_PROJ, false) + => #setLocalValue( + DEST, + Reference(slotPlace(SLOT, appendP(PROJS, ACCESS_PROJ)), MUT, metadata(noMetadataSize, 0, noMetadataSize)) + ) + ... + +``` + +### Loading the `Rent` Sysvar From the System + +The `Rent` sysvar is sometimes provided to processing functions as an account payload. +At other times, it is loaded directly from the system using a solana system call via `pinocchio::sysvars::rent::Rent::get()`. +The following code intercepts this call to provide suitable symbolic data directly. + +Only the system Rent will be stored as a value directly. The `SysRent` wrapper is used to make it a value. +```k + syntax Value ::= SysRent ( PRent ) +``` + +Note that in case of the system-global `Rest`, it is important to always return _the same_ symbolic value. +Therefore, the value gets created in a dedicated place on first access. + +```k + rule [cheatcode-get-sys-prent]: + #execTerminatorCall(_, FUNC, .Operands, DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #writeSysRent(DEST) + ~> #continueAt(TARGET) + + requires #functionName(FUNC) ==String "::get" + [priority(30), preserves-definedness] + + syntax KItem ::= #writeSysRent ( Place ) +``` + +If the system-global `SysRent` has already been created, it is simplify written to the destination (in a `Result` type). +The `SysRent` is stored in the outermost stack frame's return slot (local _0), which is otherwise unused as there is no caller to return to. + +```k + rule #writeSysRent(DEST) => #setLocalValue(DEST, Aggregate(variantIdx(0), ListItem(SYSRENT))) ... + + STACK:List // sys-rent is stored in the outermost stack frame's return slot (local _0) + ListItem(StackFrame(_, _, _, _, ListItem(typedValue(SysRent(_) #as SYSRENT, _, _)) _REST)) + + requires 0 #writeSysRent(DEST) => #setLocalValue(DEST, Aggregate(variantIdx(0), ListItem(SYSRENT))) ... + // singleton case + ListItem(StackFrame(_, _, _, _, ListItem(typedValue(SysRent(_) #as SYSRENT, _, _)) _REST)) + + [preserves-definedness] +``` +If this is the first access to the `SysRent`, it will be created (symbolically or using random values). + +```{.k .symbolic} + rule [mk-sys-prent]: + #writeSysRent(_DEST) ~> _CONT + + _:List + ListItem(StackFrame(_, _, _, _, + ListItem(newLocal(_, _) => + typedValue( + SysRent( + PRent( + U64(?SYS_LMP_PER_BYTEYEAR), + F64(2.0), // fixed exempt_threshold 2.0 (default) + U8(?SYS_BURN_PCT) + ) + ), + ty(0), + mutabilityNot + ) + ) _:List + )) + + ensures 0 <=Int ?SYS_LMP_PER_BYTEYEAR andBool ?SYS_LMP_PER_BYTEYEAR #writeSysRent(_DEST) ~> _CONT + + _:List + ListItem(StackFrame(_, _, _, _, + ListItem(newLocal(_, _) => + typedValue( + SysRent( + PRent( + U64(#randU64()), // sys_lmp_per_byteyear + F64(#randExemptThreshold()), // sys_exempt_threshold + U8(#randU8()) // sys_burn_pct + ) + ), + ty(0), + mutabilityNot + ) + ) _:List + )) + +``` + +### Access to the `Rent` struct + +When accessing the `SysRent`, the data structure is transformed to a normal `Aggregate` struct on the fly +in order to avoid having to encode each field access individually. +Similar code exists for the `PAccount*` access but this time it operates on an individual `Rent`. + +Read access will only happen in the `traverseProjection` operation (reading fields of the struct). +Write access (as well as moving reads) uses `traverseProjection` and also requires a special context node to reconstruct the custom value. + +```k + // special traverseProjection rules that call fromPRent on demand when needed. + // NB Only applies when more projections follow. + rule #traverseProjection(DEST, SysRent(PRent(_, _, _) #as PRENT), PROJ PROJS, CTXTS) + => #traverseProjection(DEST, #fromPRent(PRENT), PROJ PROJS, CtxPRent CTXTS) + ... + + [priority(30)] + + // special context node(s) to mark the auto-conversion + syntax Context ::= "CtxPRent" + + // restore the custom value in #buildUpdate + rule #buildUpdate(VAL, CtxPRent CTXS) => #buildUpdate(SysRent(#toPRent(VAL)), CTXS) + [preserves-definedness] // by construction, VAL has the correct shape from introducing the context + + // transforming SysRent(PRent) to an aggregate is automatic, no projection required + rule #projectionsFor(CtxPRent CTXTS, PROJS) => #projectionsFor(CTXTS, PROJS) +``` + +### `Rent` specific evaluation for `Float` (Exempt threshold) + +THe pinocchio library contains special code to perform rent compuation in `u64` instead of `Float` +when the rent exempt threshold parameter is the default of 2.0. +The default is assumed in the cheat code throughout all our proofs so the test for the default is implemented as a special rule. + +```k + rule #applyBinOp ( + binOpEq, + thunk(#cast(Float(VAL, 64), castKindTransmute, _, _)), + Integer ( 4611686018427387904 , 64 , false ), + false + ) => BoolVal(true) + ... + + requires VAL ==Float 2.0 +``` + +### Reading and Writing the Second Component + +The access to the second component of the `PAccount` value is implemented with a special projection. +This ensures that the data structure can be written to (by constructing and writing the enclosing `PAccount`). +NB The projection rule must have higher priority than the one which auto-projects to the `PAcc` part of the `PAccount`. + +```k + syntax ProjectionElem ::= "PAccountIAcc" | "PAccountIMint" | "PAccountIMulti" | "PAccountPRent" + + // special traverseProjection rules that call fromPAcc on demand when needed + rule #traverseProjection(DEST, PAccountAccount(PACC, IACC), PAccountIAcc PROJS, CTXTS) + => #traverseProjection(DEST, #fromIAcc(IACC) , PROJS, CtxPAccountIAcc(PACC) CTXTS) + ... + + [priority(20)] // avoid matching the default rule to access PAcc + + rule #traverseProjection(DEST, PAccountMint(PACC, IMINT), PAccountIMint PROJS, CTXTS) + => #traverseProjection(DEST, #fromIMint(IMINT) , PROJS, CtxPAccountIMint(PACC) CTXTS) + ... + + [priority(20)] // avoid matching the default rule to access PAcc + + rule #traverseProjection(DEST, PAccountMultisig(PACC, IMULTISIG), PAccountIMulti PROJS, CTXTS) + => #traverseProjection(DEST, #fromIMulti(IMULTISIG) , PROJS, CtxPAccountIMulti(PACC) CTXTS) + ... + + [priority(20)] // avoid matching the default rule to access PAcc + + rule #traverseProjection(DEST, PAccountRent(PACC, PRENT), PAccountPRent PROJS, CTXTS) + => #traverseProjection(DEST, #fromPRent(PRENT) , PROJS, CtxPAccountPRent(PACC) CTXTS) + ... + + [priority(20)] // avoid matching the default rule to access PAcc + + + syntax Context ::= CtxPAccountIAcc( PAcc ) + | CtxPAccountIMint( PAcc ) + | CtxPAccountIMulti( PAcc ) + | CtxPAccountPRent( PAcc ) + + rule #projectionsFor(CtxPAccountIAcc(_) CTXS, PROJS) => #projectionsFor(CTXS, PAccountIAcc PROJS) + rule #projectionsFor(CtxPAccountIMint(_) CTXS, PROJS) => #projectionsFor(CTXS, PAccountIMint PROJS) + rule #projectionsFor(CtxPAccountIMulti(_) CTXS, PROJS) => #projectionsFor(CTXS, PAccountIMulti PROJS) + rule #projectionsFor(CtxPAccountPRent(_) CTXS, PROJS) => #projectionsFor(CTXS, PAccountPRent PROJS) + + rule #buildUpdate(VAL, CtxPAccountIAcc(PACC) CTXS) => #buildUpdate(PAccountAccount(PACC, #toIAcc(VAL)), CTXS) + [preserves-definedness] // by construction, VAL has the right shape from introducing the context + rule #buildUpdate(VAL, CtxPAccountIMint(PACC) CTXS) => #buildUpdate(PAccountMint(PACC, #toIMint(VAL)), CTXS) + [preserves-definedness] // by construction, VAL has the right shape from introducing the context + rule #buildUpdate(VAL, CtxPAccountIMulti(PACC) CTXS) => #buildUpdate(PAccountMultisig(PACC, #toIMulti(VAL)), CTXS) + [preserves-definedness] // by construction, VAL has the right shape from introducing the context + rule #buildUpdate(VAL, CtxPAccountPRent(PACC) CTXS) => #buildUpdate(PAccountRent(PACC, #toPRent(VAL)), CTXS) + [preserves-definedness] // by construction, VAL has the right shape from introducing the context +``` + +## Helpers for fuzzing + +```{.k .concrete} + syntax PAcc ::= #toPAccWithDataLen ( value: Value, dataLen: Int ) [function, total] + rule #toPAccWithDataLen( + Aggregate( + variantIdx(0), + ListItem(Integer(A, 8, false)) // borrow_state (custom solution to manage read/write borrows) + ListItem(Integer(B, 8, false)) // is_signer (comment: whether transaction was signed by this account) + ListItem(Integer(C, 8, false)) // is_writable + ListItem(Integer(D, 8, false)) // executable (comment: whether this account represents a program) + ListItem(Integer(E, 32, true)) // resize_delta (comment: "guaranteed to be zero at start") + ListItem(KEY1BYTES) // account key + ListItem(KEY2BYTES) // owner key + ListItem(Integer(X, 64, false)) // lamports + ListItem(Integer(_, 64, false)) // data_len (dependent on 2nd component, will be overwritten with DATA_LEN) + ), + DATA_LEN + ) + => + PAcc (U8(A), U8(B), U8(C), U8(D), I32(E), toKey(KEY1BYTES), toKey(KEY2BYTES), U64(X), U64(DATA_LEN)) + rule #toPAccWithDataLen(OTHER, _) => PAccError(OTHER) [owise] + + syntax Int ::= #randU1() [function, total, impure, symbol(randU1) ] + | #randU8() [function, total, impure, symbol(randU8) ] + | #randU32() [function, total, impure, symbol(randU32)] + | #randU64() [function, total, impure, symbol(randU64)] + + rule #randU1() => randInt(2) + rule #randU8() => randInt(256) + rule #randU32() => randInt(4294967296) + rule #randU64() => randInt(18446744073709551616) + + syntax Float ::= #randExemptThreshold() [function, total, impure, symbol(randExemptThreshold)] + rule #randExemptThreshold() => Int2Float(#randU32(), 52, 11) + + syntax Amount ::= #randAmount() [function, total, impure, symbol(randAmount)] + rule #randAmount() => Amount(#randU64()) + + syntax Key ::= #randKey() [function, total, impure, symbol(randKey)] + rule #randKey() => Key(ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false)) + ListItem(Integer(#randU8(), 8, false))) + + syntax Signers ::= #randSigners() [function, total, impure, symbol(randSigners)] + rule #randSigners() => Signers(ListItem(#randKey()) + ListItem(#randKey()) + ListItem(#randKey())) +``` + +```k +endmodule +``` diff --git a/kmir/src/kmir/kdist/mir-semantics/symbolic/spl-token.md b/kmir/src/kmir/kdist/mir-semantics/symbolic/spl-token.md new file mode 100644 index 000000000..97a230495 --- /dev/null +++ b/kmir/src/kmir/kdist/mir-semantics/symbolic/spl-token.md @@ -0,0 +1,884 @@ +```k +requires "../kmir-ast.md" +requires "../rt/data.md" +requires "../kmir.md" +requires "../rt/configuration.md" +``` + +We mirror the Solana `AccountInfo` layout so that MIR code can traverse the +fields exactly as it would against the real SPL runtime. + +## Data Layout + +The account data uses `SPLDataBuffer` wrapper containing the actual struct: +- **Account** (165 bytes): `mint`, `owner`, `amount`, `delegate`, `state`, `is_native`, `delegated_amount`, `close_authority` +- **Mint** (82 bytes): `mint_authority`, `supply`, `decimals`, `is_initialized`, `freeze_authority` +- **Rent** (17 bytes): `lamports_per_byte_year`, `exemption_threshold`, `burn_percent` + +## Cheatcode Flow + +``` +cheatcode_is_spl_account(acc) -> sets SPLDataBuffer at data field, initializes borrow metadata +cheatcode_is_spl_mint(acc) -> sets SPLDataBuffer at data field, initializes borrow metadata +cheatcode_is_spl_rent(acc) -> sets SPLDataBuffer at data field, initializes borrow metadata + +Account::unpack_from_slice(buf) -> #splUnpack extracts value from SPLDataBuffer +Account::pack_into_slice(v,buf) -> #splPack writes value into SPLDataBuffer +bincode::deserialize(buf) -> #splUnpack extracts Rent from SPLDataBuffer +Rent::get() -> returns cached or new symbolic Rent value +``` + + +```k +module KMIR-SPL-TOKEN + imports KMIR-P-TOKEN + imports KMIR-INTRINSICS +``` + +## Helper operations for projected writes + +```k + syntax KItem ::= #forceSetPlaceValue ( Place , Evaluation ) [seqstrict(2)] + | #writeProjectionForce ( Value ) + + rule #forceSetPlaceValue(place(local(I), .ProjectionElems), VAL) => .K ... + SLOTS ... + + STORE => STORE[#frameSlotId(SLOTS, I) <- typedValue(VAL, tyOfLocal(frameLocal(STORE, SLOTS, I)), mutabilityOf(frameLocal(STORE, SLOTS, I)))] + + requires 0 <=Int I andBool I #forceSetPlaceValue(place(local(I), PROJ), VAL) + => #traverseProjection(toSlot(#frameSlotId(SLOTS, I)), frameValue(STORE, SLOTS, I), PROJ, .Contexts) + ~> #writeProjectionForce(VAL) + ... + + SLOTS ... + STORE + requires 0 <=Int I + andBool I #traverseProjection(toSlot(SLOT), _ORIGINAL, .ProjectionElems, CONTEXTS) + ~> #writeProjectionForce(NEW) + => #setSlotValue(SLOT, #buildUpdate(NEW, CONTEXTS)) + ... + + [preserves-definedness] +``` + +## Helper syntax + +```k + syntax Value ::= SPLDataBuffer ( Value ) + + syntax Operand ::= #appendProjsOp ( Operand , ProjectionElems ) [function, total] + rule #appendProjsOp(operandCopy(place(L, PROJS)), EXTRA) => operandCopy(place(L, appendP(PROJS, EXTRA))) + rule #appendProjsOp(operandMove(place(L, PROJS)), EXTRA) => operandMove(place(L, appendP(PROJS, EXTRA))) + rule #appendProjsOp(OP, _) => OP [owise] +``` + +## Helper predicates + +```k + syntax Bool ::= #isSplPubkey ( List ) [function, total] + rule #isSplPubkey(KEY) => size(KEY) ==Int 32 andBool allBytes(KEY) + + syntax Bool ::= #isZeroMemsetValue ( Value ) [function, total] + rule #isZeroMemsetValue(Integer(0, _, _)) => true + rule #isZeroMemsetValue(_) => false [owise] + + // Construct a 32-byte pubkey List from individual Int variables. + // When used with existential variables (?Var:Int), this produces a concrete List structure + // that ==K can decompose element-wise, avoiding opaque symbolic List equality in SMT. + syntax List ::= #mkSplPubkey ( + Int , Int , Int , Int , Int , Int , Int , Int , + Int , Int , Int , Int , Int , Int , Int , Int , + Int , Int , Int , Int , Int , Int , Int , Int , + Int , Int , Int , Int , Int , Int , Int , Int ) [macro] + rule #mkSplPubkey( + B0, B1, B2, B3, B4, B5, B6, B7, + B8, B9, B10, B11, B12, B13, B14, B15, + B16, B17, B18, B19, B20, B21, B22, B23, + B24, B25, B26, B27, B28, B29, B30, B31 ) => + ListItem(Integer(B0, 8, false)) ListItem(Integer(B1, 8, false)) + ListItem(Integer(B2, 8, false)) ListItem(Integer(B3, 8, false)) + ListItem(Integer(B4, 8, false)) ListItem(Integer(B5, 8, false)) + ListItem(Integer(B6, 8, false)) ListItem(Integer(B7, 8, false)) + ListItem(Integer(B8, 8, false)) ListItem(Integer(B9, 8, false)) + ListItem(Integer(B10, 8, false)) ListItem(Integer(B11, 8, false)) + ListItem(Integer(B12, 8, false)) ListItem(Integer(B13, 8, false)) + ListItem(Integer(B14, 8, false)) ListItem(Integer(B15, 8, false)) + ListItem(Integer(B16, 8, false)) ListItem(Integer(B17, 8, false)) + ListItem(Integer(B18, 8, false)) ListItem(Integer(B19, 8, false)) + ListItem(Integer(B20, 8, false)) ListItem(Integer(B21, 8, false)) + ListItem(Integer(B22, 8, false)) ListItem(Integer(B23, 8, false)) + ListItem(Integer(B24, 8, false)) ListItem(Integer(B25, 8, false)) + ListItem(Integer(B26, 8, false)) ListItem(Integer(B27, 8, false)) + ListItem(Integer(B28, 8, false)) ListItem(Integer(B29, 8, false)) + ListItem(Integer(B30, 8, false)) ListItem(Integer(B31, 8, false)) + + syntax Bool ::= #isByte ( Int ) [macro] + rule #isByte(X) => 0 <=Int X andBool X 0 <=Int N andBool N <=Int 2 + rule #isSplAccountStateVal(_) => false [owise] + + syntax Bool ::= #isSPLBorrowFunc ( String ) [function, total] + rule #isSPLBorrowFunc("std::cell::RefCell::<&mut [u8]>::borrow") => true + rule #isSPLBorrowFunc("std::cell::RefCell::<&mut [u8]>::borrow_mut") => true + rule #isSPLBorrowFunc("std::cell::RefCell::<&mut u64>::borrow") => true + rule #isSPLBorrowFunc("std::cell::RefCell::<&mut u64>::borrow_mut") => true + rule #isSPLBorrowFunc(_) => false [owise] + + syntax Bool ::= #isSPLUnpackFunc ( String ) [function, total] + rule #isSPLUnpackFunc(_) => false [owise] + // spl-token account + rule #isSPLUnpackFunc("::unpack_from_slice") => true + rule #isSPLUnpackFunc("Account::unpack_from_slice") => true + // spl-token mint + rule #isSPLUnpackFunc("::unpack_from_slice") => true + rule #isSPLUnpackFunc("Mint::unpack_from_slice") => true + // spl-token rent + rule #isSPLUnpackFunc("bincode::deserialize::<'_, solana_rent::Rent>") => true + rule #isSPLUnpackFunc("Rent::unpack") => true + // spl-token multisig + rule #isSPLUnpackFunc("::unpack_from_slice") => true + rule #isSPLUnpackFunc("Multisig::unpack_from_slice") => true + + syntax Bool ::= #isSPLPackFunc ( String ) [function, total] + rule #isSPLPackFunc(_) => false [owise] + // spl-token account + rule #isSPLPackFunc("::pack_into_slice") => true + rule #isSPLPackFunc("Account::pack_into_slice") => true + // spl-token mint + rule #isSPLPackFunc("::pack_into_slice") => true + rule #isSPLPackFunc("Mint::pack_into_slice") => true + // spl-token multisig + rule #isSPLPackFunc("::pack_into_slice") => true + rule #isSPLPackFunc("Multisig::pack_into_slice") => true + + syntax Bool ::= #isSPLRentGetFunc ( String ) [function, total] + rule #isSPLRentGetFunc(_) => false [owise] + rule #isSPLRentGetFunc("Rent::get") => true // mock harness + rule #isSPLRentGetFunc("solana_sysvar::rent::::get") => true + + syntax Bool ::= #isSPLSolMemsetFunc ( String ) [function, total] + rule #isSPLSolMemsetFunc(_) => false [owise] + rule #isSPLSolMemsetFunc("solana_program_memory::sol_memset") => true +``` + +## Slice metadata for SPL account buffers + +```k + // Account data buffer length (Account::LEN = 165) + rule #maybeDynamicSize( + dynamicSize(_), + SPLDataBuffer( + Aggregate(variantIdx(0), + ListItem(Aggregate(variantIdx(0), ListItem(Range(_)))) // mint + ListItem(Aggregate(variantIdx(0), ListItem(Range(_)))) // owner + ListItem(Integer(_, 64, false)) // amount + ListItem(_DELEG) // delegate COption + ListItem(STATE) // state + ListItem(_IS_NATIVE) // is_native COption + ListItem(Integer(_, 64, false)) // delegated_amount + ListItem(_CLOSE) // close_authority COption + ) + ) + ) + => dynamicSize(165) + requires #isSplAccountStateVal(STATE) + [priority(30)] + + // Mint data buffer length (Mint::LEN = 82) + rule #maybeDynamicSize( + dynamicSize(_), + SPLDataBuffer( + Aggregate(variantIdx(0), + ListItem(_AUTH) // mint_authority COption + ListItem(Integer(_, 64, false)) // supply + ListItem(Integer(_, 8, false)) // decimals + ListItem(BoolVal(_)) // is_initialized + ListItem(_FREEZE) // freeze_authority COption + ) + ) + ) + => dynamicSize(82) + [priority(30)] + + // Rent data buffer length (Rent::LEN = 17) + rule #maybeDynamicSize( + dynamicSize(_), + SPLDataBuffer( + Aggregate(variantIdx(0), + ListItem(Integer(_, 64, false)) // lamports_per_byte_year + ListItem(Float(2.0, 64)) // exemption_threshold + ListItem(Integer(_, 8, false)) // burn_percent + ) + ) + ) + => dynamicSize(17) + [priority(30)] + + // Multisig data buffer length (runtime-verification Multisig::LEN = 99) + rule #maybeDynamicSize( + dynamicSize(_), + SPLDataBuffer( + Aggregate(variantIdx(0), + ListItem(Integer(_, 8, false)) // m + ListItem(Integer(_, 8, false)) // n + ListItem(BoolVal(_)) // is_initialized + ListItem(Range( // signers: [Pubkey; 3] + ListItem(_) ListItem(_) ListItem(_) + )) + ) + ) + ) + => dynamicSize(99) + [priority(30)] + + syntax Int ::= #splBufferLen ( Value ) [function, total] + + rule #splBufferLen( + SPLDataBuffer( + Aggregate(variantIdx(0), + ListItem(Aggregate(variantIdx(0), ListItem(Range(_)))) + ListItem(Aggregate(variantIdx(0), ListItem(Range(_)))) + ListItem(Integer(_, 64, false)) + ListItem(_DELEG) + ListItem(STATE) + ListItem(_IS_NATIVE) + ListItem(Integer(_, 64, false)) + ListItem(_CLOSE) + ) + ) + ) + => 165 + requires #isSplAccountStateVal(STATE) + [priority(30)] + + rule #splBufferLen( + SPLDataBuffer( + Aggregate(variantIdx(0), + ListItem(_AUTH) + ListItem(Integer(_, 64, false)) + ListItem(Integer(_, 8, false)) + ListItem(BoolVal(_)) + ListItem(_FREEZE) + ) + ) + ) + => 82 + [priority(30)] + + rule #splBufferLen( + SPLDataBuffer( + Aggregate(variantIdx(0), + ListItem(Integer(_, 64, false)) + ListItem(Float(2.0, 64)) + ListItem(Integer(_, 8, false)) + ) + ) + ) + => 17 + [priority(30)] + + rule #splBufferLen( + SPLDataBuffer( + Aggregate(variantIdx(0), + ListItem(Integer(_, 8, false)) + ListItem(Integer(_, 8, false)) + ListItem(BoolVal(_)) + ListItem(Range( + ListItem(_) ListItem(_) ListItem(_) + )) + ) + ) + ) + => 99 // Multisig layout: m (1) + n (1) + is_initialized (1) + 3 * 32 signer bytes (MAX_SIGNERS = 3) + [priority(30)] + + rule #splBufferLen(_) => 0 [owise] +``` + +## Cheatcode handling + +The cheatcode functions receive an `&AccountInfo` argument. To access the underlying +data buffer, we navigate through the following Solana AccountInfo structure: + +``` +AccountInfo (arg is &AccountInfo, so first deref) +├── field 0: key: &Pubkey +├── field 1: lamports: Rc> +├── field 2: data: Rc> <- we want this +│ └── Rc +│ └── field 0: RcInner +│ └── field 0: Cell (strong count) +│ └── field 1: Cell (weak count) +│ └── field 2: T = RefCell<&mut [u8]> +│ └── field 0: Cell +│ └── field 1: UnsafeCell<&mut [u8]> +│ └── field 0: &mut [u8] <- the actual data buffer (deref to get [u8]) +├── field 3: owner: &Pubkey +├── ... +``` + +**Projection path to data buffer** (DATA_BUFFER_PROJS): +``` +Deref -> AccountInfo (deref &AccountInfo) +Field(2) -> .data (Rc>) +Field(0) -> RcInner (NonNull>>) +Field(0) -> actual pointer (*RcInner>) +Deref -> RefCell content (deref the pointer inside Rc) +Field(2) -> RefCell.value (UnsafeCell<&mut [u8]>) +Field(1) -> UnsafeCell.value (the &mut [u8] reference) +Field(0) -> inner value +Deref -> [u8] (the actual byte slice) +``` + +**Projection path to RefCell** (REFCELL_PROJS) - used for initializing borrow metadata: +``` +Deref -> AccountInfo +Field(2) -> .data +Field(0) -> RcInner +Field(0) -> RefCell location +Deref -> RefCell content +``` + +**RefCell<&mut [u8]> structure** - used by `#initBorrow` to set correct buffer size: +``` +RefCell<&mut [u8]> +├── field 0: Cell (BorrowFlag - borrow state counter) +├── field 1: Cell (borrow count for runtime checking) +├── field 2: UnsafeCell<&mut [u8]> +│ └── field 0: &mut [u8] (the actual reference) +│ └── metadata: dynamicSize(N) (buffer length: Account=165, Mint=82, Rent=17) +``` +The `#initBorrow` helper resets borrow counters to 0 and sets the correct dynamicSize. + +```k + // #initBorrow(RefCell, N) - Initialize RefCell borrow metadata with correct buffer size + // RefCell<&mut [u8]> layout: + // field 0: BorrowFlag (Cell) - borrow state counter + // field 1: borrow count (for runtime borrow checking) + // field 2: UnsafeCell<&mut [u8]> containing the actual reference with metadata + // This rule: + // 1. Resets borrow counters to 0 (no active borrows) + // 2. Sets the dynamicSize in metadata to N (the known buffer length: 165/82/17) + syntax Evaluation ::= #initBorrow(Evaluation, Int) [seqstrict(1)] + rule #initBorrow(Aggregate ( variantIdx ( 0 ) , + ListItem (Aggregate ( variantIdx ( 0 ) , ListItem (Aggregate ( variantIdx ( 0 ) , ListItem (Integer ( _ , 64 , false )))))) // borrow flag + ListItem (Aggregate ( variantIdx ( 0 ) , ListItem (Aggregate ( variantIdx ( 0 ) , ListItem (Integer ( _ , 64 , false )))))) // borrow count + ListItem (Aggregate ( variantIdx ( 0 ) , ListItem (Aggregate ( variantIdx ( 0 ) , ListItem (Aggregate ( variantIdx ( 0 ) , ListItem (Integer ( _ , 64 , true )))))) // inner wrapper + ListItem (Aggregate ( variantIdx ( 0 ) , ListItem (Reference ( SPLACE , MUT , metadata ( dynamicSize ( _ ) , 0 , dynamicSize ( _ )))))))) // &mut [u8] reference + ), N) + => Aggregate ( variantIdx ( 0 ) , + ListItem (Aggregate ( variantIdx ( 0 ) , ListItem (Aggregate ( variantIdx ( 0 ) , ListItem (Integer ( 0 , 64 , false )))))) // reset borrow flag to 0 + ListItem (Aggregate ( variantIdx ( 0 ) , ListItem (Aggregate ( variantIdx ( 0 ) , ListItem (Integer ( 0 , 64 , false )))))) // reset borrow count to 0 + ListItem (Aggregate ( variantIdx ( 0 ) , ListItem (Aggregate ( variantIdx ( 0 ) , ListItem (Aggregate ( variantIdx ( 0 ) , ListItem (Integer ( 0 , 64 , true )))))) + ListItem (Aggregate ( variantIdx ( 0 ) , ListItem (Reference ( SPLACE , MUT , metadata ( dynamicSize ( N ) , 0 , dynamicSize ( N )))))))) // set size to N + ) ... + +``` + +```{.k .symbolic} + // Projection path constants for navigating AccountInfo structure + // Path to the actual data buffer: AccountInfo -> data -> Rc -> RcInner -> RefCell -> UnsafeCell -> &mut [u8] -> [u8] + syntax ProjectionElems ::= "DATA_BUFFER_PROJS" [alias] + rule DATA_BUFFER_PROJS => projectionElemDeref // deref &AccountInfo + projectionElemField(fieldIdx(2), #hack()) // .data (Rc>) + projectionElemField(fieldIdx(0), #hack()) // RcInner + projectionElemField(fieldIdx(0), #hack()) // first field (RefCell location) + projectionElemDeref // deref Rc pointer + projectionElemField(fieldIdx(2), #hack()) // RefCell.value (UnsafeCell) + projectionElemField(fieldIdx(1), #hack()) // UnsafeCell.value + projectionElemField(fieldIdx(0), #hack()) // inner + projectionElemDeref // deref to [u8] + .ProjectionElems + + // Path to RefCell for borrow metadata: AccountInfo -> data -> Rc -> RcInner -> RefCell + syntax ProjectionElems ::= "REFCELL_PROJS" [alias] + rule REFCELL_PROJS => projectionElemDeref // deref &AccountInfo + projectionElemField(fieldIdx(2), #hack()) // .data + projectionElemField(fieldIdx(0), #hack()) // RcInner + projectionElemField(fieldIdx(0), #hack()) // RefCell location + projectionElemDeref // deref Rc pointer + .ProjectionElems + + rule [cheatcode-is-spl-account]: + #execTerminatorCall(_, FUNC, operandCopy(place(LOCAL, PROJS)) .Operands, _DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #forceSetPlaceValue( + place(LOCAL, appendP(PROJS, DATA_BUFFER_PROJS)), // navigate to [u8] data buffer + SPLDataBuffer( + Aggregate(variantIdx(0), + ListItem(Aggregate(variantIdx(0), ListItem(Range(?SplMintKey:List)))) // Account.mint: Pubkey + ListItem(Aggregate(variantIdx(0), ListItem(Range(?SplTokenOwnerKey:List)))) // Account.owner: Pubkey + ListItem(Integer(?SplAmount:Int, 64, false)) // Account.amount: u64 + ListItem(Aggregate(variantIdx(?SplHasDelegateKey:Int), // delegate COption + ListItem(Aggregate(variantIdx(0), ListItem(Range(?SplDelegateKey:List)))))) + ListItem(Aggregate(variantIdx(?SplAccountState:Int), .List)) // Account.state: AccountState + ListItem(Aggregate(variantIdx(?SplIsNativeLamportsVariant:Int), // is_native COption + ListItem(Integer(?SplIsNativeLamports:Int, 64, false)))) + ListItem(Integer(?SplDelegatedAmount:Int, 64, false)) // Account.delegated_amount: u64 + ListItem(Aggregate(variantIdx(?SplHasCloseAuthKey:Int), // close_authority COption + ListItem(Aggregate(variantIdx(0), ListItem(Range(?SplCloseAuthKey:List)))))) + ) + ) + ) + ~> #forceSetPlaceValue( + place(LOCAL, appendP(PROJS, REFCELL_PROJS)), // navigate to RefCell for borrow init + #initBorrow(operandCopy(place(LOCAL, appendP(PROJS, REFCELL_PROJS))), 165) + ) + ~> #continueAt(TARGET) + + requires #functionName(FUNC) ==String "spl_token::entrypoint::cheatcode_is_spl_account" + orBool #functionName(FUNC) ==String "cheatcode_is_spl_account" + ensures #isSplPubkey(?SplMintKey) + andBool #isSplPubkey(?SplTokenOwnerKey) + andBool 0 <=Int ?SplHasDelegateKey andBool ?SplHasDelegateKey <=Int 1 + andBool (0 ==Int #lookupDiscrAux(discriminant(0) discriminant(1) .Discriminants, variantIdx(?SplHasDelegateKey)) orBool 1 ==Int #lookupDiscrAux(discriminant(0) discriminant(1) .Discriminants, variantIdx(?SplHasDelegateKey))) + andBool #isSplPubkey(?SplDelegateKey) + andBool 0 <=Int ?SplAmount andBool ?SplAmount #traverseProjection(DEST, SPLDataBuffer(VAL), .ProjectionElems, CTXTS) ~> #derefTruncate(dynamicSize (_), PROJS) + => #traverseProjection(DEST, SPLDataBuffer(VAL), PROJS, CTXTS) ... + + + rule [cheatcode-is-spl-mint]: + #execTerminatorCall(_, FUNC, operandCopy(place(LOCAL, PROJS)) .Operands, _DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #forceSetPlaceValue( + place(LOCAL, appendP(PROJS, DATA_BUFFER_PROJS)), // navigate to [u8] data buffer + SPLDataBuffer( + Aggregate(variantIdx(0), + // optional key. The model always carries a payload key (never to be read if None) + ListItem(Aggregate(variantIdx(?SplMintHasAuthKey:Int), // mint_authority COption + ListItem(Aggregate(variantIdx(0), ListItem(Range(?SplMintAuthorityKey:List)))))) + ListItem(Integer(?SplMintSupply:Int, 64, false)) // supply: u64 + ListItem(Integer(?SplMintDecimals:Int, 8, false)) // decimals: u8 + ListItem(BoolVal(?_SplMintInitialised:Bool)) // is_initialized: bool + // optional key. The model always carries a payload key (never to be read if None) + ListItem(Aggregate(variantIdx(?SplMintHasFreezeKey:Int), // freeze_authority COption + ListItem(Aggregate(variantIdx(0), ListItem(Range(?SplMintFreezeAuthorityKey:List)))))) + ) + ) + ) + ~> #forceSetPlaceValue( + place(LOCAL, appendP(PROJS, REFCELL_PROJS)), // navigate to RefCell for borrow init + #initBorrow(operandCopy(place(LOCAL, appendP(PROJS, REFCELL_PROJS))), 82) + ) + ~> #continueAt(TARGET) + + requires #functionName(FUNC) ==String "spl_token::entrypoint::cheatcode_is_spl_mint" + orBool #functionName(FUNC) ==String "cheatcode_is_spl_mint" + ensures 0 <=Int ?SplMintHasAuthKey andBool ?SplMintHasAuthKey <=Int 1 + andBool (0 ==Int #lookupDiscrAux(discriminant(0) discriminant(1) .Discriminants, variantIdx(?SplMintHasAuthKey)) orBool 1 ==Int #lookupDiscrAux(discriminant(0) discriminant(1) .Discriminants, variantIdx(?SplMintHasAuthKey))) + andBool #isSplPubkey(?SplMintAuthorityKey) + andBool 0 <=Int ?SplMintHasFreezeKey andBool ?SplMintHasFreezeKey <=Int 1 + andBool (0 ==Int #lookupDiscrAux(discriminant(0) discriminant(1) .Discriminants, variantIdx(?SplMintHasFreezeKey)) orBool 1 ==Int #lookupDiscrAux(discriminant(0) discriminant(1) .Discriminants, variantIdx(?SplMintHasFreezeKey))) + andBool #isSplPubkey(?SplMintFreezeAuthorityKey) + andBool 0 <=Int ?SplMintSupply andBool ?SplMintSupply #execTerminatorCall(_, FUNC, operandCopy(place(LOCAL, PROJS)) .Operands, _DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #forceSetPlaceValue( + place(LOCAL, appendP(PROJS, DATA_BUFFER_PROJS)), // navigate to [u8] data buffer + SPLDataBuffer( + Aggregate(variantIdx(0), + ListItem(Integer(?SplRentLamportsPerByteYear:Int, 64, false)) // lamports_per_byte_year: u64 + ListItem(Float(2.0, 64)) // exemption_threshold: f64 + ListItem(Integer(?SplRentBurnPercent:Int, 8, false)) // burn_percent: u8 + ) + ) + ) + ~> #forceSetPlaceValue( + place(LOCAL, appendP(PROJS, REFCELL_PROJS)), // navigate to RefCell for borrow init + #initBorrow(operandCopy(place(LOCAL, appendP(PROJS, REFCELL_PROJS))), 17) + ) + ~> #continueAt(TARGET) + + requires #functionName(FUNC) ==String "spl_token::entrypoint::cheatcode_is_spl_rent" + orBool #functionName(FUNC) ==String "cheatcode_is_spl_rent" + ensures 0 <=Int ?SplRentLamportsPerByteYear andBool ?SplRentLamportsPerByteYear #execTerminatorCall(_, FUNC, operandCopy(place(LOCAL, PROJS)) .Operands, _DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #forceSetPlaceValue( + place(LOCAL, appendP(PROJS, DATA_BUFFER_PROJS)), // navigate to [u8] data buffer + SPLDataBuffer( + Aggregate(variantIdx(0), + ListItem(Integer(?SplMultisigM:Int, 8, false)) // m: u8 + ListItem(Integer(?SplMultisigN:Int, 8, false)) // n: u8 + ListItem(BoolVal(?_SplMultisigInitialised:Bool)) // is_initialized: bool + ListItem(Range( // signers: [Pubkey; 3] + ListItem(Aggregate(variantIdx(0), ListItem(Range(#mkSplPubkey( + ?SplSi0B0:Int, ?SplSi0B1:Int, ?SplSi0B2:Int, ?SplSi0B3:Int, + ?SplSi0B4:Int, ?SplSi0B5:Int, ?SplSi0B6:Int, ?SplSi0B7:Int, + ?SplSi0B8:Int, ?SplSi0B9:Int, ?SplSi0B10:Int, ?SplSi0B11:Int, + ?SplSi0B12:Int, ?SplSi0B13:Int, ?SplSi0B14:Int, ?SplSi0B15:Int, + ?SplSi0B16:Int, ?SplSi0B17:Int, ?SplSi0B18:Int, ?SplSi0B19:Int, + ?SplSi0B20:Int, ?SplSi0B21:Int, ?SplSi0B22:Int, ?SplSi0B23:Int, + ?SplSi0B24:Int, ?SplSi0B25:Int, ?SplSi0B26:Int, ?SplSi0B27:Int, + ?SplSi0B28:Int, ?SplSi0B29:Int, ?SplSi0B30:Int, ?SplSi0B31:Int))))) + ListItem(Aggregate(variantIdx(0), ListItem(Range(#mkSplPubkey( + ?SplSi1B0:Int, ?SplSi1B1:Int, ?SplSi1B2:Int, ?SplSi1B3:Int, + ?SplSi1B4:Int, ?SplSi1B5:Int, ?SplSi1B6:Int, ?SplSi1B7:Int, + ?SplSi1B8:Int, ?SplSi1B9:Int, ?SplSi1B10:Int, ?SplSi1B11:Int, + ?SplSi1B12:Int, ?SplSi1B13:Int, ?SplSi1B14:Int, ?SplSi1B15:Int, + ?SplSi1B16:Int, ?SplSi1B17:Int, ?SplSi1B18:Int, ?SplSi1B19:Int, + ?SplSi1B20:Int, ?SplSi1B21:Int, ?SplSi1B22:Int, ?SplSi1B23:Int, + ?SplSi1B24:Int, ?SplSi1B25:Int, ?SplSi1B26:Int, ?SplSi1B27:Int, + ?SplSi1B28:Int, ?SplSi1B29:Int, ?SplSi1B30:Int, ?SplSi1B31:Int))))) + ListItem(Aggregate(variantIdx(0), ListItem(Range(#mkSplPubkey( + ?SplSi2B0:Int, ?SplSi2B1:Int, ?SplSi2B2:Int, ?SplSi2B3:Int, + ?SplSi2B4:Int, ?SplSi2B5:Int, ?SplSi2B6:Int, ?SplSi2B7:Int, + ?SplSi2B8:Int, ?SplSi2B9:Int, ?SplSi2B10:Int, ?SplSi2B11:Int, + ?SplSi2B12:Int, ?SplSi2B13:Int, ?SplSi2B14:Int, ?SplSi2B15:Int, + ?SplSi2B16:Int, ?SplSi2B17:Int, ?SplSi2B18:Int, ?SplSi2B19:Int, + ?SplSi2B20:Int, ?SplSi2B21:Int, ?SplSi2B22:Int, ?SplSi2B23:Int, + ?SplSi2B24:Int, ?SplSi2B25:Int, ?SplSi2B26:Int, ?SplSi2B27:Int, + ?SplSi2B28:Int, ?SplSi2B29:Int, ?SplSi2B30:Int, ?SplSi2B31:Int))))) + )) + ) + ) + ) + ~> #forceSetPlaceValue( + place(LOCAL, appendP(PROJS, REFCELL_PROJS)), // navigate to RefCell for borrow init + #initBorrow(operandCopy(place(LOCAL, appendP(PROJS, REFCELL_PROJS))), 99) + ) + ~> #continueAt(TARGET) + + requires #functionName(FUNC) ==String "spl_token::entrypoint::cheatcode_is_spl_multisig" + orBool #functionName(FUNC) ==String "cheatcode_is_spl_multisig" + ensures #isByte(?SplMultisigM) andBool #isByte(?SplMultisigN) + // signer 0 + andBool #isByte(?SplSi0B0) andBool #isByte(?SplSi0B1) andBool #isByte(?SplSi0B2) andBool #isByte(?SplSi0B3) + andBool #isByte(?SplSi0B4) andBool #isByte(?SplSi0B5) andBool #isByte(?SplSi0B6) andBool #isByte(?SplSi0B7) + andBool #isByte(?SplSi0B8) andBool #isByte(?SplSi0B9) andBool #isByte(?SplSi0B10) andBool #isByte(?SplSi0B11) + andBool #isByte(?SplSi0B12) andBool #isByte(?SplSi0B13) andBool #isByte(?SplSi0B14) andBool #isByte(?SplSi0B15) + andBool #isByte(?SplSi0B16) andBool #isByte(?SplSi0B17) andBool #isByte(?SplSi0B18) andBool #isByte(?SplSi0B19) + andBool #isByte(?SplSi0B20) andBool #isByte(?SplSi0B21) andBool #isByte(?SplSi0B22) andBool #isByte(?SplSi0B23) + andBool #isByte(?SplSi0B24) andBool #isByte(?SplSi0B25) andBool #isByte(?SplSi0B26) andBool #isByte(?SplSi0B27) + andBool #isByte(?SplSi0B28) andBool #isByte(?SplSi0B29) andBool #isByte(?SplSi0B30) andBool #isByte(?SplSi0B31) + // signer 1 + andBool #isByte(?SplSi1B0) andBool #isByte(?SplSi1B1) andBool #isByte(?SplSi1B2) andBool #isByte(?SplSi1B3) + andBool #isByte(?SplSi1B4) andBool #isByte(?SplSi1B5) andBool #isByte(?SplSi1B6) andBool #isByte(?SplSi1B7) + andBool #isByte(?SplSi1B8) andBool #isByte(?SplSi1B9) andBool #isByte(?SplSi1B10) andBool #isByte(?SplSi1B11) + andBool #isByte(?SplSi1B12) andBool #isByte(?SplSi1B13) andBool #isByte(?SplSi1B14) andBool #isByte(?SplSi1B15) + andBool #isByte(?SplSi1B16) andBool #isByte(?SplSi1B17) andBool #isByte(?SplSi1B18) andBool #isByte(?SplSi1B19) + andBool #isByte(?SplSi1B20) andBool #isByte(?SplSi1B21) andBool #isByte(?SplSi1B22) andBool #isByte(?SplSi1B23) + andBool #isByte(?SplSi1B24) andBool #isByte(?SplSi1B25) andBool #isByte(?SplSi1B26) andBool #isByte(?SplSi1B27) + andBool #isByte(?SplSi1B28) andBool #isByte(?SplSi1B29) andBool #isByte(?SplSi1B30) andBool #isByte(?SplSi1B31) + // signer 2 + andBool #isByte(?SplSi2B0) andBool #isByte(?SplSi2B1) andBool #isByte(?SplSi2B2) andBool #isByte(?SplSi2B3) + andBool #isByte(?SplSi2B4) andBool #isByte(?SplSi2B5) andBool #isByte(?SplSi2B6) andBool #isByte(?SplSi2B7) + andBool #isByte(?SplSi2B8) andBool #isByte(?SplSi2B9) andBool #isByte(?SplSi2B10) andBool #isByte(?SplSi2B11) + andBool #isByte(?SplSi2B12) andBool #isByte(?SplSi2B13) andBool #isByte(?SplSi2B14) andBool #isByte(?SplSi2B15) + andBool #isByte(?SplSi2B16) andBool #isByte(?SplSi2B17) andBool #isByte(?SplSi2B18) andBool #isByte(?SplSi2B19) + andBool #isByte(?SplSi2B20) andBool #isByte(?SplSi2B21) andBool #isByte(?SplSi2B22) andBool #isByte(?SplSi2B23) + andBool #isByte(?SplSi2B24) andBool #isByte(?SplSi2B25) andBool #isByte(?SplSi2B26) andBool #isByte(?SplSi2B27) + andBool #isByte(?SplSi2B28) andBool #isByte(?SplSi2B29) andBool #isByte(?SplSi2B30) andBool #isByte(?SplSi2B31) + [priority(30), preserves-definedness] +``` + +## RefCell borrow helpers + +```k + // RefCell::<&mut [u8]>::borrow / borrow_mut - returns Ref/RefMut wrapper with pointer to data + rule [spl-borrow-data]: + #execTerminatorCall(_, FUNC, operandCopy(place(LOCAL, PROJS)) .Operands, DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #setSPLBorrowData(DEST, operandCopy(place(LOCAL, PROJS))) + ~> #continueAt(TARGET) + + requires #isSPLBorrowFunc(#functionName(FUNC)) + [priority(30), preserves-definedness] + + syntax KItem ::= #setSPLBorrowData ( Place , Evaluation ) [seqstrict(2)] + rule #setSPLBorrowData(DEST, Reference(slotPlace(SLOT, PROJS), MUT, META)) + => #setLocalValue(DEST, Aggregate(variantIdx(0), + ListItem(Aggregate(variantIdx(0), ListItem(PtrLocal(slotPlace(SLOT, appendP(PROJS, projectionElemField(fieldIdx(1), #hack()) projectionElemField(fieldIdx(0), #hack()) .ProjectionElems)), MUT, META)))) + ListItem(Aggregate(variantIdx(0), ListItem(Reference(slotPlace(SLOT, appendP(PROJS, projectionElemField(fieldIdx(0), #hack()) .ProjectionElems)), MUT, META)))))) ... + +``` + +## Pack / Unpack operations + +```k + // Account/Mint::unpack_from_slice, bincode::deserialize (for Rent) - extracts struct from SPLDataBuffer + rule [spl-account-unpack]: + #execTerminatorCall(_, FUNC, OP:Operand .Operands, DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #splUnpack(DEST, #withDeref(OP)) + ~> #continueAt(TARGET) + + requires #isSPLUnpackFunc(#functionName(FUNC)) + [priority(30), preserves-definedness] + + syntax KItem ::= #splUnpack ( Place , Evaluation ) [seqstrict(2)] + rule #splUnpack(DEST, SPLDataBuffer(VAL)) + => #setLocalValue(DEST, Aggregate(variantIdx(0), ListItem(VAL))) ... + + + // Account/Mint::pack_into_slice - writes struct into SPLDataBuffer + rule [spl-account-pack]: + #execTerminatorCall(_, FUNC, SRC:Operand DST:Operand .Operands, _DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #splPack(#withDeref(SRC), #withDeref(DST)) ~> #continueAt(TARGET) + + requires #isSPLPackFunc(#functionName(FUNC)) + [priority(30), preserves-definedness] + + syntax KItem ::= #splPack ( Evaluation , Operand ) [seqstrict(1)] + rule #splPack(VAL, operandCopy(DEST)) => #setLocalValue(DEST, SPLDataBuffer(VAL)) ... + rule #splPack(VAL, operandMove(DEST)) => #setLocalValue(DEST, SPLDataBuffer(VAL)) ... +``` + +## sol_memset on SPL data buffers + +`sol_memset` is used by `delete_account` to zero out account data. Rather than +symbolically executing the byte-by-byte loop through `IterMut::next`, we +intercept the call and directly replace the `SPLDataBuffer` content with a +zeroed representation. + +```{.k .symbolic} + // sol_memset(buf, val, len) - fast-path full-buffer zeroization on recognized SPLDataBuffer values. + // Any other call shape falls back to the ordinary call semantics below. + rule [spl-sol-memset]: + #execTerminatorCall(FTY, FUNC, + BUF:Operand VAL:Operand LEN:Operand .Operands, + DEST, TARGET, UNWIND, SPAN) ~> _CONT + => #execSPLSolMemset(FTY, FUNC, #withDeref(BUF), VAL, LEN, BUF, BUF VAL LEN .Operands, DEST, TARGET, UNWIND, SPAN) + + requires #isSPLSolMemsetFunc(#functionName(FUNC)) + [priority(30), preserves-definedness] + + syntax KItem ::= #execSPLSolMemset ( Ty, MonoItemKind, Evaluation , Evaluation , Evaluation , Operand, Operands, Place, MaybeBasicBlockIdx, UnwindAction, Span ) [seqstrict(3,4,5)] + + rule #execSPLSolMemset(_, _, SPLDataBuffer(_) #as BUF, VAL, Integer(LEN, 64, false), operandCopy(place(LOCAL, PROJS)), _ARGS, _DEST, TARGET, _UNWIND, _SPAN) + => #setLocalValue(place(LOCAL, appendP(PROJS, projectionElemDeref .ProjectionElems)), SPLDataBuffer(Integer(0, 8, false))) ~> #continueAt(TARGET) ... + requires #isZeroMemsetValue(VAL) + andBool LEN ==Int #splBufferLen(BUF) + andBool 0 #execSPLSolMemset(_, _, SPLDataBuffer(_) #as BUF, VAL, Integer(LEN, 64, false), operandMove(place(LOCAL, PROJS)), _ARGS, _DEST, TARGET, _UNWIND, _SPAN) + => #setLocalValue(place(LOCAL, appendP(PROJS, projectionElemDeref .ProjectionElems)), SPLDataBuffer(Integer(0, 8, false))) ~> #continueAt(TARGET) ... + requires #isZeroMemsetValue(VAL) + andBool LEN ==Int #splBufferLen(BUF) + andBool 0 #execSPLSolMemset(FTY, FUNC, _BUF, _VAL, _LEN, _BUFOP, ARGS, DEST, TARGET, UNWIND, SPAN) ~> _ + => #setUpCalleeData(FUNC, ARGS, SPAN) + + CALLER => FTY + + _ + OLDCALLER => CALLER + OLDDEST => DEST + OLDTARGET => TARGET + OLDUNWIND => UNWIND + SLOTS + + STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, SLOTS)) STACK + [owise] +``` + +## Rent sysvar handling + +```{.k .symbolic} + // Rent::get - returns stable value, cached in outermost frame + rule [spl-rent-get]: + #execTerminatorCall(_, FUNC, .Operands, DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #writeSPLSysRent(DEST) + ~> #continueAt(TARGET) + + requires #isSPLRentGetFunc(#functionName(FUNC)) + [priority(30), preserves-definedness] + + syntax KItem ::= #writeSPLSysRent ( Place ) + + // reuse existing Rent value if already initialised in outermost frame + rule #writeSPLSysRent(DEST) => #setLocalValue(DEST, Aggregate(variantIdx(0), ListItem(RENTVAL))) ... + + STACK:List + ListItem(StackFrame(_, _, _, _, ListItem(typedValue(RENTVAL, _, _)) _REST)) + + requires 0 #writeSPLSysRent(DEST) => #setLocalValue(DEST, Aggregate(variantIdx(0), ListItem(RENTVAL))) ... + + ListItem(StackFrame(_, _, _, _, ListItem(typedValue(RENTVAL, _, _)) _REST)) + + [preserves-definedness] + + // first access: create SysRent in outermost frame's return slot (local 0) + rule [mk-spl-sys-rent]: + #writeSPLSysRent(_DEST) ~> _CONT + + _:List + ListItem(StackFrame(_, _, _, _, + ListItem(newLocal(_, _) => + typedValue( + Aggregate(variantIdx(0), + ListItem(Integer(?SplSysRentLamportsPerByteYear:Int, 64, false)) + ListItem(Float(2.0, 64)) + ListItem(Integer(?SplSysRentBurnPercent:Int, 8, false)) + ), + ty(0), + mutabilityNot + ) + ) _:List + )) + + ensures 0 <=Int ?SplSysRentLamportsPerByteYear + andBool ?SplSysRentLamportsPerByteYear #execTerminatorCall(_, FUNC, ARG1:Operand ARG2:Operand .Operands, DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #execSPLCmpPubkeys( DEST, #withDeref(ARG1), #withDeref(ARG2)) + ~> #continueAt(TARGET) + + requires #functionName(FUNC) ==String "spl_token::processor::Processor::cmp_pubkeys" + [priority(30), preserves-definedness] + + syntax KItem ::= #execSPLCmpPubkeys( Place , Evaluation , Evaluation ) [seqstrict(2,3)] + rule #execSPLCmpPubkeys(DEST, Aggregate(variantIdx(0), ListItem(Range(KEY1))), Aggregate(variantIdx(0), ListItem(Range(KEY2)))) + => #setLocalValue(DEST, BoolVal(KEY1 ==K KEY2)) + ... + [preserves-definedness] +``` + +## Rent minimum_balance calculation simplification + +The rent exemption check involves: `(int)((float)(data_len * lamports_per_byte_year) * 2.0)` +Since float casts create thunks, we simplify this pattern directly to `PRODUCT * 2`. + +```k + // Simplify: (int)((float)PRODUCT * 2.0) => PRODUCT * 2 + rule #cast( + thunk(#applyBinOp(binOpMul, + thunk(#cast(Integer(PRODUCT:Int, 64, false), castKindIntToFloat, INT_TY, FLOAT_TY)), + Float(0.20000000000000000e1, 64), + false)), + castKindFloatToInt, FLOAT_TY, INT_TY) + => Integer(PRODUCT *Int 2, 64, false) +``` + +## Linking identical accounts + +When the `AccountInfo` are provided to the program from the solana runtime, +we restrict that if they have the same `key` then the rest of their fields are +the same. This cheatcode should only be on two `AccountInfo` after `cheatcode_is_account` +is called on those `AccountInfo` to set up the symbolic state. Furthermore this should +be called prior to capturing initial state and prior to executing the implementation. + +```{.k .symbolic} + // Path to account key: &AccountInfo -> AccountInfo -> key -> &Pubkey -> Pubkey + syntax ProjectionElems ::= "KEY_PROJS" [alias] + rule KEY_PROJS => projectionElemDeref // deref &AccountInfo + projectionElemField(fieldIdx(0), #hack()) // .key (&Pubkey) + projectionElemDeref // deref to Pubkey + .ProjectionElems + + // Cheatcode to link two accounts if they have the same key + // Usage: cheatcode_maybe_same_account(&account1, &account2) + // Effect: If account1.key == account2.key, then all SPL data fields are constrained equal + rule [cheatcode-maybe-same-account]: + #execTerminatorCall(_, FUNC, + operandCopy(place(LOCAL1, PROJS1)) + operandCopy(place(LOCAL2, PROJS2)) + .Operands, _DEST, TARGET, _UNWIND, _SPAN) ~> _CONT + => #maybeLinkAccounts( + operandCopy(place(LOCAL1, appendP(PROJS1, KEY_PROJS))), + operandCopy(place(LOCAL2, appendP(PROJS2, KEY_PROJS))), + operandCopy(place(LOCAL1, appendP(PROJS1, DATA_BUFFER_PROJS))), + operandCopy(place(LOCAL2, appendP(PROJS2, DATA_BUFFER_PROJS))) + ) ~> #continueAt(TARGET) + + requires #functionName(FUNC) ==String "cheatcode_maybe_same_account" + orBool #functionName(FUNC) ==String "spl_token::entrypoint::cheatcode_maybe_same_account" + [priority(30), preserves-definedness] + + // Helper to evaluate keys and data, then apply constraint + syntax KItem ::= #maybeLinkAccounts(Evaluation, Evaluation, Evaluation, Evaluation) [seqstrict] + + // Case: keys are equal - add ensures clause to constrain SPL data equality + // The ensures clause adds the constraint that all SPL fields must be equal + rule #maybeLinkAccounts( + Aggregate(variantIdx(0), ListItem(Range(KEY1))), + Aggregate(variantIdx(0), ListItem(Range(KEY2))), + SPLDataBuffer(Aggregate(variantIdx(0), + ListItem(Aggregate(variantIdx(0), ListItem(Range(MINT1)))) + ListItem(Aggregate(variantIdx(0), ListItem(Range(OWNER1)))) + ListItem(Integer(AMOUNT1, 64, false)) + ListItem(Aggregate(variantIdx(HAS_DELEG1), ListItem(Aggregate(variantIdx(0), ListItem(Range(DELEG1)))))) + ListItem(Aggregate(variantIdx(STATE1), .List)) + ListItem(Aggregate(variantIdx(HAS_NATIVE1), ListItem(Integer(NATIVE1, 64, false)))) + ListItem(Integer(DELEG_AMT1, 64, false)) + ListItem(Aggregate(variantIdx(HAS_CLOSE1), ListItem(Aggregate(variantIdx(0), ListItem(Range(CLOSE1)))))) + )), + SPLDataBuffer(Aggregate(variantIdx(0), + ListItem(Aggregate(variantIdx(0), ListItem(Range(MINT2)))) + ListItem(Aggregate(variantIdx(0), ListItem(Range(OWNER2)))) + ListItem(Integer(AMOUNT2, 64, false)) + ListItem(Aggregate(variantIdx(HAS_DELEG2), ListItem(Aggregate(variantIdx(0), ListItem(Range(DELEG2)))))) + ListItem(Aggregate(variantIdx(STATE2), .List)) + ListItem(Aggregate(variantIdx(HAS_NATIVE2), ListItem(Integer(NATIVE2, 64, false)))) + ListItem(Integer(DELEG_AMT2, 64, false)) + ListItem(Aggregate(variantIdx(HAS_CLOSE2), ListItem(Aggregate(variantIdx(0), ListItem(Range(CLOSE2)))))) + )) + ) => .K ... + requires KEY1 ==K KEY2 + ensures MINT1 ==K MINT2 + andBool OWNER1 ==K OWNER2 + andBool AMOUNT1 ==Int AMOUNT2 + andBool HAS_DELEG1 ==Int HAS_DELEG2 + andBool DELEG1 ==K DELEG2 + andBool STATE1 ==Int STATE2 + andBool HAS_NATIVE1 ==Int HAS_NATIVE2 + andBool NATIVE1 ==Int NATIVE2 + andBool DELEG_AMT1 ==Int DELEG_AMT2 + andBool HAS_CLOSE1 ==Int HAS_CLOSE2 + andBool CLOSE1 ==K CLOSE2 + [priority(30)] + + // Case: keys are different - no constraint needed + rule #maybeLinkAccounts( + Aggregate(variantIdx(0), ListItem(Range(KEY1))), + Aggregate(variantIdx(0), ListItem(Range(KEY2))), + _, _ + ) => .K ... + requires notBool (KEY1 ==K KEY2) + [priority(30)] +``` + +```k +endmodule +``` 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/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..b11590a73 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) +│ (52 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..6fa282f0e 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) +│ (255 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..0b5f9a407 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) +│ (40 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..696ab77fc 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) +│ (142 steps) ├─ 3 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 1 ) ) ┃ @@ -25,7 +25,7 @@ ├─ 5 │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 1 ) ) │ - │ (182 steps) + │ (189 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..8ec993373 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) +│ (817 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..475527760 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) +│ (242 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..2bc0dd9de 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 @@ -30,23 +30,40 @@ 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..617868852 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 @@ -34,35 +34,59 @@ 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..d7aed584e 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 @@ -28,51 +28,95 @@ 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..03a35b447 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 @@ -43,73 +43,132 @@ 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..3321de6fd 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 @@ -30,28 +30,47 @@ 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..3dc96b692 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state @@ -32,39 +32,65 @@ 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..1276d095e 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state @@ -26,19 +26,32 @@ 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..140ddc79c 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 @@ -28,25 +28,42 @@ 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..51c769e9a 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 @@ -33,63 +33,107 @@ 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..caf36e18c 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 @@ -30,32 +30,56 @@ 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..010735c02 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 @@ -24,26 +24,47 @@ 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/closure-call.state b/kmir/src/tests/integration/data/exec-smir/call-with-args/closure-call.state index db13358c2..fb80dea02 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 @@ -27,25 +27,42 @@ 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 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..443560ffd 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,6 +1,6 @@ - #execBlock ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) ) ~> .K + #setLocalValue ( place (... local: local ( 1 ) , projection: .ProjectionElems ) , Integer ( 10 , 64 , false ) ) ~> #setArgsFromStack ( 2 , 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 ) ~> #execBlock ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) ) ~> .K noReturn @@ -24,16 +24,27 @@ 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 ( 3 ) + ListItem ( 4 ) + ListItem ( 5 ) + - 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 ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( 1 ) + ListItem ( 2 ) ) ) + 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 ) + 3 |-> newLocal ( ty ( 1 ) , mutabilityMut ) + 4 |-> newLocal ( ty ( 26 ) , mutabilityNot ) + 5 |-> newLocal ( ty ( 28 ) , 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..3a16923e2 100644 --- a/kmir/src/tests/integration/data/exec-smir/enum/enum.state +++ b/kmir/src/tests/integration/data/exec-smir/enum/enum.state @@ -1,6 +1,6 @@ - #selectBlock ( switchTargets (... branches: branch ( 89 , basicBlockIdx ( 7 ) ) branch ( 90 , basicBlockIdx ( 6 ) ) .Branches , otherwise: basicBlockIdx ( 5 ) ) , operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) ) ~> .K + #execBlockIdx ( basicBlockIdx ( 4 ) ) ~> .K noReturn @@ -32,27 +32,46 @@ 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 |-> newLocal ( 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..2c36f36a8 100644 --- a/kmir/src/tests/integration/data/exec-smir/intrinsic/blackbox.state +++ b/kmir/src/tests/integration/data/exec-smir/intrinsic/blackbox.state @@ -28,26 +28,46 @@ 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/intrinsic/raw_eq_simple.state b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.state index baeb2b64a..a3ba811ed 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 @@ -27,17 +27,29 @@ 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/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..ef39d8034 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 @@ -25,11 +25,17 @@ 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..69e86b47c 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 @@ -1,19 +1,20 @@ - #execTerminator ( terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) ~> .K + #execTerminator ( terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) ~> .K noReturn - ty ( 27 ) + ty ( 26 ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) ) - ty ( 26 ) + ty ( 25 ) place (... local: local ( 0 ) , projection: .ProjectionElems ) @@ -24,14 +25,21 @@ unwindActionContinue - - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - + + ListItem ( 2 ) + - 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 ( -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 + \ 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..42ae403c7 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 @@ -26,46 +26,56 @@ 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..ab66867ea 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 @@ -36,44 +36,80 @@ 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..654007f31 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 @@ -30,24 +30,41 @@ 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..d756dd2ac 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 @@ -28,22 +28,37 @@ 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..a9e5a7da4 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 @@ -28,23 +28,39 @@ 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..896c20693 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 @@ -29,25 +29,43 @@ 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..c0d4988e6 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 @@ -29,24 +29,41 @@ 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..227fb7741 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 @@ -39,51 +39,91 @@ 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..1c913b239 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 + #reserveSlots ( localDecl (... ty: ty ( 27 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 50 ) , mut: mutabilityMut ) .LocalDecls ) ~> #setArgsFromStack ( 1 , operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ~> #execBlock ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindPtrToPtr , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 51 ) ) 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 , terminator: 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 @@ -25,26 +25,41 @@ 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 ( 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 ( PtrLocal ( slotPlace ( 1 , .ProjectionElems ) , mutabilityNot , metadata ( noMetadataSize , 0 , noMetadataSize ) ) , 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 |-> newLocal ( 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 + \ 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..2af4b96f9 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 @@ -28,15 +28,25 @@ 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..502d7e627 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 @@ -27,22 +27,36 @@ 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..e1ad28148 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state +++ b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state @@ -29,24 +29,43 @@ 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..97a0d9c8e 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state +++ b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state @@ -29,19 +29,33 @@ 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..0c2503f39 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state @@ -27,16 +27,27 @@ 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..dcf6058c1 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state @@ -27,16 +27,27 @@ 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..34ce07696 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refReturned.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refReturned.state @@ -27,17 +27,29 @@ 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..83dca70a2 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/simple.state +++ b/kmir/src/tests/integration/data/exec-smir/references/simple.state @@ -26,16 +26,27 @@ 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..31a20d4c9 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state +++ b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state @@ -34,37 +34,67 @@ 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..6e4ba57f5 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 @@ -33,26 +33,45 @@ 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..511cef938 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 @@ -24,19 +24,29 @@ 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..29caa03ee 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,68 @@ - #execStmts ( .Statements ) ~> #execTerminator ( terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) ~> .K + #execTerminatorCall ( ty ( 25 ) , monoItemFn (... name: symbol ( "foo" ) , id: defId ( 8 ) , body: someBody ( 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 ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , 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 ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityMut ) + 6 |-> typedValue ( BoolVal ( false ) , 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/modules/test-add-module-multiple.k b/kmir/src/tests/integration/data/modules/test-add-module-multiple.k index eea9602de..6ca118e3c 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 @@ -27,13 +27,19 @@ 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..54ae2e88a 100644 --- a/kmir/src/tests/integration/data/modules/test-add-module.k +++ b/kmir/src/tests/integration/data/modules/test-add-module.k @@ -27,13 +27,19 @@ 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..27bb30290 100644 --- a/kmir/src/tests/integration/data/modules/test-add-module.md +++ b/kmir/src/tests/integration/data/modules/test-add-module.md @@ -30,13 +30,19 @@ 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/cse-branching-callee.rs b/kmir/src/tests/integration/data/prove-rs/cse-branching-callee.rs new file mode 100644 index 000000000..1cdf2fe78 --- /dev/null +++ b/kmir/src/tests/integration/data/prove-rs/cse-branching-callee.rs @@ -0,0 +1,13 @@ +fn classify(x: u32) -> u32 { + if x > 10 { + 1 + } else { + 0 + } +} + +fn main() { + let a: u32 = 5; + let result = classify(a); + assert!(result == 0); +} diff --git a/kmir/src/tests/integration/data/prove-rs/cse-cast-test.rs b/kmir/src/tests/integration/data/prove-rs/cse-cast-test.rs new file mode 100644 index 000000000..14eba66d2 --- /dev/null +++ b/kmir/src/tests/integration/data/prove-rs/cse-cast-test.rs @@ -0,0 +1,9 @@ +fn as_usize(x: u32) -> usize { + x as usize +} + +fn main() { + let a: u32 = 5; + let b = as_usize(a); + assert!(b == 5); +} diff --git a/kmir/src/tests/integration/data/prove-rs/cse-reference-args.rs b/kmir/src/tests/integration/data/prove-rs/cse-reference-args.rs new file mode 100644 index 000000000..f3a83bb1d --- /dev/null +++ b/kmir/src/tests/integration/data/prove-rs/cse-reference-args.rs @@ -0,0 +1,10 @@ +fn add_to(x: &u32, y: u32) -> u32 { + *x + y +} + +fn main() { + let a: u32 = 3; + let b: u32 = 7; + let result = add_to(&a, b); + assert!(result == 10); +} diff --git a/kmir/src/tests/integration/data/prove-rs/cse-simple-callee.rs b/kmir/src/tests/integration/data/prove-rs/cse-simple-callee.rs new file mode 100644 index 000000000..b8fb70485 --- /dev/null +++ b/kmir/src/tests/integration/data/prove-rs/cse-simple-callee.rs @@ -0,0 +1,9 @@ +fn double(x: u32) -> u32 { + x + x +} + +fn main() { + let a: u32 = 5; + let b = double(a); + assert!(b == 10); +} diff --git a/kmir/src/tests/integration/data/prove-rs/show/assert-inhabited-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/assert-inhabited-fail.main.expected index cdb5d7e6d..9c28f70d3 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assert-inhabited-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/assert-inhabited-fail.main.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (10 steps) +│ (13 steps) └─ 3 (stuck, leaf) #ProgramError ( AssertInhabitedFailure ) ~> .K function: main 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/show/assert-true.main.to-module.json b/kmir/src/tests/integration/data/prove-rs/show/assert-true.main.to-module.json index 9cf02027b..7d0de6f08 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 @@ -615,7 +615,7 @@ "node": "KApply", "label": { "node": "KLabel", - "name": "", + "name": "", "params": [] }, "args": [ @@ -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": "1", + "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..6e7d3df82 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 @@ -27,13 +27,19 @@ 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/assert_eq_exp.main.expected b/kmir/src/tests/integration/data/prove-rs/show/assert_eq_exp.main.expected index 3fe017dcf..4409d2fe7 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assert_eq_exp.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/assert_eq_exp.main.expected @@ -3,8 +3,26 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (148 steps) -├─ 3 (terminal) +│ (50 steps) +├─ 3 +│ #setSlotValue ( 5 , Aggregate ( variantIdx ( 0 ) , ListItem ( Integer ( 42 , 32 +│ function: main +│ span: 90 +│ +│ (50 steps) +├─ 4 +│ #setLocalValue ( place ( ... local: local ( 6 ) , projection: .ProjectionElems ) +│ function: main +│ span: 99 +│ +│ (50 steps) +├─ 5 +│ #execTerminator ( terminator ( ... kind: terminatorKindSwitchInt ( ... discr: op +│ function: main +│ span: 94 +│ +│ (13 steps) +├─ 6 (terminal) │ #EndProgram ~> .K │ function: main │ diff --git a/kmir/src/tests/integration/data/prove-rs/show/assume-cheatcode-conflict-fail.check_assume_conflict.expected b/kmir/src/tests/integration/data/prove-rs/show/assume-cheatcode-conflict-fail.check_assume_conflict.expected index 470f41c25..d90c61416 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/assume-cheatcode-conflict-fail.check_assume_conflict.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/assume-cheatcode-conflict-fail.check_assume_conflict.expected @@ -3,8 +3,13 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (61 steps) -└─ 3 (stuck, leaf) +│ (50 steps) +├─ 3 +│ #applyBinOp ( binOpGt , Integer ( ARG_UINT1:Int , 64 , false ) , Integer ( 10 , +│ span: 50 +│ +│ (17 steps) +└─ 4 (stuck, leaf) #setUpCalleeData ( monoItemFn ( ... name: symbol ( "_ZN4core9panicking5panic17h span: 32 diff --git a/kmir/src/tests/integration/data/prove-rs/show/bitwise-not-shift.main.expected b/kmir/src/tests/integration/data/prove-rs/show/bitwise-not-shift.main.expected index 6cf403b84..8eac2e3c7 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/bitwise-not-shift.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/bitwise-not-shift.main.expected @@ -3,8 +3,110 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (837 steps) -├─ 3 (terminal) +│ (50 steps) +├─ 3 +│ #reserveSlots ( localDecl ( ... ty: ty ( 37 ) , span: span ( 182 ) , mut: mutabi +│ function: main +│ span: 182 +│ +│ (50 steps) +├─ 4 +│ #traverseProjection ( toSlot ( 4 ) , Integer ( 7 , 128 , false ) , .ProjectionEl +│ function: main +│ +│ (50 steps) +├─ 5 +│ rvalueUnaryOp ( unOpNot , operandMove ( place ( ... local: local ( 8 ) , project +│ function: main +│ span: 121 +│ +│ (50 steps) +├─ 6 +│ #execStmt ( statement ( ... kind: statementKindAssign ( ... place: place ( ... l +│ function: main +│ span: 132 +│ +│ (50 steps) +├─ 7 +│ BoolVal ( false ) +~> #freezer#applyUnOp(_,_)_RT-DATA_Evaluation_UnOp_Evaluation1 +│ function: main +│ span: 136 +│ +│ (50 steps) +├─ 8 +│ #setSlotValue ( 18 , Moved ) +~> BoolVal ( true ) +~> #freezer#selectBlock(_,_)_KM +│ function: main +│ +│ (50 steps) +├─ 9 +│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ function: main +│ span: 151 +│ +│ (50 steps) +├─ 10 +│ operandCopy ( place ( ... local: local ( 4 ) , projection: .ProjectionElems ) ) +│ span: 65 +│ +│ (50 steps) +├─ 11 +│ #reserveSlots ( localDecl ( ... ty: ty ( 16 ) , span: span ( 51 ) , mut: mutabil +│ span: 51 +│ +│ (50 steps) +├─ 12 +│ #execStmts ( statement ( ... kind: statementKindStorageDead ( local ( 4 ) ) , sp +│ span: 54 +│ +│ (50 steps) +├─ 13 +│ #setArgsFromStack ( 2 , operandMove ( place ( ... local: local ( 32 ) , projecti +│ span: 73 +│ +│ (50 steps) +├─ 14 +│ #setLocalValue ( place ( ... local: local ( 30 ) , projection: .ProjectionElems +│ function: main +│ +│ (50 steps) +├─ 15 +│ #execStmt ( statement ( ... kind: statementKindStorageLive ( local ( 3 ) ) , spa +│ span: 92 +│ +│ (50 steps) +├─ 16 +│ #setLocalValue ( place ( ... local: local ( 34 ) , projection: .ProjectionElems +│ function: main +│ span: 170 +│ +│ (50 steps) +├─ 17 +│ #setArgFromStack ( 1 , operandMove ( place ( ... local: local ( 40 ) , projectio +│ span: 84 +│ +│ (50 steps) +├─ 18 +│ #execStmts ( .Statements ) +~> #execTerminator ( terminator ( ... kind: terminato +│ span: 83 +│ +│ (50 steps) +├─ 19 +│ #setArgsFromStack ( 3 , .Operands ) +~> #execBlock ( basicBlock ( ... statements: +│ span: 100 +│ +│ (50 steps) +├─ 20 +│ #execBlock ( basicBlock ( ... statements: statement ( ... kind: statementKindAss +│ function: main +│ span: 180 +│ +│ (28 steps) +├─ 21 (terminal) │ #EndProgram ~> .K │ function: main │ 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..b18a8cd0e 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,13 +3,23 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (73 steps) +│ (50 steps) ├─ 3 +│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC +│ span: 307 +│ +│ (50 steps) +├─ 4 +│ #execStmt ( statement ( ... kind: statementKindAssign ( ... place: place ( ... l +│ span: 185 +│ +│ (7 steps) +├─ 5 │ #cast ( Integer ( 4 , 64 , false ) , castKindTransmute , ty ( 29 ) , ty ( 50 ) ) │ span: 186 │ │ (1 step) -└─ 4 (leaf, terminal) +└─ 6 (leaf, terminal) thunk ( #cast ( Integer ( 4 , 64 , false ) , castKindTransmute , ty ( 29 ) , ty span: 186 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..bbd3bb90c 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,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: src/rust/library/std/src/rt.rs:194 │ -│ (7 steps) +│ (10 steps) ├─ 3 │ #execTerminatorCall ( ty ( 31 ) , monoItemFn ( ... name: symbol ( "foo" ) , id: │ function: main @@ -15,7 +15,7 @@ │ function: foo │ span: /prove-rs/break-on-function.rs:4 │ -│ (5 steps) +│ (10 steps) ├─ 5 │ #execTerminatorCall ( ty ( 26 ) , monoItemFn ( ... name: symbol ( "std::hint::bl │ function: foo @@ -27,7 +27,7 @@ │ function: std::hint::black_box:: │ span: /rust/library/core/src/hint.rs:389 │ -│ (12 steps) +│ (15 steps) ├─ 7 │ #execTerminatorCall ( ty ( 25 ) , IntrinsicFunction ( symbol ( "black_box" ) ) , │ function: std::hint::black_box:: @@ -39,7 +39,7 @@ │ function: std::hint::black_box:: │ span: /rust/library/core/src/hint.rs:389 │ -│ (41 steps) +│ (46 steps) ├─ 9 (terminal) │ #EndProgram ~> .K │ function: main 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..53dd56868 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,8 +3,104 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (877 steps) -└─ 3 (stuck, leaf) +│ (50 steps) +├─ 3 +│ rvalueAggregate ( aggregateKindAdt ( adtDef ( 17 ) , variantIdx ( 0 ) , genericA +│ span: 32 +│ +│ (50 steps) +├─ 4 +│ Aggregate ( variantIdx ( 0 ) , ListItem ( Aggregate ( variantIdx ( 0 ) , ListIte +│ span: 263 +│ +│ (50 steps) +├─ 5 +│ #reserveSlots ( localDecl ( ... ty: ty ( 47 ) , span: span ( 68 ) , mut: mutabil +│ span: 68 +│ +│ (50 steps) +├─ 6 +│ #traverseProjection ( toSlot ( 29 ) , Reference ( slotPlace ( 2 , projectionElem +│ span: 159 +│ +│ (50 steps) +├─ 7 +│ #cast ( PtrLocal ( slotPlace ( 2 , projectionElemField ( fieldIdx ( 0 ) , ty ( 6 +│ span: 86 +│ +│ (50 steps) +├─ 8 +│ #setLocalValue ( place ( ... local: local ( 16 ) , projection: .ProjectionElems +│ span: 102 +│ +│ (50 steps) +├─ 9 +│ #decodeConstant ( constantKindAllocated ( allocation ( ... bytes: b"\xff\xff\xff +│ span: 100 +│ +│ (50 steps) +├─ 10 +│ #execStmt ( statement ( ... kind: statementKindAssign ( ... place: place ( ... l +│ span: 168 +│ +│ (50 steps) +├─ 11 +│ #execStmts ( statement ( ... kind: statementKindStorageDead ( local ( 7 ) ) , sp +│ span: 171 +│ +│ (50 steps) +├─ 12 +│ #execStmt ( statement ( ... kind: statementKindStorageDead ( local ( 22 ) ) , sp +│ span: 172 +│ +│ (50 steps) +├─ 13 +│ #execTerminator ( terminator ( ... kind: terminatorKindReturn , span: span ( 160 +│ span: 160 +│ +│ (50 steps) +├─ 14 +│ rvalueRef ( region ( ... kind: regionKindReErased ) , borrowKindMut ( ... kind: +│ span: 271 +│ +│ (50 steps) +├─ 15 +│ #execStmt ( statement ( ... kind: statementKindStorageLive ( local ( 5 ) ) , spa +│ span: 237 +│ +│ (50 steps) +├─ 16 +│ #execStmts ( statement ( ... kind: statementKindAssign ( ... place: place ( ... +│ span: 272 +│ +│ (50 steps) +├─ 17 +│ #execStmts ( .Statements ) +~> #execTerminator ( terminator ( ... kind: terminato +│ span: 274 +│ +│ (50 steps) +├─ 18 +│ #reserveSlots ( localDecl ( ... ty: ty ( 46 ) , span: span ( 76 ) , mut: mutabil +│ span: 76 +│ +│ (50 steps) +├─ 19 +│ rvalueRef ( region ( ... kind: regionKindReErased ) , borrowKindShared , place ( +│ span: 159 +│ +│ (50 steps) +├─ 20 +│ PtrLocal ( slotPlace ( 2 , projectionElemField ( fieldIdx ( 0 ) , ty ( 68 ) ) p +│ span: 86 +│ +│ (50 steps) +├─ 21 +│ #execTerminator ( terminator ( ... kind: terminatorKindGoto ( ... target: basicB +│ span: 162 +│ +│ (37 steps) +└─ 22 (stuck, leaf) #setUpCalleeData ( monoItemFn ( ... name: symbol ( "_ZN4core4cell22panic_already span: 32 diff --git a/kmir/src/tests/integration/data/prove-rs/show/interior-mut3-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/interior-mut3-fail.main.expected index ea0b2c00a..0afc34aec 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/interior-mut3-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/interior-mut3-fail.main.expected @@ -3,15 +3,27 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (94 steps) +│ (50 steps) ├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl +│ Integer ( 0 , 32 , true ) +~> #readOn ( .List , .Operands ) +~> #mkAggregate ( agg +│ span: 57 +│ +│ (50 steps) +├─ 4 +│ #execTerminator ( terminator ( ... kind: terminatorKindReturn , span: span ( 50 +│ span: 50 +│ +│ (24 steps) +├─ 5 +│ #cast ( PtrLocal ( slotPlace ( 2 , projectionElemField ( fieldIdx ( 0 ) , ty ( 1 │ function: main │ span: 73 │ │ (1 step) -└─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj +└─ 6 (leaf, terminal) + thunk ( #cast ( PtrLocal ( slotPlace ( 2 , projectionElemField ( fieldIdx ( 0 ) function: main span: 73 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..c0d870dd2 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,8 +3,226 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (2028 steps) -├─ 3 (terminal) +│ (50 steps) +├─ 3 +│ rvalueAggregate ( aggregateKindArray ( ty ( 31 ) ) , operandMove ( place ( ... l +│ function: main +│ span: 199 +│ +│ (50 steps) +├─ 4 +│ #setLocalValue ( place ( ... local: local ( 7 ) , projection: .ProjectionElems ) +│ function: main +│ span: 190 +│ +│ (50 steps) +├─ 5 +│ #setLocalValue ( place ( ... local: local ( 4 ) , projection: .ProjectionElems ) +│ span: 176 +│ +│ (50 steps) +├─ 6 +│ rvalueAddressOf ( mutabilityNot , place ( ... local: local ( 1 ) , projection: p +│ span: 55 +│ +│ (50 steps) +├─ 7 +│ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 2 ) ) +│ +│ (50 steps) +├─ 8 +│ #execStmts ( .Statements ) +~> #execTerminator ( terminator ( ... kind: terminato +│ span: 60 +│ +│ (50 steps) +├─ 9 +│ #dropSlots ( ListItem ( 25 ) ListItem ( 26 ) ) +~> #execBlockIdx ( basicBlockIdx +│ +│ (50 steps) +├─ 10 +│ #mkRef ( toSlot ( 15 ) , .ProjectionElems , mutabilityMut , metadata ( noMetadat +│ span: 179 +│ +│ (50 steps) +├─ 11 +│ #execBlockIdx ( basicBlockIdx ( 2 ) ) ~> .K +│ +│ (50 steps) +├─ 12 +│ #traverseProjection ( toSlot ( 41 ) , Reference ( slotPlace ( 15 , .ProjectionEl +│ span: 110 +│ +│ (50 steps) +├─ 13 +│ #traverseProjection ( toSlot ( 45 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( +│ span: 115 +│ +│ (50 steps) +├─ 14 +│ #setLocalValue ( place ( ... local: local ( 15 ) , projection: .ProjectionElems +│ span: 119 +│ +│ (50 steps) +├─ 15 +│ #execStmts ( statement ( ... kind: statementKindAssign ( ... place: place ( ... +│ span: 144 +│ +│ (50 steps) +├─ 16 +│ #traverseProjection ( toSlot ( 64 ) , PtrLocal ( slotPlace ( 2 , projectionElemF +│ span: 149 +│ +│ (50 steps) +├─ 17 +│ #execStmt ( statement ( ... kind: statementKindAssign ( ... place: place ( ... l +│ span: 113 +│ +│ (50 steps) +├─ 18 +│ Aggregate ( variantIdx ( 1 ) , ListItem ( Reference ( slotPlace ( 2 , projection +│ span: 117 +│ +│ (50 steps) +├─ 19 +│ rvalueUse ( operandConstant ( constOperand ( ... span: span ( 183 ) , userTy: no +│ span: 183 +│ +│ (50 steps) +├─ 20 +│ Integer ( 1 , 8 , false ) +~> #freezer#setLocalValue(_,_)_RT-DATA_KItem_Place_Eva +│ span: 185 +│ +│ (50 steps) +├─ 21 +│ #reserveSlots ( localDecl ( ... ty: ty ( 30 ) , span: span ( 145 ) , mut: mutabi +│ span: 145 +│ +│ (50 steps) +├─ 22 +│ #execStmt ( statement ( ... kind: statementKindAssign ( ... place: place ( ... l +│ span: 107 +│ +│ (50 steps) +├─ 23 +│ #traverseProjection ( toSlot ( 15 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( +│ span: 113 +│ +│ (50 steps) +├─ 24 +│ #execStmts ( .Statements ) +~> #execTerminator ( terminator ( ... kind: terminato +│ span: 97 +│ +│ (50 steps) +├─ 25 +│ PtrLocal ( slotPlace ( 15 , projectionElemField ( fieldIdx ( 1 ) , ty ( 30 ) ) +│ span: 134 +│ +│ (50 steps) +├─ 26 +│ #traverseProjection ( toSlot ( 93 ) , PtrLocal ( slotPlace ( 2 , projectionElemF +│ span: 32 +│ +│ (50 steps) +├─ 27 +│ #execStmts ( .Statements ) +~> #execTerminator ( terminator ( ... kind: terminato +│ span: 132 +│ +│ (50 steps) +├─ 28 +│ Reference ( slotPlace ( 2 , projectionElemField ( fieldIdx ( 1 ) , ty ( 48 ) ) +│ span: 126 +│ +│ (50 steps) +├─ 29 +│ #setSlotValue ( 18 , Moved ) +~> Integer ( 1 , 0 , false ) +~> #freezer#selectBloc +│ +│ (50 steps) +├─ 30 +│ operandMove ( place ( ... local: local ( 14 ) , projection: .ProjectionElems ) ) +│ +│ (50 steps) +├─ 31 +│ #reserveSlots ( localDecl ( ... ty: ty ( 35 ) , span: span ( 156 ) , mut: mutabi +│ span: 156 +│ +│ (50 steps) +├─ 32 +│ #traverseProjection ( toSlot ( 15 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( +│ span: 105 +│ +│ (50 steps) +├─ 33 +│ rvalueRef ( region ( ... kind: regionKindReErased ) , borrowKindShared , place ( +│ span: 111 +│ +│ (50 steps) +├─ 34 +│ #applyBinOp ( binOpEq , PtrLocal ( slotPlace ( 2 , projectionElemField ( fieldId +│ span: 111 +│ +│ (50 steps) +├─ 35 +│ operandConstant ( constOperand ( ... span: span ( 119 ) , userTy: noUserTypeAnno +│ span: 119 +│ +│ (50 steps) +├─ 36 +│ #execStmt ( statement ( ... kind: statementKindStorageLive ( local ( 24 ) ) , sp +│ span: 145 +│ +│ (50 steps) +├─ 37 +│ #execStmts ( statement ( ... kind: statementKindAssign ( ... place: place ( ... +│ span: 151 +│ +│ (50 steps) +├─ 38 +│ #cast ( operandCopy ( place ( ... local: local ( 27 ) , projection: .ProjectionE +│ span: 128 +│ +│ (50 steps) +├─ 39 +│ #execBlockIdx ( basicBlockIdx ( 4 ) ) ~> .K +│ +│ (50 steps) +├─ 40 +│ #setLocalValue ( place ( ... local: local ( 13 ) , projection: .ProjectionElems +│ span: 181 +│ +│ (50 steps) +├─ 41 +│ #execBlockIdx ( basicBlockIdx ( 3 ) ) ~> .K +│ +│ (50 steps) +├─ 42 +│ #execStmts ( .Statements ) +~> #execTerminator ( terminator ( ... kind: terminato +│ span: 96 +│ +│ (50 steps) +├─ 43 +│ #execStmt ( statement ( ... kind: statementKindStorageDead ( local ( 6 ) ) , spa +│ span: 108 +│ +│ (50 steps) +├─ 44 +│ #execStmts ( statement ( ... kind: statementKindStorageDead ( local ( 11 ) ) , s +│ span: 114 +│ +│ (50 steps) +├─ 45 +│ #execStmts ( statement ( ... kind: statementKindAssign ( ... place: place ( ... +│ span: 32 +│ +│ (49 steps) +├─ 46 (terminal) │ #EndProgram ~> .K │ function: main │ diff --git a/kmir/src/tests/integration/data/prove-rs/show/iterator-simple.main.expected b/kmir/src/tests/integration/data/prove-rs/show/iterator-simple.main.expected index f1cd9a4d1..6436eca4f 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/iterator-simple.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/iterator-simple.main.expected @@ -3,8 +3,97 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (798 steps) -├─ 3 (terminal) +│ (50 steps) +├─ 3 +│ #cast ( Range ( ListItem ( Integer ( 1 , 32 , true ) ) ) , castKindTransmute , t +│ span: 131 +│ +│ (50 steps) +├─ 4 +│ #setLocalValue ( place ( ... local: local ( 2 ) , projection: .ProjectionElems ) +│ function: main +│ +│ (50 steps) +├─ 5 +│ #reserveSlots ( localDecl ( ... ty: ty ( 2 ) , span: span ( 204 ) , mut: mutabil +│ span: 204 +│ +│ (50 steps) +├─ 6 +│ #traverseProjection ( toSlot ( 4 ) , Aggregate ( variantIdx ( 0 ) , ListItem ( R +│ span: 172 +│ +│ (50 steps) +├─ 7 +│ operandMove ( place ( ... local: local ( 6 ) , projection: .ProjectionElems ) ) +│ span: 175 +│ +│ (50 steps) +├─ 8 +│ #execStmts ( .Statements ) +~> #execTerminator ( terminator ( ... kind: terminato +│ span: 176 +│ +│ (50 steps) +├─ 9 +│ #readOperands ( operandMove ( place ( ... local: local ( 8 ) , projection: .Proj +│ span: 195 +│ +│ (50 steps) +├─ 10 +│ #execStmts ( statement ( ... kind: statementKindStorageLive ( local ( 15 ) ) , s +│ span: 197 +│ +│ (50 steps) +├─ 11 +│ BoolVal ( false ) +~> #freezer#selectBlock(_,_)_KMIR-CONTROL-FLOW_KItem_SwitchTar +│ +│ (50 steps) +├─ 12 +│ rvalueBinaryOp ( binOpOffset , operandCopy ( place ( ... local: local ( 22 ) , p +│ span: 211 +│ +│ (50 steps) +├─ 13 +│ #execStmts ( statement ( ... kind: statementKindStorageDead ( local ( 24 ) ) , s +│ span: 219 +│ +│ (50 steps) +├─ 14 +│ #execStmts ( .Statements ) +~> #execTerminator ( terminator ( ... kind: terminato +│ function: main +│ span: 250 +│ +│ (50 steps) +├─ 15 +│ #reserveSlots ( localDecl ( ... ty: ty ( 3 ) , span: span ( 169 ) , mut: mutabil +│ span: 169 +│ +│ (50 steps) +├─ 16 +│ #setLocalValue ( place ( ... local: local ( 7 ) , projection: .ProjectionElems ) +│ span: 171 +│ +│ (50 steps) +├─ 17 +│ #applyBinOp ( binOpSubUnchecked , Integer ( 1 , 64 , false ) , Integer ( 1 , 64 +│ span: 173 +│ +│ (50 steps) +├─ 18 +│ #execStmt ( statement ( ... kind: statementKindStorageDead ( local ( 3 ) ) , spa +│ span: 184 +│ +│ (50 steps) +├─ 19 +│ operandCopy ( place ( ... local: local ( 4 ) , projection: .ProjectionElems ) ) +│ function: main +│ span: 250 +│ +│ (23 steps) +├─ 20 (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..339513963 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 @@ -3,15 +3,21 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (46 steps) +│ (50 steps) ├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl +│ #execStmt ( statement ( ... kind: statementKindAssign ( ... place: place ( ... l +│ function: main +│ span: 50 +│ +│ (7 steps) +├─ 4 +│ #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 +└─ 5 (leaf, terminal) + 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..089c108f5 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,8 +3,94 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (740 steps) -├─ 3 (terminal) +│ (50 steps) +├─ 3 +│ #decodeConstant ( constantKindAllocated ( allocation ( ... bytes: b"\x00" , prov +│ span: 88 +│ +│ (50 steps) +├─ 4 +│ #setLocalValue ( place ( ... local: local ( 4 ) , projection: .ProjectionElems ) +│ function: main +│ span: 106 +│ +│ (50 steps) +├─ 5 +│ #reserveSlots ( localDecl ( ... ty: ty ( 28 ) , span: span ( 78 ) , mut: mutabil +│ span: 78 +│ +│ (50 steps) +├─ 6 +│ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 4 ) ) +│ +│ (50 steps) +├─ 7 +│ #setLocalValue ( place ( ... local: local ( 1 ) , projection: .ProjectionElems ) +│ span: 110 +│ +│ (50 steps) +├─ 8 +│ #execStmts ( statement ( ... kind: statementKindAssign ( ... place: place ( ... +│ function: main +│ span: 117 +│ +│ (50 steps) +├─ 9 +│ operandCopy ( place ( ... local: local ( 11 ) , projection: projectionElemField +│ function: main +│ span: 116 +│ +│ (50 steps) +├─ 10 +│ #execBlock ( basicBlock ( ... statements: statement ( ... kind: statementKindAss +│ span: 73 +│ +│ (50 steps) +├─ 11 +│ #execStmts ( .Statements ) +~> #execTerminator ( terminator ( ... kind: terminato +│ span: 77 +│ +│ (50 steps) +├─ 12 +│ #applyBinOp ( binOpEq , operandCopy ( place ( ... local: local ( 3 ) , projectio +│ span: 148 +│ +│ (50 steps) +├─ 13 +│ #setLocalValue ( place ( ... local: local ( 1 ) , projection: .ProjectionElems ) +│ span: 88 +│ +│ (50 steps) +├─ 14 +│ rvalueRef ( region ( ... kind: regionKindReErased ) , borrowKindShared , place ( +│ function: main +│ span: 131 +│ +│ (50 steps) +├─ 15 +│ AllocRef ( allocId ( 4 ) , .ProjectionElems , metadata ( noMetadataSize , 0 , no +│ function: main +│ span: 129 +│ +│ (50 steps) +├─ 16 +│ #setLocalValue ( place ( ... local: local ( 3 ) , projection: .ProjectionElems ) +│ span: 72 +│ +│ (50 steps) +├─ 17 +│ #setUpCalleeData ( monoItemFn ( ... name: symbol ( " #freezer#applyBinOp(_,_,_,_)_RT-DATA_Evaluation_Bin +│ span: 148 +│ +│ (34 steps) +├─ 19 (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..4a3b15465 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) +│ (19 steps) ├─ 3 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 1 , basicBlockIdx ( 3 ) ) │ function: foo @@ -94,11 +94,9 @@ Node roles (exclusive): Leaf paths from init: total leaves (non-root): 1 reachable leaves : 1 - total steps : 34 + total steps : 39 - 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: shortest steps 39, path 1 -> 3 -> 5 -> 7 -> 9 -> 11 -> 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..69ded0468 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) +│ (49 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..206be5944 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,8 +3,13 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (44 steps) -├─ 3 (split) +│ (50 steps) +├─ 3 +│ #execStmts ( statement ( ... kind: statementKindAssign ( ... place: place ( ... +│ span: 69 +│ +│ (25 steps) +├─ 4 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 2 ) ) ┃ ┃ (branch) @@ -12,11 +17,11 @@ ┃ ┃ constraint: ┃ ┃ notBool size ( ARG_ARRAY1:List ) >=Int 4 ┃ │ -┃ ├─ 4 +┃ ├─ 5 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 2 ) ) ┃ │ ┃ │ (6 steps) -┃ └─ 6 (stuck, leaf) +┃ └─ 7 (stuck, leaf) ┃ #setUpCalleeData ( monoItemFn ( ... name: symbol ( "_ZN4core9panicking5panic17h ┃ span: 32 ┃ @@ -24,48 +29,80 @@ ┃ constraint: ┃ size ( ARG_ARRAY1:List ) >=Int 4 │ - ├─ 5 + ├─ 6 │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 2 ) ) │ - │ (211 steps) - ├─ 7 - │ #traverseProjection ( toStack ( 1 , local ( 2 ) ) , Range ( range ( #mapOffset ( + │ (50 steps) + ├─ 8 + │ #cast ( operandMove ( place ( ... local: local ( 7 ) , projection: .ProjectionEl + │ span: 75 + │ + │ (50 steps) + ├─ 9 + │ #applyUnOp ( unOpPtrMetadata , Reference ( slotPlace ( 8 , .ProjectionElems ) , + │ span: 73 + │ + │ (50 steps) + ├─ 10 + │ #execStmts ( .Statements ) +~> #execTerminator ( terminator ( ... kind: terminato + │ span: 45 + │ + │ (50 steps) + ├─ 11 + │ #execStmts ( .Statements ) +~> #execTerminator ( terminator ( ... kind: assert ( + │ span: 81 + │ + │ (21 steps) + ├─ 12 + │ #traverseProjection ( toSlot ( 2 ) , Range ( range ( ARG_ARRAY1:List , 0 , size │ span: 87 ┃ ┃ (1 step) ┣━━┓ ┃ │ - ┃ ├─ 8 - ┃ │ #traverseProjection ( toStack ( 1 , local ( 2 ) ) , project:Value ( range ( #map + ┃ ├─ 13 + ┃ │ #traverseProjection ( toSlot ( 2 ) , project:Value ( range ( ARG_ARRAY1:List , 0 ┃ │ span: 87 ┃ │ - ┃ │ (6 steps) - ┃ ├─ 10 - ┃ │ #traverseProjection ( toStack ( 1 , local ( 2 ) ) , Range ( range ( #mapOffset ( + ┃ │ (7 steps) + ┃ ├─ 15 + ┃ │ #traverseProjection ( toSlot ( 2 ) , Range ( range ( ARG_ARRAY1:List , 0 , size ┃ │ span: 87 ┃ ┃ ┃ ┃ (1 step) ┃ ┣━━┓ ┃ ┃ │ - ┃ ┃ ├─ 11 - ┃ ┃ │ #traverseProjection ( toStack ( 1 , local ( 2 ) ) , Range ( range ( range ( #map + ┃ ┃ ├─ 16 + ┃ ┃ │ #traverseProjection ( toSlot ( 2 ) , Range ( range ( range ( ARG_ARRAY1:List , 0 ┃ ┃ │ span: 87 ┃ ┃ │ - ┃ ┃ │ (114 steps) - ┃ ┃ └─ 13 (stuck, leaf) - ┃ ┃ #traverseProjection ( toLocal ( 5 ) , Range ( range ( #mapOffset ( ARG_ARRAY1:Li + ┃ ┃ │ (50 steps) + ┃ ┃ ├─ 18 + ┃ ┃ │ rvalueCast ( castKindPointerCoercion ( pointerCoercionUnsize ) , operandCopy ( p + ┃ ┃ │ span: 89 + ┃ ┃ │ + ┃ ┃ │ (50 steps) + ┃ ┃ ├─ 19 + ┃ ┃ │ #execStmts ( statement ( ... kind: statementKindAssign ( ... place: place ( ... + ┃ ┃ │ span: 95 + ┃ ┃ │ + ┃ ┃ │ (19 steps) + ┃ ┃ └─ 20 (stuck, leaf) + ┃ ┃ #traverseProjection ( toSlot ( 8 ) , Range ( range ( ARG_ARRAY1:List , 0 , size ┃ ┃ span: 97 ┃ ┃ ┃ ┗━━┓ ┃ │ - ┃ └─ 12 (stuck, leaf) - ┃ #traverseProjection ( toStack ( 1 , local ( 2 ) ) , Range ( range ( #mapOffset ( + ┃ └─ 17 (stuck, leaf) + ┃ #traverseProjection ( toSlot ( 2 ) , Range ( range ( ARG_ARRAY1:List , 0 , size ┃ span: 87 ┃ ┗━━┓ │ - └─ 9 (stuck, leaf) - #traverseProjection ( toStack ( 1 , local ( 2 ) ) , Range ( range ( #mapOffset ( + └─ 14 (stuck, leaf) + #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-nested-wrapper-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-nested-wrapper-fail.main.expected index 28b856633..531e2c255 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-nested-wrapper-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-nested-wrapper-fail.main.expected @@ -3,15 +3,21 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (68 steps) +│ (50 steps) ├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl +│ Reference ( slotPlace ( 2 , .ProjectionElems ) , mutabilityNot , metadata ( stat +│ function: main +│ span: 274 +│ +│ (40 steps) +├─ 4 +│ #cast ( PtrLocal ( slotPlace ( 2 , projectionElemConstantIndex ( ... offset: 0 , │ function: main │ span: 270 │ │ (1 step) -└─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj +└─ 5 (leaf, terminal) + thunk ( #cast ( PtrLocal ( slotPlace ( 2 , projectionElemConstantIndex ( ... off function: main span: 270 diff --git a/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-singleton-wrapped-array-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-singleton-wrapped-array-fail.main.expected index 28b856633..531e2c255 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-singleton-wrapped-array-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/ptr-cast-array-to-singleton-wrapped-array-fail.main.expected @@ -3,15 +3,21 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (68 steps) +│ (50 steps) ├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl +│ Reference ( slotPlace ( 2 , .ProjectionElems ) , mutabilityNot , metadata ( stat +│ function: main +│ span: 274 +│ +│ (40 steps) +├─ 4 +│ #cast ( PtrLocal ( slotPlace ( 2 , projectionElemConstantIndex ( ... offset: 0 , │ function: main │ span: 270 │ │ (1 step) -└─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj +└─ 5 (leaf, terminal) + thunk ( #cast ( PtrLocal ( slotPlace ( 2 , projectionElemConstantIndex ( ... off function: main span: 270 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..7a07ad2ee 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 @@ -3,15 +3,21 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (68 steps) +│ (50 steps) ├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl +│ Reference ( slotPlace ( 2 , .ProjectionElems ) , mutabilityNot , metadata ( stat +│ function: main +│ span: 274 +│ +│ (40 steps) +├─ 4 +│ #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 +└─ 5 (leaf, terminal) + 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..4ee04c453 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 @@ -3,15 +3,21 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (46 steps) +│ (50 steps) ├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl +│ #decodeConstant ( constantKindAllocated ( allocation ( ... bytes: b" \x00\x00\x0 +│ function: main +│ span: 52 +│ +│ (36 steps) +├─ 4 +│ #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 +└─ 5 (leaf, terminal) + thunk ( #cast ( PtrLocal ( slotPlace ( 2 , projectionElemToZST .ProjectionElems function: main span: 50 diff --git a/kmir/src/tests/integration/data/prove-rs/show/raw-ptr-cast-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/raw-ptr-cast-fail.main.expected index 796c7be18..c95e05e16 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/raw-ptr-cast-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/raw-ptr-cast-fail.main.expected @@ -3,15 +3,21 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (60 steps) +│ (50 steps) ├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl +│ #setLocalValue ( place ( ... local: local ( 2 ) , projection: .ProjectionElems ) +│ function: main +│ span: 93 +│ +│ (34 steps) +├─ 4 +│ #cast ( PtrLocal ( slotPlace ( 2 , projectionElemToZST .ProjectionElems ) , mut │ function: main │ span: 90 │ │ (1 step) -└─ 4 (leaf, terminal) - thunk ( #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: proj +└─ 5 (leaf, terminal) + thunk ( #cast ( PtrLocal ( slotPlace ( 2 , projectionElemToZST .ProjectionElems function: main span: 90 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..e84efa0d3 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 @@ -3,15 +3,21 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (64 steps) +│ (50 steps) ├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl +│ #cast ( operandMove ( place ( ... local: local ( 4 ) , projection: .ProjectionEl +│ function: main +│ span: 50 +│ +│ (28 steps) +├─ 4 +│ #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 +└─ 5 (leaf, terminal) + 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..3e1986372 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,25 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (125 steps) +│ (50 steps) ├─ 3 -│ #cast ( PtrLocal ( 0 , place ( ... local: local ( 1 ) , projection: projectionEl +│ #setLocalValue ( place ( ... local: local ( 4 ) , projection: .ProjectionElems ) +│ function: main +│ span: 143 +│ +│ (50 steps) +├─ 4 +│ #traverseProjection ( toSlot ( 18 ) , BoolVal ( false ) , .ProjectionElems , .Co +│ +│ (49 steps) +├─ 5 +│ #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 +└─ 6 (leaf, terminal) + 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..78f8ba92b 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,8 +3,13 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (52 steps) -├─ 3 (split) +│ (50 steps) +├─ 3 +│ #setArgsFromStack ( 7 , operandCopy ( place ( ... local: local ( 7 ) , projectio +│ span: 51 +│ +│ (32 steps) +├─ 4 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 3 ) ) ┃ ┃ (branch) @@ -12,11 +17,21 @@ ┃ ┃ constraint: ┃ ┃ notBool ARG_BOOL3:Bool ┃ │ -┃ ├─ 4 +┃ ├─ 5 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 3 ) ) ┃ │ -┃ │ (136 steps) -┃ ├─ 6 (split) +┃ │ (50 steps) +┃ ├─ 7 +┃ │ #traverseProjection ( toSlot ( 33 ) , Integer ( 0 , 64 , false ) , .ProjectionEl +┃ │ span: 56 +┃ │ +┃ │ (50 steps) +┃ ├─ 9 +┃ │ #execStmt ( statement ( ... kind: statementKindAssign ( ... place: place ( ... l +┃ │ span: 63 +┃ │ +┃ │ (37 steps) +┃ ├─ 11 (split) ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 9 ) ) ┃ ┃ ┃ ┃ (branch) @@ -24,11 +39,11 @@ ┃ ┃ ┃ constraint: ┃ ┃ ┃ notBool size ( ARG_ARRAY8:List ) >Int 0 ┃ ┃ │ -┃ ┃ ├─ 8 +┃ ┃ ├─ 13 ┃ ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 9 ) ) ┃ ┃ │ ┃ ┃ │ (5 steps) -┃ ┃ ├─ 12 (terminal) +┃ ┃ ├─ 17 (terminal) ┃ ┃ │ #EndProgram ~> .K ┃ ┃ │ ┃ ┃ ┊ constraint: true @@ -40,46 +55,49 @@ ┃ ┃ constraint: ┃ ┃ size ( ARG_ARRAY8:List ) >Int 0 ┃ │ -┃ ├─ 9 +┃ ├─ 14 ┃ │ #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 +┃ │ (50 steps) +┃ ├─ 18 +┃ │ operandCopy ( place ( ... local: local ( 7 ) , projection: projectionElemDeref +┃ │ span: 68 +┃ │ +┃ │ (50 steps) +┃ ├─ 21 +┃ │ BoolVal ( 0 #freezer#expect(_,_,_)_KMIR-CONTR +┃ │ +┃ │ (28 steps) +┃ ├─ 23 (terminal) +┃ │ #EndProgram ~> .K +┃ │ +┃ ┊ constraint: +┃ ┊ 0 .K ┃ ┗━━┓ subst: .Subst ┃ constraint: ┃ ARG_BOOL3:Bool │ - ├─ 5 + ├─ 6 │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 3 ) ) │ - │ (112 steps) - ├─ 7 (split) + │ (50 steps) + ├─ 8 + │ operandMove ( place ( ... local: local ( 4 ) , projection: .ProjectionElems ) ) + │ span: 54 + │ + │ (50 steps) + ├─ 10 + │ #decodeConstant ( constantKindAllocated ( allocation ( ... bytes: b"\x00\x00\x00 + │ span: 61 + │ + │ (13 steps) + ├─ 12 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 9 ) ) ┃ ┃ (branch) @@ -87,11 +105,11 @@ ┃ ┃ constraint: ┃ ┃ notBool size ( ARG_ARRAY8:List ) >Int 0 ┃ │ - ┃ ├─ 10 + ┃ ├─ 15 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 9 ) ) ┃ │ ┃ │ (5 steps) - ┃ ├─ 14 (terminal) + ┃ ├─ 19 (terminal) ┃ │ #EndProgram ~> .K ┃ │ ┃ ┊ constraint: true @@ -103,36 +121,29 @@ ┃ constraint: ┃ size ( ARG_ARRAY8:List ) >Int 0 │ - ├─ 11 + ├─ 16 │ #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 + │ (50 steps) + ├─ 20 + │ operandCopy ( place ( ... local: local ( 7 ) , projection: projectionElemDeref + │ span: 68 + │ + │ (50 steps) + ├─ 22 + │ BoolVal ( 0 #freezer#expect(_,_,_)_KMIR-CONTR + │ + │ (28 steps) + ├─ 24 (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..e282d153e 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,8 +3,82 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: src/rust/library/std/src/rt.rs:194 │ -│ (566 steps) -└─ 3 (stuck, leaf) +│ (50 steps) +├─ 3 +│ #readOperandsAux ( ListItem (Integer ( 0 , 8 , true )) + , .Operands ) +~> #mkAggr +│ function: main +│ span: prove-rs/symbolic-args-fail.rs:42 +│ +│ (50 steps) +├─ 4 +│ Reference ( slotPlace ( 2 , .ProjectionElems ) , mutabilityNot , metadata ( noMe +│ function: main +│ span: prove-rs/symbolic-args-fail.rs:46 +│ +│ (50 steps) +├─ 5 +│ rvalueUse ( operandConstant ( constOperand ( ... span: span ( 101 ) , userTy: no +│ function: main +│ span: prove-rs/symbolic-args-fail.rs:48 +│ +│ (50 steps) +├─ 6 +│ #decodeConstant ( constantKindAllocated ( allocation ( ... bytes: b"\x02" , prov +│ function: main +│ span: prove-rs/symbolic-args-fail.rs:50 +│ +│ (50 steps) +├─ 7 +│ #readOperandsAux ( .List , operandMove ( place ( ... local: local ( 8 ) , projec +│ function: main +│ span: prove-rs/symbolic-args-fail.rs:51 +│ +│ (50 steps) +├─ 8 +│ #reserveSlots ( localDecl ( ... ty: ty ( 34 ) , span: span ( 80 ) , mut: mutabil +│ function: eats_all_args +│ span: prove-rs/symbolic-args-fail.rs:20 +│ +│ (50 steps) +├─ 9 +│ #setArgsFromStack ( 8 , operandCopy ( place ( ... local: local ( 21 ) , projecti +│ function: eats_all_args +│ span: prove-rs/symbolic-args-fail.rs:23 +│ +│ (50 steps) +├─ 10 +│ #execStmt ( statement ( ... kind: statementKindAssign ( ... place: place ( ... l +│ function: eats_all_args +│ span: prove-rs/symbolic-args-fail.rs:25 +│ +│ (50 steps) +├─ 11 +│ #traverseProjection ( toSlot ( 15 ) , Range ( ListItem (Integer ( 1 , 8 , false +│ function: eats_all_args +│ span: prove-rs/symbolic-args-fail.rs:32 +│ +│ (50 steps) +├─ 12 +│ operandConstant ( constOperand ( ... span: span ( 66 ) , userTy: noUserTypeAnnot +│ function: eats_all_args +│ span: prove-rs/symbolic-args-fail.rs:33 +│ +│ (50 steps) +├─ 13 +│ #execStmt ( statement ( ... kind: statementKindAssign ( ... place: place ( ... l +│ function: eats_all_args +│ span: prove-rs/symbolic-args-fail.rs:33 +│ +│ (50 steps) +├─ 14 +│ #cast ( operandMove ( place ( ... local: local ( 20 ) , projection: .ProjectionE +│ function: eats_all_args +│ span: prove-rs/symbolic-args-fail.rs:32 +│ +│ (26 steps) +└─ 15 (stuck, leaf) #setUpCalleeData ( monoItemFn ( ... name: symbol ( "_ZN4core9panicking5panic17h span: no-location:0 @@ -16,22 +90,23 @@ STATISTICS ----------- -Total nodes: 1 +Total nodes: 13 Node roles (exclusive): - failing : 1 ids: 3 + failing : 1 ids: 15 + normal : 12 ids: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 (root nodes omitted from totals: 1, 2) Leaf paths from init: total leaves (non-root): 1 reachable leaves : 1 - total steps : 566 + total steps : 626 - leaf 3: steps 566, path 1 -> 3 + leaf 15: shortest steps 626, path 1 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10 -> 11 -> 12 -> 13 -> 14 -> 15 LEAF CELLS --------------- -Node 3: +Node 15: #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 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..e948c9aa8 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,8 +3,74 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (566 steps) -└─ 3 (stuck, leaf) +│ (50 steps) +├─ 3 +│ #readOperandsAux ( ListItem ( Integer ( 0 , 8 , true ) ) , .Operands ) +~> #mkAgg +│ function: main +│ span: 91 +│ +│ (50 steps) +├─ 4 +│ Reference ( slotPlace ( 2 , .ProjectionElems ) , mutabilityNot , metadata ( noMe +│ function: main +│ span: 97 +│ +│ (50 steps) +├─ 5 +│ rvalueUse ( operandConstant ( constOperand ( ... span: span ( 101 ) , userTy: no +│ function: main +│ span: 101 +│ +│ (50 steps) +├─ 6 +│ #decodeConstant ( constantKindAllocated ( allocation ( ... bytes: b"\x02" , prov +│ function: main +│ span: 109 +│ +│ (50 steps) +├─ 7 +│ #readOperandsAux ( .List , operandMove ( place ( ... local: local ( 8 ) , projec +│ function: main +│ span: 115 +│ +│ (50 steps) +├─ 8 +│ #reserveSlots ( localDecl ( ... ty: ty ( 34 ) , span: span ( 80 ) , mut: mutabil +│ span: 80 +│ +│ (50 steps) +├─ 9 +│ #setArgsFromStack ( 8 , operandCopy ( place ( ... local: local ( 21 ) , projecti +│ span: 51 +│ +│ (50 steps) +├─ 10 +│ #execStmt ( statement ( ... kind: statementKindAssign ( ... place: place ( ... l +│ span: 52 +│ +│ (50 steps) +├─ 11 +│ #traverseProjection ( toSlot ( 15 ) , Range ( ListItem ( Integer ( 1 , 8 , false +│ span: 63 +│ +│ (50 steps) +├─ 12 +│ operandConstant ( constOperand ( ... span: span ( 66 ) , userTy: noUserTypeAnnot +│ span: 66 +│ +│ (50 steps) +├─ 13 +│ #execStmt ( statement ( ... kind: statementKindAssign ( ... place: place ( ... l +│ span: 68 +│ +│ (50 steps) +├─ 14 +│ #cast ( operandMove ( place ( ... local: local ( 20 ) , projection: .ProjectionE +│ span: 69 +│ +│ (26 steps) +└─ 15 (stuck, leaf) #setUpCalleeData ( monoItemFn ( ... name: symbol ( "_ZN4core9panicking5panic17h 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..07455dac9 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,8 +3,13 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (61 steps) -├─ 3 (split) +│ (50 steps) +├─ 3 +│ #setLocalValue ( place ( ... local: local ( 4 ) , projection: .ProjectionElems ) +│ span: 50 +│ +│ (25 steps) +├─ 4 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 2 ) ) ┃ ┃ (branch) @@ -12,11 +17,16 @@ ┃ ┃ constraint: ┃ ┃ notBool ARG_INT2:Int ==Int ARG_INT5:Int ┃ │ -┃ ├─ 4 +┃ ├─ 5 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 2 ) ) ┃ │ -┃ │ (96 steps) -┃ ├─ 6 (split) +┃ │ (50 steps) +┃ ├─ 7 +┃ │ #execStmt ( statement ( ... kind: statementKindAssign ( ... place: place ( ... l +┃ │ span: 63 +┃ │ +┃ │ (46 steps) +┃ ├─ 9 (split) ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 5 ) ) ┃ ┃ ┃ ┃ (branch) @@ -24,11 +34,11 @@ ┃ ┃ ┃ constraint: ┃ ┃ ┃ ARG_UINT3:Int ==Int ARG_UINT6:Int ┃ ┃ │ -┃ ┃ ├─ 8 +┃ ┃ ├─ 11 ┃ ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 5 ) ) ┃ ┃ │ ┃ ┃ │ (6 steps) -┃ ┃ └─ 10 (stuck, leaf) +┃ ┃ └─ 13 (stuck, leaf) ┃ ┃ #setUpCalleeData ( monoItemFn ( ... name: symbol ( "_ZN4core9panicking5panic17h ┃ ┃ span: 32 ┃ ┃ @@ -36,11 +46,11 @@ ┃ ┃ constraint: ┃ ┃ notBool ARG_UINT3:Int ==Int ARG_UINT6:Int ┃ │ -┃ ├─ 9 +┃ ├─ 12 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 5 ) ) ┃ │ ┃ │ (6 steps) -┃ ├─ 11 (terminal) +┃ ├─ 14 (terminal) ┃ │ #EndProgram ~> .K ┃ │ ┃ ┊ constraint: true @@ -52,11 +62,17 @@ ┃ constraint: ┃ ARG_INT2:Int ==Int ARG_INT5:Int │ - ├─ 5 + ├─ 6 │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 2 ) ) │ - │ (66 steps) - ├─ 7 (terminal) + │ (50 steps) + ├─ 8 + │ BoolVal ( true ) +~> #freezer#setLocalValue(_,_)_RT-DATA_KItem_Place_Evaluation1_ + │ span: 61 + │ + │ (16 steps) + ├─ 10 (terminal) │ #EndProgram ~> .K │ ┊ constraint: true 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..6a28505c5 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,8 +3,48 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (297 steps) -├─ 3 (split) +│ (50 steps) +├─ 3 +│ #reserveSlots ( localDecl ( ... ty: ty ( 53 ) , span: span ( 264 ) , mut: mutabi +│ span: 264 +│ +│ (50 steps) +├─ 4 +│ #reserveSlots ( localDecl ( ... ty: ty ( 54 ) , span: span ( 227 ) , mut: mutabi +│ span: 227 +│ +│ (50 steps) +├─ 5 +│ #readOperandsAux ( ListItem ( Integer ( 1 , 32 , true ) ) ListItem ( Integer ( 2 +│ span: 114 +│ +│ (50 steps) +├─ 6 +│ #execStmt ( statement ( ... kind: statementKindAssign ( ... place: place ( ... l +│ span: 123 +│ +│ (50 steps) +├─ 7 +│ #decodeConstant ( constantKindAllocated ( allocation ( ... bytes: b"\x01\x00\x00 +│ span: 32 +│ +│ (50 steps) +├─ 8 +│ PtrLocal ( slotPlace ( 4 , projectionElemConstantIndex ( ... offset: 1 , minLeng +│ span: 130 +│ +│ (50 steps) +├─ 9 +│ #mkRef ( toSlot ( 4 ) , projectionElemConstantIndex ( ... offset: 3 , minLength: +│ span: 132 +│ +│ (50 steps) +├─ 10 +│ #execBlock ( basicBlock ( ... statements: statement ( ... kind: statementKindAss +│ span: 135 +│ +│ (22 steps) +├─ 11 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 8 ) ) ┃ ┃ (branch) @@ -12,11 +52,69 @@ ┃ ┃ constraint: ┃ ┃ 0 ==Int ARG_INT1:Int &Int 18446744073709551615 ┃ │ -┃ ├─ 4 +┃ ├─ 12 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 8 ) ) ┃ │ -┃ │ (588 steps) -┃ ├─ 6 (terminal) +┃ │ (50 steps) +┃ ├─ 14 +┃ │ #reserveSlots ( localDecl ( ... ty: ty ( 50 ) , span: span ( 86 ) , mut: mutabil +┃ │ span: 86 +┃ │ +┃ │ (50 steps) +┃ ├─ 16 +┃ │ #execStmt ( statement ( ... kind: statementKindStorageLive ( local ( 5 ) ) , spa +┃ │ span: 78 +┃ │ +┃ │ (50 steps) +┃ ├─ 19 +┃ │ #continueAt ( someBasicBlockIdx ( basicBlockIdx ( 4 ) ) ) ~> .K +┃ │ +┃ │ (50 steps) +┃ ├─ 22 +┃ │ operandCopy ( place ( ... local: local ( 26 ) , projection: projectionElemField +┃ │ span: 155 +┃ │ +┃ │ (50 steps) +┃ ├─ 26 +┃ │ #applyBinOp ( binOpEq , Integer ( 1 , 64 , true ) , Integer ( 1 , 64 , true ) , +┃ │ span: 150 +┃ │ +┃ │ (50 steps) +┃ ├─ 30 +┃ │ Integer ( 0 , 64 , false ) +~> #freezer#applyBinOp(_,_,_,_)_RT-DATA_Evaluation_Bi +┃ │ span: 75 +┃ │ +┃ │ (50 steps) +┃ ├─ 34 +┃ │ #execStmt ( statement ( ... kind: statementKindStorageDead ( local ( 5 ) ) , spa +┃ │ span: 81 +┃ │ +┃ │ (50 steps) +┃ ├─ 38 +┃ │ #readOperands ( operandMove ( place ( ... local: local ( 39 ) , projection: .Pro +┃ │ span: 168 +┃ │ +┃ │ (50 steps) +┃ ├─ 41 +┃ │ #traverseProjection ( toSlot ( 45 ) , AllocRef ( allocId ( 4 ) , .ProjectionElem +┃ │ span: 164 +┃ │ +┃ │ (50 steps) +┃ ├─ 44 +┃ │ #continueAt ( someBasicBlockIdx ( basicBlockIdx ( 16 ) ) ) ~> .K +┃ │ +┃ │ (50 steps) +┃ ├─ 46 +┃ │ #execStmt ( statement ( ... kind: statementKindAssign ( ... place: place ( ... l +┃ │ span: 183 +┃ │ +┃ │ (50 steps) +┃ ├─ 47 +┃ │ operandMove ( place ( ... local: local ( 56 ) , projection: .ProjectionElems ) ) +┃ │ +┃ │ (11 steps) +┃ ├─ 48 (terminal) ┃ │ #EndProgram ~> .K ┃ │ ┃ ┊ constraint: true @@ -28,11 +126,11 @@ ┃ constraint: ┃ notBool 0 ==Int ARG_INT1:Int &Int 18446744073709551615 │ - ├─ 5 + ├─ 13 │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 8 ) ) │ │ (1 step) - ├─ 7 (split) + ├─ 15 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 1 , basicBlockIdx ( 7 ) ) ┃ ┃ (branch) @@ -40,22 +138,30 @@ ┃ ┃ constraint: ┃ ┃ 1 ==Int ARG_INT1:Int &Int 18446744073709551615 ┃ │ - ┃ ├─ 8 + ┃ ├─ 17 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 1 , basicBlockIdx ( 7 ) ) ┃ │ - ┃ │ (101 steps) - ┃ └─ 10 (stuck, leaf) - ┃ #ProgramError ( #UBErrorPtrOffsetDiff ( PtrLocal ( 1 , place ( ... local: local + ┃ │ (50 steps) + ┃ ├─ 20 + ┃ │ #traverseProjection ( toSlot ( 130 ) , BoolVal ( true ) , .ProjectionElems , .Co + ┃ │ + ┃ │ (50 steps) + ┃ ├─ 23 + ┃ │ PtrLocal ( slotPlace ( 4 , projectionElemConstantIndex ( ... offset: 3 , minLeng + ┃ │ + ┃ │ (9 steps) + ┃ └─ 27 (stuck, leaf) + ┃ #ProgramError ( #UBErrorPtrOffsetDiff ( PtrLocal ( slotPlace ( 4 , projectionEle ┃ ┗━━┓ subst: .Subst ┃ constraint: ┃ notBool 1 ==Int ARG_INT1:Int &Int 18446744073709551615 │ - ├─ 9 + ├─ 18 │ #selectBlock ( switchTargets ( ... branches: branch ( 1 , basicBlockIdx ( 7 ) ) │ │ (1 step) - ├─ 11 (split) + ├─ 21 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 2 , basicBlockIdx ( 6 ) ) ┃ ┃ (branch) @@ -63,22 +169,30 @@ ┃ ┃ constraint: ┃ ┃ 2 ==Int ARG_INT1:Int &Int 18446744073709551615 ┃ │ - ┃ ├─ 12 + ┃ ├─ 24 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 2 , basicBlockIdx ( 6 ) ) ┃ │ - ┃ │ (101 steps) - ┃ └─ 14 (stuck, leaf) - ┃ #ProgramError ( #UBErrorPtrOffsetDiff ( PtrLocal ( 1 , place ( ... local: local + ┃ │ (50 steps) + ┃ ├─ 28 + ┃ │ #traverseProjection ( toSlot ( 130 ) , BoolVal ( true ) , .ProjectionElems , .Co + ┃ │ + ┃ │ (50 steps) + ┃ ├─ 31 + ┃ │ PtrLocal ( slotPlace ( 4 , projectionElemConstantIndex ( ... offset: 1 , minLeng + ┃ │ + ┃ │ (9 steps) + ┃ └─ 35 (stuck, leaf) + ┃ #ProgramError ( #UBErrorPtrOffsetDiff ( PtrLocal ( slotPlace ( 4 , projectionEle ┃ ┗━━┓ subst: .Subst ┃ constraint: ┃ notBool 2 ==Int ARG_INT1:Int &Int 18446744073709551615 │ - ├─ 13 + ├─ 25 │ #selectBlock ( switchTargets ( ... branches: branch ( 2 , basicBlockIdx ( 6 ) ) │ │ (1 step) - ├─ 15 (split) + ├─ 29 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 3 , basicBlockIdx ( 5 ) ) ┃ ┃ (branch) @@ -86,22 +200,22 @@ ┃ ┃ constraint: ┃ ┃ 3 ==Int ARG_INT1:Int &Int 18446744073709551615 ┃ │ - ┃ ├─ 16 + ┃ ├─ 32 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 3 , basicBlockIdx ( 5 ) ) ┃ │ ┃ │ (17 steps) - ┃ └─ 18 (stuck, leaf) - ┃ #ProgramError ( #UBErrorPtrOffsetDiff ( PtrLocal ( 0 , place ( ... local: local + ┃ └─ 36 (stuck, leaf) + ┃ #ProgramError ( #UBErrorPtrOffsetDiff ( PtrLocal ( slotPlace ( 4 , projectionEle ┃ ┗━━┓ subst: .Subst ┃ constraint: ┃ notBool 3 ==Int ARG_INT1:Int &Int 18446744073709551615 │ - ├─ 17 + ├─ 33 │ #selectBlock ( switchTargets ( ... branches: branch ( 3 , basicBlockIdx ( 5 ) ) │ │ (1 step) - ├─ 19 (split) + ├─ 37 (split) │ #selectBlock ( switchTargets ( ... branches: branch ( 4 , basicBlockIdx ( 4 ) ) ┃ ┃ (branch) @@ -109,16 +223,16 @@ ┃ ┃ constraint: ┃ ┃ 4 ==Int ARG_INT1:Int &Int 18446744073709551615 ┃ │ - ┃ ├─ 20 + ┃ ├─ 39 ┃ │ #selectBlock ( switchTargets ( ... branches: branch ( 4 , basicBlockIdx ( 4 ) ) ┃ │ ┃ │ (18 steps) - ┃ ├─ 22 + ┃ ├─ 42 ┃ │ #mkPtr ( toAlloc ( allocId ( 2 ) ) , .ProjectionElems , mutabilityNot , metadata ┃ │ span: 136 ┃ │ ┃ │ (1 step) - ┃ └─ 24 (leaf, terminal) + ┃ └─ 45 (leaf, terminal) ┃ thunk ( #mkPtr ( toAlloc ( allocId ( 2 ) ) , .ProjectionElems , mutabilityNot , ┃ span: 136 ┃ @@ -126,11 +240,11 @@ ┃ constraint: ┃ notBool 4 ==Int ARG_INT1:Int &Int 18446744073709551615 │ - ├─ 21 + ├─ 40 │ #selectBlock ( switchTargets ( ... branches: branch ( 4 , basicBlockIdx ( 4 ) ) │ │ (6 steps) - ├─ 23 (terminal) + ├─ 43 (terminal) │ #EndProgram ~> .K │ ┊ constraint: true diff --git a/kmir/src/tests/integration/data/prove-rs/show/transmute-maybe-uninit-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/transmute-maybe-uninit-fail.main.expected index 12948003f..d93ae986d 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/transmute-maybe-uninit-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/transmute-maybe-uninit-fail.main.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (16 steps) +│ (21 steps) └─ 3 (stuck, leaf) #ProgramError ( #UBInvalidTransmuteMaybeUninit ) ~> #freezer#setLocalValue(_,_)_ diff --git a/kmir/src/tests/integration/data/prove-rs/show/transmute-u8-to-enum-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/transmute-u8-to-enum-fail.main.expected index 4d7658d18..eb62277e7 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/transmute-u8-to-enum-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/transmute-u8-to-enum-fail.main.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (15 steps) +│ (19 steps) └─ 3 (stuck, leaf) #ProgramError ( #UBErrorInvalidDiscriminantsInEnumCast ) ~> .K function: main 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..f364fe212 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 @@ -3,9 +3,16 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (76 steps) -└─ 3 (stuck, leaf) - #traverseProjection ( toLocal ( 1 ) , Union ( fieldIdx ( 0 ) , Integer ( -1 , 8 +│ (50 steps) +├─ 3 +│ Integer ( -1 , 8 , true ) +~> #freezer#setLocalValue(_,_)_RT-DATA_KItem_Place_Eva +│ function: main +│ span: 50 +│ +│ (38 steps) +└─ 4 (stuck, leaf) + #traverseProjection ( toSlot ( 2 ) , Union ( fieldIdx ( 0 ) , Integer ( -1 , 8 , function: main span: 59 diff --git a/kmir/src/tests/integration/data/prove-rs/show/volatile_load_static-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/volatile_load_static-fail.main.expected index e68710b66..ce5c9c69b 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/volatile_load_static-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/volatile_load_static-fail.main.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (10 steps) +│ (16 steps) ├─ 3 │ #decodeConstant ( constantKindAllocated ( allocation ( ... bytes: b"\x00\x00\x00 │ function: main diff --git a/kmir/src/tests/integration/data/prove-rs/show/volatile_store_static-fail.main.expected b/kmir/src/tests/integration/data/prove-rs/show/volatile_store_static-fail.main.expected index 420e0659d..49302c2da 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/volatile_store_static-fail.main.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/volatile_store_static-fail.main.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (10 steps) +│ (25 steps) ├─ 3 │ #decodeConstant ( constantKindAllocated ( allocation ( ... bytes: b"\x00\x00\x00 │ function: main 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..8c6aae6e9 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 ) ) ) ) ) @@ -48,77 +48,157 @@ 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..e8b81ba5f 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 ) ) ) ) ) @@ -48,75 +48,154 @@ 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..9ad64aada 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 ) ) ) ) ) @@ -48,121 +48,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 ( 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..12f3dfdfd 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 ) ) ) ) ) @@ -48,121 +48,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 ( 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..a9bce5578 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 ) ) ) ) ) @@ -48,121 +48,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 ( 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..2a04a4896 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 ) ) ) ) ) @@ -48,125 +48,112 @@ 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..8ac006d76 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 ) ) ) ) ) @@ -48,125 +48,112 @@ 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..06ee4c046 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 @@ -60,89 +60,154 @@ 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..23b83add9 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 ) ) ) ) ) @@ -48,121 +48,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 ( 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..ab05af479 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 ) ) ) ) ) @@ -48,124 +48,112 @@ 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..fa4432a84 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 @@ -24,28 +24,38 @@ 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..0c2701caf 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 @@ -24,27 +24,37 @@ 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..5dd86520c 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 @@ -24,31 +24,41 @@ 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..2d56d3e8e 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 @@ -24,33 +24,43 @@ 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..21757aa58 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 @@ -24,46 +24,56 @@ 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..306563561 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 @@ -24,46 +24,56 @@ 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..e2df533ee 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 @@ -24,53 +24,63 @@ 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..0f13d0d3c 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 @@ -24,26 +24,36 @@ 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..072d473c6 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 @@ -24,53 +24,63 @@ 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..0f1f65124 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 @@ -24,32 +24,42 @@ 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..dfce003b4 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 @@ -40,44 +40,84 @@ 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..20907ad73 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 @@ -40,45 +40,85 @@ 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..c07f89e7c 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 @@ -40,44 +40,84 @@ 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..9141aad3b 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 @@ -40,45 +40,85 @@ 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..1596be0cb 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 @@ -40,45 +40,85 @@ 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..aaaab1548 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 @@ -40,45 +40,85 @@ 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..b1228d7db 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 @@ -40,44 +40,84 @@ 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..765c9d98a 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 @@ -40,45 +40,85 @@ 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..a0ddefa51 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 @@ -40,45 +40,85 @@ 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..e55fd3925 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 @@ -40,45 +40,85 @@ 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..be28be944 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 @@ -24,14 +24,23 @@ 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..a572b2c2b 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 @@ -24,14 +24,23 @@ 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..a85da07ba 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 @@ -24,14 +24,23 @@ 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..84cc7ae5a 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 @@ -24,14 +24,23 @@ 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..c69399780 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 @@ -24,14 +24,23 @@ 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..ad717302c 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 @@ -24,14 +24,23 @@ 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..482ab150d 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 @@ -24,14 +24,23 @@ 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..c4e8996f2 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 @@ -24,14 +24,23 @@ 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..e800b1352 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 @@ -24,14 +24,23 @@ 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..f2cafdb91 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 @@ -24,14 +24,23 @@ 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..b82659746 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) +│ (70 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) +┃ │ (76 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..a005ff99f 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) +│ (70 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) +┃ │ (76 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..21bc79c5a 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) +│ (70 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) +┃ │ (76 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..ed42ceaeb 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) +│ (70 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) +┃ │ (76 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..dd50d8c86 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) +│ (70 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) +┃ │ (76 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..8a0f0ce96 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) +│ (70 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) +┃ │ (76 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..64bf31d69 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) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpAddUnchecked , Integer ( ARG_UINT1:Int , 16 , false ) , Integ │ span: 208 @@ -16,7 +16,7 @@ ~> #freezer ┃ │ span: 208 ┃ │ -┃ │ (70 steps) +┃ │ (76 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..06258479e 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) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpAddUnchecked , Integer ( ARG_UINT1:Int , 32 , false ) , Integ │ span: 239 @@ -16,7 +16,7 @@ ~> #fr ┃ │ span: 239 ┃ │ -┃ │ (70 steps) +┃ │ (76 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..5abf0e7c6 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) +│ (70 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) +┃ │ (76 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..c2f03501c 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) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpAddUnchecked , Integer ( ARG_UINT1:Int , 8 , false ) , Intege │ span: 84 @@ -16,7 +16,7 @@ ~> #freezer#se ┃ │ span: 84 ┃ │ -┃ │ (70 steps) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i128.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i128.expected index 257c4d3c5..8bddc798e 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i128.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i128.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpMulUnchecked , 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) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i16.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i16.expected index ac5d7b039..a6bd36554 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i16.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i16.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpMulUnchecked , 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) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i32.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i32.expected index fd2162753..1f3090c24 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i32.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i32.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpMulUnchecked , 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) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i64.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i64.expected index f8395cba5..f1a288ab6 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i64.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i64.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpMulUnchecked , 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) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i8.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i8.expected index 516befead..ceca3282f 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i8.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_i8.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpMulUnchecked , 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) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u128.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u128.expected index 7bc83384a..67fde2ddd 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u128.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u128.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpMulUnchecked , 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) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u16.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u16.expected index 9c8b8fa13..0cf02ab91 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u16.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u16.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpMulUnchecked , Integer ( ARG_UINT1:Int , 16 , false ) , Integ │ span: 208 @@ -16,7 +16,7 @@ ~> #freezer ┃ │ span: 208 ┃ │ -┃ │ (70 steps) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u32.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u32.expected index f7153e5f8..4ec69f654 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u32.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u32.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpMulUnchecked , Integer ( ARG_UINT1:Int , 32 , false ) , Integ │ span: 239 @@ -16,7 +16,7 @@ ~> #fr ┃ │ span: 239 ┃ │ -┃ │ (70 steps) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u64.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u64.expected index 8542f300a..b28282baa 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u64.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u64.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpMulUnchecked , 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) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u8.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u8.expected index 6519b70b7..8d2bfe5a7 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u8.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_mul-fail.unchecked_mul_u8.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpMulUnchecked , Integer ( ARG_UINT1:Int , 8 , false ) , Intege │ span: 84 @@ -16,7 +16,7 @@ ~> #freezer#se ┃ │ span: 84 ┃ │ -┃ │ (70 steps) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i128.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i128.expected index fd29da216..5ad731167 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i128.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i128.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (50 steps) +│ (62 steps) ├─ 3 │ #applyBinOp ( binOpSubUnchecked , Integer ( 0 , 128 , true ) , Integer ( ARG_INT │ span: 178 @@ -16,7 +16,7 @@ ~> #fre ┃ │ span: 178 ┃ │ -┃ │ (67 steps) +┃ │ (72 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i16.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i16.expected index 72f28e18e..4220fe39d 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i16.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i16.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (50 steps) +│ (62 steps) ├─ 3 │ #applyBinOp ( binOpSubUnchecked , Integer ( 0 , 16 , true ) , Integer ( ARG_INT1 │ span: 91 @@ -16,7 +16,7 @@ ~> #freez ┃ │ span: 91 ┃ │ -┃ │ (67 steps) +┃ │ (72 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i32.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i32.expected index 1964ce895..f8388f8bb 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i32.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i32.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (50 steps) +│ (62 steps) ├─ 3 │ #applyBinOp ( binOpSubUnchecked , Integer ( 0 , 32 , true ) , Integer ( ARG_INT1 │ span: 120 @@ -16,7 +16,7 @@ ~> #freez ┃ │ span: 120 ┃ │ -┃ │ (67 steps) +┃ │ (72 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i64.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i64.expected index bd1cbbe06..754478c67 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i64.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i64.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (50 steps) +│ (62 steps) ├─ 3 │ #applyBinOp ( binOpSubUnchecked , Integer ( 0 , 64 , true ) , Integer ( ARG_INT1 │ span: 149 @@ -16,7 +16,7 @@ ~> #freez ┃ │ span: 149 ┃ │ -┃ │ (67 steps) +┃ │ (72 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i8.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i8.expected index c15a88519..cf6b19d61 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i8.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_neg-fail.unchecked_neg_i8.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (50 steps) +│ (62 steps) ├─ 3 │ #applyBinOp ( binOpSubUnchecked , Integer ( 0 , 8 , true ) , Integer ( ARG_INT1: │ span: 58 @@ -16,7 +16,7 @@ ~> #freezer ┃ │ span: 58 ┃ │ -┃ │ (67 steps) +┃ │ (72 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..fdd91f66a 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) +│ (70 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..97bb4f4bb 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) +│ (70 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..5301166a3 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) +│ (70 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..a14b92084 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) +│ (70 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..283332989 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) +│ (70 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..5fb8f981c 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) +│ (70 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..3b2f15ab6 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) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpShlUnchecked , Integer ( ARG_UINT1:Int , 16 , false ) , Integ │ span: 193 @@ -16,7 +16,7 @@ ~> #free ┃ │ span: 193 ┃ │ -┃ │ (110 steps) +┃ │ (119 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..df8ac133a 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) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpShlUnchecked , Integer ( ARG_UINT1:Int , 32 , false ) , Integ │ span: 220 @@ -16,7 +16,7 @@ ~> ┃ │ span: 220 ┃ │ -┃ │ (110 steps) +┃ │ (119 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..79082175e 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) +│ (70 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..69999a836 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) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpShlUnchecked , Integer ( ARG_UINT1:Int , 8 , false ) , Intege │ span: 85 @@ -16,7 +16,7 @@ ~> #freezer ┃ │ span: 85 ┃ │ -┃ │ (110 steps) +┃ │ (119 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i128.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i128.expected index a84d5aa5b..1bd37bff6 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i128.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i128.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpShrUnchecked , Integer ( ARG_INT1:Int , 128 , true ) , Intege │ span: 274 @@ -15,7 +15,7 @@ ┃ │ Integer ( truncate ( ARG_INT1:Int >>Int ARG_UINT2:Int modInt 3402823669209384634 ┃ │ span: 274 ┃ │ -┃ │ (110 steps) +┃ │ (119 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i16.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i16.expected index 527202efb..fecb1b530 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i16.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i16.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpShrUnchecked , Integer ( ARG_INT1:Int , 16 , true ) , Integer │ span: 112 @@ -15,7 +15,7 @@ ┃ │ Integer ( truncate ( ARG_INT1:Int >>Int ARG_UINT2:Int modInt 65536 , 16 , Signed ┃ │ span: 112 ┃ │ -┃ │ (110 steps) +┃ │ (119 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i32.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i32.expected index 0128d3fa8..c6685b97e 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i32.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i32.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpShrUnchecked , Integer ( ARG_INT1:Int , 32 , true ) , Integer │ span: 139 @@ -15,7 +15,7 @@ ┃ │ Integer ( truncate ( ARG_INT1:Int >>Int ARG_UINT2:Int modInt 4294967296 , 32 , S ┃ │ span: 139 ┃ │ -┃ │ (110 steps) +┃ │ (119 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i64.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i64.expected index 9e7dad859..cd65e9fbb 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i64.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i64.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpShrUnchecked , Integer ( ARG_INT1:Int , 64 , true ) , Integer │ span: 166 @@ -15,7 +15,7 @@ ┃ │ Integer ( truncate ( ARG_INT1:Int >>Int ARG_UINT2:Int modInt 1844674407370955161 ┃ │ span: 166 ┃ │ -┃ │ (110 steps) +┃ │ (119 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i8.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i8.expected index a71512a69..03796a2c5 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i8.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_i8.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpShrUnchecked , Integer ( ARG_INT1:Int , 8 , true ) , Integer │ span: 58 @@ -15,7 +15,7 @@ ┃ │ Integer ( truncate ( ARG_INT1:Int >>Int ARG_UINT2:Int modInt 256 , 8 , Signed ) ┃ │ span: 58 ┃ │ -┃ │ (110 steps) +┃ │ (119 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u128.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u128.expected index 06c1a5167..d47a5b11c 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u128.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u128.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpShrUnchecked , Integer ( ARG_UINT1:Int , 128 , false ) , Inte │ span: 301 @@ -15,7 +15,7 @@ ┃ │ Integer ( ARG_UINT1:Int >>Int ARG_UINT2:Int modInt 34028236692093846346337460743 ┃ │ span: 301 ┃ │ -┃ │ (110 steps) +┃ │ (119 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u16.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u16.expected index 01762529e..e7eed4a1b 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u16.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u16.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpShrUnchecked , Integer ( ARG_UINT1:Int , 16 , false ) , Integ │ span: 193 @@ -16,7 +16,7 @@ ~> #free ┃ │ span: 193 ┃ │ -┃ │ (110 steps) +┃ │ (119 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u32.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u32.expected index 00cceb40c..80e17468c 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u32.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u32.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpShrUnchecked , Integer ( ARG_UINT1:Int , 32 , false ) , Integ │ span: 220 @@ -16,7 +16,7 @@ ~> ┃ │ span: 220 ┃ │ -┃ │ (110 steps) +┃ │ (119 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u64.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u64.expected index f700cf0d8..bb54c86bd 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u64.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u64.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpShrUnchecked , Integer ( ARG_UINT1:Int , 64 , false ) , Integ │ span: 247 @@ -15,7 +15,7 @@ ┃ │ Integer ( ARG_UINT1:Int >>Int ARG_UINT2:Int modInt 18446744073709551616 , 64 , f ┃ │ span: 247 ┃ │ -┃ │ (110 steps) +┃ │ (119 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u8.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u8.expected index 9c712f1a3..f9e53fd10 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u8.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_shr-fail.unchecked_shr_u8.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpShrUnchecked , Integer ( ARG_UINT1:Int , 8 , false ) , Intege │ span: 85 @@ -16,7 +16,7 @@ ~> #freezer ┃ │ span: 85 ┃ │ -┃ │ (110 steps) +┃ │ (119 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i128.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i128.expected index ea78ced21..3b9b06278 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i128.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i128.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpSubUnchecked , 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) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i16.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i16.expected index 743fd093c..31c33e3e2 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i16.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i16.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpSubUnchecked , 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) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i32.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i32.expected index c1a06dce6..2add22243 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i32.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i32.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpSubUnchecked , 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) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i64.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i64.expected index b42cde312..5fa44411a 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i64.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i64.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpSubUnchecked , 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) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i8.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i8.expected index 0a56f6b97..edda0fb1c 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i8.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_i8.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpSubUnchecked , 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) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u128.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u128.expected index 8588fcce4..a35aba366 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u128.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u128.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpSubUnchecked , 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) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u16.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u16.expected index d8ace363c..4b9faad3a 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u16.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u16.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpSubUnchecked , Integer ( ARG_UINT1:Int , 16 , false ) , Integ │ span: 208 @@ -16,7 +16,7 @@ ~> #freezer ┃ │ span: 208 ┃ │ -┃ │ (70 steps) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u32.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u32.expected index f800b206f..ec7ec01b3 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u32.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u32.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpSubUnchecked , Integer ( ARG_UINT1:Int , 32 , false ) , Integ │ span: 239 @@ -16,7 +16,7 @@ ~> #fr ┃ │ span: 239 ┃ │ -┃ │ (70 steps) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u64.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u64.expected index c0b199507..496c90fb5 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u64.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u64.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpSubUnchecked , 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) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u8.expected b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u8.expected index 6888f0278..72c95fcf3 100644 --- a/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u8.expected +++ b/kmir/src/tests/integration/data/verify-rust-std/0011-floats-ints/show/unchecked_sub-fail.unchecked_sub_u8.expected @@ -3,7 +3,7 @@ │ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC │ span: 0 │ -│ (56 steps) +│ (70 steps) ├─ 3 │ #applyBinOp ( binOpSubUnchecked , Integer ( ARG_UINT1:Int , 8 , false ) , Intege │ span: 84 @@ -16,7 +16,7 @@ ~> #freezer#se ┃ │ span: 84 ┃ │ -┃ │ (70 steps) +┃ │ (76 steps) ┃ ├─ 6 (terminal) ┃ │ #EndProgram ~> .K ┃ │ diff --git a/kmir/src/tests/integration/test_cli.py b/kmir/src/tests/integration/test_cli.py index 9396e5fc5..e0eb18e15 100644 --- a/kmir/src/tests/integration/test_cli.py +++ b/kmir/src/tests/integration/test_cli.py @@ -22,6 +22,7 @@ # they don't differ between local checkouts and CI (e.g. symbolic-args-fail.main.cli-stats-leaves). _REPO_ROOT = str(Path(__file__).resolve().parents[4]) _PATH_REPLACEMENTS: dict[str, str] = {_REPO_ROOT + '/': '/'} +_SNAPSHOT_PROVE_MAX_DEPTH = 50 def _prove_and_store( @@ -32,7 +33,8 @@ def _prove_and_store( is_smir: bool = False, max_depth: int | None = None, ) -> APRProof: - opts = ProveOpts(rs_or_json, proof_dir=tmp_path, smir=is_smir, start_symbol=start_symbol, max_depth=max_depth) + proof_max_depth = _SNAPSHOT_PROVE_MAX_DEPTH if max_depth is None else max_depth + opts = ProveOpts(rs_or_json, proof_dir=tmp_path, smir=is_smir, start_symbol=start_symbol, max_depth=proof_max_depth) apr_proof = kmir.prove_program(opts) apr_proof.write_proof_data() return apr_proof diff --git a/kmir/src/tests/integration/test_decode_value.py b/kmir/src/tests/integration/test_decode_value.py index afbcb2560..c4be684ee 100644 --- a/kmir/src/tests/integration/test_decode_value.py +++ b/kmir/src/tests/integration/test_decode_value.py @@ -1,6 +1,5 @@ from __future__ import annotations -from string import Template from typing import TYPE_CHECKING, NamedTuple import pytest @@ -64,33 +63,6 @@ def _patch_definition(definition: KDefinition) -> None: object.__setattr__(definition, '__class__', new_cls) -def dedent(s: str) -> str: - from textwrap import dedent - - return dedent(s).strip() - - -KORE_TEMPLATE: Final = Template(dedent(r""" - Lbl'-LT-'generatedTop'-GT-'{}( - Lbl'-LT-'kmir'-GT-'{}( - Lbl'-LT-'k'-GT-'{}(kseq{}(inj{SortEvaluation{}, SortKItem{}}($evaluation), dotk{}())), - Lbl'-LT-'retVal'-GT-'{}(LblnoReturn'Unds'KMIR-CONFIGURATION'Unds'RetVal{}()), - Lbl'-LT-'currentFunc'-GT-'{}(Lblty{}(\dv{SortInt{}}("-1"))), - Lbl'-LT-'currentFrame'-GT-'{}( - Lbl'-LT-'currentBody'-GT-'{}(Lbl'Stop'List{}()), - Lbl'-LT-'caller'-GT-'{}(Lblty{}(\dv{SortInt{}}("-1"))), - Lbl'-LT-'dest'-GT-'{}(Lblplace{}(Lbllocal{}(\dv{SortInt{}}("-1")),LblProjectionElems'ColnColn'empty{}())), - Lbl'-LT-'target'-GT-'{}(LblnoBasicBlockIdx'Unds'BODY'Unds'MaybeBasicBlockIdx{}()), - Lbl'-LT-'unwind'-GT-'{}(LblUnwindAction'ColnColn'Unreachable{}()), - Lbl'-LT-'locals'-GT-'{}(Lbl'Stop'List{}()) - ), - Lbl'-LT-'stack'-GT-'{}(Lbl'Stop'List{}()), - ), - Lbl'-LT-'generatedCounter'-GT-'{}(\dv{SortInt{}}("0")) - ) -""")) - - class _TestData(NamedTuple): test_id: str bytez: bytes @@ -99,29 +71,34 @@ class _TestData(NamedTuple): expected: str def to_pattern(self, definition: KDefinition) -> Pattern: - from pyk.kore.prelude import bytes_dv - from pyk.kore.syntax import App - - return App( - 'LbldecodeValue', - (), - ( - bytes_dv(self.bytez), - self._json_type_info_to_kore(self.type_info, definition), - ), - ) - - @staticmethod - def _json_type_info_to_kore(type_info: dict[str, Any], definition: KDefinition) -> Pattern: + from pyk.kast.inner import KApply, KSort, Subst + from pyk.kast.manip import split_config_from + from pyk.kast.prelude.bytes import bytesToken + from pyk.kast.prelude.collections import list_empty, map_empty + from pyk.kast.prelude.utils import token from pyk.konvert import kast_to_kore from kmir.parse.parser import Parser parser = Parser(definition) - parse_res = parser.parse_mir_json(type_info, 'TypeInfo') + parse_res = parser.parse_mir_json(self.type_info, 'TypeInfo') assert parse_res - term, sort = parse_res - return kast_to_kore(definition, term, sort) + type_info_term, _ = parse_res + evaluation = KApply('decodeValue', bytesToken(self.bytez), type_info_term) + + init_config = definition.init_config(KSort('GeneratedTopCell')) + _, init_subst = split_config_from(init_config) + config = Subst( + { + **init_subst, + 'K_CELL': evaluation, + 'OWNEDSLOTS_CELL': list_empty(), + 'SLOTSTORE_CELL': map_empty(), + 'GENERATEDCOUNTER_CELL': token(0), + } + )(definition.empty_config(KSort('GeneratedTopCell'))) + + return kast_to_kore(definition, config, KSort('GeneratedTopCell')) def load_test_data() -> tuple[_TestData, ...]: @@ -195,7 +172,6 @@ def test_decode_value( tmp_path: Path, ) -> None: from pyk.kore import match as km - from pyk.kore.parser import KoreParser from pyk.kore.tools import kore_print from pyk.ktool.krun import llvm_interpret from pyk.utils import chain @@ -204,11 +180,7 @@ def test_decode_value( pytest.skip() # Given - evaluation = test_data.to_pattern(definition) - kore_text = KORE_TEMPLATE.substitute(evaluation=evaluation.text) - parser = KoreParser(kore_text) - init_pattern = parser.pattern() - assert parser.eof + init_pattern = test_data.to_pattern(definition) # When final_pattern = llvm_interpret(definition_dir=definition_dir, pattern=init_pattern) diff --git a/kmir/src/tests/integration/test_integration.py b/kmir/src/tests/integration/test_integration.py index d6e891398..1c84549fa 100644 --- a/kmir/src/tests/integration/test_integration.py +++ b/kmir/src/tests/integration/test_integration.py @@ -73,6 +73,11 @@ 'ptr-cast-array-to-singleton-wrapped-array-fail', ] +PROVE_EXPECTED_FAILURES = { + ('symbolic-args-fail', 'eats_all_args'): False, +} +SNAPSHOT_PROVE_MAX_DEPTH = 50 + @pytest.mark.parametrize( 'rs_file', @@ -87,7 +92,7 @@ def test_prove(rs_file: Path, kmir: KMIR, update_expected_output: bool) -> None: if update_expected_output and not should_show: pytest.skip() - prove_opts = ProveOpts(rs_file, smir=is_smir, terminate_on_thunk=True) + prove_opts = ProveOpts(rs_file, smir=is_smir, terminate_on_thunk=True, max_depth=SNAPSHOT_PROVE_MAX_DEPTH) printer = PrettyPrinter(kmir.definition) cterm_show = CTermShow(printer.print) @@ -98,6 +103,7 @@ def test_prove(rs_file: Path, kmir: KMIR, update_expected_output: bool) -> None: for start_symbol in start_symbols: prove_opts.start_symbol = start_symbol apr_proof = kmir.prove_program(prove_opts) + should_fail = PROVE_EXPECTED_FAILURES.get((rs_file.stem, start_symbol), rs_file.stem.endswith('fail')) if should_show: display_opts = ShowOpts( @@ -903,3 +909,88 @@ def test_reduce_standalone() -> None: assert len(reloaded.items) == 2 finally: reduced_path.unlink() + + +# --------------------------------------------------------------------------- +# CSE tests +# --------------------------------------------------------------------------- + + +def test_cse_callee_proof(tmp_path: Path) -> None: + """Callee proof should complete with covers for a simple function.""" + from kmir._cse import prove_callee + from kmir._prove import _prove_sequential, apr_proof_from_smir + from kmir.cargo import cargo_get_smir_json + + rs_file = PROVE_DIR / 'cse-simple-callee.rs' + + # Generate SMIR and build KMIR (including 'double' in the call graph) + smir_data = cargo_get_smir_json(rs_file) + smir_info = SMIRInfo(smir_data) + smir_info = smir_info.reduce_to('main') # 'double' is reachable from 'main' + kmir_instance = KMIR.from_kompiled_kore(smir_info, target_dir=tmp_path, symbolic=True) + + # Step 1: Verify baseline passes + baseline = apr_proof_from_smir(kmir_instance, 'baseline', smir_info, start_symbol='main', proof_dir=tmp_path) + _prove_sequential( + kmir_instance, + baseline, + opts=ProveOpts(rs_file, proof_dir=tmp_path), + label='baseline', + cut_point_rules=[], + ) + assert baseline.passed, 'Baseline proof should pass' + + # Step 2: Prove the callee function 'double' standalone + callee_proof = prove_callee(kmir_instance, smir_info, 'double', proof_dir=tmp_path) + covers = [c for c in callee_proof.kcfg.covers() if c.target.id == callee_proof.target] + stuck = [n for n in callee_proof.kcfg.leaves if callee_proof.kcfg.is_stuck(n.id)] + assert len(covers) > 0, f'Callee proof should have covers, got {len(covers)}' + # Stuck nodes from overflow/error paths are acceptable — only cover paths + # become summary rules. The caller's constraints will exclude error paths. + + # Step 3: Extract cover paths and verify return value extraction + from kmir._cse import build_summary_module, extract_cover_paths, generate_summary_rules + + cover_paths = extract_cover_paths(callee_proof) + assert len(cover_paths) > 0, 'Should extract at least one cover path' + assert cover_paths[0].return_value is not None, 'Cover path should have a return value' + + # Step 4: Generate summary rules + init_cterm = callee_proof.kcfg.node(callee_proof.init).cterm + rules = generate_summary_rules('double', cover_paths, init_cterm) + assert len(rules) > 0, 'Should generate at least one summary rule' + + # Step 5: Build summary module + module = build_summary_module('double', rules) + assert module is not None + assert len(module.sentences) > 0 + + # Step 6: Prove caller with summary via add-module + from pyk.cterm import cterm_symbolic + from pyk.kcfg.explore import KCFGExplore + from pyk.proof.reachability import APRProver + + from kmir._prove import apr_proof_from_smir + from kmir.kmir import KMIRSemantics + + reuse_proof = apr_proof_from_smir(kmir_instance, 'cse-reuse', smir_info, start_symbol='main', proof_dir=tmp_path) + with cterm_symbolic( + kmir_instance.definition, + kmir_instance.definition_dir, + llvm_definition_dir=kmir_instance.llvm_library_dir, + simplify_each=30, + ) as cts: + module_name = cts.add_module(module, name_as_id=True) + kcfg_explore = KCFGExplore(cts, kcfg_semantics=KMIRSemantics()) + prover = APRProver(kcfg_explore, execute_depth=10000) + prover.advance_proof(reuse_proof, max_iterations=1000) + + assert reuse_proof.passed, f'CSE reuse proof should pass, status={reuse_proof.status}' + + # Step 7: Verify structure preservation (H2, H4) + r_kcfg = reuse_proof.kcfg + assert len(list(r_kcfg.ndbranches())) == 0, 'H4: CSE must not produce NDBranch' + b_splits = len(list(baseline.kcfg.splits())) + r_splits = len(list(r_kcfg.splits())) + assert b_splits == r_splits, f'H2: splits mismatch baseline={b_splits} reuse={r_splits}' diff --git a/kmir/src/tests/unit/test_utils.py b/kmir/src/tests/unit/test_utils.py new file mode 100644 index 000000000..89b8bdb86 --- /dev/null +++ b/kmir/src/tests/unit/test_utils.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from dataclasses import dataclass +from typing import TYPE_CHECKING, cast + +from pyk.cterm import CSubst, CTerm +from pyk.kast.inner import KApply +from pyk.kcfg.kcfg import KCFG + +from kmir.utils import render_statistics + +if TYPE_CHECKING: + from pyk.proof.reachability import APRProof + + +@dataclass +class _FakeKCFG: + nodes: tuple[KCFG.Node, ...] + leaves: tuple[KCFG.Node, ...] + root_ids: frozenset[int] + successor_map: dict[int, tuple[object, ...]] + + def is_root(self, node_id: int) -> bool: + return node_id in self.root_ids + + def successors(self, node_id: int) -> tuple[object, ...]: + return self.successor_map.get(node_id, ()) + + def is_split(self, _node_id: int) -> bool: + return False + + def is_ndbranch(self, _node_id: int) -> bool: + return False + + def is_stuck(self, _node_id: int) -> bool: + return False + + +@dataclass +class _FakeProof: + kcfg: _FakeKCFG + init: int + pending_ids: frozenset[int] + + def is_target(self, _node_id: int) -> bool: + return False + + def is_terminal(self, _node_id: int) -> bool: + return False + + def is_refuted(self, _node_id: int) -> bool: + return False + + def is_bounded(self, _node_id: int) -> bool: + return False + + def is_pending(self, node_id: int) -> bool: + return node_id in self.pending_ids + + def is_failing(self, _node_id: int) -> bool: + return False + + +def test_render_statistics_handles_zero_cost_predecessor_cycles() -> None: + kcfg = KCFG() + loop_target = kcfg.create_node(CTerm(KApply(''))) + init = kcfg.create_node(CTerm(KApply(''))) + leaf = kcfg.create_node(CTerm(KApply(''))) + + fake_kcfg = _FakeKCFG( + nodes=(loop_target, init, leaf), + leaves=(leaf,), + root_ids=frozenset({init.id}), + successor_map={ + init.id: (KCFG.Cover(init, loop_target, CSubst()),), + loop_target.id: ( + KCFG.Cover(loop_target, init, CSubst()), + KCFG.Edge(loop_target, leaf, 1, ()), + ), + }, + ) + proof = _FakeProof(fake_kcfg, init=init.id, pending_ids=frozenset({leaf.id})) + + lines = render_statistics(cast('APRProof', proof)) + + assert f' leaf {leaf.id}: shortest steps 1, path {init.id} -> {loop_target.id} -> {leaf.id}' in lines