From 053637aa4616d22cbd3ca413c8cc19eec65ec4fa Mon Sep 17 00:00:00 2001 From: Stevengre Date: Wed, 27 Aug 2025 10:50:41 +0800 Subject: [PATCH 01/27] Add raw_eq_simple test for intrinsic raw_eq functionality This commit introduces a new test case, `raw_eq_simple.rs`, to validate the behavior of the `raw_eq` intrinsic. The test checks the equality of two integers using the `raw_eq` function, which is expected to be implemented in the intrinsic layer. Additionally, a corresponding SMIR JSON representation and state file are added to facilitate the testing process. Key Changes: - Created `raw_eq_simple.rs` to test `raw_eq` intrinsic. - Added `raw_eq_simple.smir.json` for SMIR representation. - Included `raw_eq_simple.state` to define the execution state during the test. This lays the groundwork for further intrinsic testing and ensures that the `raw_eq` functionality is correctly integrated into the KMIR framework. --- .../data/exec-smir/intrinsic/raw_eq_simple.rs | 14 ++++ .../intrinsic/raw_eq_simple.smir.json | 1 + .../exec-smir/intrinsic/raw_eq_simple.state | 71 +++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs create mode 100644 kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.smir.json create mode 100644 kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.state diff --git a/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs new file mode 100644 index 000000000..bdcc7d447 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs @@ -0,0 +1,14 @@ +#![feature(core_intrinsics)] + +use std::intrinsics::raw_eq; + +fn main() { + let a = 42; + let b = 42; + + // This will get stuck at the raw_eq intrinsic call + let result = unsafe { raw_eq(&a, &b) }; + + // This line won't be reached without the intrinsic implementation + assert!(result); +} \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.smir.json b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.smir.json new file mode 100644 index 000000000..a4fd9d19d --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.smir.json @@ -0,0 +1 @@ +{"name":"raw_eq_simple","crate_id":6952967681419923239,"allocs":[[1,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,114,101,115,117,108,116],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h080d61aebc6fe980E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbf88d7319dcac5daE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hb3351458757bf72cE"}],[20,{"IntrinsicSym":"black_box"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h72b75dd84862c578E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h7d334358e0fd5d2bE"}],[25,{"IntrinsicSym":"raw_eq"}],[26,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}],[37,{"NoOpSym":""}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN13raw_eq_simple4main17h9f309d4e056bd9a1E","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":52,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":10}}}}]},"span":52},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":53,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":10}}}}]},"span":53},{"kind":{"Assign":[{"local":4,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":1,"projection":[]}]}]},"span":54},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[]}]}]},"span":55}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":50,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":9}}},"args":[{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":5,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Unreachable"}},"span":51}},{"statements":[],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":3}}},"span":56}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":57,"user_ty":null,"const_":{"kind":"ZeroSized","ty":26,"id":11}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":27,"id":12}}}],"destination":{"local":6,"projection":[]},"target":null,"unwind":"Continue"}},"span":57}},{"statements":[],"terminator":{"kind":"Return","span":58}}],"locals":[{"ty":1,"span":59,"mutability":"Mut"},{"ty":16,"span":60,"mutability":"Not"},{"ty":16,"span":61,"mutability":"Not"},{"ty":28,"span":62,"mutability":"Not"},{"ty":29,"span":54,"mutability":"Not"},{"ty":29,"span":55,"mutability":"Not"},{"ty":30,"span":57,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":60,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":61,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":62,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":63}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h0f972edf589c1802E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h7d334358e0fd5d2bE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h080d61aebc6fe980E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h45966598db2d3bf3E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h72b75dd84862c578E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hb3351458757bf72cE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hed6d62ab5cefa6e0E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbf88d7319dcac5daE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}}},"details":null}],"types":[[1,{"TupleType":{"types":[],"layout":{"fields":{"Arbitrary":{"offsets":[]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":1,"size":{"num_bits":0}}}}],[5,{"RefType":{"pointee_type":31,"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":64}]}},"variants":{"Single":{"index":0}},"abi":{"ScalarPair":[{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}},{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}]},"abi_align":8,"size":{"num_bits":128}}}}],[6,{"PrimitiveType":{"Int":"Isize"}}],[8,{"PtrType":{"pointee_type":32,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[9,{"PrimitiveType":{"Uint":"U8"}}],[10,{"EnumType":{"name":"std::result::Result","adt_def":12,"discriminants":[0,1],"fields":[[6],[30]],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I64","signed":true}},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[11,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[15,{"StructType":{"name":"std::sys::pal::unix::process::process_common::ExitCode","adt_def":18,"fields":[9],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[16,{"PrimitiveType":{"Int":"I32"}}],[17,{"StructType":{"name":"std::process::ExitCode","adt_def":16,"fields":[15],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[18,{"RefType":{"pointee_type":15,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[22,{"PtrType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[24,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[27,{"RefType":{"pointee_type":34,"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":64}]}},"variants":{"Single":{"index":0}},"abi":{"ScalarPair":[{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}},{"Initialized":{"value":{"Int":{"length":"I64","signed":false}},"valid_range":{"start":0,"end":18446744073709551615}}}]},"abi_align":8,"size":{"num_bits":128}}}}],[28,{"PrimitiveType":"Bool"}],[29,{"RefType":{"pointee_type":16,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[30,"VoidType"],[32,{"PtrType":{"pointee_type":9,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[33,{"RefType":{"pointee_type":35,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[34,{"PrimitiveType":"Str"}],[35,{"StructType":{"name":"std::panic::Location<'_>","adt_def":22,"fields":[27,36,36],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":128},{"num_bits":160}]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":8,"size":{"num_bits":192}}}}],[36,{"PrimitiveType":{"Uint":"U32"}}]],"spans":[[0,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,194,36]],[1,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,199,6]],[2,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,9,195,93]],[3,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,10,195,93]],[4,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",201,2,201,2]],[5,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,5,199,6]],[6,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,12,194,13]],[7,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,6,199,7]],[9,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",189,5,189,9]],[10,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",190,5,190,9]],[11,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",191,5,191,9]],[12,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",192,5,192,12]],[13,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",188,1,201,2]],[14,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,69]],[15,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,75]],[16,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,84]],[17,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,70,195,74]],[18,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,76,195,82]],[19,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,74,195,75]],[20,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,93,195,93]],[21,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,83,195,84]],[22,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,9,2053,15]],[23,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,15]],[24,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,22]],[25,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,21,636,22]],[26,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,23,2053,24]],[27,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,92,195,93]],[29,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2052,19,2052,23]],[30,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",635,19,635,24]],[31,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,19]],[32,["no-location",0,0,0,0]],[33,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,21]],[34,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,33]],[35,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,40]],[36,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",160,2,160,2]],[38,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,43,150,44]],[40,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,9,154,15]],[41,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",388,27,388,32]],[42,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,1,160,2]],[43,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs",250,5,250,71]],[44,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs",521,1,521,56]],[45,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2424,6,2424,6]],[46,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2423,9,2423,26]],[48,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,15,2422,19]],[49,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,5,2424,6]],[50,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",10,27,10,33]],[51,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",10,27,10,41]],[52,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",6,13,6,15]],[53,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",7,13,7,15]],[54,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",10,34,10,36]],[55,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",10,38,10,40]],[56,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",13,13,13,19]],[57,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",13,5,13,20]],[58,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",14,2,14,2]],[60,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",6,9,6,10]],[61,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",7,9,7,10]],[62,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",10,9,10,15]],[63,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",5,1,14,2]]],"debug":null,"machine":{"endian":"Little","pointer_width":{"num_bits":64}}} \ 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 new file mode 100644 index 000000000..f39ef8d39 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.state @@ -0,0 +1,71 @@ + + + #execIntrinsic ( symbol ( "raw_eq" ) , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ~> #execBlockIdx ( basicBlockIdx ( 1 ) ) ~> .K + + + noReturn + + + ty ( 25 ) + + + + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) ) + + + ty ( -1 ) + + + place (... local: local ( 3 ) , projection: .ProjectionElems ) + + + someBasicBlockIdx ( basicBlockIdx ( 1 ) ) + + + unwindActionUnreachable + + + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 42 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 42 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) + + + + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , 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 ( newLocal ( ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + + .Map + + + ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) + ty ( 25 ) |-> IntrinsicFunction ( symbol ( "raw_eq" ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) + + + symbol ( "main" ) + + + ty ( 1 ) |-> typeInfoTupleType ( .Tys ) + ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) + ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeBool ) + ty ( 29 ) |-> typeInfoRefType ( ty ( 16 ) ) + ty ( 30 ) |-> typeInfoVoidType + + + .Map + + \ No newline at end of file From 47128fcc4a9dd5e8aaf5153e6ec3eb79570e0e6c Mon Sep 17 00:00:00 2001 From: Stevengre Date: Wed, 27 Aug 2025 12:18:34 +0800 Subject: [PATCH 02/27] add test to exec_smir --- kmir/src/tests/integration/test_integration.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kmir/src/tests/integration/test_integration.py b/kmir/src/tests/integration/test_integration.py index 438fa3208..cb11eb533 100644 --- a/kmir/src/tests/integration/test_integration.py +++ b/kmir/src/tests/integration/test_integration.py @@ -295,6 +295,12 @@ def test_crate_examples(main_crate: Path, kmir: KMIR, update_expected_output: bo EXEC_DATA_DIR / 'intrinsic' / 'blackbox.state', 1000, ), + ( + 'raw_eq_simple', + EXEC_DATA_DIR / 'intrinsic' / 'raw_eq_simple.smir.json', + EXEC_DATA_DIR / 'intrinsic' / 'raw_eq_simple.state', + 1000, + ), ] From 0107bb61f86d6118cec116781f57412cdf37254a Mon Sep 17 00:00:00 2001 From: Stevengre Date: Wed, 27 Aug 2025 19:22:55 +0800 Subject: [PATCH 03/27] Implement std::intrinsics::raw_eq support in KMIR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add implementation for the raw_eq intrinsic function that performs byte-by-byte equality comparison of referenced values. Changes: - Add raw_eq intrinsic execution rules in kmir.md using freeze/heat pattern - Handle Reference dereferencing with projectionElemDeref for proper value access - Add raw_eq_simple test case with SMIR JSON and expected state - Use dedicated #execRawEq function to avoid recursion issues The implementation uses #readOperands to evaluate Reference operands, then dereferences them to compare the underlying values using K's built-in equality operator. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- kmir/src/kmir/kdist/mir-semantics/kmir.md | 31 ++++++- kmir/src/kmir/kdist/mir-semantics/rt/data.md | 1 + .../intrinsic/raw_eq_simple.llvm.state | 91 +++++++++++++++++++ .../data/exec-smir/intrinsic/raw_eq_simple.rs | 9 +- .../src/tests/integration/test_integration.py | 2 +- 5 files changed, 128 insertions(+), 6 deletions(-) create mode 100644 kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.llvm.state diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 2f0d9fd5f..bec9c7b53 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -515,7 +515,7 @@ An operand may be a `Reference` (the only way a function could access another fu // Handle intrinsic functions - execute directly without setting up local stack frame rule #setUpCalleeData(IntrinsicFunction(INTRINSIC_NAME), ARGS) - => #execIntrinsic(INTRINSIC_NAME, ARGS, DEST) ~> #execBlockIdx(RETURN_TARGET) + => #readOperands(ARGS) ~> #execIntrinsic(INTRINSIC_NAME, DEST) ~> #execBlockIdx(RETURN_TARGET) DEST @@ -525,7 +525,7 @@ An operand may be a `Reference` (the only way a function could access another fu syntax KItem ::= #setArgsFromStack ( Int, Operands) | #setArgFromStack ( Int, Operand) - | #execIntrinsic ( Symbol, Operands, Place ) + | #execIntrinsic ( Symbol, Place ) // once all arguments have been retrieved, execute rule #setArgsFromStack(_, .Operands) ~> CONT => CONT @@ -629,7 +629,32 @@ its argument to the destination without modification. ```k // Black box intrinsic implementation - identity function - rule #execIntrinsic(symbol("black_box"), ARG .Operands, DEST) => #setLocalValue(DEST, ARG) ... + rule ListItem(ARG:Value) ~> #execIntrinsic(symbol("black_box"), DEST) => #setLocalValue(DEST, ARG) ... + + // Raw eq intrinsic - byte-by-byte equality comparison of referenced values + + // Handle Reference values by reading the referenced values directly + rule ListItem(Reference(_OFFSET1, place(LOCAL1, PROJ1), _MUT1, _META1):Value) + ListItem(Reference(_OFFSET2, place(LOCAL2, PROJ2), _MUT2, _META2):Value) + ~> #execIntrinsic(symbol("raw_eq"), DEST) + => #readOperands( + operandCopy(place(LOCAL1, PROJ1)) + operandCopy(place(LOCAL2, PROJ2)) + .Operands + ) ~> #execRawEq(DEST) + ... + [priority(1)] + + // Dedicated raw_eq execution that compares dereferenced values + syntax KItem ::= #execRawEq(Place) + rule ListItem(VAL1:Value) ListItem(VAL2:Value) ~> #execRawEq(DEST) + => #setLocalValue(DEST, BoolVal(VAL1 ==K VAL2)) + ... + + // Generic rule for non-Reference values (commented out for now - unclear what behavior should be) + // rule ListItem(VAL1:Value) ListItem(VAL2:Value) ~> #execIntrinsic(symbol("raw_eq"), DEST) + // => #setLocalValue(DEST, BoolVal(VAL1 ==K VAL2)) + // ... ``` ### Stopping on Program Errors diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/data.md b/kmir/src/kmir/kdist/mir-semantics/rt/data.md index c2d10093f..deab55b4b 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/data.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/data.md @@ -166,6 +166,7 @@ In contrast to regular write operations, the value does not have to be _mutable_ [preserves-definedness] // valid list indexing checked ``` + ### Setting Local Variables The `#setLocalValue` operation writes a `Value` value to a given `Place` within the `List` of local variables currently on top of the stack. diff --git a/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.llvm.state b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.llvm.state new file mode 100644 index 000000000..5d7010d2d --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.llvm.state @@ -0,0 +1,91 @@ + + + #execTerminator ( terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) ~> .K + + + noReturn + + + ty ( 25 ) + + + + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) ) + + + ty ( -1 ) + + + place (... local: local ( 3 ) , projection: .ProjectionElems ) + + + someBasicBlockIdx ( basicBlockIdx ( 1 ) ) + + + unwindActionUnreachable + + + 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 , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) + + + + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , 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 ( newLocal ( ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + + .Map + + + ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) + ty ( 25 ) |-> IntrinsicFunction ( symbol ( "raw_eq" ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) + + + symbol ( "main" ) + + + ty ( 1 ) |-> typeInfoTupleType ( .Tys ) + ty ( 5 ) |-> typeInfoRefType ( ty ( 31 ) ) + ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) + ty ( 8 ) |-> typeInfoPtrType ( ty ( 32 ) ) + ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) + ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 12 ) , Discriminant ( 0 ) Discriminant ( 1 ) .Discriminants ) + ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) + ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 18 ) , ty ( 9 ) .Tys ) + ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) + ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 16 ) , ty ( 15 ) .Tys ) + ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) + ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) + ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) + ty ( 27 ) |-> typeInfoRefType ( ty ( 34 ) ) + ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeBool ) + ty ( 29 ) |-> typeInfoRefType ( ty ( 16 ) ) + ty ( 30 ) |-> typeInfoVoidType + ty ( 32 ) |-> typeInfoPtrType ( ty ( 9 ) ) + ty ( 33 ) |-> typeInfoRefType ( ty ( 35 ) ) + ty ( 34 ) |-> typeInfoPrimitiveType ( primTypeStr ) + ty ( 35 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 22 ) , ty ( 27 ) ty ( 36 ) ty ( 36 ) .Tys ) + ty ( 36 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) + + + adtDef ( 12 ) |-> ty ( 10 ) + adtDef ( 16 ) |-> ty ( 17 ) + adtDef ( 18 ) |-> ty ( 15 ) + adtDef ( 22 ) |-> ty ( 35 ) + + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs index bdcc7d447..230ff8412 100644 --- a/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs +++ b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs @@ -2,13 +2,18 @@ use std::intrinsics::raw_eq; +// NOTE: This test demonstrates the raw_eq intrinsic implementation. +// Known issue: Haskell backend produces more verbose symbolic execution output +// compared to LLVM backend due to different handling of symbolic branches. +// Both backends correctly implement the intrinsic but output format differs. + fn main() { let a = 42; let b = 42; - // This will get stuck at the raw_eq intrinsic call + // Test raw_eq intrinsic with identical values let result = unsafe { raw_eq(&a, &b) }; - // This line won't be reached without the intrinsic implementation + // This assertion should pass as both values are identical assert!(result); } \ No newline at end of file diff --git a/kmir/src/tests/integration/test_integration.py b/kmir/src/tests/integration/test_integration.py index cb11eb533..85dc1f1ad 100644 --- a/kmir/src/tests/integration/test_integration.py +++ b/kmir/src/tests/integration/test_integration.py @@ -299,7 +299,7 @@ def test_crate_examples(main_crate: Path, kmir: KMIR, update_expected_output: bo 'raw_eq_simple', EXEC_DATA_DIR / 'intrinsic' / 'raw_eq_simple.smir.json', EXEC_DATA_DIR / 'intrinsic' / 'raw_eq_simple.state', - 1000, + 65, ), ] From de39bcd92a240ca86ebabefa2d470f8ecea41130 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Wed, 27 Aug 2025 21:22:45 +0800 Subject: [PATCH 04/27] remove useless \n --- kmir/src/kmir/kdist/mir-semantics/rt/data.md | 1 - 1 file changed, 1 deletion(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/data.md b/kmir/src/kmir/kdist/mir-semantics/rt/data.md index deab55b4b..c2d10093f 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/data.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/data.md @@ -166,7 +166,6 @@ In contrast to regular write operations, the value does not have to be _mutable_ [preserves-definedness] // valid list indexing checked ``` - ### Setting Local Variables The `#setLocalValue` operation writes a `Value` value to a given `Place` within the `List` of local variables currently on top of the stack. From 8602564c71d888c99eb11efc61d0deffad209208 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Wed, 27 Aug 2025 21:25:30 +0800 Subject: [PATCH 05/27] docs: Add documentation section for raw_eq intrinsic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a dedicated documentation section for the raw_eq intrinsic function, similar to the existing black_box documentation. This explains what the intrinsic does, how it works, and its typical use cases. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- kmir/src/kmir/kdist/mir-semantics/kmir.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index bec9c7b53..270d40423 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -630,7 +630,17 @@ its argument to the destination without modification. ```k // Black box intrinsic implementation - identity function rule ListItem(ARG:Value) ~> #execIntrinsic(symbol("black_box"), DEST) => #setLocalValue(DEST, ARG) ... - +``` + +#### Raw Eq (`std::intrinsics::raw_eq`) + +The `raw_eq` intrinsic performs byte-by-byte equality comparison of the memory contents pointed to by two references. +It returns a boolean value indicating whether the referenced values are equal. The implementation dereferences the +provided References to access the underlying values, then compares them using K's built-in equality operator. +This intrinsic is typically used for low-level memory comparison operations where type-specific equality methods +are not suitable. + +```k // Raw eq intrinsic - byte-by-byte equality comparison of referenced values // Handle Reference values by reading the referenced values directly From d373c3261ceb958f75b3caf1fcd2f611ac3d1289 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Wed, 27 Aug 2025 22:00:26 +0800 Subject: [PATCH 06/27] docs: Document current limitations of raw_eq implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add documentation about the current limitations of the raw_eq intrinsic: - Only handles References to same-type values - More complex cases need additional testing and implementation - Different types may require byte-level conversion 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- kmir/src/kmir/kdist/mir-semantics/kmir.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 270d40423..0ac562ce1 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -640,6 +640,16 @@ provided References to access the underlying values, then compares them using K' This intrinsic is typically used for low-level memory comparison operations where type-specific equality methods are not suitable. +**Current Limitations:** +The current implementation only handles the simple case where References point to values of the same type. +More complex scenarios require additional testing and implementation work: +- References to different types with the same memory representation +- References to composite types (structs, arrays, enums) +- References with different alignments or padding + +Handling different types may require converting values to their byte representations before comparison, +which will need to be addressed when such use cases are encountered. + ```k // Raw eq intrinsic - byte-by-byte equality comparison of referenced values From eab524483b7c77ed6b37f6881397ebb80d5c8c8c Mon Sep 17 00:00:00 2001 From: Stevengre Date: Wed, 27 Aug 2025 22:14:15 +0800 Subject: [PATCH 07/27] update expected files --- .../intrinsic/raw_eq_simple.llvm.state | 91 ------------------- .../exec-smir/intrinsic/raw_eq_simple.state | 26 +++++- 2 files changed, 23 insertions(+), 94 deletions(-) delete mode 100644 kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.llvm.state diff --git a/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.llvm.state b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.llvm.state deleted file mode 100644 index 5d7010d2d..000000000 --- a/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.llvm.state +++ /dev/null @@ -1,91 +0,0 @@ - - - #execTerminator ( terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) ~> .K - - - noReturn - - - ty ( 25 ) - - - - ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) ) - - - ty ( -1 ) - - - place (... local: local ( 3 ) , projection: .ProjectionElems ) - - - someBasicBlockIdx ( basicBlockIdx ( 1 ) ) - - - unwindActionUnreachable - - - 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 , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) - - - - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , 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 ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - - .Map - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 25 ) |-> IntrinsicFunction ( symbol ( "raw_eq" ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 31 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 32 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 12 ) , Discriminant ( 0 ) Discriminant ( 1 ) .Discriminants ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 18 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 16 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 27 ) |-> typeInfoRefType ( ty ( 34 ) ) - ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 29 ) |-> typeInfoRefType ( ty ( 16 ) ) - ty ( 30 ) |-> typeInfoVoidType - ty ( 32 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 33 ) |-> typeInfoRefType ( ty ( 35 ) ) - ty ( 34 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 35 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 22 ) , ty ( 27 ) ty ( 36 ) ty ( 36 ) .Tys ) - ty ( 36 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - - - adtDef ( 12 ) |-> ty ( 10 ) - adtDef ( 16 ) |-> ty ( 17 ) - adtDef ( 18 ) |-> ty ( 15 ) - adtDef ( 22 ) |-> ty ( 35 ) - - \ 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 f39ef8d39..5d7010d2d 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 @@ -1,6 +1,6 @@ - #execIntrinsic ( symbol ( "raw_eq" ) , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ~> #execBlockIdx ( basicBlockIdx ( 1 ) ) ~> .K + #execTerminator ( terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) ~> .K noReturn @@ -31,7 +31,7 @@ ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ListItem ( typedValue ( Integer ( 42 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) ListItem ( typedValue ( Integer ( 42 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( true ) , ty ( 28 ) , mutabilityNot ) ) ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) @@ -60,12 +60,32 @@ ty ( 1 ) |-> typeInfoTupleType ( .Tys ) + ty ( 5 ) |-> typeInfoRefType ( ty ( 31 ) ) + ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) + ty ( 8 ) |-> typeInfoPtrType ( ty ( 32 ) ) + ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) + ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 12 ) , Discriminant ( 0 ) Discriminant ( 1 ) .Discriminants ) + ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) + ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 18 ) , ty ( 9 ) .Tys ) ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) + ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 16 ) , ty ( 15 ) .Tys ) + ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) + ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) + ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) + ty ( 27 ) |-> typeInfoRefType ( ty ( 34 ) ) ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeBool ) ty ( 29 ) |-> typeInfoRefType ( ty ( 16 ) ) ty ( 30 ) |-> typeInfoVoidType + ty ( 32 ) |-> typeInfoPtrType ( ty ( 9 ) ) + ty ( 33 ) |-> typeInfoRefType ( ty ( 35 ) ) + ty ( 34 ) |-> typeInfoPrimitiveType ( primTypeStr ) + ty ( 35 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 22 ) , ty ( 27 ) ty ( 36 ) ty ( 36 ) .Tys ) + ty ( 36 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - .Map + adtDef ( 12 ) |-> ty ( 10 ) + adtDef ( 16 ) |-> ty ( 17 ) + adtDef ( 18 ) |-> ty ( 15 ) + adtDef ( 22 ) |-> ty ( 35 ) \ No newline at end of file From 907d3c5533431bcf5308202c09146d26ac322ba5 Mon Sep 17 00:00:00 2001 From: JianHong Zhao Date: Wed, 27 Aug 2025 22:16:12 +0800 Subject: [PATCH 08/27] Update kmir/src/kmir/kdist/mir-semantics/kmir.md --- kmir/src/kmir/kdist/mir-semantics/kmir.md | 1 - 1 file changed, 1 deletion(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 0ac562ce1..df16b1910 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -663,7 +663,6 @@ which will need to be addressed when such use cases are encountered. .Operands ) ~> #execRawEq(DEST) ... - [priority(1)] // Dedicated raw_eq execution that compares dereferenced values syntax KItem ::= #execRawEq(Place) From ccad4538314ade17abd1d411fc757ec2ed9e7ef2 Mon Sep 17 00:00:00 2001 From: JianHong Zhao Date: Wed, 27 Aug 2025 22:16:18 +0800 Subject: [PATCH 09/27] Update kmir/src/kmir/kdist/mir-semantics/kmir.md --- kmir/src/kmir/kdist/mir-semantics/kmir.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index df16b1910..0506f4fd2 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -670,10 +670,6 @@ which will need to be addressed when such use cases are encountered. => #setLocalValue(DEST, BoolVal(VAL1 ==K VAL2)) ... - // Generic rule for non-Reference values (commented out for now - unclear what behavior should be) - // rule ListItem(VAL1:Value) ListItem(VAL2:Value) ~> #execIntrinsic(symbol("raw_eq"), DEST) - // => #setLocalValue(DEST, BoolVal(VAL1 ==K VAL2)) - // ... ``` ### Stopping on Program Errors From aa816f7c0a12d4415e75d7e92f93d6a341ea7c3e Mon Sep 17 00:00:00 2001 From: Stevengre Date: Wed, 27 Aug 2025 22:54:36 +0800 Subject: [PATCH 10/27] docs: Improve intrinsic development documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Simplify CLAUDE.md to reference docs instead of duplicating content - Update adding-intrinsics.md with complete workflow from raw_eq experience - Add freeze/heat pattern explanation and common issues - Include proper test filtering with 'exec_smir and intrinsic_name' - Emphasize reading existing implementations before starting 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- CLAUDE.md | 20 +-- docs/dev/adding-intrinsics.md | 264 +++++++++++++++++++++++++++++----- 2 files changed, 242 insertions(+), 42 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 19cb9c563..d9e55afaf 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -97,10 +97,12 @@ The Python layer (`kmir.py`) bridges between SMIR JSON and K semantics: 3. Executes via K framework's `KProve`/`KRun` interfaces ### Intrinsic Functions -Intrinsic functions (like `black_box`) don't have regular function bodies. They're handled by: +Intrinsic functions (like `black_box`, `raw_eq`) don't have regular function bodies. They're handled by: 1. Python: `_make_function_map` adds `IntrinsicFunction` entries to function map 2. K: Special rules in `kmir.md` execute intrinsics via `#execIntrinsic` +**See `docs/dev/adding-intrinsics.md` for detailed implementation guide.** + ## Testing Patterns ### prove-rs Tests @@ -118,9 +120,14 @@ Tests in `kmir/src/tests/integration/data/prove-rs/` follow this pattern: ## Development Workflow ### Before Starting Any Task -1. Read README and documentation in docs/ directory first -2. Study existing development patterns and conventions -3. Understand the codebase structure before making changes +1. **Always read relevant documentation first**: + - Check `docs/` directory for guides on specific topics + - Review existing implementations of similar features + - Study test patterns in `kmir/src/tests/` +2. **Understand existing patterns**: + - Look at recent PRs for implementation examples + - Check how similar features are implemented + - Follow established conventions in the codebase ### Modifying K Semantics 1. Edit `.md` files in `kmir/src/kmir/kdist/mir-semantics/` @@ -133,10 +140,7 @@ Tests in `kmir/src/tests/integration/data/prove-rs/` follow this pattern: 3. Test with `make test-unit` ### Adding Intrinsic Support -1. Update `_make_function_map` in `kmir.py` to recognize intrinsic -2. Add `IntrinsicFunction` constructor in `mono.md` -3. Add execution rules in `kmir.md` under `#execIntrinsic` -4. Add test in `prove-rs/` directory +See `docs/dev/adding-intrinsics.md` for complete guide with examples. ## Debugging Tips diff --git a/docs/dev/adding-intrinsics.md b/docs/dev/adding-intrinsics.md index 7cde1d7f2..744a28a44 100644 --- a/docs/dev/adding-intrinsics.md +++ b/docs/dev/adding-intrinsics.md @@ -1,73 +1,269 @@ # Adding Intrinsics +## Overview + +This guide explains how to add support for new intrinsic functions in KMIR. Intrinsics are compiler built-in functions that don't have regular MIR bodies and require special semantic rules. + +## Architecture + +As of PR #665, intrinsics use a "freeze/heat" pattern: +1. **Operand Evaluation (Freeze)**: `#readOperands(ARGS)` evaluates all arguments to values +2. **Intrinsic Execution (Heat)**: `#execIntrinsic(symbol("name"), DEST)` executes with values on K cell +3. **Pattern Matching**: Rules match on specific value patterns for each intrinsic + ## Development Workflow ### Step 1: Create Test File -Create `tests/rust/intrinsic/your_intrinsic.rs`: + +Create test file in `kmir/src/tests/integration/data/exec-smir/intrinsic/`: ```rust +// your_intrinsic.rs +#![feature(core_intrinsics)] + fn main() { - let result = your_intrinsic(args); - assert_eq!(result, expected); + use std::intrinsics::your_intrinsic; + + // Set up test values + let val = 42; + let result = your_intrinsic(&val); + + // Add assertion to verify behavior + assert!(result); } ``` -### Step 2: Generate SMIR and Verify Intrinsic Detection -```bash -# Generate SMIR JSON -make generate-tests-smir +### Step 2: Add Test to Integration Suite -# Update expected outputs and verify intrinsic is detected -make test-unit TEST_ARGS="--update-expected-output" +Edit `kmir/src/tests/integration/test_integration.py` and add entry to `EXEC_DATA`: + +```python +( + 'your_intrinsic', + EXEC_DATA_DIR / 'intrinsic' / 'your_intrinsic.smir.json', + EXEC_DATA_DIR / 'intrinsic' / 'your_intrinsic.state', + 65, # Start with small depth, increase if needed +), ``` -Check `tests/expected/unit/test_smir/test_function_symbols/your_intrinsic.expected.json` to confirm the intrinsic appears as `IntrinsicSym`. +The SMIR JSON will be generated automatically when the test runs. + +### Step 3: Generate Initial State (Will Show Stuck Point) -### Step 3: Run Initial Integration Test ```bash -# Run test and update expected output (will show stuck at intrinsic call) -make test-integration TEST_ARGS="-k your_intrinsic --update-expected-output" +# Generate initial state showing where execution gets stuck +make test-integration TEST_ARGS="-k 'exec_smir and your_intrinsic' --update-expected-output" -# Backup the initial state for comparison -cp tests/expected/integration/test_exec_smir/intrinsic_your_intrinsic.state \ - tests/expected/integration/test_exec_smir/intrinsic_your_intrinsic.state.backup +# This will create your_intrinsic.state showing execution stuck at: +# #execIntrinsic(symbol("your_intrinsic"), DEST) + +# Save this for comparison +cp kmir/src/tests/integration/data/exec-smir/intrinsic/your_intrinsic.state \ + your_intrinsic.state.initial ``` -### Step 4: Implement K Rule +### Step 4: Implement K Semantics Rule + Edit `kmir/src/kmir/kdist/mir-semantics/kmir.md`: +#### For Simple Value Operations (like `black_box`): + ```k -rule #execIntrinsic(mirString("your_intrinsic"), ARGS, DEST) => - /* your implementation */ +rule ListItem(ARG:Value) ~> #execIntrinsic(symbol("your_intrinsic"), DEST) + => #setLocalValue(DEST, process(ARG)) ... ``` -### Step 5: Rebuild and Test +#### For Reference Operations (like `raw_eq`): + +```k +// Handle Reference values +rule ListItem(Reference(_OFFSET, place(LOCAL, PROJ), _MUT, _META):Value) + ~> #execIntrinsic(symbol("your_intrinsic"), DEST) + => #readOperands( + operandCopy(place(LOCAL, projectionElemDeref PROJ)) + .Operands + ) ~> #execYourIntrinsic(DEST) + ... + +// Helper function to avoid recursion +syntax KItem ::= #execYourIntrinsic(Place) +rule ListItem(VAL:Value) ~> #execYourIntrinsic(DEST) + => #setLocalValue(DEST, process(VAL)) + ... +``` + +### Step 5: Add Documentation + +Add a section in `kmir.md` under "Intrinsic Functions": + +```markdown +#### Your Intrinsic (`std::intrinsics::your_intrinsic`) + +Description of what the intrinsic does and how it's implemented. + +**Current Limitations:** +- Any limitations or unhandled cases +- Future improvements needed +``` + +### Step 6: Rebuild and Test + ```bash # Rebuild K semantics make build -# Run test again -make test-integration TEST_ARGS="-k your_intrinsic --update-expected-output" +# Run test again and update the state with working implementation +make test-integration TEST_ARGS="-k 'exec_smir and your_intrinsic' --update-expected-output" -# Compare results -diff tests/expected/integration/test_exec_smir/intrinsic_your_intrinsic.state.backup \ - tests/expected/integration/test_exec_smir/intrinsic_your_intrinsic.state +# Compare to see the progress +diff your_intrinsic.state.initial \ + kmir/src/tests/integration/data/exec-smir/intrinsic/your_intrinsic.state ``` -The diff should show progress past the intrinsic call if implementation is correct. +### Step 7: Verify Both Backends + +```bash +# Test with both LLVM and Haskell backends +make test-integration TEST_ARGS="-k 'exec_smir and your_intrinsic'" + +# Both should pass with consistent results +# If not, you may need backend-specific state files +``` -### Step 6: Verify Results -Ensure the test completes successfully and the intrinsic behaves as expected. +## Examples -## Example: black_box +### Example 1: `black_box` (Simple Identity) -Initial state (before rule): +```k +// Takes one value, returns it unchanged +rule ListItem(ARG:Value) ~> #execIntrinsic(symbol("black_box"), DEST) + => #setLocalValue(DEST, ARG) + ... ``` -#setUpCalleeData ( IntrinsicFunction ( mirString ( "black_box" ) ) , ...) + +### Example 2: `raw_eq` (Reference Comparison) + +```k +// Takes two references, compares dereferenced values +rule ListItem(Reference(_OFF1, place(L1, P1), _M1, _META1):Value) + ListItem(Reference(_OFF2, place(L2, P2), _M2, _META2):Value) + ~> #execIntrinsic(symbol("raw_eq"), DEST) + => #readOperands( + operandCopy(place(L1, projectionElemDeref P1)) + operandCopy(place(L2, projectionElemDeref P2)) + .Operands + ) ~> #execRawEq(DEST) + ... + +syntax KItem ::= #execRawEq(Place) +rule ListItem(VAL1:Value) ListItem(VAL2:Value) ~> #execRawEq(DEST) + => #setLocalValue(DEST, BoolVal(VAL1 ==K VAL2)) + ... +``` + +## Common Patterns + +### Pattern 1: Direct Value Processing +Use when the intrinsic operates directly on values without indirection. + +### Pattern 2: Reference Dereferencing +Use `projectionElemDeref` to access values behind references. + +### Pattern 3: Helper Functions +Create dedicated functions like `#execYourIntrinsic` to: +- Avoid recursion issues +- Separate concerns +- Make rules more readable + +### Pattern 4: Multiple Operands +Pattern match multiple `ListItem` entries for multi-argument intrinsics. + +## Testing Best Practices + +1. **Start Simple**: Test with primitive types first +2. **Save Initial State**: Keep the stuck state for comparison +3. **Use Correct Test Filter**: Always use `exec_smir and your_intrinsic` to ensure correct test runs +4. **Check Both Backends**: Ensure LLVM and Haskell produce same results +5. **Document Limitations**: Note what cases aren't handled yet +6. **Create Issue for Future Work**: Track enhancements needed (like #666 for `raw_eq`) + +## Debugging Tips + +### Check Execution State +```bash +# See where execution is stuck with verbose output +make test-integration TEST_ARGS="-k 'exec_smir and your_intrinsic' -vv" + +# Look for the K cell content to see what values are present ``` -After implementing rule: +### Understanding the State File +The state file shows the complete execution state. Key sections to check: +- ``: Shows current execution point +- ``: Shows local variable values +- ``: Should contain `IntrinsicFunction(symbol("your_intrinsic"))` + +### Verify Intrinsic Recognition +```bash +# Check SMIR JSON to confirm intrinsic is recognized +cat kmir/src/tests/integration/data/exec-smir/intrinsic/your_intrinsic.smir.json | grep -A5 your_intrinsic ``` -Program continues execution with value 11 passed through -``` \ No newline at end of file + +## Common Issues + +### Issue: Wrong test runs +**Solution**: Use `-k 'exec_smir and your_intrinsic'` to ensure `test_exec_smir` runs, not other tests. + +### Issue: "Function not found" +**Solution**: The intrinsic should be automatically recognized if it appears in SMIR. Check the SMIR JSON to confirm. + +### Issue: Execution stuck at `#execIntrinsic` +**Solution**: Your rule pattern doesn't match. Check: +- The exact intrinsic name in the symbol +- Value types on K cell (use `ListItem(VAL:Value)` to match any value) +- Number of arguments expected + +### Issue: Recursion/infinite loop +**Solution**: Use helper functions to separate evaluation stages, avoid calling `#execIntrinsic` within itself. + +### Issue: Different backend results +**Solution**: +- Increase execution depth if needed +- Check for backend-specific evaluation order issues +- May need backend-specific expected files (`.llvm.state`, `.haskell.state`) + +### Issue: Test timeout +**Solution**: +- Start with smaller depth (e.g., 65 instead of 1000) +- Optimize your rule to avoid unnecessary computation +- Check for infinite loops in your implementation + +## Important Notes + +### The Freeze/Heat Pattern +The current architecture ensures all operands are evaluated before the intrinsic executes: +- **Freeze**: `#readOperands(ARGS)` evaluates operands to values +- **Heat**: Your rule matches on these values +- This prevents evaluation order issues and simplifies rules + +### When to Use Helper Functions +Always use a helper function (like `#execRawEq`) when: +- You need to call `#readOperands` again (to avoid recursion) +- The logic is complex enough to benefit from separation +- You need multiple evaluation steps + +### Testing Strategy +1. Write the test with expected behavior first +2. Generate initial state to see where it gets stuck +3. Implement the minimal rule needed +4. Update state to verify progress +5. Iterate to handle edge cases +6. Document limitations for future work + +## References + +- PR #665: `raw_eq` implementation with freeze/heat pattern refactoring +- PR #659: `black_box` implementation +- Issue #666: Enhancements for complex `raw_eq` cases +- [Rust Intrinsics Documentation](https://doc.rust-lang.org/std/intrinsics/) \ No newline at end of file From 1a22f9b4d6d77e98cc56f39164844a5b69ae74f5 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Thu, 28 Aug 2025 11:47:51 +0800 Subject: [PATCH 11/27] update expected files --- .../show/checked_arithmetic-fail.checked_add_i32.expected | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kmir/src/tests/integration/data/prove-rs/show/checked_arithmetic-fail.checked_add_i32.expected b/kmir/src/tests/integration/data/prove-rs/show/checked_arithmetic-fail.checked_add_i32.expected index d2e044be2..1e964c2d7 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/checked_arithmetic-fail.checked_add_i32.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/checked_arithmetic-fail.checked_add_i32.expected @@ -31,9 +31,10 @@ ├─ 5 │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 4 ) ) │ - │ (7 steps) + │ (9 steps) └─ 7 (stuck, leaf) - #execIntrinsic ( symbol ( "cold_path" ) , .Operands , place ( ... local: local ( + .List +~> #execIntrinsic ( symbol ( "cold_path" ) , place ( ... local: local ( 6 From 9c8510337191f9deb35c1643583b920241ddcc2c Mon Sep 17 00:00:00 2001 From: Stevengre Date: Thu, 28 Aug 2025 12:35:11 +0800 Subject: [PATCH 12/27] refactor: Keep operands within #execIntrinsic for better indexing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Changed #execIntrinsic signature from (Symbol, Place) to (Symbol, Operands, Place) - Modified intrinsic call site to pass operands directly without pre-evaluation - Refactored black_box to handle operand evaluation with helper function - Refactored raw_eq with #withDeref helper and seqstrict evaluation - Updated documentation to reflect new direct operand passing pattern This improves K rule indexing by making operand patterns explicit in rule matching, while allowing each intrinsic to control its own operand evaluation strategy. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- docs/dev/adding-intrinsics.md | 133 +++++++----------- kmir/src/kmir/kdist/mir-semantics/kmir.md | 37 +++-- .../exec-smir/intrinsic/raw_eq_simple.state | 2 +- 3 files changed, 72 insertions(+), 100 deletions(-) diff --git a/docs/dev/adding-intrinsics.md b/docs/dev/adding-intrinsics.md index 744a28a44..9b8c0f287 100644 --- a/docs/dev/adding-intrinsics.md +++ b/docs/dev/adding-intrinsics.md @@ -6,10 +6,12 @@ This guide explains how to add support for new intrinsic functions in KMIR. Intr ## Architecture -As of PR #665, intrinsics use a "freeze/heat" pattern: -1. **Operand Evaluation (Freeze)**: `#readOperands(ARGS)` evaluates all arguments to values -2. **Intrinsic Execution (Heat)**: `#execIntrinsic(symbol("name"), DEST)` executes with values on K cell -3. **Pattern Matching**: Rules match on specific value patterns for each intrinsic +Intrinsics are handled with direct operand passing: +1. **Direct Operand Passing**: `#execIntrinsic(symbol("name"), ARGS, DEST)` receives operands directly +2. **Pattern Matching**: Rules match on specific operand patterns for each intrinsic +3. **Operand Evaluation**: Each intrinsic rule handles its own operand evaluation as needed + +See implementation in [kmir.md](../../kmir/src/kmir/kdist/mir-semantics/kmir.md) ## Development Workflow @@ -35,7 +37,7 @@ fn main() { ### Step 2: Add Test to Integration Suite -Edit `kmir/src/tests/integration/test_integration.py` and add entry to `EXEC_DATA`: +Add entry to `EXEC_DATA` in [test_integration.py](../../kmir/src/tests/integration/test_integration.py): ```python ( @@ -46,8 +48,6 @@ Edit `kmir/src/tests/integration/test_integration.py` and add entry to `EXEC_DAT ), ``` -The SMIR JSON will be generated automatically when the test runs. - ### Step 3: Generate Initial State (Will Show Stuck Point) ```bash @@ -64,48 +64,45 @@ cp kmir/src/tests/integration/data/exec-smir/intrinsic/your_intrinsic.state \ ### Step 4: Implement K Semantics Rule -Edit `kmir/src/kmir/kdist/mir-semantics/kmir.md`: +Add rules to [kmir.md](../../kmir/src/kmir/kdist/mir-semantics/kmir.md): -#### For Simple Value Operations (like `black_box`): +#### For Simple Value Operations: ```k -rule ListItem(ARG:Value) ~> #execIntrinsic(symbol("your_intrinsic"), DEST) - => #setLocalValue(DEST, process(ARG)) +rule #execIntrinsic(symbol("your_intrinsic"), ARG:Operand .Operands, PLACE) + => ARG ~> #setLocalValueFromK(PLACE) ... + +syntax KItem ::= #setLocalValueFromK(Place) +rule VAL:Value ~> #setLocalValueFromK(PLACE) => #setLocalValue(PLACE, VAL) ... ``` -#### For Reference Operations (like `raw_eq`): +#### For Operations Requiring Dereferencing: ```k -// Handle Reference values -rule ListItem(Reference(_OFFSET, place(LOCAL, PROJ), _MUT, _META):Value) - ~> #execIntrinsic(symbol("your_intrinsic"), DEST) - => #readOperands( - operandCopy(place(LOCAL, projectionElemDeref PROJ)) - .Operands - ) ~> #execYourIntrinsic(DEST) +// Use helper function to add dereferencing +syntax Operand ::= #withDeref(Operand) [function, total] +rule #withDeref(operandCopy(place(LOCAL, PROJ))) + => operandCopy(place(LOCAL, projectionElemDeref PROJ)) +rule #withDeref(operandMove(place(LOCAL, PROJ))) + => operandMove(place(LOCAL, projectionElemDeref PROJ)) +rule #withDeref(OP) => OP [owise] + +// Handle intrinsic with dereferencing +rule #execIntrinsic(symbol("your_intrinsic"), ARG1:Operand ARG2:Operand .Operands, PLACE) + => #execYourIntrinsic(PLACE, #withDeref(ARG1), #withDeref(ARG2)) ... -// Helper function to avoid recursion -syntax KItem ::= #execYourIntrinsic(Place) -rule ListItem(VAL:Value) ~> #execYourIntrinsic(DEST) - => #setLocalValue(DEST, process(VAL)) +// Use seqstrict for automatic operand evaluation +syntax KItem ::= #execYourIntrinsic(Place, KItem, KItem) [seqstrict(2,3)] +rule #execYourIntrinsic(DEST, VAL1:Value, VAL2:Value) + => #setLocalValue(DEST, process(VAL1, VAL2)) ... ``` ### Step 5: Add Documentation -Add a section in `kmir.md` under "Intrinsic Functions": - -```markdown -#### Your Intrinsic (`std::intrinsics::your_intrinsic`) - -Description of what the intrinsic does and how it's implemented. - -**Current Limitations:** -- Any limitations or unhandled cases -- Future improvements needed -``` +Document your intrinsic in the K semantics file with its implementation. ### Step 6: Rebuild and Test @@ -133,51 +130,21 @@ make test-integration TEST_ARGS="-k 'exec_smir and your_intrinsic'" ## Examples -### Example 1: `black_box` (Simple Identity) - -```k -// Takes one value, returns it unchanged -rule ListItem(ARG:Value) ~> #execIntrinsic(symbol("black_box"), DEST) - => #setLocalValue(DEST, ARG) - ... -``` - -### Example 2: `raw_eq` (Reference Comparison) - -```k -// Takes two references, compares dereferenced values -rule ListItem(Reference(_OFF1, place(L1, P1), _M1, _META1):Value) - ListItem(Reference(_OFF2, place(L2, P2), _M2, _META2):Value) - ~> #execIntrinsic(symbol("raw_eq"), DEST) - => #readOperands( - operandCopy(place(L1, projectionElemDeref P1)) - operandCopy(place(L2, projectionElemDeref P2)) - .Operands - ) ~> #execRawEq(DEST) - ... - -syntax KItem ::= #execRawEq(Place) -rule ListItem(VAL1:Value) ListItem(VAL2:Value) ~> #execRawEq(DEST) - => #setLocalValue(DEST, BoolVal(VAL1 ==K VAL2)) - ... -``` +For implementation examples, see existing intrinsics in [kmir.md](../../kmir/src/kmir/kdist/mir-semantics/kmir.md). ## Common Patterns -### Pattern 1: Direct Value Processing -Use when the intrinsic operates directly on values without indirection. +### Pattern 1: Direct Operand Evaluation +Use when the intrinsic needs to evaluate its operands directly. -### Pattern 2: Reference Dereferencing -Use `projectionElemDeref` to access values behind references. +### Pattern 2: Reference Dereferencing with #withDeref +Use the `#withDeref` helper function to add dereferencing to operands. -### Pattern 3: Helper Functions -Create dedicated functions like `#execYourIntrinsic` to: -- Avoid recursion issues -- Separate concerns -- Make rules more readable +### Pattern 3: seqstrict for Automatic Evaluation +Use `[seqstrict(2,3)]` attribute to automatically evaluate operand arguments. -### Pattern 4: Multiple Operands -Pattern match multiple `ListItem` entries for multi-argument intrinsics. +### Pattern 4: Pattern Matching on Operands +Match specific operand patterns directly in the `#execIntrinsic` rule. ## Testing Best Practices @@ -241,17 +208,17 @@ cat kmir/src/tests/integration/data/exec-smir/intrinsic/your_intrinsic.smir.json ## Important Notes -### The Freeze/Heat Pattern -The current architecture ensures all operands are evaluated before the intrinsic executes: -- **Freeze**: `#readOperands(ARGS)` evaluates operands to values -- **Heat**: Your rule matches on these values -- This prevents evaluation order issues and simplifies rules +### Direct Operand Passing +The current architecture passes operands directly to intrinsic rules: +- **Direct Access**: Rules receive operands directly in `#execIntrinsic` +- **Custom Evaluation**: Each intrinsic controls its own operand evaluation +- **Better Indexing**: K can better index rules with explicit operand patterns ### When to Use Helper Functions -Always use a helper function (like `#execRawEq`) when: -- You need to call `#readOperands` again (to avoid recursion) +Always use a helper function when: +- You need automatic operand evaluation (with `seqstrict`) - The logic is complex enough to benefit from separation -- You need multiple evaluation steps +- You want to transform operands before evaluation (like with `#withDeref`) ### Testing Strategy 1. Write the test with expected behavior first @@ -263,7 +230,5 @@ Always use a helper function (like `#execRawEq`) when: ## References -- PR #665: `raw_eq` implementation with freeze/heat pattern refactoring -- PR #659: `black_box` implementation -- Issue #666: Enhancements for complex `raw_eq` cases +- Recent intrinsic PRs in repository history - [Rust Intrinsics Documentation](https://doc.rust-lang.org/std/intrinsics/) \ No newline at end of file diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 0506f4fd2..c49bd62e2 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -515,7 +515,7 @@ An operand may be a `Reference` (the only way a function could access another fu // Handle intrinsic functions - execute directly without setting up local stack frame rule #setUpCalleeData(IntrinsicFunction(INTRINSIC_NAME), ARGS) - => #readOperands(ARGS) ~> #execIntrinsic(INTRINSIC_NAME, DEST) ~> #execBlockIdx(RETURN_TARGET) + => #execIntrinsic(INTRINSIC_NAME, ARGS, DEST) ~> #execBlockIdx(RETURN_TARGET) DEST @@ -525,7 +525,7 @@ An operand may be a `Reference` (the only way a function could access another fu syntax KItem ::= #setArgsFromStack ( Int, Operands) | #setArgFromStack ( Int, Operand) - | #execIntrinsic ( Symbol, Place ) + | #execIntrinsic ( Symbol, Operands, Place ) // once all arguments have been retrieved, execute rule #setArgsFromStack(_, .Operands) ~> CONT => CONT @@ -629,7 +629,12 @@ its argument to the destination without modification. ```k // Black box intrinsic implementation - identity function - rule ListItem(ARG:Value) ~> #execIntrinsic(symbol("black_box"), DEST) => #setLocalValue(DEST, ARG) ... + rule #execIntrinsic(symbol("black_box"), ARG:Operand .Operands, PLACE) + => ARG ~> #setLocalValueFromK(PLACE) + ... + + syntax KItem ::= #setLocalValueFromK(Place) + rule VAL:Value ~> #setLocalValueFromK(PLACE) => #setLocalValue(PLACE, VAL) ... ``` #### Raw Eq (`std::intrinsics::raw_eq`) @@ -653,20 +658,22 @@ which will need to be addressed when such use cases are encountered. ```k // Raw eq intrinsic - byte-by-byte equality comparison of referenced values - // Handle Reference values by reading the referenced values directly - rule ListItem(Reference(_OFFSET1, place(LOCAL1, PROJ1), _MUT1, _META1):Value) - ListItem(Reference(_OFFSET2, place(LOCAL2, PROJ2), _MUT2, _META2):Value) - ~> #execIntrinsic(symbol("raw_eq"), DEST) - => #readOperands( - operandCopy(place(LOCAL1, PROJ1)) - operandCopy(place(LOCAL2, PROJ2)) - .Operands - ) ~> #execRawEq(DEST) + // Helper function to append projectionElemDeref to an operand + syntax Operand ::= #withDeref(Operand) [function, total] + rule #withDeref(operandCopy(place(LOCAL, PROJ))) + => operandCopy(place(LOCAL, projectionElemDeref PROJ)) + rule #withDeref(operandMove(place(LOCAL, PROJ))) + => operandMove(place(LOCAL, projectionElemDeref PROJ)) + rule #withDeref(OP) => OP [owise] + + // Handle raw_eq intrinsic by dereferencing operands + rule #execIntrinsic(symbol("raw_eq"), ARG1:Operand ARG2:Operand .Operands, PLACE) + => #execRawEq(PLACE, #withDeref(ARG1), #withDeref(ARG2)) ... - // Dedicated raw_eq execution that compares dereferenced values - syntax KItem ::= #execRawEq(Place) - rule ListItem(VAL1:Value) ListItem(VAL2:Value) ~> #execRawEq(DEST) + // Execute raw_eq with operand evaluation via seqstrict + syntax KItem ::= #execRawEq(Place, KItem, KItem) [seqstrict(2,3)] + rule #execRawEq(DEST, VAL1:Value, VAL2:Value) => #setLocalValue(DEST, BoolVal(VAL1 ==K VAL2)) ... 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 5d7010d2d..de64ce198 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 @@ -1,6 +1,6 @@ - #execTerminator ( terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) ~> .K + #execBlock ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) ) ~> .K noReturn From 0d2fa1314818f24e0ce9b73a0827635b371d9255 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Thu, 28 Aug 2025 12:40:44 +0800 Subject: [PATCH 13/27] docs: Remove unnecessary Rust example in intrinsic guide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The generic your_intrinsic example was not helpful as it uses a non-existent intrinsic. Keep the instruction concise without the confusing code example. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- docs/dev/adding-intrinsics.md | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/docs/dev/adding-intrinsics.md b/docs/dev/adding-intrinsics.md index 9b8c0f287..39a43347c 100644 --- a/docs/dev/adding-intrinsics.md +++ b/docs/dev/adding-intrinsics.md @@ -17,23 +17,7 @@ See implementation in [kmir.md](../../kmir/src/kmir/kdist/mir-semantics/kmir.md) ### Step 1: Create Test File -Create test file in `kmir/src/tests/integration/data/exec-smir/intrinsic/`: - -```rust -// your_intrinsic.rs -#![feature(core_intrinsics)] - -fn main() { - use std::intrinsics::your_intrinsic; - - // Set up test values - let val = 42; - let result = your_intrinsic(&val); - - // Add assertion to verify behavior - assert!(result); -} -``` +Create a Rust test file in `kmir/src/tests/integration/data/exec-smir/intrinsic/` that uses your intrinsic and verifies its behavior with assertions. ### Step 2: Add Test to Integration Suite From 58de3ddd14068eb8f22c421de19b44d882b7d091 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Thu, 28 Aug 2025 12:42:41 +0800 Subject: [PATCH 14/27] docs: Simplify intrinsic implementation examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace detailed code examples with grep commands to find actual implementations. Point users to existing intrinsics as reference instead of generic examples. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- docs/dev/adding-intrinsics.md | 39 +++++++---------------------------- 1 file changed, 8 insertions(+), 31 deletions(-) diff --git a/docs/dev/adding-intrinsics.md b/docs/dev/adding-intrinsics.md index 39a43347c..d35082852 100644 --- a/docs/dev/adding-intrinsics.md +++ b/docs/dev/adding-intrinsics.md @@ -48,41 +48,18 @@ cp kmir/src/tests/integration/data/exec-smir/intrinsic/your_intrinsic.state \ ### Step 4: Implement K Semantics Rule -Add rules to [kmir.md](../../kmir/src/kmir/kdist/mir-semantics/kmir.md): +Add rules to [kmir.md](../../kmir/src/kmir/kdist/mir-semantics/kmir.md). -#### For Simple Value Operations: - -```k -rule #execIntrinsic(symbol("your_intrinsic"), ARG:Operand .Operands, PLACE) - => ARG ~> #setLocalValueFromK(PLACE) - ... +To find implementation patterns for your intrinsic: +```bash +# Search for existing intrinsic implementations +grep -A10 "#execIntrinsic(symbol" kmir/src/kmir/kdist/mir-semantics/kmir.md -syntax KItem ::= #setLocalValueFromK(Place) -rule VAL:Value ~> #setLocalValueFromK(PLACE) => #setLocalValue(PLACE, VAL) ... +# Look for helper functions and evaluation patterns +grep -B2 -A5 "seqstrict" kmir/src/kmir/kdist/mir-semantics/kmir.md ``` -#### For Operations Requiring Dereferencing: - -```k -// Use helper function to add dereferencing -syntax Operand ::= #withDeref(Operand) [function, total] -rule #withDeref(operandCopy(place(LOCAL, PROJ))) - => operandCopy(place(LOCAL, projectionElemDeref PROJ)) -rule #withDeref(operandMove(place(LOCAL, PROJ))) - => operandMove(place(LOCAL, projectionElemDeref PROJ)) -rule #withDeref(OP) => OP [owise] - -// Handle intrinsic with dereferencing -rule #execIntrinsic(symbol("your_intrinsic"), ARG1:Operand ARG2:Operand .Operands, PLACE) - => #execYourIntrinsic(PLACE, #withDeref(ARG1), #withDeref(ARG2)) - ... - -// Use seqstrict for automatic operand evaluation -syntax KItem ::= #execYourIntrinsic(Place, KItem, KItem) [seqstrict(2,3)] -rule #execYourIntrinsic(DEST, VAL1:Value, VAL2:Value) - => #setLocalValue(DEST, process(VAL1, VAL2)) - ... -``` +Study existing intrinsics like `black_box` (simple value operation) and `raw_eq` (reference dereferencing with helper functions) as reference implementations. ### Step 5: Add Documentation From 49f0c39e5174f4a16056160f69fd74a8ffcf2b61 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Thu, 28 Aug 2025 12:47:29 +0800 Subject: [PATCH 15/27] refactor: Simplify black_box intrinsic implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove unnecessary helper rule and use direct #setLocalValue(DEST, ARG). Add code style guideline in CLAUDE.md to prefer simple implementations. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- CLAUDE.md | 5 ++++- kmir/src/kmir/kdist/mir-semantics/kmir.md | 7 ++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index d9e55afaf..a0647b823 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -162,4 +162,7 @@ uv --directory kmir run kmir show proof_id --full-printer --no-omit-static-info ### Common Issues - `Function not found` errors: Check if function is in `FUNCTIONS_CELL` (may be intrinsic) - K compilation errors: Rules must be properly formatted, check syntax -- SMIR generation fails: Ensure using correct Rust nightly version (2024-11-29) \ No newline at end of file +- SMIR generation fails: Ensure using correct Rust nightly version (2024-11-29) + +## Code Style Guidelines +- **Intrinsic Rules**: Keep intrinsic implementations simple - use direct `#setLocalValue(DEST, ARG)` when possible instead of creating unnecessary helper rules \ No newline at end of file diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index c49bd62e2..6c0bee74f 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -629,12 +629,9 @@ its argument to the destination without modification. ```k // Black box intrinsic implementation - identity function - rule #execIntrinsic(symbol("black_box"), ARG:Operand .Operands, PLACE) - => ARG ~> #setLocalValueFromK(PLACE) + rule #execIntrinsic(symbol("black_box"), ARG:Operand .Operands, DEST) + => #setLocalValue(DEST, ARG) ... - - syntax KItem ::= #setLocalValueFromK(Place) - rule VAL:Value ~> #setLocalValueFromK(PLACE) => #setLocalValue(PLACE, VAL) ... ``` #### Raw Eq (`std::intrinsics::raw_eq`) From 65a20220c398d0f7a73fc4777dc534f47f578266 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Thu, 28 Aug 2025 12:52:12 +0800 Subject: [PATCH 16/27] docs: Remove redundant code style guideline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The guideline about referencing existing implementations is already covered in the 'Understand existing patterns' section of Development Workflow. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- CLAUDE.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index a0647b823..d9e55afaf 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -162,7 +162,4 @@ uv --directory kmir run kmir show proof_id --full-printer --no-omit-static-info ### Common Issues - `Function not found` errors: Check if function is in `FUNCTIONS_CELL` (may be intrinsic) - K compilation errors: Rules must be properly formatted, check syntax -- SMIR generation fails: Ensure using correct Rust nightly version (2024-11-29) - -## Code Style Guidelines -- **Intrinsic Rules**: Keep intrinsic implementations simple - use direct `#setLocalValue(DEST, ARG)` when possible instead of creating unnecessary helper rules \ No newline at end of file +- SMIR generation fails: Ensure using correct Rust nightly version (2024-11-29) \ No newline at end of file From 45322a441f98991e6f00a08f4c624802def7c2be Mon Sep 17 00:00:00 2001 From: Stevengre Date: Thu, 28 Aug 2025 13:19:19 +0800 Subject: [PATCH 17/27] updated expected --- .../show/checked_arithmetic-fail.checked_add_i32.expected | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kmir/src/tests/integration/data/prove-rs/show/checked_arithmetic-fail.checked_add_i32.expected b/kmir/src/tests/integration/data/prove-rs/show/checked_arithmetic-fail.checked_add_i32.expected index 1e964c2d7..d2e044be2 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/checked_arithmetic-fail.checked_add_i32.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/checked_arithmetic-fail.checked_add_i32.expected @@ -31,10 +31,9 @@ ├─ 5 │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 4 ) ) │ - │ (9 steps) + │ (7 steps) └─ 7 (stuck, leaf) - .List -~> #execIntrinsic ( symbol ( "cold_path" ) , place ( ... local: local ( 6 + #execIntrinsic ( symbol ( "cold_path" ) , .Operands , place ( ... local: local ( From f2fffcd225b8e97f970667674242de2278041ad0 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Wed, 3 Sep 2025 18:13:18 +0800 Subject: [PATCH 18/27] refactor: Update #withDeref rules to use appendP for projection elements --- kmir/src/kmir/kdist/mir-semantics/kmir.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 6c0bee74f..18f2bcb38 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -658,9 +658,9 @@ which will need to be addressed when such use cases are encountered. // Helper function to append projectionElemDeref to an operand syntax Operand ::= #withDeref(Operand) [function, total] rule #withDeref(operandCopy(place(LOCAL, PROJ))) - => operandCopy(place(LOCAL, projectionElemDeref PROJ)) + => operandCopy(place(LOCAL, appendP(PROJ, projectionElemDeref .ProjectionElems))) rule #withDeref(operandMove(place(LOCAL, PROJ))) - => operandMove(place(LOCAL, projectionElemDeref PROJ)) + => operandMove(place(LOCAL, appendP(PROJ, projectionElemDeref .ProjectionElems))) rule #withDeref(OP) => OP [owise] // Handle raw_eq intrinsic by dereferencing operands From d587a63726b5471a08ea9541f528ac2220194798 Mon Sep 17 00:00:00 2001 From: JianHong Zhao Date: Wed, 3 Sep 2025 18:13:59 +0800 Subject: [PATCH 19/27] Update kmir/src/kmir/kdist/mir-semantics/kmir.md Co-authored-by: Jost Berthold --- kmir/src/kmir/kdist/mir-semantics/kmir.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 18f2bcb38..07eaea037 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -669,7 +669,7 @@ which will need to be addressed when such use cases are encountered. ... // Execute raw_eq with operand evaluation via seqstrict - syntax KItem ::= #execRawEq(Place, KItem, KItem) [seqstrict(2,3)] + syntax KItem ::= #execRawEq(Place, Evaluation, Evaluation) [seqstrict(2,3)] rule #execRawEq(DEST, VAL1:Value, VAL2:Value) => #setLocalValue(DEST, BoolVal(VAL1 ==K VAL2)) ... From f31fa20f17be851c9f7e24befcca6be35b9554b0 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Wed, 3 Sep 2025 18:24:14 +0800 Subject: [PATCH 20/27] Update integration tests for raw_eq_simple: Adjust expected output values and refine state representation for improved accuracy. --- .../intrinsic/raw_eq_simple.smir.json | 2 +- .../exec-smir/intrinsic/raw_eq_simple.state | 369 +++++++++++++----- .../src/tests/integration/test_integration.py | 1 + 3 files changed, 280 insertions(+), 92 deletions(-) diff --git a/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.smir.json b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.smir.json index a4fd9d19d..8b0f08c2d 100644 --- a/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.smir.json @@ -1 +1 @@ -{"name":"raw_eq_simple","crate_id":6952967681419923239,"allocs":[[1,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,114,101,115,117,108,116],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h080d61aebc6fe980E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbf88d7319dcac5daE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hb3351458757bf72cE"}],[20,{"IntrinsicSym":"black_box"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h72b75dd84862c578E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h7d334358e0fd5d2bE"}],[25,{"IntrinsicSym":"raw_eq"}],[26,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}],[37,{"NoOpSym":""}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN13raw_eq_simple4main17h9f309d4e056bd9a1E","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":52,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":10}}}}]},"span":52},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":53,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":10}}}}]},"span":53},{"kind":{"Assign":[{"local":4,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":1,"projection":[]}]}]},"span":54},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[]}]}]},"span":55}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":50,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":9}}},"args":[{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":5,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Unreachable"}},"span":51}},{"statements":[],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":3}}},"span":56}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":57,"user_ty":null,"const_":{"kind":"ZeroSized","ty":26,"id":11}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":27,"id":12}}}],"destination":{"local":6,"projection":[]},"target":null,"unwind":"Continue"}},"span":57}},{"statements":[],"terminator":{"kind":"Return","span":58}}],"locals":[{"ty":1,"span":59,"mutability":"Mut"},{"ty":16,"span":60,"mutability":"Not"},{"ty":16,"span":61,"mutability":"Not"},{"ty":28,"span":62,"mutability":"Not"},{"ty":29,"span":54,"mutability":"Not"},{"ty":29,"span":55,"mutability":"Not"},{"ty":30,"span":57,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":60,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":61,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":62,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":63}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h0f972edf589c1802E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h7d334358e0fd5d2bE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h080d61aebc6fe980E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h45966598db2d3bf3E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h72b75dd84862c578E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hb3351458757bf72cE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hed6d62ab5cefa6e0E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbf88d7319dcac5daE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}}},"details":null}],"types":[[1,{"TupleType":{"types":[],"layout":{"fields":{"Arbitrary":{"offsets":[]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":1,"size":{"num_bits":0}}}}],[5,{"RefType":{"pointee_type":31,"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":64}]}},"variants":{"Single":{"index":0}},"abi":{"ScalarPair":[{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}},{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}]},"abi_align":8,"size":{"num_bits":128}}}}],[6,{"PrimitiveType":{"Int":"Isize"}}],[8,{"PtrType":{"pointee_type":32,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[9,{"PrimitiveType":{"Uint":"U8"}}],[10,{"EnumType":{"name":"std::result::Result","adt_def":12,"discriminants":[0,1],"fields":[[6],[30]],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I64","signed":true}},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[11,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[15,{"StructType":{"name":"std::sys::pal::unix::process::process_common::ExitCode","adt_def":18,"fields":[9],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[16,{"PrimitiveType":{"Int":"I32"}}],[17,{"StructType":{"name":"std::process::ExitCode","adt_def":16,"fields":[15],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[18,{"RefType":{"pointee_type":15,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[22,{"PtrType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[24,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[27,{"RefType":{"pointee_type":34,"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":64}]}},"variants":{"Single":{"index":0}},"abi":{"ScalarPair":[{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}},{"Initialized":{"value":{"Int":{"length":"I64","signed":false}},"valid_range":{"start":0,"end":18446744073709551615}}}]},"abi_align":8,"size":{"num_bits":128}}}}],[28,{"PrimitiveType":"Bool"}],[29,{"RefType":{"pointee_type":16,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[30,"VoidType"],[32,{"PtrType":{"pointee_type":9,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[33,{"RefType":{"pointee_type":35,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[34,{"PrimitiveType":"Str"}],[35,{"StructType":{"name":"std::panic::Location<'_>","adt_def":22,"fields":[27,36,36],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":128},{"num_bits":160}]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":8,"size":{"num_bits":192}}}}],[36,{"PrimitiveType":{"Uint":"U32"}}]],"spans":[[0,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,194,36]],[1,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,199,6]],[2,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,9,195,93]],[3,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,10,195,93]],[4,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",201,2,201,2]],[5,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,5,199,6]],[6,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,12,194,13]],[7,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,6,199,7]],[9,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",189,5,189,9]],[10,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",190,5,190,9]],[11,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",191,5,191,9]],[12,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",192,5,192,12]],[13,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",188,1,201,2]],[14,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,69]],[15,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,75]],[16,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,84]],[17,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,70,195,74]],[18,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,76,195,82]],[19,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,74,195,75]],[20,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,93,195,93]],[21,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,83,195,84]],[22,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,9,2053,15]],[23,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,15]],[24,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,22]],[25,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,21,636,22]],[26,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,23,2053,24]],[27,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,92,195,93]],[29,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2052,19,2052,23]],[30,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",635,19,635,24]],[31,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,19]],[32,["no-location",0,0,0,0]],[33,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,21]],[34,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,33]],[35,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,40]],[36,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",160,2,160,2]],[38,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,43,150,44]],[40,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,9,154,15]],[41,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",388,27,388,32]],[42,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,1,160,2]],[43,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs",250,5,250,71]],[44,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs",521,1,521,56]],[45,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2424,6,2424,6]],[46,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2423,9,2423,26]],[48,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,15,2422,19]],[49,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,5,2424,6]],[50,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",10,27,10,33]],[51,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",10,27,10,41]],[52,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",6,13,6,15]],[53,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",7,13,7,15]],[54,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",10,34,10,36]],[55,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",10,38,10,40]],[56,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",13,13,13,19]],[57,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",13,5,13,20]],[58,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",14,2,14,2]],[60,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",6,9,6,10]],[61,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",7,9,7,10]],[62,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",10,9,10,15]],[63,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",5,1,14,2]]],"debug":null,"machine":{"endian":"Little","pointer_width":{"num_bits":64}}} \ No newline at end of file +{"name":"raw_eq_simple","crate_id":6952967681419923239,"allocs":[[1,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,114,101,115,117,108,116],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h080d61aebc6fe980E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbf88d7319dcac5daE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hb3351458757bf72cE"}],[20,{"IntrinsicSym":"black_box"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h72b75dd84862c578E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h7d334358e0fd5d2bE"}],[25,{"IntrinsicSym":"raw_eq"}],[26,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}],[31,{"NoOpSym":""}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN13raw_eq_simple4main17h9f309d4e056bd9a1E","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":52,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":10}}}}]},"span":52},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":53,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":10}}}}]},"span":53},{"kind":{"Assign":[{"local":4,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":1,"projection":[]}]}]},"span":54},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[]}]}]},"span":55}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":50,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":9}}},"args":[{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":5,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Unreachable"}},"span":51}},{"statements":[],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":3}}},"span":56}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":57,"user_ty":null,"const_":{"kind":"ZeroSized","ty":26,"id":11}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":27,"id":12}}}],"destination":{"local":6,"projection":[]},"target":null,"unwind":"Continue"}},"span":57}},{"statements":[],"terminator":{"kind":"Return","span":58}}],"locals":[{"ty":1,"span":59,"mutability":"Mut"},{"ty":16,"span":60,"mutability":"Not"},{"ty":16,"span":61,"mutability":"Not"},{"ty":28,"span":62,"mutability":"Not"},{"ty":29,"span":54,"mutability":"Not"},{"ty":29,"span":55,"mutability":"Not"},{"ty":30,"span":57,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":60,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":61,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":62,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":63}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h0f972edf589c1802E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h7d334358e0fd5d2bE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h080d61aebc6fe980E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h45966598db2d3bf3E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h72b75dd84862c578E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hb3351458757bf72cE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hed6d62ab5cefa6e0E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbf88d7319dcac5daE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}}},"details":null}],"types":[[1,{"TupleType":{"types":[],"layout":{"fields":{"Arbitrary":{"offsets":[]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":1,"size":{"num_bits":0}}}}],[5,{"RefType":{"pointee_type":32,"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":64}]}},"variants":{"Single":{"index":0}},"abi":{"ScalarPair":[{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}},{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}]},"abi_align":8,"size":{"num_bits":128}}}}],[6,{"PrimitiveType":{"Int":"Isize"}}],[8,{"PtrType":{"pointee_type":33,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[9,{"PrimitiveType":{"Uint":"U8"}}],[10,{"EnumType":{"name":"std::result::Result","adt_def":14,"discriminants":[0,1],"fields":[[6],[30]],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I64","signed":true}},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[11,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[15,{"StructType":{"name":"std::sys::pal::unix::process::process_common::ExitCode","adt_def":26,"fields":[9],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[16,{"PrimitiveType":{"Int":"I32"}}],[17,{"StructType":{"name":"std::process::ExitCode","adt_def":24,"fields":[15],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[18,{"RefType":{"pointee_type":15,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[22,{"PtrType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[24,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[27,{"RefType":{"pointee_type":35,"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":64}]}},"variants":{"Single":{"index":0}},"abi":{"ScalarPair":[{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}},{"Initialized":{"value":{"Int":{"length":"I64","signed":false}},"valid_range":{"start":0,"end":18446744073709551615}}}]},"abi_align":8,"size":{"num_bits":128}}}}],[28,{"PrimitiveType":"Bool"}],[29,{"RefType":{"pointee_type":16,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[30,"VoidType"],[33,{"PtrType":{"pointee_type":9,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[34,{"RefType":{"pointee_type":36,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[35,{"PrimitiveType":"Str"}],[36,{"StructType":{"name":"std::panic::Location<'_>","adt_def":19,"fields":[27,37,37],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":128},{"num_bits":160}]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":8,"size":{"num_bits":192}}}}],[37,{"PrimitiveType":{"Uint":"U32"}}]],"spans":[[0,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,194,36]],[1,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,199,6]],[2,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,9,195,93]],[3,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,10,195,93]],[4,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",201,2,201,2]],[5,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,5,199,6]],[6,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,12,194,13]],[7,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,6,199,7]],[9,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",189,5,189,9]],[10,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",190,5,190,9]],[11,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",191,5,191,9]],[12,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",192,5,192,12]],[13,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",188,1,201,2]],[14,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,69]],[15,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,75]],[16,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,84]],[17,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,70,195,74]],[18,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,76,195,82]],[19,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,74,195,75]],[20,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,93,195,93]],[21,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,83,195,84]],[22,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,9,2053,15]],[23,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,15]],[24,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,22]],[25,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,21,636,22]],[26,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,23,2053,24]],[27,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,92,195,93]],[29,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2052,19,2052,23]],[30,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",635,19,635,24]],[31,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,19]],[32,["no-location",0,0,0,0]],[33,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,21]],[34,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,33]],[35,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,40]],[36,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",160,2,160,2]],[38,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,43,150,44]],[40,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,9,154,15]],[41,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",388,27,388,32]],[42,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,1,160,2]],[43,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs",250,5,250,71]],[44,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs",521,1,521,56]],[45,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2424,6,2424,6]],[46,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2423,9,2423,26]],[48,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,15,2422,19]],[49,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,5,2424,6]],[50,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",15,27,15,33]],[51,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",15,27,15,41]],[52,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",11,13,11,15]],[53,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",12,13,12,15]],[54,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",15,34,15,36]],[55,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",15,38,15,40]],[56,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",18,13,18,19]],[57,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",18,5,18,20]],[58,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",19,2,19,2]],[60,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",11,9,11,10]],[61,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",12,9,12,10]],[62,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",15,9,15,15]],[63,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",10,1,19,2]]],"debug":null,"machine":{"endian":"Little","pointer_width":{"num_bits":64}}} \ 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 de64ce198..833ccac7f 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 @@ -1,91 +1,278 @@ - - - #execBlock ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) ) ~> .K - - - noReturn - - - ty ( 25 ) - - - - ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) ) - - - ty ( -1 ) - - - place (... local: local ( 3 ) , projection: .ProjectionElems ) - - - someBasicBlockIdx ( basicBlockIdx ( 1 ) ) - - - unwindActionUnreachable - - - 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 , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) - - - - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , noBasicBlockIdx , 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 ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - - .Map - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 25 ) |-> IntrinsicFunction ( symbol ( "raw_eq" ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 31 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 32 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 12 ) , Discriminant ( 0 ) Discriminant ( 1 ) .Discriminants ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 18 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 16 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 27 ) |-> typeInfoRefType ( ty ( 34 ) ) - ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 29 ) |-> typeInfoRefType ( ty ( 16 ) ) - ty ( 30 ) |-> typeInfoVoidType - ty ( 32 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 33 ) |-> typeInfoRefType ( ty ( 35 ) ) - ty ( 34 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 35 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 22 ) , ty ( 27 ) ty ( 36 ) ty ( 36 ) .Tys ) - ty ( 36 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - - - adtDef ( 12 ) |-> ty ( 10 ) - adtDef ( 16 ) |-> ty ( 17 ) - adtDef ( 18 ) |-> ty ( 15 ) - adtDef ( 22 ) |-> ty ( 35 ) - - \ No newline at end of file + #Not ( { + false + #Equals + #switchMatch ( 0 , thunk ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) + } ) + #And + #Not ( { + true + #Equals + #switchMatch ( 0 , thunk ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) + } ) + #And + + + #selectBlock ( switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) , thunk ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) ~> .K + + + noReturn + + + ty ( -1 ) + + + + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) ) + + + ty ( -1 ) + + + place (... local: local ( 0 ) , projection: .ProjectionElems ) + + + noBasicBlockIdx + + + 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 ( newLocal ( ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) + + + + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + + .Map + + + ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) + ty ( 25 ) |-> IntrinsicFunction ( symbol ( "raw_eq" ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) + + + symbol ( "main" ) + + + ty ( 1 ) |-> typeInfoTupleType ( .Tys ) + ty ( 5 ) |-> typeInfoRefType ( ty ( 32 ) ) + ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) + ty ( 8 ) |-> typeInfoPtrType ( ty ( 33 ) ) + ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) + ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 14 ) , Discriminant ( 0 ) Discriminant ( 1 ) .Discriminants ) + ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) + ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 26 ) , ty ( 9 ) .Tys ) + ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) + ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 24 ) , ty ( 15 ) .Tys ) + ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) + ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) + ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) + ty ( 27 ) |-> typeInfoRefType ( ty ( 35 ) ) + ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeBool ) + ty ( 29 ) |-> typeInfoRefType ( ty ( 16 ) ) + ty ( 30 ) |-> typeInfoVoidType + ty ( 33 ) |-> typeInfoPtrType ( ty ( 9 ) ) + ty ( 34 ) |-> typeInfoRefType ( ty ( 36 ) ) + ty ( 35 ) |-> typeInfoPrimitiveType ( primTypeStr ) + ty ( 36 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 19 ) , ty ( 27 ) ty ( 37 ) ty ( 37 ) .Tys ) + ty ( 37 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) + + + adtDef ( 14 ) |-> ty ( 10 ) + adtDef ( 19 ) |-> ty ( 36 ) + adtDef ( 24 ) |-> ty ( 17 ) + adtDef ( 26 ) |-> ty ( 15 ) + + +#Or + + + #EndProgram ~> .K + + + noReturn + + + ty ( -1 ) + + + + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) ) + + + ty ( -1 ) + + + place (... local: local ( 0 ) , projection: .ProjectionElems ) + + + noBasicBlockIdx + + + 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 ( newLocal ( ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) + + + + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + + .Map + + + ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) + ty ( 25 ) |-> IntrinsicFunction ( symbol ( "raw_eq" ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) + + + symbol ( "main" ) + + + ty ( 1 ) |-> typeInfoTupleType ( .Tys ) + ty ( 5 ) |-> typeInfoRefType ( ty ( 32 ) ) + ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) + ty ( 8 ) |-> typeInfoPtrType ( ty ( 33 ) ) + ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) + ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 14 ) , Discriminant ( 0 ) Discriminant ( 1 ) .Discriminants ) + ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) + ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 26 ) , ty ( 9 ) .Tys ) + ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) + ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 24 ) , ty ( 15 ) .Tys ) + ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) + ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) + ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) + ty ( 27 ) |-> typeInfoRefType ( ty ( 35 ) ) + ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeBool ) + ty ( 29 ) |-> typeInfoRefType ( ty ( 16 ) ) + ty ( 30 ) |-> typeInfoVoidType + ty ( 33 ) |-> typeInfoPtrType ( ty ( 9 ) ) + ty ( 34 ) |-> typeInfoRefType ( ty ( 36 ) ) + ty ( 35 ) |-> typeInfoPrimitiveType ( primTypeStr ) + ty ( 36 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 19 ) , ty ( 27 ) ty ( 37 ) ty ( 37 ) .Tys ) + ty ( 37 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) + + + adtDef ( 14 ) |-> ty ( 10 ) + adtDef ( 19 ) |-> ty ( 36 ) + adtDef ( 24 ) |-> ty ( 17 ) + adtDef ( 26 ) |-> ty ( 15 ) + + + #And + { + false + #Equals + #switchMatch ( 0 , thunk ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) + } +#Or + + + #execTerminator ( terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) ~> .K + + + noReturn + + + ty ( -1 ) + + + + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) ) + + + ty ( -1 ) + + + place (... local: local ( 0 ) , projection: .ProjectionElems ) + + + noBasicBlockIdx + + + 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 ( newLocal ( ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) + + + + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + + .Map + + + ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) + ty ( 25 ) |-> IntrinsicFunction ( symbol ( "raw_eq" ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) + + + symbol ( "main" ) + + + ty ( 1 ) |-> typeInfoTupleType ( .Tys ) + ty ( 5 ) |-> typeInfoRefType ( ty ( 32 ) ) + ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) + ty ( 8 ) |-> typeInfoPtrType ( ty ( 33 ) ) + ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) + ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 14 ) , Discriminant ( 0 ) Discriminant ( 1 ) .Discriminants ) + ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) + ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 26 ) , ty ( 9 ) .Tys ) + ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) + ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 24 ) , ty ( 15 ) .Tys ) + ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) + ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) + ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) + ty ( 27 ) |-> typeInfoRefType ( ty ( 35 ) ) + ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeBool ) + ty ( 29 ) |-> typeInfoRefType ( ty ( 16 ) ) + ty ( 30 ) |-> typeInfoVoidType + ty ( 33 ) |-> typeInfoPtrType ( ty ( 9 ) ) + ty ( 34 ) |-> typeInfoRefType ( ty ( 36 ) ) + ty ( 35 ) |-> typeInfoPrimitiveType ( primTypeStr ) + ty ( 36 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 19 ) , ty ( 27 ) ty ( 37 ) ty ( 37 ) .Tys ) + ty ( 37 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) + + + adtDef ( 14 ) |-> ty ( 10 ) + adtDef ( 19 ) |-> ty ( 36 ) + adtDef ( 24 ) |-> ty ( 17 ) + adtDef ( 26 ) |-> ty ( 15 ) + + + #And + { + true + #Equals + #switchMatch ( 0 , thunk ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) + } \ No newline at end of file diff --git a/kmir/src/tests/integration/test_integration.py b/kmir/src/tests/integration/test_integration.py index 85dc1f1ad..ad9322c4a 100644 --- a/kmir/src/tests/integration/test_integration.py +++ b/kmir/src/tests/integration/test_integration.py @@ -299,6 +299,7 @@ def test_crate_examples(main_crate: Path, kmir: KMIR, update_expected_output: bo 'raw_eq_simple', EXEC_DATA_DIR / 'intrinsic' / 'raw_eq_simple.smir.json', EXEC_DATA_DIR / 'intrinsic' / 'raw_eq_simple.state', + # 1000, 65, ), ] From 78ba7044f4842114b386b188369edebc6bd6aa9e Mon Sep 17 00:00:00 2001 From: Stevengre Date: Thu, 11 Sep 2025 17:19:11 +0800 Subject: [PATCH 21/27] optimize: Implement performance optimization for intrinsic function calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add dual-path execution for terminatorKindCall: separate handling for intrinsic vs regular functions - Intrinsic functions now bypass full function call setup (no currentFunc switching, stack operations) - Use pattern matching in function configuration to avoid requires clause complexity - Add #continueAt helper for clean target handling (someBasicBlockIdx/noBasicBlockIdx) - Update intrinsic implementations to use MonoItemKind parameter signature - Maintain backward compatibility for regular function calls with general TARGET handling This optimization reduces unnecessary state changes for intrinsic functions while preserving the comprehensive type safety checks and multi-stage evaluation approach for raw_eq. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- kmir/src/kmir/kdist/mir-semantics/kmir.md | 116 ++++-- .../exec-smir/intrinsic/raw_eq_simple.state | 362 ++++-------------- 2 files changed, 171 insertions(+), 307 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 07eaea037..11bfc70a7 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -459,9 +459,19 @@ where the returned result should go. ```k + // Intrinsic function call - execute directly without state switching + rule #execTerminator(terminator(terminatorKindCall(FUNC, ARGS, DEST, TARGET, _UNWIND), _SPAN)) ~> _ + => + #execIntrinsic(MONOITEM, ARGS, DEST) ~> #continueAt(TARGET) + + ... #tyOfCall(FUNC) |-> MONOITEM:MonoItemKind ... + requires isIntrinsicFunction(MONOITEM) + [preserves-definedness] + + // Regular function call - full state switching and stack setup rule #execTerminator(terminator(terminatorKindCall(FUNC, ARGS, DEST, TARGET, UNWIND), _SPAN)) ~> _ => - #setUpCalleeData({FUNCTIONS[#tyOfCall(FUNC)]}:>MonoItemKind, ARGS) + #setUpCalleeData(MONOITEM, ARGS) CALLER => #tyOfCall(FUNC) @@ -473,10 +483,18 @@ where the returned result should go. LOCALS STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK - FUNCTIONS - requires #tyOfCall(FUNC) in_keys(FUNCTIONS) - andBool isMonoItemKind(FUNCTIONS[#tyOfCall(FUNC)]) + ... #tyOfCall(FUNC) |-> MONOITEM:MonoItemKind ... + requires isMonoItemKind(MONOITEM) + andBool notBool isIntrinsicFunction(MONOITEM) [preserves-definedness] // callee lookup defined + + syntax Bool ::= isIntrinsicFunction(MonoItemKind) [function] + rule isIntrinsicFunction(IntrinsicFunction(_)) => true + rule isIntrinsicFunction(_) => false [owise] + + syntax KItem ::= #continueAt(MaybeBasicBlockIdx) + rule #continueAt(someBasicBlockIdx(TARGET)) => #execBlockIdx(TARGET) ... + rule #continueAt(noBasicBlockIdx) => .K ... syntax Ty ::= #tyOfCall( Operand ) [function, total] @@ -513,19 +531,10 @@ An operand may be a `Reference` (the only way a function could access another fu // TODO: Haven't handled "noBody" case - // Handle intrinsic functions - execute directly without setting up local stack frame - rule #setUpCalleeData(IntrinsicFunction(INTRINSIC_NAME), ARGS) - => #execIntrinsic(INTRINSIC_NAME, ARGS, DEST) ~> #execBlockIdx(RETURN_TARGET) - - - DEST - someBasicBlockIdx(RETURN_TARGET) - ... - syntax KItem ::= #setArgsFromStack ( Int, Operands) | #setArgFromStack ( Int, Operand) - | #execIntrinsic ( Symbol, Operands, Place ) + | #execIntrinsic ( MonoItemKind, Operands, Place ) // once all arguments have been retrieved, execute rule #setArgsFromStack(_, .Operands) ~> CONT => CONT @@ -629,7 +638,7 @@ its argument to the destination without modification. ```k // Black box intrinsic implementation - identity function - rule #execIntrinsic(symbol("black_box"), ARG:Operand .Operands, DEST) + rule #execIntrinsic(IntrinsicFunction(symbol("black_box")), ARG:Operand .Operands, DEST) => #setLocalValue(DEST, ARG) ... ``` @@ -642,15 +651,26 @@ provided References to access the underlying values, then compares them using K' This intrinsic is typically used for low-level memory comparison operations where type-specific equality methods are not suitable. -**Current Limitations:** -The current implementation only handles the simple case where References point to values of the same type. -More complex scenarios require additional testing and implementation work: -- References to different types with the same memory representation -- References to composite types (structs, arrays, enums) -- References with different alignments or padding +**Type Safety:** +The implementation now includes comprehensive type compatibility checking using the existing `#typesCompatible` function. +This ensures that `raw_eq` only compares values of compatible types, supporting: +- Identical types (direct equality) +- Array types with compatible element types (ignoring length differences) +- Pointer types with compatible pointee types (recursive checking) +- Pointer-to-array and pointer-to-element compatibility + +**Error Handling:** +- Execution gets stuck (no matching rule) when operands have incompatible types or unknown type information +- This causes K to stop execution, which is the desired behavior for type safety violations + +**Implementation Details:** +The intrinsic uses a multi-stage approach: +1. `#execIntrinsic` → `#execRawEqWithTypes` - Extract operand type information before evaluation +2. `#execRawEqWithTypes` → `#execRawEqTyped` - Pass both values and their types +3. `#execRawEqTyped` - Perform type compatibility check and comparison -Handling different types may require converting values to their byte representations before comparison, -which will need to be addressed when such use cases are encountered. +This approach preserves type information throughout the evaluation process, preventing the type loss that occurred +in the previous implementation where `seqstrict` evaluation converted `TypedValue` to `Value`. ```k // Raw eq intrinsic - byte-by-byte equality comparison of referenced values @@ -663,16 +683,54 @@ which will need to be addressed when such use cases are encountered. => operandMove(place(LOCAL, appendP(PROJ, projectionElemDeref .ProjectionElems))) rule #withDeref(OP) => OP [owise] - // Handle raw_eq intrinsic by dereferencing operands - rule #execIntrinsic(symbol("raw_eq"), ARG1:Operand ARG2:Operand .Operands, PLACE) - => #execRawEq(PLACE, #withDeref(ARG1), #withDeref(ARG2)) + // Handle raw_eq intrinsic by dereferencing operands with type checking + rule #execIntrinsic(IntrinsicFunction(symbol("raw_eq")), ARG1:Operand ARG2:Operand .Operands, PLACE) + => #execRawEqWithTypes(PLACE, #withDeref(ARG1), #withDeref(ARG2)) ... - // Execute raw_eq with operand evaluation via seqstrict - syntax KItem ::= #execRawEq(Place, Evaluation, Evaluation) [seqstrict(2,3)] - rule #execRawEq(DEST, VAL1:Value, VAL2:Value) + // Execute raw_eq with type-aware operand handling + // NOTE: Uses parameter passing for simplification - future optimization could inline the logic + syntax KItem ::= #execRawEqWithTypes(Place, Operand, Operand) + rule #execRawEqWithTypes(DEST, OP1, OP2) + => #execRawEqWithTypesAux(DEST, OP1, OP2, LOCALS, TYPEMAP) + ... + LOCALS + TYPEMAP + + syntax KItem ::= #execRawEqWithTypesAux(Place, Operand, Operand, List, Map) + rule #execRawEqWithTypesAux(DEST, OP1, OP2, LOCALS, TYPEMAP) + => #execRawEqTyped(DEST, OP1, #extractOperandType(OP1, LOCALS, TYPEMAP), + OP2, #extractOperandType(OP2, LOCALS, TYPEMAP)) + ... + + // Helper function to extract type information from operands + syntax MaybeTy ::= #extractOperandType(Operand, List, Map) [function, total] + rule #extractOperandType(operandCopy(place(local(I), PROJS)), LOCALS, TYPEMAP) + => getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS, TYPEMAP) + requires 0 <=Int I andBool I getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS, TYPEMAP) + requires 0 <=Int I andBool I TyUnknown [owise] + + // Execute raw_eq with type compatibility checking + syntax KItem ::= #execRawEqTyped(Place, Evaluation, MaybeTy, Evaluation, MaybeTy) [seqstrict(2,4)] + rule #execRawEqTyped(DEST, VAL1:Value, TY1:Ty, VAL2:Value, TY2:Ty) => #setLocalValue(DEST, BoolVal(VAL1 ==K VAL2)) ... + TYPEMAP + requires #typesCompatible({TYPEMAP[TY1]}:>TypeInfo, {TYPEMAP[TY2]}:>TypeInfo, TYPEMAP) + andBool TY1 in_keys(TYPEMAP) + andBool TY2 in_keys(TYPEMAP) + [preserves-definedness] + + // Note: If types are incompatible or unknown, execution will get stuck (no matching rule), + // which causes K to stop execution - this is the desired behavior for type safety violations ``` 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 833ccac7f..610b962ad 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 @@ -1,278 +1,84 @@ - #Not ( { - false - #Equals - #switchMatch ( 0 , thunk ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) - } ) - #And - #Not ( { - true - #Equals - #switchMatch ( 0 , thunk ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) - } ) - #And - - - #selectBlock ( switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) , thunk ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) ~> .K - - - noReturn - - - ty ( -1 ) - - - - ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) ) - - - ty ( -1 ) - - - place (... local: local ( 0 ) , projection: .ProjectionElems ) - - - noBasicBlockIdx - - - 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 ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) - - - - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - - .Map - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 25 ) |-> IntrinsicFunction ( symbol ( "raw_eq" ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 32 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 33 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 14 ) , Discriminant ( 0 ) Discriminant ( 1 ) .Discriminants ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 26 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 24 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 27 ) |-> typeInfoRefType ( ty ( 35 ) ) - ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 29 ) |-> typeInfoRefType ( ty ( 16 ) ) - ty ( 30 ) |-> typeInfoVoidType - ty ( 33 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 34 ) |-> typeInfoRefType ( ty ( 36 ) ) - ty ( 35 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 36 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 19 ) , ty ( 27 ) ty ( 37 ) ty ( 37 ) .Tys ) - ty ( 37 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - - - adtDef ( 14 ) |-> ty ( 10 ) - adtDef ( 19 ) |-> ty ( 36 ) - adtDef ( 24 ) |-> ty ( 17 ) - adtDef ( 26 ) |-> ty ( 15 ) - - -#Or - - - #EndProgram ~> .K - - - noReturn - - - ty ( -1 ) - - - - ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) ) - - - ty ( -1 ) - - - place (... local: local ( 0 ) , projection: .ProjectionElems ) - - - noBasicBlockIdx - - - 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 ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) - - - - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - - .Map - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 25 ) |-> IntrinsicFunction ( symbol ( "raw_eq" ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 32 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 33 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 14 ) , Discriminant ( 0 ) Discriminant ( 1 ) .Discriminants ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 26 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 24 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 27 ) |-> typeInfoRefType ( ty ( 35 ) ) - ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 29 ) |-> typeInfoRefType ( ty ( 16 ) ) - ty ( 30 ) |-> typeInfoVoidType - ty ( 33 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 34 ) |-> typeInfoRefType ( ty ( 36 ) ) - ty ( 35 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 36 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 19 ) , ty ( 27 ) ty ( 37 ) ty ( 37 ) .Tys ) - ty ( 37 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - - - adtDef ( 14 ) |-> ty ( 10 ) - adtDef ( 19 ) |-> ty ( 36 ) - adtDef ( 24 ) |-> ty ( 17 ) - adtDef ( 26 ) |-> ty ( 15 ) - - - #And - { - false - #Equals - #switchMatch ( 0 , thunk ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) - } -#Or - - - #execTerminator ( terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) ~> .K - - - noReturn - - - ty ( -1 ) - - - - ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) ) - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) ) - - - ty ( -1 ) - - - place (... local: local ( 0 ) , projection: .ProjectionElems ) - - - noBasicBlockIdx - - - 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 ( newLocal ( ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) - - - - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) - - - .Map - - - ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) - ty ( 25 ) |-> IntrinsicFunction ( symbol ( "raw_eq" ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) - - - symbol ( "main" ) - - - ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 32 ) ) - ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 33 ) ) - ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 14 ) , Discriminant ( 0 ) Discriminant ( 1 ) .Discriminants ) - ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 26 ) , ty ( 9 ) .Tys ) - ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 24 ) , ty ( 15 ) .Tys ) - ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) - ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) - ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 27 ) |-> typeInfoRefType ( ty ( 35 ) ) - ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeBool ) - ty ( 29 ) |-> typeInfoRefType ( ty ( 16 ) ) - ty ( 30 ) |-> typeInfoVoidType - ty ( 33 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 34 ) |-> typeInfoRefType ( ty ( 36 ) ) - ty ( 35 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 36 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 19 ) , ty ( 27 ) ty ( 37 ) ty ( 37 ) .Tys ) - ty ( 37 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - - - adtDef ( 14 ) |-> ty ( 10 ) - adtDef ( 19 ) |-> ty ( 36 ) - adtDef ( 24 ) |-> ty ( 17 ) - adtDef ( 26 ) |-> ty ( 15 ) - - - #And - { - true - #Equals - #switchMatch ( 0 , thunk ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) - } \ No newline at end of file + + + #EndProgram ~> .K + + + noReturn + + + ty ( -1 ) + + + + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) ) + + + ty ( -1 ) + + + place (... local: local ( 0 ) , projection: .ProjectionElems ) + + + noBasicBlockIdx + + + 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 , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot , noMetadata ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) + + + + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , .List ) ) + + + .Map + + + ty ( 20 ) |-> IntrinsicFunction ( symbol ( "black_box" ) ) + ty ( 25 ) |-> IntrinsicFunction ( symbol ( "raw_eq" ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionUnreachable ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 58 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) + + + symbol ( "main" ) + + + ty ( 1 ) |-> typeInfoTupleType ( .Tys ) + ty ( 5 ) |-> typeInfoRefType ( ty ( 32 ) ) + ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) + ty ( 8 ) |-> typeInfoPtrType ( ty ( 33 ) ) + ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) + ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 14 ) , Discriminant ( 0 ) Discriminant ( 1 ) .Discriminants ) + ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) + ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 26 ) , ty ( 9 ) .Tys ) + ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) + ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 24 ) , ty ( 15 ) .Tys ) + ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) + ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) + ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) + ty ( 27 ) |-> typeInfoRefType ( ty ( 35 ) ) + ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeBool ) + ty ( 29 ) |-> typeInfoRefType ( ty ( 16 ) ) + ty ( 30 ) |-> typeInfoVoidType + ty ( 33 ) |-> typeInfoPtrType ( ty ( 9 ) ) + ty ( 34 ) |-> typeInfoRefType ( ty ( 36 ) ) + ty ( 35 ) |-> typeInfoPrimitiveType ( primTypeStr ) + ty ( 36 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 19 ) , ty ( 27 ) ty ( 37 ) ty ( 37 ) .Tys ) + ty ( 37 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) + + + adtDef ( 14 ) |-> ty ( 10 ) + adtDef ( 19 ) |-> ty ( 36 ) + adtDef ( 24 ) |-> ty ( 17 ) + adtDef ( 26 ) |-> ty ( 15 ) + + \ No newline at end of file From 40bb382bff98f5affc63bcf8dd95640012ef8863 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Thu, 11 Sep 2025 17:26:06 +0800 Subject: [PATCH 22/27] test: Update raw_eq_simple execution step limit to 100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adjust step limit from 65 to 100 to accommodate the optimized intrinsic execution path. The optimization changes the execution flow, requiring more steps to reach completion. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- kmir/src/tests/integration/test_integration.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kmir/src/tests/integration/test_integration.py b/kmir/src/tests/integration/test_integration.py index ad9322c4a..948dd5f1e 100644 --- a/kmir/src/tests/integration/test_integration.py +++ b/kmir/src/tests/integration/test_integration.py @@ -299,8 +299,7 @@ def test_crate_examples(main_crate: Path, kmir: KMIR, update_expected_output: bo 'raw_eq_simple', EXEC_DATA_DIR / 'intrinsic' / 'raw_eq_simple.smir.json', EXEC_DATA_DIR / 'intrinsic' / 'raw_eq_simple.state', - # 1000, - 65, + 100, ), ] From 7da5f15208f81af3779585e0274e0d35413941f0 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Thu, 11 Sep 2025 17:47:15 +0800 Subject: [PATCH 23/27] docs: Update adding-intrinsics.md for optimized intrinsic execution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update function signature to IntrinsicFunction(symbol("name")) - Update grep command for searching intrinsic implementations - Update expected stuck state format in development workflow - Reflect architectural changes from intrinsic optimization 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- docs/dev/adding-intrinsics.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/dev/adding-intrinsics.md b/docs/dev/adding-intrinsics.md index d35082852..656840f28 100644 --- a/docs/dev/adding-intrinsics.md +++ b/docs/dev/adding-intrinsics.md @@ -6,8 +6,8 @@ This guide explains how to add support for new intrinsic functions in KMIR. Intr ## Architecture -Intrinsics are handled with direct operand passing: -1. **Direct Operand Passing**: `#execIntrinsic(symbol("name"), ARGS, DEST)` receives operands directly +Intrinsics use optimized execution: +1. **Direct Execution**: `#execIntrinsic(IntrinsicFunction(symbol("name")), ARGS, DEST)` bypasses regular function call setup 2. **Pattern Matching**: Rules match on specific operand patterns for each intrinsic 3. **Operand Evaluation**: Each intrinsic rule handles its own operand evaluation as needed @@ -39,7 +39,7 @@ Add entry to `EXEC_DATA` in [test_integration.py](../../kmir/src/tests/integrati make test-integration TEST_ARGS="-k 'exec_smir and your_intrinsic' --update-expected-output" # This will create your_intrinsic.state showing execution stuck at: -# #execIntrinsic(symbol("your_intrinsic"), DEST) +# #execIntrinsic(IntrinsicFunction(symbol("your_intrinsic")), ARGS, DEST) # Save this for comparison cp kmir/src/tests/integration/data/exec-smir/intrinsic/your_intrinsic.state \ @@ -53,7 +53,7 @@ Add rules to [kmir.md](../../kmir/src/kmir/kdist/mir-semantics/kmir.md). To find implementation patterns for your intrinsic: ```bash # Search for existing intrinsic implementations -grep -A10 "#execIntrinsic(symbol" kmir/src/kmir/kdist/mir-semantics/kmir.md +grep -A10 "#execIntrinsic(IntrinsicFunction" kmir/src/kmir/kdist/mir-semantics/kmir.md # Look for helper functions and evaluation patterns grep -B2 -A5 "seqstrict" kmir/src/kmir/kdist/mir-semantics/kmir.md From 48ee1fdfc6f612df620ad6f0e9ec2ee228c62bde Mon Sep 17 00:00:00 2001 From: Stevengre Date: Thu, 11 Sep 2025 18:01:08 +0800 Subject: [PATCH 24/27] refactor: Simplify raw_eq type checking to strict type equality MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace complex #typesCompatible check with simple TY1 ==K TY2 equality - Remove TYPEMAP dependency from #execRawEqTyped rule - Comment out original type compatibility logic for future reference - Enforce stricter type safety: operands must have identical types This simplification improves performance while maintaining type safety through exact type matching rather than compatibility checking. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- kmir/src/kmir/kdist/mir-semantics/kmir.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 11bfc70a7..429770d92 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -718,15 +718,15 @@ in the previous implementation where `seqstrict` evaluation converted `TypedValu // Fallback for operands that don't match the expected patterns (constants, etc.) rule #extractOperandType(_, _, _) => TyUnknown [owise] - // Execute raw_eq with type compatibility checking + // Execute raw_eq with type equality checking syntax KItem ::= #execRawEqTyped(Place, Evaluation, MaybeTy, Evaluation, MaybeTy) [seqstrict(2,4)] rule #execRawEqTyped(DEST, VAL1:Value, TY1:Ty, VAL2:Value, TY2:Ty) => #setLocalValue(DEST, BoolVal(VAL1 ==K VAL2)) ... - TYPEMAP - requires #typesCompatible({TYPEMAP[TY1]}:>TypeInfo, {TYPEMAP[TY2]}:>TypeInfo, TYPEMAP) - andBool TY1 in_keys(TYPEMAP) - andBool TY2 in_keys(TYPEMAP) + requires TY1 ==K TY2 + // requires #typesCompatible({TYPEMAP[TY1]}:>TypeInfo, {TYPEMAP[TY2]}:>TypeInfo, TYPEMAP) + // andBool TY1 in_keys(TYPEMAP) + // andBool TY2 in_keys(TYPEMAP) [preserves-definedness] // Note: If types are incompatible or unknown, execution will get stuck (no matching rule), From 5e3b14051bf3d1026d994dba996295b00a369fd7 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Thu, 11 Sep 2025 18:15:54 +0800 Subject: [PATCH 25/27] update expected --- .../show/checked_arithmetic-fail.checked_add_i32.expected | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kmir/src/tests/integration/data/prove-rs/show/checked_arithmetic-fail.checked_add_i32.expected b/kmir/src/tests/integration/data/prove-rs/show/checked_arithmetic-fail.checked_add_i32.expected index d2e044be2..39a16b517 100644 --- a/kmir/src/tests/integration/data/prove-rs/show/checked_arithmetic-fail.checked_add_i32.expected +++ b/kmir/src/tests/integration/data/prove-rs/show/checked_arithmetic-fail.checked_add_i32.expected @@ -31,9 +31,9 @@ ├─ 5 │ #selectBlock ( switchTargets ( ... branches: branch ( 0 , basicBlockIdx ( 4 ) ) │ - │ (7 steps) + │ (6 steps) └─ 7 (stuck, leaf) - #execIntrinsic ( symbol ( "cold_path" ) , .Operands , place ( ... local: local ( + #execIntrinsic ( IntrinsicFunction ( symbol ( "cold_path" ) ) , .Operands , plac From 9d32b93f311624d996f9794297622fcded7c1afb Mon Sep 17 00:00:00 2001 From: JianHong Zhao Date: Fri, 12 Sep 2025 10:13:03 +0800 Subject: [PATCH 26/27] Update kmir/src/kmir/kdist/mir-semantics/kmir.md Co-authored-by: Jost Berthold --- kmir/src/kmir/kdist/mir-semantics/kmir.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 429770d92..8ef056f37 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -484,8 +484,7 @@ where the returned result should go. STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK ... #tyOfCall(FUNC) |-> MONOITEM:MonoItemKind ... - requires isMonoItemKind(MONOITEM) - andBool notBool isIntrinsicFunction(MONOITEM) + requires notBool isIntrinsicFunction(MONOITEM) [preserves-definedness] // callee lookup defined syntax Bool ::= isIntrinsicFunction(MonoItemKind) [function] From 55c9aa33dab06188386501960fc9a944a30effd0 Mon Sep 17 00:00:00 2001 From: Stevengre Date: Fri, 12 Sep 2025 11:26:19 +0800 Subject: [PATCH 27/27] refactor: Simplify raw_eq implementation and improve documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Simplified raw_eq intrinsic implementation by removing unnecessary intermediate steps - Merged #execIntrinsic and #execRawEqWithTypes rules into single rule - Added support for constant operands in #extractOperandType function - Shortened documentation based on colleague feedback, removing references to "previous implementation" - Updated raw_eq_simple.rs test with additional test cases (constant tests commented out pending alloc support) - Improved code comments for better clarity and conciseness 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- kmir/src/kmir/kdist/mir-semantics/kmir.md | 86 +++++-------------- .../data/exec-smir/intrinsic/raw_eq_simple.rs | 14 ++- .../intrinsic/raw_eq_simple.smir.json | 2 +- .../exec-smir/intrinsic/raw_eq_simple.state | 30 +++---- 4 files changed, 49 insertions(+), 83 deletions(-) diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 8ef056f37..7dae4348b 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -646,91 +646,49 @@ its argument to the destination without modification. The `raw_eq` intrinsic performs byte-by-byte equality comparison of the memory contents pointed to by two references. It returns a boolean value indicating whether the referenced values are equal. The implementation dereferences the -provided References to access the underlying values, then compares them using K's built-in equality operator. -This intrinsic is typically used for low-level memory comparison operations where type-specific equality methods -are not suitable. +provided references to access the underlying values, then compares them using K's built-in equality operator. **Type Safety:** -The implementation now includes comprehensive type compatibility checking using the existing `#typesCompatible` function. -This ensures that `raw_eq` only compares values of compatible types, supporting: -- Identical types (direct equality) -- Array types with compatible element types (ignoring length differences) -- Pointer types with compatible pointee types (recursive checking) -- Pointer-to-array and pointer-to-element compatibility - -**Error Handling:** -- Execution gets stuck (no matching rule) when operands have incompatible types or unknown type information -- This causes K to stop execution, which is the desired behavior for type safety violations - -**Implementation Details:** -The intrinsic uses a multi-stage approach: -1. `#execIntrinsic` → `#execRawEqWithTypes` - Extract operand type information before evaluation -2. `#execRawEqWithTypes` → `#execRawEqTyped` - Pass both values and their types -3. `#execRawEqTyped` - Perform type compatibility check and comparison - -This approach preserves type information throughout the evaluation process, preventing the type loss that occurred -in the previous implementation where `seqstrict` evaluation converted `TypedValue` to `Value`. +The implementation requires operands to have identical types (`TY1 ==K TY2`) before performing the comparison. +Execution gets stuck (no matching rule) when operands have different types or unknown type information. ```k - // Raw eq intrinsic - byte-by-byte equality comparison of referenced values - - // Helper function to append projectionElemDeref to an operand - syntax Operand ::= #withDeref(Operand) [function, total] - rule #withDeref(operandCopy(place(LOCAL, PROJ))) - => operandCopy(place(LOCAL, appendP(PROJ, projectionElemDeref .ProjectionElems))) - rule #withDeref(operandMove(place(LOCAL, PROJ))) - => operandMove(place(LOCAL, appendP(PROJ, projectionElemDeref .ProjectionElems))) - rule #withDeref(OP) => OP [owise] - - // Handle raw_eq intrinsic by dereferencing operands with type checking + // Raw eq: dereference operands, extract types, and delegate to typed comparison rule #execIntrinsic(IntrinsicFunction(symbol("raw_eq")), ARG1:Operand ARG2:Operand .Operands, PLACE) - => #execRawEqWithTypes(PLACE, #withDeref(ARG1), #withDeref(ARG2)) - ... - - // Execute raw_eq with type-aware operand handling - // NOTE: Uses parameter passing for simplification - future optimization could inline the logic - syntax KItem ::= #execRawEqWithTypes(Place, Operand, Operand) - rule #execRawEqWithTypes(DEST, OP1, OP2) - => #execRawEqWithTypesAux(DEST, OP1, OP2, LOCALS, TYPEMAP) + => #execRawEqTyped(PLACE, #withDeref(ARG1), #extractOperandType(#withDeref(ARG1), LOCALS, TYPEMAP), + #withDeref(ARG2), #extractOperandType(#withDeref(ARG2), LOCALS, TYPEMAP)) ... LOCALS TYPEMAP - syntax KItem ::= #execRawEqWithTypesAux(Place, Operand, Operand, List, Map) - rule #execRawEqWithTypesAux(DEST, OP1, OP2, LOCALS, TYPEMAP) - => #execRawEqTyped(DEST, OP1, #extractOperandType(OP1, LOCALS, TYPEMAP), - OP2, #extractOperandType(OP2, LOCALS, TYPEMAP)) + // Compare values only if types are identical + syntax KItem ::= #execRawEqTyped(Place, Evaluation, MaybeTy, Evaluation, MaybeTy) [seqstrict(2,4)] + rule #execRawEqTyped(DEST, VAL1:Value, TY1:Ty, VAL2:Value, TY2:Ty) + => #setLocalValue(DEST, BoolVal(VAL1 ==K VAL2)) ... + requires TY1 ==K TY2 + [preserves-definedness] - // Helper function to extract type information from operands + // Add deref projection to operands + syntax Operand ::= #withDeref(Operand) [function, total] + rule #withDeref(operandCopy(place(LOCAL, PROJ))) + => operandCopy(place(LOCAL, appendP(PROJ, projectionElemDeref .ProjectionElems))) + rule #withDeref(operandMove(place(LOCAL, PROJ))) + => operandMove(place(LOCAL, appendP(PROJ, projectionElemDeref .ProjectionElems))) + rule #withDeref(OP) => OP [owise] + + // Extract type from operands (locals with projections, constants, fallback to unknown) syntax MaybeTy ::= #extractOperandType(Operand, List, Map) [function, total] rule #extractOperandType(operandCopy(place(local(I), PROJS)), LOCALS, TYPEMAP) => getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS, TYPEMAP) requires 0 <=Int I andBool I getTyOf(tyOfLocal({LOCALS[I]}:>TypedLocal), PROJS, TYPEMAP) requires 0 <=Int I andBool I TY rule #extractOperandType(_, _, _) => TyUnknown [owise] - - // Execute raw_eq with type equality checking - syntax KItem ::= #execRawEqTyped(Place, Evaluation, MaybeTy, Evaluation, MaybeTy) [seqstrict(2,4)] - rule #execRawEqTyped(DEST, VAL1:Value, TY1:Ty, VAL2:Value, TY2:Ty) - => #setLocalValue(DEST, BoolVal(VAL1 ==K VAL2)) - ... - requires TY1 ==K TY2 - // requires #typesCompatible({TYPEMAP[TY1]}:>TypeInfo, {TYPEMAP[TY2]}:>TypeInfo, TYPEMAP) - // andBool TY1 in_keys(TYPEMAP) - // andBool TY2 in_keys(TYPEMAP) - [preserves-definedness] - - // Note: If types are incompatible or unknown, execution will get stuck (no matching rule), - // which causes K to stop execution - this is the desired behavior for type safety violations - ``` ### Stopping on Program Errors diff --git a/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs index 230ff8412..bb68c41a3 100644 --- a/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs +++ b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs @@ -11,9 +11,17 @@ fn main() { let a = 42; let b = 42; - // Test raw_eq intrinsic with identical values + // Test raw_eq intrinsic with identical values (both variables) let result = unsafe { raw_eq(&a, &b) }; - - // This assertion should pass as both values are identical assert!(result); + + // TODO: need alloc to be supported in the semantics + // // Test raw_eq with constant and variable (same type, same value) + // let result_const_var = unsafe { raw_eq(&42, &a) }; + // assert!(result_const_var); + + // // Test raw_eq with constant and variable (same type, different value) + // let c = 24; + // let result_const_var_diff = unsafe { raw_eq(&42, &c) }; + // assert!(!result_const_var_diff); } \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.smir.json b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.smir.json index 8b0f08c2d..7d214726c 100644 --- a/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.smir.json @@ -1 +1 @@ -{"name":"raw_eq_simple","crate_id":6952967681419923239,"allocs":[[1,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,114,101,115,117,108,116],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h080d61aebc6fe980E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbf88d7319dcac5daE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hb3351458757bf72cE"}],[20,{"IntrinsicSym":"black_box"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h72b75dd84862c578E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h7d334358e0fd5d2bE"}],[25,{"IntrinsicSym":"raw_eq"}],[26,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}],[31,{"NoOpSym":""}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN13raw_eq_simple4main17h9f309d4e056bd9a1E","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":52,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":10}}}}]},"span":52},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":53,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":10}}}}]},"span":53},{"kind":{"Assign":[{"local":4,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":1,"projection":[]}]}]},"span":54},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[]}]}]},"span":55}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":50,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":9}}},"args":[{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":5,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Unreachable"}},"span":51}},{"statements":[],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":3}}},"span":56}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":57,"user_ty":null,"const_":{"kind":"ZeroSized","ty":26,"id":11}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":27,"id":12}}}],"destination":{"local":6,"projection":[]},"target":null,"unwind":"Continue"}},"span":57}},{"statements":[],"terminator":{"kind":"Return","span":58}}],"locals":[{"ty":1,"span":59,"mutability":"Mut"},{"ty":16,"span":60,"mutability":"Not"},{"ty":16,"span":61,"mutability":"Not"},{"ty":28,"span":62,"mutability":"Not"},{"ty":29,"span":54,"mutability":"Not"},{"ty":29,"span":55,"mutability":"Not"},{"ty":30,"span":57,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":60,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":61,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":62,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":63}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h0f972edf589c1802E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h7d334358e0fd5d2bE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h080d61aebc6fe980E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h45966598db2d3bf3E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h72b75dd84862c578E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hb3351458757bf72cE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hed6d62ab5cefa6e0E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbf88d7319dcac5daE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}}},"details":null}],"types":[[1,{"TupleType":{"types":[],"layout":{"fields":{"Arbitrary":{"offsets":[]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":1,"size":{"num_bits":0}}}}],[5,{"RefType":{"pointee_type":32,"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":64}]}},"variants":{"Single":{"index":0}},"abi":{"ScalarPair":[{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}},{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}]},"abi_align":8,"size":{"num_bits":128}}}}],[6,{"PrimitiveType":{"Int":"Isize"}}],[8,{"PtrType":{"pointee_type":33,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[9,{"PrimitiveType":{"Uint":"U8"}}],[10,{"EnumType":{"name":"std::result::Result","adt_def":14,"discriminants":[0,1],"fields":[[6],[30]],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I64","signed":true}},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[11,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[15,{"StructType":{"name":"std::sys::pal::unix::process::process_common::ExitCode","adt_def":26,"fields":[9],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[16,{"PrimitiveType":{"Int":"I32"}}],[17,{"StructType":{"name":"std::process::ExitCode","adt_def":24,"fields":[15],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[18,{"RefType":{"pointee_type":15,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[22,{"PtrType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[24,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[27,{"RefType":{"pointee_type":35,"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":64}]}},"variants":{"Single":{"index":0}},"abi":{"ScalarPair":[{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}},{"Initialized":{"value":{"Int":{"length":"I64","signed":false}},"valid_range":{"start":0,"end":18446744073709551615}}}]},"abi_align":8,"size":{"num_bits":128}}}}],[28,{"PrimitiveType":"Bool"}],[29,{"RefType":{"pointee_type":16,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[30,"VoidType"],[33,{"PtrType":{"pointee_type":9,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[34,{"RefType":{"pointee_type":36,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[35,{"PrimitiveType":"Str"}],[36,{"StructType":{"name":"std::panic::Location<'_>","adt_def":19,"fields":[27,37,37],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":128},{"num_bits":160}]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":8,"size":{"num_bits":192}}}}],[37,{"PrimitiveType":{"Uint":"U32"}}]],"spans":[[0,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,194,36]],[1,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,199,6]],[2,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,9,195,93]],[3,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,10,195,93]],[4,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",201,2,201,2]],[5,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,5,199,6]],[6,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,12,194,13]],[7,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,6,199,7]],[9,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",189,5,189,9]],[10,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",190,5,190,9]],[11,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",191,5,191,9]],[12,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",192,5,192,12]],[13,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",188,1,201,2]],[14,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,69]],[15,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,75]],[16,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,84]],[17,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,70,195,74]],[18,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,76,195,82]],[19,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,74,195,75]],[20,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,93,195,93]],[21,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,83,195,84]],[22,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,9,2053,15]],[23,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,15]],[24,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,22]],[25,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,21,636,22]],[26,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,23,2053,24]],[27,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,92,195,93]],[29,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2052,19,2052,23]],[30,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",635,19,635,24]],[31,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,19]],[32,["no-location",0,0,0,0]],[33,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,21]],[34,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,33]],[35,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,40]],[36,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",160,2,160,2]],[38,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,43,150,44]],[40,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,9,154,15]],[41,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",388,27,388,32]],[42,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,1,160,2]],[43,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs",250,5,250,71]],[44,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs",521,1,521,56]],[45,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2424,6,2424,6]],[46,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2423,9,2423,26]],[48,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,15,2422,19]],[49,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,5,2424,6]],[50,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",15,27,15,33]],[51,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",15,27,15,41]],[52,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",11,13,11,15]],[53,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",12,13,12,15]],[54,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",15,34,15,36]],[55,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",15,38,15,40]],[56,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",18,13,18,19]],[57,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",18,5,18,20]],[58,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",19,2,19,2]],[60,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",11,9,11,10]],[61,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",12,9,12,10]],[62,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",15,9,15,15]],[63,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",10,1,19,2]]],"debug":null,"machine":{"endian":"Little","pointer_width":{"num_bits":64}}} \ No newline at end of file +{"name":"raw_eq_simple","crate_id":6952967681419923239,"allocs":[{"alloc_id":1,"ty":27,"global_alloc":{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,114,101,115,117,108,116],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}}],"functions":[[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h080d61aebc6fe980E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbf88d7319dcac5daE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hb3351458757bf72cE"}],[20,{"IntrinsicSym":"black_box"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h72b75dd84862c578E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h7d334358e0fd5d2bE"}],[25,{"IntrinsicSym":"raw_eq"}],[26,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}],[37,{"NoOpSym":""}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN13raw_eq_simple4main17h9f309d4e056bd9a1E","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":52,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":10}}}}]},"span":52},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":53,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":10}}}}]},"span":53},{"kind":{"Assign":[{"local":4,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":1,"projection":[]}]}]},"span":54},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[]}]}]},"span":55}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":50,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":9}}},"args":[{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":5,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Unreachable"}},"span":51}},{"statements":[],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":3}}},"span":56}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":57,"user_ty":null,"const_":{"kind":"ZeroSized","ty":26,"id":11}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":27,"id":12}}}],"destination":{"local":6,"projection":[]},"target":null,"unwind":"Continue"}},"span":57}},{"statements":[],"terminator":{"kind":"Return","span":58}}],"locals":[{"ty":1,"span":59,"mutability":"Mut"},{"ty":16,"span":60,"mutability":"Not"},{"ty":16,"span":61,"mutability":"Not"},{"ty":28,"span":62,"mutability":"Not"},{"ty":29,"span":54,"mutability":"Not"},{"ty":29,"span":55,"mutability":"Not"},{"ty":30,"span":57,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":60,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":61,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":62,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":63}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h0f972edf589c1802E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h7d334358e0fd5d2bE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h080d61aebc6fe980E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h45966598db2d3bf3E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h72b75dd84862c578E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hb3351458757bf72cE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hed6d62ab5cefa6e0E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbf88d7319dcac5daE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}}},"details":null}],"types":[[1,{"TupleType":{"types":[],"layout":{"fields":{"Arbitrary":{"offsets":[]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":1,"size":{"num_bits":0}}}}],[5,{"RefType":{"pointee_type":31,"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":64}]}},"variants":{"Single":{"index":0}},"abi":{"ScalarPair":[{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}},{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}]},"abi_align":8,"size":{"num_bits":128}}}}],[6,{"PrimitiveType":{"Int":"Isize"}}],[8,{"PtrType":{"pointee_type":32,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[9,{"PrimitiveType":{"Uint":"U8"}}],[10,{"EnumType":{"name":"std::result::Result","adt_def":12,"discriminants":[0,1],"fields":[[6],[30]],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I64","signed":true}},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[11,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[15,{"StructType":{"name":"std::sys::pal::unix::process::process_common::ExitCode","adt_def":18,"fields":[9],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[16,{"PrimitiveType":{"Int":"I32"}}],[17,{"StructType":{"name":"std::process::ExitCode","adt_def":16,"fields":[15],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0}]}},"variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Int":{"length":"I8","signed":false}},"valid_range":{"start":0,"end":255}}}},"abi_align":1,"size":{"num_bits":8}}}}],[18,{"RefType":{"pointee_type":15,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[22,{"PtrType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[24,{"RefType":{"pointee_type":12,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[27,{"RefType":{"pointee_type":34,"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":64}]}},"variants":{"Single":{"index":0}},"abi":{"ScalarPair":[{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}},{"Initialized":{"value":{"Int":{"length":"I64","signed":false}},"valid_range":{"start":0,"end":18446744073709551615}}}]},"abi_align":8,"size":{"num_bits":128}}}}],[28,{"PrimitiveType":"Bool"}],[29,{"RefType":{"pointee_type":16,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[30,"VoidType"],[32,{"PtrType":{"pointee_type":9,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":0,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[33,{"RefType":{"pointee_type":35,"layout":{"fields":"Primitive","variants":{"Single":{"index":0}},"abi":{"Scalar":{"Initialized":{"value":{"Pointer":0},"valid_range":{"start":1,"end":18446744073709551615}}}},"abi_align":8,"size":{"num_bits":64}}}}],[34,{"PrimitiveType":"Str"}],[35,{"StructType":{"name":"std::panic::Location<'_>","adt_def":23,"fields":[27,36,36],"layout":{"fields":{"Arbitrary":{"offsets":[{"num_bits":0},{"num_bits":128},{"num_bits":160}]}},"variants":{"Single":{"index":0}},"abi":{"Aggregate":{"sized":true}},"abi_align":8,"size":{"num_bits":192}}}}],[36,{"PrimitiveType":{"Uint":"U32"}}]],"spans":[[0,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,194,36]],[1,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,17,199,6]],[2,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,9,195,93]],[3,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,10,195,93]],[4,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",201,2,201,2]],[5,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,5,199,6]],[6,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",194,12,194,13]],[7,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",199,6,199,7]],[9,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",189,5,189,9]],[10,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",190,5,190,9]],[11,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",191,5,191,9]],[12,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",192,5,192,12]],[13,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",188,1,201,2]],[14,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,69]],[15,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,75]],[16,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,18,195,84]],[17,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,70,195,74]],[18,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,76,195,82]],[19,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,74,195,75]],[20,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,93,195,93]],[21,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,83,195,84]],[22,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,9,2053,15]],[23,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,15]],[24,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,9,636,22]],[25,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",636,21,636,22]],[26,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2053,23,2053,24]],[27,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs",195,92,195,93]],[29,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2052,19,2052,23]],[30,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs",635,19,635,24]],[31,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,19]],[32,["no-location",0,0,0,0]],[33,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,18,154,21]],[34,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,33]],[35,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",389,5,389,40]],[36,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",160,2,160,2]],[38,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,43,150,44]],[40,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",154,9,154,15]],[41,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/hint.rs",388,27,388,32]],[42,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs",150,1,160,2]],[43,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs",250,5,250,71]],[44,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs",521,1,521,56]],[45,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2424,6,2424,6]],[46,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2423,9,2423,26]],[48,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,15,2422,19]],[49,["/Users/steven/.rustup/toolchains/nightly-2024-11-29-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/process.rs",2422,5,2424,6]],[50,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",15,27,15,33]],[51,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",15,27,15,41]],[52,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",11,13,11,15]],[53,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",12,13,12,15]],[54,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",15,34,15,36]],[55,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",15,38,15,40]],[56,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",16,13,16,19]],[57,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",16,5,16,20]],[58,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",27,2,27,2]],[60,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",11,9,11,10]],[61,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",12,9,12,10]],[62,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",15,9,15,15]],[63,["/Users/steven/Desktop/projs/mir-semantics/kmir/src/tests/integration/data/exec-smir/intrinsic/raw_eq_simple.rs",10,1,27,2]]],"debug":null,"machine":{"endian":"Little","pointer_width":{"num_bits":64}}} \ 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 610b962ad..7ce471982 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 @@ -53,32 +53,32 @@ ty ( 1 ) |-> typeInfoTupleType ( .Tys ) - ty ( 5 ) |-> typeInfoRefType ( ty ( 32 ) ) + ty ( 5 ) |-> typeInfoRefType ( ty ( 31 ) ) ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) ) - ty ( 8 ) |-> typeInfoPtrType ( ty ( 33 ) ) + ty ( 8 ) |-> typeInfoPtrType ( ty ( 32 ) ) ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) ) - ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 14 ) , Discriminant ( 0 ) Discriminant ( 1 ) .Discriminants ) + ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 12 ) , Discriminant ( 0 ) Discriminant ( 1 ) .Discriminants ) ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 26 ) , ty ( 9 ) .Tys ) + ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 18 ) , ty ( 9 ) .Tys ) ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) ) - ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 24 ) , ty ( 15 ) .Tys ) + ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 16 ) , ty ( 15 ) .Tys ) ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) ) ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) ) ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) ) - ty ( 27 ) |-> typeInfoRefType ( ty ( 35 ) ) + ty ( 27 ) |-> typeInfoRefType ( ty ( 34 ) ) ty ( 28 ) |-> typeInfoPrimitiveType ( primTypeBool ) ty ( 29 ) |-> typeInfoRefType ( ty ( 16 ) ) ty ( 30 ) |-> typeInfoVoidType - ty ( 33 ) |-> typeInfoPtrType ( ty ( 9 ) ) - ty ( 34 ) |-> typeInfoRefType ( ty ( 36 ) ) - ty ( 35 ) |-> typeInfoPrimitiveType ( primTypeStr ) - ty ( 36 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 19 ) , ty ( 27 ) ty ( 37 ) ty ( 37 ) .Tys ) - ty ( 37 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) + ty ( 32 ) |-> typeInfoPtrType ( ty ( 9 ) ) + ty ( 33 ) |-> typeInfoRefType ( ty ( 35 ) ) + ty ( 34 ) |-> typeInfoPrimitiveType ( primTypeStr ) + ty ( 35 ) |-> typeInfoStructType ( "std::panic::Location<'_>" , adtDef ( 23 ) , ty ( 27 ) ty ( 36 ) ty ( 36 ) .Tys ) + ty ( 36 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU32 ) ) - adtDef ( 14 ) |-> ty ( 10 ) - adtDef ( 19 ) |-> ty ( 36 ) - adtDef ( 24 ) |-> ty ( 17 ) - adtDef ( 26 ) |-> ty ( 15 ) + adtDef ( 12 ) |-> ty ( 10 ) + adtDef ( 16 ) |-> ty ( 17 ) + adtDef ( 18 ) |-> ty ( 15 ) + adtDef ( 23 ) |-> ty ( 35 ) \ No newline at end of file