diff --git a/ANNOTATIONS.md b/ANNOTATIONS.md index bb1c21383deaf1041a3a3ea571511fca9a97772f..39f9b6363742de0a5dd6269321783349849c566d 100644 --- a/ANNOTATIONS.md +++ b/ANNOTATIONS.md @@ -573,6 +573,13 @@ code file. //@rc::import <modpath> from <library> (for code only) ``` +Note that it is not directly possible to import Coq modules from theories +defined in the same RefinedC project. To do so, one must first use a directive +like the following. +```c +//@rc::require <modpath> +``` + ## Context directive The Coq context (in spec and proof sections) using the following annotation: diff --git a/_CoqProject b/_CoqProject index 5d9e1276fb987c8f9a3944b8209187f74c9fd0a5..1b77c78784e777d1700949ccff67d1b7d7b16df9 100644 --- a/_CoqProject +++ b/_CoqProject @@ -4,3 +4,16 @@ # Cannot use non-canonical projections as it causes massive unification failures # (https://github.com/coq/coq/issues/6294). -arg -w -arg -redundant-canonical-projection +-Q _build/default/examples/+rc+/spinlock refinedc.examples.examples.spinlock +-Q _build/default/examples/+rc+/mpool_simpl refinedc.examples.mpool_simpl +-Q _build/default/examples/+rc+/mpool refinedc.examples.mpool +-Q _build/default/examples/+rc+/malloc1 refinedc.examples.malloc1 +-Q _build/default/examples/+rc+/mutable_map refinedc.examples.mutable_map +-Q _build/default/examples/+rc+/latch refinedc.examples.latch +-Q _build/default/examples/+rc+/simple_union refinedc.examples.simple_union +-Q _build/default/examples/+rc+/queue refinedc.examples.queue +-Q _build/default/examples/+rc+/reverse refinedc.examples.reverse +-Q _build/default/examples/+rc+/btree refinedc.examples.btree +-Q _build/default/examples/+rc+/lock refinedc.examples.lock +-Q _build/default/examples/+rc+/flags refinedc.examples.flags +-Q _build/default/examples/+rc+/shift refinedc.examples.shift diff --git a/theories/examples/btree/btree_extra.v b/examples/+rc+/btree/btree_extra.v similarity index 100% rename from theories/examples/btree/btree_extra.v rename to examples/+rc+/btree/btree_extra.v diff --git a/theories/examples/btree/btree_learn.v b/examples/+rc+/btree/btree_learn.v similarity index 78% rename from theories/examples/btree/btree_learn.v rename to examples/+rc+/btree/btree_learn.v index eb668c49039dfd5e682346a0d736598c943c9597..07c8f8dbf8e10e3ff45cde6241654d622e971461 100644 --- a/theories/examples/btree/btree_learn.v +++ b/examples/+rc+/btree/btree_learn.v @@ -1,7 +1,5 @@ From refinedc.typing Require Import typing. -From refinedc.examples.btree Require Import btree_code. -From refinedc.examples.btree Require Import btree_spec. -From refinedc.examples.btree Require Import btree_extra. +From refinedc.examples.btree Require Import code spec btree_extra. Set Default Proof Using "Type". (* Generated from [theories/examples/btree/btree.c]. *) diff --git a/theories/examples/btree/btree_code.v b/examples/+rc+/btree/code.v similarity index 99% rename from theories/examples/btree/btree_code.v rename to examples/+rc+/btree/code.v index 0910f254abd96cd837014433d25c8fa674f59d28..0b575130b539b8ff2ba70abb8d5f25d976774c9f 100644 --- a/theories/examples/btree/btree_code.v +++ b/examples/+rc+/btree/code.v @@ -3,9 +3,9 @@ From refinedc.lang Require Import tactics. From refinedc.typing Require Import annotations. Set Default Proof Using "Type". -(* Generated from [theories/examples/btree/btree.c]. *) +(* Generated from [examples/btree.c]. *) Section code. - Definition file_0 : string := "theories/examples/btree/btree.c". + Definition file_0 : string := "examples/btree.c". Definition loc_2 : location_info := LocationInfo file_0 8 2 8 38. Definition loc_3 : location_info := LocationInfo file_0 9 2 9 22. Definition loc_4 : location_info := LocationInfo file_0 10 2 10 11. diff --git a/examples/+rc+/btree/dune b/examples/+rc+/btree/dune new file mode 100644 index 0000000000000000000000000000000000000000..dc1e56504f0cefea8033f67f419a362de6bf5cb1 --- /dev/null +++ b/examples/+rc+/btree/dune @@ -0,0 +1,5 @@ +; Generated by [refinedc], do not edit. +(coq.theory + (flags -w -notation-overridden -w -redundant-canonical-projection) + (name refinedc.examples.btree) + (theories refinedc.lang refinedc.typing refinedc.typing.automation refinedc.lithium)) diff --git a/theories/examples/btree/btree_proof_btree_find.v b/examples/+rc+/btree/proof_btree_find.v similarity index 100% rename from theories/examples/btree/btree_proof_btree_find.v rename to examples/+rc+/btree/proof_btree_find.v diff --git a/theories/examples/btree/btree_proof_btree_insert.v b/examples/+rc+/btree/proof_btree_insert.v similarity index 100% rename from theories/examples/btree/btree_proof_btree_insert.v rename to examples/+rc+/btree/proof_btree_insert.v diff --git a/theories/examples/btree/btree_proof_btree_make_root.v b/examples/+rc+/btree/proof_btree_make_root.v similarity index 100% rename from theories/examples/btree/btree_proof_btree_make_root.v rename to examples/+rc+/btree/proof_btree_make_root.v diff --git a/theories/examples/btree/btree_proof_btree_member.v b/examples/+rc+/btree/proof_btree_member.v similarity index 93% rename from theories/examples/btree/btree_proof_btree_member.v rename to examples/+rc+/btree/proof_btree_member.v index f11b34c1ffde8c5f975c7605b865eb86c74c64b1..231738a91d3ef5d9975f0d1d3a75b08e2c2f42a2 100644 --- a/theories/examples/btree/btree_proof_btree_member.v +++ b/examples/+rc+/btree/proof_btree_member.v @@ -1,11 +1,11 @@ From refinedc.typing Require Import typing. -From refinedc.examples.btree Require Import btree_code. -From refinedc.examples.btree Require Import btree_spec. +From refinedc.examples.btree Require Import code. +From refinedc.examples.btree Require Import spec. From refinedc.examples.btree Require Import btree_extra. From refinedc.examples.btree Require Import btree_learn. Set Default Proof Using "Type". -(* Generated from [theories/examples/btree/btree.c]. *) +(* Generated from [examples/btree.c]. *) Section proof_btree_member. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/examples/+rc+/btree/proof_files b/examples/+rc+/btree/proof_files new file mode 100644 index 0000000000000000000000000000000000000000..50ae59b9a8753b421069d013d25ca3d2f8cde5ff --- /dev/null +++ b/examples/+rc+/btree/proof_files @@ -0,0 +1,13 @@ +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/btree/proof_alloc.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/btree/proof_alloc_array.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/btree/proof_btree_find.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/btree/proof_btree_insert.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/btree/proof_btree_make_root.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/btree/proof_btree_member.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/btree/proof_free.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/btree/proof_free_array.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/btree/proof_free_btree.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/btree/proof_free_btree_nodes.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/btree/proof_insert_br.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/btree/proof_key_index.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/btree/proof_new_btree.v diff --git a/theories/examples/btree/btree_proof_free_btree.v b/examples/+rc+/btree/proof_free_btree.v similarity index 85% rename from theories/examples/btree/btree_proof_free_btree.v rename to examples/+rc+/btree/proof_free_btree.v index 13fb7fc52f0b6e8c70d10269664aac203e0f65d1..e06678ed6d768fe85b60fc93ff8a3491b8e1707e 100644 --- a/theories/examples/btree/btree_proof_free_btree.v +++ b/examples/+rc+/btree/proof_free_btree.v @@ -1,11 +1,11 @@ From refinedc.typing Require Import typing. -From refinedc.examples.btree Require Import btree_code. -From refinedc.examples.btree Require Import btree_spec. +From refinedc.examples.btree Require Import code. +From refinedc.examples.btree Require Import spec. From refinedc.examples.btree Require Import btree_extra. From refinedc.examples.btree Require Import btree_learn. Set Default Proof Using "Type". -(* Generated from [theories/examples/btree/btree.c]. *) +(* Generated from [examples/btree.c]. *) Section proof_free_btree. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/btree/btree_proof_free_btree_nodes.v b/examples/+rc+/btree/proof_free_btree_nodes.v similarity index 100% rename from theories/examples/btree/btree_proof_free_btree_nodes.v rename to examples/+rc+/btree/proof_free_btree_nodes.v diff --git a/theories/examples/btree/btree_proof_insert_br.v b/examples/+rc+/btree/proof_insert_br.v similarity index 100% rename from theories/examples/btree/btree_proof_insert_br.v rename to examples/+rc+/btree/proof_insert_br.v diff --git a/theories/examples/btree/btree_proof_key_index.v b/examples/+rc+/btree/proof_key_index.v similarity index 93% rename from theories/examples/btree/btree_proof_key_index.v rename to examples/+rc+/btree/proof_key_index.v index dbea0294e910ed167c036f16c8951945b987f30e..08dfe2953e6587d722eb6e7b757bc83abec5036c 100644 --- a/theories/examples/btree/btree_proof_key_index.v +++ b/examples/+rc+/btree/proof_key_index.v @@ -1,11 +1,11 @@ From refinedc.typing Require Import typing. -From refinedc.examples.btree Require Import btree_code. -From refinedc.examples.btree Require Import btree_spec. +From refinedc.examples.btree Require Import code. +From refinedc.examples.btree Require Import spec. From refinedc.examples.btree Require Import btree_extra. From refinedc.examples.btree Require Import btree_learn. Set Default Proof Using "Type". -(* Generated from [theories/examples/btree/btree.c]. *) +(* Generated from [examples/btree.c]. *) Section proof_key_index. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/btree/btree_proof_new_btree.v b/examples/+rc+/btree/proof_new_btree.v similarity index 83% rename from theories/examples/btree/btree_proof_new_btree.v rename to examples/+rc+/btree/proof_new_btree.v index 464cb03cfc7510be2a38a1c924b993aca6b35f27..82daa76b51f6bdf669095140665c930adc73b219 100644 --- a/theories/examples/btree/btree_proof_new_btree.v +++ b/examples/+rc+/btree/proof_new_btree.v @@ -1,11 +1,11 @@ From refinedc.typing Require Import typing. -From refinedc.examples.btree Require Import btree_code. -From refinedc.examples.btree Require Import btree_spec. +From refinedc.examples.btree Require Import code. +From refinedc.examples.btree Require Import spec. From refinedc.examples.btree Require Import btree_extra. From refinedc.examples.btree Require Import btree_learn. Set Default Proof Using "Type". -(* Generated from [theories/examples/btree/btree.c]. *) +(* Generated from [examples/btree.c]. *) Section proof_new_btree. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/btree/btree_spec.v b/examples/+rc+/btree/spec.v similarity index 98% rename from theories/examples/btree/btree_spec.v rename to examples/+rc+/btree/spec.v index 6ecdb4e3f1de6c775ac7a9722ea07df435ce8c63..f14e4902978706221b015dbf4b995dbf6e3e2205 100644 --- a/theories/examples/btree/btree_spec.v +++ b/examples/+rc+/btree/spec.v @@ -1,17 +1,17 @@ From refinedc.typing Require Import typing. -From refinedc.examples.btree Require Import btree_code. +From refinedc.examples.btree Require Import code. From refinedc.examples.btree Require Import btree_extra. Set Default Proof Using "Type". -(* Generated from [theories/examples/btree/btree.c]. *) +(* Generated from [examples/btree.c]. *) Section spec. Context `{!typeG Σ} `{!globalG Σ}. (* Inlined code. *) + Definition alloc_initialized := initialized "allocator_state" (). (* B-tree order, should match the defined ORDER in C. *) Definition ORDER : nat := 5. - Definition alloc_initialized := initialized "allocator_state" (). (* Definition of type [btree_t]. *) Definition btree_t_rec : (btree_rfmt -d> typeO) → (btree_rfmt -d> typeO) := (λ self r, @@ -88,6 +88,26 @@ Section spec. (* Type definitions. *) + (* Specifications for function [alloc]. *) + Definition type_of_alloc := + fn(∀ size : nat; (size @ (int (size_t))); ⌜size + 16 < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) + → ∃ () : (), (&own (uninit (mk_layout size 3))); True. + + (* Specifications for function [free]. *) + Definition type_of_free := + fn(∀ size : nat; (size @ (int (size_t))), (&own (uninit (mk_layout size 3))); (alloc_initialized) ∗ ⌜(8 | size)âŒ) + → ∃ () : (), (void); True. + + (* Specifications for function [alloc_array]. *) + Definition type_of_alloc_array := + fn(∀ (size, n) : nat * nat; (size @ (int (size_t))), (n @ (int (size_t))); ⌜size * n + 16 < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) + → ∃ () : (), (&own (array (mk_layout size 3) (replicate n (uninit (mk_layout size 3))))); True. + + (* Specifications for function [free_array]. *) + Definition type_of_free_array := + fn(∀ (size, n) : nat * nat; (size @ (int (size_t))), (n @ (int (size_t))), (&own (array (mk_layout size 3) (replicate n (uninit (mk_layout size 3))))); ⌜size * n < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) + → ∃ () : (), (void); True. + (* Specifications for function [new_btree]. *) Definition type_of_new_btree := fn(∀ () : (); (alloc_initialized)) @@ -114,26 +134,6 @@ Section spec. fn(∀ (v, ty, p, h, m, k) : loc * type * loc * nat * (gmap Z type) * Z; (k @ (int (i32))), (v @ (&own (ty))), (p @ (&own ((BRroot h m) @ (btree_t)))); (alloc_initialized)) → ∃ new_h : nat, (void); (p â—â‚— ((BRroot new_h (<[k := ty]> m)) @ (btree_t))). - (* Specifications for function [alloc]. *) - Definition type_of_alloc := - fn(∀ size : nat; (size @ (int (size_t))); ⌜size + 16 < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (&own (uninit (mk_layout size 3))); True. - - (* Specifications for function [free]. *) - Definition type_of_free := - fn(∀ size : nat; (size @ (int (size_t))), (&own (uninit (mk_layout size 3))); (alloc_initialized) ∗ ⌜(8 | size)âŒ) - → ∃ () : (), (void); True. - - (* Specifications for function [alloc_array]. *) - Definition type_of_alloc_array := - fn(∀ (size, n) : nat * nat; (size @ (int (size_t))), (n @ (int (size_t))); ⌜size * n + 16 < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (&own (array (mk_layout size 3) (replicate n (uninit (mk_layout size 3))))); True. - - (* Specifications for function [free_array]. *) - Definition type_of_free_array := - fn(∀ (size, n) : nat * nat; (size @ (int (size_t))), (n @ (int (size_t))), (&own (array (mk_layout size 3) (replicate n (uninit (mk_layout size 3))))); ⌜size * n < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (void); True. - (* Specifications for function [free_btree_nodes]. *) Definition type_of_free_btree_nodes := fn(∀ p : loc; (p @ (&own (btree_t))); (alloc_initialized)) diff --git a/theories/examples/misc/flags_code.v b/examples/+rc+/flags/code.v similarity index 97% rename from theories/examples/misc/flags_code.v rename to examples/+rc+/flags/code.v index 6701576827f85bd96e1589df0d544c851c31a5c0..1e775a8b3ca260ef2623e43bfd5db7c547968899 100644 --- a/theories/examples/misc/flags_code.v +++ b/examples/+rc+/flags/code.v @@ -3,9 +3,9 @@ From refinedc.lang Require Import tactics. From refinedc.typing Require Import annotations. Set Default Proof Using "Type". -(* Generated from [theories/examples/misc/flags.c]. *) +(* Generated from [examples/flags.c]. *) Section code. - Definition file_0 : string := "theories/examples/misc/flags.c". + Definition file_0 : string := "examples/flags.c". Definition loc_2 : location_info := LocationInfo file_0 32 2 32 21. Definition loc_3 : location_info := LocationInfo file_0 33 2 33 41. Definition loc_4 : location_info := LocationInfo file_0 34 2 34 41. diff --git a/examples/+rc+/flags/dune b/examples/+rc+/flags/dune new file mode 100644 index 0000000000000000000000000000000000000000..0e2dcf4f893d5878a44b75cb863db616ef529af6 --- /dev/null +++ b/examples/+rc+/flags/dune @@ -0,0 +1,5 @@ +; Generated by [refinedc], do not edit. +(coq.theory + (flags -w -notation-overridden -w -redundant-canonical-projection) + (name refinedc.examples.flags) + (theories refinedc.lang refinedc.typing refinedc.typing.automation refinedc.lithium)) diff --git a/examples/+rc+/flags/proof_files b/examples/+rc+/flags/proof_files new file mode 100644 index 0000000000000000000000000000000000000000..e20133865b8db3292747d954dd4c902f49288675 --- /dev/null +++ b/examples/+rc+/flags/proof_files @@ -0,0 +1 @@ +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/flags/proof_sum.v diff --git a/theories/examples/misc/flags_proof_sum.v b/examples/+rc+/flags/proof_sum.v similarity index 100% rename from theories/examples/misc/flags_proof_sum.v rename to examples/+rc+/flags/proof_sum.v diff --git a/theories/examples/misc/flags_spec.v b/examples/+rc+/flags/spec.v similarity index 95% rename from theories/examples/misc/flags_spec.v rename to examples/+rc+/flags/spec.v index 2b2fe88321d027021eb1bc1e8cd4e5c5ded956e9..d98b880ab73ca11bb96650ce8862e1bca0e96407 100644 --- a/theories/examples/misc/flags_spec.v +++ b/examples/+rc+/flags/spec.v @@ -1,8 +1,8 @@ From refinedc.typing Require Import typing. -From refinedc.examples.misc Require Import flags_code. +From refinedc.examples.flags Require Import code. Set Default Proof Using "Type". -(* Generated from [theories/examples/misc/flags.c]. *) +(* Generated from [examples/flags.c]. *) Section spec. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/latch/latch_code.v b/examples/+rc+/latch/code.v similarity index 96% rename from theories/examples/latch/latch_code.v rename to examples/+rc+/latch/code.v index 3c69860dc7987f9a99e62402abb3ab8ef90f85d3..e5c58da343c39b6059ef45b52f37821fbc268edb 100644 --- a/theories/examples/latch/latch_code.v +++ b/examples/+rc+/latch/code.v @@ -3,9 +3,9 @@ From refinedc.lang Require Import tactics. From refinedc.typing Require Import annotations. Set Default Proof Using "Type". -(* Generated from [theories/examples/latch/latch.c]. *) +(* Generated from [examples/latch.c]. *) Section code. - Definition file_0 : string := "theories/examples/latch/latch.c". + Definition file_0 : string := "examples/latch.c". Definition loc_2 : location_info := LocationInfo file_0 5 2 5 94. Definition loc_3 : location_info := LocationInfo file_0 5 2 5 94. Definition loc_4 : location_info := LocationInfo file_0 5 92 5 94. diff --git a/examples/+rc+/latch/dune b/examples/+rc+/latch/dune new file mode 100644 index 0000000000000000000000000000000000000000..fba621ac5915b9d8e991f10a300c3f43e3c1f163 --- /dev/null +++ b/examples/+rc+/latch/dune @@ -0,0 +1,5 @@ +; Generated by [refinedc], do not edit. +(coq.theory + (flags -w -notation-overridden -w -redundant-canonical-projection) + (name refinedc.examples.latch) + (theories refinedc.lang refinedc.typing refinedc.typing.automation refinedc.lithium)) diff --git a/theories/examples/latch/latch_def.v b/examples/+rc+/latch/latch_def.v similarity index 97% rename from theories/examples/latch/latch_def.v rename to examples/+rc+/latch/latch_def.v index c61402d87f55aca1f746b4e1bbecb83b8940dec1..5ea793ac115f15091954b498f1e53dae2fcb0192 100644 --- a/theories/examples/latch/latch_def.v +++ b/examples/+rc+/latch/latch_def.v @@ -1,5 +1,5 @@ From refinedc.typing Require Import typing. -From refinedc.examples.latch Require Import latch_code. +From refinedc.examples.latch Require Import code. Set Default Proof Using "Type". Definition latchN : namespace := nroot.@"lockN". diff --git a/examples/+rc+/latch/proof_files b/examples/+rc+/latch/proof_files new file mode 100644 index 0000000000000000000000000000000000000000..f27c7abc00e7a04a8344f0fea8a56a92e933a465 --- /dev/null +++ b/examples/+rc+/latch/proof_files @@ -0,0 +1,4 @@ +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/latch/proof_atomic_signal_fence.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/latch/proof_atomic_thread_fence.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/latch/proof_latch_release.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/latch/proof_latch_wait.v diff --git a/theories/examples/latch/latch_proof_latch_release.v b/examples/+rc+/latch/proof_latch_release.v similarity index 82% rename from theories/examples/latch/latch_proof_latch_release.v rename to examples/+rc+/latch/proof_latch_release.v index dbe72b56b0c6419b3b3aaa69a345b80c507b859d..ffa1471be60c91fbbdcb979ee88ee7a1f0a863e1 100644 --- a/theories/examples/latch/latch_proof_latch_release.v +++ b/examples/+rc+/latch/proof_latch_release.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.latch Require Import latch_code. -From refinedc.examples.latch Require Import latch_spec. +From refinedc.examples.latch Require Import code. +From refinedc.examples.latch Require Import spec. From refinedc.examples.latch Require Import latch_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/latch/latch.c]. *) +(* Generated from [examples/latch.c]. *) Section proof_latch_release. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/latch/latch_proof_latch_wait.v b/examples/+rc+/latch/proof_latch_wait.v similarity index 84% rename from theories/examples/latch/latch_proof_latch_wait.v rename to examples/+rc+/latch/proof_latch_wait.v index 3b1194a19b677c1fc9d62f46905a40894819b96f..fc89954bc0e2e5011f25df8d3758d5fd9ce044ba 100644 --- a/theories/examples/latch/latch_proof_latch_wait.v +++ b/examples/+rc+/latch/proof_latch_wait.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.latch Require Import latch_code. -From refinedc.examples.latch Require Import latch_spec. +From refinedc.examples.latch Require Import code. +From refinedc.examples.latch Require Import spec. From refinedc.examples.latch Require Import latch_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/latch/latch.c]. *) +(* Generated from [examples/latch.c]. *) Section proof_latch_wait. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/latch/latch_spec.v b/examples/+rc+/latch/spec.v similarity index 88% rename from theories/examples/latch/latch_spec.v rename to examples/+rc+/latch/spec.v index e70d8a760bda9454ef0345a9244930400c7481df..f7c5b170ad3b300b7fe9f346486c2e79a6c8f671 100644 --- a/theories/examples/latch/latch_spec.v +++ b/examples/+rc+/latch/spec.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.latch Require Import latch_code. +From refinedc.examples.latch Require Import code. From refinedc.examples.latch Require Import latch_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/latch/latch.c]. *) +(* Generated from [examples/latch.c]. *) Section spec. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/examples/+rc+/lock/code.v b/examples/+rc+/lock/code.v new file mode 100644 index 0000000000000000000000000000000000000000..84c0bfde9ba0f80431ec24dc269f4ff5817ee840 --- /dev/null +++ b/examples/+rc+/lock/code.v @@ -0,0 +1,374 @@ +From refinedc.lang Require Export notation. +From refinedc.lang Require Import tactics. +From refinedc.typing Require Import annotations. +From refinedc.examples.spinlock Require Import spinlock_annot. +Set Default Proof Using "Type". + +(* Generated from [examples/lock.c]. *) +Section code. + Definition file_0 : string := "examples/lock.c". + Definition loc_2 : location_info := LocationInfo file_0 35 4 35 19. + Definition loc_3 : location_info := LocationInfo file_0 36 4 36 22. + Definition loc_4 : location_info := LocationInfo file_0 37 4 37 27. + Definition loc_5 : location_info := LocationInfo file_0 38 4 38 28. + Definition loc_6 : location_info := LocationInfo file_0 39 4 39 22. + Definition loc_7 : location_info := LocationInfo file_0 39 4 39 11. + Definition loc_8 : location_info := LocationInfo file_0 39 4 39 11. + Definition loc_9 : location_info := LocationInfo file_0 39 12 39 20. + Definition loc_10 : location_info := LocationInfo file_0 39 13 39 20. + Definition loc_11 : location_info := LocationInfo file_0 39 13 39 14. + Definition loc_12 : location_info := LocationInfo file_0 39 13 39 14. + Definition loc_13 : location_info := LocationInfo file_0 38 4 38 22. + Definition loc_14 : location_info := LocationInfo file_0 38 4 38 20. + Definition loc_15 : location_info := LocationInfo file_0 38 4 38 5. + Definition loc_16 : location_info := LocationInfo file_0 38 4 38 5. + Definition loc_17 : location_info := LocationInfo file_0 38 25 38 27. + Definition loc_18 : location_info := LocationInfo file_0 37 4 37 22. + Definition loc_19 : location_info := LocationInfo file_0 37 4 37 20. + Definition loc_20 : location_info := LocationInfo file_0 37 4 37 5. + Definition loc_21 : location_info := LocationInfo file_0 37 4 37 5. + Definition loc_22 : location_info := LocationInfo file_0 37 25 37 26. + Definition loc_23 : location_info := LocationInfo file_0 36 4 36 17. + Definition loc_24 : location_info := LocationInfo file_0 36 4 36 5. + Definition loc_25 : location_info := LocationInfo file_0 36 4 36 5. + Definition loc_26 : location_info := LocationInfo file_0 36 20 36 21. + Definition loc_27 : location_info := LocationInfo file_0 35 4 35 14. + Definition loc_28 : location_info := LocationInfo file_0 35 4 35 5. + Definition loc_29 : location_info := LocationInfo file_0 35 4 35 5. + Definition loc_30 : location_info := LocationInfo file_0 35 17 35 18. + Definition loc_33 : location_info := LocationInfo file_0 46 4 46 19. + Definition loc_34 : location_info := LocationInfo file_0 46 4 46 14. + Definition loc_35 : location_info := LocationInfo file_0 46 4 46 5. + Definition loc_36 : location_info := LocationInfo file_0 46 4 46 5. + Definition loc_37 : location_info := LocationInfo file_0 46 17 46 18. + Definition loc_38 : location_info := LocationInfo file_0 46 17 46 18. + Definition loc_41 : location_info := LocationInfo file_0 54 4 54 22. + Definition loc_42 : location_info := LocationInfo file_0 54 11 54 21. + Definition loc_43 : location_info := LocationInfo file_0 54 11 54 21. + Definition loc_44 : location_info := LocationInfo file_0 54 11 54 12. + Definition loc_45 : location_info := LocationInfo file_0 54 11 54 12. + Definition loc_48 : location_info := LocationInfo file_0 61 4 61 22. + Definition loc_49 : location_info := LocationInfo file_0 63 4 63 46. + Definition loc_50 : location_info := LocationInfo file_0 63 46 63 5. + Definition loc_51 : location_info := LocationInfo file_0 65 4 65 22. + Definition loc_52 : location_info := LocationInfo file_0 66 4 66 24. + Definition loc_53 : location_info := LocationInfo file_0 66 4 66 13. + Definition loc_54 : location_info := LocationInfo file_0 66 4 66 13. + Definition loc_55 : location_info := LocationInfo file_0 66 14 66 22. + Definition loc_56 : location_info := LocationInfo file_0 66 15 66 22. + Definition loc_57 : location_info := LocationInfo file_0 66 15 66 16. + Definition loc_58 : location_info := LocationInfo file_0 66 15 66 16. + Definition loc_59 : location_info := LocationInfo file_0 65 4 65 17. + Definition loc_60 : location_info := LocationInfo file_0 65 4 65 5. + Definition loc_61 : location_info := LocationInfo file_0 65 4 65 5. + Definition loc_62 : location_info := LocationInfo file_0 65 20 65 21. + Definition loc_63 : location_info := LocationInfo file_0 65 20 65 21. + Definition loc_64 : location_info := LocationInfo file_0 63 29 63 45. + Definition loc_65 : location_info := LocationInfo file_0 63 30 63 45. + Definition loc_66 : location_info := LocationInfo file_0 63 31 63 32. + Definition loc_67 : location_info := LocationInfo file_0 63 31 63 32. + Definition loc_68 : location_info := LocationInfo file_0 61 4 61 11. + Definition loc_69 : location_info := LocationInfo file_0 61 4 61 11. + Definition loc_70 : location_info := LocationInfo file_0 61 12 61 20. + Definition loc_71 : location_info := LocationInfo file_0 61 13 61 20. + Definition loc_72 : location_info := LocationInfo file_0 61 13 61 14. + Definition loc_73 : location_info := LocationInfo file_0 61 13 61 14. + Definition loc_76 : location_info := LocationInfo file_0 75 4 75 22. + Definition loc_77 : location_info := LocationInfo file_0 76 4 76 46. + Definition loc_78 : location_info := LocationInfo file_0 76 46 76 5. + Definition loc_79 : location_info := LocationInfo file_0 78 4 78 31. + Definition loc_80 : location_info := LocationInfo file_0 80 4 80 24. + Definition loc_81 : location_info := LocationInfo file_0 81 4 81 15. + Definition loc_82 : location_info := LocationInfo file_0 81 11 81 14. + Definition loc_83 : location_info := LocationInfo file_0 81 11 81 14. + Definition loc_84 : location_info := LocationInfo file_0 80 4 80 13. + Definition loc_85 : location_info := LocationInfo file_0 80 4 80 13. + Definition loc_86 : location_info := LocationInfo file_0 80 14 80 22. + Definition loc_87 : location_info := LocationInfo file_0 80 15 80 22. + Definition loc_88 : location_info := LocationInfo file_0 80 15 80 16. + Definition loc_89 : location_info := LocationInfo file_0 80 15 80 16. + Definition loc_90 : location_info := LocationInfo file_0 78 17 78 30. + Definition loc_91 : location_info := LocationInfo file_0 78 17 78 30. + Definition loc_92 : location_info := LocationInfo file_0 78 17 78 18. + Definition loc_93 : location_info := LocationInfo file_0 78 17 78 18. + Definition loc_96 : location_info := LocationInfo file_0 76 29 76 45. + Definition loc_97 : location_info := LocationInfo file_0 76 30 76 45. + Definition loc_98 : location_info := LocationInfo file_0 76 31 76 32. + Definition loc_99 : location_info := LocationInfo file_0 76 31 76 32. + Definition loc_100 : location_info := LocationInfo file_0 75 4 75 11. + Definition loc_101 : location_info := LocationInfo file_0 75 4 75 11. + Definition loc_102 : location_info := LocationInfo file_0 75 12 75 20. + Definition loc_103 : location_info := LocationInfo file_0 75 13 75 20. + Definition loc_104 : location_info := LocationInfo file_0 75 13 75 14. + Definition loc_105 : location_info := LocationInfo file_0 75 13 75 14. + Definition loc_108 : location_info := LocationInfo file_0 90 4 90 22. + Definition loc_109 : location_info := LocationInfo file_0 91 4 91 49. + Definition loc_110 : location_info := LocationInfo file_0 91 49 91 5. + Definition loc_111 : location_info := LocationInfo file_0 93 4 96 5. + Definition loc_112 : location_info := LocationInfo file_0 97 4 97 36. + Definition loc_113 : location_info := LocationInfo file_0 99 4 99 24. + Definition loc_114 : location_info := LocationInfo file_0 100 4 100 15. + Definition loc_115 : location_info := LocationInfo file_0 100 11 100 14. + Definition loc_116 : location_info := LocationInfo file_0 100 11 100 14. + Definition loc_117 : location_info := LocationInfo file_0 99 4 99 13. + Definition loc_118 : location_info := LocationInfo file_0 99 4 99 13. + Definition loc_119 : location_info := LocationInfo file_0 99 14 99 22. + Definition loc_120 : location_info := LocationInfo file_0 99 15 99 22. + Definition loc_121 : location_info := LocationInfo file_0 99 15 99 16. + Definition loc_122 : location_info := LocationInfo file_0 99 15 99 16. + Definition loc_123 : location_info := LocationInfo file_0 97 17 97 35. + Definition loc_124 : location_info := LocationInfo file_0 97 17 97 35. + Definition loc_125 : location_info := LocationInfo file_0 97 17 97 33. + Definition loc_126 : location_info := LocationInfo file_0 97 17 97 18. + Definition loc_127 : location_info := LocationInfo file_0 97 17 97 18. + Definition loc_130 : location_info := LocationInfo file_0 93 40 96 5. + Definition loc_131 : location_info := LocationInfo file_0 94 8 94 32. + Definition loc_132 : location_info := LocationInfo file_0 95 8 95 32. + Definition loc_133 : location_info := LocationInfo file_0 95 8 95 26. + Definition loc_134 : location_info := LocationInfo file_0 95 8 95 24. + Definition loc_135 : location_info := LocationInfo file_0 95 8 95 9. + Definition loc_136 : location_info := LocationInfo file_0 95 8 95 9. + Definition loc_137 : location_info := LocationInfo file_0 95 8 95 31. + Definition loc_138 : location_info := LocationInfo file_0 95 8 95 26. + Definition loc_139 : location_info := LocationInfo file_0 95 8 95 26. + Definition loc_140 : location_info := LocationInfo file_0 95 8 95 24. + Definition loc_141 : location_info := LocationInfo file_0 95 8 95 9. + Definition loc_142 : location_info := LocationInfo file_0 95 8 95 9. + Definition loc_143 : location_info := LocationInfo file_0 95 30 95 31. + Definition loc_144 : location_info := LocationInfo file_0 94 8 94 26. + Definition loc_145 : location_info := LocationInfo file_0 94 8 94 24. + Definition loc_146 : location_info := LocationInfo file_0 94 8 94 9. + Definition loc_147 : location_info := LocationInfo file_0 94 8 94 9. + Definition loc_148 : location_info := LocationInfo file_0 94 8 94 31. + Definition loc_149 : location_info := LocationInfo file_0 94 8 94 26. + Definition loc_150 : location_info := LocationInfo file_0 94 8 94 26. + Definition loc_151 : location_info := LocationInfo file_0 94 8 94 24. + Definition loc_152 : location_info := LocationInfo file_0 94 8 94 9. + Definition loc_153 : location_info := LocationInfo file_0 94 8 94 9. + Definition loc_154 : location_info := LocationInfo file_0 94 30 94 31. + Definition loc_156 : location_info := LocationInfo file_0 93 8 93 38. + Definition loc_157 : location_info := LocationInfo file_0 93 8 93 26. + Definition loc_158 : location_info := LocationInfo file_0 93 8 93 26. + Definition loc_159 : location_info := LocationInfo file_0 93 8 93 24. + Definition loc_160 : location_info := LocationInfo file_0 93 8 93 9. + Definition loc_161 : location_info := LocationInfo file_0 93 8 93 9. + Definition loc_162 : location_info := LocationInfo file_0 93 29 93 38. + Definition loc_163 : location_info := LocationInfo file_0 93 37 93 38. + Definition loc_164 : location_info := LocationInfo file_0 91 29 91 48. + Definition loc_165 : location_info := LocationInfo file_0 91 30 91 48. + Definition loc_166 : location_info := LocationInfo file_0 91 31 91 32. + Definition loc_167 : location_info := LocationInfo file_0 91 31 91 32. + Definition loc_168 : location_info := LocationInfo file_0 90 4 90 11. + Definition loc_169 : location_info := LocationInfo file_0 90 4 90 11. + Definition loc_170 : location_info := LocationInfo file_0 90 12 90 20. + Definition loc_171 : location_info := LocationInfo file_0 90 13 90 20. + Definition loc_172 : location_info := LocationInfo file_0 90 13 90 14. + Definition loc_173 : location_info := LocationInfo file_0 90 13 90 14. + + (* Definition of struct [atomic_flag]. *) + Program Definition struct_atomic_flag := {| + sl_members := [ + (Some "_Value", it_layout bool_it) + ]; + |}. + Solve Obligations with solve_struct_obligations. + + (* Definition of struct [spinlock]. *) + Program Definition struct_spinlock := {| + sl_members := [ + (Some "lock", it_layout bool_it) + ]; + |}. + Solve Obligations with solve_struct_obligations. + + (* Definition of struct [lock_test_inner]. *) + Program Definition struct_lock_test_inner := {| + sl_members := [ + (Some "a", it_layout size_t); + (Some "b", it_layout size_t) + ]; + |}. + Solve Obligations with solve_struct_obligations. + + (* Definition of struct [lock_test]. *) + Program Definition struct_lock_test := {| + sl_members := [ + (Some "outside", it_layout size_t); + (Some "lock", layout_of struct_spinlock); + (None, mk_layout 7%nat 0%nat); + (Some "locked_int", it_layout size_t); + (Some "locked_struct", layout_of struct_lock_test_inner) + ]; + |}. + Solve Obligations with solve_struct_obligations. + + (* Definition of function [init]. *) + Definition impl_init (sl_init : loc): function := {| + f_args := [ + ("t", LPtr) + ]; + f_local_vars := [ + ]; + f_init := "#0"; + f_code := ( + <[ "#0" := + locinfo: loc_2 ; + LocInfoE loc_27 ((LocInfoE loc_28 (!{LPtr} (LocInfoE loc_29 ("t")))) at{struct_lock_test} "outside") <-{ it_layout size_t } + LocInfoE loc_30 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_30 (i2v 0 i32))) ; + locinfo: loc_3 ; + LocInfoE loc_23 ((LocInfoE loc_24 (!{LPtr} (LocInfoE loc_25 ("t")))) at{struct_lock_test} "locked_int") <-{ it_layout size_t } + LocInfoE loc_26 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_26 (i2v 0 i32))) ; + locinfo: loc_4 ; + LocInfoE loc_18 ((LocInfoE loc_19 ((LocInfoE loc_20 (!{LPtr} (LocInfoE loc_21 ("t")))) at{struct_lock_test} "locked_struct")) at{struct_lock_test_inner} "a") <-{ it_layout size_t } + LocInfoE loc_22 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_22 (i2v 0 i32))) ; + locinfo: loc_5 ; + LocInfoE loc_13 ((LocInfoE loc_14 ((LocInfoE loc_15 (!{LPtr} (LocInfoE loc_16 ("t")))) at{struct_lock_test} "locked_struct")) at{struct_lock_test_inner} "b") <-{ it_layout size_t } + LocInfoE loc_17 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_17 (i2v 10 i32))) ; + locinfo: loc_6 ; + "_" <- LocInfoE loc_8 (sl_init) with + [ LocInfoE loc_9 (&(LocInfoE loc_10 ((LocInfoE loc_11 (!{LPtr} (LocInfoE loc_12 ("t")))) at{struct_lock_test} "lock"))) ] ; + Return (VOID) + ]> $∅ + )%E + |}. + + (* Definition of function [write_outside]. *) + Definition impl_write_outside : function := {| + f_args := [ + ("t", LPtr); + ("n", it_layout size_t) + ]; + f_local_vars := [ + ]; + f_init := "#0"; + f_code := ( + <[ "#0" := + locinfo: loc_33 ; + LocInfoE loc_34 ((LocInfoE loc_35 (!{LPtr} (LocInfoE loc_36 ("t")))) at{struct_lock_test} "outside") <-{ it_layout size_t } + LocInfoE loc_37 (use{it_layout size_t} (LocInfoE loc_38 ("n"))) ; + Return (VOID) + ]> $∅ + )%E + |}. + + (* Definition of function [read_outside]. *) + Definition impl_read_outside : function := {| + f_args := [ + ("t", LPtr) + ]; + f_local_vars := [ + ]; + f_init := "#0"; + f_code := ( + <[ "#0" := + locinfo: loc_41 ; + Return (LocInfoE loc_42 (use{it_layout size_t} (LocInfoE loc_43 ((LocInfoE loc_44 (!{LPtr} (LocInfoE loc_45 ("t")))) at{struct_lock_test} "outside")))) + ]> $∅ + )%E + |}. + + (* Definition of function [write_locked]. *) + Definition impl_write_locked (sl_lock sl_unlock : loc): function := {| + f_args := [ + ("t", LPtr); + ("n", it_layout size_t) + ]; + f_local_vars := [ + ]; + f_init := "#0"; + f_code := ( + <[ "#0" := + locinfo: loc_48 ; + "_" <- LocInfoE loc_69 (sl_lock) with + [ LocInfoE loc_70 (&(LocInfoE loc_71 ((LocInfoE loc_72 (!{LPtr} (LocInfoE loc_73 ("t")))) at{struct_lock_test} "lock"))) ] ; + locinfo: loc_49 ; + annot: (UnlockA) ; + expr: (LocInfoE loc_64 (&(LocInfoE loc_65 ((LocInfoE loc_66 (!{LPtr} (LocInfoE loc_67 ("t")))) at{struct_lock_test} "locked_int")))) ; + locinfo: loc_51 ; + LocInfoE loc_59 ((LocInfoE loc_60 (!{LPtr} (LocInfoE loc_61 ("t")))) at{struct_lock_test} "locked_int") <-{ it_layout size_t } + LocInfoE loc_62 (use{it_layout size_t} (LocInfoE loc_63 ("n"))) ; + locinfo: loc_52 ; + "_" <- LocInfoE loc_54 (sl_unlock) with + [ LocInfoE loc_55 (AnnotExpr 1%nat LockA (LocInfoE loc_55 (&(LocInfoE loc_56 ((LocInfoE loc_57 (!{LPtr} (LocInfoE loc_58 ("t")))) at{struct_lock_test} "lock"))))) ] ; + Return (VOID) + ]> $∅ + )%E + |}. + + (* Definition of function [read_locked]. *) + Definition impl_read_locked (sl_lock sl_unlock : loc): function := {| + f_args := [ + ("t", LPtr) + ]; + f_local_vars := [ + ("ret", it_layout size_t) + ]; + f_init := "#0"; + f_code := ( + <[ "#0" := + locinfo: loc_76 ; + "_" <- LocInfoE loc_101 (sl_lock) with + [ LocInfoE loc_102 (&(LocInfoE loc_103 ((LocInfoE loc_104 (!{LPtr} (LocInfoE loc_105 ("t")))) at{struct_lock_test} "lock"))) ] ; + locinfo: loc_77 ; + annot: (UnlockA) ; + expr: (LocInfoE loc_96 (&(LocInfoE loc_97 ((LocInfoE loc_98 (!{LPtr} (LocInfoE loc_99 ("t")))) at{struct_lock_test} "locked_int")))) ; + "ret" <-{ it_layout size_t } + LocInfoE loc_90 (use{it_layout size_t} (LocInfoE loc_91 ((LocInfoE loc_92 (!{LPtr} (LocInfoE loc_93 ("t")))) at{struct_lock_test} "locked_int"))) ; + locinfo: loc_80 ; + "_" <- LocInfoE loc_85 (sl_unlock) with + [ LocInfoE loc_86 (AnnotExpr 1%nat LockA (LocInfoE loc_86 (&(LocInfoE loc_87 ((LocInfoE loc_88 (!{LPtr} (LocInfoE loc_89 ("t")))) at{struct_lock_test} "lock"))))) ] ; + locinfo: loc_81 ; + Return (LocInfoE loc_82 (use{it_layout size_t} (LocInfoE loc_83 ("ret")))) + ]> $∅ + )%E + |}. + + (* Definition of function [increment]. *) + Definition impl_increment (sl_lock sl_unlock : loc): function := {| + f_args := [ + ("t", LPtr) + ]; + f_local_vars := [ + ("ret", it_layout size_t) + ]; + f_init := "#0"; + f_code := ( + <[ "#0" := + locinfo: loc_108 ; + "_" <- LocInfoE loc_169 (sl_lock) with + [ LocInfoE loc_170 (&(LocInfoE loc_171 ((LocInfoE loc_172 (!{LPtr} (LocInfoE loc_173 ("t")))) at{struct_lock_test} "lock"))) ] ; + locinfo: loc_109 ; + annot: (UnlockA) ; + expr: (LocInfoE loc_164 (&(LocInfoE loc_165 ((LocInfoE loc_166 (!{LPtr} (LocInfoE loc_167 ("t")))) at{struct_lock_test} "locked_struct")))) ; + locinfo: loc_156 ; + if: LocInfoE loc_156 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_156 ((LocInfoE loc_157 (use{it_layout size_t} (LocInfoE loc_158 ((LocInfoE loc_159 ((LocInfoE loc_160 (!{LPtr} (LocInfoE loc_161 ("t")))) at{struct_lock_test} "locked_struct")) at{struct_lock_test_inner} "b")))) >{IntOp size_t, IntOp size_t} (LocInfoE loc_162 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_163 (i2v 0 i32))))))) + then + locinfo: loc_131 ; + Goto "#2" + else + Goto "#3" + ]> $ + <[ "#1" := + "ret" <-{ it_layout size_t } + LocInfoE loc_123 (use{it_layout size_t} (LocInfoE loc_124 ((LocInfoE loc_125 ((LocInfoE loc_126 (!{LPtr} (LocInfoE loc_127 ("t")))) at{struct_lock_test} "locked_struct")) at{struct_lock_test_inner} "a"))) ; + locinfo: loc_113 ; + "_" <- LocInfoE loc_118 (sl_unlock) with + [ LocInfoE loc_119 (AnnotExpr 1%nat LockA (LocInfoE loc_119 (&(LocInfoE loc_120 ((LocInfoE loc_121 (!{LPtr} (LocInfoE loc_122 ("t")))) at{struct_lock_test} "lock"))))) ] ; + locinfo: loc_114 ; + Return (LocInfoE loc_115 (use{it_layout size_t} (LocInfoE loc_116 ("ret")))) + ]> $ + <[ "#2" := + locinfo: loc_131 ; + LocInfoE loc_144 ((LocInfoE loc_145 ((LocInfoE loc_146 (!{LPtr} (LocInfoE loc_147 ("t")))) at{struct_lock_test} "locked_struct")) at{struct_lock_test_inner} "a") <-{ it_layout size_t } + LocInfoE loc_148 ((LocInfoE loc_149 (use{it_layout size_t} (LocInfoE loc_150 ((LocInfoE loc_151 ((LocInfoE loc_152 (!{LPtr} (LocInfoE loc_153 ("t")))) at{struct_lock_test} "locked_struct")) at{struct_lock_test_inner} "a")))) +{IntOp size_t, IntOp size_t} (LocInfoE loc_154 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_154 (i2v 1 i32))))) ; + locinfo: loc_132 ; + LocInfoE loc_133 ((LocInfoE loc_134 ((LocInfoE loc_135 (!{LPtr} (LocInfoE loc_136 ("t")))) at{struct_lock_test} "locked_struct")) at{struct_lock_test_inner} "b") <-{ it_layout size_t } + LocInfoE loc_137 ((LocInfoE loc_138 (use{it_layout size_t} (LocInfoE loc_139 ((LocInfoE loc_140 ((LocInfoE loc_141 (!{LPtr} (LocInfoE loc_142 ("t")))) at{struct_lock_test} "locked_struct")) at{struct_lock_test_inner} "b")))) -{IntOp size_t, IntOp size_t} (LocInfoE loc_143 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_143 (i2v 1 i32))))) ; + Goto "#1" + ]> $ + <[ "#3" := + Goto "#1" + ]> $∅ + )%E + |}. +End code. diff --git a/examples/+rc+/lock/dune b/examples/+rc+/lock/dune new file mode 100644 index 0000000000000000000000000000000000000000..f1bd7ac9c9256bb082c56a76f0ca55be88073de6 --- /dev/null +++ b/examples/+rc+/lock/dune @@ -0,0 +1,5 @@ +; Generated by [refinedc], do not edit. +(coq.theory + (flags -w -notation-overridden -w -redundant-canonical-projection) + (name refinedc.examples.lock) + (theories refinedc.examples.spinlock refinedc.lang refinedc.typing refinedc.typing.automation refinedc.lithium)) diff --git a/examples/+rc+/lock/proof_files b/examples/+rc+/lock/proof_files new file mode 100644 index 0000000000000000000000000000000000000000..ca861d078fea4e1cfaa301ce1785036cd4bf999c --- /dev/null +++ b/examples/+rc+/lock/proof_files @@ -0,0 +1,11 @@ +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/lock/proof_atomic_signal_fence.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/lock/proof_atomic_thread_fence.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/lock/proof_increment.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/lock/proof_init.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/lock/proof_read_locked.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/lock/proof_read_outside.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/lock/proof_sl_init.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/lock/proof_sl_lock.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/lock/proof_sl_unlock.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/lock/proof_write_locked.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/lock/proof_write_outside.v diff --git a/theories/examples/lock/lock_proof_increment.v b/examples/+rc+/lock/proof_increment.v similarity index 85% rename from theories/examples/lock/lock_proof_increment.v rename to examples/+rc+/lock/proof_increment.v index 1f6730870a4e26985a07f73392f75eddbf33aedd..4b95dd01f77153375b09adc3678f2cdd18490158 100644 --- a/theories/examples/lock/lock_proof_increment.v +++ b/examples/+rc+/lock/proof_increment.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.lock Require Import lock_code. -From refinedc.examples.lock Require Import lock_spec. +From refinedc.examples.lock Require Import code. +From refinedc.examples.lock Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/lock/lock.c]. *) +(* Generated from [examples/lock.c]. *) Section proof_increment. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/lock/lock_proof_init.v b/examples/+rc+/lock/proof_init.v similarity index 83% rename from theories/examples/lock/lock_proof_init.v rename to examples/+rc+/lock/proof_init.v index 43cecba4235b23c73712a0602e4a7678937f963d..1ab0f3cb95ca6cf1da9006794ee22ac06b17e6f8 100644 --- a/theories/examples/lock/lock_proof_init.v +++ b/examples/+rc+/lock/proof_init.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.lock Require Import lock_code. -From refinedc.examples.lock Require Import lock_spec. +From refinedc.examples.lock Require Import code. +From refinedc.examples.lock Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/lock/lock.c]. *) +(* Generated from [examples/lock.c]. *) Section proof_init. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/lock/lock_proof_read_locked.v b/examples/+rc+/lock/proof_read_locked.v similarity index 85% rename from theories/examples/lock/lock_proof_read_locked.v rename to examples/+rc+/lock/proof_read_locked.v index 377e51dfa2084f39d6bb69bb1a43da77f2963425..7fd819e73d549e7a40e3afee60fb035ff3ce939a 100644 --- a/theories/examples/lock/lock_proof_read_locked.v +++ b/examples/+rc+/lock/proof_read_locked.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.lock Require Import lock_code. -From refinedc.examples.lock Require Import lock_spec. +From refinedc.examples.lock Require Import code. +From refinedc.examples.lock Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/lock/lock.c]. *) +(* Generated from [examples/lock.c]. *) Section proof_read_locked. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/lock/lock_proof_read_outside.v b/examples/+rc+/lock/proof_read_outside.v similarity index 83% rename from theories/examples/lock/lock_proof_read_outside.v rename to examples/+rc+/lock/proof_read_outside.v index 484781851451ce01a63fce06d2a7888971e64955..a7597c7bca1834d27cf3868aa59a7759d5edaf25 100644 --- a/theories/examples/lock/lock_proof_read_outside.v +++ b/examples/+rc+/lock/proof_read_outside.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.lock Require Import lock_code. -From refinedc.examples.lock Require Import lock_spec. +From refinedc.examples.lock Require Import code. +From refinedc.examples.lock Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/lock/lock.c]. *) +(* Generated from [examples/lock.c]. *) Section proof_read_outside. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/lock/lock_proof_write_locked.v b/examples/+rc+/lock/proof_write_locked.v similarity index 85% rename from theories/examples/lock/lock_proof_write_locked.v rename to examples/+rc+/lock/proof_write_locked.v index 717eb16588413cde50b7804c5dafb4551f89a7a8..749eccc185c6d99f50cf54e980e81973eb763a11 100644 --- a/theories/examples/lock/lock_proof_write_locked.v +++ b/examples/+rc+/lock/proof_write_locked.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.lock Require Import lock_code. -From refinedc.examples.lock Require Import lock_spec. +From refinedc.examples.lock Require Import code. +From refinedc.examples.lock Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/lock/lock.c]. *) +(* Generated from [examples/lock.c]. *) Section proof_write_locked. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/lock/lock_proof_write_outside.v b/examples/+rc+/lock/proof_write_outside.v similarity index 83% rename from theories/examples/lock/lock_proof_write_outside.v rename to examples/+rc+/lock/proof_write_outside.v index 57e594eaf373185c88e82e7dd01d11ceadca9824..899e04183f5c3525b535b5daea23197e082069d4 100644 --- a/theories/examples/lock/lock_proof_write_outside.v +++ b/examples/+rc+/lock/proof_write_outside.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.lock Require Import lock_code. -From refinedc.examples.lock Require Import lock_spec. +From refinedc.examples.lock Require Import code. +From refinedc.examples.lock Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/lock/lock.c]. *) +(* Generated from [examples/lock.c]. *) Section proof_write_outside. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/lock/lock_spec.v b/examples/+rc+/lock/spec.v similarity index 98% rename from theories/examples/lock/lock_spec.v rename to examples/+rc+/lock/spec.v index 6d88d9eaa0d11d604cfe46858069a3348e58ed08..673a5398d0e5c474e27500221dfb7f94453b3a7d 100644 --- a/theories/examples/lock/lock_spec.v +++ b/examples/+rc+/lock/spec.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.lock Require Import lock_code. +From refinedc.examples.lock Require Import code. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/lock/lock.c]. *) +(* Generated from [examples/lock.c]. *) Section spec. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/malloc1/malloc1_code.v b/examples/+rc+/malloc1/code.v similarity index 99% rename from theories/examples/malloc1/malloc1_code.v rename to examples/+rc+/malloc1/code.v index 2d366f1dcaa14ccee33592ebfcf208f9af2950ef..5213d7f40ad35cc06bc5c52ba1debe8754aa6c79 100644 --- a/theories/examples/malloc1/malloc1_code.v +++ b/examples/+rc+/malloc1/code.v @@ -3,9 +3,9 @@ From refinedc.lang Require Import tactics. From refinedc.typing Require Import annotations. Set Default Proof Using "Type". -(* Generated from [theories/examples/malloc1/malloc1.c]. *) +(* Generated from [examples/malloc1.c]. *) Section code. - Definition file_0 : string := "theories/examples/malloc1/malloc1.c". + Definition file_0 : string := "examples/malloc1.c". Definition loc_2 : location_info := LocationInfo file_0 45 4 45 17. Definition loc_3 : location_info := LocationInfo file_0 46 4 46 29. Definition loc_4 : location_info := LocationInfo file_0 47 4 47 31. diff --git a/examples/+rc+/malloc1/dune b/examples/+rc+/malloc1/dune new file mode 100644 index 0000000000000000000000000000000000000000..a6db23d53ad44be883dffb1df538ec4aa304a6e0 --- /dev/null +++ b/examples/+rc+/malloc1/dune @@ -0,0 +1,5 @@ +; Generated by [refinedc], do not edit. +(coq.theory + (flags -w -notation-overridden -w -redundant-canonical-projection) + (name refinedc.examples.malloc1) + (theories refinedc.lang refinedc.typing refinedc.typing.automation refinedc.lithium)) diff --git a/examples/+rc+/malloc1/proof_files b/examples/+rc+/malloc1/proof_files new file mode 100644 index 0000000000000000000000000000000000000000..8142751a9b668eb4e524fec2d36e275cff5225ca --- /dev/null +++ b/examples/+rc+/malloc1/proof_files @@ -0,0 +1,3 @@ +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/malloc1/proof_slab_alloc.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/malloc1/proof_slab_free.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/malloc1/proof_slab_init.v diff --git a/theories/examples/malloc1/malloc1_proof_slab_alloc.v b/examples/+rc+/malloc1/proof_slab_alloc.v similarity index 79% rename from theories/examples/malloc1/malloc1_proof_slab_alloc.v rename to examples/+rc+/malloc1/proof_slab_alloc.v index 6cd62e562a97937bd7a403c76a2ea2abfd1decd2..55894573a46a0b7a6cfefed43ca15cd371a50b83 100644 --- a/theories/examples/malloc1/malloc1_proof_slab_alloc.v +++ b/examples/+rc+/malloc1/proof_slab_alloc.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.malloc1 Require Import malloc1_code. -From refinedc.examples.malloc1 Require Import malloc1_spec. +From refinedc.examples.malloc1 Require Import code. +From refinedc.examples.malloc1 Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/malloc1/malloc1.c]. *) +(* Generated from [examples/malloc1.c]. *) Section proof_slab_alloc. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/malloc1/malloc1_proof_slab_free.v b/examples/+rc+/malloc1/proof_slab_free.v similarity index 79% rename from theories/examples/malloc1/malloc1_proof_slab_free.v rename to examples/+rc+/malloc1/proof_slab_free.v index ab4b6bc2cd4cc2ec88939d3d30d04058607c1b36..0a8a7cd95566e677c54609ed8289a79034f1bf44 100644 --- a/theories/examples/malloc1/malloc1_proof_slab_free.v +++ b/examples/+rc+/malloc1/proof_slab_free.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.malloc1 Require Import malloc1_code. -From refinedc.examples.malloc1 Require Import malloc1_spec. +From refinedc.examples.malloc1 Require Import code. +From refinedc.examples.malloc1 Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/malloc1/malloc1.c]. *) +(* Generated from [examples/malloc1.c]. *) Section proof_slab_free. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/malloc1/malloc1_proof_slab_init.v b/examples/+rc+/malloc1/proof_slab_init.v similarity index 80% rename from theories/examples/malloc1/malloc1_proof_slab_init.v rename to examples/+rc+/malloc1/proof_slab_init.v index 4dd7b48462764527026fcbe970d034eb993a3760..c6f070c97ebf6cce03f3409504784659ce46b31f 100644 --- a/theories/examples/malloc1/malloc1_proof_slab_init.v +++ b/examples/+rc+/malloc1/proof_slab_init.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.malloc1 Require Import malloc1_code. -From refinedc.examples.malloc1 Require Import malloc1_spec. +From refinedc.examples.malloc1 Require Import code. +From refinedc.examples.malloc1 Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/malloc1/malloc1.c]. *) +(* Generated from [examples/malloc1.c]. *) Section proof_slab_init. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/malloc1/malloc1_spec.v b/examples/+rc+/malloc1/spec.v similarity index 98% rename from theories/examples/malloc1/malloc1_spec.v rename to examples/+rc+/malloc1/spec.v index 9b2bf9e86bdc5d09bd9cc06e982bb5b933da143f..0b43922639fe13028a3271ad3912cf423176598e 100644 --- a/theories/examples/malloc1/malloc1_spec.v +++ b/examples/+rc+/malloc1/spec.v @@ -1,8 +1,8 @@ From refinedc.typing Require Import typing. -From refinedc.examples.malloc1 Require Import malloc1_code. +From refinedc.examples.malloc1 Require Import code. Set Default Proof Using "Type". -(* Generated from [theories/examples/malloc1/malloc1.c]. *) +(* Generated from [examples/malloc1.c]. *) Section spec. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/examples/+rc+/mpool/code.v b/examples/+rc+/mpool/code.v new file mode 100644 index 0000000000000000000000000000000000000000..aae7214b280d6331149903359b01c8a2317c3092 --- /dev/null +++ b/examples/+rc+/mpool/code.v @@ -0,0 +1,1651 @@ +From refinedc.lang Require Export notation. +From refinedc.lang Require Import tactics. +From refinedc.typing Require Import annotations. +From refinedc.examples.spinlock Require Import spinlock_annot. +Set Default Proof Using "Type". + +(* Generated from [examples/mpool.c]. *) +Section code. + Definition file_0 : string := "examples/mpool.c". + Definition loc_2 : location_info := LocationInfo file_0 224 2 224 19. + Definition loc_3 : location_info := LocationInfo file_0 224 19 224 3. + Definition loc_4 : location_info := LocationInfo file_0 227 2 229 3. + Definition loc_5 : location_info := LocationInfo file_0 231 2 231 16. + Definition loc_6 : location_info := LocationInfo file_0 232 2 232 21. + Definition loc_7 : location_info := LocationInfo file_0 234 2 234 20. + Definition loc_8 : location_info := LocationInfo file_0 235 2 235 40. + Definition loc_9 : location_info := LocationInfo file_0 235 40 235 3. + Definition loc_10 : location_info := LocationInfo file_0 236 2 236 43. + Definition loc_11 : location_info := LocationInfo file_0 237 2 237 31. + Definition loc_12 : location_info := LocationInfo file_0 238 2 238 22. + Definition loc_13 : location_info := LocationInfo file_0 240 2 240 11. + Definition loc_14 : location_info := LocationInfo file_0 240 9 240 10. + Definition loc_15 : location_info := LocationInfo file_0 238 2 238 11. + Definition loc_16 : location_info := LocationInfo file_0 238 2 238 11. + Definition loc_17 : location_info := LocationInfo file_0 238 12 238 20. + Definition loc_18 : location_info := LocationInfo file_0 238 13 238 20. + Definition loc_19 : location_info := LocationInfo file_0 238 13 238 14. + Definition loc_20 : location_info := LocationInfo file_0 238 13 238 14. + Definition loc_21 : location_info := LocationInfo file_0 237 2 237 22. + Definition loc_22 : location_info := LocationInfo file_0 237 2 237 11. + Definition loc_23 : location_info := LocationInfo file_0 237 2 237 3. + Definition loc_24 : location_info := LocationInfo file_0 237 2 237 3. + Definition loc_25 : location_info := LocationInfo file_0 237 25 237 30. + Definition loc_26 : location_info := LocationInfo file_0 237 25 237 30. + Definition loc_27 : location_info := LocationInfo file_0 236 2 236 19. + Definition loc_28 : location_info := LocationInfo file_0 236 2 236 7. + Definition loc_29 : location_info := LocationInfo file_0 236 2 236 7. + Definition loc_30 : location_info := LocationInfo file_0 236 22 236 42. + Definition loc_31 : location_info := LocationInfo file_0 236 22 236 42. + Definition loc_32 : location_info := LocationInfo file_0 236 22 236 31. + Definition loc_33 : location_info := LocationInfo file_0 236 22 236 23. + Definition loc_34 : location_info := LocationInfo file_0 236 22 236 23. + Definition loc_35 : location_info := LocationInfo file_0 235 27 235 39. + Definition loc_36 : location_info := LocationInfo file_0 235 28 235 39. + Definition loc_37 : location_info := LocationInfo file_0 235 29 235 30. + Definition loc_38 : location_info := LocationInfo file_0 235 29 235 30. + Definition loc_39 : location_info := LocationInfo file_0 234 2 234 9. + Definition loc_40 : location_info := LocationInfo file_0 234 2 234 9. + Definition loc_41 : location_info := LocationInfo file_0 234 10 234 18. + Definition loc_42 : location_info := LocationInfo file_0 234 11 234 18. + Definition loc_43 : location_info := LocationInfo file_0 234 11 234 12. + Definition loc_44 : location_info := LocationInfo file_0 234 11 234 12. + Definition loc_45 : location_info := LocationInfo file_0 232 2 232 13. + Definition loc_46 : location_info := LocationInfo file_0 232 2 232 7. + Definition loc_47 : location_info := LocationInfo file_0 232 2 232 7. + Definition loc_48 : location_info := LocationInfo file_0 232 16 232 20. + Definition loc_49 : location_info := LocationInfo file_0 232 16 232 20. + Definition loc_50 : location_info := LocationInfo file_0 231 2 231 7. + Definition loc_51 : location_info := LocationInfo file_0 231 10 231 15. + Definition loc_52 : location_info := LocationInfo file_0 231 10 231 15. + Definition loc_53 : location_info := LocationInfo file_0 227 26 229 3. + Definition loc_54 : location_info := LocationInfo file_0 228 4 228 13. + Definition loc_55 : location_info := LocationInfo file_0 228 11 228 12. + Definition loc_57 : location_info := LocationInfo file_0 227 6 227 24. + Definition loc_58 : location_info := LocationInfo file_0 227 6 227 10. + Definition loc_59 : location_info := LocationInfo file_0 227 6 227 10. + Definition loc_60 : location_info := LocationInfo file_0 227 14 227 24. + Definition loc_61 : location_info := LocationInfo file_0 227 23 227 24. + Definition loc_62 : location_info := LocationInfo file_0 224 2 224 18. + Definition loc_63 : location_info := LocationInfo file_0 224 3 224 18. + Definition loc_64 : location_info := LocationInfo file_0 224 4 224 5. + Definition loc_65 : location_info := LocationInfo file_0 224 4 224 5. + Definition loc_68 : location_info := LocationInfo file_0 334 2 334 30. + Definition loc_69 : location_info := LocationInfo file_0 335 2 335 19. + Definition loc_70 : location_info := LocationInfo file_0 335 19 335 3. + Definition loc_71 : location_info := LocationInfo file_0 338 2 338 20. + Definition loc_72 : location_info := LocationInfo file_0 339 2 339 40. + Definition loc_73 : location_info := LocationInfo file_0 339 40 339 3. + Definition loc_74 : location_info := LocationInfo file_0 340 2 340 33. + Definition loc_75 : location_info := LocationInfo file_0 341 2 341 27. + Definition loc_76 : location_info := LocationInfo file_0 342 2 342 22. + Definition loc_77 : location_info := LocationInfo file_0 342 2 342 11. + Definition loc_78 : location_info := LocationInfo file_0 342 2 342 11. + Definition loc_79 : location_info := LocationInfo file_0 342 12 342 20. + Definition loc_80 : location_info := LocationInfo file_0 342 13 342 20. + Definition loc_81 : location_info := LocationInfo file_0 342 13 342 14. + Definition loc_82 : location_info := LocationInfo file_0 342 13 342 14. + Definition loc_83 : location_info := LocationInfo file_0 341 2 341 22. + Definition loc_84 : location_info := LocationInfo file_0 341 2 341 11. + Definition loc_85 : location_info := LocationInfo file_0 341 2 341 3. + Definition loc_86 : location_info := LocationInfo file_0 341 2 341 3. + Definition loc_87 : location_info := LocationInfo file_0 341 25 341 26. + Definition loc_88 : location_info := LocationInfo file_0 341 25 341 26. + Definition loc_89 : location_info := LocationInfo file_0 340 2 340 9. + Definition loc_90 : location_info := LocationInfo file_0 340 2 340 3. + Definition loc_91 : location_info := LocationInfo file_0 340 2 340 3. + Definition loc_92 : location_info := LocationInfo file_0 340 12 340 32. + Definition loc_93 : location_info := LocationInfo file_0 340 12 340 32. + Definition loc_94 : location_info := LocationInfo file_0 340 12 340 21. + Definition loc_95 : location_info := LocationInfo file_0 340 12 340 13. + Definition loc_96 : location_info := LocationInfo file_0 340 12 340 13. + Definition loc_97 : location_info := LocationInfo file_0 339 27 339 39. + Definition loc_98 : location_info := LocationInfo file_0 339 28 339 39. + Definition loc_99 : location_info := LocationInfo file_0 339 29 339 30. + Definition loc_100 : location_info := LocationInfo file_0 339 29 339 30. + Definition loc_101 : location_info := LocationInfo file_0 338 2 338 9. + Definition loc_102 : location_info := LocationInfo file_0 338 2 338 9. + Definition loc_103 : location_info := LocationInfo file_0 338 10 338 18. + Definition loc_104 : location_info := LocationInfo file_0 338 11 338 18. + Definition loc_105 : location_info := LocationInfo file_0 338 11 338 12. + Definition loc_106 : location_info := LocationInfo file_0 338 11 338 12. + Definition loc_107 : location_info := LocationInfo file_0 335 2 335 18. + Definition loc_108 : location_info := LocationInfo file_0 335 3 335 18. + Definition loc_109 : location_info := LocationInfo file_0 335 4 335 5. + Definition loc_110 : location_info := LocationInfo file_0 335 4 335 5. + Definition loc_111 : location_info := LocationInfo file_0 334 26 334 29. + Definition loc_112 : location_info := LocationInfo file_0 334 26 334 29. + Definition loc_117 : location_info := LocationInfo file_0 111 2 111 29. + Definition loc_118 : location_info := LocationInfo file_0 112 2 112 40. + Definition loc_119 : location_info := LocationInfo file_0 113 2 113 40. + Definition loc_120 : location_info := LocationInfo file_0 114 2 114 31. + Definition loc_121 : location_info := LocationInfo file_0 115 2 115 20. + Definition loc_122 : location_info := LocationInfo file_0 115 2 115 9. + Definition loc_123 : location_info := LocationInfo file_0 115 2 115 9. + Definition loc_124 : location_info := LocationInfo file_0 115 10 115 18. + Definition loc_125 : location_info := LocationInfo file_0 115 11 115 18. + Definition loc_126 : location_info := LocationInfo file_0 115 11 115 12. + Definition loc_127 : location_info := LocationInfo file_0 115 11 115 12. + Definition loc_128 : location_info := LocationInfo file_0 114 2 114 13. + Definition loc_129 : location_info := LocationInfo file_0 114 2 114 3. + Definition loc_130 : location_info := LocationInfo file_0 114 2 114 3. + Definition loc_131 : location_info := LocationInfo file_0 114 16 114 30. + Definition loc_132 : location_info := LocationInfo file_0 113 2 113 22. + Definition loc_133 : location_info := LocationInfo file_0 113 2 113 11. + Definition loc_134 : location_info := LocationInfo file_0 113 2 113 3. + Definition loc_135 : location_info := LocationInfo file_0 113 2 113 3. + Definition loc_136 : location_info := LocationInfo file_0 113 25 113 39. + Definition loc_137 : location_info := LocationInfo file_0 112 2 112 22. + Definition loc_138 : location_info := LocationInfo file_0 112 2 112 11. + Definition loc_139 : location_info := LocationInfo file_0 112 2 112 3. + Definition loc_140 : location_info := LocationInfo file_0 112 2 112 3. + Definition loc_141 : location_info := LocationInfo file_0 112 25 112 39. + Definition loc_142 : location_info := LocationInfo file_0 111 2 111 15. + Definition loc_143 : location_info := LocationInfo file_0 111 2 111 3. + Definition loc_144 : location_info := LocationInfo file_0 111 2 111 3. + Definition loc_145 : location_info := LocationInfo file_0 111 18 111 28. + Definition loc_146 : location_info := LocationInfo file_0 111 18 111 28. + Definition loc_149 : location_info := LocationInfo file_0 130 2 130 34. + Definition loc_150 : location_info := LocationInfo file_0 132 2 132 23. + Definition loc_151 : location_info := LocationInfo file_0 133 2 133 43. + Definition loc_152 : location_info := LocationInfo file_0 133 43 133 3. + Definition loc_153 : location_info := LocationInfo file_0 135 2 135 49. + Definition loc_154 : location_info := LocationInfo file_0 136 2 136 49. + Definition loc_155 : location_info := LocationInfo file_0 137 2 137 31. + Definition loc_156 : location_info := LocationInfo file_0 139 2 139 43. + Definition loc_157 : location_info := LocationInfo file_0 140 2 140 43. + Definition loc_158 : location_info := LocationInfo file_0 143 2 143 25. + Definition loc_159 : location_info := LocationInfo file_0 143 2 143 11. + Definition loc_160 : location_info := LocationInfo file_0 143 2 143 11. + Definition loc_161 : location_info := LocationInfo file_0 143 12 143 23. + Definition loc_162 : location_info := LocationInfo file_0 143 13 143 23. + Definition loc_163 : location_info := LocationInfo file_0 143 13 143 17. + Definition loc_164 : location_info := LocationInfo file_0 143 13 143 17. + Definition loc_165 : location_info := LocationInfo file_0 140 2 140 25. + Definition loc_166 : location_info := LocationInfo file_0 140 2 140 14. + Definition loc_167 : location_info := LocationInfo file_0 140 2 140 6. + Definition loc_168 : location_info := LocationInfo file_0 140 2 140 6. + Definition loc_169 : location_info := LocationInfo file_0 140 28 140 42. + Definition loc_170 : location_info := LocationInfo file_0 139 2 139 25. + Definition loc_171 : location_info := LocationInfo file_0 139 2 139 14. + Definition loc_172 : location_info := LocationInfo file_0 139 2 139 6. + Definition loc_173 : location_info := LocationInfo file_0 139 2 139 6. + Definition loc_174 : location_info := LocationInfo file_0 139 28 139 42. + Definition loc_175 : location_info := LocationInfo file_0 137 2 137 13. + Definition loc_176 : location_info := LocationInfo file_0 137 2 137 3. + Definition loc_177 : location_info := LocationInfo file_0 137 2 137 3. + Definition loc_178 : location_info := LocationInfo file_0 137 16 137 30. + Definition loc_179 : location_info := LocationInfo file_0 137 16 137 30. + Definition loc_180 : location_info := LocationInfo file_0 137 16 137 20. + Definition loc_181 : location_info := LocationInfo file_0 137 16 137 20. + Definition loc_182 : location_info := LocationInfo file_0 136 2 136 22. + Definition loc_183 : location_info := LocationInfo file_0 136 2 136 11. + Definition loc_184 : location_info := LocationInfo file_0 136 2 136 3. + Definition loc_185 : location_info := LocationInfo file_0 136 2 136 3. + Definition loc_186 : location_info := LocationInfo file_0 136 25 136 48. + Definition loc_187 : location_info := LocationInfo file_0 136 25 136 48. + Definition loc_188 : location_info := LocationInfo file_0 136 25 136 37. + Definition loc_189 : location_info := LocationInfo file_0 136 25 136 29. + Definition loc_190 : location_info := LocationInfo file_0 136 25 136 29. + Definition loc_191 : location_info := LocationInfo file_0 135 2 135 22. + Definition loc_192 : location_info := LocationInfo file_0 135 2 135 11. + Definition loc_193 : location_info := LocationInfo file_0 135 2 135 3. + Definition loc_194 : location_info := LocationInfo file_0 135 2 135 3. + Definition loc_195 : location_info := LocationInfo file_0 135 25 135 48. + Definition loc_196 : location_info := LocationInfo file_0 135 25 135 48. + Definition loc_197 : location_info := LocationInfo file_0 135 25 135 37. + Definition loc_198 : location_info := LocationInfo file_0 135 25 135 29. + Definition loc_199 : location_info := LocationInfo file_0 135 25 135 29. + Definition loc_200 : location_info := LocationInfo file_0 133 27 133 42. + Definition loc_201 : location_info := LocationInfo file_0 133 28 133 42. + Definition loc_202 : location_info := LocationInfo file_0 133 29 133 33. + Definition loc_203 : location_info := LocationInfo file_0 133 29 133 33. + Definition loc_204 : location_info := LocationInfo file_0 132 2 132 9. + Definition loc_205 : location_info := LocationInfo file_0 132 2 132 9. + Definition loc_206 : location_info := LocationInfo file_0 132 10 132 21. + Definition loc_207 : location_info := LocationInfo file_0 132 11 132 21. + Definition loc_208 : location_info := LocationInfo file_0 132 11 132 15. + Definition loc_209 : location_info := LocationInfo file_0 132 11 132 15. + Definition loc_210 : location_info := LocationInfo file_0 130 2 130 12. + Definition loc_211 : location_info := LocationInfo file_0 130 2 130 12. + Definition loc_212 : location_info := LocationInfo file_0 130 13 130 14. + Definition loc_213 : location_info := LocationInfo file_0 130 13 130 14. + Definition loc_214 : location_info := LocationInfo file_0 130 16 130 32. + Definition loc_215 : location_info := LocationInfo file_0 130 16 130 32. + Definition loc_216 : location_info := LocationInfo file_0 130 16 130 20. + Definition loc_217 : location_info := LocationInfo file_0 130 16 130 20. + Definition loc_220 : location_info := LocationInfo file_0 155 2 155 38. + Definition loc_221 : location_info := LocationInfo file_0 156 2 156 25. + Definition loc_222 : location_info := LocationInfo file_0 156 2 156 13. + Definition loc_223 : location_info := LocationInfo file_0 156 2 156 3. + Definition loc_224 : location_info := LocationInfo file_0 156 2 156 3. + Definition loc_225 : location_info := LocationInfo file_0 156 16 156 24. + Definition loc_226 : location_info := LocationInfo file_0 156 16 156 24. + Definition loc_227 : location_info := LocationInfo file_0 155 2 155 12. + Definition loc_228 : location_info := LocationInfo file_0 155 2 155 12. + Definition loc_229 : location_info := LocationInfo file_0 155 13 155 14. + Definition loc_230 : location_info := LocationInfo file_0 155 13 155 14. + Definition loc_231 : location_info := LocationInfo file_0 155 16 155 36. + Definition loc_232 : location_info := LocationInfo file_0 155 16 155 36. + Definition loc_233 : location_info := LocationInfo file_0 155 16 155 24. + Definition loc_234 : location_info := LocationInfo file_0 155 16 155 24. + Definition loc_237 : location_info := LocationInfo file_0 170 2 172 3. + Definition loc_238 : location_info := LocationInfo file_0 174 2 174 31. + Definition loc_239 : location_info := LocationInfo file_0 175 2 175 31. + Definition loc_240 : location_info := LocationInfo file_0 180 2 184 3. + Definition loc_241 : location_info := LocationInfo file_0 190 2 196 3. + Definition loc_242 : location_info := LocationInfo file_0 198 2 198 40. + Definition loc_243 : location_info := LocationInfo file_0 199 2 199 40. + Definition loc_244 : location_info := LocationInfo file_0 200 2 200 31. + Definition loc_245 : location_info := LocationInfo file_0 200 2 200 13. + Definition loc_246 : location_info := LocationInfo file_0 200 2 200 3. + Definition loc_247 : location_info := LocationInfo file_0 200 2 200 3. + Definition loc_248 : location_info := LocationInfo file_0 200 16 200 30. + Definition loc_249 : location_info := LocationInfo file_0 199 2 199 22. + Definition loc_250 : location_info := LocationInfo file_0 199 2 199 11. + Definition loc_251 : location_info := LocationInfo file_0 199 2 199 3. + Definition loc_252 : location_info := LocationInfo file_0 199 2 199 3. + Definition loc_253 : location_info := LocationInfo file_0 199 25 199 39. + Definition loc_254 : location_info := LocationInfo file_0 198 2 198 22. + Definition loc_255 : location_info := LocationInfo file_0 198 2 198 11. + Definition loc_256 : location_info := LocationInfo file_0 198 2 198 3. + Definition loc_257 : location_info := LocationInfo file_0 198 2 198 3. + Definition loc_258 : location_info := LocationInfo file_0 198 25 198 39. + Definition loc_259 : location_info := LocationInfo file_0 190 2 196 3. + Definition loc_260 : location_info := LocationInfo file_0 190 34 196 3. + Definition loc_261 : location_info := LocationInfo file_0 191 4 191 23. + Definition loc_262 : location_info := LocationInfo file_0 192 4 192 30. + Definition loc_263 : location_info := LocationInfo file_0 194 4 194 30. + Definition loc_264 : location_info := LocationInfo file_0 195 4 195 45. + Definition loc_265 : location_info := LocationInfo file_0 190 2 196 3. + Definition loc_266 : location_info := LocationInfo file_0 190 2 196 3. + Definition loc_267 : location_info := LocationInfo file_0 195 4 195 19. + Definition loc_268 : location_info := LocationInfo file_0 195 4 195 19. + Definition loc_269 : location_info := LocationInfo file_0 195 20 195 31. + Definition loc_270 : location_info := LocationInfo file_0 195 20 195 31. + Definition loc_271 : location_info := LocationInfo file_0 195 20 195 21. + Definition loc_272 : location_info := LocationInfo file_0 195 20 195 21. + Definition loc_273 : location_info := LocationInfo file_0 195 33 195 37. + Definition loc_274 : location_info := LocationInfo file_0 195 33 195 37. + Definition loc_275 : location_info := LocationInfo file_0 195 39 195 43. + Definition loc_276 : location_info := LocationInfo file_0 195 39 195 43. + Definition loc_277 : location_info := LocationInfo file_0 194 4 194 9. + Definition loc_278 : location_info := LocationInfo file_0 194 12 194 29. + Definition loc_279 : location_info := LocationInfo file_0 194 12 194 29. + Definition loc_280 : location_info := LocationInfo file_0 194 12 194 17. + Definition loc_281 : location_info := LocationInfo file_0 194 12 194 17. + Definition loc_282 : location_info := LocationInfo file_0 192 18 192 29. + Definition loc_283 : location_info := LocationInfo file_0 192 18 192 29. + Definition loc_284 : location_info := LocationInfo file_0 192 18 192 23. + Definition loc_285 : location_info := LocationInfo file_0 192 18 192 23. + Definition loc_288 : location_info := LocationInfo file_0 191 17 191 22. + Definition loc_289 : location_info := LocationInfo file_0 191 17 191 22. + Definition loc_292 : location_info := LocationInfo file_0 190 9 190 32. + Definition loc_293 : location_info := LocationInfo file_0 190 9 190 14. + Definition loc_294 : location_info := LocationInfo file_0 190 9 190 14. + Definition loc_295 : location_info := LocationInfo file_0 190 18 190 32. + Definition loc_296 : location_info := LocationInfo file_0 180 2 184 3. + Definition loc_297 : location_info := LocationInfo file_0 180 34 184 3. + Definition loc_298 : location_info := LocationInfo file_0 181 4 181 23. + Definition loc_299 : location_info := LocationInfo file_0 182 4 182 24. + Definition loc_300 : location_info := LocationInfo file_0 183 4 183 34. + Definition loc_301 : location_info := LocationInfo file_0 180 2 184 3. + Definition loc_302 : location_info := LocationInfo file_0 180 2 184 3. + Definition loc_303 : location_info := LocationInfo file_0 183 4 183 14. + Definition loc_304 : location_info := LocationInfo file_0 183 4 183 14. + Definition loc_305 : location_info := LocationInfo file_0 183 15 183 26. + Definition loc_306 : location_info := LocationInfo file_0 183 15 183 26. + Definition loc_307 : location_info := LocationInfo file_0 183 15 183 16. + Definition loc_308 : location_info := LocationInfo file_0 183 15 183 16. + Definition loc_309 : location_info := LocationInfo file_0 183 28 183 32. + Definition loc_310 : location_info := LocationInfo file_0 183 28 183 32. + Definition loc_311 : location_info := LocationInfo file_0 182 4 182 9. + Definition loc_312 : location_info := LocationInfo file_0 182 12 182 23. + Definition loc_313 : location_info := LocationInfo file_0 182 12 182 23. + Definition loc_314 : location_info := LocationInfo file_0 182 12 182 17. + Definition loc_315 : location_info := LocationInfo file_0 182 12 182 17. + Definition loc_316 : location_info := LocationInfo file_0 181 17 181 22. + Definition loc_317 : location_info := LocationInfo file_0 181 17 181 22. + Definition loc_320 : location_info := LocationInfo file_0 180 9 180 32. + Definition loc_321 : location_info := LocationInfo file_0 180 9 180 14. + Definition loc_322 : location_info := LocationInfo file_0 180 9 180 14. + Definition loc_323 : location_info := LocationInfo file_0 180 18 180 32. + Definition loc_324 : location_info := LocationInfo file_0 175 2 175 7. + Definition loc_325 : location_info := LocationInfo file_0 175 10 175 30. + Definition loc_326 : location_info := LocationInfo file_0 175 10 175 30. + Definition loc_327 : location_info := LocationInfo file_0 175 10 175 19. + Definition loc_328 : location_info := LocationInfo file_0 175 10 175 11. + Definition loc_329 : location_info := LocationInfo file_0 175 10 175 11. + Definition loc_330 : location_info := LocationInfo file_0 174 2 174 7. + Definition loc_331 : location_info := LocationInfo file_0 174 10 174 30. + Definition loc_332 : location_info := LocationInfo file_0 174 10 174 30. + Definition loc_333 : location_info := LocationInfo file_0 174 10 174 19. + Definition loc_334 : location_info := LocationInfo file_0 174 10 174 11. + Definition loc_335 : location_info := LocationInfo file_0 174 10 174 11. + Definition loc_336 : location_info := LocationInfo file_0 170 37 172 3. + Definition loc_337 : location_info := LocationInfo file_0 171 4 171 11. + Definition loc_340 : location_info := LocationInfo file_0 170 6 170 35. + Definition loc_341 : location_info := LocationInfo file_0 170 6 170 17. + Definition loc_342 : location_info := LocationInfo file_0 170 6 170 17. + Definition loc_343 : location_info := LocationInfo file_0 170 6 170 7. + Definition loc_344 : location_info := LocationInfo file_0 170 6 170 7. + Definition loc_345 : location_info := LocationInfo file_0 170 21 170 35. + Definition loc_348 : location_info := LocationInfo file_0 260 2 260 20. + Definition loc_349 : location_info := LocationInfo file_0 261 2 261 40. + Definition loc_350 : location_info := LocationInfo file_0 261 40 261 3. + Definition loc_351 : location_info := LocationInfo file_0 262 2 268 3. + Definition loc_352 : location_info := LocationInfo file_0 271 2 271 31. + Definition loc_353 : location_info := LocationInfo file_0 272 2 276 3. + Definition loc_354 : location_info := LocationInfo file_0 278 2 285 3. + Definition loc_355 : location_info := LocationInfo file_0 287 2 287 14. + Definition loc_356 : location_info := LocationInfo file_0 287 14 290 22. + Definition loc_357 : location_info := LocationInfo file_0 290 2 290 22. + Definition loc_358 : location_info := LocationInfo file_0 292 2 292 13. + Definition loc_359 : location_info := LocationInfo file_0 292 9 292 12. + Definition loc_360 : location_info := LocationInfo file_0 292 9 292 12. + Definition loc_361 : location_info := LocationInfo file_0 290 2 290 11. + Definition loc_362 : location_info := LocationInfo file_0 290 2 290 11. + Definition loc_363 : location_info := LocationInfo file_0 290 12 290 20. + Definition loc_364 : location_info := LocationInfo file_0 290 13 290 20. + Definition loc_365 : location_info := LocationInfo file_0 290 13 290 14. + Definition loc_366 : location_info := LocationInfo file_0 290 13 290 14. + Definition loc_367 : location_info := LocationInfo file_0 287 2 287 5. + Definition loc_368 : location_info := LocationInfo file_0 287 8 287 13. + Definition loc_369 : location_info := LocationInfo file_0 287 8 287 13. + Definition loc_370 : location_info := LocationInfo file_0 278 36 280 3. + Definition loc_371 : location_info := LocationInfo file_0 279 4 279 45. + Definition loc_372 : location_info := LocationInfo file_0 279 4 279 24. + Definition loc_373 : location_info := LocationInfo file_0 279 4 279 13. + Definition loc_374 : location_info := LocationInfo file_0 279 4 279 5. + Definition loc_375 : location_info := LocationInfo file_0 279 4 279 5. + Definition loc_376 : location_info := LocationInfo file_0 279 27 279 44. + Definition loc_377 : location_info := LocationInfo file_0 279 27 279 44. + Definition loc_378 : location_info := LocationInfo file_0 279 27 279 32. + Definition loc_379 : location_info := LocationInfo file_0 279 27 279 32. + Definition loc_380 : location_info := LocationInfo file_0 280 9 285 3. + Definition loc_381 : location_info := LocationInfo file_0 281 4 281 79. + Definition loc_382 : location_info := LocationInfo file_0 282 4 282 46. + Definition loc_383 : location_info := LocationInfo file_0 283 4 283 50. + Definition loc_384 : location_info := LocationInfo file_0 284 4 284 37. + Definition loc_385 : location_info := LocationInfo file_0 284 4 284 24. + Definition loc_386 : location_info := LocationInfo file_0 284 4 284 13. + Definition loc_387 : location_info := LocationInfo file_0 284 4 284 5. + Definition loc_388 : location_info := LocationInfo file_0 284 4 284 5. + Definition loc_389 : location_info := LocationInfo file_0 284 27 284 36. + Definition loc_390 : location_info := LocationInfo file_0 284 27 284 36. + Definition loc_391 : location_info := LocationInfo file_0 283 4 283 19. + Definition loc_392 : location_info := LocationInfo file_0 283 4 283 13. + Definition loc_393 : location_info := LocationInfo file_0 283 4 283 13. + Definition loc_394 : location_info := LocationInfo file_0 283 22 283 49. + Definition loc_395 : location_info := LocationInfo file_0 283 22 283 33. + Definition loc_396 : location_info := LocationInfo file_0 283 22 283 33. + Definition loc_397 : location_info := LocationInfo file_0 283 22 283 27. + Definition loc_398 : location_info := LocationInfo file_0 283 22 283 27. + Definition loc_399 : location_info := LocationInfo file_0 283 36 283 49. + Definition loc_400 : location_info := LocationInfo file_0 283 36 283 49. + Definition loc_401 : location_info := LocationInfo file_0 283 36 283 37. + Definition loc_402 : location_info := LocationInfo file_0 283 36 283 37. + Definition loc_403 : location_info := LocationInfo file_0 282 4 282 25. + Definition loc_404 : location_info := LocationInfo file_0 282 4 282 13. + Definition loc_405 : location_info := LocationInfo file_0 282 4 282 13. + Definition loc_406 : location_info := LocationInfo file_0 282 28 282 45. + Definition loc_407 : location_info := LocationInfo file_0 282 28 282 45. + Definition loc_408 : location_info := LocationInfo file_0 282 28 282 33. + Definition loc_409 : location_info := LocationInfo file_0 282 28 282 33. + Definition loc_410 : location_info := LocationInfo file_0 281 4 281 13. + Definition loc_411 : location_info := LocationInfo file_0 281 16 281 78. + Definition loc_412 : location_info := LocationInfo file_0 281 38 281 78. + Definition loc_413 : location_info := LocationInfo file_0 281 39 281 61. + Definition loc_414 : location_info := LocationInfo file_0 281 56 281 61. + Definition loc_415 : location_info := LocationInfo file_0 281 56 281 61. + Definition loc_416 : location_info := LocationInfo file_0 281 64 281 77. + Definition loc_417 : location_info := LocationInfo file_0 281 64 281 77. + Definition loc_418 : location_info := LocationInfo file_0 281 64 281 65. + Definition loc_419 : location_info := LocationInfo file_0 281 64 281 65. + Definition loc_420 : location_info := LocationInfo file_0 278 6 278 34. + Definition loc_421 : location_info := LocationInfo file_0 278 6 278 19. + Definition loc_422 : location_info := LocationInfo file_0 278 6 278 19. + Definition loc_423 : location_info := LocationInfo file_0 278 6 278 7. + Definition loc_424 : location_info := LocationInfo file_0 278 6 278 7. + Definition loc_425 : location_info := LocationInfo file_0 278 23 278 34. + Definition loc_426 : location_info := LocationInfo file_0 278 23 278 34. + Definition loc_427 : location_info := LocationInfo file_0 278 23 278 28. + Definition loc_428 : location_info := LocationInfo file_0 278 23 278 28. + Definition loc_429 : location_info := LocationInfo file_0 272 31 276 3. + Definition loc_430 : location_info := LocationInfo file_0 274 4 274 25. + Definition loc_431 : location_info := LocationInfo file_0 275 4 275 14. + Definition loc_432 : location_info := LocationInfo file_0 274 4 274 7. + Definition loc_433 : location_info := LocationInfo file_0 274 10 274 24. + Definition loc_435 : location_info := LocationInfo file_0 272 6 272 29. + Definition loc_436 : location_info := LocationInfo file_0 272 6 272 11. + Definition loc_437 : location_info := LocationInfo file_0 272 6 272 11. + Definition loc_438 : location_info := LocationInfo file_0 272 15 272 29. + Definition loc_439 : location_info := LocationInfo file_0 271 2 271 7. + Definition loc_440 : location_info := LocationInfo file_0 271 10 271 30. + Definition loc_441 : location_info := LocationInfo file_0 271 10 271 30. + Definition loc_442 : location_info := LocationInfo file_0 271 10 271 19. + Definition loc_443 : location_info := LocationInfo file_0 271 10 271 11. + Definition loc_444 : location_info := LocationInfo file_0 271 10 271 11. + Definition loc_445 : location_info := LocationInfo file_0 262 46 268 3. + Definition loc_446 : location_info := LocationInfo file_0 263 4 263 53. + Definition loc_447 : location_info := LocationInfo file_0 265 4 265 39. + Definition loc_448 : location_info := LocationInfo file_0 266 4 266 16. + Definition loc_449 : location_info := LocationInfo file_0 267 4 267 14. + Definition loc_450 : location_info := LocationInfo file_0 266 4 266 7. + Definition loc_451 : location_info := LocationInfo file_0 266 10 266 15. + Definition loc_452 : location_info := LocationInfo file_0 266 10 266 15. + Definition loc_453 : location_info := LocationInfo file_0 265 4 265 24. + Definition loc_454 : location_info := LocationInfo file_0 265 4 265 13. + Definition loc_455 : location_info := LocationInfo file_0 265 4 265 5. + Definition loc_456 : location_info := LocationInfo file_0 265 4 265 5. + Definition loc_457 : location_info := LocationInfo file_0 265 27 265 38. + Definition loc_458 : location_info := LocationInfo file_0 265 27 265 38. + Definition loc_459 : location_info := LocationInfo file_0 265 27 265 32. + Definition loc_460 : location_info := LocationInfo file_0 265 27 265 32. + Definition loc_461 : location_info := LocationInfo file_0 263 32 263 52. + Definition loc_462 : location_info := LocationInfo file_0 263 32 263 52. + Definition loc_463 : location_info := LocationInfo file_0 263 32 263 41. + Definition loc_464 : location_info := LocationInfo file_0 263 32 263 33. + Definition loc_465 : location_info := LocationInfo file_0 263 32 263 33. + Definition loc_469 : location_info := LocationInfo file_0 262 6 262 44. + Definition loc_470 : location_info := LocationInfo file_0 262 6 262 26. + Definition loc_471 : location_info := LocationInfo file_0 262 6 262 26. + Definition loc_472 : location_info := LocationInfo file_0 262 6 262 15. + Definition loc_473 : location_info := LocationInfo file_0 262 6 262 7. + Definition loc_474 : location_info := LocationInfo file_0 262 6 262 7. + Definition loc_475 : location_info := LocationInfo file_0 262 30 262 44. + Definition loc_476 : location_info := LocationInfo file_0 261 27 261 39. + Definition loc_477 : location_info := LocationInfo file_0 261 28 261 39. + Definition loc_478 : location_info := LocationInfo file_0 261 29 261 30. + Definition loc_479 : location_info := LocationInfo file_0 261 29 261 30. + Definition loc_480 : location_info := LocationInfo file_0 260 2 260 9. + Definition loc_481 : location_info := LocationInfo file_0 260 2 260 9. + Definition loc_482 : location_info := LocationInfo file_0 260 10 260 18. + Definition loc_483 : location_info := LocationInfo file_0 260 11 260 18. + Definition loc_484 : location_info := LocationInfo file_0 260 11 260 12. + Definition loc_485 : location_info := LocationInfo file_0 260 11 260 12. + Definition loc_488 : location_info := LocationInfo file_0 305 2 305 41. + Definition loc_489 : location_info := LocationInfo file_0 306 2 308 3. + Definition loc_490 : location_info := LocationInfo file_0 309 2 309 18. + Definition loc_491 : location_info := LocationInfo file_0 313 2 319 3. + Definition loc_492 : location_info := LocationInfo file_0 321 2 321 24. + Definition loc_493 : location_info := LocationInfo file_0 321 9 321 23. + Definition loc_494 : location_info := LocationInfo file_0 313 2 319 3. + Definition loc_495 : location_info := LocationInfo file_0 313 30 319 3. + Definition loc_496 : location_info := LocationInfo file_0 314 4 314 37. + Definition loc_497 : location_info := LocationInfo file_0 315 4 317 5. + Definition loc_498 : location_info := LocationInfo file_0 318 4 318 20. + Definition loc_499 : location_info := LocationInfo file_0 313 2 319 3. + Definition loc_500 : location_info := LocationInfo file_0 313 2 319 3. + Definition loc_501 : location_info := LocationInfo file_0 318 4 318 5. + Definition loc_502 : location_info := LocationInfo file_0 318 8 318 19. + Definition loc_503 : location_info := LocationInfo file_0 318 8 318 19. + Definition loc_504 : location_info := LocationInfo file_0 318 8 318 9. + Definition loc_505 : location_info := LocationInfo file_0 318 8 318 9. + Definition loc_506 : location_info := LocationInfo file_0 315 31 317 5. + Definition loc_507 : location_info := LocationInfo file_0 316 6 316 17. + Definition loc_508 : location_info := LocationInfo file_0 316 13 316 16. + Definition loc_509 : location_info := LocationInfo file_0 316 13 316 16. + Definition loc_511 : location_info := LocationInfo file_0 315 8 315 29. + Definition loc_512 : location_info := LocationInfo file_0 315 8 315 11. + Definition loc_513 : location_info := LocationInfo file_0 315 8 315 11. + Definition loc_514 : location_info := LocationInfo file_0 315 15 315 29. + Definition loc_515 : location_info := LocationInfo file_0 314 4 314 7. + Definition loc_516 : location_info := LocationInfo file_0 314 10 314 36. + Definition loc_517 : location_info := LocationInfo file_0 314 10 314 33. + Definition loc_518 : location_info := LocationInfo file_0 314 10 314 33. + Definition loc_519 : location_info := LocationInfo file_0 314 34 314 35. + Definition loc_520 : location_info := LocationInfo file_0 314 34 314 35. + Definition loc_521 : location_info := LocationInfo file_0 313 9 313 28. + Definition loc_522 : location_info := LocationInfo file_0 313 9 313 10. + Definition loc_523 : location_info := LocationInfo file_0 313 9 313 10. + Definition loc_524 : location_info := LocationInfo file_0 313 14 313 28. + Definition loc_525 : location_info := LocationInfo file_0 309 2 309 3. + Definition loc_526 : location_info := LocationInfo file_0 309 6 309 17. + Definition loc_527 : location_info := LocationInfo file_0 309 6 309 17. + Definition loc_528 : location_info := LocationInfo file_0 309 6 309 7. + Definition loc_529 : location_info := LocationInfo file_0 309 6 309 7. + Definition loc_530 : location_info := LocationInfo file_0 306 29 308 3. + Definition loc_531 : location_info := LocationInfo file_0 307 4 307 15. + Definition loc_532 : location_info := LocationInfo file_0 307 11 307 14. + Definition loc_533 : location_info := LocationInfo file_0 307 11 307 14. + Definition loc_535 : location_info := LocationInfo file_0 306 6 306 27. + Definition loc_536 : location_info := LocationInfo file_0 306 6 306 9. + Definition loc_537 : location_info := LocationInfo file_0 306 6 306 9. + Definition loc_538 : location_info := LocationInfo file_0 306 13 306 27. + Definition loc_539 : location_info := LocationInfo file_0 305 14 305 40. + Definition loc_540 : location_info := LocationInfo file_0 305 14 305 37. + Definition loc_541 : location_info := LocationInfo file_0 305 14 305 37. + Definition loc_542 : location_info := LocationInfo file_0 305 38 305 39. + Definition loc_543 : location_info := LocationInfo file_0 305 38 305 39. + Definition loc_548 : location_info := LocationInfo file_0 362 2 362 29. + Definition loc_549 : location_info := LocationInfo file_0 364 2 364 25. + Definition loc_550 : location_info := LocationInfo file_0 366 2 366 20. + Definition loc_551 : location_info := LocationInfo file_0 367 2 367 40. + Definition loc_552 : location_info := LocationInfo file_0 367 40 367 3. + Definition loc_553 : location_info := LocationInfo file_0 373 2 373 31. + Definition loc_554 : location_info := LocationInfo file_0 383 2 429 3. + Definition loc_555 : location_info := LocationInfo file_0 430 2 430 11. + Definition loc_556 : location_info := LocationInfo file_0 430 11 430 3. + Definition loc_557 : location_info := LocationInfo file_0 432 2 432 22. + Definition loc_558 : location_info := LocationInfo file_0 434 2 434 13. + Definition loc_559 : location_info := LocationInfo file_0 434 9 434 12. + Definition loc_560 : location_info := LocationInfo file_0 434 9 434 12. + Definition loc_561 : location_info := LocationInfo file_0 432 2 432 11. + Definition loc_562 : location_info := LocationInfo file_0 432 2 432 11. + Definition loc_563 : location_info := LocationInfo file_0 432 12 432 20. + Definition loc_564 : location_info := LocationInfo file_0 432 13 432 20. + Definition loc_565 : location_info := LocationInfo file_0 432 13 432 14. + Definition loc_566 : location_info := LocationInfo file_0 432 13 432 14. + Definition loc_567 : location_info := LocationInfo file_0 430 2 430 10. + Definition loc_568 : location_info := LocationInfo file_0 430 3 430 10. + Definition loc_569 : location_info := LocationInfo file_0 430 5 430 9. + Definition loc_570 : location_info := LocationInfo file_0 430 5 430 9. + Definition loc_571 : location_info := LocationInfo file_0 383 2 429 3. + Definition loc_572 : location_info := LocationInfo file_0 383 34 429 3. + Definition loc_573 : location_info := LocationInfo file_0 386 4 386 38. + Definition loc_574 : location_info := LocationInfo file_0 390 4 390 67. + Definition loc_575 : location_info := LocationInfo file_0 397 4 426 5. + Definition loc_576 : location_info := LocationInfo file_0 428 4 428 30. + Definition loc_577 : location_info := LocationInfo file_0 383 2 429 3. + Definition loc_578 : location_info := LocationInfo file_0 383 2 429 3. + Definition loc_579 : location_info := LocationInfo file_0 428 4 428 8. + Definition loc_580 : location_info := LocationInfo file_0 428 11 428 29. + Definition loc_581 : location_info := LocationInfo file_0 428 12 428 29. + Definition loc_582 : location_info := LocationInfo file_0 428 12 428 17. + Definition loc_583 : location_info := LocationInfo file_0 428 12 428 17. + Definition loc_584 : location_info := LocationInfo file_0 397 61 426 5. + Definition loc_585 : location_info := LocationInfo file_0 398 6 398 38. + Definition loc_586 : location_info := LocationInfo file_0 399 6 399 57. + Definition loc_587 : location_info := LocationInfo file_0 400 6 400 42. + Definition loc_588 : location_info := LocationInfo file_0 400 42 400 7. + Definition loc_589 : location_info := LocationInfo file_0 401 6 401 52. + Definition loc_590 : location_info := LocationInfo file_0 403 6 410 7. + Definition loc_591 : location_info := LocationInfo file_0 416 6 420 7. + Definition loc_592 : location_info := LocationInfo file_0 422 6 422 16. + Definition loc_593 : location_info := LocationInfo file_0 422 16 422 7. + Definition loc_594 : location_info := LocationInfo file_0 423 6 423 55. + Definition loc_595 : location_info := LocationInfo file_0 423 55 423 7. + Definition loc_596 : location_info := LocationInfo file_0 424 6 424 26. + Definition loc_597 : location_info := LocationInfo file_0 425 6 425 12. + Definition loc_598 : location_info := LocationInfo file_0 424 6 424 9. + Definition loc_599 : location_info := LocationInfo file_0 424 12 424 25. + Definition loc_600 : location_info := LocationInfo file_0 424 20 424 25. + Definition loc_601 : location_info := LocationInfo file_0 424 20 424 25. + Definition loc_602 : location_info := LocationInfo file_0 423 45 423 54. + Definition loc_603 : location_info := LocationInfo file_0 423 46 423 54. + Definition loc_604 : location_info := LocationInfo file_0 423 48 423 53. + Definition loc_605 : location_info := LocationInfo file_0 423 48 423 53. + Definition loc_606 : location_info := LocationInfo file_0 422 6 422 15. + Definition loc_607 : location_info := LocationInfo file_0 422 7 422 15. + Definition loc_608 : location_info := LocationInfo file_0 422 9 422 14. + Definition loc_609 : location_info := LocationInfo file_0 422 9 422 14. + Definition loc_610 : location_info := LocationInfo file_0 416 41 420 7. + Definition loc_611 : location_info := LocationInfo file_0 417 8 417 34. + Definition loc_612 : location_info := LocationInfo file_0 418 8 418 22. + Definition loc_613 : location_info := LocationInfo file_0 419 8 419 35. + Definition loc_614 : location_info := LocationInfo file_0 419 8 419 19. + Definition loc_615 : location_info := LocationInfo file_0 419 8 419 13. + Definition loc_616 : location_info := LocationInfo file_0 419 8 419 13. + Definition loc_617 : location_info := LocationInfo file_0 419 22 419 34. + Definition loc_618 : location_info := LocationInfo file_0 419 22 419 34. + Definition loc_619 : location_info := LocationInfo file_0 418 8 418 13. + Definition loc_620 : location_info := LocationInfo file_0 418 9 418 13. + Definition loc_621 : location_info := LocationInfo file_0 418 9 418 13. + Definition loc_622 : location_info := LocationInfo file_0 418 16 418 21. + Definition loc_623 : location_info := LocationInfo file_0 418 16 418 21. + Definition loc_624 : location_info := LocationInfo file_0 417 8 417 25. + Definition loc_625 : location_info := LocationInfo file_0 417 8 417 13. + Definition loc_626 : location_info := LocationInfo file_0 417 8 417 13. + Definition loc_627 : location_info := LocationInfo file_0 417 28 417 33. + Definition loc_628 : location_info := LocationInfo file_0 417 28 417 33. + Definition loc_629 : location_info := LocationInfo file_0 417 29 417 33. + Definition loc_630 : location_info := LocationInfo file_0 417 29 417 33. + Definition loc_632 : location_info := LocationInfo file_0 416 10 416 39. + Definition loc_633 : location_info := LocationInfo file_0 416 10 416 22. + Definition loc_634 : location_info := LocationInfo file_0 416 10 416 22. + Definition loc_635 : location_info := LocationInfo file_0 416 26 416 39. + Definition loc_636 : location_info := LocationInfo file_0 416 26 416 39. + Definition loc_637 : location_info := LocationInfo file_0 416 26 416 27. + Definition loc_638 : location_info := LocationInfo file_0 416 26 416 27. + Definition loc_639 : location_info := LocationInfo file_0 403 62 405 7. + Definition loc_640 : location_info := LocationInfo file_0 404 8 404 27. + Definition loc_641 : location_info := LocationInfo file_0 404 8 404 13. + Definition loc_642 : location_info := LocationInfo file_0 404 9 404 13. + Definition loc_643 : location_info := LocationInfo file_0 404 9 404 13. + Definition loc_644 : location_info := LocationInfo file_0 404 16 404 26. + Definition loc_645 : location_info := LocationInfo file_0 404 16 404 26. + Definition loc_646 : location_info := LocationInfo file_0 405 13 410 7. + Definition loc_647 : location_info := LocationInfo file_0 406 8 406 76. + Definition loc_648 : location_info := LocationInfo file_0 407 8 407 78. + Definition loc_649 : location_info := LocationInfo file_0 408 8 408 43. + Definition loc_650 : location_info := LocationInfo file_0 409 8 409 26. + Definition loc_651 : location_info := LocationInfo file_0 409 8 409 13. + Definition loc_652 : location_info := LocationInfo file_0 409 9 409 13. + Definition loc_653 : location_info := LocationInfo file_0 409 9 409 13. + Definition loc_654 : location_info := LocationInfo file_0 409 16 409 25. + Definition loc_655 : location_info := LocationInfo file_0 409 16 409 25. + Definition loc_656 : location_info := LocationInfo file_0 408 8 408 29. + Definition loc_657 : location_info := LocationInfo file_0 408 8 408 17. + Definition loc_658 : location_info := LocationInfo file_0 408 8 408 17. + Definition loc_659 : location_info := LocationInfo file_0 408 32 408 42. + Definition loc_660 : location_info := LocationInfo file_0 408 32 408 42. + Definition loc_661 : location_info := LocationInfo file_0 407 8 407 23. + Definition loc_662 : location_info := LocationInfo file_0 407 8 407 17. + Definition loc_663 : location_info := LocationInfo file_0 407 8 407 17. + Definition loc_664 : location_info := LocationInfo file_0 407 26 407 77. + Definition loc_665 : location_info := LocationInfo file_0 407 26 407 36. + Definition loc_666 : location_info := LocationInfo file_0 407 26 407 36. + Definition loc_667 : location_info := LocationInfo file_0 407 39 407 77. + Definition loc_668 : location_info := LocationInfo file_0 407 40 407 52. + Definition loc_669 : location_info := LocationInfo file_0 407 40 407 52. + Definition loc_670 : location_info := LocationInfo file_0 407 55 407 76. + Definition loc_671 : location_info := LocationInfo file_0 407 55 407 60. + Definition loc_672 : location_info := LocationInfo file_0 407 55 407 60. + Definition loc_673 : location_info := LocationInfo file_0 407 63 407 76. + Definition loc_674 : location_info := LocationInfo file_0 407 63 407 76. + Definition loc_675 : location_info := LocationInfo file_0 407 63 407 64. + Definition loc_676 : location_info := LocationInfo file_0 407 63 407 64. + Definition loc_677 : location_info := LocationInfo file_0 406 8 406 17. + Definition loc_678 : location_info := LocationInfo file_0 406 20 406 75. + Definition loc_679 : location_info := LocationInfo file_0 406 42 406 75. + Definition loc_680 : location_info := LocationInfo file_0 406 43 406 48. + Definition loc_681 : location_info := LocationInfo file_0 406 43 406 48. + Definition loc_682 : location_info := LocationInfo file_0 406 51 406 74. + Definition loc_683 : location_info := LocationInfo file_0 406 52 406 57. + Definition loc_684 : location_info := LocationInfo file_0 406 52 406 57. + Definition loc_685 : location_info := LocationInfo file_0 406 60 406 73. + Definition loc_686 : location_info := LocationInfo file_0 406 60 406 73. + Definition loc_687 : location_info := LocationInfo file_0 406 60 406 61. + Definition loc_688 : location_info := LocationInfo file_0 406 60 406 61. + Definition loc_689 : location_info := LocationInfo file_0 403 10 403 60. + Definition loc_690 : location_info := LocationInfo file_0 403 10 403 46. + Definition loc_691 : location_info := LocationInfo file_0 403 10 403 22. + Definition loc_692 : location_info := LocationInfo file_0 403 10 403 22. + Definition loc_693 : location_info := LocationInfo file_0 403 25 403 46. + Definition loc_694 : location_info := LocationInfo file_0 403 25 403 30. + Definition loc_695 : location_info := LocationInfo file_0 403 25 403 30. + Definition loc_696 : location_info := LocationInfo file_0 403 33 403 46. + Definition loc_697 : location_info := LocationInfo file_0 403 33 403 46. + Definition loc_698 : location_info := LocationInfo file_0 403 33 403 34. + Definition loc_699 : location_info := LocationInfo file_0 403 33 403 34. + Definition loc_700 : location_info := LocationInfo file_0 403 50 403 60. + Definition loc_701 : location_info := LocationInfo file_0 403 50 403 60. + Definition loc_702 : location_info := LocationInfo file_0 401 6 401 11. + Definition loc_703 : location_info := LocationInfo file_0 401 14 401 51. + Definition loc_704 : location_info := LocationInfo file_0 401 14 401 36. + Definition loc_705 : location_info := LocationInfo file_0 401 31 401 36. + Definition loc_706 : location_info := LocationInfo file_0 401 31 401 36. + Definition loc_707 : location_info := LocationInfo file_0 401 39 401 51. + Definition loc_708 : location_info := LocationInfo file_0 401 39 401 51. + Definition loc_709 : location_info := LocationInfo file_0 400 32 400 41. + Definition loc_710 : location_info := LocationInfo file_0 400 33 400 41. + Definition loc_711 : location_info := LocationInfo file_0 400 35 400 40. + Definition loc_712 : location_info := LocationInfo file_0 400 35 400 40. + Definition loc_713 : location_info := LocationInfo file_0 399 39 399 56. + Definition loc_714 : location_info := LocationInfo file_0 399 39 399 56. + Definition loc_715 : location_info := LocationInfo file_0 399 39 399 44. + Definition loc_716 : location_info := LocationInfo file_0 399 39 399 44. + Definition loc_719 : location_info := LocationInfo file_0 398 26 398 37. + Definition loc_720 : location_info := LocationInfo file_0 398 26 398 37. + Definition loc_721 : location_info := LocationInfo file_0 398 26 398 31. + Definition loc_722 : location_info := LocationInfo file_0 398 26 398 31. + Definition loc_726 : location_info := LocationInfo file_0 397 8 397 59. + Definition loc_727 : location_info := LocationInfo file_0 397 8 397 44. + Definition loc_728 : location_info := LocationInfo file_0 397 8 397 20. + Definition loc_729 : location_info := LocationInfo file_0 397 8 397 20. + Definition loc_730 : location_info := LocationInfo file_0 397 23 397 44. + Definition loc_731 : location_info := LocationInfo file_0 397 23 397 28. + Definition loc_732 : location_info := LocationInfo file_0 397 23 397 28. + Definition loc_733 : location_info := LocationInfo file_0 397 31 397 44. + Definition loc_734 : location_info := LocationInfo file_0 397 31 397 44. + Definition loc_735 : location_info := LocationInfo file_0 397 31 397 32. + Definition loc_736 : location_info := LocationInfo file_0 397 31 397 32. + Definition loc_737 : location_info := LocationInfo file_0 397 48 397 59. + Definition loc_738 : location_info := LocationInfo file_0 397 48 397 59. + Definition loc_739 : location_info := LocationInfo file_0 397 48 397 53. + Definition loc_740 : location_info := LocationInfo file_0 397 48 397 53. + Definition loc_741 : location_info := LocationInfo file_0 390 4 390 20. + Definition loc_742 : location_info := LocationInfo file_0 390 4 390 20. + Definition loc_743 : location_info := LocationInfo file_0 390 21 390 43. + Definition loc_744 : location_info := LocationInfo file_0 390 38 390 43. + Definition loc_745 : location_info := LocationInfo file_0 390 38 390 43. + Definition loc_746 : location_info := LocationInfo file_0 390 45 390 50. + Definition loc_747 : location_info := LocationInfo file_0 390 45 390 50. + Definition loc_748 : location_info := LocationInfo file_0 390 52 390 65. + Definition loc_749 : location_info := LocationInfo file_0 390 53 390 65. + Definition loc_750 : location_info := LocationInfo file_0 386 32 386 37. + Definition loc_751 : location_info := LocationInfo file_0 386 32 386 37. + Definition loc_752 : location_info := LocationInfo file_0 386 33 386 37. + Definition loc_753 : location_info := LocationInfo file_0 386 33 386 37. + Definition loc_756 : location_info := LocationInfo file_0 383 9 383 32. + Definition loc_757 : location_info := LocationInfo file_0 383 9 383 14. + Definition loc_758 : location_info := LocationInfo file_0 383 9 383 14. + Definition loc_759 : location_info := LocationInfo file_0 383 10 383 14. + Definition loc_760 : location_info := LocationInfo file_0 383 10 383 14. + Definition loc_761 : location_info := LocationInfo file_0 383 18 383 32. + Definition loc_762 : location_info := LocationInfo file_0 373 2 373 6. + Definition loc_763 : location_info := LocationInfo file_0 373 9 373 30. + Definition loc_764 : location_info := LocationInfo file_0 373 10 373 30. + Definition loc_765 : location_info := LocationInfo file_0 373 10 373 19. + Definition loc_766 : location_info := LocationInfo file_0 373 10 373 11. + Definition loc_767 : location_info := LocationInfo file_0 373 10 373 11. + Definition loc_768 : location_info := LocationInfo file_0 367 27 367 39. + Definition loc_769 : location_info := LocationInfo file_0 367 28 367 39. + Definition loc_770 : location_info := LocationInfo file_0 367 29 367 30. + Definition loc_771 : location_info := LocationInfo file_0 367 29 367 30. + Definition loc_772 : location_info := LocationInfo file_0 366 2 366 9. + Definition loc_773 : location_info := LocationInfo file_0 366 2 366 9. + Definition loc_774 : location_info := LocationInfo file_0 366 10 366 18. + Definition loc_775 : location_info := LocationInfo file_0 366 11 366 18. + Definition loc_776 : location_info := LocationInfo file_0 366 11 366 12. + Definition loc_777 : location_info := LocationInfo file_0 366 11 366 12. + Definition loc_778 : location_info := LocationInfo file_0 364 2 364 7. + Definition loc_779 : location_info := LocationInfo file_0 364 2 364 24. + Definition loc_780 : location_info := LocationInfo file_0 364 2 364 7. + Definition loc_781 : location_info := LocationInfo file_0 364 2 364 7. + Definition loc_782 : location_info := LocationInfo file_0 364 11 364 24. + Definition loc_783 : location_info := LocationInfo file_0 364 11 364 24. + Definition loc_784 : location_info := LocationInfo file_0 364 11 364 12. + Definition loc_785 : location_info := LocationInfo file_0 364 11 364 12. + Definition loc_786 : location_info := LocationInfo file_0 362 14 362 28. + Definition loc_791 : location_info := LocationInfo file_0 457 2 457 66. + Definition loc_792 : location_info := LocationInfo file_0 459 2 461 3. + Definition loc_793 : location_info := LocationInfo file_0 463 2 463 18. + Definition loc_794 : location_info := LocationInfo file_0 467 2 476 3. + Definition loc_795 : location_info := LocationInfo file_0 478 2 478 24. + Definition loc_796 : location_info := LocationInfo file_0 478 9 478 23. + Definition loc_797 : location_info := LocationInfo file_0 467 2 476 3. + Definition loc_798 : location_info := LocationInfo file_0 467 30 476 3. + Definition loc_799 : location_info := LocationInfo file_0 468 4 468 62. + Definition loc_800 : location_info := LocationInfo file_0 470 4 472 5. + Definition loc_801 : location_info := LocationInfo file_0 474 4 474 20. + Definition loc_802 : location_info := LocationInfo file_0 467 2 476 3. + Definition loc_803 : location_info := LocationInfo file_0 467 2 476 3. + Definition loc_804 : location_info := LocationInfo file_0 474 4 474 5. + Definition loc_805 : location_info := LocationInfo file_0 474 8 474 19. + Definition loc_806 : location_info := LocationInfo file_0 474 8 474 19. + Definition loc_807 : location_info := LocationInfo file_0 474 8 474 9. + Definition loc_808 : location_info := LocationInfo file_0 474 8 474 9. + Definition loc_809 : location_info := LocationInfo file_0 470 31 472 5. + Definition loc_810 : location_info := LocationInfo file_0 471 6 471 17. + Definition loc_811 : location_info := LocationInfo file_0 471 13 471 16. + Definition loc_812 : location_info := LocationInfo file_0 471 13 471 16. + Definition loc_814 : location_info := LocationInfo file_0 470 8 470 29. + Definition loc_815 : location_info := LocationInfo file_0 470 8 470 11. + Definition loc_816 : location_info := LocationInfo file_0 470 8 470 11. + Definition loc_817 : location_info := LocationInfo file_0 470 15 470 29. + Definition loc_818 : location_info := LocationInfo file_0 468 4 468 7. + Definition loc_819 : location_info := LocationInfo file_0 468 10 468 61. + Definition loc_820 : location_info := LocationInfo file_0 468 10 468 44. + Definition loc_821 : location_info := LocationInfo file_0 468 10 468 44. + Definition loc_822 : location_info := LocationInfo file_0 468 45 468 46. + Definition loc_823 : location_info := LocationInfo file_0 468 45 468 46. + Definition loc_824 : location_info := LocationInfo file_0 468 48 468 53. + Definition loc_825 : location_info := LocationInfo file_0 468 48 468 53. + Definition loc_826 : location_info := LocationInfo file_0 468 55 468 60. + Definition loc_827 : location_info := LocationInfo file_0 468 55 468 60. + Definition loc_828 : location_info := LocationInfo file_0 467 9 467 28. + Definition loc_829 : location_info := LocationInfo file_0 467 9 467 10. + Definition loc_830 : location_info := LocationInfo file_0 467 9 467 10. + Definition loc_831 : location_info := LocationInfo file_0 467 14 467 28. + Definition loc_832 : location_info := LocationInfo file_0 463 2 463 3. + Definition loc_833 : location_info := LocationInfo file_0 463 6 463 17. + Definition loc_834 : location_info := LocationInfo file_0 463 6 463 17. + Definition loc_835 : location_info := LocationInfo file_0 463 6 463 7. + Definition loc_836 : location_info := LocationInfo file_0 463 6 463 7. + Definition loc_837 : location_info := LocationInfo file_0 459 29 461 3. + Definition loc_838 : location_info := LocationInfo file_0 460 4 460 15. + Definition loc_839 : location_info := LocationInfo file_0 460 11 460 14. + Definition loc_840 : location_info := LocationInfo file_0 460 11 460 14. + Definition loc_842 : location_info := LocationInfo file_0 459 6 459 27. + Definition loc_843 : location_info := LocationInfo file_0 459 6 459 9. + Definition loc_844 : location_info := LocationInfo file_0 459 6 459 9. + Definition loc_845 : location_info := LocationInfo file_0 459 13 459 27. + Definition loc_846 : location_info := LocationInfo file_0 457 14 457 65. + Definition loc_847 : location_info := LocationInfo file_0 457 14 457 48. + Definition loc_848 : location_info := LocationInfo file_0 457 14 457 48. + Definition loc_849 : location_info := LocationInfo file_0 457 49 457 50. + Definition loc_850 : location_info := LocationInfo file_0 457 49 457 50. + Definition loc_851 : location_info := LocationInfo file_0 457 52 457 57. + Definition loc_852 : location_info := LocationInfo file_0 457 52 457 57. + Definition loc_853 : location_info := LocationInfo file_0 457 59 457 64. + Definition loc_854 : location_info := LocationInfo file_0 457 59 457 64. + + (* Definition of struct [atomic_flag]. *) + Program Definition struct_atomic_flag := {| + sl_members := [ + (Some "_Value", it_layout bool_it) + ]; + |}. + Solve Obligations with solve_struct_obligations. + + (* Definition of struct [spinlock]. *) + Program Definition struct_spinlock := {| + sl_members := [ + (Some "lock", it_layout bool_it) + ]; + |}. + Solve Obligations with solve_struct_obligations. + + (* Definition of struct [mpool_chunk]. *) + Program Definition struct_mpool_chunk := {| + sl_members := [ + (Some "size", it_layout size_t); + (Some "next_chunk", LPtr) + ]; + |}. + Solve Obligations with solve_struct_obligations. + + (* Definition of struct [mpool_entry]. *) + Program Definition struct_mpool_entry := {| + sl_members := [ + (Some "next", LPtr) + ]; + |}. + Solve Obligations with solve_struct_obligations. + + (* Definition of struct [mpool_locked_inner]. *) + Program Definition struct_mpool_locked_inner := {| + sl_members := [ + (Some "chunk_list", LPtr); + (Some "entry_list", LPtr) + ]; + |}. + Solve Obligations with solve_struct_obligations. + + (* Definition of struct [mpool]. *) + Program Definition struct_mpool := {| + sl_members := [ + (Some "entry_size", it_layout size_t); + (Some "lock", layout_of struct_spinlock); + (None, mk_layout 7%nat 0%nat); + (Some "locked", layout_of struct_mpool_locked_inner); + (Some "fallback", LPtr) + ]; + |}. + Solve Obligations with solve_struct_obligations. + + (* Definition of function [mpool_add_chunk]. *) + Definition impl_mpool_add_chunk (sl_lock sl_unlock : loc): function := {| + f_args := [ + ("p", LPtr); + ("begin", LPtr); + ("size", it_layout size_t) + ]; + f_local_vars := [ + ("chunk", LPtr) + ]; + f_init := "#0"; + f_code := ( + <[ "#0" := + locinfo: loc_2 ; + expr: (LocInfoE loc_62 (&(LocInfoE loc_63 ((LocInfoE loc_64 (!{LPtr} (LocInfoE loc_65 ("p")))) at{struct_mpool} "entry_size")))) ; + locinfo: loc_57 ; + if: LocInfoE loc_57 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_57 ((LocInfoE loc_58 (use{it_layout size_t} (LocInfoE loc_59 ("size")))) ={IntOp size_t, IntOp size_t} (LocInfoE loc_60 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_61 (i2v 0 i32))))))) + then + locinfo: loc_54 ; + Goto "#2" + else + locinfo: loc_5 ; + Goto "#3" + ]> $ + <[ "#1" := + locinfo: loc_5 ; + LocInfoE loc_50 ("chunk") <-{ LPtr } + LocInfoE loc_51 (use{LPtr} (LocInfoE loc_52 ("begin"))) ; + locinfo: loc_6 ; + LocInfoE loc_45 ((LocInfoE loc_46 (!{LPtr} (LocInfoE loc_47 ("chunk")))) at{struct_mpool_chunk} "size") <-{ it_layout size_t } + LocInfoE loc_48 (use{it_layout size_t} (LocInfoE loc_49 ("size"))) ; + locinfo: loc_7 ; + "_" <- LocInfoE loc_40 (sl_lock) with + [ LocInfoE loc_41 (&(LocInfoE loc_42 ((LocInfoE loc_43 (!{LPtr} (LocInfoE loc_44 ("p")))) at{struct_mpool} "lock"))) ] ; + locinfo: loc_8 ; + annot: (UnlockA) ; + expr: (LocInfoE loc_35 (&(LocInfoE loc_36 ((LocInfoE loc_37 (!{LPtr} (LocInfoE loc_38 ("p")))) at{struct_mpool} "locked")))) ; + locinfo: loc_10 ; + LocInfoE loc_27 ((LocInfoE loc_28 (!{LPtr} (LocInfoE loc_29 ("chunk")))) at{struct_mpool_chunk} "next_chunk") <-{ LPtr } + LocInfoE loc_30 (use{LPtr} (LocInfoE loc_31 ((LocInfoE loc_32 ((LocInfoE loc_33 (!{LPtr} (LocInfoE loc_34 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list"))) ; + locinfo: loc_11 ; + LocInfoE loc_21 ((LocInfoE loc_22 ((LocInfoE loc_23 (!{LPtr} (LocInfoE loc_24 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list") <-{ LPtr } + LocInfoE loc_25 (use{LPtr} (LocInfoE loc_26 ("chunk"))) ; + locinfo: loc_12 ; + "_" <- LocInfoE loc_16 (sl_unlock) with + [ LocInfoE loc_17 (AnnotExpr 1%nat LockA (LocInfoE loc_17 (&(LocInfoE loc_18 ((LocInfoE loc_19 (!{LPtr} (LocInfoE loc_20 ("p")))) at{struct_mpool} "lock"))))) ] ; + locinfo: loc_13 ; + Return (LocInfoE loc_14 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_14 (i2v 1 i32)))) + ]> $ + <[ "#2" := + locinfo: loc_54 ; + Return (LocInfoE loc_55 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_55 (i2v 0 i32)))) + ]> $ + <[ "#3" := + locinfo: loc_5 ; + Goto "#1" + ]> $∅ + )%E + |}. + + (* Definition of function [mpool_free]. *) + Definition impl_mpool_free (sl_lock sl_unlock : loc): function := {| + f_args := [ + ("p", LPtr); + ("ptr", LPtr) + ]; + f_local_vars := [ + ("e", LPtr) + ]; + f_init := "#0"; + f_code := ( + <[ "#0" := + "e" <-{ LPtr } + LocInfoE loc_111 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_111 (use{LPtr} (LocInfoE loc_112 ("ptr"))))) ; + locinfo: loc_69 ; + expr: (LocInfoE loc_107 (&(LocInfoE loc_108 ((LocInfoE loc_109 (!{LPtr} (LocInfoE loc_110 ("p")))) at{struct_mpool} "entry_size")))) ; + locinfo: loc_71 ; + "_" <- LocInfoE loc_102 (sl_lock) with + [ LocInfoE loc_103 (&(LocInfoE loc_104 ((LocInfoE loc_105 (!{LPtr} (LocInfoE loc_106 ("p")))) at{struct_mpool} "lock"))) ] ; + locinfo: loc_72 ; + annot: (UnlockA) ; + expr: (LocInfoE loc_97 (&(LocInfoE loc_98 ((LocInfoE loc_99 (!{LPtr} (LocInfoE loc_100 ("p")))) at{struct_mpool} "locked")))) ; + locinfo: loc_74 ; + LocInfoE loc_89 ((LocInfoE loc_90 (!{LPtr} (LocInfoE loc_91 ("e")))) at{struct_mpool_entry} "next") <-{ LPtr } + LocInfoE loc_92 (use{LPtr} (LocInfoE loc_93 ((LocInfoE loc_94 ((LocInfoE loc_95 (!{LPtr} (LocInfoE loc_96 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list"))) ; + locinfo: loc_75 ; + LocInfoE loc_83 ((LocInfoE loc_84 ((LocInfoE loc_85 (!{LPtr} (LocInfoE loc_86 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list") <-{ LPtr } + LocInfoE loc_87 (use{LPtr} (LocInfoE loc_88 ("e"))) ; + locinfo: loc_76 ; + "_" <- LocInfoE loc_78 (sl_unlock) with + [ LocInfoE loc_79 (AnnotExpr 1%nat LockA (LocInfoE loc_79 (&(LocInfoE loc_80 ((LocInfoE loc_81 (!{LPtr} (LocInfoE loc_82 ("p")))) at{struct_mpool} "lock"))))) ] ; + Return (VOID) + ]> $∅ + )%E + |}. + + (* Definition of function [mpool_init]. *) + Definition impl_mpool_init (sl_init : loc): function := {| + f_args := [ + ("p", LPtr); + ("entry_size", it_layout size_t) + ]; + f_local_vars := [ + ]; + f_init := "#0"; + f_code := ( + <[ "#0" := + locinfo: loc_117 ; + LocInfoE loc_142 ((LocInfoE loc_143 (!{LPtr} (LocInfoE loc_144 ("p")))) at{struct_mpool} "entry_size") <-{ it_layout size_t } + LocInfoE loc_145 (use{it_layout size_t} (LocInfoE loc_146 ("entry_size"))) ; + locinfo: loc_118 ; + LocInfoE loc_137 ((LocInfoE loc_138 ((LocInfoE loc_139 (!{LPtr} (LocInfoE loc_140 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list") <-{ LPtr } + LocInfoE loc_141 (NULL) ; + locinfo: loc_119 ; + LocInfoE loc_132 ((LocInfoE loc_133 ((LocInfoE loc_134 (!{LPtr} (LocInfoE loc_135 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list") <-{ LPtr } + LocInfoE loc_136 (NULL) ; + locinfo: loc_120 ; + LocInfoE loc_128 ((LocInfoE loc_129 (!{LPtr} (LocInfoE loc_130 ("p")))) at{struct_mpool} "fallback") <-{ LPtr } + LocInfoE loc_131 (NULL) ; + locinfo: loc_121 ; + "_" <- LocInfoE loc_123 (sl_init) with + [ LocInfoE loc_124 (&(LocInfoE loc_125 ((LocInfoE loc_126 (!{LPtr} (LocInfoE loc_127 ("p")))) at{struct_mpool} "lock"))) ] ; + Return (VOID) + ]> $∅ + )%E + |}. + + (* Definition of function [mpool_init_from]. *) + Definition impl_mpool_init_from (sl_lock sl_unlock mpool_init : loc): function := {| + f_args := [ + ("p", LPtr); + ("from", LPtr) + ]; + f_local_vars := [ + ]; + f_init := "#0"; + f_code := ( + <[ "#0" := + locinfo: loc_149 ; + "_" <- LocInfoE loc_211 (mpool_init) with + [ LocInfoE loc_212 (use{LPtr} (LocInfoE loc_213 ("p"))) ; + LocInfoE loc_214 (use{it_layout size_t} (LocInfoE loc_215 ((LocInfoE loc_216 (!{LPtr} (LocInfoE loc_217 ("from")))) at{struct_mpool} "entry_size"))) ] ; + locinfo: loc_150 ; + "_" <- LocInfoE loc_205 (sl_lock) with + [ LocInfoE loc_206 (&(LocInfoE loc_207 ((LocInfoE loc_208 (!{LPtr} (LocInfoE loc_209 ("from")))) at{struct_mpool} "lock"))) ] ; + locinfo: loc_151 ; + annot: (UnlockA) ; + expr: (LocInfoE loc_200 (&(LocInfoE loc_201 ((LocInfoE loc_202 (!{LPtr} (LocInfoE loc_203 ("from")))) at{struct_mpool} "locked")))) ; + locinfo: loc_153 ; + LocInfoE loc_191 ((LocInfoE loc_192 ((LocInfoE loc_193 (!{LPtr} (LocInfoE loc_194 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list") <-{ LPtr } + LocInfoE loc_195 (use{LPtr} (LocInfoE loc_196 ((LocInfoE loc_197 ((LocInfoE loc_198 (!{LPtr} (LocInfoE loc_199 ("from")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list"))) ; + locinfo: loc_154 ; + LocInfoE loc_182 ((LocInfoE loc_183 ((LocInfoE loc_184 (!{LPtr} (LocInfoE loc_185 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list") <-{ LPtr } + LocInfoE loc_186 (use{LPtr} (LocInfoE loc_187 ((LocInfoE loc_188 ((LocInfoE loc_189 (!{LPtr} (LocInfoE loc_190 ("from")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list"))) ; + locinfo: loc_155 ; + LocInfoE loc_175 ((LocInfoE loc_176 (!{LPtr} (LocInfoE loc_177 ("p")))) at{struct_mpool} "fallback") <-{ LPtr } + LocInfoE loc_178 (use{LPtr} (LocInfoE loc_179 ((LocInfoE loc_180 (!{LPtr} (LocInfoE loc_181 ("from")))) at{struct_mpool} "fallback"))) ; + locinfo: loc_156 ; + LocInfoE loc_170 ((LocInfoE loc_171 ((LocInfoE loc_172 (!{LPtr} (LocInfoE loc_173 ("from")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list") <-{ LPtr } + LocInfoE loc_174 (NULL) ; + locinfo: loc_157 ; + LocInfoE loc_165 ((LocInfoE loc_166 ((LocInfoE loc_167 (!{LPtr} (LocInfoE loc_168 ("from")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list") <-{ LPtr } + LocInfoE loc_169 (NULL) ; + locinfo: loc_158 ; + "_" <- LocInfoE loc_160 (sl_unlock) with + [ LocInfoE loc_161 (AnnotExpr 1%nat LockA (LocInfoE loc_161 (&(LocInfoE loc_162 ((LocInfoE loc_163 (!{LPtr} (LocInfoE loc_164 ("from")))) at{struct_mpool} "lock"))))) ] ; + Return (VOID) + ]> $∅ + )%E + |}. + + (* Definition of function [mpool_init_with_fallback]. *) + Definition impl_mpool_init_with_fallback (mpool_init : loc): function := {| + f_args := [ + ("p", LPtr); + ("fallback", LPtr) + ]; + f_local_vars := [ + ]; + f_init := "#0"; + f_code := ( + <[ "#0" := + locinfo: loc_220 ; + "_" <- LocInfoE loc_228 (mpool_init) with + [ LocInfoE loc_229 (use{LPtr} (LocInfoE loc_230 ("p"))) ; + LocInfoE loc_231 (use{it_layout size_t} (LocInfoE loc_232 ((LocInfoE loc_233 (!{LPtr} (LocInfoE loc_234 ("fallback")))) at{struct_mpool} "entry_size"))) ] ; + locinfo: loc_221 ; + LocInfoE loc_222 ((LocInfoE loc_223 (!{LPtr} (LocInfoE loc_224 ("p")))) at{struct_mpool} "fallback") <-{ LPtr } + LocInfoE loc_225 (use{LPtr} (LocInfoE loc_226 ("fallback"))) ; + Return (VOID) + ]> $∅ + )%E + |}. + + (* Definition of function [mpool_fini]. *) + Definition impl_mpool_fini (mpool_add_chunk mpool_free : loc): function := {| + f_args := [ + ("p", LPtr) + ]; + f_local_vars := [ + ("size", it_layout size_t); + ("ptr1", LPtr); + ("ptr2", LPtr); + ("entry", LPtr); + ("chunk", LPtr) + ]; + f_init := "#0"; + f_code := ( + <[ "#0" := + locinfo: loc_340 ; + if: LocInfoE loc_340 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_340 ((LocInfoE loc_341 (use{LPtr} (LocInfoE loc_342 ((LocInfoE loc_343 (!{LPtr} (LocInfoE loc_344 ("p")))) at{struct_mpool} "fallback")))) ={PtrOp, PtrOp} (LocInfoE loc_345 (NULL))))) + then + locinfo: loc_337 ; + Goto "#8" + else + locinfo: loc_238 ; + Goto "#9" + ]> $ + <[ "#1" := + locinfo: loc_238 ; + LocInfoE loc_330 ("entry") <-{ LPtr } + LocInfoE loc_331 (use{LPtr} (LocInfoE loc_332 ((LocInfoE loc_333 ((LocInfoE loc_334 (!{LPtr} (LocInfoE loc_335 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list"))) ; + locinfo: loc_239 ; + LocInfoE loc_324 ("chunk") <-{ LPtr } + LocInfoE loc_325 (use{LPtr} (LocInfoE loc_326 ((LocInfoE loc_327 ((LocInfoE loc_328 (!{LPtr} (LocInfoE loc_329 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list"))) ; + locinfo: loc_240 ; + Goto "#2" + ]> $ + <[ "#2" := + locinfo: loc_320 ; + if: LocInfoE loc_320 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_320 ((LocInfoE loc_321 (use{LPtr} (LocInfoE loc_322 ("entry")))) !={PtrOp, PtrOp} (LocInfoE loc_323 (NULL))))) + then + Goto "#3" + else + locinfo: loc_241 ; + Goto "#4" + ]> $ + <[ "#3" := + "ptr1" <-{ LPtr } + LocInfoE loc_316 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_316 (use{LPtr} (LocInfoE loc_317 ("entry"))))) ; + locinfo: loc_299 ; + LocInfoE loc_311 ("entry") <-{ LPtr } + LocInfoE loc_312 (use{LPtr} (LocInfoE loc_313 ((LocInfoE loc_314 (!{LPtr} (LocInfoE loc_315 ("entry")))) at{struct_mpool_entry} "next"))) ; + locinfo: loc_300 ; + "_" <- LocInfoE loc_304 (mpool_free) with + [ LocInfoE loc_305 (use{LPtr} (LocInfoE loc_306 ((LocInfoE loc_307 (!{LPtr} (LocInfoE loc_308 ("p")))) at{struct_mpool} "fallback"))) ; + LocInfoE loc_309 (use{LPtr} (LocInfoE loc_310 ("ptr1"))) ] ; + locinfo: loc_301 ; + Goto "continue9" + ]> $ + <[ "#4" := + locinfo: loc_241 ; + Goto "#5" + ]> $ + <[ "#5" := + locinfo: loc_292 ; + if: LocInfoE loc_292 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_292 ((LocInfoE loc_293 (use{LPtr} (LocInfoE loc_294 ("chunk")))) !={PtrOp, PtrOp} (LocInfoE loc_295 (NULL))))) + then + Goto "#6" + else + locinfo: loc_242 ; + Goto "#7" + ]> $ + <[ "#6" := + "ptr2" <-{ LPtr } + LocInfoE loc_288 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_288 (use{LPtr} (LocInfoE loc_289 ("chunk"))))) ; + "size" <-{ it_layout size_t } + LocInfoE loc_282 (use{it_layout size_t} (LocInfoE loc_283 ((LocInfoE loc_284 (!{LPtr} (LocInfoE loc_285 ("chunk")))) at{struct_mpool_chunk} "size"))) ; + locinfo: loc_263 ; + LocInfoE loc_277 ("chunk") <-{ LPtr } + LocInfoE loc_278 (use{LPtr} (LocInfoE loc_279 ((LocInfoE loc_280 (!{LPtr} (LocInfoE loc_281 ("chunk")))) at{struct_mpool_chunk} "next_chunk"))) ; + locinfo: loc_264 ; + "_" <- LocInfoE loc_268 (mpool_add_chunk) with + [ LocInfoE loc_269 (use{LPtr} (LocInfoE loc_270 ((LocInfoE loc_271 (!{LPtr} (LocInfoE loc_272 ("p")))) at{struct_mpool} "fallback"))) ; + LocInfoE loc_273 (use{LPtr} (LocInfoE loc_274 ("ptr2"))) ; + LocInfoE loc_275 (use{it_layout size_t} (LocInfoE loc_276 ("size"))) ] ; + locinfo: loc_265 ; + Goto "continue11" + ]> $ + <[ "#7" := + locinfo: loc_242 ; + LocInfoE loc_254 ((LocInfoE loc_255 ((LocInfoE loc_256 (!{LPtr} (LocInfoE loc_257 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list") <-{ LPtr } + LocInfoE loc_258 (NULL) ; + locinfo: loc_243 ; + LocInfoE loc_249 ((LocInfoE loc_250 ((LocInfoE loc_251 (!{LPtr} (LocInfoE loc_252 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list") <-{ LPtr } + LocInfoE loc_253 (NULL) ; + locinfo: loc_244 ; + LocInfoE loc_245 ((LocInfoE loc_246 (!{LPtr} (LocInfoE loc_247 ("p")))) at{struct_mpool} "fallback") <-{ LPtr } + LocInfoE loc_248 (NULL) ; + Return (VOID) + ]> $ + <[ "#8" := + locinfo: loc_337 ; + Return (VOID) + ]> $ + <[ "#9" := + locinfo: loc_238 ; + Goto "#1" + ]> $ + <[ "continue11" := + locinfo: loc_241 ; + Goto "#5" + ]> $ + <[ "continue9" := + locinfo: loc_240 ; + Goto "#2" + ]> $∅ + )%E + |}. + + (* Definition of function [mpool_alloc_no_fallback]. *) + Definition impl_mpool_alloc_no_fallback (sl_lock sl_unlock : loc): function := {| + f_args := [ + ("p", LPtr) + ]; + f_local_vars := [ + ("new_chunk", LPtr); + ("entry", LPtr); + ("ret", LPtr); + ("chunk", LPtr) + ]; + f_init := "#0"; + f_code := ( + <[ "#0" := + locinfo: loc_348 ; + "_" <- LocInfoE loc_481 (sl_lock) with + [ LocInfoE loc_482 (&(LocInfoE loc_483 ((LocInfoE loc_484 (!{LPtr} (LocInfoE loc_485 ("p")))) at{struct_mpool} "lock"))) ] ; + locinfo: loc_349 ; + annot: (UnlockA) ; + expr: (LocInfoE loc_476 (&(LocInfoE loc_477 ((LocInfoE loc_478 (!{LPtr} (LocInfoE loc_479 ("p")))) at{struct_mpool} "locked")))) ; + locinfo: loc_469 ; + if: LocInfoE loc_469 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_469 ((LocInfoE loc_470 (use{LPtr} (LocInfoE loc_471 ((LocInfoE loc_472 ((LocInfoE loc_473 (!{LPtr} (LocInfoE loc_474 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list")))) !={PtrOp, PtrOp} (LocInfoE loc_475 (NULL))))) + then + Goto "#8" + else + locinfo: loc_352 ; + Goto "#9" + ]> $ + <[ "#1" := + locinfo: loc_352 ; + LocInfoE loc_439 ("chunk") <-{ LPtr } + LocInfoE loc_440 (use{LPtr} (LocInfoE loc_441 ((LocInfoE loc_442 ((LocInfoE loc_443 (!{LPtr} (LocInfoE loc_444 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list"))) ; + locinfo: loc_435 ; + if: LocInfoE loc_435 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_435 ((LocInfoE loc_436 (use{LPtr} (LocInfoE loc_437 ("chunk")))) ={PtrOp, PtrOp} (LocInfoE loc_438 (NULL))))) + then + locinfo: loc_430 ; + Goto "#6" + else + locinfo: loc_420 ; + Goto "#7" + ]> $ + <[ "#2" := + locinfo: loc_420 ; + if: LocInfoE loc_420 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_420 ((LocInfoE loc_421 (use{it_layout size_t} (LocInfoE loc_422 ((LocInfoE loc_423 (!{LPtr} (LocInfoE loc_424 ("p")))) at{struct_mpool} "entry_size")))) ≥{IntOp size_t, IntOp size_t} (LocInfoE loc_425 (use{it_layout size_t} (LocInfoE loc_426 ((LocInfoE loc_427 (!{LPtr} (LocInfoE loc_428 ("chunk")))) at{struct_mpool_chunk} "size"))))))) + then + locinfo: loc_371 ; + Goto "#4" + else + locinfo: loc_381 ; + Goto "#5" + ]> $ + <[ "#3" := + locinfo: loc_355 ; + LocInfoE loc_367 ("ret") <-{ LPtr } + LocInfoE loc_368 (use{LPtr} (LocInfoE loc_369 ("chunk"))) ; + locinfo: loc_356 ; + Goto "exit" + ]> $ + <[ "#4" := + locinfo: loc_371 ; + LocInfoE loc_372 ((LocInfoE loc_373 ((LocInfoE loc_374 (!{LPtr} (LocInfoE loc_375 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list") <-{ LPtr } + LocInfoE loc_376 (use{LPtr} (LocInfoE loc_377 ((LocInfoE loc_378 (!{LPtr} (LocInfoE loc_379 ("chunk")))) at{struct_mpool_chunk} "next_chunk"))) ; + locinfo: loc_355 ; + Goto "#3" + ]> $ + <[ "#5" := + locinfo: loc_381 ; + LocInfoE loc_410 ("new_chunk") <-{ LPtr } + LocInfoE loc_411 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_412 ((LocInfoE loc_413 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_414 (use{LPtr} (LocInfoE loc_415 ("chunk")))))) at_offset{it_layout u8, PtrOp, IntOp size_t} (LocInfoE loc_416 (use{it_layout size_t} (LocInfoE loc_417 ((LocInfoE loc_418 (!{LPtr} (LocInfoE loc_419 ("p")))) at{struct_mpool} "entry_size"))))))) ; + locinfo: loc_382 ; + LocInfoE loc_403 ((LocInfoE loc_404 (!{LPtr} (LocInfoE loc_405 ("new_chunk")))) at{struct_mpool_chunk} "next_chunk") <-{ LPtr } + LocInfoE loc_406 (use{LPtr} (LocInfoE loc_407 ((LocInfoE loc_408 (!{LPtr} (LocInfoE loc_409 ("chunk")))) at{struct_mpool_chunk} "next_chunk"))) ; + locinfo: loc_383 ; + LocInfoE loc_391 ((LocInfoE loc_392 (!{LPtr} (LocInfoE loc_393 ("new_chunk")))) at{struct_mpool_chunk} "size") <-{ it_layout size_t } + LocInfoE loc_394 ((LocInfoE loc_395 (use{it_layout size_t} (LocInfoE loc_396 ((LocInfoE loc_397 (!{LPtr} (LocInfoE loc_398 ("chunk")))) at{struct_mpool_chunk} "size")))) -{IntOp size_t, IntOp size_t} (LocInfoE loc_399 (use{it_layout size_t} (LocInfoE loc_400 ((LocInfoE loc_401 (!{LPtr} (LocInfoE loc_402 ("p")))) at{struct_mpool} "entry_size"))))) ; + locinfo: loc_384 ; + LocInfoE loc_385 ((LocInfoE loc_386 ((LocInfoE loc_387 (!{LPtr} (LocInfoE loc_388 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list") <-{ LPtr } + LocInfoE loc_389 (use{LPtr} (LocInfoE loc_390 ("new_chunk"))) ; + locinfo: loc_355 ; + Goto "#3" + ]> $ + <[ "#6" := + locinfo: loc_430 ; + LocInfoE loc_432 ("ret") <-{ LPtr } LocInfoE loc_433 (NULL) ; + locinfo: loc_431 ; + Goto "exit" + ]> $ + <[ "#7" := + locinfo: loc_420 ; + Goto "#2" + ]> $ + <[ "#8" := + "entry" <-{ LPtr } + LocInfoE loc_461 (use{LPtr} (LocInfoE loc_462 ((LocInfoE loc_463 ((LocInfoE loc_464 (!{LPtr} (LocInfoE loc_465 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list"))) ; + locinfo: loc_447 ; + LocInfoE loc_453 ((LocInfoE loc_454 ((LocInfoE loc_455 (!{LPtr} (LocInfoE loc_456 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list") <-{ LPtr } + LocInfoE loc_457 (use{LPtr} (LocInfoE loc_458 ((LocInfoE loc_459 (!{LPtr} (LocInfoE loc_460 ("entry")))) at{struct_mpool_entry} "next"))) ; + locinfo: loc_448 ; + LocInfoE loc_450 ("ret") <-{ LPtr } + LocInfoE loc_451 (use{LPtr} (LocInfoE loc_452 ("entry"))) ; + locinfo: loc_449 ; + Goto "exit" + ]> $ + <[ "#9" := + locinfo: loc_352 ; + Goto "#1" + ]> $ + <[ "exit" := + locinfo: loc_357 ; + "_" <- LocInfoE loc_362 (sl_unlock) with + [ LocInfoE loc_363 (AnnotExpr 1%nat LockA (LocInfoE loc_363 (&(LocInfoE loc_364 ((LocInfoE loc_365 (!{LPtr} (LocInfoE loc_366 ("p")))) at{struct_mpool} "lock"))))) ] ; + locinfo: loc_358 ; + Return (LocInfoE loc_359 (use{LPtr} (LocInfoE loc_360 ("ret")))) + ]> $∅ + )%E + |}. + + (* Definition of function [mpool_alloc]. *) + Definition impl_mpool_alloc (mpool_alloc_no_fallback : loc): function := {| + f_args := [ + ("p", LPtr) + ]; + f_local_vars := [ + ("ret", LPtr) + ]; + f_init := "#0"; + f_code := ( + <[ "#0" := + locinfo: loc_539 ; + "$1" <- LocInfoE loc_541 (mpool_alloc_no_fallback) with + [ LocInfoE loc_542 (use{LPtr} (LocInfoE loc_543 ("p"))) ] ; + "ret" <-{ LPtr } LocInfoE loc_539 ("$1") ; + locinfo: loc_535 ; + if: LocInfoE loc_535 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_535 ((LocInfoE loc_536 (use{LPtr} (LocInfoE loc_537 ("ret")))) !={PtrOp, PtrOp} (LocInfoE loc_538 (NULL))))) + then + locinfo: loc_531 ; + Goto "#8" + else + locinfo: loc_490 ; + Goto "#9" + ]> $ + <[ "#1" := + locinfo: loc_490 ; + LocInfoE loc_525 ("p") <-{ LPtr } + LocInfoE loc_526 (use{LPtr} (LocInfoE loc_527 ((LocInfoE loc_528 (!{LPtr} (LocInfoE loc_529 ("p")))) at{struct_mpool} "fallback"))) ; + locinfo: loc_491 ; + Goto "#2" + ]> $ + <[ "#2" := + locinfo: loc_521 ; + if: LocInfoE loc_521 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_521 ((LocInfoE loc_522 (use{LPtr} (LocInfoE loc_523 ("p")))) !={PtrOp, PtrOp} (LocInfoE loc_524 (NULL))))) + then + locinfo: loc_516 ; + Goto "#3" + else + locinfo: loc_492 ; + Goto "#4" + ]> $ + <[ "#3" := + locinfo: loc_516 ; + "$0" <- LocInfoE loc_518 (mpool_alloc_no_fallback) with + [ LocInfoE loc_519 (use{LPtr} (LocInfoE loc_520 ("p"))) ] ; + locinfo: loc_496 ; + LocInfoE loc_515 ("ret") <-{ LPtr } LocInfoE loc_516 ("$0") ; + locinfo: loc_511 ; + if: LocInfoE loc_511 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_511 ((LocInfoE loc_512 (use{LPtr} (LocInfoE loc_513 ("ret")))) !={PtrOp, PtrOp} (LocInfoE loc_514 (NULL))))) + then + locinfo: loc_507 ; + Goto "#6" + else + locinfo: loc_498 ; + Goto "#7" + ]> $ + <[ "#4" := + locinfo: loc_492 ; + Return (LocInfoE loc_493 (NULL)) + ]> $ + <[ "#5" := + locinfo: loc_498 ; + LocInfoE loc_501 ("p") <-{ LPtr } + LocInfoE loc_502 (use{LPtr} (LocInfoE loc_503 ((LocInfoE loc_504 (!{LPtr} (LocInfoE loc_505 ("p")))) at{struct_mpool} "fallback"))) ; + locinfo: loc_499 ; + Goto "continue25" + ]> $ + <[ "#6" := + locinfo: loc_507 ; + Return (LocInfoE loc_508 (use{LPtr} (LocInfoE loc_509 ("ret")))) + ]> $ + <[ "#7" := + locinfo: loc_498 ; + Goto "#5" + ]> $ + <[ "#8" := + locinfo: loc_531 ; + Return (LocInfoE loc_532 (use{LPtr} (LocInfoE loc_533 ("ret")))) + ]> $ + <[ "#9" := + locinfo: loc_490 ; + Goto "#1" + ]> $ + <[ "continue25" := + locinfo: loc_491 ; + Goto "#2" + ]> $∅ + )%E + |}. + + (* Definition of function [mpool_alloc_contiguous_no_fallback]. *) + Definition impl_mpool_alloc_contiguous_no_fallback (sl_lock sl_unlock round_pointer_up : loc): function := {| + f_args := [ + ("p", LPtr); + ("count", it_layout size_t); + ("align", it_layout size_t) + ]; + f_local_vars := [ + ("prev", LPtr); + ("before_start", it_layout size_t); + ("chunk_next", LPtr); + ("new_chunk", LPtr); + ("start", LPtr); + ("ret", LPtr); + ("chunk_size", it_layout size_t); + ("chunk", LPtr) + ]; + f_init := "#0"; + f_code := ( + <[ "#0" := + "ret" <-{ LPtr } LocInfoE loc_786 (NULL) ; + locinfo: loc_549 ; + LocInfoE loc_778 ("align") <-{ it_layout size_t } + LocInfoE loc_779 ((LocInfoE loc_780 (use{it_layout size_t} (LocInfoE loc_781 ("align")))) ×{IntOp size_t, IntOp size_t} (LocInfoE loc_782 (use{it_layout size_t} (LocInfoE loc_783 ((LocInfoE loc_784 (!{LPtr} (LocInfoE loc_785 ("p")))) at{struct_mpool} "entry_size"))))) ; + locinfo: loc_550 ; + "_" <- LocInfoE loc_773 (sl_lock) with + [ LocInfoE loc_774 (&(LocInfoE loc_775 ((LocInfoE loc_776 (!{LPtr} (LocInfoE loc_777 ("p")))) at{struct_mpool} "lock"))) ] ; + locinfo: loc_551 ; + annot: (UnlockA) ; + expr: (LocInfoE loc_768 (&(LocInfoE loc_769 ((LocInfoE loc_770 (!{LPtr} (LocInfoE loc_771 ("p")))) at{struct_mpool} "locked")))) ; + locinfo: loc_553 ; + LocInfoE loc_762 ("prev") <-{ LPtr } + LocInfoE loc_763 (&(LocInfoE loc_764 ((LocInfoE loc_765 ((LocInfoE loc_766 (!{LPtr} (LocInfoE loc_767 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list"))) ; + locinfo: loc_554 ; + Goto "#1" + ]> $ + <[ "#1" := + locinfo: loc_756 ; + if: LocInfoE loc_756 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_756 ((LocInfoE loc_757 (use{LPtr} (LocInfoE loc_759 (!{LPtr} (LocInfoE loc_760 ("prev")))))) !={PtrOp, PtrOp} (LocInfoE loc_761 (NULL))))) + then + Goto "#2" + else + locinfo: loc_555 ; + Goto "#3" + ]> $ + <[ "#10" := + locinfo: loc_640 ; + LocInfoE loc_642 (!{LPtr} (LocInfoE loc_643 ("prev"))) <-{ LPtr } + LocInfoE loc_644 (use{LPtr} (LocInfoE loc_645 ("chunk_next"))) ; + locinfo: loc_632 ; + Goto "#6" + ]> $ + <[ "#11" := + locinfo: loc_647 ; + LocInfoE loc_677 ("new_chunk") <-{ LPtr } + LocInfoE loc_678 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_679 ((LocInfoE loc_680 (use{LPtr} (LocInfoE loc_681 ("start")))) at_offset{it_layout u8, PtrOp, IntOp size_t} (LocInfoE loc_682 ((LocInfoE loc_683 (use{it_layout size_t} (LocInfoE loc_684 ("count")))) ×{IntOp size_t, IntOp size_t} (LocInfoE loc_685 (use{it_layout size_t} (LocInfoE loc_686 ((LocInfoE loc_687 (!{LPtr} (LocInfoE loc_688 ("p")))) at{struct_mpool} "entry_size"))))))))) ; + locinfo: loc_648 ; + LocInfoE loc_661 ((LocInfoE loc_662 (!{LPtr} (LocInfoE loc_663 ("new_chunk")))) at{struct_mpool_chunk} "size") <-{ it_layout size_t } + LocInfoE loc_664 ((LocInfoE loc_665 (use{it_layout size_t} (LocInfoE loc_666 ("chunk_size")))) -{IntOp size_t, IntOp size_t} (LocInfoE loc_667 ((LocInfoE loc_668 (use{it_layout size_t} (LocInfoE loc_669 ("before_start")))) +{IntOp size_t, IntOp size_t} (LocInfoE loc_670 ((LocInfoE loc_671 (use{it_layout size_t} (LocInfoE loc_672 ("count")))) ×{IntOp size_t, IntOp size_t} (LocInfoE loc_673 (use{it_layout size_t} (LocInfoE loc_674 ((LocInfoE loc_675 (!{LPtr} (LocInfoE loc_676 ("p")))) at{struct_mpool} "entry_size"))))))))) ; + locinfo: loc_649 ; + LocInfoE loc_656 ((LocInfoE loc_657 (!{LPtr} (LocInfoE loc_658 ("new_chunk")))) at{struct_mpool_chunk} "next_chunk") <-{ LPtr } + LocInfoE loc_659 (use{LPtr} (LocInfoE loc_660 ("chunk_next"))) ; + locinfo: loc_650 ; + LocInfoE loc_652 (!{LPtr} (LocInfoE loc_653 ("prev"))) <-{ LPtr } + LocInfoE loc_654 (use{LPtr} (LocInfoE loc_655 ("new_chunk"))) ; + locinfo: loc_632 ; + Goto "#6" + ]> $ + <[ "#12" := + locinfo: loc_576 ; + Goto "#4" + ]> $ + <[ "#2" := + "chunk" <-{ LPtr } + LocInfoE loc_750 (use{LPtr} (LocInfoE loc_752 (!{LPtr} (LocInfoE loc_753 ("prev"))))) ; + locinfo: loc_574 ; + "_" <- LocInfoE loc_742 (round_pointer_up) with + [ LocInfoE loc_743 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_744 (use{LPtr} (LocInfoE loc_745 ("chunk"))))) ; + LocInfoE loc_746 (use{it_layout size_t} (LocInfoE loc_747 ("align"))) ; + LocInfoE loc_748 (&(LocInfoE loc_749 ("before_start"))) ] ; + locinfo: loc_726 ; + if: LocInfoE loc_726 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_726 ((LocInfoE loc_727 ((LocInfoE loc_728 (use{it_layout size_t} (LocInfoE loc_729 ("before_start")))) +{IntOp size_t, IntOp size_t} (LocInfoE loc_730 ((LocInfoE loc_731 (use{it_layout size_t} (LocInfoE loc_732 ("count")))) ×{IntOp size_t, IntOp size_t} (LocInfoE loc_733 (use{it_layout size_t} (LocInfoE loc_734 ((LocInfoE loc_735 (!{LPtr} (LocInfoE loc_736 ("p")))) at{struct_mpool} "entry_size")))))))) ≤{IntOp size_t, IntOp size_t} (LocInfoE loc_737 (use{it_layout size_t} (LocInfoE loc_738 ((LocInfoE loc_739 (!{LPtr} (LocInfoE loc_740 ("chunk")))) at{struct_mpool_chunk} "size"))))))) + then + Goto "#5" + else + locinfo: loc_576 ; + Goto "#12" + ]> $ + <[ "#3" := + locinfo: loc_555 ; + expr: (LocInfoE loc_567 (&(LocInfoE loc_569 (!{LPtr} (LocInfoE loc_570 ("prev")))))) ; + locinfo: loc_557 ; + "_" <- LocInfoE loc_562 (sl_unlock) with + [ LocInfoE loc_563 (AnnotExpr 1%nat LockA (LocInfoE loc_563 (&(LocInfoE loc_564 ((LocInfoE loc_565 (!{LPtr} (LocInfoE loc_566 ("p")))) at{struct_mpool} "lock"))))) ] ; + locinfo: loc_558 ; + Return (LocInfoE loc_559 (use{LPtr} (LocInfoE loc_560 ("ret")))) + ]> $ + <[ "#4" := + locinfo: loc_576 ; + LocInfoE loc_579 ("prev") <-{ LPtr } + LocInfoE loc_580 (&(LocInfoE loc_581 ((LocInfoE loc_582 (!{LPtr} (LocInfoE loc_583 ("chunk")))) at{struct_mpool_chunk} "next_chunk"))) ; + locinfo: loc_577 ; + Goto "continue32" + ]> $ + <[ "#5" := + "chunk_size" <-{ it_layout size_t } + LocInfoE loc_719 (use{it_layout size_t} (LocInfoE loc_720 ((LocInfoE loc_721 (!{LPtr} (LocInfoE loc_722 ("chunk")))) at{struct_mpool_chunk} "size"))) ; + "chunk_next" <-{ LPtr } + LocInfoE loc_713 (use{LPtr} (LocInfoE loc_714 ((LocInfoE loc_715 (!{LPtr} (LocInfoE loc_716 ("chunk")))) at{struct_mpool_chunk} "next_chunk"))) ; + locinfo: loc_587 ; + annot: (ToUninit) ; + expr: (LocInfoE loc_709 (&(LocInfoE loc_711 (!{LPtr} (LocInfoE loc_712 ("chunk")))))) ; + locinfo: loc_589 ; + LocInfoE loc_702 ("start") <-{ LPtr } + LocInfoE loc_703 ((LocInfoE loc_704 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_705 (use{LPtr} (LocInfoE loc_706 ("chunk")))))) at_offset{it_layout u8, PtrOp, IntOp size_t} (LocInfoE loc_707 (use{it_layout size_t} (LocInfoE loc_708 ("before_start"))))) ; + locinfo: loc_689 ; + if: LocInfoE loc_689 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_689 ((LocInfoE loc_690 ((LocInfoE loc_691 (use{it_layout size_t} (LocInfoE loc_692 ("before_start")))) +{IntOp size_t, IntOp size_t} (LocInfoE loc_693 ((LocInfoE loc_694 (use{it_layout size_t} (LocInfoE loc_695 ("count")))) ×{IntOp size_t, IntOp size_t} (LocInfoE loc_696 (use{it_layout size_t} (LocInfoE loc_697 ((LocInfoE loc_698 (!{LPtr} (LocInfoE loc_699 ("p")))) at{struct_mpool} "entry_size")))))))) ={IntOp size_t, IntOp size_t} (LocInfoE loc_700 (use{it_layout size_t} (LocInfoE loc_701 ("chunk_size"))))))) + then + locinfo: loc_640 ; + Goto "#10" + else + locinfo: loc_647 ; + Goto "#11" + ]> $ + <[ "#6" := + locinfo: loc_632 ; + if: LocInfoE loc_632 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_632 ((LocInfoE loc_633 (use{it_layout size_t} (LocInfoE loc_634 ("before_start")))) ≥{IntOp size_t, IntOp size_t} (LocInfoE loc_635 (use{it_layout size_t} (LocInfoE loc_636 ((LocInfoE loc_637 (!{LPtr} (LocInfoE loc_638 ("p")))) at{struct_mpool} "entry_size"))))))) + then + locinfo: loc_611 ; + Goto "#8" + else + locinfo: loc_592 ; + Goto "#9" + ]> $ + <[ "#7" := + locinfo: loc_592 ; + expr: (LocInfoE loc_606 (&(LocInfoE loc_608 (!{LPtr} (LocInfoE loc_609 ("chunk")))))) ; + locinfo: loc_594 ; + annot: (UninitStrengthenAlign) ; + expr: (LocInfoE loc_602 (&(LocInfoE loc_604 (!{LPtr} (LocInfoE loc_605 ("start")))))) ; + locinfo: loc_596 ; + LocInfoE loc_598 ("ret") <-{ LPtr } + LocInfoE loc_599 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_600 (use{LPtr} (LocInfoE loc_601 ("start"))))) ; + locinfo: loc_555 ; + Goto "#3" + ]> $ + <[ "#8" := + locinfo: loc_611 ; + LocInfoE loc_624 ((LocInfoE loc_625 (!{LPtr} (LocInfoE loc_626 ("chunk")))) at{struct_mpool_chunk} "next_chunk") <-{ LPtr } + LocInfoE loc_627 (use{LPtr} (LocInfoE loc_629 (!{LPtr} (LocInfoE loc_630 ("prev"))))) ; + locinfo: loc_612 ; + LocInfoE loc_620 (!{LPtr} (LocInfoE loc_621 ("prev"))) <-{ LPtr } + LocInfoE loc_622 (use{LPtr} (LocInfoE loc_623 ("chunk"))) ; + locinfo: loc_613 ; + LocInfoE loc_614 ((LocInfoE loc_615 (!{LPtr} (LocInfoE loc_616 ("chunk")))) at{struct_mpool_chunk} "size") <-{ it_layout size_t } + LocInfoE loc_617 (use{it_layout size_t} (LocInfoE loc_618 ("before_start"))) ; + locinfo: loc_592 ; + Goto "#7" + ]> $ + <[ "#9" := + locinfo: loc_592 ; + Goto "#7" + ]> $ + <[ "continue32" := + locinfo: loc_554 ; + Goto "#1" + ]> $∅ + )%E + |}. + + (* Definition of function [mpool_alloc_contiguous]. *) + Definition impl_mpool_alloc_contiguous (mpool_alloc_contiguous_no_fallback : loc): function := {| + f_args := [ + ("p", LPtr); + ("count", it_layout size_t); + ("align", it_layout size_t) + ]; + f_local_vars := [ + ("ret", LPtr) + ]; + f_init := "#0"; + f_code := ( + <[ "#0" := + locinfo: loc_846 ; + "$1" <- LocInfoE loc_848 (mpool_alloc_contiguous_no_fallback) with + [ LocInfoE loc_849 (use{LPtr} (LocInfoE loc_850 ("p"))) ; + LocInfoE loc_851 (use{it_layout size_t} (LocInfoE loc_852 ("count"))) ; + LocInfoE loc_853 (use{it_layout size_t} (LocInfoE loc_854 ("align"))) ] ; + "ret" <-{ LPtr } LocInfoE loc_846 ("$1") ; + locinfo: loc_842 ; + if: LocInfoE loc_842 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_842 ((LocInfoE loc_843 (use{LPtr} (LocInfoE loc_844 ("ret")))) !={PtrOp, PtrOp} (LocInfoE loc_845 (NULL))))) + then + locinfo: loc_838 ; + Goto "#8" + else + locinfo: loc_793 ; + Goto "#9" + ]> $ + <[ "#1" := + locinfo: loc_793 ; + LocInfoE loc_832 ("p") <-{ LPtr } + LocInfoE loc_833 (use{LPtr} (LocInfoE loc_834 ((LocInfoE loc_835 (!{LPtr} (LocInfoE loc_836 ("p")))) at{struct_mpool} "fallback"))) ; + locinfo: loc_794 ; + Goto "#2" + ]> $ + <[ "#2" := + locinfo: loc_828 ; + if: LocInfoE loc_828 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_828 ((LocInfoE loc_829 (use{LPtr} (LocInfoE loc_830 ("p")))) !={PtrOp, PtrOp} (LocInfoE loc_831 (NULL))))) + then + locinfo: loc_819 ; + Goto "#3" + else + locinfo: loc_795 ; + Goto "#4" + ]> $ + <[ "#3" := + locinfo: loc_819 ; + "$0" <- LocInfoE loc_821 (mpool_alloc_contiguous_no_fallback) with + [ LocInfoE loc_822 (use{LPtr} (LocInfoE loc_823 ("p"))) ; + LocInfoE loc_824 (use{it_layout size_t} (LocInfoE loc_825 ("count"))) ; + LocInfoE loc_826 (use{it_layout size_t} (LocInfoE loc_827 ("align"))) ] ; + locinfo: loc_799 ; + LocInfoE loc_818 ("ret") <-{ LPtr } LocInfoE loc_819 ("$0") ; + locinfo: loc_814 ; + if: LocInfoE loc_814 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_814 ((LocInfoE loc_815 (use{LPtr} (LocInfoE loc_816 ("ret")))) !={PtrOp, PtrOp} (LocInfoE loc_817 (NULL))))) + then + locinfo: loc_810 ; + Goto "#6" + else + locinfo: loc_801 ; + Goto "#7" + ]> $ + <[ "#4" := + locinfo: loc_795 ; + Return (LocInfoE loc_796 (NULL)) + ]> $ + <[ "#5" := + locinfo: loc_801 ; + LocInfoE loc_804 ("p") <-{ LPtr } + LocInfoE loc_805 (use{LPtr} (LocInfoE loc_806 ((LocInfoE loc_807 (!{LPtr} (LocInfoE loc_808 ("p")))) at{struct_mpool} "fallback"))) ; + locinfo: loc_802 ; + Goto "continue41" + ]> $ + <[ "#6" := + locinfo: loc_810 ; + Return (LocInfoE loc_811 (use{LPtr} (LocInfoE loc_812 ("ret")))) + ]> $ + <[ "#7" := + locinfo: loc_801 ; + Goto "#5" + ]> $ + <[ "#8" := + locinfo: loc_838 ; + Return (LocInfoE loc_839 (use{LPtr} (LocInfoE loc_840 ("ret")))) + ]> $ + <[ "#9" := + locinfo: loc_793 ; + Goto "#1" + ]> $ + <[ "continue41" := + locinfo: loc_794 ; + Goto "#2" + ]> $∅ + )%E + |}. +End code. diff --git a/examples/+rc+/mpool/dune b/examples/+rc+/mpool/dune new file mode 100644 index 0000000000000000000000000000000000000000..0e8829207fe583ba074e79886d05679f0a5ea44f --- /dev/null +++ b/examples/+rc+/mpool/dune @@ -0,0 +1,5 @@ +; Generated by [refinedc], do not edit. +(coq.theory + (flags -w -notation-overridden -w -redundant-canonical-projection) + (name refinedc.examples.mpool) + (theories refinedc.examples.spinlock refinedc.lang refinedc.typing refinedc.typing.automation refinedc.lithium)) diff --git a/examples/+rc+/mpool/proof_files b/examples/+rc+/mpool/proof_files new file mode 100644 index 0000000000000000000000000000000000000000..6d90112b62f0b78ce03589a2daa76a45de4334c0 --- /dev/null +++ b/examples/+rc+/mpool/proof_files @@ -0,0 +1,16 @@ +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool/proof_atomic_signal_fence.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool/proof_atomic_thread_fence.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool/proof_mpool_add_chunk.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool/proof_mpool_alloc.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool/proof_mpool_alloc_contiguous.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool/proof_mpool_alloc_contiguous_no_fallback.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool/proof_mpool_alloc_no_fallback.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool/proof_mpool_fini.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool/proof_mpool_free.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool/proof_mpool_init.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool/proof_mpool_init_from.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool/proof_mpool_init_with_fallback.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool/proof_round_pointer_up.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool/proof_sl_init.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool/proof_sl_lock.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool/proof_sl_unlock.v diff --git a/theories/examples/mpool/mpool_proof_mpool_add_chunk.v b/examples/+rc+/mpool/proof_mpool_add_chunk.v similarity index 86% rename from theories/examples/mpool/mpool_proof_mpool_add_chunk.v rename to examples/+rc+/mpool/proof_mpool_add_chunk.v index a8c99ada91499a7e27099e5a97132a90029315a1..26ba44d4148d5a59e50ecc18ac0b7d39020f4405 100644 --- a/theories/examples/mpool/mpool_proof_mpool_add_chunk.v +++ b/examples/+rc+/mpool/proof_mpool_add_chunk.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mpool Require Import mpool_code. -From refinedc.examples.mpool Require Import mpool_spec. +From refinedc.examples.mpool Require Import code. +From refinedc.examples.mpool Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/mpool/mpool.c]. *) +(* Generated from [examples/mpool.c]. *) Section proof_mpool_add_chunk. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/mpool/mpool_proof_mpool_alloc.v b/examples/+rc+/mpool/proof_mpool_alloc.v similarity index 88% rename from theories/examples/mpool/mpool_proof_mpool_alloc.v rename to examples/+rc+/mpool/proof_mpool_alloc.v index dd75c8b3703ca3de850dee3a8d7f39890f50b688..a06ee64da96f32c4ccc277e7af0969446ce7bd36 100644 --- a/theories/examples/mpool/mpool_proof_mpool_alloc.v +++ b/examples/+rc+/mpool/proof_mpool_alloc.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mpool Require Import mpool_code. -From refinedc.examples.mpool Require Import mpool_spec. +From refinedc.examples.mpool Require Import code. +From refinedc.examples.mpool Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/mpool/mpool.c]. *) +(* Generated from [examples/mpool.c]. *) Section proof_mpool_alloc. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/mpool/mpool_proof_mpool_alloc_contiguous.v b/examples/+rc+/mpool/proof_mpool_alloc_contiguous.v similarity index 90% rename from theories/examples/mpool/mpool_proof_mpool_alloc_contiguous.v rename to examples/+rc+/mpool/proof_mpool_alloc_contiguous.v index b50d4de24ad577fa7bcb6873b6af85a28659a489..bfdcb7abdc3589bb7334e4a33b56f2c8b7a1fc62 100644 --- a/theories/examples/mpool/mpool_proof_mpool_alloc_contiguous.v +++ b/examples/+rc+/mpool/proof_mpool_alloc_contiguous.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mpool Require Import mpool_code. -From refinedc.examples.mpool Require Import mpool_spec. +From refinedc.examples.mpool Require Import code. +From refinedc.examples.mpool Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/mpool/mpool.c]. *) +(* Generated from [examples/mpool.c]. *) Section proof_mpool_alloc_contiguous. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/mpool/mpool_proof_mpool_alloc_contiguous_no_fallback.v b/examples/+rc+/mpool/proof_mpool_alloc_contiguous_no_fallback.v similarity index 94% rename from theories/examples/mpool/mpool_proof_mpool_alloc_contiguous_no_fallback.v rename to examples/+rc+/mpool/proof_mpool_alloc_contiguous_no_fallback.v index 1b82ecc3b757e7143ed43376bb0d055fea96671f..a274c6d977144cbc897146bd62b7cb9a35826c13 100644 --- a/theories/examples/mpool/mpool_proof_mpool_alloc_contiguous_no_fallback.v +++ b/examples/+rc+/mpool/proof_mpool_alloc_contiguous_no_fallback.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mpool Require Import mpool_code. -From refinedc.examples.mpool Require Import mpool_spec. +From refinedc.examples.mpool Require Import code. +From refinedc.examples.mpool Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/mpool/mpool.c]. *) +(* Generated from [examples/mpool.c]. *) Section proof_mpool_alloc_contiguous_no_fallback. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/mpool/mpool_proof_mpool_alloc_no_fallback.v b/examples/+rc+/mpool/proof_mpool_alloc_no_fallback.v similarity index 87% rename from theories/examples/mpool/mpool_proof_mpool_alloc_no_fallback.v rename to examples/+rc+/mpool/proof_mpool_alloc_no_fallback.v index de1045bf410186270811f91b1f86ce7da330c3fb..8edbce8878e5674531da97c6c9c474b1c818d818 100644 --- a/theories/examples/mpool/mpool_proof_mpool_alloc_no_fallback.v +++ b/examples/+rc+/mpool/proof_mpool_alloc_no_fallback.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mpool Require Import mpool_code. -From refinedc.examples.mpool Require Import mpool_spec. +From refinedc.examples.mpool Require Import code. +From refinedc.examples.mpool Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/mpool/mpool.c]. *) +(* Generated from [examples/mpool.c]. *) Section proof_mpool_alloc_no_fallback. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/mpool/mpool_proof_mpool_fini.v b/examples/+rc+/mpool/proof_mpool_fini.v similarity index 92% rename from theories/examples/mpool/mpool_proof_mpool_fini.v rename to examples/+rc+/mpool/proof_mpool_fini.v index b6009aee983c48c549fd63b1f85863e0c9bfda11..6c60fdca186c9de292b1880b4d2abb07fcaef5f2 100644 --- a/theories/examples/mpool/mpool_proof_mpool_fini.v +++ b/examples/+rc+/mpool/proof_mpool_fini.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mpool Require Import mpool_code. -From refinedc.examples.mpool Require Import mpool_spec. +From refinedc.examples.mpool Require Import code. +From refinedc.examples.mpool Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/mpool/mpool.c]. *) +(* Generated from [examples/mpool.c]. *) Section proof_mpool_fini. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/mpool/mpool_proof_mpool_free.v b/examples/+rc+/mpool/proof_mpool_free.v similarity index 85% rename from theories/examples/mpool/mpool_proof_mpool_free.v rename to examples/+rc+/mpool/proof_mpool_free.v index fa4c74988b44e6eaca03a0a12fb43799af71cd46..93f3e049c27a8d92c02f2fc47e4b7fcc5551e2ad 100644 --- a/theories/examples/mpool/mpool_proof_mpool_free.v +++ b/examples/+rc+/mpool/proof_mpool_free.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mpool Require Import mpool_code. -From refinedc.examples.mpool Require Import mpool_spec. +From refinedc.examples.mpool Require Import code. +From refinedc.examples.mpool Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/mpool/mpool.c]. *) +(* Generated from [examples/mpool.c]. *) Section proof_mpool_free. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/mpool/mpool_proof_mpool_init.v b/examples/+rc+/mpool/proof_mpool_init.v similarity index 83% rename from theories/examples/mpool/mpool_proof_mpool_init.v rename to examples/+rc+/mpool/proof_mpool_init.v index f5045d2af486d3f0c7fa80a99e8212156469e2cc..f21ccba358f8f07fb505841c82e6218364b53c0d 100644 --- a/theories/examples/mpool/mpool_proof_mpool_init.v +++ b/examples/+rc+/mpool/proof_mpool_init.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mpool Require Import mpool_code. -From refinedc.examples.mpool Require Import mpool_spec. +From refinedc.examples.mpool Require Import code. +From refinedc.examples.mpool Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/mpool/mpool.c]. *) +(* Generated from [examples/mpool.c]. *) Section proof_mpool_init. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/mpool/mpool_proof_mpool_init_from.v b/examples/+rc+/mpool/proof_mpool_init_from.v similarity index 86% rename from theories/examples/mpool/mpool_proof_mpool_init_from.v rename to examples/+rc+/mpool/proof_mpool_init_from.v index 7a8e858d74be888de701159d7d7ef3234f6124f8..3433c169c6843e2bad05a03d9e444c5f9b7998bf 100644 --- a/theories/examples/mpool/mpool_proof_mpool_init_from.v +++ b/examples/+rc+/mpool/proof_mpool_init_from.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mpool Require Import mpool_code. -From refinedc.examples.mpool Require Import mpool_spec. +From refinedc.examples.mpool Require Import code. +From refinedc.examples.mpool Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/mpool/mpool.c]. *) +(* Generated from [examples/mpool.c]. *) Section proof_mpool_init_from. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/mpool/mpool_proof_mpool_init_with_fallback.v b/examples/+rc+/mpool/proof_mpool_init_with_fallback.v similarity index 86% rename from theories/examples/mpool/mpool_proof_mpool_init_with_fallback.v rename to examples/+rc+/mpool/proof_mpool_init_with_fallback.v index f4c43eba0efe3c9a98bd2fdf6ecb6f064610a9e7..82e2617456fb01d3988af70946d5fedd07afac5d 100644 --- a/theories/examples/mpool/mpool_proof_mpool_init_with_fallback.v +++ b/examples/+rc+/mpool/proof_mpool_init_with_fallback.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mpool Require Import mpool_code. -From refinedc.examples.mpool Require Import mpool_spec. +From refinedc.examples.mpool Require Import code. +From refinedc.examples.mpool Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/mpool/mpool.c]. *) +(* Generated from [examples/mpool.c]. *) Section proof_mpool_init_with_fallback. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/mpool/mpool_spec.v b/examples/+rc+/mpool/spec.v similarity index 99% rename from theories/examples/mpool/mpool_spec.v rename to examples/+rc+/mpool/spec.v index 45a60a51f22c9d149b4609e0c828a92ee9c4cf17..5b377b7f16d91b2569b94d958e0484f53b44d086 100644 --- a/theories/examples/mpool/mpool_spec.v +++ b/examples/+rc+/mpool/spec.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mpool Require Import mpool_code. +From refinedc.examples.mpool Require Import code. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/mpool/mpool.c]. *) +(* Generated from [examples/mpool.c]. *) Section spec. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/mpool_simpl/mpool_simpl_code.v b/examples/+rc+/mpool_simpl/code.v similarity index 98% rename from theories/examples/mpool_simpl/mpool_simpl_code.v rename to examples/+rc+/mpool_simpl/code.v index e6b5466aeb7e4ae7f363038f156c253eb88a7297..2e3bae2023f7fef7ea7172284bacd68a7d566841 100644 --- a/theories/examples/mpool_simpl/mpool_simpl_code.v +++ b/examples/+rc+/mpool_simpl/code.v @@ -3,9 +3,9 @@ From refinedc.lang Require Import tactics. From refinedc.typing Require Import annotations. Set Default Proof Using "Type". -(* Generated from [theories/examples/mpool_simpl/mpool_simpl.c]. *) +(* Generated from [examples/mpool_simpl.c]. *) Section code. - Definition file_0 : string := "theories/examples/mpool_simpl/mpool_simpl.c". + Definition file_0 : string := "examples/mpool_simpl.c". Definition loc_2 : location_info := LocationInfo file_0 21 4 21 29. Definition loc_3 : location_info := LocationInfo file_0 21 4 21 17. Definition loc_4 : location_info := LocationInfo file_0 21 4 21 5. diff --git a/examples/+rc+/mpool_simpl/dune b/examples/+rc+/mpool_simpl/dune new file mode 100644 index 0000000000000000000000000000000000000000..eaa4b3aa57fbb36f05b28499d1a06d014a2da9c3 --- /dev/null +++ b/examples/+rc+/mpool_simpl/dune @@ -0,0 +1,5 @@ +; Generated by [refinedc], do not edit. +(coq.theory + (flags -w -notation-overridden -w -redundant-canonical-projection) + (name refinedc.examples.mpool_simpl) + (theories refinedc.lang refinedc.typing refinedc.typing.automation refinedc.lithium)) diff --git a/examples/+rc+/mpool_simpl/proof_files b/examples/+rc+/mpool_simpl/proof_files new file mode 100644 index 0000000000000000000000000000000000000000..d503330804e7cce13f1668251df8a4504b196875 --- /dev/null +++ b/examples/+rc+/mpool_simpl/proof_files @@ -0,0 +1,4 @@ +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool_simpl/proof_main.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool_simpl/proof_mpool_get.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool_simpl/proof_mpool_init.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mpool_simpl/proof_mpool_put.v diff --git a/theories/examples/mpool_simpl/mpool_simpl_proof_main.v b/examples/+rc+/mpool_simpl/proof_main.v similarity index 83% rename from theories/examples/mpool_simpl/mpool_simpl_proof_main.v rename to examples/+rc+/mpool_simpl/proof_main.v index d6a04ed1c513c47f3da35d12eb2a9614ecde9f82..ece357ffba5be4bd5c214ca8643a17bafe264928 100644 --- a/theories/examples/mpool_simpl/mpool_simpl_proof_main.v +++ b/examples/+rc+/mpool_simpl/proof_main.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mpool_simpl Require Import mpool_simpl_code. -From refinedc.examples.mpool_simpl Require Import mpool_simpl_spec. +From refinedc.examples.mpool_simpl Require Import code. +From refinedc.examples.mpool_simpl Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/mpool_simpl/mpool_simpl.c]. *) +(* Generated from [examples/mpool_simpl.c]. *) Section proof_main. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/mpool_simpl/mpool_simpl_proof_mpool_get.v b/examples/+rc+/mpool_simpl/proof_mpool_get.v similarity index 77% rename from theories/examples/mpool_simpl/mpool_simpl_proof_mpool_get.v rename to examples/+rc+/mpool_simpl/proof_mpool_get.v index 09e616221e152f47b762202544d47e582ca9a511..9cabcc31ca14420c23501ff77927a6318cf0fa65 100644 --- a/theories/examples/mpool_simpl/mpool_simpl_proof_mpool_get.v +++ b/examples/+rc+/mpool_simpl/proof_mpool_get.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mpool_simpl Require Import mpool_simpl_code. -From refinedc.examples.mpool_simpl Require Import mpool_simpl_spec. +From refinedc.examples.mpool_simpl Require Import code. +From refinedc.examples.mpool_simpl Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/mpool_simpl/mpool_simpl.c]. *) +(* Generated from [examples/mpool_simpl.c]. *) Section proof_mpool_get. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/mpool_simpl/mpool_simpl_proof_mpool_init.v b/examples/+rc+/mpool_simpl/proof_mpool_init.v similarity index 76% rename from theories/examples/mpool_simpl/mpool_simpl_proof_mpool_init.v rename to examples/+rc+/mpool_simpl/proof_mpool_init.v index 40ae6e473ddfd71953b47ada72be7ce30ece2c8c..841ac26579baca4f12fc380ac778b0ad63e17baf 100644 --- a/theories/examples/mpool_simpl/mpool_simpl_proof_mpool_init.v +++ b/examples/+rc+/mpool_simpl/proof_mpool_init.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mpool_simpl Require Import mpool_simpl_code. -From refinedc.examples.mpool_simpl Require Import mpool_simpl_spec. +From refinedc.examples.mpool_simpl Require Import code. +From refinedc.examples.mpool_simpl Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/mpool_simpl/mpool_simpl.c]. *) +(* Generated from [examples/mpool_simpl.c]. *) Section proof_mpool_init. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/mpool_simpl/mpool_simpl_proof_mpool_put.v b/examples/+rc+/mpool_simpl/proof_mpool_put.v similarity index 77% rename from theories/examples/mpool_simpl/mpool_simpl_proof_mpool_put.v rename to examples/+rc+/mpool_simpl/proof_mpool_put.v index 6676b05fddd67c59e0d1d4f61de7c7ea4fe4bb9e..7c3dd2ba67fbd4fb945c9408ba8a88500728ebcf 100644 --- a/theories/examples/mpool_simpl/mpool_simpl_proof_mpool_put.v +++ b/examples/+rc+/mpool_simpl/proof_mpool_put.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mpool_simpl Require Import mpool_simpl_code. -From refinedc.examples.mpool_simpl Require Import mpool_simpl_spec. +From refinedc.examples.mpool_simpl Require Import code. +From refinedc.examples.mpool_simpl Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/mpool_simpl/mpool_simpl.c]. *) +(* Generated from [examples/mpool_simpl.c]. *) Section proof_mpool_put. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/mpool_simpl/mpool_simpl_spec.v b/examples/+rc+/mpool_simpl/spec.v similarity index 97% rename from theories/examples/mpool_simpl/mpool_simpl_spec.v rename to examples/+rc+/mpool_simpl/spec.v index 6ab780e95dfa296cb5f854bb7c5ee17e4f0208e8..10703938a5718810554a0b20e03913c66997b1b2 100644 --- a/theories/examples/mpool_simpl/mpool_simpl_spec.v +++ b/examples/+rc+/mpool_simpl/spec.v @@ -1,8 +1,8 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mpool_simpl Require Import mpool_simpl_code. +From refinedc.examples.mpool_simpl Require Import code. Set Default Proof Using "Type". -(* Generated from [theories/examples/mpool_simpl/mpool_simpl.c]. *) +(* Generated from [examples/mpool_simpl.c]. *) Section spec. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/mutable_map/mutable_map_code.v b/examples/+rc+/mutable_map/code.v similarity index 99% rename from theories/examples/mutable_map/mutable_map_code.v rename to examples/+rc+/mutable_map/code.v index 8da06635ce632e70d2ec201b15c4e01675e1d111..e3710dabb45505a9985746052c78530f642529c6 100644 --- a/theories/examples/mutable_map/mutable_map_code.v +++ b/examples/+rc+/mutable_map/code.v @@ -3,9 +3,9 @@ From refinedc.lang Require Import tactics. From refinedc.typing Require Import annotations. Set Default Proof Using "Type". -(* Generated from [theories/examples/mutable_map/mutable_map.c]. *) +(* Generated from [examples/mutable_map.c]. *) Section code. - Definition file_0 : string := "theories/examples/mutable_map/mutable_map.c". + Definition file_0 : string := "examples/mutable_map.c". Definition loc_2 : location_info := LocationInfo file_0 223 2 225 3. Definition loc_3 : location_info := LocationInfo file_0 227 2 227 89. Definition loc_4 : location_info := LocationInfo file_0 230 2 230 33. diff --git a/examples/+rc+/mutable_map/dune b/examples/+rc+/mutable_map/dune new file mode 100644 index 0000000000000000000000000000000000000000..a82f6ea284f123302baf762bd0b181819c421762 --- /dev/null +++ b/examples/+rc+/mutable_map/dune @@ -0,0 +1,5 @@ +; Generated by [refinedc], do not edit. +(coq.theory + (flags -w -notation-overridden -w -redundant-canonical-projection) + (name refinedc.examples.mutable_map) + (theories refinedc.lang refinedc.typing refinedc.typing.automation refinedc.lithium)) diff --git a/theories/examples/mutable_map/mutable_map_extra.v b/examples/+rc+/mutable_map/mutable_map_extra.v similarity index 100% rename from theories/examples/mutable_map/mutable_map_extra.v rename to examples/+rc+/mutable_map/mutable_map_extra.v diff --git a/theories/examples/mutable_map/mutable_map_proof_compute_min_count.v b/examples/+rc+/mutable_map/proof_compute_min_count.v similarity index 80% rename from theories/examples/mutable_map/mutable_map_proof_compute_min_count.v rename to examples/+rc+/mutable_map/proof_compute_min_count.v index 1ed80622ecd0a0745a47675a64e0c706eba2c441..97d4d4751ef9d55a20018c48b5cb4b4a4170b004 100644 --- a/theories/examples/mutable_map/mutable_map_proof_compute_min_count.v +++ b/examples/+rc+/mutable_map/proof_compute_min_count.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mutable_map Require Import mutable_map_code. -From refinedc.examples.mutable_map Require Import mutable_map_spec. +From refinedc.examples.mutable_map Require Import code. +From refinedc.examples.mutable_map Require Import spec. From refinedc.examples.mutable_map Require Import mutable_map_extra. Set Default Proof Using "Type". -(* Generated from [theories/examples/mutable_map/mutable_map.c]. *) +(* Generated from [examples/mutable_map.c]. *) Section proof_compute_min_count. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/examples/+rc+/mutable_map/proof_files b/examples/+rc+/mutable_map/proof_files new file mode 100644 index 0000000000000000000000000000000000000000..f54bf3218930a231bb195d2381a7245e41b73b80 --- /dev/null +++ b/examples/+rc+/mutable_map/proof_files @@ -0,0 +1,12 @@ +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mutable_map/proof_alloc.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mutable_map/proof_alloc_array.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mutable_map/proof_compute_min_count.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mutable_map/proof_free.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mutable_map/proof_free_array.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mutable_map/proof_fsm_get.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mutable_map/proof_fsm_init.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mutable_map/proof_fsm_insert.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mutable_map/proof_fsm_probe.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mutable_map/proof_fsm_realloc_if_necessary.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mutable_map/proof_fsm_remove.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/mutable_map/proof_fsm_slot_for_key.v diff --git a/theories/examples/mutable_map/mutable_map_proof_fsm_get.v b/examples/+rc+/mutable_map/proof_fsm_get.v similarity index 83% rename from theories/examples/mutable_map/mutable_map_proof_fsm_get.v rename to examples/+rc+/mutable_map/proof_fsm_get.v index e115fe347021bc5b740ef49e52eaae17458dd8cc..cf91fb8bb1104b56af80115e7bc017aa8a283250 100644 --- a/theories/examples/mutable_map/mutable_map_proof_fsm_get.v +++ b/examples/+rc+/mutable_map/proof_fsm_get.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mutable_map Require Import mutable_map_code. -From refinedc.examples.mutable_map Require Import mutable_map_spec. +From refinedc.examples.mutable_map Require Import code. +From refinedc.examples.mutable_map Require Import spec. From refinedc.examples.mutable_map Require Import mutable_map_extra. Set Default Proof Using "Type". -(* Generated from [theories/examples/mutable_map/mutable_map.c]. *) +(* Generated from [examples/mutable_map.c]. *) Section proof_fsm_get. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/mutable_map/mutable_map_proof_fsm_init.v b/examples/+rc+/mutable_map/proof_fsm_init.v similarity index 88% rename from theories/examples/mutable_map/mutable_map_proof_fsm_init.v rename to examples/+rc+/mutable_map/proof_fsm_init.v index e1e1fe0023dacbdfcf0bfdd2bde31285d6e666ab..845462561d3878ca3ed7c3a3aaf2490dd31cd80a 100644 --- a/theories/examples/mutable_map/mutable_map_proof_fsm_init.v +++ b/examples/+rc+/mutable_map/proof_fsm_init.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mutable_map Require Import mutable_map_code. -From refinedc.examples.mutable_map Require Import mutable_map_spec. +From refinedc.examples.mutable_map Require Import code. +From refinedc.examples.mutable_map Require Import spec. From refinedc.examples.mutable_map Require Import mutable_map_extra. Set Default Proof Using "Type". -(* Generated from [theories/examples/mutable_map/mutable_map.c]. *) +(* Generated from [examples/mutable_map.c]. *) Section proof_fsm_init. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/mutable_map/mutable_map_proof_fsm_insert.v b/examples/+rc+/mutable_map/proof_fsm_insert.v similarity index 85% rename from theories/examples/mutable_map/mutable_map_proof_fsm_insert.v rename to examples/+rc+/mutable_map/proof_fsm_insert.v index 5c591a8fbd41004f33f1e9fbb8f7aaf4b43f5e79..6a00f16308ad4c541287ec881ee99c127865b1a4 100644 --- a/theories/examples/mutable_map/mutable_map_proof_fsm_insert.v +++ b/examples/+rc+/mutable_map/proof_fsm_insert.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mutable_map Require Import mutable_map_code. -From refinedc.examples.mutable_map Require Import mutable_map_spec. +From refinedc.examples.mutable_map Require Import code. +From refinedc.examples.mutable_map Require Import spec. From refinedc.examples.mutable_map Require Import mutable_map_extra. Set Default Proof Using "Type". -(* Generated from [theories/examples/mutable_map/mutable_map.c]. *) +(* Generated from [examples/mutable_map.c]. *) Section proof_fsm_insert. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/mutable_map/mutable_map_proof_fsm_probe.v b/examples/+rc+/mutable_map/proof_fsm_probe.v similarity index 89% rename from theories/examples/mutable_map/mutable_map_proof_fsm_probe.v rename to examples/+rc+/mutable_map/proof_fsm_probe.v index e549646a1ff3b566733f325dd8635c220d0bd530..494c1ebc2a3aea1a6cf0a208db4092bdc9140731 100644 --- a/theories/examples/mutable_map/mutable_map_proof_fsm_probe.v +++ b/examples/+rc+/mutable_map/proof_fsm_probe.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mutable_map Require Import mutable_map_code. -From refinedc.examples.mutable_map Require Import mutable_map_spec. +From refinedc.examples.mutable_map Require Import code. +From refinedc.examples.mutable_map Require Import spec. From refinedc.examples.mutable_map Require Import mutable_map_extra. Set Default Proof Using "Type". -(* Generated from [theories/examples/mutable_map/mutable_map.c]. *) +(* Generated from [examples/mutable_map.c]. *) Section proof_fsm_probe. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/mutable_map/mutable_map_proof_fsm_realloc_if_necessary.v b/examples/+rc+/mutable_map/proof_fsm_realloc_if_necessary.v similarity index 94% rename from theories/examples/mutable_map/mutable_map_proof_fsm_realloc_if_necessary.v rename to examples/+rc+/mutable_map/proof_fsm_realloc_if_necessary.v index c5591850a1a1b53cc5bca96d0ab25d90a9ffec45..18dc7dba84045e2299b85e54a21d1f9de0f56948 100644 --- a/theories/examples/mutable_map/mutable_map_proof_fsm_realloc_if_necessary.v +++ b/examples/+rc+/mutable_map/proof_fsm_realloc_if_necessary.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mutable_map Require Import mutable_map_code. -From refinedc.examples.mutable_map Require Import mutable_map_spec. +From refinedc.examples.mutable_map Require Import code. +From refinedc.examples.mutable_map Require Import spec. From refinedc.examples.mutable_map Require Import mutable_map_extra. Set Default Proof Using "Type". -(* Generated from [theories/examples/mutable_map/mutable_map.c]. *) +(* Generated from [examples/mutable_map.c]. *) Section proof_fsm_realloc_if_necessary. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/mutable_map/mutable_map_proof_fsm_remove.v b/examples/+rc+/mutable_map/proof_fsm_remove.v similarity index 83% rename from theories/examples/mutable_map/mutable_map_proof_fsm_remove.v rename to examples/+rc+/mutable_map/proof_fsm_remove.v index bda70d3f0932081cca41fb680c13c40c05bea7d0..c6e1d8b0a265400c03c90aeab2e276932fe9c25f 100644 --- a/theories/examples/mutable_map/mutable_map_proof_fsm_remove.v +++ b/examples/+rc+/mutable_map/proof_fsm_remove.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mutable_map Require Import mutable_map_code. -From refinedc.examples.mutable_map Require Import mutable_map_spec. +From refinedc.examples.mutable_map Require Import code. +From refinedc.examples.mutable_map Require Import spec. From refinedc.examples.mutable_map Require Import mutable_map_extra. Set Default Proof Using "Type". -(* Generated from [theories/examples/mutable_map/mutable_map.c]. *) +(* Generated from [examples/mutable_map.c]. *) Section proof_fsm_remove. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/mutable_map/mutable_map_proof_fsm_slot_for_key.v b/examples/+rc+/mutable_map/proof_fsm_slot_for_key.v similarity index 81% rename from theories/examples/mutable_map/mutable_map_proof_fsm_slot_for_key.v rename to examples/+rc+/mutable_map/proof_fsm_slot_for_key.v index 9c5f51b7e6450a986071298c4b1001e6f531fd92..50380928a6e3fb56b913290163088d134479369e 100644 --- a/theories/examples/mutable_map/mutable_map_proof_fsm_slot_for_key.v +++ b/examples/+rc+/mutable_map/proof_fsm_slot_for_key.v @@ -1,10 +1,10 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mutable_map Require Import mutable_map_code. -From refinedc.examples.mutable_map Require Import mutable_map_spec. +From refinedc.examples.mutable_map Require Import code. +From refinedc.examples.mutable_map Require Import spec. From refinedc.examples.mutable_map Require Import mutable_map_extra. Set Default Proof Using "Type". -(* Generated from [theories/examples/mutable_map/mutable_map.c]. *) +(* Generated from [examples/mutable_map.c]. *) Section proof_fsm_slot_for_key. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/mutable_map/mutable_map_spec.v b/examples/+rc+/mutable_map/spec.v similarity index 98% rename from theories/examples/mutable_map/mutable_map_spec.v rename to examples/+rc+/mutable_map/spec.v index 22d3d4f0aa734d849f078d7bb4e00ca390fc0b84..b41ad3e02c9edb62731d7e85c8790fba9408ef62 100644 --- a/theories/examples/mutable_map/mutable_map_spec.v +++ b/examples/+rc+/mutable_map/spec.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.mutable_map Require Import mutable_map_code. +From refinedc.examples.mutable_map Require Import code. From refinedc.examples.mutable_map Require Import mutable_map_extra. Set Default Proof Using "Type". -(* Generated from [theories/examples/mutable_map/mutable_map.c]. *) +(* Generated from [examples/mutable_map.c]. *) Section spec. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/queue/queue_code.v b/examples/+rc+/queue/code.v similarity index 99% rename from theories/examples/queue/queue_code.v rename to examples/+rc+/queue/code.v index ea9d9787e806099152af85b37389472de396fa5e..e11638e104fe26c65c4e99a0275879ca0002a90b 100644 --- a/theories/examples/queue/queue_code.v +++ b/examples/+rc+/queue/code.v @@ -3,9 +3,9 @@ From refinedc.lang Require Import tactics. From refinedc.typing Require Import annotations. Set Default Proof Using "Type". -(* Generated from [theories/examples/queue/queue.c]. *) +(* Generated from [examples/queue.c]. *) Section code. - Definition file_0 : string := "theories/examples/queue/queue.c". + Definition file_0 : string := "examples/queue.c". Definition loc_2 : location_info := LocationInfo file_0 28 2 28 46. Definition loc_3 : location_info := LocationInfo file_0 29 2 29 31. Definition loc_4 : location_info := LocationInfo file_0 30 2 30 29. diff --git a/examples/+rc+/queue/dune b/examples/+rc+/queue/dune new file mode 100644 index 0000000000000000000000000000000000000000..40d5105ba8b05cfa5e7b8ed385939639d6f9652e --- /dev/null +++ b/examples/+rc+/queue/dune @@ -0,0 +1,5 @@ +; Generated by [refinedc], do not edit. +(coq.theory + (flags -w -notation-overridden -w -redundant-canonical-projection) + (name refinedc.examples.queue) + (theories refinedc.lang refinedc.typing refinedc.typing.automation refinedc.lithium)) diff --git a/theories/examples/queue/queue_proof_dequeue.v b/examples/+rc+/queue/proof_dequeue.v similarity index 81% rename from theories/examples/queue/queue_proof_dequeue.v rename to examples/+rc+/queue/proof_dequeue.v index 34fda014fca1cf9c85cf22d740935e8c44034bed..0764e8057773dd0f3979ab29780703ba7342895d 100644 --- a/theories/examples/queue/queue_proof_dequeue.v +++ b/examples/+rc+/queue/proof_dequeue.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.queue Require Import queue_code. -From refinedc.examples.queue Require Import queue_spec. +From refinedc.examples.queue Require Import code. +From refinedc.examples.queue Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/queue/queue.c]. *) +(* Generated from [examples/queue.c]. *) Section proof_dequeue. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/queue/queue_proof_enqueue.v b/examples/+rc+/queue/proof_enqueue.v similarity index 81% rename from theories/examples/queue/queue_proof_enqueue.v rename to examples/+rc+/queue/proof_enqueue.v index c35e4f72e83faeaa0169daf7dae17326449d0ac3..1bb0435e9ab4d1951b076e058c536fdb0c0bbd32 100644 --- a/theories/examples/queue/queue_proof_enqueue.v +++ b/examples/+rc+/queue/proof_enqueue.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.queue Require Import queue_code. -From refinedc.examples.queue Require Import queue_spec. +From refinedc.examples.queue Require Import code. +From refinedc.examples.queue Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/queue/queue.c]. *) +(* Generated from [examples/queue.c]. *) Section proof_enqueue. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/examples/+rc+/queue/proof_files b/examples/+rc+/queue/proof_files new file mode 100644 index 0000000000000000000000000000000000000000..e68227175fc507df2797249fe91706918b7fffe8 --- /dev/null +++ b/examples/+rc+/queue/proof_files @@ -0,0 +1,8 @@ +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/queue/proof_alloc.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/queue/proof_alloc_array.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/queue/proof_dequeue.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/queue/proof_enqueue.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/queue/proof_free.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/queue/proof_free_array.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/queue/proof_init_queue.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/queue/proof_is_empty.v diff --git a/theories/examples/queue/queue_proof_init_queue.v b/examples/+rc+/queue/proof_init_queue.v similarity index 81% rename from theories/examples/queue/queue_proof_init_queue.v rename to examples/+rc+/queue/proof_init_queue.v index 7620b1e8b879b2fb2c7e8830855084937543d3fd..2acec51bf351e72613920bd5ced8c9e1a99e3b2f 100644 --- a/theories/examples/queue/queue_proof_init_queue.v +++ b/examples/+rc+/queue/proof_init_queue.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.queue Require Import queue_code. -From refinedc.examples.queue Require Import queue_spec. +From refinedc.examples.queue Require Import code. +From refinedc.examples.queue Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/queue/queue.c]. *) +(* Generated from [examples/queue.c]. *) Section proof_init_queue. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/queue/queue_proof_is_empty.v b/examples/+rc+/queue/proof_is_empty.v similarity index 79% rename from theories/examples/queue/queue_proof_is_empty.v rename to examples/+rc+/queue/proof_is_empty.v index 189f0248e7db2b71e5317649f7483cba1758de1c..69d46571f103f208fe7bf8d50ccd2c06ae01cd52 100644 --- a/theories/examples/queue/queue_proof_is_empty.v +++ b/examples/+rc+/queue/proof_is_empty.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.queue Require Import queue_code. -From refinedc.examples.queue Require Import queue_spec. +From refinedc.examples.queue Require Import code. +From refinedc.examples.queue Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/queue/queue.c]. *) +(* Generated from [examples/queue.c]. *) Section proof_is_empty. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/queue/queue_spec.v b/examples/+rc+/queue/spec.v similarity index 98% rename from theories/examples/queue/queue_spec.v rename to examples/+rc+/queue/spec.v index 8433f874ef46ca83ca62fe98e12dce7991cb0793..c4417f724e405557d7b01e2de9afb6ac8542c098 100644 --- a/theories/examples/queue/queue_spec.v +++ b/examples/+rc+/queue/spec.v @@ -1,8 +1,8 @@ From refinedc.typing Require Import typing. -From refinedc.examples.queue Require Import queue_code. +From refinedc.examples.queue Require Import code. Set Default Proof Using "Type". -(* Generated from [theories/examples/queue/queue.c]. *) +(* Generated from [examples/queue.c]. *) Section spec. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/reverse/reverse_code.v b/examples/+rc+/reverse/code.v similarity index 99% rename from theories/examples/reverse/reverse_code.v rename to examples/+rc+/reverse/code.v index 3defe858fa2480e6ecf7503df594cb9b7ad95af3..51f4a71b8fecc903a53adb7e13c3c30ca37fdb21 100644 --- a/theories/examples/reverse/reverse_code.v +++ b/examples/+rc+/reverse/code.v @@ -3,9 +3,9 @@ From refinedc.lang Require Import tactics. From refinedc.typing Require Import annotations. Set Default Proof Using "Type". -(* Generated from [theories/examples/reverse/reverse.c]. *) +(* Generated from [examples/reverse.c]. *) Section code. - Definition file_0 : string := "theories/examples/reverse/reverse.c". + Definition file_0 : string := "examples/reverse.c". Definition loc_2 : location_info := LocationInfo file_0 16 4 16 26. Definition loc_3 : location_info := LocationInfo file_0 16 11 16 25. Definition loc_6 : location_info := LocationInfo file_0 23 4 23 19. diff --git a/examples/+rc+/reverse/dune b/examples/+rc+/reverse/dune new file mode 100644 index 0000000000000000000000000000000000000000..d818161a3aad4795ea28e4aa4f46591e0abc690d --- /dev/null +++ b/examples/+rc+/reverse/dune @@ -0,0 +1,5 @@ +; Generated by [refinedc], do not edit. +(coq.theory + (flags -w -notation-overridden -w -redundant-canonical-projection) + (name refinedc.examples.reverse) + (theories refinedc.lang refinedc.typing refinedc.typing.automation refinedc.lithium)) diff --git a/examples/+rc+/reverse/proof_files b/examples/+rc+/reverse/proof_files new file mode 100644 index 0000000000000000000000000000000000000000..4b19ae06deac7a4fbc195f026094fbe32290d366 --- /dev/null +++ b/examples/+rc+/reverse/proof_files @@ -0,0 +1,8 @@ +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/reverse/proof_forward.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/reverse/proof_init.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/reverse/proof_member.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/reverse/proof_member_rec.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/reverse/proof_pop.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/reverse/proof_push.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/reverse/proof_reverse.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/reverse/proof_test.v diff --git a/theories/examples/reverse/reverse_proof_forward.v b/examples/+rc+/reverse/proof_forward.v similarity index 84% rename from theories/examples/reverse/reverse_proof_forward.v rename to examples/+rc+/reverse/proof_forward.v index c508c2d2fdfe97ae029539671ca228f84766da81..759014151053fef049d06d9060663b4359594897 100644 --- a/theories/examples/reverse/reverse_proof_forward.v +++ b/examples/+rc+/reverse/proof_forward.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.reverse Require Import reverse_code. -From refinedc.examples.reverse Require Import reverse_spec. +From refinedc.examples.reverse Require Import code. +From refinedc.examples.reverse Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/reverse/reverse.c]. *) +(* Generated from [examples/reverse.c]. *) Section proof_forward. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/reverse/reverse_proof_init.v b/examples/+rc+/reverse/proof_init.v similarity index 77% rename from theories/examples/reverse/reverse_proof_init.v rename to examples/+rc+/reverse/proof_init.v index 44f41b0d4962901d43a058a4ee8e4d18b403f0c3..d4b499d2c04232b0a8ebc6b07938cebabad97c41 100644 --- a/theories/examples/reverse/reverse_proof_init.v +++ b/examples/+rc+/reverse/proof_init.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.reverse Require Import reverse_code. -From refinedc.examples.reverse Require Import reverse_spec. +From refinedc.examples.reverse Require Import code. +From refinedc.examples.reverse Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/reverse/reverse.c]. *) +(* Generated from [examples/reverse.c]. *) Section proof_init. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/reverse/reverse_proof_member.v b/examples/+rc+/reverse/proof_member.v similarity index 87% rename from theories/examples/reverse/reverse_proof_member.v rename to examples/+rc+/reverse/proof_member.v index 9c460895e649185c903df91935a69d1016b385da..c479f50302c2376b30350a62158f09d6690790a1 100644 --- a/theories/examples/reverse/reverse_proof_member.v +++ b/examples/+rc+/reverse/proof_member.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.reverse Require Import reverse_code. -From refinedc.examples.reverse Require Import reverse_spec. +From refinedc.examples.reverse Require Import code. +From refinedc.examples.reverse Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/reverse/reverse.c]. *) +(* Generated from [examples/reverse.c]. *) Section proof_member. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/reverse/reverse_proof_member_rec.v b/examples/+rc+/reverse/proof_member_rec.v similarity index 82% rename from theories/examples/reverse/reverse_proof_member_rec.v rename to examples/+rc+/reverse/proof_member_rec.v index 8e6225ba1673b474b21073f5ff55252d14dabf02..34063e05347bc0644e6f3e5bfd4121a53fa0dfeb 100644 --- a/theories/examples/reverse/reverse_proof_member_rec.v +++ b/examples/+rc+/reverse/proof_member_rec.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.reverse Require Import reverse_code. -From refinedc.examples.reverse Require Import reverse_spec. +From refinedc.examples.reverse Require Import code. +From refinedc.examples.reverse Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/reverse/reverse.c]. *) +(* Generated from [examples/reverse.c]. *) Section proof_member_rec. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/reverse/reverse_proof_pop.v b/examples/+rc+/reverse/proof_pop.v similarity index 77% rename from theories/examples/reverse/reverse_proof_pop.v rename to examples/+rc+/reverse/proof_pop.v index 60ad120c5bf2a2683a491fc28838996aa011d649..a984c5fc3cfda090d50f0103ce78c0e91b295ceb 100644 --- a/theories/examples/reverse/reverse_proof_pop.v +++ b/examples/+rc+/reverse/proof_pop.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.reverse Require Import reverse_code. -From refinedc.examples.reverse Require Import reverse_spec. +From refinedc.examples.reverse Require Import code. +From refinedc.examples.reverse Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/reverse/reverse.c]. *) +(* Generated from [examples/reverse.c]. *) Section proof_pop. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/reverse/reverse_proof_push.v b/examples/+rc+/reverse/proof_push.v similarity index 78% rename from theories/examples/reverse/reverse_proof_push.v rename to examples/+rc+/reverse/proof_push.v index 4ce2c09301d624ddc4a6f4e400ca23d7d9becd1a..87be1a95f5e5db8dab4139ca082a2391a38dfa07 100644 --- a/theories/examples/reverse/reverse_proof_push.v +++ b/examples/+rc+/reverse/proof_push.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.reverse Require Import reverse_code. -From refinedc.examples.reverse Require Import reverse_spec. +From refinedc.examples.reverse Require Import code. +From refinedc.examples.reverse Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/reverse/reverse.c]. *) +(* Generated from [examples/reverse.c]. *) Section proof_push. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/reverse/reverse_proof_reverse.v b/examples/+rc+/reverse/proof_reverse.v similarity index 85% rename from theories/examples/reverse/reverse_proof_reverse.v rename to examples/+rc+/reverse/proof_reverse.v index 1931a59e6a1e7d0a2a1007e794ea5001ac55c299..848658d82c7d120553a4adb74154c4d92d901f05 100644 --- a/theories/examples/reverse/reverse_proof_reverse.v +++ b/examples/+rc+/reverse/proof_reverse.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.reverse Require Import reverse_code. -From refinedc.examples.reverse Require Import reverse_spec. +From refinedc.examples.reverse Require Import code. +From refinedc.examples.reverse Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/reverse/reverse.c]. *) +(* Generated from [examples/reverse.c]. *) Section proof_reverse. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/reverse/reverse_proof_test.v b/examples/+rc+/reverse/proof_test.v similarity index 89% rename from theories/examples/reverse/reverse_proof_test.v rename to examples/+rc+/reverse/proof_test.v index f44e0983404ad627b2c1eb6fb28a61fb88996304..d6825f5359a26d9150ce75e2a4633256b15fa8c5 100644 --- a/theories/examples/reverse/reverse_proof_test.v +++ b/examples/+rc+/reverse/proof_test.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.reverse Require Import reverse_code. -From refinedc.examples.reverse Require Import reverse_spec. +From refinedc.examples.reverse Require Import code. +From refinedc.examples.reverse Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/reverse/reverse.c]. *) +(* Generated from [examples/reverse.c]. *) Section proof_test. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/reverse/reverse_spec.v b/examples/+rc+/reverse/spec.v similarity index 97% rename from theories/examples/reverse/reverse_spec.v rename to examples/+rc+/reverse/spec.v index c4e62a3d3e4711efc3b213ef0b843abf2375c9ea..034b73672dcb981ab1fe1cdab58c9914b9c8ab2c 100644 --- a/theories/examples/reverse/reverse_spec.v +++ b/examples/+rc+/reverse/spec.v @@ -1,8 +1,8 @@ From refinedc.typing Require Import typing. -From refinedc.examples.reverse Require Import reverse_code. +From refinedc.examples.reverse Require Import code. Set Default Proof Using "Type". -(* Generated from [theories/examples/reverse/reverse.c]. *) +(* Generated from [examples/reverse.c]. *) Section spec. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/misc/shift_code.v b/examples/+rc+/shift/code.v similarity index 93% rename from theories/examples/misc/shift_code.v rename to examples/+rc+/shift/code.v index ac444b3176edff424d36636b01ca583d9c77aed5..5afa9412adf4937e0d5d6737dbc1688bd517fb4b 100644 --- a/theories/examples/misc/shift_code.v +++ b/examples/+rc+/shift/code.v @@ -3,9 +3,9 @@ From refinedc.lang Require Import tactics. From refinedc.typing Require Import annotations. Set Default Proof Using "Type". -(* Generated from [theories/examples/misc/shift.c]. *) +(* Generated from [examples/shift.c]. *) Section code. - Definition file_0 : string := "theories/examples/misc/shift.c". + Definition file_0 : string := "examples/shift.c". Definition loc_2 : location_info := LocationInfo file_0 6 2 6 16. Definition loc_3 : location_info := LocationInfo file_0 6 9 6 15. Definition loc_4 : location_info := LocationInfo file_0 6 9 6 10. diff --git a/examples/+rc+/shift/dune b/examples/+rc+/shift/dune new file mode 100644 index 0000000000000000000000000000000000000000..e44f18426714b38164b22c70e09de1e1a3f9ac80 --- /dev/null +++ b/examples/+rc+/shift/dune @@ -0,0 +1,5 @@ +; Generated by [refinedc], do not edit. +(coq.theory + (flags -w -notation-overridden -w -redundant-canonical-projection) + (name refinedc.examples.shift) + (theories refinedc.lang refinedc.typing refinedc.typing.automation refinedc.lithium)) diff --git a/theories/examples/misc/shift_proof_div_two.v b/examples/+rc+/shift/proof_div_two.v similarity index 82% rename from theories/examples/misc/shift_proof_div_two.v rename to examples/+rc+/shift/proof_div_two.v index 5fe479372d751f1434c3c81e3d1f8e5e59099a76..396b5a7007d0bba86721d4fd228ae2dc5dc7d03b 100644 --- a/theories/examples/misc/shift_proof_div_two.v +++ b/examples/+rc+/shift/proof_div_two.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.misc Require Import shift_code. -From refinedc.examples.misc Require Import shift_spec. +From refinedc.examples.shift Require Import code. +From refinedc.examples.shift Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/misc/shift.c]. *) +(* Generated from [examples/shift.c]. *) Section proof_div_two. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/examples/+rc+/shift/proof_files b/examples/+rc+/shift/proof_files new file mode 100644 index 0000000000000000000000000000000000000000..7355275cb396f082a2698c4fecf3f56e8b79616a --- /dev/null +++ b/examples/+rc+/shift/proof_files @@ -0,0 +1,2 @@ +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/shift/proof_div_two.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/shift/proof_times_two.v diff --git a/theories/examples/misc/shift_proof_times_two.v b/examples/+rc+/shift/proof_times_two.v similarity index 80% rename from theories/examples/misc/shift_proof_times_two.v rename to examples/+rc+/shift/proof_times_two.v index 5079e8a8361f9a90c227b16a64f5cfa9984f68e7..631d54e4a2bbf14c5031cc97ce9e1481c219e0f8 100644 --- a/theories/examples/misc/shift_proof_times_two.v +++ b/examples/+rc+/shift/proof_times_two.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.misc Require Import shift_code. -From refinedc.examples.misc Require Import shift_spec. +From refinedc.examples.shift Require Import code. +From refinedc.examples.shift Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/misc/shift.c]. *) +(* Generated from [examples/shift.c]. *) Section proof_times_two. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/misc/shift_spec.v b/examples/+rc+/shift/spec.v similarity index 83% rename from theories/examples/misc/shift_spec.v rename to examples/+rc+/shift/spec.v index 864de4ba353d9f06e9a24cc2cda162f3dd586ca0..d9657fcfe139403f67ed343bf079ba1e21000d63 100644 --- a/theories/examples/misc/shift_spec.v +++ b/examples/+rc+/shift/spec.v @@ -1,8 +1,8 @@ From refinedc.typing Require Import typing. -From refinedc.examples.misc Require Import shift_code. +From refinedc.examples.shift Require Import code. Set Default Proof Using "Type". -(* Generated from [theories/examples/misc/shift.c]. *) +(* Generated from [examples/shift.c]. *) Section spec. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/simple_union/simple_union_code.v b/examples/+rc+/simple_union/code.v similarity index 98% rename from theories/examples/simple_union/simple_union_code.v rename to examples/+rc+/simple_union/code.v index 1e03ed8b93fe70a89fd7788bee4a915bd6521f6a..c730e238fab5b884938b2c12b19a937c2930c872 100644 --- a/theories/examples/simple_union/simple_union_code.v +++ b/examples/+rc+/simple_union/code.v @@ -3,9 +3,9 @@ From refinedc.lang Require Import tactics. From refinedc.typing Require Import annotations. Set Default Proof Using "Type". -(* Generated from [theories/examples/simple_union/simple_union.c]. *) +(* Generated from [examples/simple_union.c]. *) Section code. - Definition file_0 : string := "theories/examples/simple_union/simple_union.c". + Definition file_0 : string := "examples/simple_union.c". Definition loc_2 : location_info := LocationInfo file_0 53 4 53 25. Definition loc_3 : location_info := LocationInfo file_0 54 4 54 25. Definition loc_4 : location_info := LocationInfo file_0 54 4 54 20. diff --git a/examples/+rc+/simple_union/dune b/examples/+rc+/simple_union/dune new file mode 100644 index 0000000000000000000000000000000000000000..0382eb0f20e134f9aef58288562f848aa8d0764f --- /dev/null +++ b/examples/+rc+/simple_union/dune @@ -0,0 +1,5 @@ +; Generated by [refinedc], do not edit. +(coq.theory + (flags -w -notation-overridden -w -redundant-canonical-projection) + (name refinedc.examples.simple_union) + (theories refinedc.lang refinedc.typing refinedc.typing.automation refinedc.lithium)) diff --git a/examples/+rc+/simple_union/proof_files b/examples/+rc+/simple_union/proof_files new file mode 100644 index 0000000000000000000000000000000000000000..8f26a8c361cae3a6ba1b4b9286de50d8612c0686 --- /dev/null +++ b/examples/+rc+/simple_union/proof_files @@ -0,0 +1,3 @@ +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/simple_union/proof_test_item_modify_entry.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/simple_union/proof_test_item_set_empty.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/simple_union/proof_test_item_set_entry.v diff --git a/theories/examples/simple_union/simple_union_proof_test_item_modify_entry.v b/examples/+rc+/simple_union/proof_test_item_modify_entry.v similarity index 79% rename from theories/examples/simple_union/simple_union_proof_test_item_modify_entry.v rename to examples/+rc+/simple_union/proof_test_item_modify_entry.v index 4350794f156a784da5d4e745c58079ad8ece2c0b..5f5ec1b0af4037a3f88540b9245b0bde3473589d 100644 --- a/theories/examples/simple_union/simple_union_proof_test_item_modify_entry.v +++ b/examples/+rc+/simple_union/proof_test_item_modify_entry.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.simple_union Require Import simple_union_code. -From refinedc.examples.simple_union Require Import simple_union_spec. +From refinedc.examples.simple_union Require Import code. +From refinedc.examples.simple_union Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/simple_union/simple_union.c]. *) +(* Generated from [examples/simple_union.c]. *) Section proof_test_item_modify_entry. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/simple_union/simple_union_proof_test_item_set_empty.v b/examples/+rc+/simple_union/proof_test_item_set_empty.v similarity index 78% rename from theories/examples/simple_union/simple_union_proof_test_item_set_empty.v rename to examples/+rc+/simple_union/proof_test_item_set_empty.v index 584acdd8e8450d231d3a35837044cd2b85ebe88a..21d57c62809e129aeeae9558c7c74d93c432d790 100644 --- a/theories/examples/simple_union/simple_union_proof_test_item_set_empty.v +++ b/examples/+rc+/simple_union/proof_test_item_set_empty.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.simple_union Require Import simple_union_code. -From refinedc.examples.simple_union Require Import simple_union_spec. +From refinedc.examples.simple_union Require Import code. +From refinedc.examples.simple_union Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/simple_union/simple_union.c]. *) +(* Generated from [examples/simple_union.c]. *) Section proof_test_item_set_empty. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/simple_union/simple_union_proof_test_item_set_entry.v b/examples/+rc+/simple_union/proof_test_item_set_entry.v similarity index 78% rename from theories/examples/simple_union/simple_union_proof_test_item_set_entry.v rename to examples/+rc+/simple_union/proof_test_item_set_entry.v index 2e7fdeddaba64cd42a27bdccbeae9a6b1190fcfa..788b0bdbe6b071b219776cb14cc1ad80d4e4ec9f 100644 --- a/theories/examples/simple_union/simple_union_proof_test_item_set_entry.v +++ b/examples/+rc+/simple_union/proof_test_item_set_entry.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.simple_union Require Import simple_union_code. -From refinedc.examples.simple_union Require Import simple_union_spec. +From refinedc.examples.simple_union Require Import code. +From refinedc.examples.simple_union Require Import spec. Set Default Proof Using "Type". -(* Generated from [theories/examples/simple_union/simple_union.c]. *) +(* Generated from [examples/simple_union.c]. *) Section proof_test_item_set_entry. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/simple_union/simple_union_spec.v b/examples/+rc+/simple_union/spec.v similarity index 95% rename from theories/examples/simple_union/simple_union_spec.v rename to examples/+rc+/simple_union/spec.v index 160e2745e0e8d37864a0dff217d4fec2b4ba0fb4..8f64b5fd32440702e44cc645198701d71640a02d 100644 --- a/theories/examples/simple_union/simple_union_spec.v +++ b/examples/+rc+/simple_union/spec.v @@ -1,8 +1,8 @@ From refinedc.typing Require Import typing. -From refinedc.examples.simple_union Require Import simple_union_code. +From refinedc.examples.simple_union Require Import code. Set Default Proof Using "Type". -(* Generated from [theories/examples/simple_union/simple_union.c]. *) +(* Generated from [examples/simple_union.c]. *) Section spec. Context `{!typeG Σ} `{!globalG Σ}. diff --git a/theories/examples/spinlock/spinlock_code.v b/examples/+rc+/spinlock/code.v similarity index 97% rename from theories/examples/spinlock/spinlock_code.v rename to examples/+rc+/spinlock/code.v index 04112022a0b3f66647d4e01a046d6765bc676409..274cbda9a3e07bff344208f8278da86cc6ed5df5 100644 --- a/theories/examples/spinlock/spinlock_code.v +++ b/examples/+rc+/spinlock/code.v @@ -4,9 +4,9 @@ From refinedc.typing Require Import annotations. From refinedc.examples.spinlock Require Import spinlock_annot. Set Default Proof Using "Type". -(* Generated from [theories/examples/spinlock/spinlock.c]. *) +(* Generated from [examples/spinlock.c]. *) Section code. - Definition file_0 : string := "theories/examples/spinlock/spinlock.c". + Definition file_0 : string := "examples/spinlock.c". Definition loc_2 : location_info := LocationInfo file_0 6 4 6 19. Definition loc_3 : location_info := LocationInfo file_0 6 4 6 14. Definition loc_4 : location_info := LocationInfo file_0 6 4 6 8. diff --git a/examples/+rc+/spinlock/dune b/examples/+rc+/spinlock/dune new file mode 100644 index 0000000000000000000000000000000000000000..772832da93f46070acb82e08cf658e981725ab9a --- /dev/null +++ b/examples/+rc+/spinlock/dune @@ -0,0 +1,5 @@ +; Generated by [refinedc], do not edit. +(coq.theory + (flags -w -notation-overridden -w -redundant-canonical-projection) + (name refinedc.examples.spinlock) + (theories refinedc.lang refinedc.typing refinedc.typing.automation refinedc.lithium)) diff --git a/examples/+rc+/spinlock/proof_files b/examples/+rc+/spinlock/proof_files new file mode 100644 index 0000000000000000000000000000000000000000..0a40353978fa347dfe2871705d2be705e96fd508 --- /dev/null +++ b/examples/+rc+/spinlock/proof_files @@ -0,0 +1,5 @@ +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/spinlock/proof_atomic_signal_fence.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/spinlock/proof_atomic_thread_fence.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/spinlock/proof_sl_init.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/spinlock/proof_sl_lock.v +/home/rodolphe/research/projects/refinedc/refinedc/examples/+rc+/spinlock/proof_sl_unlock.v diff --git a/theories/examples/spinlock/spinlock_proof_sl_init.v b/examples/+rc+/spinlock/proof_sl_init.v similarity index 70% rename from theories/examples/spinlock/spinlock_proof_sl_init.v rename to examples/+rc+/spinlock/proof_sl_init.v index 47eb61792122379dc3fa318838120df4d693b220..ef1b12c7af2948ac29d13c7dc7c81eb21bc91007 100644 --- a/theories/examples/spinlock/spinlock_proof_sl_init.v +++ b/examples/+rc+/spinlock/proof_sl_init.v @@ -1,11 +1,11 @@ From refinedc.typing Require Import typing. -From refinedc.examples.spinlock Require Import spinlock_code. -From refinedc.examples.spinlock Require Import spinlock_spec. +From refinedc.examples.spinlock Require Import code. +From refinedc.examples.spinlock Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. From refinedc.examples.spinlock Require Import spinlock_proof. Set Default Proof Using "Type". -(* Generated from [theories/examples/spinlock/spinlock.c]. *) +(* Generated from [examples/spinlock.c]. *) Section proof_sl_init. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/spinlock/spinlock_proof_sl_lock.v b/examples/+rc+/spinlock/proof_sl_lock.v similarity index 70% rename from theories/examples/spinlock/spinlock_proof_sl_lock.v rename to examples/+rc+/spinlock/proof_sl_lock.v index 2665e80604a759682db81200dd625fa8b5310251..47a11e76c2e787fc8b693f8b68320e8efbbfe53d 100644 --- a/theories/examples/spinlock/spinlock_proof_sl_lock.v +++ b/examples/+rc+/spinlock/proof_sl_lock.v @@ -1,11 +1,11 @@ From refinedc.typing Require Import typing. -From refinedc.examples.spinlock Require Import spinlock_code. -From refinedc.examples.spinlock Require Import spinlock_spec. +From refinedc.examples.spinlock Require Import code. +From refinedc.examples.spinlock Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. From refinedc.examples.spinlock Require Import spinlock_proof. Set Default Proof Using "Type". -(* Generated from [theories/examples/spinlock/spinlock.c]. *) +(* Generated from [examples/spinlock.c]. *) Section proof_sl_lock. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/spinlock/spinlock_proof_sl_unlock.v b/examples/+rc+/spinlock/proof_sl_unlock.v similarity index 71% rename from theories/examples/spinlock/spinlock_proof_sl_unlock.v rename to examples/+rc+/spinlock/proof_sl_unlock.v index 2b03e1c6a6bf4c5c24f8210e0035acce0cf94646..0a1cea4bd2567fd734449da301b1fc8497880787 100644 --- a/theories/examples/spinlock/spinlock_proof_sl_unlock.v +++ b/examples/+rc+/spinlock/proof_sl_unlock.v @@ -1,11 +1,11 @@ From refinedc.typing Require Import typing. -From refinedc.examples.spinlock Require Import spinlock_code. -From refinedc.examples.spinlock Require Import spinlock_spec. +From refinedc.examples.spinlock Require Import code. +From refinedc.examples.spinlock Require Import spec. From refinedc.examples.spinlock Require Import spinlock_def. From refinedc.examples.spinlock Require Import spinlock_proof. Set Default Proof Using "Type". -(* Generated from [theories/examples/spinlock/spinlock.c]. *) +(* Generated from [examples/spinlock.c]. *) Section proof_sl_unlock. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/spinlock/spinlock_spec.v b/examples/+rc+/spinlock/spec.v similarity index 90% rename from theories/examples/spinlock/spinlock_spec.v rename to examples/+rc+/spinlock/spec.v index 61b54914294f5fb395cdb10fde5e9d00addf7aa6..d3c591c7a3584d6c24d6ef71ba31f1f18c825184 100644 --- a/theories/examples/spinlock/spinlock_spec.v +++ b/examples/+rc+/spinlock/spec.v @@ -1,9 +1,9 @@ From refinedc.typing Require Import typing. -From refinedc.examples.spinlock Require Import spinlock_code. +From refinedc.examples.spinlock Require Import code. From refinedc.examples.spinlock Require Import spinlock_def. Set Default Proof Using "Type". -(* Generated from [theories/examples/spinlock/spinlock.c]. *) +(* Generated from [examples/spinlock.c]. *) Section spec. Context `{!typeG Σ} `{!globalG Σ}. Context `{!lockG Σ}. diff --git a/theories/examples/spinlock/spinlock_annot.v b/examples/+rc+/spinlock/spinlock_annot.v similarity index 100% rename from theories/examples/spinlock/spinlock_annot.v rename to examples/+rc+/spinlock/spinlock_annot.v diff --git a/theories/examples/spinlock/spinlock_def.v b/examples/+rc+/spinlock/spinlock_def.v similarity index 99% rename from theories/examples/spinlock/spinlock_def.v rename to examples/+rc+/spinlock/spinlock_def.v index 667cab47f3286dafbfe853dec384b3b4abad8eea..c3b7543a45034b38b6aab999e7bce4d6b465b1c3 100644 --- a/theories/examples/spinlock/spinlock_def.v +++ b/examples/+rc+/spinlock/spinlock_def.v @@ -1,5 +1,5 @@ From refinedc.typing Require Import typing. -From refinedc.examples.spinlock Require Import spinlock_annot spinlock_code. +From refinedc.examples.spinlock Require Import spinlock_annot code. From iris.algebra Require Import csum excl auth cmra_big_op. From iris.algebra Require Import big_op gset frac agree. Set Default Proof Using "Type". diff --git a/theories/examples/spinlock/spinlock_proof.v b/examples/+rc+/spinlock/spinlock_proof.v similarity index 93% rename from theories/examples/spinlock/spinlock_proof.v rename to examples/+rc+/spinlock/spinlock_proof.v index 3db9eec9de461872002549f0b289e9dce814c0da..7b3be0fe5f4a4b29ac83392c4a1dc9b7cde5bcf1 100644 --- a/theories/examples/spinlock/spinlock_proof.v +++ b/examples/+rc+/spinlock/spinlock_proof.v @@ -2,8 +2,7 @@ From iris.algebra Require Import csum excl auth cmra_big_op. From iris.algebra Require Import big_op gset frac agree. From refinedc.typing Require Import typing. From refinedc.examples.spinlock Require Import spinlock_def. -From refinedc.examples.spinlock Require Import spinlock_spec. -From refinedc.examples.spinlock Require Import spinlock_code. +From refinedc.examples.spinlock Require Import code spec. Set Default Proof Using "Type". Section type. diff --git a/theories/examples/btree/btree.c b/examples/btree.c similarity index 99% rename from theories/examples/btree/btree.c rename to examples/btree.c index 2cc986faec670af992acec9e1485d0468f803ab2..289ae8de9aaeb597e9142c569b77c905f3d75a9d 100644 --- a/theories/examples/btree/btree.c +++ b/examples/btree.c @@ -1,6 +1,6 @@ +#include <refinedc.h> +#include <alloc.h> #include "btree.h" -#include "alloc.h" -#include "../inc/refinedc.h" //@rc::import btree_learn from refinedc.examples.btree (for proofs only) diff --git a/theories/examples/btree/btree.h b/examples/btree.h similarity index 100% rename from theories/examples/btree/btree.h rename to examples/btree.h diff --git a/theories/examples/misc/flags.c b/examples/flags.c similarity index 100% rename from theories/examples/misc/flags.c rename to examples/flags.c diff --git a/theories/examples/tutorial/alloc.h b/examples/include/alloc.h similarity index 95% rename from theories/examples/tutorial/alloc.h rename to examples/include/alloc.h index 25200c38dbce968a6c38607c0d33beb5ab40a3b1..77ad2179006344e70adeff21ba3e5c9711d910aa 100644 --- a/theories/examples/tutorial/alloc.h +++ b/examples/include/alloc.h @@ -25,3 +25,6 @@ void *alloc_array(size_t size, size_t n); [[rc::requires("{size * n < it_max size_t}", "{(8 | size)}")]] [[rc::args("size @ int<size_t>", "n @ int<size_t>", "&own<array<{mk_layout size 3}, {replicate n (uninit (mk_layout size 3))}>>")]] void free_array(size_t size, size_t n, void *ptr); + +#define ALLOC(sz) alloc(sz) +#define FREE(sz,ptr) free(sz,ptr) diff --git a/theories/examples/latch/latch.h b/examples/include/latch.h similarity index 100% rename from theories/examples/latch/latch.h rename to examples/include/latch.h diff --git a/theories/examples/inc/spinlock.h b/examples/include/spinlock.h similarity index 100% rename from theories/examples/inc/spinlock.h rename to examples/include/spinlock.h diff --git a/theories/examples/latch/latch.c b/examples/latch.c similarity index 91% rename from theories/examples/latch/latch.c rename to examples/latch.c index a4a4ea8d0cc9c69d2e51bc3570ae969fa705b267..918ca2e59365af1412bcb3cd54ecc39f5f243593 100644 --- a/theories/examples/latch/latch.c +++ b/examples/latch.c @@ -1,5 +1,5 @@ #include <stdbool.h> -#include "latch.h" +#include <latch.h> void latch_wait(struct latch* latch) { while(atomic_load(&latch->released) == (_Bool)false) {} diff --git a/theories/examples/lock/lock.c b/examples/lock.c similarity index 97% rename from theories/examples/lock/lock.c rename to examples/lock.c index 8109b1cecb54753e6d0012fd34d9296f6df8de94..a2804d4cdfa9a641073300b894b97fb3a432658c 100644 --- a/theories/examples/lock/lock.c +++ b/examples/lock.c @@ -1,6 +1,7 @@ #include <stddef.h> -#include "../inc/refinedc.h" -#include "../inc/spinlock.h" +#include <refinedc.h> +#include <spinlock.h> +//@rc::require refinedc.examples.spinlock struct [[rc::refined_by("n1 : Z", "n2 : Z", "n3 : Z")]] diff --git a/theories/examples/malloc1/malloc1.c b/examples/malloc1.c similarity index 97% rename from theories/examples/malloc1/malloc1.c rename to examples/malloc1.c index 7c62ba7d2f7d260e6109da165070a7ff266e9a5e..a014a425e7ee2b90bb5ebb5be57ea3c92badade2 100644 --- a/theories/examples/malloc1/malloc1.c +++ b/examples/malloc1.c @@ -1,9 +1,9 @@ // based on https://github.com/alastairreid/verifast-play/blob/master/src/malloc1.h // and https://github.com/alastairreid/verifast-play/blob/master/src/malloc1.c -#include "stddef.h" -#include "stdint.h" -#include "../inc/refinedc.h" +#include <stddef.h> +#include <stdint.h> +#include <refinedc.h> typedef struct [[rc::ptr_type("freelist_t:{(0 < len)%nat} @ optional<&own<...>>")]] [[rc::parameters("entry_size: nat")]] diff --git a/theories/examples/mpool/mpool.c b/examples/mpool.c similarity index 99% rename from theories/examples/mpool/mpool.c rename to examples/mpool.c index 05bc619b9f79e4f6bb6685bb092a033a37da853f..75ee1f1d974b040f49c9b8ba529ab93dbee2b833 100644 --- a/theories/examples/mpool/mpool.c +++ b/examples/mpool.c @@ -17,8 +17,9 @@ #include <stddef.h> #include <stdint.h> #include <stdbool.h> -#include "../inc/refinedc.h" -#include "../inc/spinlock.h" +#include <refinedc.h> +#include <spinlock.h> +//@rc::require refinedc.examples.spinlock [[rc::parameters("p : loc", "size : loc", "align : nat")]] [[rc::args("p @ ptr", "align @ int<size_t>", "size @ &own<uninit<size_t>>")]] diff --git a/theories/examples/mpool_simpl/mpool_simpl.c b/examples/mpool_simpl.c similarity index 99% rename from theories/examples/mpool_simpl/mpool_simpl.c rename to examples/mpool_simpl.c index 7c2b75ddba1ad55f979e3c89834d91171bce48ee..e0d658ece8ab43bc93c6859dd50e1204e427328d 100644 --- a/theories/examples/mpool_simpl/mpool_simpl.c +++ b/examples/mpool_simpl.c @@ -1,5 +1,5 @@ #define NULL (void*)0 -#include "../inc/refinedc.h" +#include <refinedc.h> //@rc::inlined Definition ENTRY_LAYOUT := {| ly_size := 16%nat; ly_align_log := 3%nat |}. diff --git a/theories/examples/mutable_map/mutable_map.c b/examples/mutable_map.c similarity index 99% rename from theories/examples/mutable_map/mutable_map.c rename to examples/mutable_map.c index e940a9ed465c5fb48cbb3e86f728e39c3181ee6e..7ec6eeb9b5691de51385e30d27e53ad26a21ddf7 100644 --- a/theories/examples/mutable_map/mutable_map.c +++ b/examples/mutable_map.c @@ -1,8 +1,8 @@ #include <stddef.h> #include <stdint.h> #include <stdbool.h> -#include "../inc/refinedc.h" -#include "../tutorial/alloc.h" +#include <refinedc.h> +#include <alloc.h> // see https://github.com/splatlab/veribetrfs/blob/master/lib/DataStructures/MutableMapImpl.i.dfy // and https://github.com/splatlab/veribetrfs/blob/master/lib/DataStructures/MutableMapModel.i.dfy diff --git a/theories/examples/queue/queue.c b/examples/queue.c similarity index 97% rename from theories/examples/queue/queue.c rename to examples/queue.c index 8719003c66d4750fa8c211d91940e89546abcebd..97b73ad4c2094f1482ac7a0da9671139dc59e898 100644 --- a/theories/examples/queue/queue.c +++ b/examples/queue.c @@ -1,6 +1,6 @@ #include <stdbool.h> -#include "../inc/refinedc.h" -#include "../tutorial/alloc.h" +#include <refinedc.h> +#include <alloc.h> typedef struct [[rc::parameters("cont : type")]] [[rc::refined_by("ty: type")]] diff --git a/theories/examples/reverse/reverse.c b/examples/reverse.c similarity index 99% rename from theories/examples/reverse/reverse.c rename to examples/reverse.c index f7532bfe4604980cbb7029a1228fa4706aba2f5a..1433b19268cf9ea7de968eacc88c60e61837d51d 100644 --- a/theories/examples/reverse/reverse.c +++ b/examples/reverse.c @@ -1,4 +1,4 @@ -#include "../inc/refinedc.h" +#include <refinedc.h> #include <stddef.h> #include <stdbool.h> diff --git a/theories/examples/misc/shift.c b/examples/shift.c similarity index 100% rename from theories/examples/misc/shift.c rename to examples/shift.c diff --git a/theories/examples/simple_union/simple_union.c b/examples/simple_union.c similarity index 98% rename from theories/examples/simple_union/simple_union.c rename to examples/simple_union.c index 0d28f16e1d71b0623290e21baf0ef0dfa9ca3871..df5c27af6c8a6712d1f668ee14e3988ecc2760d2 100644 --- a/theories/examples/simple_union/simple_union.c +++ b/examples/simple_union.c @@ -1,7 +1,7 @@ #include <stddef.h> #include <stdint.h> #include <stdbool.h> -#include "../inc/refinedc.h" +#include <refinedc.h> #define ITEM_EMPTY ((size_t)0) #define ITEM_ENTRY ((size_t)1) diff --git a/theories/examples/spinlock/spinlock.c b/examples/spinlock.c similarity index 95% rename from theories/examples/spinlock/spinlock.c rename to examples/spinlock.c index 374621c0b9e7fbe283de004082cfc94a270a88af..a922e4e1565af9bcf96a5ba0cf96d49b48ba9fcc 100644 --- a/theories/examples/spinlock/spinlock.c +++ b/examples/spinlock.c @@ -1,5 +1,5 @@ #include <stdbool.h> -#include "../inc/spinlock.h" +#include <spinlock.h> [[rc::manual_proof("refinedc.examples.spinlock:spinlock_proof, type_sl_init")]] void sl_init(struct spinlock* lock) { diff --git a/frontend/comment_annot.ml b/frontend/comment_annot.ml index 31760f341d14b419fe29ae857a15802fa7c99a40..59b180f6183df9865707d1ac2092b0f45708c75d 100644 --- a/frontend/comment_annot.ml +++ b/frontend/comment_annot.ml @@ -2,6 +2,7 @@ type comment_annots = { ca_inlined : string list + ; ca_requires : string list ; ca_imports : (string * string) list ; ca_proof_imports : (string * string) list ; ca_code_imports : (string * string) list @@ -53,6 +54,7 @@ let parse_annots : string list -> comment_annots = fun ls -> Panic.panic_no_pos "Comment annotation error: %s." msg in let imports = ref [] in + let requires = ref [] in let inlined = ref [] in let typedefs = ref [] in let context = ref [] in @@ -93,6 +95,12 @@ let parse_annots : string list -> comment_annots = fun ls -> | None -> error ("invalid [rc::import] annotation") end + | "require" -> + begin + check_inline false; + let s = String.trim (get_payload ()) in + requires := s :: !requires; loop inline ls + end | "typedef" -> begin check_inline false; @@ -125,5 +133,6 @@ let parse_annots : string list -> comment_annots = fun ls -> ; ca_proof_imports = List.map (fun (f,m,_) -> (f,m)) proof_imports ; ca_code_imports = List.map (fun (f,m,_) -> (f,m)) code_imports ; ca_imports = List.map (fun (f,m,_) -> (f,m)) imports + ; ca_requires = List.rev !requires ; ca_context = List.rev !context ; ca_typedefs = List.rev !typedefs } diff --git a/frontend/main.ml b/frontend/main.ml index 97462eff9c03fe0a2472575aa83978ac0bba6b3f..0d6b131b2debd8f4c2059e6fc59ba2da5c01054a 100644 --- a/frontend/main.ml +++ b/frontend/main.ml @@ -179,8 +179,10 @@ let run : config -> string -> unit = fun cfg c_file -> (* Prepare the CPP configuration. *) let cpp_config = let cpp_include = - let cpp_include = cfg.cpp_config.cpp_include in - let cpp_include = cpp_include @ project_config.project_cpp_include in + let project_include = + List.map (Filename.concat root_dir) project_config.project_cpp_include + in + let cpp_include = cfg.cpp_config.cpp_include @ project_include in match (refinedc_include, project_config.project_cpp_with_rc) with | (_ , false) -> cpp_include | (Some(d), true ) -> d :: cpp_include @@ -231,10 +233,11 @@ let run : config -> string -> unit = fun cfg c_file -> List.iter write_proof coq_ast.functions; (* Generate the dune file. *) let theories = + let glob = List.map coq_path_to_string project_config.project_theories in let imports = ca.ca_imports @ ca.ca_proof_imports @ ca.ca_code_imports in let imports = List.sort_uniq Stdlib.compare imports in ignore imports; (* TODO some dependency analysis based on [imports]. *) - List.map (String.concat ".") project_config.project_theories + ca.ca_requires @ glob in write_file dune_file [ "; Generated by [refinedc], do not edit."; diff --git a/rc-project.toml b/rc-project.toml index 7fadfd13e936a9a2e5c7e3eb977497526d4de060..26e75281cd237afbb4872737adb28464c3da22c3 100644 --- a/rc-project.toml +++ b/rc-project.toml @@ -1,9 +1,9 @@ # Custom RefinedC project file for the examples in the repository. -coq_root = "refinedc.examples" +coq_root = "refinedc" [cpp] -include = [ "include" ] +include = [ "include", "examples/include" ] use_rc_include = false [coq] diff --git a/theories/examples/.dir-locals.el b/theories/examples/.dir-locals.el deleted file mode 100644 index ad68e682982a90c56dedc005e145452d1fbe4a1b..0000000000000000000000000000000000000000 --- a/theories/examples/.dir-locals.el +++ /dev/null @@ -1 +0,0 @@ -((nil . ((company-clang-arguments "-fdouble-square-bracket-attributes") (flycheck-clang-args "-fdouble-square-bracket-attributes" "-Wno-unknown-attributes")))) diff --git a/theories/examples/btree/alloc.h b/theories/examples/btree/alloc.h deleted file mode 100644 index 9038e4c95ccb768989c21bae6d535d2d54ed5727..0000000000000000000000000000000000000000 --- a/theories/examples/btree/alloc.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -#include "../tutorial/alloc.h" - -#define ALLOC(sz) alloc(sz) -#define FREE(sz,ptr) free(sz,ptr) diff --git a/theories/examples/btree/btree.c.generate b/theories/examples/btree/btree.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/inc/refinedc.h b/theories/examples/inc/refinedc.h deleted file mode 100644 index 8a0faf0bdefd1de34a74fe66b547c6c069bc9b5d..0000000000000000000000000000000000000000 --- a/theories/examples/inc/refinedc.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef REFINEDC_H -#define REFINEDC_H - -#define rc_unfold(e) \ - _Pragma("GCC diagnostic push") \ - _Pragma("GCC diagnostic ignored \"-Wunused-value\"") \ - &(e); \ - _Pragma("GCC diagnostic pop") - -#define rc_unfold_int(e) \ - _Pragma("GCC diagnostic push") \ - _Pragma("GCC diagnostic ignored \"-Wunused-value\"") \ - e + 0; \ - _Pragma("GCC diagnostic pop") - -#define rc_annot(e, ...) \ - _Pragma("GCC diagnostic push") \ - _Pragma("GCC diagnostic ignored \"-Wunused-value\"") \ - [[rc::annot(__VA_ARGS__)]] &(e); \ - _Pragma("GCC diagnostic pop") - -#define rc_unlock(e) rc_annot(e, "UnlockA") -#define rc_to_uninit(e) rc_annot(e, "ToUninit") -#define rc_uninit_strengthen_align(e) rc_annot(e, "UninitStrengthenAlign") -#define rc_stop(e) rc_annot(e, "StopAnnot") -#define rc_share(e) rc_annot(e, "ShareAnnot") -#define rc_unfold_once(e) rc_annot(e, "UnfoldOnceAnnot") -#define rc_learn(e) rc_annot(e, "LearnAnnot") - -#ifdef RC_ENABLE_FOCUS -#define RC_FOCUS ,rc::trust_me -#define RC_FOCUS_X -#else -#define RC_FOCUS -#define RC_FOCUS_X -#endif - -#endif diff --git a/theories/examples/lock/lock.c.generate b/theories/examples/lock/lock.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/lock/lock_code.v b/theories/examples/lock/lock_code.v deleted file mode 100644 index 8f2f22aef5cb15c0fca208facd4a3324ca1d9d85..0000000000000000000000000000000000000000 --- a/theories/examples/lock/lock_code.v +++ /dev/null @@ -1,374 +0,0 @@ -From refinedc.lang Require Export notation. -From refinedc.lang Require Import tactics. -From refinedc.typing Require Import annotations. -From refinedc.examples.spinlock Require Import spinlock_annot. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/lock/lock.c]. *) -Section code. - Definition file_0 : string := "theories/examples/lock/lock.c". - Definition loc_2 : location_info := LocationInfo file_0 34 4 34 19. - Definition loc_3 : location_info := LocationInfo file_0 35 4 35 22. - Definition loc_4 : location_info := LocationInfo file_0 36 4 36 27. - Definition loc_5 : location_info := LocationInfo file_0 37 4 37 28. - Definition loc_6 : location_info := LocationInfo file_0 38 4 38 22. - Definition loc_7 : location_info := LocationInfo file_0 38 4 38 11. - Definition loc_8 : location_info := LocationInfo file_0 38 4 38 11. - Definition loc_9 : location_info := LocationInfo file_0 38 12 38 20. - Definition loc_10 : location_info := LocationInfo file_0 38 13 38 20. - Definition loc_11 : location_info := LocationInfo file_0 38 13 38 14. - Definition loc_12 : location_info := LocationInfo file_0 38 13 38 14. - Definition loc_13 : location_info := LocationInfo file_0 37 4 37 22. - Definition loc_14 : location_info := LocationInfo file_0 37 4 37 20. - Definition loc_15 : location_info := LocationInfo file_0 37 4 37 5. - Definition loc_16 : location_info := LocationInfo file_0 37 4 37 5. - Definition loc_17 : location_info := LocationInfo file_0 37 25 37 27. - Definition loc_18 : location_info := LocationInfo file_0 36 4 36 22. - Definition loc_19 : location_info := LocationInfo file_0 36 4 36 20. - Definition loc_20 : location_info := LocationInfo file_0 36 4 36 5. - Definition loc_21 : location_info := LocationInfo file_0 36 4 36 5. - Definition loc_22 : location_info := LocationInfo file_0 36 25 36 26. - Definition loc_23 : location_info := LocationInfo file_0 35 4 35 17. - Definition loc_24 : location_info := LocationInfo file_0 35 4 35 5. - Definition loc_25 : location_info := LocationInfo file_0 35 4 35 5. - Definition loc_26 : location_info := LocationInfo file_0 35 20 35 21. - Definition loc_27 : location_info := LocationInfo file_0 34 4 34 14. - Definition loc_28 : location_info := LocationInfo file_0 34 4 34 5. - Definition loc_29 : location_info := LocationInfo file_0 34 4 34 5. - Definition loc_30 : location_info := LocationInfo file_0 34 17 34 18. - Definition loc_33 : location_info := LocationInfo file_0 45 4 45 19. - Definition loc_34 : location_info := LocationInfo file_0 45 4 45 14. - Definition loc_35 : location_info := LocationInfo file_0 45 4 45 5. - Definition loc_36 : location_info := LocationInfo file_0 45 4 45 5. - Definition loc_37 : location_info := LocationInfo file_0 45 17 45 18. - Definition loc_38 : location_info := LocationInfo file_0 45 17 45 18. - Definition loc_41 : location_info := LocationInfo file_0 53 4 53 22. - Definition loc_42 : location_info := LocationInfo file_0 53 11 53 21. - Definition loc_43 : location_info := LocationInfo file_0 53 11 53 21. - Definition loc_44 : location_info := LocationInfo file_0 53 11 53 12. - Definition loc_45 : location_info := LocationInfo file_0 53 11 53 12. - Definition loc_48 : location_info := LocationInfo file_0 60 4 60 22. - Definition loc_49 : location_info := LocationInfo file_0 62 4 62 46. - Definition loc_50 : location_info := LocationInfo file_0 62 46 62 5. - Definition loc_51 : location_info := LocationInfo file_0 64 4 64 22. - Definition loc_52 : location_info := LocationInfo file_0 65 4 65 24. - Definition loc_53 : location_info := LocationInfo file_0 65 4 65 13. - Definition loc_54 : location_info := LocationInfo file_0 65 4 65 13. - Definition loc_55 : location_info := LocationInfo file_0 65 14 65 22. - Definition loc_56 : location_info := LocationInfo file_0 65 15 65 22. - Definition loc_57 : location_info := LocationInfo file_0 65 15 65 16. - Definition loc_58 : location_info := LocationInfo file_0 65 15 65 16. - Definition loc_59 : location_info := LocationInfo file_0 64 4 64 17. - Definition loc_60 : location_info := LocationInfo file_0 64 4 64 5. - Definition loc_61 : location_info := LocationInfo file_0 64 4 64 5. - Definition loc_62 : location_info := LocationInfo file_0 64 20 64 21. - Definition loc_63 : location_info := LocationInfo file_0 64 20 64 21. - Definition loc_64 : location_info := LocationInfo file_0 62 29 62 45. - Definition loc_65 : location_info := LocationInfo file_0 62 30 62 45. - Definition loc_66 : location_info := LocationInfo file_0 62 31 62 32. - Definition loc_67 : location_info := LocationInfo file_0 62 31 62 32. - Definition loc_68 : location_info := LocationInfo file_0 60 4 60 11. - Definition loc_69 : location_info := LocationInfo file_0 60 4 60 11. - Definition loc_70 : location_info := LocationInfo file_0 60 12 60 20. - Definition loc_71 : location_info := LocationInfo file_0 60 13 60 20. - Definition loc_72 : location_info := LocationInfo file_0 60 13 60 14. - Definition loc_73 : location_info := LocationInfo file_0 60 13 60 14. - Definition loc_76 : location_info := LocationInfo file_0 74 4 74 22. - Definition loc_77 : location_info := LocationInfo file_0 75 4 75 46. - Definition loc_78 : location_info := LocationInfo file_0 75 46 75 5. - Definition loc_79 : location_info := LocationInfo file_0 77 4 77 31. - Definition loc_80 : location_info := LocationInfo file_0 79 4 79 24. - Definition loc_81 : location_info := LocationInfo file_0 80 4 80 15. - Definition loc_82 : location_info := LocationInfo file_0 80 11 80 14. - Definition loc_83 : location_info := LocationInfo file_0 80 11 80 14. - Definition loc_84 : location_info := LocationInfo file_0 79 4 79 13. - Definition loc_85 : location_info := LocationInfo file_0 79 4 79 13. - Definition loc_86 : location_info := LocationInfo file_0 79 14 79 22. - Definition loc_87 : location_info := LocationInfo file_0 79 15 79 22. - Definition loc_88 : location_info := LocationInfo file_0 79 15 79 16. - Definition loc_89 : location_info := LocationInfo file_0 79 15 79 16. - Definition loc_90 : location_info := LocationInfo file_0 77 17 77 30. - Definition loc_91 : location_info := LocationInfo file_0 77 17 77 30. - Definition loc_92 : location_info := LocationInfo file_0 77 17 77 18. - Definition loc_93 : location_info := LocationInfo file_0 77 17 77 18. - Definition loc_96 : location_info := LocationInfo file_0 75 29 75 45. - Definition loc_97 : location_info := LocationInfo file_0 75 30 75 45. - Definition loc_98 : location_info := LocationInfo file_0 75 31 75 32. - Definition loc_99 : location_info := LocationInfo file_0 75 31 75 32. - Definition loc_100 : location_info := LocationInfo file_0 74 4 74 11. - Definition loc_101 : location_info := LocationInfo file_0 74 4 74 11. - Definition loc_102 : location_info := LocationInfo file_0 74 12 74 20. - Definition loc_103 : location_info := LocationInfo file_0 74 13 74 20. - Definition loc_104 : location_info := LocationInfo file_0 74 13 74 14. - Definition loc_105 : location_info := LocationInfo file_0 74 13 74 14. - Definition loc_108 : location_info := LocationInfo file_0 89 4 89 22. - Definition loc_109 : location_info := LocationInfo file_0 90 4 90 49. - Definition loc_110 : location_info := LocationInfo file_0 90 49 90 5. - Definition loc_111 : location_info := LocationInfo file_0 92 4 95 5. - Definition loc_112 : location_info := LocationInfo file_0 96 4 96 36. - Definition loc_113 : location_info := LocationInfo file_0 98 4 98 24. - Definition loc_114 : location_info := LocationInfo file_0 99 4 99 15. - Definition loc_115 : location_info := LocationInfo file_0 99 11 99 14. - Definition loc_116 : location_info := LocationInfo file_0 99 11 99 14. - Definition loc_117 : location_info := LocationInfo file_0 98 4 98 13. - Definition loc_118 : location_info := LocationInfo file_0 98 4 98 13. - Definition loc_119 : location_info := LocationInfo file_0 98 14 98 22. - Definition loc_120 : location_info := LocationInfo file_0 98 15 98 22. - Definition loc_121 : location_info := LocationInfo file_0 98 15 98 16. - Definition loc_122 : location_info := LocationInfo file_0 98 15 98 16. - Definition loc_123 : location_info := LocationInfo file_0 96 17 96 35. - Definition loc_124 : location_info := LocationInfo file_0 96 17 96 35. - Definition loc_125 : location_info := LocationInfo file_0 96 17 96 33. - Definition loc_126 : location_info := LocationInfo file_0 96 17 96 18. - Definition loc_127 : location_info := LocationInfo file_0 96 17 96 18. - Definition loc_130 : location_info := LocationInfo file_0 92 40 95 5. - Definition loc_131 : location_info := LocationInfo file_0 93 8 93 32. - Definition loc_132 : location_info := LocationInfo file_0 94 8 94 32. - Definition loc_133 : location_info := LocationInfo file_0 94 8 94 26. - Definition loc_134 : location_info := LocationInfo file_0 94 8 94 24. - Definition loc_135 : location_info := LocationInfo file_0 94 8 94 9. - Definition loc_136 : location_info := LocationInfo file_0 94 8 94 9. - Definition loc_137 : location_info := LocationInfo file_0 94 8 94 31. - Definition loc_138 : location_info := LocationInfo file_0 94 8 94 26. - Definition loc_139 : location_info := LocationInfo file_0 94 8 94 26. - Definition loc_140 : location_info := LocationInfo file_0 94 8 94 24. - Definition loc_141 : location_info := LocationInfo file_0 94 8 94 9. - Definition loc_142 : location_info := LocationInfo file_0 94 8 94 9. - Definition loc_143 : location_info := LocationInfo file_0 94 30 94 31. - Definition loc_144 : location_info := LocationInfo file_0 93 8 93 26. - Definition loc_145 : location_info := LocationInfo file_0 93 8 93 24. - Definition loc_146 : location_info := LocationInfo file_0 93 8 93 9. - Definition loc_147 : location_info := LocationInfo file_0 93 8 93 9. - Definition loc_148 : location_info := LocationInfo file_0 93 8 93 31. - Definition loc_149 : location_info := LocationInfo file_0 93 8 93 26. - Definition loc_150 : location_info := LocationInfo file_0 93 8 93 26. - Definition loc_151 : location_info := LocationInfo file_0 93 8 93 24. - Definition loc_152 : location_info := LocationInfo file_0 93 8 93 9. - Definition loc_153 : location_info := LocationInfo file_0 93 8 93 9. - Definition loc_154 : location_info := LocationInfo file_0 93 30 93 31. - Definition loc_156 : location_info := LocationInfo file_0 92 8 92 38. - Definition loc_157 : location_info := LocationInfo file_0 92 8 92 26. - Definition loc_158 : location_info := LocationInfo file_0 92 8 92 26. - Definition loc_159 : location_info := LocationInfo file_0 92 8 92 24. - Definition loc_160 : location_info := LocationInfo file_0 92 8 92 9. - Definition loc_161 : location_info := LocationInfo file_0 92 8 92 9. - Definition loc_162 : location_info := LocationInfo file_0 92 29 92 38. - Definition loc_163 : location_info := LocationInfo file_0 92 37 92 38. - Definition loc_164 : location_info := LocationInfo file_0 90 29 90 48. - Definition loc_165 : location_info := LocationInfo file_0 90 30 90 48. - Definition loc_166 : location_info := LocationInfo file_0 90 31 90 32. - Definition loc_167 : location_info := LocationInfo file_0 90 31 90 32. - Definition loc_168 : location_info := LocationInfo file_0 89 4 89 11. - Definition loc_169 : location_info := LocationInfo file_0 89 4 89 11. - Definition loc_170 : location_info := LocationInfo file_0 89 12 89 20. - Definition loc_171 : location_info := LocationInfo file_0 89 13 89 20. - Definition loc_172 : location_info := LocationInfo file_0 89 13 89 14. - Definition loc_173 : location_info := LocationInfo file_0 89 13 89 14. - - (* Definition of struct [atomic_flag]. *) - Program Definition struct_atomic_flag := {| - sl_members := [ - (Some "_Value", it_layout bool_it) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [spinlock]. *) - Program Definition struct_spinlock := {| - sl_members := [ - (Some "lock", it_layout bool_it) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [lock_test_inner]. *) - Program Definition struct_lock_test_inner := {| - sl_members := [ - (Some "a", it_layout size_t); - (Some "b", it_layout size_t) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [lock_test]. *) - Program Definition struct_lock_test := {| - sl_members := [ - (Some "outside", it_layout size_t); - (Some "lock", layout_of struct_spinlock); - (None, mk_layout 7%nat 0%nat); - (Some "locked_int", it_layout size_t); - (Some "locked_struct", layout_of struct_lock_test_inner) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of function [init]. *) - Definition impl_init (sl_init : loc): function := {| - f_args := [ - ("t", LPtr) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_2 ; - LocInfoE loc_27 ((LocInfoE loc_28 (!{LPtr} (LocInfoE loc_29 ("t")))) at{struct_lock_test} "outside") <-{ it_layout size_t } - LocInfoE loc_30 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_30 (i2v 0 i32))) ; - locinfo: loc_3 ; - LocInfoE loc_23 ((LocInfoE loc_24 (!{LPtr} (LocInfoE loc_25 ("t")))) at{struct_lock_test} "locked_int") <-{ it_layout size_t } - LocInfoE loc_26 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_26 (i2v 0 i32))) ; - locinfo: loc_4 ; - LocInfoE loc_18 ((LocInfoE loc_19 ((LocInfoE loc_20 (!{LPtr} (LocInfoE loc_21 ("t")))) at{struct_lock_test} "locked_struct")) at{struct_lock_test_inner} "a") <-{ it_layout size_t } - LocInfoE loc_22 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_22 (i2v 0 i32))) ; - locinfo: loc_5 ; - LocInfoE loc_13 ((LocInfoE loc_14 ((LocInfoE loc_15 (!{LPtr} (LocInfoE loc_16 ("t")))) at{struct_lock_test} "locked_struct")) at{struct_lock_test_inner} "b") <-{ it_layout size_t } - LocInfoE loc_17 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_17 (i2v 10 i32))) ; - locinfo: loc_6 ; - "_" <- LocInfoE loc_8 (sl_init) with - [ LocInfoE loc_9 (&(LocInfoE loc_10 ((LocInfoE loc_11 (!{LPtr} (LocInfoE loc_12 ("t")))) at{struct_lock_test} "lock"))) ] ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [write_outside]. *) - Definition impl_write_outside : function := {| - f_args := [ - ("t", LPtr); - ("n", it_layout size_t) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_33 ; - LocInfoE loc_34 ((LocInfoE loc_35 (!{LPtr} (LocInfoE loc_36 ("t")))) at{struct_lock_test} "outside") <-{ it_layout size_t } - LocInfoE loc_37 (use{it_layout size_t} (LocInfoE loc_38 ("n"))) ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [read_outside]. *) - Definition impl_read_outside : function := {| - f_args := [ - ("t", LPtr) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_41 ; - Return (LocInfoE loc_42 (use{it_layout size_t} (LocInfoE loc_43 ((LocInfoE loc_44 (!{LPtr} (LocInfoE loc_45 ("t")))) at{struct_lock_test} "outside")))) - ]> $∅ - )%E - |}. - - (* Definition of function [write_locked]. *) - Definition impl_write_locked (sl_lock sl_unlock : loc): function := {| - f_args := [ - ("t", LPtr); - ("n", it_layout size_t) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_48 ; - "_" <- LocInfoE loc_69 (sl_lock) with - [ LocInfoE loc_70 (&(LocInfoE loc_71 ((LocInfoE loc_72 (!{LPtr} (LocInfoE loc_73 ("t")))) at{struct_lock_test} "lock"))) ] ; - locinfo: loc_49 ; - annot: (UnlockA) ; - expr: (LocInfoE loc_64 (&(LocInfoE loc_65 ((LocInfoE loc_66 (!{LPtr} (LocInfoE loc_67 ("t")))) at{struct_lock_test} "locked_int")))) ; - locinfo: loc_51 ; - LocInfoE loc_59 ((LocInfoE loc_60 (!{LPtr} (LocInfoE loc_61 ("t")))) at{struct_lock_test} "locked_int") <-{ it_layout size_t } - LocInfoE loc_62 (use{it_layout size_t} (LocInfoE loc_63 ("n"))) ; - locinfo: loc_52 ; - "_" <- LocInfoE loc_54 (sl_unlock) with - [ LocInfoE loc_55 (AnnotExpr 1%nat LockA (LocInfoE loc_55 (&(LocInfoE loc_56 ((LocInfoE loc_57 (!{LPtr} (LocInfoE loc_58 ("t")))) at{struct_lock_test} "lock"))))) ] ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [read_locked]. *) - Definition impl_read_locked (sl_lock sl_unlock : loc): function := {| - f_args := [ - ("t", LPtr) - ]; - f_local_vars := [ - ("ret", it_layout size_t) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_76 ; - "_" <- LocInfoE loc_101 (sl_lock) with - [ LocInfoE loc_102 (&(LocInfoE loc_103 ((LocInfoE loc_104 (!{LPtr} (LocInfoE loc_105 ("t")))) at{struct_lock_test} "lock"))) ] ; - locinfo: loc_77 ; - annot: (UnlockA) ; - expr: (LocInfoE loc_96 (&(LocInfoE loc_97 ((LocInfoE loc_98 (!{LPtr} (LocInfoE loc_99 ("t")))) at{struct_lock_test} "locked_int")))) ; - "ret" <-{ it_layout size_t } - LocInfoE loc_90 (use{it_layout size_t} (LocInfoE loc_91 ((LocInfoE loc_92 (!{LPtr} (LocInfoE loc_93 ("t")))) at{struct_lock_test} "locked_int"))) ; - locinfo: loc_80 ; - "_" <- LocInfoE loc_85 (sl_unlock) with - [ LocInfoE loc_86 (AnnotExpr 1%nat LockA (LocInfoE loc_86 (&(LocInfoE loc_87 ((LocInfoE loc_88 (!{LPtr} (LocInfoE loc_89 ("t")))) at{struct_lock_test} "lock"))))) ] ; - locinfo: loc_81 ; - Return (LocInfoE loc_82 (use{it_layout size_t} (LocInfoE loc_83 ("ret")))) - ]> $∅ - )%E - |}. - - (* Definition of function [increment]. *) - Definition impl_increment (sl_lock sl_unlock : loc): function := {| - f_args := [ - ("t", LPtr) - ]; - f_local_vars := [ - ("ret", it_layout size_t) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_108 ; - "_" <- LocInfoE loc_169 (sl_lock) with - [ LocInfoE loc_170 (&(LocInfoE loc_171 ((LocInfoE loc_172 (!{LPtr} (LocInfoE loc_173 ("t")))) at{struct_lock_test} "lock"))) ] ; - locinfo: loc_109 ; - annot: (UnlockA) ; - expr: (LocInfoE loc_164 (&(LocInfoE loc_165 ((LocInfoE loc_166 (!{LPtr} (LocInfoE loc_167 ("t")))) at{struct_lock_test} "locked_struct")))) ; - locinfo: loc_156 ; - if: LocInfoE loc_156 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_156 ((LocInfoE loc_157 (use{it_layout size_t} (LocInfoE loc_158 ((LocInfoE loc_159 ((LocInfoE loc_160 (!{LPtr} (LocInfoE loc_161 ("t")))) at{struct_lock_test} "locked_struct")) at{struct_lock_test_inner} "b")))) >{IntOp size_t, IntOp size_t} (LocInfoE loc_162 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_163 (i2v 0 i32))))))) - then - locinfo: loc_131 ; - Goto "#2" - else - Goto "#3" - ]> $ - <[ "#1" := - "ret" <-{ it_layout size_t } - LocInfoE loc_123 (use{it_layout size_t} (LocInfoE loc_124 ((LocInfoE loc_125 ((LocInfoE loc_126 (!{LPtr} (LocInfoE loc_127 ("t")))) at{struct_lock_test} "locked_struct")) at{struct_lock_test_inner} "a"))) ; - locinfo: loc_113 ; - "_" <- LocInfoE loc_118 (sl_unlock) with - [ LocInfoE loc_119 (AnnotExpr 1%nat LockA (LocInfoE loc_119 (&(LocInfoE loc_120 ((LocInfoE loc_121 (!{LPtr} (LocInfoE loc_122 ("t")))) at{struct_lock_test} "lock"))))) ] ; - locinfo: loc_114 ; - Return (LocInfoE loc_115 (use{it_layout size_t} (LocInfoE loc_116 ("ret")))) - ]> $ - <[ "#2" := - locinfo: loc_131 ; - LocInfoE loc_144 ((LocInfoE loc_145 ((LocInfoE loc_146 (!{LPtr} (LocInfoE loc_147 ("t")))) at{struct_lock_test} "locked_struct")) at{struct_lock_test_inner} "a") <-{ it_layout size_t } - LocInfoE loc_148 ((LocInfoE loc_149 (use{it_layout size_t} (LocInfoE loc_150 ((LocInfoE loc_151 ((LocInfoE loc_152 (!{LPtr} (LocInfoE loc_153 ("t")))) at{struct_lock_test} "locked_struct")) at{struct_lock_test_inner} "a")))) +{IntOp size_t, IntOp size_t} (LocInfoE loc_154 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_154 (i2v 1 i32))))) ; - locinfo: loc_132 ; - LocInfoE loc_133 ((LocInfoE loc_134 ((LocInfoE loc_135 (!{LPtr} (LocInfoE loc_136 ("t")))) at{struct_lock_test} "locked_struct")) at{struct_lock_test_inner} "b") <-{ it_layout size_t } - LocInfoE loc_137 ((LocInfoE loc_138 (use{it_layout size_t} (LocInfoE loc_139 ((LocInfoE loc_140 ((LocInfoE loc_141 (!{LPtr} (LocInfoE loc_142 ("t")))) at{struct_lock_test} "locked_struct")) at{struct_lock_test_inner} "b")))) -{IntOp size_t, IntOp size_t} (LocInfoE loc_143 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_143 (i2v 1 i32))))) ; - Goto "#1" - ]> $ - <[ "#3" := - Goto "#1" - ]> $∅ - )%E - |}. -End code. diff --git a/theories/examples/malloc1/malloc1.c.generate b/theories/examples/malloc1/malloc1.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/mpool/mpool.c.generate b/theories/examples/mpool/mpool.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/mpool/mpool_code.v b/theories/examples/mpool/mpool_code.v deleted file mode 100644 index 84dbcae2e14aa2f32e7979d8d6bf1b6cf89b4612..0000000000000000000000000000000000000000 --- a/theories/examples/mpool/mpool_code.v +++ /dev/null @@ -1,1651 +0,0 @@ -From refinedc.lang Require Export notation. -From refinedc.lang Require Import tactics. -From refinedc.typing Require Import annotations. -From refinedc.examples.spinlock Require Import spinlock_annot. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/mpool/mpool.c]. *) -Section code. - Definition file_0 : string := "theories/examples/mpool/mpool.c". - Definition loc_2 : location_info := LocationInfo file_0 223 2 223 19. - Definition loc_3 : location_info := LocationInfo file_0 223 19 223 3. - Definition loc_4 : location_info := LocationInfo file_0 226 2 228 3. - Definition loc_5 : location_info := LocationInfo file_0 230 2 230 16. - Definition loc_6 : location_info := LocationInfo file_0 231 2 231 21. - Definition loc_7 : location_info := LocationInfo file_0 233 2 233 20. - Definition loc_8 : location_info := LocationInfo file_0 234 2 234 40. - Definition loc_9 : location_info := LocationInfo file_0 234 40 234 3. - Definition loc_10 : location_info := LocationInfo file_0 235 2 235 43. - Definition loc_11 : location_info := LocationInfo file_0 236 2 236 31. - Definition loc_12 : location_info := LocationInfo file_0 237 2 237 22. - Definition loc_13 : location_info := LocationInfo file_0 239 2 239 11. - Definition loc_14 : location_info := LocationInfo file_0 239 9 239 10. - Definition loc_15 : location_info := LocationInfo file_0 237 2 237 11. - Definition loc_16 : location_info := LocationInfo file_0 237 2 237 11. - Definition loc_17 : location_info := LocationInfo file_0 237 12 237 20. - Definition loc_18 : location_info := LocationInfo file_0 237 13 237 20. - Definition loc_19 : location_info := LocationInfo file_0 237 13 237 14. - Definition loc_20 : location_info := LocationInfo file_0 237 13 237 14. - Definition loc_21 : location_info := LocationInfo file_0 236 2 236 22. - Definition loc_22 : location_info := LocationInfo file_0 236 2 236 11. - Definition loc_23 : location_info := LocationInfo file_0 236 2 236 3. - Definition loc_24 : location_info := LocationInfo file_0 236 2 236 3. - Definition loc_25 : location_info := LocationInfo file_0 236 25 236 30. - Definition loc_26 : location_info := LocationInfo file_0 236 25 236 30. - Definition loc_27 : location_info := LocationInfo file_0 235 2 235 19. - Definition loc_28 : location_info := LocationInfo file_0 235 2 235 7. - Definition loc_29 : location_info := LocationInfo file_0 235 2 235 7. - Definition loc_30 : location_info := LocationInfo file_0 235 22 235 42. - Definition loc_31 : location_info := LocationInfo file_0 235 22 235 42. - Definition loc_32 : location_info := LocationInfo file_0 235 22 235 31. - Definition loc_33 : location_info := LocationInfo file_0 235 22 235 23. - Definition loc_34 : location_info := LocationInfo file_0 235 22 235 23. - Definition loc_35 : location_info := LocationInfo file_0 234 27 234 39. - Definition loc_36 : location_info := LocationInfo file_0 234 28 234 39. - Definition loc_37 : location_info := LocationInfo file_0 234 29 234 30. - Definition loc_38 : location_info := LocationInfo file_0 234 29 234 30. - Definition loc_39 : location_info := LocationInfo file_0 233 2 233 9. - Definition loc_40 : location_info := LocationInfo file_0 233 2 233 9. - Definition loc_41 : location_info := LocationInfo file_0 233 10 233 18. - Definition loc_42 : location_info := LocationInfo file_0 233 11 233 18. - Definition loc_43 : location_info := LocationInfo file_0 233 11 233 12. - Definition loc_44 : location_info := LocationInfo file_0 233 11 233 12. - Definition loc_45 : location_info := LocationInfo file_0 231 2 231 13. - Definition loc_46 : location_info := LocationInfo file_0 231 2 231 7. - Definition loc_47 : location_info := LocationInfo file_0 231 2 231 7. - Definition loc_48 : location_info := LocationInfo file_0 231 16 231 20. - Definition loc_49 : location_info := LocationInfo file_0 231 16 231 20. - Definition loc_50 : location_info := LocationInfo file_0 230 2 230 7. - Definition loc_51 : location_info := LocationInfo file_0 230 10 230 15. - Definition loc_52 : location_info := LocationInfo file_0 230 10 230 15. - Definition loc_53 : location_info := LocationInfo file_0 226 26 228 3. - Definition loc_54 : location_info := LocationInfo file_0 227 4 227 13. - Definition loc_55 : location_info := LocationInfo file_0 227 11 227 12. - Definition loc_57 : location_info := LocationInfo file_0 226 6 226 24. - Definition loc_58 : location_info := LocationInfo file_0 226 6 226 10. - Definition loc_59 : location_info := LocationInfo file_0 226 6 226 10. - Definition loc_60 : location_info := LocationInfo file_0 226 14 226 24. - Definition loc_61 : location_info := LocationInfo file_0 226 23 226 24. - Definition loc_62 : location_info := LocationInfo file_0 223 2 223 18. - Definition loc_63 : location_info := LocationInfo file_0 223 3 223 18. - Definition loc_64 : location_info := LocationInfo file_0 223 4 223 5. - Definition loc_65 : location_info := LocationInfo file_0 223 4 223 5. - Definition loc_68 : location_info := LocationInfo file_0 333 2 333 30. - Definition loc_69 : location_info := LocationInfo file_0 334 2 334 19. - Definition loc_70 : location_info := LocationInfo file_0 334 19 334 3. - Definition loc_71 : location_info := LocationInfo file_0 337 2 337 20. - Definition loc_72 : location_info := LocationInfo file_0 338 2 338 40. - Definition loc_73 : location_info := LocationInfo file_0 338 40 338 3. - Definition loc_74 : location_info := LocationInfo file_0 339 2 339 33. - Definition loc_75 : location_info := LocationInfo file_0 340 2 340 27. - Definition loc_76 : location_info := LocationInfo file_0 341 2 341 22. - Definition loc_77 : location_info := LocationInfo file_0 341 2 341 11. - Definition loc_78 : location_info := LocationInfo file_0 341 2 341 11. - Definition loc_79 : location_info := LocationInfo file_0 341 12 341 20. - Definition loc_80 : location_info := LocationInfo file_0 341 13 341 20. - Definition loc_81 : location_info := LocationInfo file_0 341 13 341 14. - Definition loc_82 : location_info := LocationInfo file_0 341 13 341 14. - Definition loc_83 : location_info := LocationInfo file_0 340 2 340 22. - Definition loc_84 : location_info := LocationInfo file_0 340 2 340 11. - Definition loc_85 : location_info := LocationInfo file_0 340 2 340 3. - Definition loc_86 : location_info := LocationInfo file_0 340 2 340 3. - Definition loc_87 : location_info := LocationInfo file_0 340 25 340 26. - Definition loc_88 : location_info := LocationInfo file_0 340 25 340 26. - Definition loc_89 : location_info := LocationInfo file_0 339 2 339 9. - Definition loc_90 : location_info := LocationInfo file_0 339 2 339 3. - Definition loc_91 : location_info := LocationInfo file_0 339 2 339 3. - Definition loc_92 : location_info := LocationInfo file_0 339 12 339 32. - Definition loc_93 : location_info := LocationInfo file_0 339 12 339 32. - Definition loc_94 : location_info := LocationInfo file_0 339 12 339 21. - Definition loc_95 : location_info := LocationInfo file_0 339 12 339 13. - Definition loc_96 : location_info := LocationInfo file_0 339 12 339 13. - Definition loc_97 : location_info := LocationInfo file_0 338 27 338 39. - Definition loc_98 : location_info := LocationInfo file_0 338 28 338 39. - Definition loc_99 : location_info := LocationInfo file_0 338 29 338 30. - Definition loc_100 : location_info := LocationInfo file_0 338 29 338 30. - Definition loc_101 : location_info := LocationInfo file_0 337 2 337 9. - Definition loc_102 : location_info := LocationInfo file_0 337 2 337 9. - Definition loc_103 : location_info := LocationInfo file_0 337 10 337 18. - Definition loc_104 : location_info := LocationInfo file_0 337 11 337 18. - Definition loc_105 : location_info := LocationInfo file_0 337 11 337 12. - Definition loc_106 : location_info := LocationInfo file_0 337 11 337 12. - Definition loc_107 : location_info := LocationInfo file_0 334 2 334 18. - Definition loc_108 : location_info := LocationInfo file_0 334 3 334 18. - Definition loc_109 : location_info := LocationInfo file_0 334 4 334 5. - Definition loc_110 : location_info := LocationInfo file_0 334 4 334 5. - Definition loc_111 : location_info := LocationInfo file_0 333 26 333 29. - Definition loc_112 : location_info := LocationInfo file_0 333 26 333 29. - Definition loc_117 : location_info := LocationInfo file_0 110 2 110 29. - Definition loc_118 : location_info := LocationInfo file_0 111 2 111 40. - Definition loc_119 : location_info := LocationInfo file_0 112 2 112 40. - Definition loc_120 : location_info := LocationInfo file_0 113 2 113 31. - Definition loc_121 : location_info := LocationInfo file_0 114 2 114 20. - Definition loc_122 : location_info := LocationInfo file_0 114 2 114 9. - Definition loc_123 : location_info := LocationInfo file_0 114 2 114 9. - Definition loc_124 : location_info := LocationInfo file_0 114 10 114 18. - Definition loc_125 : location_info := LocationInfo file_0 114 11 114 18. - Definition loc_126 : location_info := LocationInfo file_0 114 11 114 12. - Definition loc_127 : location_info := LocationInfo file_0 114 11 114 12. - Definition loc_128 : location_info := LocationInfo file_0 113 2 113 13. - Definition loc_129 : location_info := LocationInfo file_0 113 2 113 3. - Definition loc_130 : location_info := LocationInfo file_0 113 2 113 3. - Definition loc_131 : location_info := LocationInfo file_0 113 16 113 30. - Definition loc_132 : location_info := LocationInfo file_0 112 2 112 22. - Definition loc_133 : location_info := LocationInfo file_0 112 2 112 11. - Definition loc_134 : location_info := LocationInfo file_0 112 2 112 3. - Definition loc_135 : location_info := LocationInfo file_0 112 2 112 3. - Definition loc_136 : location_info := LocationInfo file_0 112 25 112 39. - Definition loc_137 : location_info := LocationInfo file_0 111 2 111 22. - Definition loc_138 : location_info := LocationInfo file_0 111 2 111 11. - Definition loc_139 : location_info := LocationInfo file_0 111 2 111 3. - Definition loc_140 : location_info := LocationInfo file_0 111 2 111 3. - Definition loc_141 : location_info := LocationInfo file_0 111 25 111 39. - Definition loc_142 : location_info := LocationInfo file_0 110 2 110 15. - Definition loc_143 : location_info := LocationInfo file_0 110 2 110 3. - Definition loc_144 : location_info := LocationInfo file_0 110 2 110 3. - Definition loc_145 : location_info := LocationInfo file_0 110 18 110 28. - Definition loc_146 : location_info := LocationInfo file_0 110 18 110 28. - Definition loc_149 : location_info := LocationInfo file_0 129 2 129 34. - Definition loc_150 : location_info := LocationInfo file_0 131 2 131 23. - Definition loc_151 : location_info := LocationInfo file_0 132 2 132 43. - Definition loc_152 : location_info := LocationInfo file_0 132 43 132 3. - Definition loc_153 : location_info := LocationInfo file_0 134 2 134 49. - Definition loc_154 : location_info := LocationInfo file_0 135 2 135 49. - Definition loc_155 : location_info := LocationInfo file_0 136 2 136 31. - Definition loc_156 : location_info := LocationInfo file_0 138 2 138 43. - Definition loc_157 : location_info := LocationInfo file_0 139 2 139 43. - Definition loc_158 : location_info := LocationInfo file_0 142 2 142 25. - Definition loc_159 : location_info := LocationInfo file_0 142 2 142 11. - Definition loc_160 : location_info := LocationInfo file_0 142 2 142 11. - Definition loc_161 : location_info := LocationInfo file_0 142 12 142 23. - Definition loc_162 : location_info := LocationInfo file_0 142 13 142 23. - Definition loc_163 : location_info := LocationInfo file_0 142 13 142 17. - Definition loc_164 : location_info := LocationInfo file_0 142 13 142 17. - Definition loc_165 : location_info := LocationInfo file_0 139 2 139 25. - Definition loc_166 : location_info := LocationInfo file_0 139 2 139 14. - Definition loc_167 : location_info := LocationInfo file_0 139 2 139 6. - Definition loc_168 : location_info := LocationInfo file_0 139 2 139 6. - Definition loc_169 : location_info := LocationInfo file_0 139 28 139 42. - Definition loc_170 : location_info := LocationInfo file_0 138 2 138 25. - Definition loc_171 : location_info := LocationInfo file_0 138 2 138 14. - Definition loc_172 : location_info := LocationInfo file_0 138 2 138 6. - Definition loc_173 : location_info := LocationInfo file_0 138 2 138 6. - Definition loc_174 : location_info := LocationInfo file_0 138 28 138 42. - Definition loc_175 : location_info := LocationInfo file_0 136 2 136 13. - Definition loc_176 : location_info := LocationInfo file_0 136 2 136 3. - Definition loc_177 : location_info := LocationInfo file_0 136 2 136 3. - Definition loc_178 : location_info := LocationInfo file_0 136 16 136 30. - Definition loc_179 : location_info := LocationInfo file_0 136 16 136 30. - Definition loc_180 : location_info := LocationInfo file_0 136 16 136 20. - Definition loc_181 : location_info := LocationInfo file_0 136 16 136 20. - Definition loc_182 : location_info := LocationInfo file_0 135 2 135 22. - Definition loc_183 : location_info := LocationInfo file_0 135 2 135 11. - Definition loc_184 : location_info := LocationInfo file_0 135 2 135 3. - Definition loc_185 : location_info := LocationInfo file_0 135 2 135 3. - Definition loc_186 : location_info := LocationInfo file_0 135 25 135 48. - Definition loc_187 : location_info := LocationInfo file_0 135 25 135 48. - Definition loc_188 : location_info := LocationInfo file_0 135 25 135 37. - Definition loc_189 : location_info := LocationInfo file_0 135 25 135 29. - Definition loc_190 : location_info := LocationInfo file_0 135 25 135 29. - Definition loc_191 : location_info := LocationInfo file_0 134 2 134 22. - Definition loc_192 : location_info := LocationInfo file_0 134 2 134 11. - Definition loc_193 : location_info := LocationInfo file_0 134 2 134 3. - Definition loc_194 : location_info := LocationInfo file_0 134 2 134 3. - Definition loc_195 : location_info := LocationInfo file_0 134 25 134 48. - Definition loc_196 : location_info := LocationInfo file_0 134 25 134 48. - Definition loc_197 : location_info := LocationInfo file_0 134 25 134 37. - Definition loc_198 : location_info := LocationInfo file_0 134 25 134 29. - Definition loc_199 : location_info := LocationInfo file_0 134 25 134 29. - Definition loc_200 : location_info := LocationInfo file_0 132 27 132 42. - Definition loc_201 : location_info := LocationInfo file_0 132 28 132 42. - Definition loc_202 : location_info := LocationInfo file_0 132 29 132 33. - Definition loc_203 : location_info := LocationInfo file_0 132 29 132 33. - Definition loc_204 : location_info := LocationInfo file_0 131 2 131 9. - Definition loc_205 : location_info := LocationInfo file_0 131 2 131 9. - Definition loc_206 : location_info := LocationInfo file_0 131 10 131 21. - Definition loc_207 : location_info := LocationInfo file_0 131 11 131 21. - Definition loc_208 : location_info := LocationInfo file_0 131 11 131 15. - Definition loc_209 : location_info := LocationInfo file_0 131 11 131 15. - Definition loc_210 : location_info := LocationInfo file_0 129 2 129 12. - Definition loc_211 : location_info := LocationInfo file_0 129 2 129 12. - Definition loc_212 : location_info := LocationInfo file_0 129 13 129 14. - Definition loc_213 : location_info := LocationInfo file_0 129 13 129 14. - Definition loc_214 : location_info := LocationInfo file_0 129 16 129 32. - Definition loc_215 : location_info := LocationInfo file_0 129 16 129 32. - Definition loc_216 : location_info := LocationInfo file_0 129 16 129 20. - Definition loc_217 : location_info := LocationInfo file_0 129 16 129 20. - Definition loc_220 : location_info := LocationInfo file_0 154 2 154 38. - Definition loc_221 : location_info := LocationInfo file_0 155 2 155 25. - Definition loc_222 : location_info := LocationInfo file_0 155 2 155 13. - Definition loc_223 : location_info := LocationInfo file_0 155 2 155 3. - Definition loc_224 : location_info := LocationInfo file_0 155 2 155 3. - Definition loc_225 : location_info := LocationInfo file_0 155 16 155 24. - Definition loc_226 : location_info := LocationInfo file_0 155 16 155 24. - Definition loc_227 : location_info := LocationInfo file_0 154 2 154 12. - Definition loc_228 : location_info := LocationInfo file_0 154 2 154 12. - Definition loc_229 : location_info := LocationInfo file_0 154 13 154 14. - Definition loc_230 : location_info := LocationInfo file_0 154 13 154 14. - Definition loc_231 : location_info := LocationInfo file_0 154 16 154 36. - Definition loc_232 : location_info := LocationInfo file_0 154 16 154 36. - Definition loc_233 : location_info := LocationInfo file_0 154 16 154 24. - Definition loc_234 : location_info := LocationInfo file_0 154 16 154 24. - Definition loc_237 : location_info := LocationInfo file_0 169 2 171 3. - Definition loc_238 : location_info := LocationInfo file_0 173 2 173 31. - Definition loc_239 : location_info := LocationInfo file_0 174 2 174 31. - Definition loc_240 : location_info := LocationInfo file_0 179 2 183 3. - Definition loc_241 : location_info := LocationInfo file_0 189 2 195 3. - Definition loc_242 : location_info := LocationInfo file_0 197 2 197 40. - Definition loc_243 : location_info := LocationInfo file_0 198 2 198 40. - Definition loc_244 : location_info := LocationInfo file_0 199 2 199 31. - Definition loc_245 : location_info := LocationInfo file_0 199 2 199 13. - Definition loc_246 : location_info := LocationInfo file_0 199 2 199 3. - Definition loc_247 : location_info := LocationInfo file_0 199 2 199 3. - Definition loc_248 : location_info := LocationInfo file_0 199 16 199 30. - Definition loc_249 : location_info := LocationInfo file_0 198 2 198 22. - Definition loc_250 : location_info := LocationInfo file_0 198 2 198 11. - Definition loc_251 : location_info := LocationInfo file_0 198 2 198 3. - Definition loc_252 : location_info := LocationInfo file_0 198 2 198 3. - Definition loc_253 : location_info := LocationInfo file_0 198 25 198 39. - Definition loc_254 : location_info := LocationInfo file_0 197 2 197 22. - Definition loc_255 : location_info := LocationInfo file_0 197 2 197 11. - Definition loc_256 : location_info := LocationInfo file_0 197 2 197 3. - Definition loc_257 : location_info := LocationInfo file_0 197 2 197 3. - Definition loc_258 : location_info := LocationInfo file_0 197 25 197 39. - Definition loc_259 : location_info := LocationInfo file_0 189 2 195 3. - Definition loc_260 : location_info := LocationInfo file_0 189 34 195 3. - Definition loc_261 : location_info := LocationInfo file_0 190 4 190 23. - Definition loc_262 : location_info := LocationInfo file_0 191 4 191 30. - Definition loc_263 : location_info := LocationInfo file_0 193 4 193 30. - Definition loc_264 : location_info := LocationInfo file_0 194 4 194 45. - Definition loc_265 : location_info := LocationInfo file_0 189 2 195 3. - Definition loc_266 : location_info := LocationInfo file_0 189 2 195 3. - Definition loc_267 : location_info := LocationInfo file_0 194 4 194 19. - Definition loc_268 : location_info := LocationInfo file_0 194 4 194 19. - Definition loc_269 : location_info := LocationInfo file_0 194 20 194 31. - Definition loc_270 : location_info := LocationInfo file_0 194 20 194 31. - Definition loc_271 : location_info := LocationInfo file_0 194 20 194 21. - Definition loc_272 : location_info := LocationInfo file_0 194 20 194 21. - Definition loc_273 : location_info := LocationInfo file_0 194 33 194 37. - Definition loc_274 : location_info := LocationInfo file_0 194 33 194 37. - Definition loc_275 : location_info := LocationInfo file_0 194 39 194 43. - Definition loc_276 : location_info := LocationInfo file_0 194 39 194 43. - Definition loc_277 : location_info := LocationInfo file_0 193 4 193 9. - Definition loc_278 : location_info := LocationInfo file_0 193 12 193 29. - Definition loc_279 : location_info := LocationInfo file_0 193 12 193 29. - Definition loc_280 : location_info := LocationInfo file_0 193 12 193 17. - Definition loc_281 : location_info := LocationInfo file_0 193 12 193 17. - Definition loc_282 : location_info := LocationInfo file_0 191 18 191 29. - Definition loc_283 : location_info := LocationInfo file_0 191 18 191 29. - Definition loc_284 : location_info := LocationInfo file_0 191 18 191 23. - Definition loc_285 : location_info := LocationInfo file_0 191 18 191 23. - Definition loc_288 : location_info := LocationInfo file_0 190 17 190 22. - Definition loc_289 : location_info := LocationInfo file_0 190 17 190 22. - Definition loc_292 : location_info := LocationInfo file_0 189 9 189 32. - Definition loc_293 : location_info := LocationInfo file_0 189 9 189 14. - Definition loc_294 : location_info := LocationInfo file_0 189 9 189 14. - Definition loc_295 : location_info := LocationInfo file_0 189 18 189 32. - Definition loc_296 : location_info := LocationInfo file_0 179 2 183 3. - Definition loc_297 : location_info := LocationInfo file_0 179 34 183 3. - Definition loc_298 : location_info := LocationInfo file_0 180 4 180 23. - Definition loc_299 : location_info := LocationInfo file_0 181 4 181 24. - Definition loc_300 : location_info := LocationInfo file_0 182 4 182 34. - Definition loc_301 : location_info := LocationInfo file_0 179 2 183 3. - Definition loc_302 : location_info := LocationInfo file_0 179 2 183 3. - Definition loc_303 : location_info := LocationInfo file_0 182 4 182 14. - Definition loc_304 : location_info := LocationInfo file_0 182 4 182 14. - Definition loc_305 : location_info := LocationInfo file_0 182 15 182 26. - Definition loc_306 : location_info := LocationInfo file_0 182 15 182 26. - Definition loc_307 : location_info := LocationInfo file_0 182 15 182 16. - Definition loc_308 : location_info := LocationInfo file_0 182 15 182 16. - Definition loc_309 : location_info := LocationInfo file_0 182 28 182 32. - Definition loc_310 : location_info := LocationInfo file_0 182 28 182 32. - Definition loc_311 : location_info := LocationInfo file_0 181 4 181 9. - Definition loc_312 : location_info := LocationInfo file_0 181 12 181 23. - Definition loc_313 : location_info := LocationInfo file_0 181 12 181 23. - Definition loc_314 : location_info := LocationInfo file_0 181 12 181 17. - Definition loc_315 : location_info := LocationInfo file_0 181 12 181 17. - Definition loc_316 : location_info := LocationInfo file_0 180 17 180 22. - Definition loc_317 : location_info := LocationInfo file_0 180 17 180 22. - Definition loc_320 : location_info := LocationInfo file_0 179 9 179 32. - Definition loc_321 : location_info := LocationInfo file_0 179 9 179 14. - Definition loc_322 : location_info := LocationInfo file_0 179 9 179 14. - Definition loc_323 : location_info := LocationInfo file_0 179 18 179 32. - Definition loc_324 : location_info := LocationInfo file_0 174 2 174 7. - Definition loc_325 : location_info := LocationInfo file_0 174 10 174 30. - Definition loc_326 : location_info := LocationInfo file_0 174 10 174 30. - Definition loc_327 : location_info := LocationInfo file_0 174 10 174 19. - Definition loc_328 : location_info := LocationInfo file_0 174 10 174 11. - Definition loc_329 : location_info := LocationInfo file_0 174 10 174 11. - Definition loc_330 : location_info := LocationInfo file_0 173 2 173 7. - Definition loc_331 : location_info := LocationInfo file_0 173 10 173 30. - Definition loc_332 : location_info := LocationInfo file_0 173 10 173 30. - Definition loc_333 : location_info := LocationInfo file_0 173 10 173 19. - Definition loc_334 : location_info := LocationInfo file_0 173 10 173 11. - Definition loc_335 : location_info := LocationInfo file_0 173 10 173 11. - Definition loc_336 : location_info := LocationInfo file_0 169 37 171 3. - Definition loc_337 : location_info := LocationInfo file_0 170 4 170 11. - Definition loc_340 : location_info := LocationInfo file_0 169 6 169 35. - Definition loc_341 : location_info := LocationInfo file_0 169 6 169 17. - Definition loc_342 : location_info := LocationInfo file_0 169 6 169 17. - Definition loc_343 : location_info := LocationInfo file_0 169 6 169 7. - Definition loc_344 : location_info := LocationInfo file_0 169 6 169 7. - Definition loc_345 : location_info := LocationInfo file_0 169 21 169 35. - Definition loc_348 : location_info := LocationInfo file_0 259 2 259 20. - Definition loc_349 : location_info := LocationInfo file_0 260 2 260 40. - Definition loc_350 : location_info := LocationInfo file_0 260 40 260 3. - Definition loc_351 : location_info := LocationInfo file_0 261 2 267 3. - Definition loc_352 : location_info := LocationInfo file_0 270 2 270 31. - Definition loc_353 : location_info := LocationInfo file_0 271 2 275 3. - Definition loc_354 : location_info := LocationInfo file_0 277 2 284 3. - Definition loc_355 : location_info := LocationInfo file_0 286 2 286 14. - Definition loc_356 : location_info := LocationInfo file_0 286 14 289 22. - Definition loc_357 : location_info := LocationInfo file_0 289 2 289 22. - Definition loc_358 : location_info := LocationInfo file_0 291 2 291 13. - Definition loc_359 : location_info := LocationInfo file_0 291 9 291 12. - Definition loc_360 : location_info := LocationInfo file_0 291 9 291 12. - Definition loc_361 : location_info := LocationInfo file_0 289 2 289 11. - Definition loc_362 : location_info := LocationInfo file_0 289 2 289 11. - Definition loc_363 : location_info := LocationInfo file_0 289 12 289 20. - Definition loc_364 : location_info := LocationInfo file_0 289 13 289 20. - Definition loc_365 : location_info := LocationInfo file_0 289 13 289 14. - Definition loc_366 : location_info := LocationInfo file_0 289 13 289 14. - Definition loc_367 : location_info := LocationInfo file_0 286 2 286 5. - Definition loc_368 : location_info := LocationInfo file_0 286 8 286 13. - Definition loc_369 : location_info := LocationInfo file_0 286 8 286 13. - Definition loc_370 : location_info := LocationInfo file_0 277 36 279 3. - Definition loc_371 : location_info := LocationInfo file_0 278 4 278 45. - Definition loc_372 : location_info := LocationInfo file_0 278 4 278 24. - Definition loc_373 : location_info := LocationInfo file_0 278 4 278 13. - Definition loc_374 : location_info := LocationInfo file_0 278 4 278 5. - Definition loc_375 : location_info := LocationInfo file_0 278 4 278 5. - Definition loc_376 : location_info := LocationInfo file_0 278 27 278 44. - Definition loc_377 : location_info := LocationInfo file_0 278 27 278 44. - Definition loc_378 : location_info := LocationInfo file_0 278 27 278 32. - Definition loc_379 : location_info := LocationInfo file_0 278 27 278 32. - Definition loc_380 : location_info := LocationInfo file_0 279 9 284 3. - Definition loc_381 : location_info := LocationInfo file_0 280 4 280 79. - Definition loc_382 : location_info := LocationInfo file_0 281 4 281 46. - Definition loc_383 : location_info := LocationInfo file_0 282 4 282 50. - Definition loc_384 : location_info := LocationInfo file_0 283 4 283 37. - Definition loc_385 : location_info := LocationInfo file_0 283 4 283 24. - Definition loc_386 : location_info := LocationInfo file_0 283 4 283 13. - Definition loc_387 : location_info := LocationInfo file_0 283 4 283 5. - Definition loc_388 : location_info := LocationInfo file_0 283 4 283 5. - Definition loc_389 : location_info := LocationInfo file_0 283 27 283 36. - Definition loc_390 : location_info := LocationInfo file_0 283 27 283 36. - Definition loc_391 : location_info := LocationInfo file_0 282 4 282 19. - Definition loc_392 : location_info := LocationInfo file_0 282 4 282 13. - Definition loc_393 : location_info := LocationInfo file_0 282 4 282 13. - Definition loc_394 : location_info := LocationInfo file_0 282 22 282 49. - Definition loc_395 : location_info := LocationInfo file_0 282 22 282 33. - Definition loc_396 : location_info := LocationInfo file_0 282 22 282 33. - Definition loc_397 : location_info := LocationInfo file_0 282 22 282 27. - Definition loc_398 : location_info := LocationInfo file_0 282 22 282 27. - Definition loc_399 : location_info := LocationInfo file_0 282 36 282 49. - Definition loc_400 : location_info := LocationInfo file_0 282 36 282 49. - Definition loc_401 : location_info := LocationInfo file_0 282 36 282 37. - Definition loc_402 : location_info := LocationInfo file_0 282 36 282 37. - Definition loc_403 : location_info := LocationInfo file_0 281 4 281 25. - Definition loc_404 : location_info := LocationInfo file_0 281 4 281 13. - Definition loc_405 : location_info := LocationInfo file_0 281 4 281 13. - Definition loc_406 : location_info := LocationInfo file_0 281 28 281 45. - Definition loc_407 : location_info := LocationInfo file_0 281 28 281 45. - Definition loc_408 : location_info := LocationInfo file_0 281 28 281 33. - Definition loc_409 : location_info := LocationInfo file_0 281 28 281 33. - Definition loc_410 : location_info := LocationInfo file_0 280 4 280 13. - Definition loc_411 : location_info := LocationInfo file_0 280 16 280 78. - Definition loc_412 : location_info := LocationInfo file_0 280 38 280 78. - Definition loc_413 : location_info := LocationInfo file_0 280 39 280 61. - Definition loc_414 : location_info := LocationInfo file_0 280 56 280 61. - Definition loc_415 : location_info := LocationInfo file_0 280 56 280 61. - Definition loc_416 : location_info := LocationInfo file_0 280 64 280 77. - Definition loc_417 : location_info := LocationInfo file_0 280 64 280 77. - Definition loc_418 : location_info := LocationInfo file_0 280 64 280 65. - Definition loc_419 : location_info := LocationInfo file_0 280 64 280 65. - Definition loc_420 : location_info := LocationInfo file_0 277 6 277 34. - Definition loc_421 : location_info := LocationInfo file_0 277 6 277 19. - Definition loc_422 : location_info := LocationInfo file_0 277 6 277 19. - Definition loc_423 : location_info := LocationInfo file_0 277 6 277 7. - Definition loc_424 : location_info := LocationInfo file_0 277 6 277 7. - Definition loc_425 : location_info := LocationInfo file_0 277 23 277 34. - Definition loc_426 : location_info := LocationInfo file_0 277 23 277 34. - Definition loc_427 : location_info := LocationInfo file_0 277 23 277 28. - Definition loc_428 : location_info := LocationInfo file_0 277 23 277 28. - Definition loc_429 : location_info := LocationInfo file_0 271 31 275 3. - Definition loc_430 : location_info := LocationInfo file_0 273 4 273 25. - Definition loc_431 : location_info := LocationInfo file_0 274 4 274 14. - Definition loc_432 : location_info := LocationInfo file_0 273 4 273 7. - Definition loc_433 : location_info := LocationInfo file_0 273 10 273 24. - Definition loc_435 : location_info := LocationInfo file_0 271 6 271 29. - Definition loc_436 : location_info := LocationInfo file_0 271 6 271 11. - Definition loc_437 : location_info := LocationInfo file_0 271 6 271 11. - Definition loc_438 : location_info := LocationInfo file_0 271 15 271 29. - Definition loc_439 : location_info := LocationInfo file_0 270 2 270 7. - Definition loc_440 : location_info := LocationInfo file_0 270 10 270 30. - Definition loc_441 : location_info := LocationInfo file_0 270 10 270 30. - Definition loc_442 : location_info := LocationInfo file_0 270 10 270 19. - Definition loc_443 : location_info := LocationInfo file_0 270 10 270 11. - Definition loc_444 : location_info := LocationInfo file_0 270 10 270 11. - Definition loc_445 : location_info := LocationInfo file_0 261 46 267 3. - Definition loc_446 : location_info := LocationInfo file_0 262 4 262 53. - Definition loc_447 : location_info := LocationInfo file_0 264 4 264 39. - Definition loc_448 : location_info := LocationInfo file_0 265 4 265 16. - Definition loc_449 : location_info := LocationInfo file_0 266 4 266 14. - Definition loc_450 : location_info := LocationInfo file_0 265 4 265 7. - Definition loc_451 : location_info := LocationInfo file_0 265 10 265 15. - Definition loc_452 : location_info := LocationInfo file_0 265 10 265 15. - Definition loc_453 : location_info := LocationInfo file_0 264 4 264 24. - Definition loc_454 : location_info := LocationInfo file_0 264 4 264 13. - Definition loc_455 : location_info := LocationInfo file_0 264 4 264 5. - Definition loc_456 : location_info := LocationInfo file_0 264 4 264 5. - Definition loc_457 : location_info := LocationInfo file_0 264 27 264 38. - Definition loc_458 : location_info := LocationInfo file_0 264 27 264 38. - Definition loc_459 : location_info := LocationInfo file_0 264 27 264 32. - Definition loc_460 : location_info := LocationInfo file_0 264 27 264 32. - Definition loc_461 : location_info := LocationInfo file_0 262 32 262 52. - Definition loc_462 : location_info := LocationInfo file_0 262 32 262 52. - Definition loc_463 : location_info := LocationInfo file_0 262 32 262 41. - Definition loc_464 : location_info := LocationInfo file_0 262 32 262 33. - Definition loc_465 : location_info := LocationInfo file_0 262 32 262 33. - Definition loc_469 : location_info := LocationInfo file_0 261 6 261 44. - Definition loc_470 : location_info := LocationInfo file_0 261 6 261 26. - Definition loc_471 : location_info := LocationInfo file_0 261 6 261 26. - Definition loc_472 : location_info := LocationInfo file_0 261 6 261 15. - Definition loc_473 : location_info := LocationInfo file_0 261 6 261 7. - Definition loc_474 : location_info := LocationInfo file_0 261 6 261 7. - Definition loc_475 : location_info := LocationInfo file_0 261 30 261 44. - Definition loc_476 : location_info := LocationInfo file_0 260 27 260 39. - Definition loc_477 : location_info := LocationInfo file_0 260 28 260 39. - Definition loc_478 : location_info := LocationInfo file_0 260 29 260 30. - Definition loc_479 : location_info := LocationInfo file_0 260 29 260 30. - Definition loc_480 : location_info := LocationInfo file_0 259 2 259 9. - Definition loc_481 : location_info := LocationInfo file_0 259 2 259 9. - Definition loc_482 : location_info := LocationInfo file_0 259 10 259 18. - Definition loc_483 : location_info := LocationInfo file_0 259 11 259 18. - Definition loc_484 : location_info := LocationInfo file_0 259 11 259 12. - Definition loc_485 : location_info := LocationInfo file_0 259 11 259 12. - Definition loc_488 : location_info := LocationInfo file_0 304 2 304 41. - Definition loc_489 : location_info := LocationInfo file_0 305 2 307 3. - Definition loc_490 : location_info := LocationInfo file_0 308 2 308 18. - Definition loc_491 : location_info := LocationInfo file_0 312 2 318 3. - Definition loc_492 : location_info := LocationInfo file_0 320 2 320 24. - Definition loc_493 : location_info := LocationInfo file_0 320 9 320 23. - Definition loc_494 : location_info := LocationInfo file_0 312 2 318 3. - Definition loc_495 : location_info := LocationInfo file_0 312 30 318 3. - Definition loc_496 : location_info := LocationInfo file_0 313 4 313 37. - Definition loc_497 : location_info := LocationInfo file_0 314 4 316 5. - Definition loc_498 : location_info := LocationInfo file_0 317 4 317 20. - Definition loc_499 : location_info := LocationInfo file_0 312 2 318 3. - Definition loc_500 : location_info := LocationInfo file_0 312 2 318 3. - Definition loc_501 : location_info := LocationInfo file_0 317 4 317 5. - Definition loc_502 : location_info := LocationInfo file_0 317 8 317 19. - Definition loc_503 : location_info := LocationInfo file_0 317 8 317 19. - Definition loc_504 : location_info := LocationInfo file_0 317 8 317 9. - Definition loc_505 : location_info := LocationInfo file_0 317 8 317 9. - Definition loc_506 : location_info := LocationInfo file_0 314 31 316 5. - Definition loc_507 : location_info := LocationInfo file_0 315 6 315 17. - Definition loc_508 : location_info := LocationInfo file_0 315 13 315 16. - Definition loc_509 : location_info := LocationInfo file_0 315 13 315 16. - Definition loc_511 : location_info := LocationInfo file_0 314 8 314 29. - Definition loc_512 : location_info := LocationInfo file_0 314 8 314 11. - Definition loc_513 : location_info := LocationInfo file_0 314 8 314 11. - Definition loc_514 : location_info := LocationInfo file_0 314 15 314 29. - Definition loc_515 : location_info := LocationInfo file_0 313 4 313 7. - Definition loc_516 : location_info := LocationInfo file_0 313 10 313 36. - Definition loc_517 : location_info := LocationInfo file_0 313 10 313 33. - Definition loc_518 : location_info := LocationInfo file_0 313 10 313 33. - Definition loc_519 : location_info := LocationInfo file_0 313 34 313 35. - Definition loc_520 : location_info := LocationInfo file_0 313 34 313 35. - Definition loc_521 : location_info := LocationInfo file_0 312 9 312 28. - Definition loc_522 : location_info := LocationInfo file_0 312 9 312 10. - Definition loc_523 : location_info := LocationInfo file_0 312 9 312 10. - Definition loc_524 : location_info := LocationInfo file_0 312 14 312 28. - Definition loc_525 : location_info := LocationInfo file_0 308 2 308 3. - Definition loc_526 : location_info := LocationInfo file_0 308 6 308 17. - Definition loc_527 : location_info := LocationInfo file_0 308 6 308 17. - Definition loc_528 : location_info := LocationInfo file_0 308 6 308 7. - Definition loc_529 : location_info := LocationInfo file_0 308 6 308 7. - Definition loc_530 : location_info := LocationInfo file_0 305 29 307 3. - Definition loc_531 : location_info := LocationInfo file_0 306 4 306 15. - Definition loc_532 : location_info := LocationInfo file_0 306 11 306 14. - Definition loc_533 : location_info := LocationInfo file_0 306 11 306 14. - Definition loc_535 : location_info := LocationInfo file_0 305 6 305 27. - Definition loc_536 : location_info := LocationInfo file_0 305 6 305 9. - Definition loc_537 : location_info := LocationInfo file_0 305 6 305 9. - Definition loc_538 : location_info := LocationInfo file_0 305 13 305 27. - Definition loc_539 : location_info := LocationInfo file_0 304 14 304 40. - Definition loc_540 : location_info := LocationInfo file_0 304 14 304 37. - Definition loc_541 : location_info := LocationInfo file_0 304 14 304 37. - Definition loc_542 : location_info := LocationInfo file_0 304 38 304 39. - Definition loc_543 : location_info := LocationInfo file_0 304 38 304 39. - Definition loc_548 : location_info := LocationInfo file_0 361 2 361 29. - Definition loc_549 : location_info := LocationInfo file_0 363 2 363 25. - Definition loc_550 : location_info := LocationInfo file_0 365 2 365 20. - Definition loc_551 : location_info := LocationInfo file_0 366 2 366 40. - Definition loc_552 : location_info := LocationInfo file_0 366 40 366 3. - Definition loc_553 : location_info := LocationInfo file_0 372 2 372 31. - Definition loc_554 : location_info := LocationInfo file_0 382 2 428 3. - Definition loc_555 : location_info := LocationInfo file_0 429 2 429 11. - Definition loc_556 : location_info := LocationInfo file_0 429 11 429 3. - Definition loc_557 : location_info := LocationInfo file_0 431 2 431 22. - Definition loc_558 : location_info := LocationInfo file_0 433 2 433 13. - Definition loc_559 : location_info := LocationInfo file_0 433 9 433 12. - Definition loc_560 : location_info := LocationInfo file_0 433 9 433 12. - Definition loc_561 : location_info := LocationInfo file_0 431 2 431 11. - Definition loc_562 : location_info := LocationInfo file_0 431 2 431 11. - Definition loc_563 : location_info := LocationInfo file_0 431 12 431 20. - Definition loc_564 : location_info := LocationInfo file_0 431 13 431 20. - Definition loc_565 : location_info := LocationInfo file_0 431 13 431 14. - Definition loc_566 : location_info := LocationInfo file_0 431 13 431 14. - Definition loc_567 : location_info := LocationInfo file_0 429 2 429 10. - Definition loc_568 : location_info := LocationInfo file_0 429 3 429 10. - Definition loc_569 : location_info := LocationInfo file_0 429 5 429 9. - Definition loc_570 : location_info := LocationInfo file_0 429 5 429 9. - Definition loc_571 : location_info := LocationInfo file_0 382 2 428 3. - Definition loc_572 : location_info := LocationInfo file_0 382 34 428 3. - Definition loc_573 : location_info := LocationInfo file_0 385 4 385 38. - Definition loc_574 : location_info := LocationInfo file_0 389 4 389 67. - Definition loc_575 : location_info := LocationInfo file_0 396 4 425 5. - Definition loc_576 : location_info := LocationInfo file_0 427 4 427 30. - Definition loc_577 : location_info := LocationInfo file_0 382 2 428 3. - Definition loc_578 : location_info := LocationInfo file_0 382 2 428 3. - Definition loc_579 : location_info := LocationInfo file_0 427 4 427 8. - Definition loc_580 : location_info := LocationInfo file_0 427 11 427 29. - Definition loc_581 : location_info := LocationInfo file_0 427 12 427 29. - Definition loc_582 : location_info := LocationInfo file_0 427 12 427 17. - Definition loc_583 : location_info := LocationInfo file_0 427 12 427 17. - Definition loc_584 : location_info := LocationInfo file_0 396 61 425 5. - Definition loc_585 : location_info := LocationInfo file_0 397 6 397 38. - Definition loc_586 : location_info := LocationInfo file_0 398 6 398 57. - Definition loc_587 : location_info := LocationInfo file_0 399 6 399 42. - Definition loc_588 : location_info := LocationInfo file_0 399 42 399 7. - Definition loc_589 : location_info := LocationInfo file_0 400 6 400 52. - Definition loc_590 : location_info := LocationInfo file_0 402 6 409 7. - Definition loc_591 : location_info := LocationInfo file_0 415 6 419 7. - Definition loc_592 : location_info := LocationInfo file_0 421 6 421 16. - Definition loc_593 : location_info := LocationInfo file_0 421 16 421 7. - Definition loc_594 : location_info := LocationInfo file_0 422 6 422 55. - Definition loc_595 : location_info := LocationInfo file_0 422 55 422 7. - Definition loc_596 : location_info := LocationInfo file_0 423 6 423 26. - Definition loc_597 : location_info := LocationInfo file_0 424 6 424 12. - Definition loc_598 : location_info := LocationInfo file_0 423 6 423 9. - Definition loc_599 : location_info := LocationInfo file_0 423 12 423 25. - Definition loc_600 : location_info := LocationInfo file_0 423 20 423 25. - Definition loc_601 : location_info := LocationInfo file_0 423 20 423 25. - Definition loc_602 : location_info := LocationInfo file_0 422 45 422 54. - Definition loc_603 : location_info := LocationInfo file_0 422 46 422 54. - Definition loc_604 : location_info := LocationInfo file_0 422 48 422 53. - Definition loc_605 : location_info := LocationInfo file_0 422 48 422 53. - Definition loc_606 : location_info := LocationInfo file_0 421 6 421 15. - Definition loc_607 : location_info := LocationInfo file_0 421 7 421 15. - Definition loc_608 : location_info := LocationInfo file_0 421 9 421 14. - Definition loc_609 : location_info := LocationInfo file_0 421 9 421 14. - Definition loc_610 : location_info := LocationInfo file_0 415 41 419 7. - Definition loc_611 : location_info := LocationInfo file_0 416 8 416 34. - Definition loc_612 : location_info := LocationInfo file_0 417 8 417 22. - Definition loc_613 : location_info := LocationInfo file_0 418 8 418 35. - Definition loc_614 : location_info := LocationInfo file_0 418 8 418 19. - Definition loc_615 : location_info := LocationInfo file_0 418 8 418 13. - Definition loc_616 : location_info := LocationInfo file_0 418 8 418 13. - Definition loc_617 : location_info := LocationInfo file_0 418 22 418 34. - Definition loc_618 : location_info := LocationInfo file_0 418 22 418 34. - Definition loc_619 : location_info := LocationInfo file_0 417 8 417 13. - Definition loc_620 : location_info := LocationInfo file_0 417 9 417 13. - Definition loc_621 : location_info := LocationInfo file_0 417 9 417 13. - Definition loc_622 : location_info := LocationInfo file_0 417 16 417 21. - Definition loc_623 : location_info := LocationInfo file_0 417 16 417 21. - Definition loc_624 : location_info := LocationInfo file_0 416 8 416 25. - Definition loc_625 : location_info := LocationInfo file_0 416 8 416 13. - Definition loc_626 : location_info := LocationInfo file_0 416 8 416 13. - Definition loc_627 : location_info := LocationInfo file_0 416 28 416 33. - Definition loc_628 : location_info := LocationInfo file_0 416 28 416 33. - Definition loc_629 : location_info := LocationInfo file_0 416 29 416 33. - Definition loc_630 : location_info := LocationInfo file_0 416 29 416 33. - Definition loc_632 : location_info := LocationInfo file_0 415 10 415 39. - Definition loc_633 : location_info := LocationInfo file_0 415 10 415 22. - Definition loc_634 : location_info := LocationInfo file_0 415 10 415 22. - Definition loc_635 : location_info := LocationInfo file_0 415 26 415 39. - Definition loc_636 : location_info := LocationInfo file_0 415 26 415 39. - Definition loc_637 : location_info := LocationInfo file_0 415 26 415 27. - Definition loc_638 : location_info := LocationInfo file_0 415 26 415 27. - Definition loc_639 : location_info := LocationInfo file_0 402 62 404 7. - Definition loc_640 : location_info := LocationInfo file_0 403 8 403 27. - Definition loc_641 : location_info := LocationInfo file_0 403 8 403 13. - Definition loc_642 : location_info := LocationInfo file_0 403 9 403 13. - Definition loc_643 : location_info := LocationInfo file_0 403 9 403 13. - Definition loc_644 : location_info := LocationInfo file_0 403 16 403 26. - Definition loc_645 : location_info := LocationInfo file_0 403 16 403 26. - Definition loc_646 : location_info := LocationInfo file_0 404 13 409 7. - Definition loc_647 : location_info := LocationInfo file_0 405 8 405 76. - Definition loc_648 : location_info := LocationInfo file_0 406 8 406 78. - Definition loc_649 : location_info := LocationInfo file_0 407 8 407 43. - Definition loc_650 : location_info := LocationInfo file_0 408 8 408 26. - Definition loc_651 : location_info := LocationInfo file_0 408 8 408 13. - Definition loc_652 : location_info := LocationInfo file_0 408 9 408 13. - Definition loc_653 : location_info := LocationInfo file_0 408 9 408 13. - Definition loc_654 : location_info := LocationInfo file_0 408 16 408 25. - Definition loc_655 : location_info := LocationInfo file_0 408 16 408 25. - Definition loc_656 : location_info := LocationInfo file_0 407 8 407 29. - Definition loc_657 : location_info := LocationInfo file_0 407 8 407 17. - Definition loc_658 : location_info := LocationInfo file_0 407 8 407 17. - Definition loc_659 : location_info := LocationInfo file_0 407 32 407 42. - Definition loc_660 : location_info := LocationInfo file_0 407 32 407 42. - Definition loc_661 : location_info := LocationInfo file_0 406 8 406 23. - Definition loc_662 : location_info := LocationInfo file_0 406 8 406 17. - Definition loc_663 : location_info := LocationInfo file_0 406 8 406 17. - Definition loc_664 : location_info := LocationInfo file_0 406 26 406 77. - Definition loc_665 : location_info := LocationInfo file_0 406 26 406 36. - Definition loc_666 : location_info := LocationInfo file_0 406 26 406 36. - Definition loc_667 : location_info := LocationInfo file_0 406 39 406 77. - Definition loc_668 : location_info := LocationInfo file_0 406 40 406 52. - Definition loc_669 : location_info := LocationInfo file_0 406 40 406 52. - Definition loc_670 : location_info := LocationInfo file_0 406 55 406 76. - Definition loc_671 : location_info := LocationInfo file_0 406 55 406 60. - Definition loc_672 : location_info := LocationInfo file_0 406 55 406 60. - Definition loc_673 : location_info := LocationInfo file_0 406 63 406 76. - Definition loc_674 : location_info := LocationInfo file_0 406 63 406 76. - Definition loc_675 : location_info := LocationInfo file_0 406 63 406 64. - Definition loc_676 : location_info := LocationInfo file_0 406 63 406 64. - Definition loc_677 : location_info := LocationInfo file_0 405 8 405 17. - Definition loc_678 : location_info := LocationInfo file_0 405 20 405 75. - Definition loc_679 : location_info := LocationInfo file_0 405 42 405 75. - Definition loc_680 : location_info := LocationInfo file_0 405 43 405 48. - Definition loc_681 : location_info := LocationInfo file_0 405 43 405 48. - Definition loc_682 : location_info := LocationInfo file_0 405 51 405 74. - Definition loc_683 : location_info := LocationInfo file_0 405 52 405 57. - Definition loc_684 : location_info := LocationInfo file_0 405 52 405 57. - Definition loc_685 : location_info := LocationInfo file_0 405 60 405 73. - Definition loc_686 : location_info := LocationInfo file_0 405 60 405 73. - Definition loc_687 : location_info := LocationInfo file_0 405 60 405 61. - Definition loc_688 : location_info := LocationInfo file_0 405 60 405 61. - Definition loc_689 : location_info := LocationInfo file_0 402 10 402 60. - Definition loc_690 : location_info := LocationInfo file_0 402 10 402 46. - Definition loc_691 : location_info := LocationInfo file_0 402 10 402 22. - Definition loc_692 : location_info := LocationInfo file_0 402 10 402 22. - Definition loc_693 : location_info := LocationInfo file_0 402 25 402 46. - Definition loc_694 : location_info := LocationInfo file_0 402 25 402 30. - Definition loc_695 : location_info := LocationInfo file_0 402 25 402 30. - Definition loc_696 : location_info := LocationInfo file_0 402 33 402 46. - Definition loc_697 : location_info := LocationInfo file_0 402 33 402 46. - Definition loc_698 : location_info := LocationInfo file_0 402 33 402 34. - Definition loc_699 : location_info := LocationInfo file_0 402 33 402 34. - Definition loc_700 : location_info := LocationInfo file_0 402 50 402 60. - Definition loc_701 : location_info := LocationInfo file_0 402 50 402 60. - Definition loc_702 : location_info := LocationInfo file_0 400 6 400 11. - Definition loc_703 : location_info := LocationInfo file_0 400 14 400 51. - Definition loc_704 : location_info := LocationInfo file_0 400 14 400 36. - Definition loc_705 : location_info := LocationInfo file_0 400 31 400 36. - Definition loc_706 : location_info := LocationInfo file_0 400 31 400 36. - Definition loc_707 : location_info := LocationInfo file_0 400 39 400 51. - Definition loc_708 : location_info := LocationInfo file_0 400 39 400 51. - Definition loc_709 : location_info := LocationInfo file_0 399 32 399 41. - Definition loc_710 : location_info := LocationInfo file_0 399 33 399 41. - Definition loc_711 : location_info := LocationInfo file_0 399 35 399 40. - Definition loc_712 : location_info := LocationInfo file_0 399 35 399 40. - Definition loc_713 : location_info := LocationInfo file_0 398 39 398 56. - Definition loc_714 : location_info := LocationInfo file_0 398 39 398 56. - Definition loc_715 : location_info := LocationInfo file_0 398 39 398 44. - Definition loc_716 : location_info := LocationInfo file_0 398 39 398 44. - Definition loc_719 : location_info := LocationInfo file_0 397 26 397 37. - Definition loc_720 : location_info := LocationInfo file_0 397 26 397 37. - Definition loc_721 : location_info := LocationInfo file_0 397 26 397 31. - Definition loc_722 : location_info := LocationInfo file_0 397 26 397 31. - Definition loc_726 : location_info := LocationInfo file_0 396 8 396 59. - Definition loc_727 : location_info := LocationInfo file_0 396 8 396 44. - Definition loc_728 : location_info := LocationInfo file_0 396 8 396 20. - Definition loc_729 : location_info := LocationInfo file_0 396 8 396 20. - Definition loc_730 : location_info := LocationInfo file_0 396 23 396 44. - Definition loc_731 : location_info := LocationInfo file_0 396 23 396 28. - Definition loc_732 : location_info := LocationInfo file_0 396 23 396 28. - Definition loc_733 : location_info := LocationInfo file_0 396 31 396 44. - Definition loc_734 : location_info := LocationInfo file_0 396 31 396 44. - Definition loc_735 : location_info := LocationInfo file_0 396 31 396 32. - Definition loc_736 : location_info := LocationInfo file_0 396 31 396 32. - Definition loc_737 : location_info := LocationInfo file_0 396 48 396 59. - Definition loc_738 : location_info := LocationInfo file_0 396 48 396 59. - Definition loc_739 : location_info := LocationInfo file_0 396 48 396 53. - Definition loc_740 : location_info := LocationInfo file_0 396 48 396 53. - Definition loc_741 : location_info := LocationInfo file_0 389 4 389 20. - Definition loc_742 : location_info := LocationInfo file_0 389 4 389 20. - Definition loc_743 : location_info := LocationInfo file_0 389 21 389 43. - Definition loc_744 : location_info := LocationInfo file_0 389 38 389 43. - Definition loc_745 : location_info := LocationInfo file_0 389 38 389 43. - Definition loc_746 : location_info := LocationInfo file_0 389 45 389 50. - Definition loc_747 : location_info := LocationInfo file_0 389 45 389 50. - Definition loc_748 : location_info := LocationInfo file_0 389 52 389 65. - Definition loc_749 : location_info := LocationInfo file_0 389 53 389 65. - Definition loc_750 : location_info := LocationInfo file_0 385 32 385 37. - Definition loc_751 : location_info := LocationInfo file_0 385 32 385 37. - Definition loc_752 : location_info := LocationInfo file_0 385 33 385 37. - Definition loc_753 : location_info := LocationInfo file_0 385 33 385 37. - Definition loc_756 : location_info := LocationInfo file_0 382 9 382 32. - Definition loc_757 : location_info := LocationInfo file_0 382 9 382 14. - Definition loc_758 : location_info := LocationInfo file_0 382 9 382 14. - Definition loc_759 : location_info := LocationInfo file_0 382 10 382 14. - Definition loc_760 : location_info := LocationInfo file_0 382 10 382 14. - Definition loc_761 : location_info := LocationInfo file_0 382 18 382 32. - Definition loc_762 : location_info := LocationInfo file_0 372 2 372 6. - Definition loc_763 : location_info := LocationInfo file_0 372 9 372 30. - Definition loc_764 : location_info := LocationInfo file_0 372 10 372 30. - Definition loc_765 : location_info := LocationInfo file_0 372 10 372 19. - Definition loc_766 : location_info := LocationInfo file_0 372 10 372 11. - Definition loc_767 : location_info := LocationInfo file_0 372 10 372 11. - Definition loc_768 : location_info := LocationInfo file_0 366 27 366 39. - Definition loc_769 : location_info := LocationInfo file_0 366 28 366 39. - Definition loc_770 : location_info := LocationInfo file_0 366 29 366 30. - Definition loc_771 : location_info := LocationInfo file_0 366 29 366 30. - Definition loc_772 : location_info := LocationInfo file_0 365 2 365 9. - Definition loc_773 : location_info := LocationInfo file_0 365 2 365 9. - Definition loc_774 : location_info := LocationInfo file_0 365 10 365 18. - Definition loc_775 : location_info := LocationInfo file_0 365 11 365 18. - Definition loc_776 : location_info := LocationInfo file_0 365 11 365 12. - Definition loc_777 : location_info := LocationInfo file_0 365 11 365 12. - Definition loc_778 : location_info := LocationInfo file_0 363 2 363 7. - Definition loc_779 : location_info := LocationInfo file_0 363 2 363 24. - Definition loc_780 : location_info := LocationInfo file_0 363 2 363 7. - Definition loc_781 : location_info := LocationInfo file_0 363 2 363 7. - Definition loc_782 : location_info := LocationInfo file_0 363 11 363 24. - Definition loc_783 : location_info := LocationInfo file_0 363 11 363 24. - Definition loc_784 : location_info := LocationInfo file_0 363 11 363 12. - Definition loc_785 : location_info := LocationInfo file_0 363 11 363 12. - Definition loc_786 : location_info := LocationInfo file_0 361 14 361 28. - Definition loc_791 : location_info := LocationInfo file_0 456 2 456 66. - Definition loc_792 : location_info := LocationInfo file_0 458 2 460 3. - Definition loc_793 : location_info := LocationInfo file_0 462 2 462 18. - Definition loc_794 : location_info := LocationInfo file_0 466 2 475 3. - Definition loc_795 : location_info := LocationInfo file_0 477 2 477 24. - Definition loc_796 : location_info := LocationInfo file_0 477 9 477 23. - Definition loc_797 : location_info := LocationInfo file_0 466 2 475 3. - Definition loc_798 : location_info := LocationInfo file_0 466 30 475 3. - Definition loc_799 : location_info := LocationInfo file_0 467 4 467 62. - Definition loc_800 : location_info := LocationInfo file_0 469 4 471 5. - Definition loc_801 : location_info := LocationInfo file_0 473 4 473 20. - Definition loc_802 : location_info := LocationInfo file_0 466 2 475 3. - Definition loc_803 : location_info := LocationInfo file_0 466 2 475 3. - Definition loc_804 : location_info := LocationInfo file_0 473 4 473 5. - Definition loc_805 : location_info := LocationInfo file_0 473 8 473 19. - Definition loc_806 : location_info := LocationInfo file_0 473 8 473 19. - Definition loc_807 : location_info := LocationInfo file_0 473 8 473 9. - Definition loc_808 : location_info := LocationInfo file_0 473 8 473 9. - Definition loc_809 : location_info := LocationInfo file_0 469 31 471 5. - Definition loc_810 : location_info := LocationInfo file_0 470 6 470 17. - Definition loc_811 : location_info := LocationInfo file_0 470 13 470 16. - Definition loc_812 : location_info := LocationInfo file_0 470 13 470 16. - Definition loc_814 : location_info := LocationInfo file_0 469 8 469 29. - Definition loc_815 : location_info := LocationInfo file_0 469 8 469 11. - Definition loc_816 : location_info := LocationInfo file_0 469 8 469 11. - Definition loc_817 : location_info := LocationInfo file_0 469 15 469 29. - Definition loc_818 : location_info := LocationInfo file_0 467 4 467 7. - Definition loc_819 : location_info := LocationInfo file_0 467 10 467 61. - Definition loc_820 : location_info := LocationInfo file_0 467 10 467 44. - Definition loc_821 : location_info := LocationInfo file_0 467 10 467 44. - Definition loc_822 : location_info := LocationInfo file_0 467 45 467 46. - Definition loc_823 : location_info := LocationInfo file_0 467 45 467 46. - Definition loc_824 : location_info := LocationInfo file_0 467 48 467 53. - Definition loc_825 : location_info := LocationInfo file_0 467 48 467 53. - Definition loc_826 : location_info := LocationInfo file_0 467 55 467 60. - Definition loc_827 : location_info := LocationInfo file_0 467 55 467 60. - Definition loc_828 : location_info := LocationInfo file_0 466 9 466 28. - Definition loc_829 : location_info := LocationInfo file_0 466 9 466 10. - Definition loc_830 : location_info := LocationInfo file_0 466 9 466 10. - Definition loc_831 : location_info := LocationInfo file_0 466 14 466 28. - Definition loc_832 : location_info := LocationInfo file_0 462 2 462 3. - Definition loc_833 : location_info := LocationInfo file_0 462 6 462 17. - Definition loc_834 : location_info := LocationInfo file_0 462 6 462 17. - Definition loc_835 : location_info := LocationInfo file_0 462 6 462 7. - Definition loc_836 : location_info := LocationInfo file_0 462 6 462 7. - Definition loc_837 : location_info := LocationInfo file_0 458 29 460 3. - Definition loc_838 : location_info := LocationInfo file_0 459 4 459 15. - Definition loc_839 : location_info := LocationInfo file_0 459 11 459 14. - Definition loc_840 : location_info := LocationInfo file_0 459 11 459 14. - Definition loc_842 : location_info := LocationInfo file_0 458 6 458 27. - Definition loc_843 : location_info := LocationInfo file_0 458 6 458 9. - Definition loc_844 : location_info := LocationInfo file_0 458 6 458 9. - Definition loc_845 : location_info := LocationInfo file_0 458 13 458 27. - Definition loc_846 : location_info := LocationInfo file_0 456 14 456 65. - Definition loc_847 : location_info := LocationInfo file_0 456 14 456 48. - Definition loc_848 : location_info := LocationInfo file_0 456 14 456 48. - Definition loc_849 : location_info := LocationInfo file_0 456 49 456 50. - Definition loc_850 : location_info := LocationInfo file_0 456 49 456 50. - Definition loc_851 : location_info := LocationInfo file_0 456 52 456 57. - Definition loc_852 : location_info := LocationInfo file_0 456 52 456 57. - Definition loc_853 : location_info := LocationInfo file_0 456 59 456 64. - Definition loc_854 : location_info := LocationInfo file_0 456 59 456 64. - - (* Definition of struct [atomic_flag]. *) - Program Definition struct_atomic_flag := {| - sl_members := [ - (Some "_Value", it_layout bool_it) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [spinlock]. *) - Program Definition struct_spinlock := {| - sl_members := [ - (Some "lock", it_layout bool_it) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [mpool_chunk]. *) - Program Definition struct_mpool_chunk := {| - sl_members := [ - (Some "size", it_layout size_t); - (Some "next_chunk", LPtr) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [mpool_entry]. *) - Program Definition struct_mpool_entry := {| - sl_members := [ - (Some "next", LPtr) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [mpool_locked_inner]. *) - Program Definition struct_mpool_locked_inner := {| - sl_members := [ - (Some "chunk_list", LPtr); - (Some "entry_list", LPtr) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [mpool]. *) - Program Definition struct_mpool := {| - sl_members := [ - (Some "entry_size", it_layout size_t); - (Some "lock", layout_of struct_spinlock); - (None, mk_layout 7%nat 0%nat); - (Some "locked", layout_of struct_mpool_locked_inner); - (Some "fallback", LPtr) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of function [mpool_add_chunk]. *) - Definition impl_mpool_add_chunk (sl_lock sl_unlock : loc): function := {| - f_args := [ - ("p", LPtr); - ("begin", LPtr); - ("size", it_layout size_t) - ]; - f_local_vars := [ - ("chunk", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_2 ; - expr: (LocInfoE loc_62 (&(LocInfoE loc_63 ((LocInfoE loc_64 (!{LPtr} (LocInfoE loc_65 ("p")))) at{struct_mpool} "entry_size")))) ; - locinfo: loc_57 ; - if: LocInfoE loc_57 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_57 ((LocInfoE loc_58 (use{it_layout size_t} (LocInfoE loc_59 ("size")))) ={IntOp size_t, IntOp size_t} (LocInfoE loc_60 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_61 (i2v 0 i32))))))) - then - locinfo: loc_54 ; - Goto "#2" - else - locinfo: loc_5 ; - Goto "#3" - ]> $ - <[ "#1" := - locinfo: loc_5 ; - LocInfoE loc_50 ("chunk") <-{ LPtr } - LocInfoE loc_51 (use{LPtr} (LocInfoE loc_52 ("begin"))) ; - locinfo: loc_6 ; - LocInfoE loc_45 ((LocInfoE loc_46 (!{LPtr} (LocInfoE loc_47 ("chunk")))) at{struct_mpool_chunk} "size") <-{ it_layout size_t } - LocInfoE loc_48 (use{it_layout size_t} (LocInfoE loc_49 ("size"))) ; - locinfo: loc_7 ; - "_" <- LocInfoE loc_40 (sl_lock) with - [ LocInfoE loc_41 (&(LocInfoE loc_42 ((LocInfoE loc_43 (!{LPtr} (LocInfoE loc_44 ("p")))) at{struct_mpool} "lock"))) ] ; - locinfo: loc_8 ; - annot: (UnlockA) ; - expr: (LocInfoE loc_35 (&(LocInfoE loc_36 ((LocInfoE loc_37 (!{LPtr} (LocInfoE loc_38 ("p")))) at{struct_mpool} "locked")))) ; - locinfo: loc_10 ; - LocInfoE loc_27 ((LocInfoE loc_28 (!{LPtr} (LocInfoE loc_29 ("chunk")))) at{struct_mpool_chunk} "next_chunk") <-{ LPtr } - LocInfoE loc_30 (use{LPtr} (LocInfoE loc_31 ((LocInfoE loc_32 ((LocInfoE loc_33 (!{LPtr} (LocInfoE loc_34 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list"))) ; - locinfo: loc_11 ; - LocInfoE loc_21 ((LocInfoE loc_22 ((LocInfoE loc_23 (!{LPtr} (LocInfoE loc_24 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list") <-{ LPtr } - LocInfoE loc_25 (use{LPtr} (LocInfoE loc_26 ("chunk"))) ; - locinfo: loc_12 ; - "_" <- LocInfoE loc_16 (sl_unlock) with - [ LocInfoE loc_17 (AnnotExpr 1%nat LockA (LocInfoE loc_17 (&(LocInfoE loc_18 ((LocInfoE loc_19 (!{LPtr} (LocInfoE loc_20 ("p")))) at{struct_mpool} "lock"))))) ] ; - locinfo: loc_13 ; - Return (LocInfoE loc_14 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_14 (i2v 1 i32)))) - ]> $ - <[ "#2" := - locinfo: loc_54 ; - Return (LocInfoE loc_55 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_55 (i2v 0 i32)))) - ]> $ - <[ "#3" := - locinfo: loc_5 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [mpool_free]. *) - Definition impl_mpool_free (sl_lock sl_unlock : loc): function := {| - f_args := [ - ("p", LPtr); - ("ptr", LPtr) - ]; - f_local_vars := [ - ("e", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "e" <-{ LPtr } - LocInfoE loc_111 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_111 (use{LPtr} (LocInfoE loc_112 ("ptr"))))) ; - locinfo: loc_69 ; - expr: (LocInfoE loc_107 (&(LocInfoE loc_108 ((LocInfoE loc_109 (!{LPtr} (LocInfoE loc_110 ("p")))) at{struct_mpool} "entry_size")))) ; - locinfo: loc_71 ; - "_" <- LocInfoE loc_102 (sl_lock) with - [ LocInfoE loc_103 (&(LocInfoE loc_104 ((LocInfoE loc_105 (!{LPtr} (LocInfoE loc_106 ("p")))) at{struct_mpool} "lock"))) ] ; - locinfo: loc_72 ; - annot: (UnlockA) ; - expr: (LocInfoE loc_97 (&(LocInfoE loc_98 ((LocInfoE loc_99 (!{LPtr} (LocInfoE loc_100 ("p")))) at{struct_mpool} "locked")))) ; - locinfo: loc_74 ; - LocInfoE loc_89 ((LocInfoE loc_90 (!{LPtr} (LocInfoE loc_91 ("e")))) at{struct_mpool_entry} "next") <-{ LPtr } - LocInfoE loc_92 (use{LPtr} (LocInfoE loc_93 ((LocInfoE loc_94 ((LocInfoE loc_95 (!{LPtr} (LocInfoE loc_96 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list"))) ; - locinfo: loc_75 ; - LocInfoE loc_83 ((LocInfoE loc_84 ((LocInfoE loc_85 (!{LPtr} (LocInfoE loc_86 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list") <-{ LPtr } - LocInfoE loc_87 (use{LPtr} (LocInfoE loc_88 ("e"))) ; - locinfo: loc_76 ; - "_" <- LocInfoE loc_78 (sl_unlock) with - [ LocInfoE loc_79 (AnnotExpr 1%nat LockA (LocInfoE loc_79 (&(LocInfoE loc_80 ((LocInfoE loc_81 (!{LPtr} (LocInfoE loc_82 ("p")))) at{struct_mpool} "lock"))))) ] ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [mpool_init]. *) - Definition impl_mpool_init (sl_init : loc): function := {| - f_args := [ - ("p", LPtr); - ("entry_size", it_layout size_t) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_117 ; - LocInfoE loc_142 ((LocInfoE loc_143 (!{LPtr} (LocInfoE loc_144 ("p")))) at{struct_mpool} "entry_size") <-{ it_layout size_t } - LocInfoE loc_145 (use{it_layout size_t} (LocInfoE loc_146 ("entry_size"))) ; - locinfo: loc_118 ; - LocInfoE loc_137 ((LocInfoE loc_138 ((LocInfoE loc_139 (!{LPtr} (LocInfoE loc_140 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list") <-{ LPtr } - LocInfoE loc_141 (NULL) ; - locinfo: loc_119 ; - LocInfoE loc_132 ((LocInfoE loc_133 ((LocInfoE loc_134 (!{LPtr} (LocInfoE loc_135 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list") <-{ LPtr } - LocInfoE loc_136 (NULL) ; - locinfo: loc_120 ; - LocInfoE loc_128 ((LocInfoE loc_129 (!{LPtr} (LocInfoE loc_130 ("p")))) at{struct_mpool} "fallback") <-{ LPtr } - LocInfoE loc_131 (NULL) ; - locinfo: loc_121 ; - "_" <- LocInfoE loc_123 (sl_init) with - [ LocInfoE loc_124 (&(LocInfoE loc_125 ((LocInfoE loc_126 (!{LPtr} (LocInfoE loc_127 ("p")))) at{struct_mpool} "lock"))) ] ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [mpool_init_from]. *) - Definition impl_mpool_init_from (sl_lock sl_unlock mpool_init : loc): function := {| - f_args := [ - ("p", LPtr); - ("from", LPtr) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_149 ; - "_" <- LocInfoE loc_211 (mpool_init) with - [ LocInfoE loc_212 (use{LPtr} (LocInfoE loc_213 ("p"))) ; - LocInfoE loc_214 (use{it_layout size_t} (LocInfoE loc_215 ((LocInfoE loc_216 (!{LPtr} (LocInfoE loc_217 ("from")))) at{struct_mpool} "entry_size"))) ] ; - locinfo: loc_150 ; - "_" <- LocInfoE loc_205 (sl_lock) with - [ LocInfoE loc_206 (&(LocInfoE loc_207 ((LocInfoE loc_208 (!{LPtr} (LocInfoE loc_209 ("from")))) at{struct_mpool} "lock"))) ] ; - locinfo: loc_151 ; - annot: (UnlockA) ; - expr: (LocInfoE loc_200 (&(LocInfoE loc_201 ((LocInfoE loc_202 (!{LPtr} (LocInfoE loc_203 ("from")))) at{struct_mpool} "locked")))) ; - locinfo: loc_153 ; - LocInfoE loc_191 ((LocInfoE loc_192 ((LocInfoE loc_193 (!{LPtr} (LocInfoE loc_194 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list") <-{ LPtr } - LocInfoE loc_195 (use{LPtr} (LocInfoE loc_196 ((LocInfoE loc_197 ((LocInfoE loc_198 (!{LPtr} (LocInfoE loc_199 ("from")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list"))) ; - locinfo: loc_154 ; - LocInfoE loc_182 ((LocInfoE loc_183 ((LocInfoE loc_184 (!{LPtr} (LocInfoE loc_185 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list") <-{ LPtr } - LocInfoE loc_186 (use{LPtr} (LocInfoE loc_187 ((LocInfoE loc_188 ((LocInfoE loc_189 (!{LPtr} (LocInfoE loc_190 ("from")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list"))) ; - locinfo: loc_155 ; - LocInfoE loc_175 ((LocInfoE loc_176 (!{LPtr} (LocInfoE loc_177 ("p")))) at{struct_mpool} "fallback") <-{ LPtr } - LocInfoE loc_178 (use{LPtr} (LocInfoE loc_179 ((LocInfoE loc_180 (!{LPtr} (LocInfoE loc_181 ("from")))) at{struct_mpool} "fallback"))) ; - locinfo: loc_156 ; - LocInfoE loc_170 ((LocInfoE loc_171 ((LocInfoE loc_172 (!{LPtr} (LocInfoE loc_173 ("from")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list") <-{ LPtr } - LocInfoE loc_174 (NULL) ; - locinfo: loc_157 ; - LocInfoE loc_165 ((LocInfoE loc_166 ((LocInfoE loc_167 (!{LPtr} (LocInfoE loc_168 ("from")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list") <-{ LPtr } - LocInfoE loc_169 (NULL) ; - locinfo: loc_158 ; - "_" <- LocInfoE loc_160 (sl_unlock) with - [ LocInfoE loc_161 (AnnotExpr 1%nat LockA (LocInfoE loc_161 (&(LocInfoE loc_162 ((LocInfoE loc_163 (!{LPtr} (LocInfoE loc_164 ("from")))) at{struct_mpool} "lock"))))) ] ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [mpool_init_with_fallback]. *) - Definition impl_mpool_init_with_fallback (mpool_init : loc): function := {| - f_args := [ - ("p", LPtr); - ("fallback", LPtr) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_220 ; - "_" <- LocInfoE loc_228 (mpool_init) with - [ LocInfoE loc_229 (use{LPtr} (LocInfoE loc_230 ("p"))) ; - LocInfoE loc_231 (use{it_layout size_t} (LocInfoE loc_232 ((LocInfoE loc_233 (!{LPtr} (LocInfoE loc_234 ("fallback")))) at{struct_mpool} "entry_size"))) ] ; - locinfo: loc_221 ; - LocInfoE loc_222 ((LocInfoE loc_223 (!{LPtr} (LocInfoE loc_224 ("p")))) at{struct_mpool} "fallback") <-{ LPtr } - LocInfoE loc_225 (use{LPtr} (LocInfoE loc_226 ("fallback"))) ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [mpool_fini]. *) - Definition impl_mpool_fini (mpool_add_chunk mpool_free : loc): function := {| - f_args := [ - ("p", LPtr) - ]; - f_local_vars := [ - ("size", it_layout size_t); - ("ptr1", LPtr); - ("ptr2", LPtr); - ("entry", LPtr); - ("chunk", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_340 ; - if: LocInfoE loc_340 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_340 ((LocInfoE loc_341 (use{LPtr} (LocInfoE loc_342 ((LocInfoE loc_343 (!{LPtr} (LocInfoE loc_344 ("p")))) at{struct_mpool} "fallback")))) ={PtrOp, PtrOp} (LocInfoE loc_345 (NULL))))) - then - locinfo: loc_337 ; - Goto "#8" - else - locinfo: loc_238 ; - Goto "#9" - ]> $ - <[ "#1" := - locinfo: loc_238 ; - LocInfoE loc_330 ("entry") <-{ LPtr } - LocInfoE loc_331 (use{LPtr} (LocInfoE loc_332 ((LocInfoE loc_333 ((LocInfoE loc_334 (!{LPtr} (LocInfoE loc_335 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list"))) ; - locinfo: loc_239 ; - LocInfoE loc_324 ("chunk") <-{ LPtr } - LocInfoE loc_325 (use{LPtr} (LocInfoE loc_326 ((LocInfoE loc_327 ((LocInfoE loc_328 (!{LPtr} (LocInfoE loc_329 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list"))) ; - locinfo: loc_240 ; - Goto "#2" - ]> $ - <[ "#2" := - locinfo: loc_320 ; - if: LocInfoE loc_320 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_320 ((LocInfoE loc_321 (use{LPtr} (LocInfoE loc_322 ("entry")))) !={PtrOp, PtrOp} (LocInfoE loc_323 (NULL))))) - then - Goto "#3" - else - locinfo: loc_241 ; - Goto "#4" - ]> $ - <[ "#3" := - "ptr1" <-{ LPtr } - LocInfoE loc_316 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_316 (use{LPtr} (LocInfoE loc_317 ("entry"))))) ; - locinfo: loc_299 ; - LocInfoE loc_311 ("entry") <-{ LPtr } - LocInfoE loc_312 (use{LPtr} (LocInfoE loc_313 ((LocInfoE loc_314 (!{LPtr} (LocInfoE loc_315 ("entry")))) at{struct_mpool_entry} "next"))) ; - locinfo: loc_300 ; - "_" <- LocInfoE loc_304 (mpool_free) with - [ LocInfoE loc_305 (use{LPtr} (LocInfoE loc_306 ((LocInfoE loc_307 (!{LPtr} (LocInfoE loc_308 ("p")))) at{struct_mpool} "fallback"))) ; - LocInfoE loc_309 (use{LPtr} (LocInfoE loc_310 ("ptr1"))) ] ; - locinfo: loc_301 ; - Goto "continue9" - ]> $ - <[ "#4" := - locinfo: loc_241 ; - Goto "#5" - ]> $ - <[ "#5" := - locinfo: loc_292 ; - if: LocInfoE loc_292 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_292 ((LocInfoE loc_293 (use{LPtr} (LocInfoE loc_294 ("chunk")))) !={PtrOp, PtrOp} (LocInfoE loc_295 (NULL))))) - then - Goto "#6" - else - locinfo: loc_242 ; - Goto "#7" - ]> $ - <[ "#6" := - "ptr2" <-{ LPtr } - LocInfoE loc_288 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_288 (use{LPtr} (LocInfoE loc_289 ("chunk"))))) ; - "size" <-{ it_layout size_t } - LocInfoE loc_282 (use{it_layout size_t} (LocInfoE loc_283 ((LocInfoE loc_284 (!{LPtr} (LocInfoE loc_285 ("chunk")))) at{struct_mpool_chunk} "size"))) ; - locinfo: loc_263 ; - LocInfoE loc_277 ("chunk") <-{ LPtr } - LocInfoE loc_278 (use{LPtr} (LocInfoE loc_279 ((LocInfoE loc_280 (!{LPtr} (LocInfoE loc_281 ("chunk")))) at{struct_mpool_chunk} "next_chunk"))) ; - locinfo: loc_264 ; - "_" <- LocInfoE loc_268 (mpool_add_chunk) with - [ LocInfoE loc_269 (use{LPtr} (LocInfoE loc_270 ((LocInfoE loc_271 (!{LPtr} (LocInfoE loc_272 ("p")))) at{struct_mpool} "fallback"))) ; - LocInfoE loc_273 (use{LPtr} (LocInfoE loc_274 ("ptr2"))) ; - LocInfoE loc_275 (use{it_layout size_t} (LocInfoE loc_276 ("size"))) ] ; - locinfo: loc_265 ; - Goto "continue11" - ]> $ - <[ "#7" := - locinfo: loc_242 ; - LocInfoE loc_254 ((LocInfoE loc_255 ((LocInfoE loc_256 (!{LPtr} (LocInfoE loc_257 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list") <-{ LPtr } - LocInfoE loc_258 (NULL) ; - locinfo: loc_243 ; - LocInfoE loc_249 ((LocInfoE loc_250 ((LocInfoE loc_251 (!{LPtr} (LocInfoE loc_252 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list") <-{ LPtr } - LocInfoE loc_253 (NULL) ; - locinfo: loc_244 ; - LocInfoE loc_245 ((LocInfoE loc_246 (!{LPtr} (LocInfoE loc_247 ("p")))) at{struct_mpool} "fallback") <-{ LPtr } - LocInfoE loc_248 (NULL) ; - Return (VOID) - ]> $ - <[ "#8" := - locinfo: loc_337 ; - Return (VOID) - ]> $ - <[ "#9" := - locinfo: loc_238 ; - Goto "#1" - ]> $ - <[ "continue11" := - locinfo: loc_241 ; - Goto "#5" - ]> $ - <[ "continue9" := - locinfo: loc_240 ; - Goto "#2" - ]> $∅ - )%E - |}. - - (* Definition of function [mpool_alloc_no_fallback]. *) - Definition impl_mpool_alloc_no_fallback (sl_lock sl_unlock : loc): function := {| - f_args := [ - ("p", LPtr) - ]; - f_local_vars := [ - ("new_chunk", LPtr); - ("entry", LPtr); - ("ret", LPtr); - ("chunk", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_348 ; - "_" <- LocInfoE loc_481 (sl_lock) with - [ LocInfoE loc_482 (&(LocInfoE loc_483 ((LocInfoE loc_484 (!{LPtr} (LocInfoE loc_485 ("p")))) at{struct_mpool} "lock"))) ] ; - locinfo: loc_349 ; - annot: (UnlockA) ; - expr: (LocInfoE loc_476 (&(LocInfoE loc_477 ((LocInfoE loc_478 (!{LPtr} (LocInfoE loc_479 ("p")))) at{struct_mpool} "locked")))) ; - locinfo: loc_469 ; - if: LocInfoE loc_469 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_469 ((LocInfoE loc_470 (use{LPtr} (LocInfoE loc_471 ((LocInfoE loc_472 ((LocInfoE loc_473 (!{LPtr} (LocInfoE loc_474 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list")))) !={PtrOp, PtrOp} (LocInfoE loc_475 (NULL))))) - then - Goto "#8" - else - locinfo: loc_352 ; - Goto "#9" - ]> $ - <[ "#1" := - locinfo: loc_352 ; - LocInfoE loc_439 ("chunk") <-{ LPtr } - LocInfoE loc_440 (use{LPtr} (LocInfoE loc_441 ((LocInfoE loc_442 ((LocInfoE loc_443 (!{LPtr} (LocInfoE loc_444 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list"))) ; - locinfo: loc_435 ; - if: LocInfoE loc_435 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_435 ((LocInfoE loc_436 (use{LPtr} (LocInfoE loc_437 ("chunk")))) ={PtrOp, PtrOp} (LocInfoE loc_438 (NULL))))) - then - locinfo: loc_430 ; - Goto "#6" - else - locinfo: loc_420 ; - Goto "#7" - ]> $ - <[ "#2" := - locinfo: loc_420 ; - if: LocInfoE loc_420 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_420 ((LocInfoE loc_421 (use{it_layout size_t} (LocInfoE loc_422 ((LocInfoE loc_423 (!{LPtr} (LocInfoE loc_424 ("p")))) at{struct_mpool} "entry_size")))) ≥{IntOp size_t, IntOp size_t} (LocInfoE loc_425 (use{it_layout size_t} (LocInfoE loc_426 ((LocInfoE loc_427 (!{LPtr} (LocInfoE loc_428 ("chunk")))) at{struct_mpool_chunk} "size"))))))) - then - locinfo: loc_371 ; - Goto "#4" - else - locinfo: loc_381 ; - Goto "#5" - ]> $ - <[ "#3" := - locinfo: loc_355 ; - LocInfoE loc_367 ("ret") <-{ LPtr } - LocInfoE loc_368 (use{LPtr} (LocInfoE loc_369 ("chunk"))) ; - locinfo: loc_356 ; - Goto "exit" - ]> $ - <[ "#4" := - locinfo: loc_371 ; - LocInfoE loc_372 ((LocInfoE loc_373 ((LocInfoE loc_374 (!{LPtr} (LocInfoE loc_375 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list") <-{ LPtr } - LocInfoE loc_376 (use{LPtr} (LocInfoE loc_377 ((LocInfoE loc_378 (!{LPtr} (LocInfoE loc_379 ("chunk")))) at{struct_mpool_chunk} "next_chunk"))) ; - locinfo: loc_355 ; - Goto "#3" - ]> $ - <[ "#5" := - locinfo: loc_381 ; - LocInfoE loc_410 ("new_chunk") <-{ LPtr } - LocInfoE loc_411 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_412 ((LocInfoE loc_413 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_414 (use{LPtr} (LocInfoE loc_415 ("chunk")))))) at_offset{it_layout u8, PtrOp, IntOp size_t} (LocInfoE loc_416 (use{it_layout size_t} (LocInfoE loc_417 ((LocInfoE loc_418 (!{LPtr} (LocInfoE loc_419 ("p")))) at{struct_mpool} "entry_size"))))))) ; - locinfo: loc_382 ; - LocInfoE loc_403 ((LocInfoE loc_404 (!{LPtr} (LocInfoE loc_405 ("new_chunk")))) at{struct_mpool_chunk} "next_chunk") <-{ LPtr } - LocInfoE loc_406 (use{LPtr} (LocInfoE loc_407 ((LocInfoE loc_408 (!{LPtr} (LocInfoE loc_409 ("chunk")))) at{struct_mpool_chunk} "next_chunk"))) ; - locinfo: loc_383 ; - LocInfoE loc_391 ((LocInfoE loc_392 (!{LPtr} (LocInfoE loc_393 ("new_chunk")))) at{struct_mpool_chunk} "size") <-{ it_layout size_t } - LocInfoE loc_394 ((LocInfoE loc_395 (use{it_layout size_t} (LocInfoE loc_396 ((LocInfoE loc_397 (!{LPtr} (LocInfoE loc_398 ("chunk")))) at{struct_mpool_chunk} "size")))) -{IntOp size_t, IntOp size_t} (LocInfoE loc_399 (use{it_layout size_t} (LocInfoE loc_400 ((LocInfoE loc_401 (!{LPtr} (LocInfoE loc_402 ("p")))) at{struct_mpool} "entry_size"))))) ; - locinfo: loc_384 ; - LocInfoE loc_385 ((LocInfoE loc_386 ((LocInfoE loc_387 (!{LPtr} (LocInfoE loc_388 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list") <-{ LPtr } - LocInfoE loc_389 (use{LPtr} (LocInfoE loc_390 ("new_chunk"))) ; - locinfo: loc_355 ; - Goto "#3" - ]> $ - <[ "#6" := - locinfo: loc_430 ; - LocInfoE loc_432 ("ret") <-{ LPtr } LocInfoE loc_433 (NULL) ; - locinfo: loc_431 ; - Goto "exit" - ]> $ - <[ "#7" := - locinfo: loc_420 ; - Goto "#2" - ]> $ - <[ "#8" := - "entry" <-{ LPtr } - LocInfoE loc_461 (use{LPtr} (LocInfoE loc_462 ((LocInfoE loc_463 ((LocInfoE loc_464 (!{LPtr} (LocInfoE loc_465 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list"))) ; - locinfo: loc_447 ; - LocInfoE loc_453 ((LocInfoE loc_454 ((LocInfoE loc_455 (!{LPtr} (LocInfoE loc_456 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "entry_list") <-{ LPtr } - LocInfoE loc_457 (use{LPtr} (LocInfoE loc_458 ((LocInfoE loc_459 (!{LPtr} (LocInfoE loc_460 ("entry")))) at{struct_mpool_entry} "next"))) ; - locinfo: loc_448 ; - LocInfoE loc_450 ("ret") <-{ LPtr } - LocInfoE loc_451 (use{LPtr} (LocInfoE loc_452 ("entry"))) ; - locinfo: loc_449 ; - Goto "exit" - ]> $ - <[ "#9" := - locinfo: loc_352 ; - Goto "#1" - ]> $ - <[ "exit" := - locinfo: loc_357 ; - "_" <- LocInfoE loc_362 (sl_unlock) with - [ LocInfoE loc_363 (AnnotExpr 1%nat LockA (LocInfoE loc_363 (&(LocInfoE loc_364 ((LocInfoE loc_365 (!{LPtr} (LocInfoE loc_366 ("p")))) at{struct_mpool} "lock"))))) ] ; - locinfo: loc_358 ; - Return (LocInfoE loc_359 (use{LPtr} (LocInfoE loc_360 ("ret")))) - ]> $∅ - )%E - |}. - - (* Definition of function [mpool_alloc]. *) - Definition impl_mpool_alloc (mpool_alloc_no_fallback : loc): function := {| - f_args := [ - ("p", LPtr) - ]; - f_local_vars := [ - ("ret", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_539 ; - "$1" <- LocInfoE loc_541 (mpool_alloc_no_fallback) with - [ LocInfoE loc_542 (use{LPtr} (LocInfoE loc_543 ("p"))) ] ; - "ret" <-{ LPtr } LocInfoE loc_539 ("$1") ; - locinfo: loc_535 ; - if: LocInfoE loc_535 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_535 ((LocInfoE loc_536 (use{LPtr} (LocInfoE loc_537 ("ret")))) !={PtrOp, PtrOp} (LocInfoE loc_538 (NULL))))) - then - locinfo: loc_531 ; - Goto "#8" - else - locinfo: loc_490 ; - Goto "#9" - ]> $ - <[ "#1" := - locinfo: loc_490 ; - LocInfoE loc_525 ("p") <-{ LPtr } - LocInfoE loc_526 (use{LPtr} (LocInfoE loc_527 ((LocInfoE loc_528 (!{LPtr} (LocInfoE loc_529 ("p")))) at{struct_mpool} "fallback"))) ; - locinfo: loc_491 ; - Goto "#2" - ]> $ - <[ "#2" := - locinfo: loc_521 ; - if: LocInfoE loc_521 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_521 ((LocInfoE loc_522 (use{LPtr} (LocInfoE loc_523 ("p")))) !={PtrOp, PtrOp} (LocInfoE loc_524 (NULL))))) - then - locinfo: loc_516 ; - Goto "#3" - else - locinfo: loc_492 ; - Goto "#4" - ]> $ - <[ "#3" := - locinfo: loc_516 ; - "$0" <- LocInfoE loc_518 (mpool_alloc_no_fallback) with - [ LocInfoE loc_519 (use{LPtr} (LocInfoE loc_520 ("p"))) ] ; - locinfo: loc_496 ; - LocInfoE loc_515 ("ret") <-{ LPtr } LocInfoE loc_516 ("$0") ; - locinfo: loc_511 ; - if: LocInfoE loc_511 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_511 ((LocInfoE loc_512 (use{LPtr} (LocInfoE loc_513 ("ret")))) !={PtrOp, PtrOp} (LocInfoE loc_514 (NULL))))) - then - locinfo: loc_507 ; - Goto "#6" - else - locinfo: loc_498 ; - Goto "#7" - ]> $ - <[ "#4" := - locinfo: loc_492 ; - Return (LocInfoE loc_493 (NULL)) - ]> $ - <[ "#5" := - locinfo: loc_498 ; - LocInfoE loc_501 ("p") <-{ LPtr } - LocInfoE loc_502 (use{LPtr} (LocInfoE loc_503 ((LocInfoE loc_504 (!{LPtr} (LocInfoE loc_505 ("p")))) at{struct_mpool} "fallback"))) ; - locinfo: loc_499 ; - Goto "continue25" - ]> $ - <[ "#6" := - locinfo: loc_507 ; - Return (LocInfoE loc_508 (use{LPtr} (LocInfoE loc_509 ("ret")))) - ]> $ - <[ "#7" := - locinfo: loc_498 ; - Goto "#5" - ]> $ - <[ "#8" := - locinfo: loc_531 ; - Return (LocInfoE loc_532 (use{LPtr} (LocInfoE loc_533 ("ret")))) - ]> $ - <[ "#9" := - locinfo: loc_490 ; - Goto "#1" - ]> $ - <[ "continue25" := - locinfo: loc_491 ; - Goto "#2" - ]> $∅ - )%E - |}. - - (* Definition of function [mpool_alloc_contiguous_no_fallback]. *) - Definition impl_mpool_alloc_contiguous_no_fallback (sl_lock sl_unlock round_pointer_up : loc): function := {| - f_args := [ - ("p", LPtr); - ("count", it_layout size_t); - ("align", it_layout size_t) - ]; - f_local_vars := [ - ("prev", LPtr); - ("before_start", it_layout size_t); - ("chunk_next", LPtr); - ("new_chunk", LPtr); - ("start", LPtr); - ("ret", LPtr); - ("chunk_size", it_layout size_t); - ("chunk", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "ret" <-{ LPtr } LocInfoE loc_786 (NULL) ; - locinfo: loc_549 ; - LocInfoE loc_778 ("align") <-{ it_layout size_t } - LocInfoE loc_779 ((LocInfoE loc_780 (use{it_layout size_t} (LocInfoE loc_781 ("align")))) ×{IntOp size_t, IntOp size_t} (LocInfoE loc_782 (use{it_layout size_t} (LocInfoE loc_783 ((LocInfoE loc_784 (!{LPtr} (LocInfoE loc_785 ("p")))) at{struct_mpool} "entry_size"))))) ; - locinfo: loc_550 ; - "_" <- LocInfoE loc_773 (sl_lock) with - [ LocInfoE loc_774 (&(LocInfoE loc_775 ((LocInfoE loc_776 (!{LPtr} (LocInfoE loc_777 ("p")))) at{struct_mpool} "lock"))) ] ; - locinfo: loc_551 ; - annot: (UnlockA) ; - expr: (LocInfoE loc_768 (&(LocInfoE loc_769 ((LocInfoE loc_770 (!{LPtr} (LocInfoE loc_771 ("p")))) at{struct_mpool} "locked")))) ; - locinfo: loc_553 ; - LocInfoE loc_762 ("prev") <-{ LPtr } - LocInfoE loc_763 (&(LocInfoE loc_764 ((LocInfoE loc_765 ((LocInfoE loc_766 (!{LPtr} (LocInfoE loc_767 ("p")))) at{struct_mpool} "locked")) at{struct_mpool_locked_inner} "chunk_list"))) ; - locinfo: loc_554 ; - Goto "#1" - ]> $ - <[ "#1" := - locinfo: loc_756 ; - if: LocInfoE loc_756 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_756 ((LocInfoE loc_757 (use{LPtr} (LocInfoE loc_759 (!{LPtr} (LocInfoE loc_760 ("prev")))))) !={PtrOp, PtrOp} (LocInfoE loc_761 (NULL))))) - then - Goto "#2" - else - locinfo: loc_555 ; - Goto "#3" - ]> $ - <[ "#10" := - locinfo: loc_640 ; - LocInfoE loc_642 (!{LPtr} (LocInfoE loc_643 ("prev"))) <-{ LPtr } - LocInfoE loc_644 (use{LPtr} (LocInfoE loc_645 ("chunk_next"))) ; - locinfo: loc_632 ; - Goto "#6" - ]> $ - <[ "#11" := - locinfo: loc_647 ; - LocInfoE loc_677 ("new_chunk") <-{ LPtr } - LocInfoE loc_678 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_679 ((LocInfoE loc_680 (use{LPtr} (LocInfoE loc_681 ("start")))) at_offset{it_layout u8, PtrOp, IntOp size_t} (LocInfoE loc_682 ((LocInfoE loc_683 (use{it_layout size_t} (LocInfoE loc_684 ("count")))) ×{IntOp size_t, IntOp size_t} (LocInfoE loc_685 (use{it_layout size_t} (LocInfoE loc_686 ((LocInfoE loc_687 (!{LPtr} (LocInfoE loc_688 ("p")))) at{struct_mpool} "entry_size"))))))))) ; - locinfo: loc_648 ; - LocInfoE loc_661 ((LocInfoE loc_662 (!{LPtr} (LocInfoE loc_663 ("new_chunk")))) at{struct_mpool_chunk} "size") <-{ it_layout size_t } - LocInfoE loc_664 ((LocInfoE loc_665 (use{it_layout size_t} (LocInfoE loc_666 ("chunk_size")))) -{IntOp size_t, IntOp size_t} (LocInfoE loc_667 ((LocInfoE loc_668 (use{it_layout size_t} (LocInfoE loc_669 ("before_start")))) +{IntOp size_t, IntOp size_t} (LocInfoE loc_670 ((LocInfoE loc_671 (use{it_layout size_t} (LocInfoE loc_672 ("count")))) ×{IntOp size_t, IntOp size_t} (LocInfoE loc_673 (use{it_layout size_t} (LocInfoE loc_674 ((LocInfoE loc_675 (!{LPtr} (LocInfoE loc_676 ("p")))) at{struct_mpool} "entry_size"))))))))) ; - locinfo: loc_649 ; - LocInfoE loc_656 ((LocInfoE loc_657 (!{LPtr} (LocInfoE loc_658 ("new_chunk")))) at{struct_mpool_chunk} "next_chunk") <-{ LPtr } - LocInfoE loc_659 (use{LPtr} (LocInfoE loc_660 ("chunk_next"))) ; - locinfo: loc_650 ; - LocInfoE loc_652 (!{LPtr} (LocInfoE loc_653 ("prev"))) <-{ LPtr } - LocInfoE loc_654 (use{LPtr} (LocInfoE loc_655 ("new_chunk"))) ; - locinfo: loc_632 ; - Goto "#6" - ]> $ - <[ "#12" := - locinfo: loc_576 ; - Goto "#4" - ]> $ - <[ "#2" := - "chunk" <-{ LPtr } - LocInfoE loc_750 (use{LPtr} (LocInfoE loc_752 (!{LPtr} (LocInfoE loc_753 ("prev"))))) ; - locinfo: loc_574 ; - "_" <- LocInfoE loc_742 (round_pointer_up) with - [ LocInfoE loc_743 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_744 (use{LPtr} (LocInfoE loc_745 ("chunk"))))) ; - LocInfoE loc_746 (use{it_layout size_t} (LocInfoE loc_747 ("align"))) ; - LocInfoE loc_748 (&(LocInfoE loc_749 ("before_start"))) ] ; - locinfo: loc_726 ; - if: LocInfoE loc_726 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_726 ((LocInfoE loc_727 ((LocInfoE loc_728 (use{it_layout size_t} (LocInfoE loc_729 ("before_start")))) +{IntOp size_t, IntOp size_t} (LocInfoE loc_730 ((LocInfoE loc_731 (use{it_layout size_t} (LocInfoE loc_732 ("count")))) ×{IntOp size_t, IntOp size_t} (LocInfoE loc_733 (use{it_layout size_t} (LocInfoE loc_734 ((LocInfoE loc_735 (!{LPtr} (LocInfoE loc_736 ("p")))) at{struct_mpool} "entry_size")))))))) ≤{IntOp size_t, IntOp size_t} (LocInfoE loc_737 (use{it_layout size_t} (LocInfoE loc_738 ((LocInfoE loc_739 (!{LPtr} (LocInfoE loc_740 ("chunk")))) at{struct_mpool_chunk} "size"))))))) - then - Goto "#5" - else - locinfo: loc_576 ; - Goto "#12" - ]> $ - <[ "#3" := - locinfo: loc_555 ; - expr: (LocInfoE loc_567 (&(LocInfoE loc_569 (!{LPtr} (LocInfoE loc_570 ("prev")))))) ; - locinfo: loc_557 ; - "_" <- LocInfoE loc_562 (sl_unlock) with - [ LocInfoE loc_563 (AnnotExpr 1%nat LockA (LocInfoE loc_563 (&(LocInfoE loc_564 ((LocInfoE loc_565 (!{LPtr} (LocInfoE loc_566 ("p")))) at{struct_mpool} "lock"))))) ] ; - locinfo: loc_558 ; - Return (LocInfoE loc_559 (use{LPtr} (LocInfoE loc_560 ("ret")))) - ]> $ - <[ "#4" := - locinfo: loc_576 ; - LocInfoE loc_579 ("prev") <-{ LPtr } - LocInfoE loc_580 (&(LocInfoE loc_581 ((LocInfoE loc_582 (!{LPtr} (LocInfoE loc_583 ("chunk")))) at{struct_mpool_chunk} "next_chunk"))) ; - locinfo: loc_577 ; - Goto "continue32" - ]> $ - <[ "#5" := - "chunk_size" <-{ it_layout size_t } - LocInfoE loc_719 (use{it_layout size_t} (LocInfoE loc_720 ((LocInfoE loc_721 (!{LPtr} (LocInfoE loc_722 ("chunk")))) at{struct_mpool_chunk} "size"))) ; - "chunk_next" <-{ LPtr } - LocInfoE loc_713 (use{LPtr} (LocInfoE loc_714 ((LocInfoE loc_715 (!{LPtr} (LocInfoE loc_716 ("chunk")))) at{struct_mpool_chunk} "next_chunk"))) ; - locinfo: loc_587 ; - annot: (ToUninit) ; - expr: (LocInfoE loc_709 (&(LocInfoE loc_711 (!{LPtr} (LocInfoE loc_712 ("chunk")))))) ; - locinfo: loc_589 ; - LocInfoE loc_702 ("start") <-{ LPtr } - LocInfoE loc_703 ((LocInfoE loc_704 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_705 (use{LPtr} (LocInfoE loc_706 ("chunk")))))) at_offset{it_layout u8, PtrOp, IntOp size_t} (LocInfoE loc_707 (use{it_layout size_t} (LocInfoE loc_708 ("before_start"))))) ; - locinfo: loc_689 ; - if: LocInfoE loc_689 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_689 ((LocInfoE loc_690 ((LocInfoE loc_691 (use{it_layout size_t} (LocInfoE loc_692 ("before_start")))) +{IntOp size_t, IntOp size_t} (LocInfoE loc_693 ((LocInfoE loc_694 (use{it_layout size_t} (LocInfoE loc_695 ("count")))) ×{IntOp size_t, IntOp size_t} (LocInfoE loc_696 (use{it_layout size_t} (LocInfoE loc_697 ((LocInfoE loc_698 (!{LPtr} (LocInfoE loc_699 ("p")))) at{struct_mpool} "entry_size")))))))) ={IntOp size_t, IntOp size_t} (LocInfoE loc_700 (use{it_layout size_t} (LocInfoE loc_701 ("chunk_size"))))))) - then - locinfo: loc_640 ; - Goto "#10" - else - locinfo: loc_647 ; - Goto "#11" - ]> $ - <[ "#6" := - locinfo: loc_632 ; - if: LocInfoE loc_632 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_632 ((LocInfoE loc_633 (use{it_layout size_t} (LocInfoE loc_634 ("before_start")))) ≥{IntOp size_t, IntOp size_t} (LocInfoE loc_635 (use{it_layout size_t} (LocInfoE loc_636 ((LocInfoE loc_637 (!{LPtr} (LocInfoE loc_638 ("p")))) at{struct_mpool} "entry_size"))))))) - then - locinfo: loc_611 ; - Goto "#8" - else - locinfo: loc_592 ; - Goto "#9" - ]> $ - <[ "#7" := - locinfo: loc_592 ; - expr: (LocInfoE loc_606 (&(LocInfoE loc_608 (!{LPtr} (LocInfoE loc_609 ("chunk")))))) ; - locinfo: loc_594 ; - annot: (UninitStrengthenAlign) ; - expr: (LocInfoE loc_602 (&(LocInfoE loc_604 (!{LPtr} (LocInfoE loc_605 ("start")))))) ; - locinfo: loc_596 ; - LocInfoE loc_598 ("ret") <-{ LPtr } - LocInfoE loc_599 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_600 (use{LPtr} (LocInfoE loc_601 ("start"))))) ; - locinfo: loc_555 ; - Goto "#3" - ]> $ - <[ "#8" := - locinfo: loc_611 ; - LocInfoE loc_624 ((LocInfoE loc_625 (!{LPtr} (LocInfoE loc_626 ("chunk")))) at{struct_mpool_chunk} "next_chunk") <-{ LPtr } - LocInfoE loc_627 (use{LPtr} (LocInfoE loc_629 (!{LPtr} (LocInfoE loc_630 ("prev"))))) ; - locinfo: loc_612 ; - LocInfoE loc_620 (!{LPtr} (LocInfoE loc_621 ("prev"))) <-{ LPtr } - LocInfoE loc_622 (use{LPtr} (LocInfoE loc_623 ("chunk"))) ; - locinfo: loc_613 ; - LocInfoE loc_614 ((LocInfoE loc_615 (!{LPtr} (LocInfoE loc_616 ("chunk")))) at{struct_mpool_chunk} "size") <-{ it_layout size_t } - LocInfoE loc_617 (use{it_layout size_t} (LocInfoE loc_618 ("before_start"))) ; - locinfo: loc_592 ; - Goto "#7" - ]> $ - <[ "#9" := - locinfo: loc_592 ; - Goto "#7" - ]> $ - <[ "continue32" := - locinfo: loc_554 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [mpool_alloc_contiguous]. *) - Definition impl_mpool_alloc_contiguous (mpool_alloc_contiguous_no_fallback : loc): function := {| - f_args := [ - ("p", LPtr); - ("count", it_layout size_t); - ("align", it_layout size_t) - ]; - f_local_vars := [ - ("ret", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_846 ; - "$1" <- LocInfoE loc_848 (mpool_alloc_contiguous_no_fallback) with - [ LocInfoE loc_849 (use{LPtr} (LocInfoE loc_850 ("p"))) ; - LocInfoE loc_851 (use{it_layout size_t} (LocInfoE loc_852 ("count"))) ; - LocInfoE loc_853 (use{it_layout size_t} (LocInfoE loc_854 ("align"))) ] ; - "ret" <-{ LPtr } LocInfoE loc_846 ("$1") ; - locinfo: loc_842 ; - if: LocInfoE loc_842 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_842 ((LocInfoE loc_843 (use{LPtr} (LocInfoE loc_844 ("ret")))) !={PtrOp, PtrOp} (LocInfoE loc_845 (NULL))))) - then - locinfo: loc_838 ; - Goto "#8" - else - locinfo: loc_793 ; - Goto "#9" - ]> $ - <[ "#1" := - locinfo: loc_793 ; - LocInfoE loc_832 ("p") <-{ LPtr } - LocInfoE loc_833 (use{LPtr} (LocInfoE loc_834 ((LocInfoE loc_835 (!{LPtr} (LocInfoE loc_836 ("p")))) at{struct_mpool} "fallback"))) ; - locinfo: loc_794 ; - Goto "#2" - ]> $ - <[ "#2" := - locinfo: loc_828 ; - if: LocInfoE loc_828 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_828 ((LocInfoE loc_829 (use{LPtr} (LocInfoE loc_830 ("p")))) !={PtrOp, PtrOp} (LocInfoE loc_831 (NULL))))) - then - locinfo: loc_819 ; - Goto "#3" - else - locinfo: loc_795 ; - Goto "#4" - ]> $ - <[ "#3" := - locinfo: loc_819 ; - "$0" <- LocInfoE loc_821 (mpool_alloc_contiguous_no_fallback) with - [ LocInfoE loc_822 (use{LPtr} (LocInfoE loc_823 ("p"))) ; - LocInfoE loc_824 (use{it_layout size_t} (LocInfoE loc_825 ("count"))) ; - LocInfoE loc_826 (use{it_layout size_t} (LocInfoE loc_827 ("align"))) ] ; - locinfo: loc_799 ; - LocInfoE loc_818 ("ret") <-{ LPtr } LocInfoE loc_819 ("$0") ; - locinfo: loc_814 ; - if: LocInfoE loc_814 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_814 ((LocInfoE loc_815 (use{LPtr} (LocInfoE loc_816 ("ret")))) !={PtrOp, PtrOp} (LocInfoE loc_817 (NULL))))) - then - locinfo: loc_810 ; - Goto "#6" - else - locinfo: loc_801 ; - Goto "#7" - ]> $ - <[ "#4" := - locinfo: loc_795 ; - Return (LocInfoE loc_796 (NULL)) - ]> $ - <[ "#5" := - locinfo: loc_801 ; - LocInfoE loc_804 ("p") <-{ LPtr } - LocInfoE loc_805 (use{LPtr} (LocInfoE loc_806 ((LocInfoE loc_807 (!{LPtr} (LocInfoE loc_808 ("p")))) at{struct_mpool} "fallback"))) ; - locinfo: loc_802 ; - Goto "continue41" - ]> $ - <[ "#6" := - locinfo: loc_810 ; - Return (LocInfoE loc_811 (use{LPtr} (LocInfoE loc_812 ("ret")))) - ]> $ - <[ "#7" := - locinfo: loc_801 ; - Goto "#5" - ]> $ - <[ "#8" := - locinfo: loc_838 ; - Return (LocInfoE loc_839 (use{LPtr} (LocInfoE loc_840 ("ret")))) - ]> $ - <[ "#9" := - locinfo: loc_793 ; - Goto "#1" - ]> $ - <[ "continue41" := - locinfo: loc_794 ; - Goto "#2" - ]> $∅ - )%E - |}. -End code. diff --git a/theories/examples/mpool_simpl/mpool_simpl.c.generate b/theories/examples/mpool_simpl/mpool_simpl.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/mutable_map/mutable_map.c.generate b/theories/examples/mutable_map/mutable_map.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/queue/queue.c.generate b/theories/examples/queue/queue.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/reverse/reverse.c.generate b/theories/examples/reverse/reverse.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/simple_union/simple_union.c.generate b/theories/examples/simple_union/simple_union.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/spinlock/spinlock.c.generate b/theories/examples/spinlock/spinlock.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/tutorial/misc.c.generate b/theories/examples/tutorial/misc.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/tutorial/misc_code.v b/theories/examples/tutorial/misc_code.v deleted file mode 100644 index f00e3ab257f4db130bf013aeb4441bd4f2e02bec..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/misc_code.v +++ /dev/null @@ -1,391 +0,0 @@ -From refinedc.lang Require Export notation. -From refinedc.lang Require Import tactics. -From refinedc.typing Require Import annotations. -From refinedc.examples.spinlock Require Import spinlock_annot. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/misc.c]. *) -Section code. - Definition file_0 : string := "theories/examples/tutorial/misc.c". - Definition loc_2 : location_info := LocationInfo file_0 17 2 19 3. - Definition loc_3 : location_info := LocationInfo file_0 20 2 20 17. - Definition loc_4 : location_info := LocationInfo file_0 21 2 21 28. - Definition loc_5 : location_info := LocationInfo file_0 21 9 21 27. - Definition loc_6 : location_info := LocationInfo file_0 21 9 21 18. - Definition loc_7 : location_info := LocationInfo file_0 21 9 21 18. - Definition loc_8 : location_info := LocationInfo file_0 21 9 21 10. - Definition loc_9 : location_info := LocationInfo file_0 21 9 21 10. - Definition loc_10 : location_info := LocationInfo file_0 21 21 21 27. - Definition loc_11 : location_info := LocationInfo file_0 21 21 21 27. - Definition loc_12 : location_info := LocationInfo file_0 21 21 21 22. - Definition loc_13 : location_info := LocationInfo file_0 21 21 21 22. - Definition loc_14 : location_info := LocationInfo file_0 20 2 20 8. - Definition loc_15 : location_info := LocationInfo file_0 20 2 20 3. - Definition loc_16 : location_info := LocationInfo file_0 20 2 20 3. - Definition loc_17 : location_info := LocationInfo file_0 20 2 20 16. - Definition loc_18 : location_info := LocationInfo file_0 20 2 20 8. - Definition loc_19 : location_info := LocationInfo file_0 20 2 20 8. - Definition loc_20 : location_info := LocationInfo file_0 20 2 20 3. - Definition loc_21 : location_info := LocationInfo file_0 20 2 20 3. - Definition loc_22 : location_info := LocationInfo file_0 20 12 20 16. - Definition loc_23 : location_info := LocationInfo file_0 20 12 20 16. - Definition loc_24 : location_info := LocationInfo file_0 17 20 19 3. - Definition loc_25 : location_info := LocationInfo file_0 18 4 18 26. - Definition loc_26 : location_info := LocationInfo file_0 18 11 18 25. - Definition loc_28 : location_info := LocationInfo file_0 17 5 17 18. - Definition loc_29 : location_info := LocationInfo file_0 17 5 17 9. - Definition loc_30 : location_info := LocationInfo file_0 17 5 17 9. - Definition loc_31 : location_info := LocationInfo file_0 17 12 17 18. - Definition loc_32 : location_info := LocationInfo file_0 17 12 17 18. - Definition loc_33 : location_info := LocationInfo file_0 17 12 17 13. - Definition loc_34 : location_info := LocationInfo file_0 17 12 17 13. - Definition loc_37 : location_info := LocationInfo file_0 37 2 37 17. - Definition loc_38 : location_info := LocationInfo file_0 38 2 38 35. - Definition loc_39 : location_info := LocationInfo file_0 38 35 38 3. - Definition loc_40 : location_info := LocationInfo file_0 39 2 39 33. - Definition loc_41 : location_info := LocationInfo file_0 40 2 40 19. - Definition loc_42 : location_info := LocationInfo file_0 41 2 41 13. - Definition loc_43 : location_info := LocationInfo file_0 41 9 41 12. - Definition loc_44 : location_info := LocationInfo file_0 41 9 41 12. - Definition loc_45 : location_info := LocationInfo file_0 40 2 40 11. - Definition loc_46 : location_info := LocationInfo file_0 40 2 40 11. - Definition loc_47 : location_info := LocationInfo file_0 40 12 40 17. - Definition loc_48 : location_info := LocationInfo file_0 40 13 40 17. - Definition loc_49 : location_info := LocationInfo file_0 39 14 39 32. - Definition loc_50 : location_info := LocationInfo file_0 39 14 39 19. - Definition loc_51 : location_info := LocationInfo file_0 39 14 39 19. - Definition loc_52 : location_info := LocationInfo file_0 39 20 39 25. - Definition loc_53 : location_info := LocationInfo file_0 39 21 39 25. - Definition loc_54 : location_info := LocationInfo file_0 39 27 39 31. - Definition loc_55 : location_info := LocationInfo file_0 39 27 39 31. - Definition loc_58 : location_info := LocationInfo file_0 38 27 38 34. - Definition loc_59 : location_info := LocationInfo file_0 38 28 38 34. - Definition loc_60 : location_info := LocationInfo file_0 37 2 37 9. - Definition loc_61 : location_info := LocationInfo file_0 37 2 37 9. - Definition loc_62 : location_info := LocationInfo file_0 37 10 37 15. - Definition loc_63 : location_info := LocationInfo file_0 37 11 37 15. - Definition loc_66 : location_info := LocationInfo file_0 62 2 62 23. - Definition loc_67 : location_info := LocationInfo file_0 66 2 69 3. - Definition loc_68 : location_info := LocationInfo file_0 70 2 70 24. - Definition loc_69 : location_info := LocationInfo file_0 71 2 71 21. - Definition loc_70 : location_info := LocationInfo file_0 72 2 72 21. - Definition loc_71 : location_info := LocationInfo file_0 73 2 73 15. - Definition loc_72 : location_info := LocationInfo file_0 73 2 73 6. - Definition loc_73 : location_info := LocationInfo file_0 73 3 73 6. - Definition loc_74 : location_info := LocationInfo file_0 73 3 73 6. - Definition loc_75 : location_info := LocationInfo file_0 73 9 73 14. - Definition loc_76 : location_info := LocationInfo file_0 73 9 73 14. - Definition loc_77 : location_info := LocationInfo file_0 72 2 72 13. - Definition loc_78 : location_info := LocationInfo file_0 72 2 72 7. - Definition loc_79 : location_info := LocationInfo file_0 72 2 72 7. - Definition loc_80 : location_info := LocationInfo file_0 72 16 72 20. - Definition loc_81 : location_info := LocationInfo file_0 72 16 72 20. - Definition loc_82 : location_info := LocationInfo file_0 72 17 72 20. - Definition loc_83 : location_info := LocationInfo file_0 72 17 72 20. - Definition loc_84 : location_info := LocationInfo file_0 71 2 71 13. - Definition loc_85 : location_info := LocationInfo file_0 71 2 71 7. - Definition loc_86 : location_info := LocationInfo file_0 71 2 71 7. - Definition loc_87 : location_info := LocationInfo file_0 71 16 71 20. - Definition loc_88 : location_info := LocationInfo file_0 71 16 71 20. - Definition loc_89 : location_info := LocationInfo file_0 70 19 70 23. - Definition loc_90 : location_info := LocationInfo file_0 70 19 70 23. - Definition loc_93 : location_info := LocationInfo file_0 66 2 69 3. - Definition loc_94 : location_info := LocationInfo file_0 66 32 69 3. - Definition loc_95 : location_info := LocationInfo file_0 67 4 67 35. - Definition loc_96 : location_info := LocationInfo file_0 68 4 68 24. - Definition loc_97 : location_info := LocationInfo file_0 66 2 69 3. - Definition loc_98 : location_info := LocationInfo file_0 66 2 69 3. - Definition loc_99 : location_info := LocationInfo file_0 68 4 68 7. - Definition loc_100 : location_info := LocationInfo file_0 68 10 68 23. - Definition loc_101 : location_info := LocationInfo file_0 68 11 68 23. - Definition loc_102 : location_info := LocationInfo file_0 68 11 68 17. - Definition loc_103 : location_info := LocationInfo file_0 68 11 68 17. - Definition loc_104 : location_info := LocationInfo file_0 68 13 68 16. - Definition loc_105 : location_info := LocationInfo file_0 68 13 68 16. - Definition loc_106 : location_info := LocationInfo file_0 67 29 67 35. - Definition loc_108 : location_info := LocationInfo file_0 67 7 67 27. - Definition loc_109 : location_info := LocationInfo file_0 67 7 67 11. - Definition loc_110 : location_info := LocationInfo file_0 67 7 67 11. - Definition loc_111 : location_info := LocationInfo file_0 67 15 67 27. - Definition loc_112 : location_info := LocationInfo file_0 67 15 67 27. - Definition loc_113 : location_info := LocationInfo file_0 67 15 67 21. - Definition loc_114 : location_info := LocationInfo file_0 67 15 67 21. - Definition loc_115 : location_info := LocationInfo file_0 67 17 67 20. - Definition loc_116 : location_info := LocationInfo file_0 67 17 67 20. - Definition loc_117 : location_info := LocationInfo file_0 66 8 66 30. - Definition loc_118 : location_info := LocationInfo file_0 66 8 66 12. - Definition loc_119 : location_info := LocationInfo file_0 66 8 66 12. - Definition loc_120 : location_info := LocationInfo file_0 66 9 66 12. - Definition loc_121 : location_info := LocationInfo file_0 66 9 66 12. - Definition loc_122 : location_info := LocationInfo file_0 66 16 66 30. - Definition loc_123 : location_info := LocationInfo file_0 62 18 62 22. - Definition loc_124 : location_info := LocationInfo file_0 62 18 62 22. - Definition loc_129 : location_info := LocationInfo file_0 84 2 84 10. - Definition loc_130 : location_info := LocationInfo file_0 84 2 84 4. - Definition loc_131 : location_info := LocationInfo file_0 84 2 84 4. - Definition loc_132 : location_info := LocationInfo file_0 84 2 84 4. - Definition loc_133 : location_info := LocationInfo file_0 84 5 84 8. - Definition loc_134 : location_info := LocationInfo file_0 84 5 84 8. - Definition loc_137 : location_info := LocationInfo file_0 90 2 90 24. - Definition loc_138 : location_info := LocationInfo file_0 91 2 91 30. - Definition loc_139 : location_info := LocationInfo file_0 91 2 91 19. - Definition loc_140 : location_info := LocationInfo file_0 91 2 91 19. - Definition loc_141 : location_info := LocationInfo file_0 91 20 91 28. - Definition loc_142 : location_info := LocationInfo file_0 91 20 91 28. - Definition loc_143 : location_info := LocationInfo file_0 91 21 91 28. - Definition loc_144 : location_info := LocationInfo file_0 91 21 91 28. - Definition loc_145 : location_info := LocationInfo file_0 90 20 90 23. - Definition loc_146 : location_info := LocationInfo file_0 90 20 90 23. - Definition loc_151 : location_info := LocationInfo file_0 100 2 100 12. - Definition loc_152 : location_info := LocationInfo file_0 101 2 101 47. - Definition loc_153 : location_info := LocationInfo file_0 102 2 102 23. - Definition loc_154 : location_info := LocationInfo file_0 102 2 102 19. - Definition loc_155 : location_info := LocationInfo file_0 102 2 102 19. - Definition loc_156 : location_info := LocationInfo file_0 102 20 102 21. - Definition loc_157 : location_info := LocationInfo file_0 101 2 101 6. - Definition loc_158 : location_info := LocationInfo file_0 101 2 101 6. - Definition loc_159 : location_info := LocationInfo file_0 101 7 101 37. - Definition loc_160 : location_info := LocationInfo file_0 101 39 101 45. - Definition loc_161 : location_info := LocationInfo file_0 101 40 101 45. - Definition loc_162 : location_info := LocationInfo file_0 100 2 100 7. - Definition loc_163 : location_info := LocationInfo file_0 100 10 100 11. - - (* Definition of struct [atomic_flag]. *) - Program Definition struct_atomic_flag := {| - sl_members := [ - (Some "_Value", it_layout bool_it) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [spinlock]. *) - Program Definition struct_spinlock := {| - sl_members := [ - (Some "lock", it_layout bool_it) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [alloc_data]. *) - Program Definition struct_alloc_data := {| - sl_members := [ - (Some "len", it_layout size_t); - (Some "buffer", LPtr) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [chunk]. *) - Program Definition struct_chunk := {| - sl_members := [ - (Some "size", it_layout size_t); - (Some "next", LPtr) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of function [alloc]. *) - Definition impl_alloc : function := {| - f_args := [ - ("d", LPtr); - ("size", it_layout size_t) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_28 ; - if: LocInfoE loc_28 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_28 ((LocInfoE loc_29 (use{it_layout size_t} (LocInfoE loc_30 ("size")))) >{IntOp size_t, IntOp size_t} (LocInfoE loc_31 (use{it_layout size_t} (LocInfoE loc_32 ((LocInfoE loc_33 (!{LPtr} (LocInfoE loc_34 ("d")))) at{struct_alloc_data} "len"))))))) - then - locinfo: loc_25 ; - Goto "#2" - else - locinfo: loc_3 ; - Goto "#3" - ]> $ - <[ "#1" := - locinfo: loc_3 ; - LocInfoE loc_14 ((LocInfoE loc_15 (!{LPtr} (LocInfoE loc_16 ("d")))) at{struct_alloc_data} "len") <-{ it_layout size_t } - LocInfoE loc_17 ((LocInfoE loc_18 (use{it_layout size_t} (LocInfoE loc_19 ((LocInfoE loc_20 (!{LPtr} (LocInfoE loc_21 ("d")))) at{struct_alloc_data} "len")))) -{IntOp size_t, IntOp size_t} (LocInfoE loc_22 (use{it_layout size_t} (LocInfoE loc_23 ("size"))))) ; - locinfo: loc_4 ; - Return (LocInfoE loc_5 ((LocInfoE loc_6 (use{LPtr} (LocInfoE loc_7 ((LocInfoE loc_8 (!{LPtr} (LocInfoE loc_9 ("d")))) at{struct_alloc_data} "buffer")))) at_offset{it_layout u8, PtrOp, IntOp size_t} (LocInfoE loc_10 (use{it_layout size_t} (LocInfoE loc_11 ((LocInfoE loc_12 (!{LPtr} (LocInfoE loc_13 ("d")))) at{struct_alloc_data} "len")))))) - ]> $ - <[ "#2" := - locinfo: loc_25 ; - Return (LocInfoE loc_26 (NULL)) - ]> $ - <[ "#3" := - locinfo: loc_3 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [thread_safe_alloc]. *) - Definition impl_thread_safe_alloc (lock data sl_lock sl_unlock alloc : loc): function := {| - f_args := [ - ("size", it_layout size_t) - ]; - f_local_vars := [ - ("ret", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_37 ; - "_" <- LocInfoE loc_61 (sl_lock) with - [ LocInfoE loc_62 (&(LocInfoE loc_63 (lock))) ] ; - locinfo: loc_38 ; - annot: (UnlockA) ; - expr: (LocInfoE loc_58 (&(LocInfoE loc_59 (data)))) ; - locinfo: loc_49 ; - "$0" <- LocInfoE loc_51 (alloc) with - [ LocInfoE loc_52 (&(LocInfoE loc_53 (data))) ; - LocInfoE loc_54 (use{it_layout size_t} (LocInfoE loc_55 ("size"))) ] ; - "ret" <-{ LPtr } LocInfoE loc_49 ("$0") ; - locinfo: loc_41 ; - "_" <- LocInfoE loc_46 (sl_unlock) with - [ LocInfoE loc_47 (AnnotExpr 1%nat LockA (LocInfoE loc_47 (&(LocInfoE loc_48 (lock))))) ] ; - locinfo: loc_42 ; - Return (LocInfoE loc_43 (use{LPtr} (LocInfoE loc_44 ("ret")))) - ]> $∅ - )%E - |}. - - (* Definition of function [free]. *) - Definition impl_free : function := {| - f_args := [ - ("list", LPtr); - ("data", LPtr); - ("size", it_layout size_t) - ]; - f_local_vars := [ - ("cur", LPtr); - ("entry", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "cur" <-{ LPtr } - LocInfoE loc_123 (use{LPtr} (LocInfoE loc_124 ("list"))) ; - locinfo: loc_67 ; - Goto "#1" - ]> $ - <[ "#1" := - locinfo: loc_117 ; - if: LocInfoE loc_117 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_117 ((LocInfoE loc_118 (use{LPtr} (LocInfoE loc_120 (!{LPtr} (LocInfoE loc_121 ("cur")))))) !={PtrOp, PtrOp} (LocInfoE loc_122 (NULL))))) - then - locinfo: loc_108 ; - Goto "#2" - else - Goto "#3" - ]> $ - <[ "#2" := - locinfo: loc_108 ; - if: LocInfoE loc_108 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_108 ((LocInfoE loc_109 (use{it_layout size_t} (LocInfoE loc_110 ("size")))) ≤{IntOp size_t, IntOp size_t} (LocInfoE loc_111 (use{it_layout size_t} (LocInfoE loc_112 ((LocInfoE loc_113 (!{LPtr} (LocInfoE loc_115 (!{LPtr} (LocInfoE loc_116 ("cur")))))) at{struct_chunk} "size"))))))) - then - Goto "#5" - else - locinfo: loc_96 ; - Goto "#6" - ]> $ - <[ "#3" := - "entry" <-{ LPtr } - LocInfoE loc_89 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_89 (use{LPtr} (LocInfoE loc_90 ("data"))))) ; - locinfo: loc_69 ; - LocInfoE loc_84 ((LocInfoE loc_85 (!{LPtr} (LocInfoE loc_86 ("entry")))) at{struct_chunk} "size") <-{ it_layout size_t } - LocInfoE loc_87 (use{it_layout size_t} (LocInfoE loc_88 ("size"))) ; - locinfo: loc_70 ; - LocInfoE loc_77 ((LocInfoE loc_78 (!{LPtr} (LocInfoE loc_79 ("entry")))) at{struct_chunk} "next") <-{ LPtr } - LocInfoE loc_80 (use{LPtr} (LocInfoE loc_82 (!{LPtr} (LocInfoE loc_83 ("cur"))))) ; - locinfo: loc_71 ; - LocInfoE loc_73 (!{LPtr} (LocInfoE loc_74 ("cur"))) <-{ LPtr } - LocInfoE loc_75 (use{LPtr} (LocInfoE loc_76 ("entry"))) ; - Return (VOID) - ]> $ - <[ "#4" := - locinfo: loc_96 ; - LocInfoE loc_99 ("cur") <-{ LPtr } - LocInfoE loc_100 (&(LocInfoE loc_101 ((LocInfoE loc_102 (!{LPtr} (LocInfoE loc_104 (!{LPtr} (LocInfoE loc_105 ("cur")))))) at{struct_chunk} "next"))) ; - locinfo: loc_97 ; - Goto "continue7" - ]> $ - <[ "#5" := - Goto "#3" - ]> $ - <[ "#6" := - locinfo: loc_96 ; - Goto "#4" - ]> $ - <[ "continue7" := - locinfo: loc_67 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [fork]. *) - Definition impl_fork : function := {| - f_args := [ - ("fn", LPtr); - ("arg", LPtr) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_129 ; - "_" <- LocInfoE loc_131 (use{LPtr} (LocInfoE loc_132 ("fn"))) with - [ LocInfoE loc_133 (use{LPtr} (LocInfoE loc_134 ("arg"))) ] ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [test_thread_safe_alloc_fork_fn]. *) - Definition impl_test_thread_safe_alloc_fork_fn (thread_safe_alloc : loc): function := {| - f_args := [ - ("num", LPtr) - ]; - f_local_vars := [ - ("num_int", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "num_int" <-{ LPtr } - LocInfoE loc_145 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_145 (use{LPtr} (LocInfoE loc_146 ("num"))))) ; - locinfo: loc_138 ; - "_" <- LocInfoE loc_140 (thread_safe_alloc) with - [ LocInfoE loc_141 (use{it_layout size_t} (LocInfoE loc_143 (!{LPtr} (LocInfoE loc_144 ("num_int"))))) ] ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [test_thread_safe_alloc]. *) - Definition impl_test_thread_safe_alloc (param thread_safe_alloc fork test_thread_safe_alloc_fork_fn : loc): function := {| - f_args := [ - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_151 ; - LocInfoE loc_162 (param) <-{ it_layout size_t } - LocInfoE loc_163 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_163 (i2v 5 i32))) ; - locinfo: loc_152 ; - "_" <- LocInfoE loc_158 (fork) with - [ LocInfoE loc_159 (test_thread_safe_alloc_fork_fn) ; - LocInfoE loc_160 (&(LocInfoE loc_161 (param))) ] ; - locinfo: loc_153 ; - "_" <- LocInfoE loc_155 (thread_safe_alloc) with - [ LocInfoE loc_156 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_156 (i2v 5 i32))) ] ; - Return (VOID) - ]> $∅ - )%E - |}. -End code. diff --git a/theories/examples/tutorial/misc_proof_alloc.v b/theories/examples/tutorial/misc_proof_alloc.v deleted file mode 100644 index 5cd28733c6a473c80439dbb106098c9e5ee1ebeb..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/misc_proof_alloc.v +++ /dev/null @@ -1,27 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import misc_code. -From refinedc.examples.tutorial Require Import misc_spec. -From refinedc.examples.spinlock Require Import spinlock_def. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/misc.c]. *) -Section proof_alloc. - Context `{!typeG Σ} `{!globalG Σ}. - Context `{!lockG Σ}. - - (* Typing proof for [alloc]. *) - Lemma type_alloc : - ⊢ typed_function impl_alloc type_of_alloc. - Proof. - start_function "alloc" ([[nlen nsize] p]) => arg_d arg_size. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "alloc" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "alloc". - Qed. -End proof_alloc. diff --git a/theories/examples/tutorial/misc_proof_fork.v b/theories/examples/tutorial/misc_proof_fork.v deleted file mode 100644 index 0a94acd0d965954be843bd347e99409bc557adfe..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/misc_proof_fork.v +++ /dev/null @@ -1,27 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import misc_code. -From refinedc.examples.tutorial Require Import misc_spec. -From refinedc.examples.spinlock Require Import spinlock_def. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/misc.c]. *) -Section proof_fork. - Context `{!typeG Σ} `{!globalG Σ}. - Context `{!lockG Σ}. - - (* Typing proof for [fork]. *) - Lemma type_fork : - ⊢ typed_function impl_fork type_of_fork. - Proof. - start_function "fork" ([ty P]) => arg_fn arg_arg. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "fork" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "fork". - Qed. -End proof_fork. diff --git a/theories/examples/tutorial/misc_proof_free.v b/theories/examples/tutorial/misc_proof_free.v deleted file mode 100644 index f05f43744f6a2fc13431719ceee5a41559681ca4..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/misc_proof_free.v +++ /dev/null @@ -1,39 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import misc_code. -From refinedc.examples.tutorial Require Import misc_spec. -From refinedc.examples.spinlock Require Import spinlock_def. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/misc.c]. *) -Section proof_free. - Context `{!typeG Σ} `{!globalG Σ}. - Context `{!lockG Σ}. - - (* Typing proof for [free]. *) - Lemma type_free : - ⊢ typed_function impl_free type_of_free. - Proof. - start_function "free" ([[s p] ly]) => arg_list arg_data arg_size local_cur local_entry. - split_blocks (( - <[ "#1" := - ∃ cp : loc, - ∃ cs : gmultiset layout, - arg_data â—â‚— (&own (uninit (ly))) ∗ - arg_size â—â‚— ((ly.(ly_size)) @ (int (size_t))) ∗ - local_entry â—â‚— uninit LPtr ∗ - local_cur â—â‚— (cp @ (&own (cs @ (chunks_t)))) ∗ - arg_list â—â‚— (p @ (&own (wand (cp â—â‚— ({[ly]} ⊎ cs) @ chunks_t) (({[ly]} ⊎ s) @ (chunks_t))))) - ]> $ - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "free" "#0". - - repeat liRStep; liShow. - all: print_typesystem_goal "free" "#1". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: multiset_solver. - all: print_sidecondition_goal "free". - Qed. -End proof_free. diff --git a/theories/examples/tutorial/misc_proof_test_thread_safe_alloc.v b/theories/examples/tutorial/misc_proof_test_thread_safe_alloc.v deleted file mode 100644 index 6e912c6464d2dbb20973a66298abe19e73b7f26b..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/misc_proof_test_thread_safe_alloc.v +++ /dev/null @@ -1,31 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import misc_code. -From refinedc.examples.tutorial Require Import misc_spec. -From refinedc.examples.spinlock Require Import spinlock_def. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/misc.c]. *) -Section proof_test_thread_safe_alloc. - Context `{!typeG Σ} `{!globalG Σ}. - Context `{!lockG Σ}. - - (* Typing proof for [test_thread_safe_alloc]. *) - Lemma type_test_thread_safe_alloc (param thread_safe_alloc fork test_thread_safe_alloc_fork_fn : loc) : - global_locs !! "param" = Some param → - thread_safe_alloc â—áµ¥ thread_safe_alloc @ function_ptr type_of_thread_safe_alloc -∗ - fork â—áµ¥ fork @ function_ptr type_of_fork -∗ - test_thread_safe_alloc_fork_fn â—áµ¥ test_thread_safe_alloc_fork_fn @ function_ptr type_of_test_thread_safe_alloc_fork_fn -∗ - typed_function (impl_test_thread_safe_alloc param thread_safe_alloc fork test_thread_safe_alloc_fork_fn) type_of_test_thread_safe_alloc. - Proof. - start_function "test_thread_safe_alloc" (lid). - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "test_thread_safe_alloc" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "test_thread_safe_alloc". - Qed. -End proof_test_thread_safe_alloc. diff --git a/theories/examples/tutorial/misc_proof_test_thread_safe_alloc_fork_fn.v b/theories/examples/tutorial/misc_proof_test_thread_safe_alloc_fork_fn.v deleted file mode 100644 index 944476f8d88caca1c9bb3ac2763503af3ca4a81e..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/misc_proof_test_thread_safe_alloc_fork_fn.v +++ /dev/null @@ -1,28 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import misc_code. -From refinedc.examples.tutorial Require Import misc_spec. -From refinedc.examples.spinlock Require Import spinlock_def. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/misc.c]. *) -Section proof_test_thread_safe_alloc_fork_fn. - Context `{!typeG Σ} `{!globalG Σ}. - Context `{!lockG Σ}. - - (* Typing proof for [test_thread_safe_alloc_fork_fn]. *) - Lemma type_test_thread_safe_alloc_fork_fn (thread_safe_alloc : loc) : - thread_safe_alloc â—áµ¥ thread_safe_alloc @ function_ptr type_of_thread_safe_alloc -∗ - typed_function (impl_test_thread_safe_alloc_fork_fn thread_safe_alloc) type_of_test_thread_safe_alloc_fork_fn. - Proof. - start_function "test_thread_safe_alloc_fork_fn" ([]) => arg_num local_num_int. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "test_thread_safe_alloc_fork_fn" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "test_thread_safe_alloc_fork_fn". - Qed. -End proof_test_thread_safe_alloc_fork_fn. diff --git a/theories/examples/tutorial/misc_proof_thread_safe_alloc.v b/theories/examples/tutorial/misc_proof_thread_safe_alloc.v deleted file mode 100644 index 43b64a1014a45adc3122683ff13c086199a63984..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/misc_proof_thread_safe_alloc.v +++ /dev/null @@ -1,34 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import misc_code. -From refinedc.examples.tutorial Require Import misc_spec. -From refinedc.examples.spinlock Require Import spinlock_def. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/misc.c]. *) -Section proof_thread_safe_alloc. - Context `{!typeG Σ} `{!globalG Σ}. - Context `{!lockG Σ}. - - (* Typing proof for [thread_safe_alloc]. *) - Lemma type_thread_safe_alloc (lock data sl_lock sl_unlock alloc : loc) : - global_locs !! "lock" = Some lock → - global_locs !! "data" = Some data → - global_initialized_types !! "lock" = Some (GT lock_id (λ 'lid, (spinlock (lid)) : type)) → - global_initialized_types !! "data" = Some (GT lock_id (λ 'lid, (spinlocked (lid) ("data") (alloc_data)) : type)) → - sl_lock â—áµ¥ sl_lock @ function_ptr type_of_sl_lock -∗ - sl_unlock â—áµ¥ sl_unlock @ function_ptr type_of_sl_unlock -∗ - alloc â—áµ¥ alloc @ function_ptr type_of_alloc -∗ - typed_function (impl_thread_safe_alloc lock data sl_lock sl_unlock alloc) type_of_thread_safe_alloc. - Proof. - start_function "thread_safe_alloc" ([lid nsize]) => arg_size local_ret. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "thread_safe_alloc" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "thread_safe_alloc". - Qed. -End proof_thread_safe_alloc. diff --git a/theories/examples/tutorial/misc_spec.v b/theories/examples/tutorial/misc_spec.v deleted file mode 100644 index 8f6d9dfea1c350fe824759e0cf9280f09b5ba099..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/misc_spec.v +++ /dev/null @@ -1,173 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import misc_code. -From refinedc.examples.spinlock Require Import spinlock_def. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/misc.c]. *) -Section spec. - Context `{!typeG Σ} `{!globalG Σ}. - Context `{!lockG Σ}. - - (* Definition of type [alloc_data]. *) - Definition alloc_data_rec : (nat -d> typeO) → (nat -d> typeO) := (λ self nlen, - struct struct_alloc_data [@{type} - (nlen @ (int (size_t))) ; - (&own (uninit (ly_set_size u8 nlen))) - ] - )%I. - Typeclasses Opaque alloc_data_rec. - - Global Instance alloc_data_rec_ne : Contractive alloc_data_rec. - Proof. solve_type_proper. Qed. - - Definition alloc_data : rtype := {| - rty_type := nat; - rty r__ := fixp alloc_data_rec r__ - |}. - - Lemma alloc_data_unfold (nlen : nat) : - (nlen @ alloc_data)%I ≡@{type} ( - struct struct_alloc_data [@{type} - (nlen @ (int (size_t))) ; - (&own (uninit (ly_set_size u8 nlen))) - ] - )%I. - Proof. by rewrite {1}/with_refinement/=fixp_unfold. Qed. - - - Global Program Instance alloc_data_rmovable : RMovable alloc_data := - {| rmovable 'nlen := movable_eq _ _ (alloc_data_unfold nlen) |}. - Next Obligation. solve_ty_layout_eq. Qed. - - Global Instance alloc_data_simplify_hyp_place_inst l_ β_ (nlen : nat) : - SimplifyHypPlace l_ β_ (nlen @ alloc_data)%I (Some 100%N) := - λ T, i2p (simplify_hyp_place_eq l_ β_ _ _ T (alloc_data_unfold _)). - Global Instance alloc_data_simplify_goal_place_inst l_ β_ (nlen : nat) : - SimplifyGoalPlace l_ β_ (nlen @ alloc_data)%I (Some 100%N) := - λ T, i2p (simplify_goal_place_eq l_ β_ _ _ T (alloc_data_unfold _)). - - Global Program Instance alloc_data_simplify_hyp_val_inst v_ (nlen : nat) : - SimplifyHypVal v_ (nlen @ alloc_data)%I (Some 100%N) := - λ T, i2p (simplify_hyp_val_eq v_ _ _ (alloc_data_unfold _) T _). - Next Obligation. done. Qed. - Global Program Instance alloc_data_simplify_goal_val_inst v_ (nlen : nat) : - SimplifyGoalVal v_ (nlen @ alloc_data)%I (Some 100%N) := - λ T, i2p (simplify_goal_val_eq v_ _ _ (alloc_data_unfold _) T _). - Next Obligation. done. Qed. - - (* Definition of type [chunks_t]. *) - Definition chunks_t_rec : ((gmultiset layout) -d> typeO) → ((gmultiset layout) -d> typeO) := (λ self s, - ((s ≠∅) @ (optional (&own ( - tyexists (λ ly : layout, - tyexists (λ tail : gmultiset layout, - constrained (padded (struct struct_chunk [@{type} - ((ly.(ly_size)) @ (int (size_t))) ; - (guarded ("chunks_t_0") (apply_dfun self (tail))) - ]) struct_chunk ly) ( - ⌜s = {[ly]} ⊎ tail⌠∗ - ⌜∀ k, k ∈ tail → ly.(ly_size) ≤ k.(ly_size)⌠- ))) - )) (null))) - )%I. - Typeclasses Opaque chunks_t_rec. - - Global Instance chunks_t_rec_ne : Contractive chunks_t_rec. - Proof. solve_type_proper. Qed. - - Definition chunks_t : rtype := {| - rty_type := (gmultiset layout); - rty r__ := fixp chunks_t_rec r__ - |}. - - Lemma chunks_t_unfold (s : gmultiset layout) : - (s @ chunks_t)%I ≡@{type} ( - ((s ≠∅) @ (optional (&own ( - tyexists (λ ly : layout, - tyexists (λ tail : gmultiset layout, - constrained (padded (struct struct_chunk [@{type} - ((ly.(ly_size)) @ (int (size_t))) ; - (guarded "chunks_t_0" (tail @ chunks_t)) - ]) struct_chunk ly) ( - ⌜s = {[ly]} ⊎ tail⌠∗ - ⌜∀ k, k ∈ tail → ly.(ly_size) ≤ k.(ly_size)⌠- ))) - )) (null))) - )%I. - Proof. by rewrite {1}/with_refinement/=fixp_unfold. Qed. - - - Global Program Instance chunks_t_rmovable : RMovable chunks_t := - {| rmovable 's := movable_eq _ _ (chunks_t_unfold s) |}. - Next Obligation. solve_ty_layout_eq. Qed. - - Global Instance chunks_t_simplify_hyp_place_inst l_ β_ (s : gmultiset layout) : - SimplifyHypPlace l_ β_ (s @ chunks_t)%I (Some 100%N) := - λ T, i2p (simplify_hyp_place_eq l_ β_ _ _ T (chunks_t_unfold _)). - Global Instance chunks_t_simplify_goal_place_inst l_ β_ (s : gmultiset layout) : - SimplifyGoalPlace l_ β_ (s @ chunks_t)%I (Some 100%N) := - λ T, i2p (simplify_goal_place_eq l_ β_ _ _ T (chunks_t_unfold _)). - - Global Program Instance chunks_t_simplify_hyp_val_inst v_ (s : gmultiset layout) : - SimplifyHypVal v_ (s @ chunks_t)%I (Some 100%N) := - λ T, i2p (simplify_hyp_val_eq v_ _ _ (chunks_t_unfold _) T _). - Next Obligation. done. Qed. - Global Program Instance chunks_t_simplify_goal_val_inst v_ (s : gmultiset layout) : - SimplifyGoalVal v_ (s @ chunks_t)%I (Some 100%N) := - λ T, i2p (simplify_goal_val_eq v_ _ _ (chunks_t_unfold _) T _). - Next Obligation. done. Qed. - - (* Type definitions. *) - - (* Function [atomic_thread_fence] has been skipped. *) - - (* Function [atomic_signal_fence] has been skipped. *) - - (* Specifications for function [sl_init]. *) - Definition type_of_sl_init := - fn(∀ p : loc; (p @ (&own (uninit (struct_spinlock)))); True) - → ∃ gamma : lock_id, (void); (p â—â‚— (spinlock (gamma))). - - (* Specifications for function [sl_lock]. *) - Definition type_of_sl_lock := - fn(∀ (p, gamma, beta) : loc * lock_id * own_state; (p @ (&frac{beta} (spinlock (gamma)))); True) - → ∃ () : (), (void); (p â—â‚—{beta} (spinlock (gamma))) ∗ (spinlock_token gamma []). - - (* Specifications for function [sl_unlock]. *) - Definition type_of_sl_unlock := - fn(∀ (p, gamma, beta) : loc * lock_id * own_state; (p @ (&frac{beta} (spinlock (gamma)))); (spinlock_token gamma [])) - → ∃ () : (), (void); (p â—â‚—{beta} (spinlock (gamma))). - - (* Specifications for function [alloc]. *) - Definition type_of_alloc := - fn(∀ (nlen, nsize, p) : nat * nat * loc; (p @ (&own (nlen @ (alloc_data)))), (nsize @ (int (size_t))); True) - → ∃ () : (), ((nsize <= nlen) @ (optional (&own (uninit (ly_set_size u8 nsize))) (null))); (p â—â‚— ((if bool_decide(nsize <= nlen) then (nlen - nsize)%nat else nlen) @ (alloc_data))). - - (* Specifications for function [thread_safe_alloc]. *) - Definition type_of_thread_safe_alloc := - fn(∀ (lid, nsize) : lock_id * nat; (nsize @ (int (size_t))); (initialized "lock" lid) ∗ (initialized "data" lid)) - → ∃ () : (), (optionalO (λ _ : unit, - &own (uninit (ly_set_size u8 nsize)) ) (null)); True. - - (* Specifications for function [free]. *) - Definition type_of_free := - fn(∀ (s, p, ly) : (gmultiset layout) * loc * layout; (p @ (&own (s @ (chunks_t)))), (&own (uninit (ly))), ((ly.(ly_size)) @ (int (size_t))); ⌜layout_of struct_chunk ⊑ lyâŒ) - → ∃ () : (), (void); (p â—â‚— (({[ly]} ⊎ s) @ (chunks_t))). - - (* Specifications for function [fork]. *) - Definition type_of_fork := - fn(∀ (ty, P) : type * (iProp Σ); (function_ptr (fn(∀ () : (); &own ty; P) → ∃ () : (), void; True)), (&own (ty)); (P)) - → ∃ () : (), (void); True. - - (* Specifications for function [test_thread_safe_alloc_fork_fn]. *) - Definition type_of_test_thread_safe_alloc_fork_fn := - fn(∀ () : (); (&own (tyexists (λ n : nat, n @ (int (size_t))))); (∃ lid : gname, initialized "lock" lid ∗ initialized "data" lid)) - → ∃ () : (), (void); True. - - (* Specifications for function [test_thread_safe_alloc]. *) - Definition type_of_test_thread_safe_alloc := - fn(∀ lid : gname; (initialized "lock" lid) ∗ (initialized "data" lid) ∗ (global_with_type "param" Own (uninit size_t))) - → ∃ () : (), (void); True. -End spec. - -Typeclasses Opaque alloc_data_rec. -Typeclasses Opaque chunks_t_rec. diff --git a/theories/examples/tutorial/solutions/quicksort_code.v b/theories/examples/tutorial/solutions/quicksort_code.v deleted file mode 100644 index c0412e97ab5373800954fccdaf584577d0d9d2fe..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/solutions/quicksort_code.v +++ /dev/null @@ -1,203 +0,0 @@ -From refinedc.lang Require Export notation. -From refinedc.lang Require Import tactics. -From refinedc.typing Require Import annotations. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/solutions/quicksort.c]. *) -Section code. - Definition file_0 : string := "theories/examples/tutorial/solutions/quicksort.c". - Definition loc_2 : location_info := LocationInfo file_0 24 2 28 3. - Definition loc_3 : location_info := LocationInfo file_0 24 27 26 3. - Definition loc_4 : location_info := LocationInfo file_0 25 4 25 11. - Definition loc_5 : location_info := LocationInfo file_0 25 4 25 6. - Definition loc_6 : location_info := LocationInfo file_0 25 5 25 6. - Definition loc_7 : location_info := LocationInfo file_0 25 5 25 6. - Definition loc_8 : location_info := LocationInfo file_0 25 9 25 10. - Definition loc_9 : location_info := LocationInfo file_0 25 9 25 10. - Definition loc_10 : location_info := LocationInfo file_0 26 9 28 3. - Definition loc_11 : location_info := LocationInfo file_0 27 4 27 27. - Definition loc_12 : location_info := LocationInfo file_0 27 4 27 10. - Definition loc_13 : location_info := LocationInfo file_0 27 4 27 10. - Definition loc_14 : location_info := LocationInfo file_0 27 11 27 22. - Definition loc_15 : location_info := LocationInfo file_0 27 12 27 22. - Definition loc_16 : location_info := LocationInfo file_0 27 12 27 16. - Definition loc_17 : location_info := LocationInfo file_0 27 12 27 16. - Definition loc_18 : location_info := LocationInfo file_0 27 14 27 15. - Definition loc_19 : location_info := LocationInfo file_0 27 14 27 15. - Definition loc_20 : location_info := LocationInfo file_0 27 24 27 25. - Definition loc_21 : location_info := LocationInfo file_0 27 24 27 25. - Definition loc_22 : location_info := LocationInfo file_0 24 5 24 25. - Definition loc_23 : location_info := LocationInfo file_0 24 5 24 7. - Definition loc_24 : location_info := LocationInfo file_0 24 5 24 7. - Definition loc_25 : location_info := LocationInfo file_0 24 6 24 7. - Definition loc_26 : location_info := LocationInfo file_0 24 6 24 7. - Definition loc_27 : location_info := LocationInfo file_0 24 11 24 25. - Definition loc_30 : location_info := LocationInfo file_0 39 2 51 3. - Definition loc_31 : location_info := LocationInfo file_0 39 27 41 3. - Definition loc_32 : location_info := LocationInfo file_0 40 4 40 26. - Definition loc_33 : location_info := LocationInfo file_0 40 11 40 25. - Definition loc_34 : location_info := LocationInfo file_0 41 9 51 3. - Definition loc_35 : location_info := LocationInfo file_0 42 4 42 48. - Definition loc_36 : location_info := LocationInfo file_0 43 4 43 21. - Definition loc_37 : location_info := LocationInfo file_0 44 4 50 5. - Definition loc_38 : location_info := LocationInfo file_0 44 27 48 5. - Definition loc_39 : location_info := LocationInfo file_0 45 6 45 22. - Definition loc_40 : location_info := LocationInfo file_0 46 6 46 24. - Definition loc_41 : location_info := LocationInfo file_0 47 6 47 18. - Definition loc_42 : location_info := LocationInfo file_0 47 13 47 17. - Definition loc_43 : location_info := LocationInfo file_0 47 13 47 17. - Definition loc_44 : location_info := LocationInfo file_0 46 6 46 16. - Definition loc_45 : location_info := LocationInfo file_0 46 6 46 10. - Definition loc_46 : location_info := LocationInfo file_0 46 6 46 10. - Definition loc_47 : location_info := LocationInfo file_0 46 19 46 23. - Definition loc_48 : location_info := LocationInfo file_0 46 19 46 23. - Definition loc_49 : location_info := LocationInfo file_0 45 6 45 8. - Definition loc_50 : location_info := LocationInfo file_0 45 7 45 8. - Definition loc_51 : location_info := LocationInfo file_0 45 7 45 8. - Definition loc_52 : location_info := LocationInfo file_0 45 11 45 21. - Definition loc_53 : location_info := LocationInfo file_0 45 11 45 21. - Definition loc_54 : location_info := LocationInfo file_0 45 11 45 15. - Definition loc_55 : location_info := LocationInfo file_0 45 11 45 15. - Definition loc_56 : location_info := LocationInfo file_0 45 13 45 14. - Definition loc_57 : location_info := LocationInfo file_0 45 13 45 14. - Definition loc_58 : location_info := LocationInfo file_0 48 11 50 5. - Definition loc_59 : location_info := LocationInfo file_0 49 6 49 18. - Definition loc_60 : location_info := LocationInfo file_0 49 13 49 17. - Definition loc_61 : location_info := LocationInfo file_0 49 13 49 17. - Definition loc_62 : location_info := LocationInfo file_0 44 7 44 25. - Definition loc_63 : location_info := LocationInfo file_0 44 7 44 16. - Definition loc_64 : location_info := LocationInfo file_0 44 7 44 16. - Definition loc_65 : location_info := LocationInfo file_0 44 7 44 11. - Definition loc_66 : location_info := LocationInfo file_0 44 7 44 11. - Definition loc_67 : location_info := LocationInfo file_0 44 9 44 10. - Definition loc_68 : location_info := LocationInfo file_0 44 9 44 10. - Definition loc_69 : location_info := LocationInfo file_0 44 20 44 25. - Definition loc_70 : location_info := LocationInfo file_0 44 20 44 25. - Definition loc_71 : location_info := LocationInfo file_0 43 18 43 20. - Definition loc_72 : location_info := LocationInfo file_0 43 18 43 20. - Definition loc_73 : location_info := LocationInfo file_0 43 19 43 20. - Definition loc_74 : location_info := LocationInfo file_0 43 19 43 20. - Definition loc_77 : location_info := LocationInfo file_0 42 18 42 47. - Definition loc_78 : location_info := LocationInfo file_0 42 18 42 27. - Definition loc_79 : location_info := LocationInfo file_0 42 18 42 27. - Definition loc_80 : location_info := LocationInfo file_0 42 28 42 39. - Definition loc_81 : location_info := LocationInfo file_0 42 29 42 39. - Definition loc_82 : location_info := LocationInfo file_0 42 29 42 33. - Definition loc_83 : location_info := LocationInfo file_0 42 29 42 33. - Definition loc_84 : location_info := LocationInfo file_0 42 31 42 32. - Definition loc_85 : location_info := LocationInfo file_0 42 31 42 32. - Definition loc_86 : location_info := LocationInfo file_0 42 41 42 46. - Definition loc_87 : location_info := LocationInfo file_0 42 41 42 46. - Definition loc_90 : location_info := LocationInfo file_0 39 5 39 25. - Definition loc_91 : location_info := LocationInfo file_0 39 5 39 7. - Definition loc_92 : location_info := LocationInfo file_0 39 5 39 7. - Definition loc_93 : location_info := LocationInfo file_0 39 6 39 7. - Definition loc_94 : location_info := LocationInfo file_0 39 6 39 7. - Definition loc_95 : location_info := LocationInfo file_0 39 11 39 25. - - (* Definition of struct [list_node]. *) - Program Definition struct_list_node := {| - sl_members := [ - (Some "val", it_layout i32); - (None, mk_layout 4%nat 0%nat); - (Some "next", LPtr) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of function [append]. *) - Definition impl_append (append : loc): function := {| - f_args := [ - ("l", LPtr); - ("k", LPtr) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_22 ; - if: LocInfoE loc_22 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_22 ((LocInfoE loc_23 (use{LPtr} (LocInfoE loc_25 (!{LPtr} (LocInfoE loc_26 ("l")))))) ={PtrOp, PtrOp} (LocInfoE loc_27 (NULL))))) - then - locinfo: loc_4 ; - Goto "#1" - else - locinfo: loc_11 ; - Goto "#2" - ]> $ - <[ "#1" := - locinfo: loc_4 ; - LocInfoE loc_6 (!{LPtr} (LocInfoE loc_7 ("l"))) <-{ LPtr } - LocInfoE loc_8 (use{LPtr} (LocInfoE loc_9 ("k"))) ; - Return (VOID) - ]> $ - <[ "#2" := - locinfo: loc_11 ; - "_" <- LocInfoE loc_13 (append) with - [ LocInfoE loc_14 (&(LocInfoE loc_15 ((LocInfoE loc_16 (!{LPtr} (LocInfoE loc_18 (!{LPtr} (LocInfoE loc_19 ("l")))))) at{struct_list_node} "next"))) ; - LocInfoE loc_20 (use{LPtr} (LocInfoE loc_21 ("k"))) ] ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [partition]. *) - Definition impl_partition (partition : loc): function := {| - f_args := [ - ("l", LPtr); - ("pivot", it_layout i32) - ]; - f_local_vars := [ - ("rest", LPtr); - ("head", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_90 ; - if: LocInfoE loc_90 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_90 ((LocInfoE loc_91 (use{LPtr} (LocInfoE loc_93 (!{LPtr} (LocInfoE loc_94 ("l")))))) ={PtrOp, PtrOp} (LocInfoE loc_95 (NULL))))) - then - locinfo: loc_32 ; - Goto "#1" - else - locinfo: loc_77 ; - Goto "#2" - ]> $ - <[ "#1" := - locinfo: loc_32 ; - Return (LocInfoE loc_33 (NULL)) - ]> $ - <[ "#2" := - locinfo: loc_77 ; - "$0" <- LocInfoE loc_79 (partition) with - [ LocInfoE loc_80 (&(LocInfoE loc_81 ((LocInfoE loc_82 (!{LPtr} (LocInfoE loc_84 (!{LPtr} (LocInfoE loc_85 ("l")))))) at{struct_list_node} "next"))) ; - LocInfoE loc_86 (use{it_layout i32} (LocInfoE loc_87 ("pivot"))) ] ; - "rest" <-{ LPtr } LocInfoE loc_77 ("$0") ; - "head" <-{ LPtr } - LocInfoE loc_71 (use{LPtr} (LocInfoE loc_73 (!{LPtr} (LocInfoE loc_74 ("l"))))) ; - locinfo: loc_62 ; - if: LocInfoE loc_62 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_62 ((LocInfoE loc_63 (use{it_layout i32} (LocInfoE loc_64 ((LocInfoE loc_65 (!{LPtr} (LocInfoE loc_67 (!{LPtr} (LocInfoE loc_68 ("l")))))) at{struct_list_node} "val")))) ≤{IntOp i32, IntOp i32} (LocInfoE loc_69 (use{it_layout i32} (LocInfoE loc_70 ("pivot"))))))) - then - locinfo: loc_39 ; - Goto "#3" - else - locinfo: loc_59 ; - Goto "#4" - ]> $ - <[ "#3" := - locinfo: loc_39 ; - LocInfoE loc_50 (!{LPtr} (LocInfoE loc_51 ("l"))) <-{ LPtr } - LocInfoE loc_52 (use{LPtr} (LocInfoE loc_53 ((LocInfoE loc_54 (!{LPtr} (LocInfoE loc_56 (!{LPtr} (LocInfoE loc_57 ("l")))))) at{struct_list_node} "next"))) ; - locinfo: loc_40 ; - LocInfoE loc_44 ((LocInfoE loc_45 (!{LPtr} (LocInfoE loc_46 ("head")))) at{struct_list_node} "next") <-{ LPtr } - LocInfoE loc_47 (use{LPtr} (LocInfoE loc_48 ("rest"))) ; - locinfo: loc_41 ; - Return (LocInfoE loc_42 (use{LPtr} (LocInfoE loc_43 ("head")))) - ]> $ - <[ "#4" := - locinfo: loc_59 ; - Return (LocInfoE loc_60 (use{LPtr} (LocInfoE loc_61 ("rest")))) - ]> $∅ - )%E - |}. -End code. diff --git a/theories/examples/tutorial/solutions/quicksort_proof_append.v b/theories/examples/tutorial/solutions/quicksort_proof_append.v deleted file mode 100644 index 013bb671a46cab1b9cfe3e110a9db144a6e6818d..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/solutions/quicksort_proof_append.v +++ /dev/null @@ -1,26 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial.solutions Require Import quicksort_code. -From refinedc.examples.tutorial.solutions Require Import quicksort_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/solutions/quicksort.c]. *) -Section proof_append. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [append]. *) - Lemma type_append (append : loc) : - append â—áµ¥ append @ function_ptr type_of_append -∗ - typed_function (impl_append append) type_of_append. - Proof. - start_function "append" ([[p xs] ys]) => arg_l arg_k. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "append" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "append". - Qed. -End proof_append. diff --git a/theories/examples/tutorial/solutions/quicksort_proof_partition.v b/theories/examples/tutorial/solutions/quicksort_proof_partition.v deleted file mode 100644 index 3bd90cd26bfa7dda815730fc9566e365b2627930..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/solutions/quicksort_proof_partition.v +++ /dev/null @@ -1,27 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial.solutions Require Import quicksort_code. -From refinedc.examples.tutorial.solutions Require Import quicksort_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/solutions/quicksort.c]. *) -Section proof_partition. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [partition]. *) - Lemma type_partition (partition : loc) : - partition â—áµ¥ partition @ function_ptr type_of_partition -∗ - typed_function (impl_partition partition) type_of_partition. - Proof. - start_function "partition" ([[p xs] z]) => arg_l arg_pivot local_rest local_head. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "partition" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by rewrite filter_cons; solve_goal. - all: print_sidecondition_goal "partition". - Qed. -End proof_partition. diff --git a/theories/examples/tutorial/solutions/quicksort_spec.v b/theories/examples/tutorial/solutions/quicksort_spec.v deleted file mode 100644 index c2f851c22035575e5e077f79998e06ed20cf237c..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/solutions/quicksort_spec.v +++ /dev/null @@ -1,81 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial.solutions Require Import quicksort_code. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/solutions/quicksort.c]. *) -Section spec. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Definition of type [list_t]. *) - Definition list_t_rec : ((list Z) -d> typeO) → ((list Z) -d> typeO) := (λ self xs, - ((xs <> []) @ (optional (&own ( - tyexists (λ y : Z, - tyexists (λ ys : list Z, - constrained (struct struct_list_node [@{type} - (y @ (int (i32))) ; - (guarded ("list_t_0") (apply_dfun self (ys))) - ]) ( - ⌜xs = y :: ys⌠- ))) - )) (null))) - )%I. - Typeclasses Opaque list_t_rec. - - Global Instance list_t_rec_ne : Contractive list_t_rec. - Proof. solve_type_proper. Qed. - - Definition list_t : rtype := {| - rty_type := (list Z); - rty r__ := fixp list_t_rec r__ - |}. - - Lemma list_t_unfold (xs : list Z) : - (xs @ list_t)%I ≡@{type} ( - ((xs <> []) @ (optional (&own ( - tyexists (λ y : Z, - tyexists (λ ys : list Z, - constrained (struct struct_list_node [@{type} - (y @ (int (i32))) ; - (guarded "list_t_0" (ys @ list_t)) - ]) ( - ⌜xs = y :: ys⌠- ))) - )) (null))) - )%I. - Proof. by rewrite {1}/with_refinement/=fixp_unfold. Qed. - - - Global Program Instance list_t_rmovable : RMovable list_t := - {| rmovable 'xs := movable_eq _ _ (list_t_unfold xs) |}. - Next Obligation. solve_ty_layout_eq. Qed. - - Global Instance list_t_simplify_hyp_place_inst l_ β_ (xs : list Z) : - SimplifyHypPlace l_ β_ (xs @ list_t)%I (Some 100%N) := - λ T, i2p (simplify_hyp_place_eq l_ β_ _ _ T (list_t_unfold _)). - Global Instance list_t_simplify_goal_place_inst l_ β_ (xs : list Z) : - SimplifyGoalPlace l_ β_ (xs @ list_t)%I (Some 100%N) := - λ T, i2p (simplify_goal_place_eq l_ β_ _ _ T (list_t_unfold _)). - - Global Program Instance list_t_simplify_hyp_val_inst v_ (xs : list Z) : - SimplifyHypVal v_ (xs @ list_t)%I (Some 100%N) := - λ T, i2p (simplify_hyp_val_eq v_ _ _ (list_t_unfold _) T _). - Next Obligation. done. Qed. - Global Program Instance list_t_simplify_goal_val_inst v_ (xs : list Z) : - SimplifyGoalVal v_ (xs @ list_t)%I (Some 100%N) := - λ T, i2p (simplify_goal_val_eq v_ _ _ (list_t_unfold _) T _). - Next Obligation. done. Qed. - - (* Type definitions. *) - - (* Specifications for function [append]. *) - Definition type_of_append := - fn(∀ (p, xs, ys) : loc * (list Z) * (list Z); (p @ (&own (xs @ (list_t)))), (ys @ (list_t)); True) - → ∃ () : (), (void); (p â—â‚— ((xs ++ ys) @ (list_t))). - - (* Specifications for function [partition]. *) - Definition type_of_partition := - fn(∀ (p, xs, z) : loc * (list Z) * Z; (p @ (&own (xs @ (list_t)))), (z @ (int (i32))); True) - → ∃ () : (), ((filter (λ v, v <= z) xs) @ (list_t)); (p â—â‚— ((filter (λ v, v > z) xs) @ (list_t))). -End spec. - -Typeclasses Opaque list_t_rec. diff --git a/theories/examples/tutorial/t0_intro.c.generate b/theories/examples/tutorial/t0_intro.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/tutorial/t0_intro_code.v b/theories/examples/tutorial/t0_intro_code.v deleted file mode 100644 index bd8133cdd14cbd7d6e34ba8d1764c6af75baf4e8..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t0_intro_code.v +++ /dev/null @@ -1,160 +0,0 @@ -From refinedc.lang Require Export notation. -From refinedc.lang Require Import tactics. -From refinedc.typing Require Import annotations. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t0_intro.c]. *) -Section code. - Definition file_0 : string := "theories/examples/tutorial/t0_intro.c". - Definition loc_2 : location_info := LocationInfo file_0 39 2 39 19. - Definition loc_3 : location_info := LocationInfo file_0 43 2 52 3. - Definition loc_4 : location_info := LocationInfo file_0 53 2 53 12. - Definition loc_5 : location_info := LocationInfo file_0 53 9 53 11. - Definition loc_6 : location_info := LocationInfo file_0 53 10 53 11. - Definition loc_7 : location_info := LocationInfo file_0 43 2 52 3. - Definition loc_8 : location_info := LocationInfo file_0 43 15 52 3. - Definition loc_9 : location_info := LocationInfo file_0 44 4 44 28. - Definition loc_10 : location_info := LocationInfo file_0 45 4 51 5. - Definition loc_11 : location_info := LocationInfo file_0 43 2 52 3. - Definition loc_12 : location_info := LocationInfo file_0 43 2 52 3. - Definition loc_13 : location_info := LocationInfo file_0 45 20 47 5. - Definition loc_14 : location_info := LocationInfo file_0 46 6 46 15. - Definition loc_15 : location_info := LocationInfo file_0 46 13 46 14. - Definition loc_16 : location_info := LocationInfo file_0 46 13 46 14. - Definition loc_17 : location_info := LocationInfo file_0 47 11 51 5. - Definition loc_18 : location_info := LocationInfo file_0 47 26 49 7. - Definition loc_19 : location_info := LocationInfo file_0 48 6 48 16. - Definition loc_20 : location_info := LocationInfo file_0 48 6 48 7. - Definition loc_21 : location_info := LocationInfo file_0 48 10 48 15. - Definition loc_22 : location_info := LocationInfo file_0 48 10 48 11. - Definition loc_23 : location_info := LocationInfo file_0 48 10 48 11. - Definition loc_24 : location_info := LocationInfo file_0 48 14 48 15. - Definition loc_25 : location_info := LocationInfo file_0 49 13 51 5. - Definition loc_26 : location_info := LocationInfo file_0 50 6 50 12. - Definition loc_27 : location_info := LocationInfo file_0 50 6 50 7. - Definition loc_28 : location_info := LocationInfo file_0 50 10 50 11. - Definition loc_29 : location_info := LocationInfo file_0 50 10 50 11. - Definition loc_30 : location_info := LocationInfo file_0 47 15 47 24. - Definition loc_31 : location_info := LocationInfo file_0 47 15 47 20. - Definition loc_32 : location_info := LocationInfo file_0 47 15 47 20. - Definition loc_33 : location_info := LocationInfo file_0 47 15 47 20. - Definition loc_34 : location_info := LocationInfo file_0 47 15 47 17. - Definition loc_35 : location_info := LocationInfo file_0 47 15 47 17. - Definition loc_36 : location_info := LocationInfo file_0 47 18 47 19. - Definition loc_37 : location_info := LocationInfo file_0 47 18 47 19. - Definition loc_38 : location_info := LocationInfo file_0 47 23 47 24. - Definition loc_39 : location_info := LocationInfo file_0 47 23 47 24. - Definition loc_40 : location_info := LocationInfo file_0 45 8 45 18. - Definition loc_41 : location_info := LocationInfo file_0 45 8 45 13. - Definition loc_42 : location_info := LocationInfo file_0 45 8 45 13. - Definition loc_43 : location_info := LocationInfo file_0 45 8 45 13. - Definition loc_44 : location_info := LocationInfo file_0 45 8 45 10. - Definition loc_45 : location_info := LocationInfo file_0 45 8 45 10. - Definition loc_46 : location_info := LocationInfo file_0 45 11 45 12. - Definition loc_47 : location_info := LocationInfo file_0 45 11 45 12. - Definition loc_48 : location_info := LocationInfo file_0 45 17 45 18. - Definition loc_49 : location_info := LocationInfo file_0 45 17 45 18. - Definition loc_50 : location_info := LocationInfo file_0 44 12 44 27. - Definition loc_51 : location_info := LocationInfo file_0 44 12 44 13. - Definition loc_52 : location_info := LocationInfo file_0 44 12 44 13. - Definition loc_53 : location_info := LocationInfo file_0 44 16 44 27. - Definition loc_54 : location_info := LocationInfo file_0 44 16 44 23. - Definition loc_55 : location_info := LocationInfo file_0 44 17 44 18. - Definition loc_56 : location_info := LocationInfo file_0 44 17 44 18. - Definition loc_57 : location_info := LocationInfo file_0 44 21 44 22. - Definition loc_58 : location_info := LocationInfo file_0 44 21 44 22. - Definition loc_59 : location_info := LocationInfo file_0 44 26 44 27. - Definition loc_62 : location_info := LocationInfo file_0 43 8 43 13. - Definition loc_63 : location_info := LocationInfo file_0 43 8 43 9. - Definition loc_64 : location_info := LocationInfo file_0 43 8 43 9. - Definition loc_65 : location_info := LocationInfo file_0 43 12 43 13. - Definition loc_66 : location_info := LocationInfo file_0 43 12 43 13. - Definition loc_67 : location_info := LocationInfo file_0 39 17 39 18. - Definition loc_68 : location_info := LocationInfo file_0 39 17 39 18. - Definition loc_71 : location_info := LocationInfo file_0 39 10 39 11. - - (* Definition of function [binary_search]. *) - Definition impl_binary_search : function := {| - f_args := [ - ("xs", LPtr); - ("n", it_layout i32); - ("x", it_layout i32) - ]; - f_local_vars := [ - ("r", it_layout i32); - ("l", it_layout i32); - ("k", it_layout i32) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "l" <-{ it_layout i32 } LocInfoE loc_71 (i2v 0 i32) ; - "r" <-{ it_layout i32 } - LocInfoE loc_67 (use{it_layout i32} (LocInfoE loc_68 ("n"))) ; - locinfo: loc_3 ; - Goto "#1" - ]> $ - <[ "#1" := - locinfo: loc_62 ; - if: LocInfoE loc_62 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_62 ((LocInfoE loc_63 (use{it_layout i32} (LocInfoE loc_64 ("l")))) <{IntOp i32, IntOp i32} (LocInfoE loc_65 (use{it_layout i32} (LocInfoE loc_66 ("r"))))))) - then - Goto "#2" - else - locinfo: loc_4 ; - Goto "#3" - ]> $ - <[ "#2" := - "k" <-{ it_layout i32 } - LocInfoE loc_50 ((LocInfoE loc_51 (use{it_layout i32} (LocInfoE loc_52 ("l")))) +{IntOp i32, IntOp i32} (LocInfoE loc_53 ((LocInfoE loc_54 ((LocInfoE loc_55 (use{it_layout i32} (LocInfoE loc_56 ("r")))) -{IntOp i32, IntOp i32} (LocInfoE loc_57 (use{it_layout i32} (LocInfoE loc_58 ("l")))))) /{IntOp i32, IntOp i32} (LocInfoE loc_59 (i2v 2 i32))))) ; - locinfo: loc_40 ; - if: LocInfoE loc_40 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_40 ((LocInfoE loc_41 (use{it_layout i32} (LocInfoE loc_43 ((LocInfoE loc_44 (!{LPtr} (LocInfoE loc_45 ("xs")))) at_offset{it_layout i32, PtrOp, IntOp i32} (LocInfoE loc_46 (use{it_layout i32} (LocInfoE loc_47 ("k")))))))) ={IntOp i32, IntOp i32} (LocInfoE loc_48 (use{it_layout i32} (LocInfoE loc_49 ("x"))))))) - then - locinfo: loc_14 ; - Goto "#5" - else - locinfo: loc_30 ; - Goto "#6" - ]> $ - <[ "#3" := - locinfo: loc_4 ; - Return (LocInfoE loc_5 (UnOp NegOp (IntOp i32) (LocInfoE loc_6 (i2v 1 i32)))) - ]> $ - <[ "#4" := - locinfo: loc_11 ; - Goto "continue2" - ]> $ - <[ "#5" := - locinfo: loc_14 ; - Return (LocInfoE loc_15 (use{it_layout i32} (LocInfoE loc_16 ("k")))) - ]> $ - <[ "#6" := - locinfo: loc_30 ; - if: LocInfoE loc_30 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_30 ((LocInfoE loc_31 (use{it_layout i32} (LocInfoE loc_33 ((LocInfoE loc_34 (!{LPtr} (LocInfoE loc_35 ("xs")))) at_offset{it_layout i32, PtrOp, IntOp i32} (LocInfoE loc_36 (use{it_layout i32} (LocInfoE loc_37 ("k")))))))) <{IntOp i32, IntOp i32} (LocInfoE loc_38 (use{it_layout i32} (LocInfoE loc_39 ("x"))))))) - then - locinfo: loc_19 ; - Goto "#7" - else - locinfo: loc_26 ; - Goto "#8" - ]> $ - <[ "#7" := - locinfo: loc_19 ; - LocInfoE loc_20 ("l") <-{ it_layout i32 } - LocInfoE loc_21 ((LocInfoE loc_22 (use{it_layout i32} (LocInfoE loc_23 ("k")))) +{IntOp i32, IntOp i32} (LocInfoE loc_24 (i2v 1 i32))) ; - locinfo: loc_11 ; - Goto "#4" - ]> $ - <[ "#8" := - locinfo: loc_26 ; - LocInfoE loc_27 ("r") <-{ it_layout i32 } - LocInfoE loc_28 (use{it_layout i32} (LocInfoE loc_29 ("k"))) ; - locinfo: loc_11 ; - Goto "#4" - ]> $ - <[ "continue2" := - locinfo: loc_3 ; - Goto "#1" - ]> $∅ - )%E - |}. -End code. diff --git a/theories/examples/tutorial/t0_intro_proof_binary_search.v b/theories/examples/tutorial/t0_intro_proof_binary_search.v deleted file mode 100644 index d7f412e3f19138293d79bc3db307fbf7822fd0d0..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t0_intro_proof_binary_search.v +++ /dev/null @@ -1,46 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t0_intro_code. -From refinedc.examples.tutorial Require Import t0_intro_spec. -From refinedc.examples.tutorial Require Import binary_search_defs. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t0_intro.c]. *) -Section proof_binary_search. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [binary_search]. *) - Lemma type_binary_search : - ⊢ typed_function impl_binary_search type_of_binary_search. - Proof. - start_function "binary_search" ([[ls x] p]) => arg_xs arg_n arg_x local_r local_l local_k. - split_blocks (( - <[ "#1" := - ∃ vl : nat, - ∃ vr : nat, - arg_xs â—â‚— (p @ (&own (array (i32) (ls `at_type` int i32)))) ∗ - arg_n â—â‚— ((length ls) @ (int (i32))) ∗ - arg_x â—â‚— (x @ (int (i32))) ∗ - local_k â—â‚— uninit (it_layout i32) ∗ - local_l â—â‚— (vl @ (int (i32))) ∗ - local_r â—â‚— (vr @ (int (i32))) ∗ - ⌜vl <= vr⌠∗ - ⌜vr <= length ls⌠∗ - ⌜must_be_in_range ls vl vr x⌠- ]> $ - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "binary_search" "#0". - - repeat liRStep; liShow. - all: print_typesystem_goal "binary_search" "#1". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by apply: elem_of_list_lookup_2; solve_goal. - all: try by apply: must_be_in_range_full; solve_goal. - all: try by apply: must_be_in_range_not_in; solve_goal. - all: try by apply: must_be_in_range_sorted_r; solve_goal. - all: try by apply: must_be_in_range_sorted_l; solve_goal. - all: print_sidecondition_goal "binary_search". - Qed. -End proof_binary_search. diff --git a/theories/examples/tutorial/t0_intro_spec.v b/theories/examples/tutorial/t0_intro_spec.v deleted file mode 100644 index edd305ff5d3e239189c5a6c6f0516c8bc73f872a..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t0_intro_spec.v +++ /dev/null @@ -1,16 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t0_intro_code. -From refinedc.examples.tutorial Require Import binary_search_defs. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t0_intro.c]. *) -Section spec. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Type definitions. *) - - (* Specifications for function [binary_search]. *) - Definition type_of_binary_search := - fn(∀ (ls, x, p) : (list Z) * Z * loc; (p @ (&own (array (i32) (ls `at_type` int i32)))), ((length ls) @ (int (i32))), (x @ (int (i32))); ⌜StronglySorted (≤) lsâŒ) - → ∃ () : (), ((x ∈ ls) @ (optional (tyexists (λ i : nat, constrained (i @ (int (i32))) ⌜ls !! i = Some xâŒ)) ((-1) @ (int (i32))))); (p â—â‚— (array (i32) (ls `at_type` int i32))). -End spec. diff --git a/theories/examples/tutorial/t10_loops.c.generate b/theories/examples/tutorial/t10_loops.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/tutorial/t10_loops_code.v b/theories/examples/tutorial/t10_loops_code.v deleted file mode 100644 index 03d10624e236c16bba15ec784b426256c26aef94..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t10_loops_code.v +++ /dev/null @@ -1,116 +0,0 @@ -From refinedc.lang Require Export notation. -From refinedc.lang Require Import tactics. -From refinedc.typing Require Import annotations. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t10_loops.c]. *) -Section code. - Definition file_0 : string := "theories/examples/tutorial/t10_loops.c". - Definition loc_2 : location_info := LocationInfo file_0 7 2 7 18. - Definition loc_3 : location_info := LocationInfo file_0 10 2 10 18. - Definition loc_4 : location_info := LocationInfo file_0 13 2 13 18. - Definition loc_5 : location_info := LocationInfo file_0 13 2 13 18. - Definition loc_6 : location_info := LocationInfo file_0 13 16 13 18. - Definition loc_7 : location_info := LocationInfo file_0 13 2 13 18. - Definition loc_8 : location_info := LocationInfo file_0 13 2 13 18. - Definition loc_9 : location_info := LocationInfo file_0 13 8 13 14. - Definition loc_10 : location_info := LocationInfo file_0 13 8 13 9. - Definition loc_11 : location_info := LocationInfo file_0 13 8 13 9. - Definition loc_12 : location_info := LocationInfo file_0 13 13 13 14. - Definition loc_13 : location_info := LocationInfo file_0 10 2 10 18. - Definition loc_14 : location_info := LocationInfo file_0 10 16 10 18. - Definition loc_15 : location_info := LocationInfo file_0 10 2 10 18. - Definition loc_16 : location_info := LocationInfo file_0 10 2 10 18. - Definition loc_17 : location_info := LocationInfo file_0 10 8 10 14. - Definition loc_18 : location_info := LocationInfo file_0 10 8 10 9. - Definition loc_19 : location_info := LocationInfo file_0 10 8 10 9. - Definition loc_20 : location_info := LocationInfo file_0 10 13 10 14. - Definition loc_21 : location_info := LocationInfo file_0 7 2 7 18. - Definition loc_22 : location_info := LocationInfo file_0 7 16 7 18. - Definition loc_23 : location_info := LocationInfo file_0 7 2 7 18. - Definition loc_24 : location_info := LocationInfo file_0 7 2 7 18. - Definition loc_25 : location_info := LocationInfo file_0 7 8 7 14. - Definition loc_26 : location_info := LocationInfo file_0 7 8 7 9. - Definition loc_27 : location_info := LocationInfo file_0 7 8 7 9. - Definition loc_28 : location_info := LocationInfo file_0 7 13 7 14. - - (* Definition of function [loop_without_annot]. *) - Definition impl_loop_without_annot : function := {| - f_args := [ - ("a", it_layout i32) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_2 ; - Goto "#1" - ]> $ - <[ "#1" := - locinfo: loc_25 ; - if: LocInfoE loc_25 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_25 ((LocInfoE loc_26 (use{it_layout i32} (LocInfoE loc_27 ("a")))) ={IntOp i32, IntOp i32} (LocInfoE loc_28 (i2v 1 i32))))) - then - locinfo: loc_23 ; - Goto "#2" - else - locinfo: loc_3 ; - Goto "#3" - ]> $ - <[ "#2" := - locinfo: loc_23 ; - Goto "continue2" - ]> $ - <[ "#3" := - locinfo: loc_3 ; - Goto "#4" - ]> $ - <[ "#4" := - locinfo: loc_17 ; - if: LocInfoE loc_17 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_17 ((LocInfoE loc_18 (use{it_layout i32} (LocInfoE loc_19 ("a")))) ={IntOp i32, IntOp i32} (LocInfoE loc_20 (i2v 1 i32))))) - then - locinfo: loc_15 ; - Goto "#5" - else - locinfo: loc_4 ; - Goto "#6" - ]> $ - <[ "#5" := - locinfo: loc_15 ; - Goto "continue4" - ]> $ - <[ "#6" := - locinfo: loc_4 ; - Goto "#7" - ]> $ - <[ "#7" := - locinfo: loc_9 ; - if: LocInfoE loc_9 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_9 ((LocInfoE loc_10 (use{it_layout i32} (LocInfoE loc_11 ("a")))) ={IntOp i32, IntOp i32} (LocInfoE loc_12 (i2v 1 i32))))) - then - locinfo: loc_7 ; - Goto "#8" - else - Goto "#9" - ]> $ - <[ "#8" := - locinfo: loc_7 ; - Goto "continue6" - ]> $ - <[ "#9" := - Return (VOID) - ]> $ - <[ "continue2" := - locinfo: loc_2 ; - Goto "#1" - ]> $ - <[ "continue4" := - locinfo: loc_3 ; - Goto "#4" - ]> $ - <[ "continue6" := - locinfo: loc_4 ; - Goto "#7" - ]> $∅ - )%E - |}. -End code. diff --git a/theories/examples/tutorial/t10_loops_proof_loop_without_annot.v b/theories/examples/tutorial/t10_loops_proof_loop_without_annot.v deleted file mode 100644 index 9dbcf6d8f2d49a15da991a9a1c0da0724569b55e..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t10_loops_proof_loop_without_annot.v +++ /dev/null @@ -1,38 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t10_loops_code. -From refinedc.examples.tutorial Require Import t10_loops_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t10_loops.c]. *) -Section proof_loop_without_annot. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [loop_without_annot]. *) - Lemma type_loop_without_annot : - ⊢ typed_function impl_loop_without_annot type_of_loop_without_annot. - Proof. - start_function "loop_without_annot" ([]) => arg_a. - split_blocks (( - <[ "#7" := - arg_a â—â‚— (int (i32)) - ]> $ - <[ "#1" := - arg_a â—â‚— (int (i32)) - ]> $ - ∅ - )%I : gmap block_id (iProp Σ)) (( - <[ "#4" := - arg_a â—â‚— (int (i32)) - ]> $ - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "loop_without_annot" "#0". - - repeat liRStep; liShow. - all: print_typesystem_goal "loop_without_annot" "#7". - - repeat liRStep; liShow. - all: print_typesystem_goal "loop_without_annot" "#1". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "loop_without_annot". - Qed. -End proof_loop_without_annot. diff --git a/theories/examples/tutorial/t10_loops_spec.v b/theories/examples/tutorial/t10_loops_spec.v deleted file mode 100644 index 2205fa4f5c30daa497c17a93e017929cf417200e..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t10_loops_spec.v +++ /dev/null @@ -1,14 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t10_loops_code. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t10_loops.c]. *) -Section spec. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Type definitions. *) - - (* Specifications for function [loop_without_annot]. *) - Definition type_of_loop_without_annot := - fn(∀ () : (); (int (i32)); True) → ∃ () : (), (void); ⌜TrueâŒ. -End spec. diff --git a/theories/examples/tutorial/t11_tree_set.c.generate b/theories/examples/tutorial/t11_tree_set.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/tutorial/t11_tree_set_code.v b/theories/examples/tutorial/t11_tree_set_code.v deleted file mode 100644 index d945e0f03c82c1e56c433ebc5276ccc4f1eaca01..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t11_tree_set_code.v +++ /dev/null @@ -1,1227 +0,0 @@ -From refinedc.lang Require Export notation. -From refinedc.lang Require Import tactics. -From refinedc.typing Require Import annotations. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t11_tree_set.c]. *) -Section code. - Definition file_0 : string := "theories/examples/tutorial/t11_tree_set.c". - Definition loc_2 : location_info := LocationInfo file_0 26 2 26 24. - Definition loc_3 : location_info := LocationInfo file_0 26 9 26 23. - Definition loc_6 : location_info := LocationInfo file_0 35 2 35 49. - Definition loc_7 : location_info := LocationInfo file_0 36 2 36 30. - Definition loc_8 : location_info := LocationInfo file_0 37 2 37 18. - Definition loc_9 : location_info := LocationInfo file_0 38 2 38 31. - Definition loc_10 : location_info := LocationInfo file_0 39 2 39 14. - Definition loc_11 : location_info := LocationInfo file_0 39 9 39 13. - Definition loc_12 : location_info := LocationInfo file_0 39 9 39 13. - Definition loc_13 : location_info := LocationInfo file_0 38 2 38 13. - Definition loc_14 : location_info := LocationInfo file_0 38 2 38 6. - Definition loc_15 : location_info := LocationInfo file_0 38 2 38 6. - Definition loc_16 : location_info := LocationInfo file_0 38 16 38 30. - Definition loc_17 : location_info := LocationInfo file_0 37 2 37 11. - Definition loc_18 : location_info := LocationInfo file_0 37 2 37 6. - Definition loc_19 : location_info := LocationInfo file_0 37 2 37 6. - Definition loc_20 : location_info := LocationInfo file_0 37 14 37 17. - Definition loc_21 : location_info := LocationInfo file_0 37 14 37 17. - Definition loc_22 : location_info := LocationInfo file_0 36 2 36 12. - Definition loc_23 : location_info := LocationInfo file_0 36 2 36 6. - Definition loc_24 : location_info := LocationInfo file_0 36 2 36 6. - Definition loc_25 : location_info := LocationInfo file_0 36 15 36 29. - Definition loc_26 : location_info := LocationInfo file_0 35 22 35 48. - Definition loc_27 : location_info := LocationInfo file_0 35 22 35 27. - Definition loc_28 : location_info := LocationInfo file_0 35 22 35 27. - Definition loc_29 : location_info := LocationInfo file_0 35 28 35 47. - Definition loc_34 : location_info := LocationInfo file_0 49 2 49 49. - Definition loc_35 : location_info := LocationInfo file_0 50 2 50 20. - Definition loc_36 : location_info := LocationInfo file_0 51 2 51 18. - Definition loc_37 : location_info := LocationInfo file_0 52 2 52 22. - Definition loc_38 : location_info := LocationInfo file_0 53 2 53 14. - Definition loc_39 : location_info := LocationInfo file_0 53 9 53 13. - Definition loc_40 : location_info := LocationInfo file_0 53 9 53 13. - Definition loc_41 : location_info := LocationInfo file_0 52 2 52 13. - Definition loc_42 : location_info := LocationInfo file_0 52 2 52 6. - Definition loc_43 : location_info := LocationInfo file_0 52 2 52 6. - Definition loc_44 : location_info := LocationInfo file_0 52 16 52 21. - Definition loc_45 : location_info := LocationInfo file_0 52 16 52 21. - Definition loc_46 : location_info := LocationInfo file_0 51 2 51 11. - Definition loc_47 : location_info := LocationInfo file_0 51 2 51 6. - Definition loc_48 : location_info := LocationInfo file_0 51 2 51 6. - Definition loc_49 : location_info := LocationInfo file_0 51 14 51 17. - Definition loc_50 : location_info := LocationInfo file_0 51 14 51 17. - Definition loc_51 : location_info := LocationInfo file_0 50 2 50 12. - Definition loc_52 : location_info := LocationInfo file_0 50 2 50 6. - Definition loc_53 : location_info := LocationInfo file_0 50 2 50 6. - Definition loc_54 : location_info := LocationInfo file_0 50 15 50 19. - Definition loc_55 : location_info := LocationInfo file_0 50 15 50 19. - Definition loc_56 : location_info := LocationInfo file_0 49 22 49 48. - Definition loc_57 : location_info := LocationInfo file_0 49 22 49 27. - Definition loc_58 : location_info := LocationInfo file_0 49 22 49 27. - Definition loc_59 : location_info := LocationInfo file_0 49 28 49 47. - Definition loc_64 : location_info := LocationInfo file_0 61 2 65 3. - Definition loc_65 : location_info := LocationInfo file_0 61 26 65 3. - Definition loc_66 : location_info := LocationInfo file_0 62 4 62 29. - Definition loc_67 : location_info := LocationInfo file_0 63 4 63 30. - Definition loc_68 : location_info := LocationInfo file_0 64 4 64 34. - Definition loc_69 : location_info := LocationInfo file_0 64 4 64 8. - Definition loc_70 : location_info := LocationInfo file_0 64 4 64 8. - Definition loc_71 : location_info := LocationInfo file_0 64 9 64 28. - Definition loc_72 : location_info := LocationInfo file_0 64 30 64 32. - Definition loc_73 : location_info := LocationInfo file_0 64 30 64 32. - Definition loc_74 : location_info := LocationInfo file_0 64 31 64 32. - Definition loc_75 : location_info := LocationInfo file_0 64 31 64 32. - Definition loc_76 : location_info := LocationInfo file_0 63 4 63 13. - Definition loc_77 : location_info := LocationInfo file_0 63 4 63 13. - Definition loc_78 : location_info := LocationInfo file_0 63 14 63 28. - Definition loc_79 : location_info := LocationInfo file_0 63 15 63 28. - Definition loc_80 : location_info := LocationInfo file_0 63 16 63 20. - Definition loc_81 : location_info := LocationInfo file_0 63 16 63 20. - Definition loc_82 : location_info := LocationInfo file_0 63 18 63 19. - Definition loc_83 : location_info := LocationInfo file_0 63 18 63 19. - Definition loc_84 : location_info := LocationInfo file_0 62 4 62 13. - Definition loc_85 : location_info := LocationInfo file_0 62 4 62 13. - Definition loc_86 : location_info := LocationInfo file_0 62 14 62 27. - Definition loc_87 : location_info := LocationInfo file_0 62 15 62 27. - Definition loc_88 : location_info := LocationInfo file_0 62 16 62 20. - Definition loc_89 : location_info := LocationInfo file_0 62 16 62 20. - Definition loc_90 : location_info := LocationInfo file_0 62 18 62 19. - Definition loc_91 : location_info := LocationInfo file_0 62 18 62 19. - Definition loc_93 : location_info := LocationInfo file_0 61 5 61 25. - Definition loc_94 : location_info := LocationInfo file_0 61 5 61 7. - Definition loc_95 : location_info := LocationInfo file_0 61 5 61 7. - Definition loc_96 : location_info := LocationInfo file_0 61 6 61 7. - Definition loc_97 : location_info := LocationInfo file_0 61 6 61 7. - Definition loc_98 : location_info := LocationInfo file_0 61 11 61 25. - Definition loc_101 : location_info := LocationInfo file_0 74 2 74 36. - Definition loc_102 : location_info := LocationInfo file_0 75 2 75 30. - Definition loc_103 : location_info := LocationInfo file_0 76 2 76 56. - Definition loc_104 : location_info := LocationInfo file_0 77 2 77 39. - Definition loc_105 : location_info := LocationInfo file_0 77 9 77 38. - Definition loc_106 : location_info := LocationInfo file_0 77 9 77 19. - Definition loc_107 : location_info := LocationInfo file_0 77 9 77 19. - Definition loc_108 : location_info := LocationInfo file_0 77 20 77 34. - Definition loc_109 : location_info := LocationInfo file_0 77 21 77 34. - Definition loc_110 : location_info := LocationInfo file_0 77 22 77 26. - Definition loc_111 : location_info := LocationInfo file_0 77 22 77 26. - Definition loc_112 : location_info := LocationInfo file_0 77 24 77 25. - Definition loc_113 : location_info := LocationInfo file_0 77 24 77 25. - Definition loc_114 : location_info := LocationInfo file_0 77 36 77 37. - Definition loc_115 : location_info := LocationInfo file_0 77 36 77 37. - Definition loc_116 : location_info := LocationInfo file_0 76 20 76 56. - Definition loc_117 : location_info := LocationInfo file_0 76 27 76 55. - Definition loc_118 : location_info := LocationInfo file_0 76 27 76 37. - Definition loc_119 : location_info := LocationInfo file_0 76 27 76 37. - Definition loc_120 : location_info := LocationInfo file_0 76 38 76 51. - Definition loc_121 : location_info := LocationInfo file_0 76 39 76 51. - Definition loc_122 : location_info := LocationInfo file_0 76 40 76 44. - Definition loc_123 : location_info := LocationInfo file_0 76 40 76 44. - Definition loc_124 : location_info := LocationInfo file_0 76 42 76 43. - Definition loc_125 : location_info := LocationInfo file_0 76 42 76 43. - Definition loc_126 : location_info := LocationInfo file_0 76 53 76 54. - Definition loc_127 : location_info := LocationInfo file_0 76 53 76 54. - Definition loc_129 : location_info := LocationInfo file_0 76 5 76 18. - Definition loc_130 : location_info := LocationInfo file_0 76 5 76 6. - Definition loc_131 : location_info := LocationInfo file_0 76 5 76 6. - Definition loc_132 : location_info := LocationInfo file_0 76 9 76 18. - Definition loc_133 : location_info := LocationInfo file_0 76 9 76 18. - Definition loc_134 : location_info := LocationInfo file_0 76 9 76 13. - Definition loc_135 : location_info := LocationInfo file_0 76 9 76 13. - Definition loc_136 : location_info := LocationInfo file_0 76 11 76 12. - Definition loc_137 : location_info := LocationInfo file_0 76 11 76 12. - Definition loc_138 : location_info := LocationInfo file_0 75 21 75 30. - Definition loc_139 : location_info := LocationInfo file_0 75 28 75 29. - Definition loc_141 : location_info := LocationInfo file_0 75 5 75 19. - Definition loc_142 : location_info := LocationInfo file_0 75 5 75 14. - Definition loc_143 : location_info := LocationInfo file_0 75 5 75 14. - Definition loc_144 : location_info := LocationInfo file_0 75 5 75 9. - Definition loc_145 : location_info := LocationInfo file_0 75 5 75 9. - Definition loc_146 : location_info := LocationInfo file_0 75 7 75 8. - Definition loc_147 : location_info := LocationInfo file_0 75 7 75 8. - Definition loc_148 : location_info := LocationInfo file_0 75 18 75 19. - Definition loc_149 : location_info := LocationInfo file_0 75 18 75 19. - Definition loc_150 : location_info := LocationInfo file_0 74 27 74 36. - Definition loc_151 : location_info := LocationInfo file_0 74 34 74 35. - Definition loc_153 : location_info := LocationInfo file_0 74 5 74 25. - Definition loc_154 : location_info := LocationInfo file_0 74 5 74 7. - Definition loc_155 : location_info := LocationInfo file_0 74 5 74 7. - Definition loc_156 : location_info := LocationInfo file_0 74 6 74 7. - Definition loc_157 : location_info := LocationInfo file_0 74 6 74 7. - Definition loc_158 : location_info := LocationInfo file_0 74 11 74 25. - Definition loc_161 : location_info := LocationInfo file_0 86 2 86 20. - Definition loc_162 : location_info := LocationInfo file_0 92 2 99 3. - Definition loc_163 : location_info := LocationInfo file_0 100 2 100 11. - Definition loc_164 : location_info := LocationInfo file_0 100 9 100 10. - Definition loc_165 : location_info := LocationInfo file_0 92 2 99 3. - Definition loc_166 : location_info := LocationInfo file_0 92 31 99 3. - Definition loc_167 : location_info := LocationInfo file_0 93 4 93 34. - Definition loc_168 : location_info := LocationInfo file_0 94 4 98 5. - Definition loc_169 : location_info := LocationInfo file_0 92 2 99 3. - Definition loc_170 : location_info := LocationInfo file_0 92 2 99 3. - Definition loc_171 : location_info := LocationInfo file_0 94 23 96 5. - Definition loc_172 : location_info := LocationInfo file_0 95 6 95 28. - Definition loc_173 : location_info := LocationInfo file_0 95 6 95 9. - Definition loc_174 : location_info := LocationInfo file_0 95 12 95 27. - Definition loc_175 : location_info := LocationInfo file_0 95 13 95 27. - Definition loc_176 : location_info := LocationInfo file_0 95 14 95 20. - Definition loc_177 : location_info := LocationInfo file_0 95 14 95 20. - Definition loc_178 : location_info := LocationInfo file_0 95 16 95 19. - Definition loc_179 : location_info := LocationInfo file_0 95 16 95 19. - Definition loc_180 : location_info := LocationInfo file_0 96 11 98 5. - Definition loc_181 : location_info := LocationInfo file_0 97 6 97 29. - Definition loc_182 : location_info := LocationInfo file_0 97 6 97 9. - Definition loc_183 : location_info := LocationInfo file_0 97 12 97 28. - Definition loc_184 : location_info := LocationInfo file_0 97 13 97 28. - Definition loc_185 : location_info := LocationInfo file_0 97 14 97 20. - Definition loc_186 : location_info := LocationInfo file_0 97 14 97 20. - Definition loc_187 : location_info := LocationInfo file_0 97 16 97 19. - Definition loc_188 : location_info := LocationInfo file_0 97 16 97 19. - Definition loc_189 : location_info := LocationInfo file_0 94 7 94 22. - Definition loc_190 : location_info := LocationInfo file_0 94 7 94 8. - Definition loc_191 : location_info := LocationInfo file_0 94 7 94 8. - Definition loc_192 : location_info := LocationInfo file_0 94 11 94 22. - Definition loc_193 : location_info := LocationInfo file_0 94 11 94 22. - Definition loc_194 : location_info := LocationInfo file_0 94 11 94 17. - Definition loc_195 : location_info := LocationInfo file_0 94 11 94 17. - Definition loc_196 : location_info := LocationInfo file_0 94 13 94 16. - Definition loc_197 : location_info := LocationInfo file_0 94 13 94 16. - Definition loc_198 : location_info := LocationInfo file_0 93 25 93 34. - Definition loc_199 : location_info := LocationInfo file_0 93 32 93 33. - Definition loc_201 : location_info := LocationInfo file_0 93 7 93 23. - Definition loc_202 : location_info := LocationInfo file_0 93 7 93 18. - Definition loc_203 : location_info := LocationInfo file_0 93 7 93 18. - Definition loc_204 : location_info := LocationInfo file_0 93 7 93 13. - Definition loc_205 : location_info := LocationInfo file_0 93 7 93 13. - Definition loc_206 : location_info := LocationInfo file_0 93 9 93 12. - Definition loc_207 : location_info := LocationInfo file_0 93 9 93 12. - Definition loc_208 : location_info := LocationInfo file_0 93 22 93 23. - Definition loc_209 : location_info := LocationInfo file_0 93 22 93 23. - Definition loc_210 : location_info := LocationInfo file_0 92 8 92 30. - Definition loc_211 : location_info := LocationInfo file_0 92 8 92 12. - Definition loc_212 : location_info := LocationInfo file_0 92 8 92 12. - Definition loc_213 : location_info := LocationInfo file_0 92 9 92 12. - Definition loc_214 : location_info := LocationInfo file_0 92 9 92 12. - Definition loc_215 : location_info := LocationInfo file_0 92 16 92 30. - Definition loc_216 : location_info := LocationInfo file_0 86 16 86 19. - Definition loc_217 : location_info := LocationInfo file_0 86 17 86 19. - Definition loc_218 : location_info := LocationInfo file_0 86 18 86 19. - Definition loc_219 : location_info := LocationInfo file_0 86 18 86 19. - Definition loc_224 : location_info := LocationInfo file_0 109 2 118 3. - Definition loc_225 : location_info := LocationInfo file_0 109 26 111 3. - Definition loc_226 : location_info := LocationInfo file_0 110 4 110 49. - Definition loc_227 : location_info := LocationInfo file_0 110 4 110 6. - Definition loc_228 : location_info := LocationInfo file_0 110 5 110 6. - Definition loc_229 : location_info := LocationInfo file_0 110 5 110 6. - Definition loc_230 : location_info := LocationInfo file_0 110 9 110 48. - Definition loc_231 : location_info := LocationInfo file_0 110 9 110 13. - Definition loc_232 : location_info := LocationInfo file_0 110 9 110 13. - Definition loc_233 : location_info := LocationInfo file_0 110 14 110 28. - Definition loc_234 : location_info := LocationInfo file_0 110 30 110 31. - Definition loc_235 : location_info := LocationInfo file_0 110 30 110 31. - Definition loc_236 : location_info := LocationInfo file_0 110 33 110 47. - Definition loc_237 : location_info := LocationInfo file_0 111 9 118 3. - Definition loc_238 : location_info := LocationInfo file_0 112 4 112 30. - Definition loc_239 : location_info := LocationInfo file_0 113 4 117 5. - Definition loc_240 : location_info := LocationInfo file_0 113 21 115 5. - Definition loc_241 : location_info := LocationInfo file_0 114 6 114 35. - Definition loc_242 : location_info := LocationInfo file_0 114 6 114 16. - Definition loc_243 : location_info := LocationInfo file_0 114 6 114 16. - Definition loc_244 : location_info := LocationInfo file_0 114 17 114 30. - Definition loc_245 : location_info := LocationInfo file_0 114 18 114 30. - Definition loc_246 : location_info := LocationInfo file_0 114 19 114 23. - Definition loc_247 : location_info := LocationInfo file_0 114 19 114 23. - Definition loc_248 : location_info := LocationInfo file_0 114 21 114 22. - Definition loc_249 : location_info := LocationInfo file_0 114 21 114 22. - Definition loc_250 : location_info := LocationInfo file_0 114 32 114 33. - Definition loc_251 : location_info := LocationInfo file_0 114 32 114 33. - Definition loc_252 : location_info := LocationInfo file_0 115 11 117 5. - Definition loc_253 : location_info := LocationInfo file_0 116 6 116 36. - Definition loc_254 : location_info := LocationInfo file_0 116 6 116 16. - Definition loc_255 : location_info := LocationInfo file_0 116 6 116 16. - Definition loc_256 : location_info := LocationInfo file_0 116 17 116 31. - Definition loc_257 : location_info := LocationInfo file_0 116 18 116 31. - Definition loc_258 : location_info := LocationInfo file_0 116 19 116 23. - Definition loc_259 : location_info := LocationInfo file_0 116 19 116 23. - Definition loc_260 : location_info := LocationInfo file_0 116 21 116 22. - Definition loc_261 : location_info := LocationInfo file_0 116 21 116 22. - Definition loc_262 : location_info := LocationInfo file_0 116 33 116 34. - Definition loc_263 : location_info := LocationInfo file_0 116 33 116 34. - Definition loc_264 : location_info := LocationInfo file_0 113 7 113 20. - Definition loc_265 : location_info := LocationInfo file_0 113 7 113 8. - Definition loc_266 : location_info := LocationInfo file_0 113 7 113 8. - Definition loc_267 : location_info := LocationInfo file_0 113 11 113 20. - Definition loc_268 : location_info := LocationInfo file_0 113 11 113 20. - Definition loc_269 : location_info := LocationInfo file_0 113 11 113 15. - Definition loc_270 : location_info := LocationInfo file_0 113 11 113 15. - Definition loc_271 : location_info := LocationInfo file_0 113 13 113 14. - Definition loc_272 : location_info := LocationInfo file_0 113 13 113 14. - Definition loc_273 : location_info := LocationInfo file_0 112 23 112 30. - Definition loc_276 : location_info := LocationInfo file_0 112 7 112 21. - Definition loc_277 : location_info := LocationInfo file_0 112 7 112 16. - Definition loc_278 : location_info := LocationInfo file_0 112 7 112 16. - Definition loc_279 : location_info := LocationInfo file_0 112 7 112 11. - Definition loc_280 : location_info := LocationInfo file_0 112 7 112 11. - Definition loc_281 : location_info := LocationInfo file_0 112 9 112 10. - Definition loc_282 : location_info := LocationInfo file_0 112 9 112 10. - Definition loc_283 : location_info := LocationInfo file_0 112 20 112 21. - Definition loc_284 : location_info := LocationInfo file_0 112 20 112 21. - Definition loc_285 : location_info := LocationInfo file_0 109 5 109 25. - Definition loc_286 : location_info := LocationInfo file_0 109 5 109 7. - Definition loc_287 : location_info := LocationInfo file_0 109 5 109 7. - Definition loc_288 : location_info := LocationInfo file_0 109 6 109 7. - Definition loc_289 : location_info := LocationInfo file_0 109 6 109 7. - Definition loc_290 : location_info := LocationInfo file_0 109 11 109 25. - Definition loc_293 : location_info := LocationInfo file_0 127 2 127 20. - Definition loc_294 : location_info := LocationInfo file_0 132 2 139 3. - Definition loc_295 : location_info := LocationInfo file_0 141 2 141 49. - Definition loc_296 : location_info := LocationInfo file_0 141 2 141 6. - Definition loc_297 : location_info := LocationInfo file_0 141 3 141 6. - Definition loc_298 : location_info := LocationInfo file_0 141 3 141 6. - Definition loc_299 : location_info := LocationInfo file_0 141 9 141 48. - Definition loc_300 : location_info := LocationInfo file_0 141 9 141 13. - Definition loc_301 : location_info := LocationInfo file_0 141 9 141 13. - Definition loc_302 : location_info := LocationInfo file_0 141 14 141 28. - Definition loc_303 : location_info := LocationInfo file_0 141 30 141 31. - Definition loc_304 : location_info := LocationInfo file_0 141 30 141 31. - Definition loc_305 : location_info := LocationInfo file_0 141 33 141 47. - Definition loc_306 : location_info := LocationInfo file_0 132 2 139 3. - Definition loc_307 : location_info := LocationInfo file_0 132 31 139 3. - Definition loc_308 : location_info := LocationInfo file_0 133 4 133 32. - Definition loc_309 : location_info := LocationInfo file_0 134 4 138 5. - Definition loc_310 : location_info := LocationInfo file_0 132 2 139 3. - Definition loc_311 : location_info := LocationInfo file_0 132 2 139 3. - Definition loc_312 : location_info := LocationInfo file_0 134 23 136 5. - Definition loc_313 : location_info := LocationInfo file_0 135 6 135 28. - Definition loc_314 : location_info := LocationInfo file_0 135 6 135 9. - Definition loc_315 : location_info := LocationInfo file_0 135 12 135 27. - Definition loc_316 : location_info := LocationInfo file_0 135 13 135 27. - Definition loc_317 : location_info := LocationInfo file_0 135 14 135 20. - Definition loc_318 : location_info := LocationInfo file_0 135 14 135 20. - Definition loc_319 : location_info := LocationInfo file_0 135 16 135 19. - Definition loc_320 : location_info := LocationInfo file_0 135 16 135 19. - Definition loc_321 : location_info := LocationInfo file_0 136 11 138 5. - Definition loc_322 : location_info := LocationInfo file_0 137 6 137 29. - Definition loc_323 : location_info := LocationInfo file_0 137 6 137 9. - Definition loc_324 : location_info := LocationInfo file_0 137 12 137 28. - Definition loc_325 : location_info := LocationInfo file_0 137 13 137 28. - Definition loc_326 : location_info := LocationInfo file_0 137 14 137 20. - Definition loc_327 : location_info := LocationInfo file_0 137 14 137 20. - Definition loc_328 : location_info := LocationInfo file_0 137 16 137 19. - Definition loc_329 : location_info := LocationInfo file_0 137 16 137 19. - Definition loc_330 : location_info := LocationInfo file_0 134 7 134 22. - Definition loc_331 : location_info := LocationInfo file_0 134 7 134 8. - Definition loc_332 : location_info := LocationInfo file_0 134 7 134 8. - Definition loc_333 : location_info := LocationInfo file_0 134 11 134 22. - Definition loc_334 : location_info := LocationInfo file_0 134 11 134 22. - Definition loc_335 : location_info := LocationInfo file_0 134 11 134 17. - Definition loc_336 : location_info := LocationInfo file_0 134 11 134 17. - Definition loc_337 : location_info := LocationInfo file_0 134 13 134 16. - Definition loc_338 : location_info := LocationInfo file_0 134 13 134 16. - Definition loc_339 : location_info := LocationInfo file_0 133 25 133 32. - Definition loc_342 : location_info := LocationInfo file_0 133 7 133 23. - Definition loc_343 : location_info := LocationInfo file_0 133 7 133 18. - Definition loc_344 : location_info := LocationInfo file_0 133 7 133 18. - Definition loc_345 : location_info := LocationInfo file_0 133 7 133 13. - Definition loc_346 : location_info := LocationInfo file_0 133 7 133 13. - Definition loc_347 : location_info := LocationInfo file_0 133 9 133 12. - Definition loc_348 : location_info := LocationInfo file_0 133 9 133 12. - Definition loc_349 : location_info := LocationInfo file_0 133 22 133 23. - Definition loc_350 : location_info := LocationInfo file_0 133 22 133 23. - Definition loc_351 : location_info := LocationInfo file_0 132 8 132 30. - Definition loc_352 : location_info := LocationInfo file_0 132 8 132 12. - Definition loc_353 : location_info := LocationInfo file_0 132 8 132 12. - Definition loc_354 : location_info := LocationInfo file_0 132 9 132 12. - Definition loc_355 : location_info := LocationInfo file_0 132 9 132 12. - Definition loc_356 : location_info := LocationInfo file_0 132 16 132 30. - Definition loc_357 : location_info := LocationInfo file_0 127 16 127 19. - Definition loc_358 : location_info := LocationInfo file_0 127 17 127 19. - Definition loc_359 : location_info := LocationInfo file_0 127 18 127 19. - Definition loc_360 : location_info := LocationInfo file_0 127 18 127 19. - Definition loc_365 : location_info := LocationInfo file_0 153 2 155 3. - Definition loc_366 : location_info := LocationInfo file_0 156 2 156 22. - Definition loc_367 : location_info := LocationInfo file_0 156 22 156 3. - Definition loc_368 : location_info := LocationInfo file_0 157 2 157 34. - Definition loc_369 : location_info := LocationInfo file_0 157 9 157 33. - Definition loc_370 : location_info := LocationInfo file_0 157 9 157 17. - Definition loc_371 : location_info := LocationInfo file_0 157 9 157 17. - Definition loc_372 : location_info := LocationInfo file_0 157 18 157 32. - Definition loc_373 : location_info := LocationInfo file_0 157 19 157 32. - Definition loc_374 : location_info := LocationInfo file_0 157 20 157 24. - Definition loc_375 : location_info := LocationInfo file_0 157 20 157 24. - Definition loc_376 : location_info := LocationInfo file_0 157 22 157 23. - Definition loc_377 : location_info := LocationInfo file_0 157 22 157 23. - Definition loc_378 : location_info := LocationInfo file_0 156 2 156 21. - Definition loc_379 : location_info := LocationInfo file_0 156 3 156 21. - Definition loc_380 : location_info := LocationInfo file_0 156 4 156 15. - Definition loc_381 : location_info := LocationInfo file_0 156 4 156 15. - Definition loc_382 : location_info := LocationInfo file_0 156 4 156 8. - Definition loc_383 : location_info := LocationInfo file_0 156 4 156 8. - Definition loc_384 : location_info := LocationInfo file_0 156 6 156 7. - Definition loc_385 : location_info := LocationInfo file_0 156 6 156 7. - Definition loc_386 : location_info := LocationInfo file_0 153 36 155 3. - Definition loc_387 : location_info := LocationInfo file_0 154 4 154 21. - Definition loc_388 : location_info := LocationInfo file_0 154 11 154 20. - Definition loc_389 : location_info := LocationInfo file_0 154 11 154 20. - Definition loc_390 : location_info := LocationInfo file_0 154 11 154 15. - Definition loc_391 : location_info := LocationInfo file_0 154 11 154 15. - Definition loc_392 : location_info := LocationInfo file_0 154 13 154 14. - Definition loc_393 : location_info := LocationInfo file_0 154 13 154 14. - Definition loc_395 : location_info := LocationInfo file_0 153 5 153 34. - Definition loc_396 : location_info := LocationInfo file_0 153 5 153 16. - Definition loc_397 : location_info := LocationInfo file_0 153 5 153 16. - Definition loc_398 : location_info := LocationInfo file_0 153 5 153 9. - Definition loc_399 : location_info := LocationInfo file_0 153 5 153 9. - Definition loc_400 : location_info := LocationInfo file_0 153 7 153 8. - Definition loc_401 : location_info := LocationInfo file_0 153 7 153 8. - Definition loc_402 : location_info := LocationInfo file_0 153 20 153 34. - Definition loc_405 : location_info := LocationInfo file_0 170 2 172 3. - Definition loc_406 : location_info := LocationInfo file_0 174 2 189 3. - Definition loc_407 : location_info := LocationInfo file_0 174 21 185 3. - Definition loc_408 : location_info := LocationInfo file_0 175 4 184 5. - Definition loc_409 : location_info := LocationInfo file_0 175 36 180 5. - Definition loc_410 : location_info := LocationInfo file_0 176 6 176 25. - Definition loc_411 : location_info := LocationInfo file_0 176 25 176 7. - Definition loc_412 : location_info := LocationInfo file_0 177 6 177 32. - Definition loc_413 : location_info := LocationInfo file_0 178 6 178 29. - Definition loc_414 : location_info := LocationInfo file_0 179 6 179 20. - Definition loc_415 : location_info := LocationInfo file_0 179 6 179 15. - Definition loc_416 : location_info := LocationInfo file_0 179 6 179 10. - Definition loc_417 : location_info := LocationInfo file_0 179 6 179 10. - Definition loc_418 : location_info := LocationInfo file_0 179 8 179 9. - Definition loc_419 : location_info := LocationInfo file_0 179 8 179 9. - Definition loc_420 : location_info := LocationInfo file_0 179 18 179 19. - Definition loc_421 : location_info := LocationInfo file_0 179 18 179 19. - Definition loc_422 : location_info := LocationInfo file_0 178 6 178 12. - Definition loc_423 : location_info := LocationInfo file_0 178 6 178 12. - Definition loc_424 : location_info := LocationInfo file_0 178 13 178 24. - Definition loc_425 : location_info := LocationInfo file_0 178 14 178 24. - Definition loc_426 : location_info := LocationInfo file_0 178 14 178 18. - Definition loc_427 : location_info := LocationInfo file_0 178 14 178 18. - Definition loc_428 : location_info := LocationInfo file_0 178 16 178 17. - Definition loc_429 : location_info := LocationInfo file_0 178 16 178 17. - Definition loc_430 : location_info := LocationInfo file_0 178 26 178 27. - Definition loc_431 : location_info := LocationInfo file_0 178 26 178 27. - Definition loc_432 : location_info := LocationInfo file_0 177 6 177 7. - Definition loc_433 : location_info := LocationInfo file_0 177 10 177 31. - Definition loc_434 : location_info := LocationInfo file_0 177 10 177 18. - Definition loc_435 : location_info := LocationInfo file_0 177 10 177 18. - Definition loc_436 : location_info := LocationInfo file_0 177 19 177 30. - Definition loc_437 : location_info := LocationInfo file_0 177 20 177 30. - Definition loc_438 : location_info := LocationInfo file_0 177 20 177 24. - Definition loc_439 : location_info := LocationInfo file_0 177 20 177 24. - Definition loc_440 : location_info := LocationInfo file_0 177 22 177 23. - Definition loc_441 : location_info := LocationInfo file_0 177 22 177 23. - Definition loc_442 : location_info := LocationInfo file_0 176 6 176 24. - Definition loc_443 : location_info := LocationInfo file_0 176 7 176 24. - Definition loc_444 : location_info := LocationInfo file_0 176 8 176 18. - Definition loc_445 : location_info := LocationInfo file_0 176 8 176 18. - Definition loc_446 : location_info := LocationInfo file_0 176 8 176 12. - Definition loc_447 : location_info := LocationInfo file_0 176 8 176 12. - Definition loc_448 : location_info := LocationInfo file_0 176 10 176 11. - Definition loc_449 : location_info := LocationInfo file_0 176 10 176 11. - Definition loc_450 : location_info := LocationInfo file_0 180 11 184 5. - Definition loc_451 : location_info := LocationInfo file_0 181 6 181 24. - Definition loc_452 : location_info := LocationInfo file_0 182 6 182 36. - Definition loc_453 : location_info := LocationInfo file_0 183 6 183 15. - Definition loc_454 : location_info := LocationInfo file_0 183 6 183 8. - Definition loc_455 : location_info := LocationInfo file_0 183 7 183 8. - Definition loc_456 : location_info := LocationInfo file_0 183 7 183 8. - Definition loc_457 : location_info := LocationInfo file_0 183 11 183 14. - Definition loc_458 : location_info := LocationInfo file_0 183 11 183 14. - Definition loc_459 : location_info := LocationInfo file_0 182 6 182 10. - Definition loc_460 : location_info := LocationInfo file_0 182 6 182 10. - Definition loc_461 : location_info := LocationInfo file_0 182 11 182 30. - Definition loc_462 : location_info := LocationInfo file_0 182 32 182 34. - Definition loc_463 : location_info := LocationInfo file_0 182 32 182 34. - Definition loc_464 : location_info := LocationInfo file_0 182 33 182 34. - Definition loc_465 : location_info := LocationInfo file_0 182 33 182 34. - Definition loc_466 : location_info := LocationInfo file_0 181 6 181 9. - Definition loc_467 : location_info := LocationInfo file_0 181 12 181 23. - Definition loc_468 : location_info := LocationInfo file_0 181 12 181 23. - Definition loc_469 : location_info := LocationInfo file_0 181 12 181 16. - Definition loc_470 : location_info := LocationInfo file_0 181 12 181 16. - Definition loc_471 : location_info := LocationInfo file_0 181 14 181 15. - Definition loc_472 : location_info := LocationInfo file_0 181 14 181 15. - Definition loc_473 : location_info := LocationInfo file_0 175 7 175 35. - Definition loc_474 : location_info := LocationInfo file_0 175 7 175 17. - Definition loc_475 : location_info := LocationInfo file_0 175 7 175 17. - Definition loc_476 : location_info := LocationInfo file_0 175 7 175 11. - Definition loc_477 : location_info := LocationInfo file_0 175 7 175 11. - Definition loc_478 : location_info := LocationInfo file_0 175 9 175 10. - Definition loc_479 : location_info := LocationInfo file_0 175 9 175 10. - Definition loc_480 : location_info := LocationInfo file_0 175 21 175 35. - Definition loc_481 : location_info := LocationInfo file_0 185 9 189 3. - Definition loc_482 : location_info := LocationInfo file_0 185 26 187 3. - Definition loc_483 : location_info := LocationInfo file_0 186 4 186 27. - Definition loc_484 : location_info := LocationInfo file_0 186 4 186 10. - Definition loc_485 : location_info := LocationInfo file_0 186 4 186 10. - Definition loc_486 : location_info := LocationInfo file_0 186 11 186 22. - Definition loc_487 : location_info := LocationInfo file_0 186 12 186 22. - Definition loc_488 : location_info := LocationInfo file_0 186 12 186 16. - Definition loc_489 : location_info := LocationInfo file_0 186 12 186 16. - Definition loc_490 : location_info := LocationInfo file_0 186 14 186 15. - Definition loc_491 : location_info := LocationInfo file_0 186 14 186 15. - Definition loc_492 : location_info := LocationInfo file_0 186 24 186 25. - Definition loc_493 : location_info := LocationInfo file_0 186 24 186 25. - Definition loc_494 : location_info := LocationInfo file_0 187 9 189 3. - Definition loc_495 : location_info := LocationInfo file_0 188 4 188 28. - Definition loc_496 : location_info := LocationInfo file_0 188 4 188 10. - Definition loc_497 : location_info := LocationInfo file_0 188 4 188 10. - Definition loc_498 : location_info := LocationInfo file_0 188 11 188 23. - Definition loc_499 : location_info := LocationInfo file_0 188 12 188 23. - Definition loc_500 : location_info := LocationInfo file_0 188 12 188 16. - Definition loc_501 : location_info := LocationInfo file_0 188 12 188 16. - Definition loc_502 : location_info := LocationInfo file_0 188 14 188 15. - Definition loc_503 : location_info := LocationInfo file_0 188 14 188 15. - Definition loc_504 : location_info := LocationInfo file_0 188 25 188 26. - Definition loc_505 : location_info := LocationInfo file_0 188 25 188 26. - Definition loc_506 : location_info := LocationInfo file_0 185 12 185 25. - Definition loc_507 : location_info := LocationInfo file_0 185 12 185 13. - Definition loc_508 : location_info := LocationInfo file_0 185 12 185 13. - Definition loc_509 : location_info := LocationInfo file_0 185 16 185 25. - Definition loc_510 : location_info := LocationInfo file_0 185 16 185 25. - Definition loc_511 : location_info := LocationInfo file_0 185 16 185 20. - Definition loc_512 : location_info := LocationInfo file_0 185 16 185 20. - Definition loc_513 : location_info := LocationInfo file_0 185 18 185 19. - Definition loc_514 : location_info := LocationInfo file_0 185 18 185 19. - Definition loc_515 : location_info := LocationInfo file_0 174 5 174 19. - Definition loc_516 : location_info := LocationInfo file_0 174 5 174 6. - Definition loc_517 : location_info := LocationInfo file_0 174 5 174 6. - Definition loc_518 : location_info := LocationInfo file_0 174 10 174 19. - Definition loc_519 : location_info := LocationInfo file_0 174 10 174 19. - Definition loc_520 : location_info := LocationInfo file_0 174 10 174 14. - Definition loc_521 : location_info := LocationInfo file_0 174 10 174 14. - Definition loc_522 : location_info := LocationInfo file_0 174 12 174 13. - Definition loc_523 : location_info := LocationInfo file_0 174 12 174 13. - Definition loc_524 : location_info := LocationInfo file_0 170 27 172 3. - Definition loc_525 : location_info := LocationInfo file_0 171 4 171 11. - Definition loc_528 : location_info := LocationInfo file_0 170 5 170 25. - Definition loc_529 : location_info := LocationInfo file_0 170 5 170 7. - Definition loc_530 : location_info := LocationInfo file_0 170 5 170 7. - Definition loc_531 : location_info := LocationInfo file_0 170 6 170 7. - Definition loc_532 : location_info := LocationInfo file_0 170 6 170 7. - Definition loc_533 : location_info := LocationInfo file_0 170 11 170 25. - Definition loc_536 : location_info := LocationInfo file_0 195 2 195 21. - Definition loc_537 : location_info := LocationInfo file_0 196 2 196 14. - Definition loc_538 : location_info := LocationInfo file_0 200 2 200 16. - Definition loc_539 : location_info := LocationInfo file_0 202 2 202 24. - Definition loc_540 : location_info := LocationInfo file_0 203 2 203 24. - Definition loc_541 : location_info := LocationInfo file_0 205 2 205 16. - Definition loc_542 : location_info := LocationInfo file_0 208 2 208 16. - Definition loc_543 : location_info := LocationInfo file_0 209 2 209 24. - Definition loc_544 : location_info := LocationInfo file_0 211 2 211 16. - Definition loc_545 : location_info := LocationInfo file_0 214 2 214 16. - Definition loc_546 : location_info := LocationInfo file_0 216 2 216 11. - Definition loc_547 : location_info := LocationInfo file_0 216 9 216 10. - Definition loc_548 : location_info := LocationInfo file_0 214 2 214 11. - Definition loc_549 : location_info := LocationInfo file_0 214 2 214 11. - Definition loc_550 : location_info := LocationInfo file_0 214 12 214 14. - Definition loc_551 : location_info := LocationInfo file_0 214 13 214 14. - Definition loc_552 : location_info := LocationInfo file_0 211 2 211 8. - Definition loc_553 : location_info := LocationInfo file_0 211 2 211 8. - Definition loc_554 : location_info := LocationInfo file_0 211 9 211 11. - Definition loc_555 : location_info := LocationInfo file_0 211 10 211 11. - Definition loc_556 : location_info := LocationInfo file_0 211 13 211 14. - Definition loc_557 : location_info := LocationInfo file_0 209 9 209 22. - Definition loc_558 : location_info := LocationInfo file_0 209 9 209 15. - Definition loc_559 : location_info := LocationInfo file_0 209 9 209 15. - Definition loc_560 : location_info := LocationInfo file_0 209 16 209 18. - Definition loc_561 : location_info := LocationInfo file_0 209 17 209 18. - Definition loc_562 : location_info := LocationInfo file_0 209 20 209 21. - Definition loc_563 : location_info := LocationInfo file_0 208 2 208 8. - Definition loc_564 : location_info := LocationInfo file_0 208 2 208 8. - Definition loc_565 : location_info := LocationInfo file_0 208 9 208 11. - Definition loc_566 : location_info := LocationInfo file_0 208 10 208 11. - Definition loc_567 : location_info := LocationInfo file_0 208 13 208 14. - Definition loc_568 : location_info := LocationInfo file_0 205 2 205 8. - Definition loc_569 : location_info := LocationInfo file_0 205 2 205 8. - Definition loc_570 : location_info := LocationInfo file_0 205 9 205 11. - Definition loc_571 : location_info := LocationInfo file_0 205 10 205 11. - Definition loc_572 : location_info := LocationInfo file_0 205 13 205 14. - Definition loc_573 : location_info := LocationInfo file_0 203 9 203 22. - Definition loc_574 : location_info := LocationInfo file_0 203 9 203 15. - Definition loc_575 : location_info := LocationInfo file_0 203 9 203 15. - Definition loc_576 : location_info := LocationInfo file_0 203 16 203 18. - Definition loc_577 : location_info := LocationInfo file_0 203 17 203 18. - Definition loc_578 : location_info := LocationInfo file_0 203 20 203 21. - Definition loc_579 : location_info := LocationInfo file_0 202 9 202 22. - Definition loc_580 : location_info := LocationInfo file_0 202 9 202 15. - Definition loc_581 : location_info := LocationInfo file_0 202 9 202 15. - Definition loc_582 : location_info := LocationInfo file_0 202 16 202 18. - Definition loc_583 : location_info := LocationInfo file_0 202 17 202 18. - Definition loc_584 : location_info := LocationInfo file_0 202 20 202 21. - Definition loc_585 : location_info := LocationInfo file_0 200 2 200 8. - Definition loc_586 : location_info := LocationInfo file_0 200 2 200 8. - Definition loc_587 : location_info := LocationInfo file_0 200 9 200 11. - Definition loc_588 : location_info := LocationInfo file_0 200 10 200 11. - Definition loc_589 : location_info := LocationInfo file_0 200 13 200 14. - Definition loc_590 : location_info := LocationInfo file_0 196 2 196 3. - Definition loc_591 : location_info := LocationInfo file_0 196 6 196 13. - Definition loc_592 : location_info := LocationInfo file_0 196 6 196 10. - Definition loc_593 : location_info := LocationInfo file_0 196 6 196 10. - Definition loc_594 : location_info := LocationInfo file_0 196 11 196 12. - Definition loc_595 : location_info := LocationInfo file_0 195 13 195 20. - Definition loc_596 : location_info := LocationInfo file_0 195 13 195 18. - Definition loc_597 : location_info := LocationInfo file_0 195 13 195 18. - - (* Definition of struct [tree]. *) - Program Definition struct_tree := {| - sl_members := [ - (Some "left", LPtr); - (Some "right", LPtr); - (Some "key", it_layout size_t) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of function [empty]. *) - Definition impl_empty : function := {| - f_args := [ - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_2 ; - Return (LocInfoE loc_3 (NULL)) - ]> $∅ - )%E - |}. - - (* Definition of function [init]. *) - Definition impl_init (alloc : loc): function := {| - f_args := [ - ("key", it_layout size_t) - ]; - f_local_vars := [ - ("node", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_26 ; - "$0" <- LocInfoE loc_28 (alloc) with - [ LocInfoE loc_29 (i2v (layout_of struct_tree).(ly_size) size_t) ] ; - "node" <-{ LPtr } - LocInfoE loc_26 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_26 ("$0"))) ; - locinfo: loc_7 ; - LocInfoE loc_22 ((LocInfoE loc_23 (!{LPtr} (LocInfoE loc_24 ("node")))) at{struct_tree} "left") <-{ LPtr } - LocInfoE loc_25 (NULL) ; - locinfo: loc_8 ; - LocInfoE loc_17 ((LocInfoE loc_18 (!{LPtr} (LocInfoE loc_19 ("node")))) at{struct_tree} "key") <-{ it_layout size_t } - LocInfoE loc_20 (use{it_layout size_t} (LocInfoE loc_21 ("key"))) ; - locinfo: loc_9 ; - LocInfoE loc_13 ((LocInfoE loc_14 (!{LPtr} (LocInfoE loc_15 ("node")))) at{struct_tree} "right") <-{ LPtr } - LocInfoE loc_16 (NULL) ; - locinfo: loc_10 ; - Return (LocInfoE loc_11 (use{LPtr} (LocInfoE loc_12 ("node")))) - ]> $∅ - )%E - |}. - - (* Definition of function [node]. *) - Definition impl_node (alloc : loc): function := {| - f_args := [ - ("left", LPtr); - ("key", it_layout size_t); - ("right", LPtr) - ]; - f_local_vars := [ - ("node", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_56 ; - "$0" <- LocInfoE loc_58 (alloc) with - [ LocInfoE loc_59 (i2v (layout_of struct_tree).(ly_size) size_t) ] ; - "node" <-{ LPtr } - LocInfoE loc_56 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_56 ("$0"))) ; - locinfo: loc_35 ; - LocInfoE loc_51 ((LocInfoE loc_52 (!{LPtr} (LocInfoE loc_53 ("node")))) at{struct_tree} "left") <-{ LPtr } - LocInfoE loc_54 (use{LPtr} (LocInfoE loc_55 ("left"))) ; - locinfo: loc_36 ; - LocInfoE loc_46 ((LocInfoE loc_47 (!{LPtr} (LocInfoE loc_48 ("node")))) at{struct_tree} "key") <-{ it_layout size_t } - LocInfoE loc_49 (use{it_layout size_t} (LocInfoE loc_50 ("key"))) ; - locinfo: loc_37 ; - LocInfoE loc_41 ((LocInfoE loc_42 (!{LPtr} (LocInfoE loc_43 ("node")))) at{struct_tree} "right") <-{ LPtr } - LocInfoE loc_44 (use{LPtr} (LocInfoE loc_45 ("right"))) ; - locinfo: loc_38 ; - Return (LocInfoE loc_39 (use{LPtr} (LocInfoE loc_40 ("node")))) - ]> $∅ - )%E - |}. - - (* Definition of function [free_tree]. *) - Definition impl_free_tree (free free_tree : loc): function := {| - f_args := [ - ("t", LPtr) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_93 ; - if: LocInfoE loc_93 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_93 ((LocInfoE loc_94 (use{LPtr} (LocInfoE loc_96 (!{LPtr} (LocInfoE loc_97 ("t")))))) !={PtrOp, PtrOp} (LocInfoE loc_98 (NULL))))) - then - locinfo: loc_66 ; - Goto "#1" - else - Goto "#2" - ]> $ - <[ "#1" := - locinfo: loc_66 ; - "_" <- LocInfoE loc_85 (free_tree) with - [ LocInfoE loc_86 (&(LocInfoE loc_87 ((LocInfoE loc_88 (!{LPtr} (LocInfoE loc_90 (!{LPtr} (LocInfoE loc_91 ("t")))))) at{struct_tree} "left"))) ] ; - locinfo: loc_67 ; - "_" <- LocInfoE loc_77 (free_tree) with - [ LocInfoE loc_78 (&(LocInfoE loc_79 ((LocInfoE loc_80 (!{LPtr} (LocInfoE loc_82 (!{LPtr} (LocInfoE loc_83 ("t")))))) at{struct_tree} "right"))) ] ; - locinfo: loc_68 ; - "_" <- LocInfoE loc_70 (free) with - [ LocInfoE loc_71 (i2v (layout_of struct_tree).(ly_size) size_t) ; - LocInfoE loc_72 (use{LPtr} (LocInfoE loc_74 (!{LPtr} (LocInfoE loc_75 ("t"))))) ] ; - Return (VOID) - ]> $ - <[ "#2" := - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [member_rec]. *) - Definition impl_member_rec (member_rec : loc): function := {| - f_args := [ - ("t", LPtr); - ("k", it_layout size_t) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_153 ; - if: LocInfoE loc_153 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_153 ((LocInfoE loc_154 (use{LPtr} (LocInfoE loc_156 (!{LPtr} (LocInfoE loc_157 ("t")))))) ={PtrOp, PtrOp} (LocInfoE loc_158 (NULL))))) - then - locinfo: loc_150 ; - Goto "#8" - else - locinfo: loc_141 ; - Goto "#9" - ]> $ - <[ "#1" := - locinfo: loc_141 ; - if: LocInfoE loc_141 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_141 ((LocInfoE loc_142 (use{it_layout size_t} (LocInfoE loc_143 ((LocInfoE loc_144 (!{LPtr} (LocInfoE loc_146 (!{LPtr} (LocInfoE loc_147 ("t")))))) at{struct_tree} "key")))) ={IntOp size_t, IntOp size_t} (LocInfoE loc_148 (use{it_layout size_t} (LocInfoE loc_149 ("k"))))))) - then - locinfo: loc_138 ; - Goto "#6" - else - locinfo: loc_129 ; - Goto "#7" - ]> $ - <[ "#2" := - locinfo: loc_129 ; - if: LocInfoE loc_129 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_129 ((LocInfoE loc_130 (use{it_layout size_t} (LocInfoE loc_131 ("k")))) <{IntOp size_t, IntOp size_t} (LocInfoE loc_132 (use{it_layout size_t} (LocInfoE loc_133 ((LocInfoE loc_134 (!{LPtr} (LocInfoE loc_136 (!{LPtr} (LocInfoE loc_137 ("t")))))) at{struct_tree} "key"))))))) - then - locinfo: loc_117 ; - Goto "#4" - else - locinfo: loc_105 ; - Goto "#5" - ]> $ - <[ "#3" := - locinfo: loc_105 ; - "$0" <- LocInfoE loc_107 (member_rec) with - [ LocInfoE loc_108 (&(LocInfoE loc_109 ((LocInfoE loc_110 (!{LPtr} (LocInfoE loc_112 (!{LPtr} (LocInfoE loc_113 ("t")))))) at{struct_tree} "right"))) ; - LocInfoE loc_114 (use{it_layout size_t} (LocInfoE loc_115 ("k"))) ] ; - locinfo: loc_104 ; - Return (LocInfoE loc_105 ("$0")) - ]> $ - <[ "#4" := - locinfo: loc_117 ; - "$1" <- LocInfoE loc_119 (member_rec) with - [ LocInfoE loc_120 (&(LocInfoE loc_121 ((LocInfoE loc_122 (!{LPtr} (LocInfoE loc_124 (!{LPtr} (LocInfoE loc_125 ("t")))))) at{struct_tree} "left"))) ; - LocInfoE loc_126 (use{it_layout size_t} (LocInfoE loc_127 ("k"))) ] ; - locinfo: loc_116 ; - Return (LocInfoE loc_117 ("$1")) - ]> $ - <[ "#5" := - locinfo: loc_105 ; - Goto "#3" - ]> $ - <[ "#6" := - locinfo: loc_138 ; - Return (LocInfoE loc_139 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_139 (i2v 1 i32)))) - ]> $ - <[ "#7" := - locinfo: loc_129 ; - Goto "#2" - ]> $ - <[ "#8" := - locinfo: loc_150 ; - Return (LocInfoE loc_151 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_151 (i2v 0 i32)))) - ]> $ - <[ "#9" := - locinfo: loc_141 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [member]. *) - Definition impl_member : function := {| - f_args := [ - ("t", LPtr); - ("k", it_layout size_t) - ]; - f_local_vars := [ - ("cur", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "cur" <-{ LPtr } - LocInfoE loc_216 (&(LocInfoE loc_218 (!{LPtr} (LocInfoE loc_219 ("t"))))) ; - locinfo: loc_162 ; - Goto "#1" - ]> $ - <[ "#1" := - locinfo: loc_210 ; - if: LocInfoE loc_210 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_210 ((LocInfoE loc_211 (use{LPtr} (LocInfoE loc_213 (!{LPtr} (LocInfoE loc_214 ("cur")))))) !={PtrOp, PtrOp} (LocInfoE loc_215 (NULL))))) - then - locinfo: loc_201 ; - Goto "#2" - else - locinfo: loc_163 ; - Goto "#3" - ]> $ - <[ "#2" := - locinfo: loc_201 ; - if: LocInfoE loc_201 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_201 ((LocInfoE loc_202 (use{it_layout size_t} (LocInfoE loc_203 ((LocInfoE loc_204 (!{LPtr} (LocInfoE loc_206 (!{LPtr} (LocInfoE loc_207 ("cur")))))) at{struct_tree} "key")))) ={IntOp size_t, IntOp size_t} (LocInfoE loc_208 (use{it_layout size_t} (LocInfoE loc_209 ("k"))))))) - then - locinfo: loc_198 ; - Goto "#8" - else - locinfo: loc_189 ; - Goto "#9" - ]> $ - <[ "#3" := - locinfo: loc_163 ; - Return (LocInfoE loc_164 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_164 (i2v 0 i32)))) - ]> $ - <[ "#4" := - locinfo: loc_189 ; - if: LocInfoE loc_189 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_189 ((LocInfoE loc_190 (use{it_layout size_t} (LocInfoE loc_191 ("k")))) <{IntOp size_t, IntOp size_t} (LocInfoE loc_192 (use{it_layout size_t} (LocInfoE loc_193 ((LocInfoE loc_194 (!{LPtr} (LocInfoE loc_196 (!{LPtr} (LocInfoE loc_197 ("cur")))))) at{struct_tree} "key"))))))) - then - locinfo: loc_172 ; - Goto "#6" - else - locinfo: loc_181 ; - Goto "#7" - ]> $ - <[ "#5" := - locinfo: loc_169 ; - Goto "continue13" - ]> $ - <[ "#6" := - locinfo: loc_172 ; - LocInfoE loc_173 ("cur") <-{ LPtr } - LocInfoE loc_174 (&(LocInfoE loc_175 ((LocInfoE loc_176 (!{LPtr} (LocInfoE loc_178 (!{LPtr} (LocInfoE loc_179 ("cur")))))) at{struct_tree} "left"))) ; - locinfo: loc_169 ; - Goto "#5" - ]> $ - <[ "#7" := - locinfo: loc_181 ; - LocInfoE loc_182 ("cur") <-{ LPtr } - LocInfoE loc_183 (&(LocInfoE loc_184 ((LocInfoE loc_185 (!{LPtr} (LocInfoE loc_187 (!{LPtr} (LocInfoE loc_188 ("cur")))))) at{struct_tree} "right"))) ; - locinfo: loc_169 ; - Goto "#5" - ]> $ - <[ "#8" := - locinfo: loc_198 ; - Return (LocInfoE loc_199 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_199 (i2v 1 i32)))) - ]> $ - <[ "#9" := - locinfo: loc_189 ; - Goto "#4" - ]> $ - <[ "continue13" := - locinfo: loc_162 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [insert_rec]. *) - Definition impl_insert_rec (node insert_rec : loc): function := {| - f_args := [ - ("t", LPtr); - ("k", it_layout size_t) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_285 ; - if: LocInfoE loc_285 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_285 ((LocInfoE loc_286 (use{LPtr} (LocInfoE loc_288 (!{LPtr} (LocInfoE loc_289 ("t")))))) ={PtrOp, PtrOp} (LocInfoE loc_290 (NULL))))) - then - locinfo: loc_230 ; - Goto "#1" - else - locinfo: loc_276 ; - Goto "#2" - ]> $ - <[ "#1" := - locinfo: loc_230 ; - "$0" <- LocInfoE loc_232 (node) with [ LocInfoE loc_233 (NULL) ; - LocInfoE loc_234 (use{it_layout size_t} (LocInfoE loc_235 ("k"))) ; - LocInfoE loc_236 (NULL) ] ; - locinfo: loc_226 ; - LocInfoE loc_228 (!{LPtr} (LocInfoE loc_229 ("t"))) <-{ LPtr } - LocInfoE loc_230 ("$0") ; - Return (VOID) - ]> $ - <[ "#2" := - locinfo: loc_276 ; - if: LocInfoE loc_276 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_276 ((LocInfoE loc_277 (use{it_layout size_t} (LocInfoE loc_278 ((LocInfoE loc_279 (!{LPtr} (LocInfoE loc_281 (!{LPtr} (LocInfoE loc_282 ("t")))))) at{struct_tree} "key")))) ={IntOp size_t, IntOp size_t} (LocInfoE loc_283 (use{it_layout size_t} (LocInfoE loc_284 ("k"))))))) - then - locinfo: loc_273 ; - Goto "#6" - else - locinfo: loc_264 ; - Goto "#7" - ]> $ - <[ "#3" := - locinfo: loc_264 ; - if: LocInfoE loc_264 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_264 ((LocInfoE loc_265 (use{it_layout size_t} (LocInfoE loc_266 ("k")))) <{IntOp size_t, IntOp size_t} (LocInfoE loc_267 (use{it_layout size_t} (LocInfoE loc_268 ((LocInfoE loc_269 (!{LPtr} (LocInfoE loc_271 (!{LPtr} (LocInfoE loc_272 ("t")))))) at{struct_tree} "key"))))))) - then - locinfo: loc_241 ; - Goto "#4" - else - locinfo: loc_253 ; - Goto "#5" - ]> $ - <[ "#4" := - locinfo: loc_241 ; - "_" <- LocInfoE loc_243 (insert_rec) with - [ LocInfoE loc_244 (&(LocInfoE loc_245 ((LocInfoE loc_246 (!{LPtr} (LocInfoE loc_248 (!{LPtr} (LocInfoE loc_249 ("t")))))) at{struct_tree} "left"))) ; - LocInfoE loc_250 (use{it_layout size_t} (LocInfoE loc_251 ("k"))) ] ; - Return (VOID) - ]> $ - <[ "#5" := - locinfo: loc_253 ; - "_" <- LocInfoE loc_255 (insert_rec) with - [ LocInfoE loc_256 (&(LocInfoE loc_257 ((LocInfoE loc_258 (!{LPtr} (LocInfoE loc_260 (!{LPtr} (LocInfoE loc_261 ("t")))))) at{struct_tree} "right"))) ; - LocInfoE loc_262 (use{it_layout size_t} (LocInfoE loc_263 ("k"))) ] ; - Return (VOID) - ]> $ - <[ "#6" := - locinfo: loc_273 ; - Return (VOID) - ]> $ - <[ "#7" := - locinfo: loc_264 ; - Goto "#3" - ]> $∅ - )%E - |}. - - (* Definition of function [insert]. *) - Definition impl_insert (node : loc): function := {| - f_args := [ - ("t", LPtr); - ("k", it_layout size_t) - ]; - f_local_vars := [ - ("cur", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "cur" <-{ LPtr } - LocInfoE loc_357 (&(LocInfoE loc_359 (!{LPtr} (LocInfoE loc_360 ("t"))))) ; - locinfo: loc_294 ; - Goto "#1" - ]> $ - <[ "#1" := - locinfo: loc_351 ; - if: LocInfoE loc_351 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_351 ((LocInfoE loc_352 (use{LPtr} (LocInfoE loc_354 (!{LPtr} (LocInfoE loc_355 ("cur")))))) !={PtrOp, PtrOp} (LocInfoE loc_356 (NULL))))) - then - locinfo: loc_342 ; - Goto "#2" - else - locinfo: loc_299 ; - Goto "#3" - ]> $ - <[ "#2" := - locinfo: loc_342 ; - if: LocInfoE loc_342 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_342 ((LocInfoE loc_343 (use{it_layout size_t} (LocInfoE loc_344 ((LocInfoE loc_345 (!{LPtr} (LocInfoE loc_347 (!{LPtr} (LocInfoE loc_348 ("cur")))))) at{struct_tree} "key")))) ={IntOp size_t, IntOp size_t} (LocInfoE loc_349 (use{it_layout size_t} (LocInfoE loc_350 ("k"))))))) - then - locinfo: loc_339 ; - Goto "#8" - else - locinfo: loc_330 ; - Goto "#9" - ]> $ - <[ "#3" := - locinfo: loc_299 ; - "$0" <- LocInfoE loc_301 (node) with [ LocInfoE loc_302 (NULL) ; - LocInfoE loc_303 (use{it_layout size_t} (LocInfoE loc_304 ("k"))) ; - LocInfoE loc_305 (NULL) ] ; - locinfo: loc_295 ; - LocInfoE loc_297 (!{LPtr} (LocInfoE loc_298 ("cur"))) <-{ LPtr } - LocInfoE loc_299 ("$0") ; - Return (VOID) - ]> $ - <[ "#4" := - locinfo: loc_330 ; - if: LocInfoE loc_330 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_330 ((LocInfoE loc_331 (use{it_layout size_t} (LocInfoE loc_332 ("k")))) <{IntOp size_t, IntOp size_t} (LocInfoE loc_333 (use{it_layout size_t} (LocInfoE loc_334 ((LocInfoE loc_335 (!{LPtr} (LocInfoE loc_337 (!{LPtr} (LocInfoE loc_338 ("cur")))))) at{struct_tree} "key"))))))) - then - locinfo: loc_313 ; - Goto "#6" - else - locinfo: loc_322 ; - Goto "#7" - ]> $ - <[ "#5" := - locinfo: loc_310 ; - Goto "continue25" - ]> $ - <[ "#6" := - locinfo: loc_313 ; - LocInfoE loc_314 ("cur") <-{ LPtr } - LocInfoE loc_315 (&(LocInfoE loc_316 ((LocInfoE loc_317 (!{LPtr} (LocInfoE loc_319 (!{LPtr} (LocInfoE loc_320 ("cur")))))) at{struct_tree} "left"))) ; - locinfo: loc_310 ; - Goto "#5" - ]> $ - <[ "#7" := - locinfo: loc_322 ; - LocInfoE loc_323 ("cur") <-{ LPtr } - LocInfoE loc_324 (&(LocInfoE loc_325 ((LocInfoE loc_326 (!{LPtr} (LocInfoE loc_328 (!{LPtr} (LocInfoE loc_329 ("cur")))))) at{struct_tree} "right"))) ; - locinfo: loc_310 ; - Goto "#5" - ]> $ - <[ "#8" := - locinfo: loc_339 ; - Return (VOID) - ]> $ - <[ "#9" := - locinfo: loc_330 ; - Goto "#4" - ]> $ - <[ "continue25" := - locinfo: loc_294 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [tree_max]. *) - Definition impl_tree_max (tree_max : loc): function := {| - f_args := [ - ("t", LPtr) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_395 ; - if: LocInfoE loc_395 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_395 ((LocInfoE loc_396 (use{LPtr} (LocInfoE loc_397 ((LocInfoE loc_398 (!{LPtr} (LocInfoE loc_400 (!{LPtr} (LocInfoE loc_401 ("t")))))) at{struct_tree} "right")))) ={PtrOp, PtrOp} (LocInfoE loc_402 (NULL))))) - then - locinfo: loc_387 ; - Goto "#2" - else - locinfo: loc_366 ; - Goto "#3" - ]> $ - <[ "#1" := - locinfo: loc_366 ; - expr: (LocInfoE loc_378 (&(LocInfoE loc_379 ((LocInfoE loc_380 (!{LPtr} (LocInfoE loc_381 ((LocInfoE loc_382 (!{LPtr} (LocInfoE loc_384 (!{LPtr} (LocInfoE loc_385 ("t")))))) at{struct_tree} "right")))) at{struct_tree} "key")))) ; - locinfo: loc_369 ; - "$0" <- LocInfoE loc_371 (tree_max) with - [ LocInfoE loc_372 (&(LocInfoE loc_373 ((LocInfoE loc_374 (!{LPtr} (LocInfoE loc_376 (!{LPtr} (LocInfoE loc_377 ("t")))))) at{struct_tree} "right"))) ] ; - locinfo: loc_368 ; - Return (LocInfoE loc_369 ("$0")) - ]> $ - <[ "#2" := - locinfo: loc_387 ; - Return (LocInfoE loc_388 (use{it_layout size_t} (LocInfoE loc_389 ((LocInfoE loc_390 (!{LPtr} (LocInfoE loc_392 (!{LPtr} (LocInfoE loc_393 ("t")))))) at{struct_tree} "key")))) - ]> $ - <[ "#3" := - locinfo: loc_366 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [remove]. *) - Definition impl_remove (free tree_max remove : loc): function := {| - f_args := [ - ("t", LPtr); - ("k", it_layout size_t) - ]; - f_local_vars := [ - ("m", it_layout size_t); - ("tmp", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_528 ; - if: LocInfoE loc_528 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_528 ((LocInfoE loc_529 (use{LPtr} (LocInfoE loc_531 (!{LPtr} (LocInfoE loc_532 ("t")))))) ={PtrOp, PtrOp} (LocInfoE loc_533 (NULL))))) - then - locinfo: loc_525 ; - Goto "#8" - else - locinfo: loc_515 ; - Goto "#9" - ]> $ - <[ "#1" := - locinfo: loc_515 ; - if: LocInfoE loc_515 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_515 ((LocInfoE loc_516 (use{it_layout size_t} (LocInfoE loc_517 ("k")))) ={IntOp size_t, IntOp size_t} (LocInfoE loc_518 (use{it_layout size_t} (LocInfoE loc_519 ((LocInfoE loc_520 (!{LPtr} (LocInfoE loc_522 (!{LPtr} (LocInfoE loc_523 ("t")))))) at{struct_tree} "key"))))))) - then - locinfo: loc_473 ; - Goto "#2" - else - locinfo: loc_506 ; - Goto "#5" - ]> $ - <[ "#2" := - locinfo: loc_473 ; - if: LocInfoE loc_473 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_473 ((LocInfoE loc_474 (use{LPtr} (LocInfoE loc_475 ((LocInfoE loc_476 (!{LPtr} (LocInfoE loc_478 (!{LPtr} (LocInfoE loc_479 ("t")))))) at{struct_tree} "left")))) !={PtrOp, PtrOp} (LocInfoE loc_480 (NULL))))) - then - locinfo: loc_410 ; - Goto "#3" - else - locinfo: loc_451 ; - Goto "#4" - ]> $ - <[ "#3" := - locinfo: loc_410 ; - expr: (LocInfoE loc_442 (&(LocInfoE loc_443 ((LocInfoE loc_444 (!{LPtr} (LocInfoE loc_445 ((LocInfoE loc_446 (!{LPtr} (LocInfoE loc_448 (!{LPtr} (LocInfoE loc_449 ("t")))))) at{struct_tree} "left")))) at{struct_tree} "key")))) ; - locinfo: loc_433 ; - "$0" <- LocInfoE loc_435 (tree_max) with - [ LocInfoE loc_436 (&(LocInfoE loc_437 ((LocInfoE loc_438 (!{LPtr} (LocInfoE loc_440 (!{LPtr} (LocInfoE loc_441 ("t")))))) at{struct_tree} "left"))) ] ; - locinfo: loc_412 ; - LocInfoE loc_432 ("m") <-{ it_layout size_t } - LocInfoE loc_433 ("$0") ; - locinfo: loc_413 ; - "_" <- LocInfoE loc_423 (remove) with - [ LocInfoE loc_424 (&(LocInfoE loc_425 ((LocInfoE loc_426 (!{LPtr} (LocInfoE loc_428 (!{LPtr} (LocInfoE loc_429 ("t")))))) at{struct_tree} "left"))) ; - LocInfoE loc_430 (use{it_layout size_t} (LocInfoE loc_431 ("m"))) ] ; - locinfo: loc_414 ; - LocInfoE loc_415 ((LocInfoE loc_416 (!{LPtr} (LocInfoE loc_418 (!{LPtr} (LocInfoE loc_419 ("t")))))) at{struct_tree} "key") <-{ it_layout size_t } - LocInfoE loc_420 (use{it_layout size_t} (LocInfoE loc_421 ("m"))) ; - Return (VOID) - ]> $ - <[ "#4" := - locinfo: loc_451 ; - LocInfoE loc_466 ("tmp") <-{ LPtr } - LocInfoE loc_467 (use{LPtr} (LocInfoE loc_468 ((LocInfoE loc_469 (!{LPtr} (LocInfoE loc_471 (!{LPtr} (LocInfoE loc_472 ("t")))))) at{struct_tree} "right"))) ; - locinfo: loc_452 ; - "_" <- LocInfoE loc_460 (free) with - [ LocInfoE loc_461 (i2v (layout_of struct_tree).(ly_size) size_t) ; - LocInfoE loc_462 (use{LPtr} (LocInfoE loc_464 (!{LPtr} (LocInfoE loc_465 ("t"))))) ] ; - locinfo: loc_453 ; - LocInfoE loc_455 (!{LPtr} (LocInfoE loc_456 ("t"))) <-{ LPtr } - LocInfoE loc_457 (use{LPtr} (LocInfoE loc_458 ("tmp"))) ; - Return (VOID) - ]> $ - <[ "#5" := - locinfo: loc_506 ; - if: LocInfoE loc_506 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_506 ((LocInfoE loc_507 (use{it_layout size_t} (LocInfoE loc_508 ("k")))) <{IntOp size_t, IntOp size_t} (LocInfoE loc_509 (use{it_layout size_t} (LocInfoE loc_510 ((LocInfoE loc_511 (!{LPtr} (LocInfoE loc_513 (!{LPtr} (LocInfoE loc_514 ("t")))))) at{struct_tree} "key"))))))) - then - locinfo: loc_483 ; - Goto "#6" - else - locinfo: loc_495 ; - Goto "#7" - ]> $ - <[ "#6" := - locinfo: loc_483 ; - "_" <- LocInfoE loc_485 (remove) with - [ LocInfoE loc_486 (&(LocInfoE loc_487 ((LocInfoE loc_488 (!{LPtr} (LocInfoE loc_490 (!{LPtr} (LocInfoE loc_491 ("t")))))) at{struct_tree} "left"))) ; - LocInfoE loc_492 (use{it_layout size_t} (LocInfoE loc_493 ("k"))) ] ; - Return (VOID) - ]> $ - <[ "#7" := - locinfo: loc_495 ; - "_" <- LocInfoE loc_497 (remove) with - [ LocInfoE loc_498 (&(LocInfoE loc_499 ((LocInfoE loc_500 (!{LPtr} (LocInfoE loc_502 (!{LPtr} (LocInfoE loc_503 ("t")))))) at{struct_tree} "right"))) ; - LocInfoE loc_504 (use{it_layout size_t} (LocInfoE loc_505 ("k"))) ] ; - Return (VOID) - ]> $ - <[ "#8" := - locinfo: loc_525 ; - Return (VOID) - ]> $ - <[ "#9" := - locinfo: loc_515 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [main]. *) - Definition impl_main (empty init free_tree member insert remove : loc): function := {| - f_args := [ - ]; - f_local_vars := [ - ("t", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_595 ; - "$4" <- LocInfoE loc_597 (empty) with [ ] ; - "t" <-{ LPtr } LocInfoE loc_595 ("$4") ; - locinfo: loc_591 ; - "$3" <- LocInfoE loc_593 (init) with - [ LocInfoE loc_594 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_594 (i2v 3 i32))) ] ; - locinfo: loc_537 ; - LocInfoE loc_590 ("t") <-{ LPtr } LocInfoE loc_591 ("$3") ; - locinfo: loc_538 ; - "_" <- LocInfoE loc_586 (insert) with - [ LocInfoE loc_587 (&(LocInfoE loc_588 ("t"))) ; - LocInfoE loc_589 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_589 (i2v 2 i32))) ] ; - locinfo: loc_579 ; - "$2" <- LocInfoE loc_581 (member) with - [ LocInfoE loc_582 (&(LocInfoE loc_583 ("t"))) ; - LocInfoE loc_584 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_584 (i2v 2 i32))) ] ; - locinfo: loc_539 ; - assert: (LocInfoE loc_579 ("$2")) ; - locinfo: loc_573 ; - "$1" <- LocInfoE loc_575 (member) with - [ LocInfoE loc_576 (&(LocInfoE loc_577 ("t"))) ; - LocInfoE loc_578 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_578 (i2v 3 i32))) ] ; - locinfo: loc_540 ; - assert: (LocInfoE loc_573 ("$1")) ; - locinfo: loc_541 ; - "_" <- LocInfoE loc_569 (remove) with - [ LocInfoE loc_570 (&(LocInfoE loc_571 ("t"))) ; - LocInfoE loc_572 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_572 (i2v 3 i32))) ] ; - locinfo: loc_542 ; - "_" <- LocInfoE loc_564 (insert) with - [ LocInfoE loc_565 (&(LocInfoE loc_566 ("t"))) ; - LocInfoE loc_567 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_567 (i2v 3 i32))) ] ; - locinfo: loc_557 ; - "$0" <- LocInfoE loc_559 (member) with - [ LocInfoE loc_560 (&(LocInfoE loc_561 ("t"))) ; - LocInfoE loc_562 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_562 (i2v 2 i32))) ] ; - locinfo: loc_543 ; - assert: (LocInfoE loc_557 ("$0")) ; - locinfo: loc_544 ; - "_" <- LocInfoE loc_553 (remove) with - [ LocInfoE loc_554 (&(LocInfoE loc_555 ("t"))) ; - LocInfoE loc_556 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_556 (i2v 3 i32))) ] ; - locinfo: loc_545 ; - "_" <- LocInfoE loc_549 (free_tree) with - [ LocInfoE loc_550 (&(LocInfoE loc_551 ("t"))) ] ; - locinfo: loc_546 ; - Return (LocInfoE loc_547 (i2v 0 i32)) - ]> $∅ - )%E - |}. -End code. diff --git a/theories/examples/tutorial/t11_tree_set_proof_empty.v b/theories/examples/tutorial/t11_tree_set_proof_empty.v deleted file mode 100644 index 6fbdd8f91810efa15c261e42405e4865cd8c4eda..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t11_tree_set_proof_empty.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t11_tree_set_code. -From refinedc.examples.tutorial Require Import t11_tree_set_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t11_tree_set.c]. *) -Section proof_empty. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [empty]. *) - Lemma type_empty : - ⊢ typed_function impl_empty type_of_empty. - Proof. - start_function "empty" ([]). - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "empty" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "empty". - Qed. -End proof_empty. diff --git a/theories/examples/tutorial/t11_tree_set_proof_free_tree.v b/theories/examples/tutorial/t11_tree_set_proof_free_tree.v deleted file mode 100644 index 775875685e4f8acb28345b4d28a1cbf014ea5445..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t11_tree_set_proof_free_tree.v +++ /dev/null @@ -1,27 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t11_tree_set_code. -From refinedc.examples.tutorial Require Import t11_tree_set_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t11_tree_set.c]. *) -Section proof_free_tree. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [free_tree]. *) - Lemma type_free_tree (free free_tree : loc) : - free â—áµ¥ free @ function_ptr type_of_free -∗ - free_tree â—áµ¥ free_tree @ function_ptr type_of_free_tree -∗ - typed_function (impl_free_tree free free_tree) type_of_free_tree. - Proof. - start_function "free_tree" (p) => arg_t. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "free_tree" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "free_tree". - Qed. -End proof_free_tree. diff --git a/theories/examples/tutorial/t11_tree_set_proof_init.v b/theories/examples/tutorial/t11_tree_set_proof_init.v deleted file mode 100644 index 0d17c926cf69a622c5d3bc3d5a13702cd1870f94..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t11_tree_set_proof_init.v +++ /dev/null @@ -1,27 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t11_tree_set_code. -From refinedc.examples.tutorial Require Import t11_tree_set_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t11_tree_set.c]. *) -Section proof_init. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [init]. *) - Lemma type_init (alloc : loc) : - alloc â—áµ¥ alloc @ function_ptr type_of_alloc -∗ - typed_function (impl_init alloc) type_of_init. - Proof. - start_function "init" (k) => arg_key local_node. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "init" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by set_solver. - all: print_sidecondition_goal "init". - Qed. -End proof_init. diff --git a/theories/examples/tutorial/t11_tree_set_proof_insert.v b/theories/examples/tutorial/t11_tree_set_proof_insert.v deleted file mode 100644 index e38524e51307d7213f0cb9712f7224220f4307a7..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t11_tree_set_proof_insert.v +++ /dev/null @@ -1,36 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t11_tree_set_code. -From refinedc.examples.tutorial Require Import t11_tree_set_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t11_tree_set.c]. *) -Section proof_insert. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [insert]. *) - Lemma type_insert (node : loc) : - node â—áµ¥ node @ function_ptr type_of_node -∗ - typed_function (impl_insert node) type_of_insert. - Proof. - start_function "insert" ([[p s] k]) => arg_t arg_k local_cur. - split_blocks (( - <[ "#1" := - ∃ cur_p : loc, - ∃ cur_s : gset Z, - arg_k â—â‚— (k @ (int (size_t))) ∗ - local_cur â—â‚— (cur_p @ (&own (cur_s @ (tree_t)))) ∗ - arg_t â—â‚— (p @ (&own (wand (cur_p â—â‚— ({[k]} ∪ cur_s) @ tree_t) (({[k]} ∪ s) @ (tree_t))))) - ]> $ - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "insert" "#0". - - repeat liRStep; liShow. - all: print_typesystem_goal "insert" "#1". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by set_unfold; solve_goal. - all: print_sidecondition_goal "insert". - Qed. -End proof_insert. diff --git a/theories/examples/tutorial/t11_tree_set_proof_insert_rec.v b/theories/examples/tutorial/t11_tree_set_proof_insert_rec.v deleted file mode 100644 index f9e8b137daa730eb0d244d94872a392f734a7d64..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t11_tree_set_proof_insert_rec.v +++ /dev/null @@ -1,28 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t11_tree_set_code. -From refinedc.examples.tutorial Require Import t11_tree_set_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t11_tree_set.c]. *) -Section proof_insert_rec. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [insert_rec]. *) - Lemma type_insert_rec (node insert_rec : loc) : - node â—áµ¥ node @ function_ptr type_of_node -∗ - insert_rec â—áµ¥ insert_rec @ function_ptr type_of_insert_rec -∗ - typed_function (impl_insert_rec node insert_rec) type_of_insert_rec. - Proof. - start_function "insert_rec" ([[p s] k]) => arg_t arg_k. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "insert_rec" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by set_unfold; solve_goal. - all: print_sidecondition_goal "insert_rec". - Qed. -End proof_insert_rec. diff --git a/theories/examples/tutorial/t11_tree_set_proof_main.v b/theories/examples/tutorial/t11_tree_set_proof_main.v deleted file mode 100644 index 8aa7455564e59898d4d43dcf15d80a4a5a72593c..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t11_tree_set_proof_main.v +++ /dev/null @@ -1,31 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t11_tree_set_code. -From refinedc.examples.tutorial Require Import t11_tree_set_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t11_tree_set.c]. *) -Section proof_main. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [main]. *) - Lemma type_main (empty init free_tree member insert remove : loc) : - empty â—áµ¥ empty @ function_ptr type_of_empty -∗ - init â—áµ¥ init @ function_ptr type_of_init -∗ - free_tree â—áµ¥ free_tree @ function_ptr type_of_free_tree -∗ - member â—áµ¥ member @ function_ptr type_of_member -∗ - insert â—áµ¥ insert @ function_ptr type_of_insert -∗ - remove â—áµ¥ remove @ function_ptr type_of_remove -∗ - typed_function (impl_main empty init free_tree member insert remove) type_of_main. - Proof. - start_function "main" ([]) => local_t. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "main" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "main". - Qed. -End proof_main. diff --git a/theories/examples/tutorial/t11_tree_set_proof_member.v b/theories/examples/tutorial/t11_tree_set_proof_member.v deleted file mode 100644 index c85e1d73ead7c433a261a2682330b87866e811d5..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t11_tree_set_proof_member.v +++ /dev/null @@ -1,36 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t11_tree_set_code. -From refinedc.examples.tutorial Require Import t11_tree_set_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t11_tree_set.c]. *) -Section proof_member. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [member]. *) - Lemma type_member : - ⊢ typed_function impl_member type_of_member. - Proof. - start_function "member" ([[p s] k]) => arg_t arg_k local_cur. - split_blocks (( - <[ "#1" := - ∃ cur_p : loc, - ∃ cur_s : gset Z, - arg_k â—â‚— (k @ (int (size_t))) ∗ - local_cur â—â‚— (cur_p @ (&own (cur_s @ (tree_t)))) ∗ - arg_t â—â‚— (p @ (&own (wand (cur_p â—â‚— cur_s @ tree_t) (s @ (tree_t))))) ∗ - ⌜k ∈ s ↔ k ∈ cur_s⌠- ]> $ - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "member" "#0". - - repeat liRStep; liShow. - all: print_typesystem_goal "member" "#1". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by set_unfold; naive_solver lia. - all: print_sidecondition_goal "member". - Qed. -End proof_member. diff --git a/theories/examples/tutorial/t11_tree_set_proof_member_rec.v b/theories/examples/tutorial/t11_tree_set_proof_member_rec.v deleted file mode 100644 index 80c6784edb18689383c5a2d84dff282011bfb3d4..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t11_tree_set_proof_member_rec.v +++ /dev/null @@ -1,27 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t11_tree_set_code. -From refinedc.examples.tutorial Require Import t11_tree_set_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t11_tree_set.c]. *) -Section proof_member_rec. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [member_rec]. *) - Lemma type_member_rec (member_rec : loc) : - member_rec â—áµ¥ member_rec @ function_ptr type_of_member_rec -∗ - typed_function (impl_member_rec member_rec) type_of_member_rec. - Proof. - start_function "member_rec" ([[p s] k]) => arg_t arg_k. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "member_rec" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by set_unfold; naive_solver lia. - all: print_sidecondition_goal "member_rec". - Qed. -End proof_member_rec. diff --git a/theories/examples/tutorial/t11_tree_set_proof_node.v b/theories/examples/tutorial/t11_tree_set_proof_node.v deleted file mode 100644 index ef6378147e82803b0dc7bfcea86bba5bd09c25d5..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t11_tree_set_proof_node.v +++ /dev/null @@ -1,27 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t11_tree_set_code. -From refinedc.examples.tutorial Require Import t11_tree_set_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t11_tree_set.c]. *) -Section proof_node. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [node]. *) - Lemma type_node (alloc : loc) : - alloc â—áµ¥ alloc @ function_ptr type_of_alloc -∗ - typed_function (impl_node alloc) type_of_node. - Proof. - start_function "node" ([[sl k] sr]) => arg_left arg_key arg_right local_node. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "node" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by set_solver. - all: print_sidecondition_goal "node". - Qed. -End proof_node. diff --git a/theories/examples/tutorial/t11_tree_set_proof_remove.v b/theories/examples/tutorial/t11_tree_set_proof_remove.v deleted file mode 100644 index 6c9ab61c725c4d2c78b046f4fe3fb235666c9c36..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t11_tree_set_proof_remove.v +++ /dev/null @@ -1,31 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t11_tree_set_code. -From refinedc.examples.tutorial Require Import t11_tree_set_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t11_tree_set.c]. *) -Section proof_remove. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [remove]. *) - Lemma type_remove (free tree_max remove : loc) : - free â—áµ¥ free @ function_ptr type_of_free -∗ - tree_max â—áµ¥ tree_max @ function_ptr type_of_tree_max -∗ - remove â—áµ¥ remove @ function_ptr type_of_remove -∗ - typed_function (impl_remove free tree_max remove) type_of_remove. - Proof. - start_function "remove" ([[p s] k]) => arg_t arg_k local_m local_tmp. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "remove" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try apply Z.le_neq. - all: try (rewrite difference_union_L !difference_union_distr_l_L !difference_diag_L !difference_disjoint_L; move: (H0 x2) (H1 x2); clear -H9). - all: try by set_unfold; naive_solver lia. - all: print_sidecondition_goal "remove". - Qed. -End proof_remove. diff --git a/theories/examples/tutorial/t11_tree_set_proof_tree_max.v b/theories/examples/tutorial/t11_tree_set_proof_tree_max.v deleted file mode 100644 index 0dd21ea517bd800c23ea5f85ffcd689f7419f3a7..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t11_tree_set_proof_tree_max.v +++ /dev/null @@ -1,27 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t11_tree_set_code. -From refinedc.examples.tutorial Require Import t11_tree_set_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t11_tree_set.c]. *) -Section proof_tree_max. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [tree_max]. *) - Lemma type_tree_max (tree_max : loc) : - tree_max â—áµ¥ tree_max @ function_ptr type_of_tree_max -∗ - typed_function (impl_tree_max tree_max) type_of_tree_max. - Proof. - start_function "tree_max" ([p s]) => arg_t. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "tree_max" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: by set_unfold; naive_solver lia. - all: print_sidecondition_goal "tree_max". - Qed. -End proof_tree_max. diff --git a/theories/examples/tutorial/t11_tree_set_spec.v b/theories/examples/tutorial/t11_tree_set_spec.v deleted file mode 100644 index 5a844c5453f83503bbc8bd91f99d7624d7cea49c..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t11_tree_set_spec.v +++ /dev/null @@ -1,157 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t11_tree_set_code. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t11_tree_set.c]. *) -Section spec. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Inlined code. *) - - Definition alloc_initialized := initialized "allocator_state" (). - - (* Definition of type [tree_t]. *) - Definition tree_t_rec : ((gset Z) -d> typeO) → ((gset Z) -d> typeO) := (λ self s, - ((s ≠∅) @ (optional (&own ( - tyexists (λ sl : gset Z, - tyexists (λ sr : gset Z, - tyexists (λ k : Z, - constrained (struct struct_tree [@{type} - (guarded ("tree_t_0") (apply_dfun self (sl))) ; - (guarded ("tree_t_1") (apply_dfun self (sr))) ; - (k @ (int (size_t))) - ]) ( - ⌜s = sl ∪ {[k]} ∪ sr⌠∗ - ⌜∀ i, i ∈ sl → i < k⌠∗ - ⌜∀ i, i ∈ sr → k < i⌠- )))) - )) null)) - )%I. - Typeclasses Opaque tree_t_rec. - - Global Instance tree_t_rec_ne : Contractive tree_t_rec. - Proof. solve_type_proper. Qed. - - Definition tree_t : rtype := {| - rty_type := (gset Z); - rty r__ := fixp tree_t_rec r__ - |}. - - Lemma tree_t_unfold (s : gset Z) : - (s @ tree_t)%I ≡@{type} ( - ((s ≠∅) @ (optional (&own ( - tyexists (λ sl : gset Z, - tyexists (λ sr : gset Z, - tyexists (λ k : Z, - constrained (struct struct_tree [@{type} - (guarded "tree_t_0" (sl @ tree_t)) ; - (guarded "tree_t_1" (sr @ tree_t)) ; - (k @ (int (size_t))) - ]) ( - ⌜s = sl ∪ {[k]} ∪ sr⌠∗ - ⌜∀ i, i ∈ sl → i < k⌠∗ - ⌜∀ i, i ∈ sr → k < i⌠- )))) - )) null)) - )%I. - Proof. by rewrite {1}/with_refinement/=fixp_unfold. Qed. - - - Global Program Instance tree_t_rmovable : RMovable tree_t := - {| rmovable 's := movable_eq _ _ (tree_t_unfold s) |}. - Next Obligation. solve_ty_layout_eq. Qed. - - Global Instance tree_t_simplify_hyp_place_inst l_ β_ (s : gset Z) : - SimplifyHypPlace l_ β_ (s @ tree_t)%I (Some 100%N) := - λ T, i2p (simplify_hyp_place_eq l_ β_ _ _ T (tree_t_unfold _)). - Global Instance tree_t_simplify_goal_place_inst l_ β_ (s : gset Z) : - SimplifyGoalPlace l_ β_ (s @ tree_t)%I (Some 100%N) := - λ T, i2p (simplify_goal_place_eq l_ β_ _ _ T (tree_t_unfold _)). - - Global Program Instance tree_t_simplify_hyp_val_inst v_ (s : gset Z) : - SimplifyHypVal v_ (s @ tree_t)%I (Some 100%N) := - λ T, i2p (simplify_hyp_val_eq v_ _ _ (tree_t_unfold _) T _). - Next Obligation. done. Qed. - Global Program Instance tree_t_simplify_goal_val_inst v_ (s : gset Z) : - SimplifyGoalVal v_ (s @ tree_t)%I (Some 100%N) := - λ T, i2p (simplify_goal_val_eq v_ _ _ (tree_t_unfold _) T _). - Next Obligation. done. Qed. - - (* Type definitions. *) - - (* Specifications for function [alloc]. *) - Definition type_of_alloc := - fn(∀ size : nat; (size @ (int (size_t))); ⌜size + 16 < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (&own (uninit (mk_layout size 3))); True. - - (* Specifications for function [free]. *) - Definition type_of_free := - fn(∀ size : nat; (size @ (int (size_t))), (&own (uninit (mk_layout size 3))); (alloc_initialized) ∗ ⌜(8 | size)âŒ) - → ∃ () : (), (void); True. - - (* Specifications for function [alloc_array]. *) - Definition type_of_alloc_array := - fn(∀ (size, n) : nat * nat; (size @ (int (size_t))), (n @ (int (size_t))); ⌜size * n + 16 < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (&own (array (mk_layout size 3) (replicate n (uninit (mk_layout size 3))))); True. - - (* Specifications for function [free_array]. *) - Definition type_of_free_array := - fn(∀ (size, n) : nat * nat; (size @ (int (size_t))), (n @ (int (size_t))), (&own (array (mk_layout size 3) (replicate n (uninit (mk_layout size 3))))); ⌜size * n < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (void); True. - - (* Specifications for function [empty]. *) - Definition type_of_empty := - fn(∀ () : (); True) → ∃ () : (), ((∅) @ (tree_t)); True. - - (* Specifications for function [init]. *) - Definition type_of_init := - fn(∀ k : Z; (k @ (int (size_t))); (alloc_initialized)) - → ∃ () : (), (({[k]}) @ (tree_t)); True. - - (* Specifications for function [node]. *) - Definition type_of_node := - fn(∀ (sl, k, sr) : (gset Z) * Z * (gset Z); (sl @ (tree_t)), (k @ (int (size_t))), (sr @ (tree_t)); (alloc_initialized) ∗ ⌜∀ i, i ∈ sl → i < k⌠∗ ⌜∀ i, i ∈ sr → k < iâŒ) - → ∃ () : (), ((sl ∪ {[k]} ∪ sr) @ (tree_t)); True. - - (* Specifications for function [free_tree]. *) - Definition type_of_free_tree := - fn(∀ p : loc; (p @ (&own (tree_t))); (alloc_initialized)) - → ∃ () : (), (void); (p â—â‚— (uninit (LPtr))). - - (* Specifications for function [member_rec]. *) - Definition type_of_member_rec := - fn(∀ (p, s, k) : loc * (gset Z) * Z; (p @ (&own (s @ (tree_t)))), (k @ (int (size_t))); True) - → ∃ () : (), ((bool_decide (k ∈ s)) @ (boolean (bool_it))); (p â—â‚— (s @ (tree_t))). - - (* Specifications for function [member]. *) - Definition type_of_member := - fn(∀ (p, s, k) : loc * (gset Z) * Z; (p @ (&own (s @ (tree_t)))), (k @ (int (size_t))); True) - → ∃ () : (), ((bool_decide (k ∈ s)) @ (boolean (bool_it))); (p â—â‚— (s @ (tree_t))). - - (* Specifications for function [insert_rec]. *) - Definition type_of_insert_rec := - fn(∀ (p, s, k) : loc * (gset Z) * Z; (p @ (&own (s @ (tree_t)))), (k @ (int (size_t))); (alloc_initialized)) - → ∃ () : (), (void); (p â—â‚— (({[k]} ∪ s) @ (tree_t))). - - (* Specifications for function [insert]. *) - Definition type_of_insert := - fn(∀ (p, s, k) : loc * (gset Z) * Z; (p @ (&own (s @ (tree_t)))), (k @ (int (size_t))); (alloc_initialized)) - → ∃ () : (), (void); (p â—â‚— (({[k]} ∪ s) @ (tree_t))). - - (* Specifications for function [tree_max]. *) - Definition type_of_tree_max := - fn(∀ (p, s) : loc * (gset Z); (p @ (&own (s @ (tree_t)))); ⌜s ≠∅âŒ) - → ∃ m : Z, (m @ (int (size_t))); ⌜m ∈ s⌠∗ ⌜∀ i, i ∈ s → i ≤ m⌠∗ (p â—â‚— (s @ (tree_t))). - - (* Specifications for function [remove]. *) - Definition type_of_remove := - fn(∀ (p, s, k) : loc * (gset Z) * Z; (p @ (&own (s @ (tree_t)))), (k @ (int (size_t))); (alloc_initialized)) - → ∃ () : (), (void); (p â—â‚— ((s ∖ {[k]}) @ (tree_t))). - - (* Specifications for function [main]. *) - Definition type_of_main := - fn(∀ () : (); (alloc_initialized)) - → ∃ () : (), ((0) @ (int (i32))); True. -End spec. - -Typeclasses Opaque tree_t_rec. diff --git a/theories/examples/tutorial/t1_basic.c.generate b/theories/examples/tutorial/t1_basic.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/tutorial/t1_basic_code.v b/theories/examples/tutorial/t1_basic_code.v deleted file mode 100644 index ae526d9ca235193c92de9c3f5cad456e17075150..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t1_basic_code.v +++ /dev/null @@ -1,305 +0,0 @@ -From refinedc.lang Require Export notation. -From refinedc.lang Require Import tactics. -From refinedc.typing Require Import annotations. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t1_basic.c]. *) -Section code. - Definition file_0 : string := "theories/examples/tutorial/t1_basic.c". - Definition loc_2 : location_info := LocationInfo file_0 35 4 35 13. - Definition loc_3 : location_info := LocationInfo file_0 35 11 35 12. - Definition loc_4 : location_info := LocationInfo file_0 35 11 35 12. - Definition loc_7 : location_info := LocationInfo file_0 128 4 128 13. - Definition loc_8 : location_info := LocationInfo file_0 128 11 128 12. - Definition loc_9 : location_info := LocationInfo file_0 128 11 128 12. - Definition loc_12 : location_info := LocationInfo file_0 154 4 154 17. - Definition loc_13 : location_info := LocationInfo file_0 154 11 154 16. - Definition loc_14 : location_info := LocationInfo file_0 154 11 154 12. - Definition loc_15 : location_info := LocationInfo file_0 154 11 154 12. - Definition loc_16 : location_info := LocationInfo file_0 154 15 154 16. - Definition loc_19 : location_info := LocationInfo file_0 260 4 264 5. - Definition loc_20 : location_info := LocationInfo file_0 267 4 267 19. - Definition loc_21 : location_info := LocationInfo file_0 268 4 268 19. - Definition loc_22 : location_info := LocationInfo file_0 269 4 269 13. - Definition loc_23 : location_info := LocationInfo file_0 269 11 269 12. - Definition loc_24 : location_info := LocationInfo file_0 269 11 269 12. - Definition loc_25 : location_info := LocationInfo file_0 268 11 268 17. - Definition loc_26 : location_info := LocationInfo file_0 268 11 268 12. - Definition loc_27 : location_info := LocationInfo file_0 268 11 268 12. - Definition loc_28 : location_info := LocationInfo file_0 268 16 268 17. - Definition loc_29 : location_info := LocationInfo file_0 268 16 268 17. - Definition loc_30 : location_info := LocationInfo file_0 267 11 267 17. - Definition loc_31 : location_info := LocationInfo file_0 267 11 267 12. - Definition loc_32 : location_info := LocationInfo file_0 267 11 267 12. - Definition loc_33 : location_info := LocationInfo file_0 267 16 267 17. - Definition loc_34 : location_info := LocationInfo file_0 267 16 267 17. - Definition loc_35 : location_info := LocationInfo file_0 260 14 262 5. - Definition loc_36 : location_info := LocationInfo file_0 261 8 261 14. - Definition loc_37 : location_info := LocationInfo file_0 261 8 261 9. - Definition loc_38 : location_info := LocationInfo file_0 261 12 261 13. - Definition loc_39 : location_info := LocationInfo file_0 261 12 261 13. - Definition loc_40 : location_info := LocationInfo file_0 262 11 264 5. - Definition loc_41 : location_info := LocationInfo file_0 263 8 263 14. - Definition loc_42 : location_info := LocationInfo file_0 263 8 263 9. - Definition loc_43 : location_info := LocationInfo file_0 263 12 263 13. - Definition loc_44 : location_info := LocationInfo file_0 263 12 263 13. - Definition loc_45 : location_info := LocationInfo file_0 260 7 260 12. - Definition loc_46 : location_info := LocationInfo file_0 260 7 260 8. - Definition loc_47 : location_info := LocationInfo file_0 260 7 260 8. - Definition loc_48 : location_info := LocationInfo file_0 260 11 260 12. - Definition loc_49 : location_info := LocationInfo file_0 260 11 260 12. - Definition loc_52 : location_info := LocationInfo file_0 306 4 311 5. - Definition loc_53 : location_info := LocationInfo file_0 312 4 312 13. - Definition loc_54 : location_info := LocationInfo file_0 312 11 312 12. - Definition loc_55 : location_info := LocationInfo file_0 312 11 312 12. - Definition loc_56 : location_info := LocationInfo file_0 306 4 311 5. - Definition loc_57 : location_info := LocationInfo file_0 306 17 311 5. - Definition loc_58 : location_info := LocationInfo file_0 307 8 307 12. - Definition loc_59 : location_info := LocationInfo file_0 310 8 310 12. - Definition loc_60 : location_info := LocationInfo file_0 306 4 311 5. - Definition loc_61 : location_info := LocationInfo file_0 306 4 311 5. - Definition loc_62 : location_info := LocationInfo file_0 310 8 310 9. - Definition loc_63 : location_info := LocationInfo file_0 307 8 307 9. - Definition loc_64 : location_info := LocationInfo file_0 306 10 306 15. - Definition loc_65 : location_info := LocationInfo file_0 306 10 306 11. - Definition loc_66 : location_info := LocationInfo file_0 306 10 306 11. - Definition loc_67 : location_info := LocationInfo file_0 306 14 306 15. - Definition loc_70 : location_info := LocationInfo file_0 402 4 402 13. - Definition loc_71 : location_info := LocationInfo file_0 402 4 402 8. - Definition loc_72 : location_info := LocationInfo file_0 402 5 402 8. - Definition loc_73 : location_info := LocationInfo file_0 402 5 402 8. - Definition loc_74 : location_info := LocationInfo file_0 402 11 402 12. - Definition loc_77 : location_info := LocationInfo file_0 413 2 413 15. - Definition loc_78 : location_info := LocationInfo file_0 414 2 414 15. - Definition loc_79 : location_info := LocationInfo file_0 414 2 414 10. - Definition loc_80 : location_info := LocationInfo file_0 414 2 414 10. - Definition loc_81 : location_info := LocationInfo file_0 414 11 414 13. - Definition loc_82 : location_info := LocationInfo file_0 414 12 414 13. - Definition loc_83 : location_info := LocationInfo file_0 413 2 413 10. - Definition loc_84 : location_info := LocationInfo file_0 413 2 413 10. - Definition loc_85 : location_info := LocationInfo file_0 413 11 413 13. - Definition loc_86 : location_info := LocationInfo file_0 413 12 413 13. - Definition loc_89 : location_info := LocationInfo file_0 434 4 434 34. - Definition loc_90 : location_info := LocationInfo file_0 435 4 435 13. - Definition loc_91 : location_info := LocationInfo file_0 435 4 435 10. - Definition loc_92 : location_info := LocationInfo file_0 435 4 435 7. - Definition loc_93 : location_info := LocationInfo file_0 435 4 435 7. - Definition loc_94 : location_info := LocationInfo file_0 434 4 434 8. - Definition loc_95 : location_info := LocationInfo file_0 434 5 434 8. - Definition loc_96 : location_info := LocationInfo file_0 434 5 434 8. - Definition loc_97 : location_info := LocationInfo file_0 434 11 434 33. - Definition loc_98 : location_info := LocationInfo file_0 434 11 434 33. - Definition loc_101 : location_info := LocationInfo file_0 434 31 434 32. - - (* Definition of struct [basic]. *) - Program Definition struct_basic := {| - sl_members := [ - (Some "a", it_layout i32); - (Some "b", it_layout i32) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of function [int_id]. *) - Definition impl_int_id : function := {| - f_args := [ - ("a", it_layout i32) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_2 ; - Return (LocInfoE loc_3 (use{it_layout i32} (LocInfoE loc_4 ("a")))) - ]> $∅ - )%E - |}. - - (* Definition of function [int_id2]. *) - Definition impl_int_id2 : function := {| - f_args := [ - ("a", it_layout i32) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_7 ; - Return (LocInfoE loc_8 (use{it_layout i32} (LocInfoE loc_9 ("a")))) - ]> $∅ - )%E - |}. - - (* Definition of function [add1]. *) - Definition impl_add1 : function := {| - f_args := [ - ("a", it_layout i32) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_12 ; - Return (LocInfoE loc_13 ((LocInfoE loc_14 (use{it_layout i32} (LocInfoE loc_15 ("a")))) +{IntOp i32, IntOp i32} (LocInfoE loc_16 (i2v 1 i32)))) - ]> $∅ - )%E - |}. - - (* Definition of function [min]. *) - Definition impl_min : function := {| - f_args := [ - ("a", it_layout i32); - ("b", it_layout i32) - ]; - f_local_vars := [ - ("r", it_layout i32) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_45 ; - if: LocInfoE loc_45 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_45 ((LocInfoE loc_46 (use{it_layout i32} (LocInfoE loc_47 ("a")))) <{IntOp i32, IntOp i32} (LocInfoE loc_48 (use{it_layout i32} (LocInfoE loc_49 ("b"))))))) - then - locinfo: loc_36 ; - Goto "#2" - else - locinfo: loc_41 ; - Goto "#3" - ]> $ - <[ "#1" := - locinfo: loc_20 ; - assert: (LocInfoE loc_30 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_30 ((LocInfoE loc_31 (use{it_layout i32} (LocInfoE loc_32 ("r")))) ≤{IntOp i32, IntOp i32} (LocInfoE loc_33 (use{it_layout i32} (LocInfoE loc_34 ("b")))))))) ; - locinfo: loc_21 ; - assert: (LocInfoE loc_25 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_25 ((LocInfoE loc_26 (use{it_layout i32} (LocInfoE loc_27 ("r")))) ≤{IntOp i32, IntOp i32} (LocInfoE loc_28 (use{it_layout i32} (LocInfoE loc_29 ("a")))))))) ; - locinfo: loc_22 ; - Return (LocInfoE loc_23 (use{it_layout i32} (LocInfoE loc_24 ("r")))) - ]> $ - <[ "#2" := - locinfo: loc_36 ; - LocInfoE loc_37 ("r") <-{ it_layout i32 } - LocInfoE loc_38 (use{it_layout i32} (LocInfoE loc_39 ("a"))) ; - locinfo: loc_20 ; - Goto "#1" - ]> $ - <[ "#3" := - locinfo: loc_41 ; - LocInfoE loc_42 ("r") <-{ it_layout i32 } - LocInfoE loc_43 (use{it_layout i32} (LocInfoE loc_44 ("b"))) ; - locinfo: loc_20 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [looping_add]. *) - Definition impl_looping_add : function := {| - f_args := [ - ("a", it_layout i32); - ("b", it_layout i32) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_52 ; - Goto "#1" - ]> $ - <[ "#1" := - locinfo: loc_64 ; - if: LocInfoE loc_64 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_64 ((LocInfoE loc_65 (use{it_layout i32} (LocInfoE loc_66 ("a")))) >{IntOp i32, IntOp i32} (LocInfoE loc_67 (i2v 0 i32))))) - then - locinfo: loc_58 ; - Goto "#2" - else - locinfo: loc_53 ; - Goto "#3" - ]> $ - <[ "#2" := - locinfo: loc_58 ; - LocInfoE loc_63 ("b") <-{ it_layout i32 } - LocInfoE loc_58 ((LocInfoE loc_58 (use{it_layout i32} (LocInfoE loc_63 ("b")))) +{IntOp i32, IntOp i32} (LocInfoE loc_58 (i2v 1 i32))) ; - locinfo: loc_59 ; - LocInfoE loc_62 ("a") <-{ it_layout i32 } - LocInfoE loc_59 ((LocInfoE loc_59 (use{it_layout i32} (LocInfoE loc_62 ("a")))) -{IntOp i32, IntOp i32} (LocInfoE loc_59 (i2v 1 i32))) ; - locinfo: loc_60 ; - Goto "continue12" - ]> $ - <[ "#3" := - locinfo: loc_53 ; - Return (LocInfoE loc_54 (use{it_layout i32} (LocInfoE loc_55 ("b")))) - ]> $ - <[ "continue12" := - locinfo: loc_52 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [init_int]. *) - Definition impl_init_int : function := {| - f_args := [ - ("out", LPtr) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_70 ; - LocInfoE loc_72 (!{LPtr} (LocInfoE loc_73 ("out"))) <-{ it_layout i32 } - LocInfoE loc_74 (i2v 1 i32) ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [init_int_test]. *) - Definition impl_init_int_test (init_int : loc): function := {| - f_args := [ - ("out", LPtr) - ]; - f_local_vars := [ - ("i", it_layout i32) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_77 ; - "_" <- LocInfoE loc_84 (init_int) with - [ LocInfoE loc_85 (&(LocInfoE loc_86 ("i"))) ] ; - locinfo: loc_78 ; - "_" <- LocInfoE loc_80 (init_int) with - [ LocInfoE loc_81 (&(LocInfoE loc_82 ("i"))) ] ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [struct_test]. *) - Definition impl_struct_test : function := {| - f_args := [ - ("out", LPtr) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_89 ; - LocInfoE loc_95 (!{LPtr} (LocInfoE loc_96 ("out"))) <-{ layout_of struct_basic } - StructInit struct_basic [ - ("a", LocInfoE loc_101 (i2v 1 i32) : expr) ; - ("b", i2v 0 i32 : expr) - ] ; - locinfo: loc_90 ; - LocInfoE loc_91 ((LocInfoE loc_92 (!{LPtr} (LocInfoE loc_93 ("out")))) at{struct_basic} "a") <-{ it_layout i32 } - LocInfoE loc_90 ((LocInfoE loc_90 (use{it_layout i32} (LocInfoE loc_91 ((LocInfoE loc_92 (!{LPtr} (LocInfoE loc_93 ("out")))) at{struct_basic} "a")))) +{IntOp i32, IntOp i32} (LocInfoE loc_90 (i2v 1 i32))) ; - Return (VOID) - ]> $∅ - )%E - |}. -End code. diff --git a/theories/examples/tutorial/t1_basic_proof_add1.v b/theories/examples/tutorial/t1_basic_proof_add1.v deleted file mode 100644 index 168c9ccaea5b1f0d7615b8e81ae0334970e393d4..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t1_basic_proof_add1.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t1_basic_code. -From refinedc.examples.tutorial Require Import t1_basic_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t1_basic.c]. *) -Section proof_add1. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [add1]. *) - Lemma type_add1 : - ⊢ typed_function impl_add1 type_of_add1. - Proof. - start_function "add1" (n) => arg_a. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "add1" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "add1". - Qed. -End proof_add1. diff --git a/theories/examples/tutorial/t1_basic_proof_init_int.v b/theories/examples/tutorial/t1_basic_proof_init_int.v deleted file mode 100644 index a0b2e4c6c6a42b06756a63c01a4417e64efbccc4..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t1_basic_proof_init_int.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t1_basic_code. -From refinedc.examples.tutorial Require Import t1_basic_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t1_basic.c]. *) -Section proof_init_int. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [init_int]. *) - Lemma type_init_int : - ⊢ typed_function impl_init_int type_of_init_int. - Proof. - start_function "init_int" (p) => arg_out. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "init_int" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "init_int". - Qed. -End proof_init_int. diff --git a/theories/examples/tutorial/t1_basic_proof_init_int_test.v b/theories/examples/tutorial/t1_basic_proof_init_int_test.v deleted file mode 100644 index 03e2b3520976d788a992bcf60a430bb77466fd4c..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t1_basic_proof_init_int_test.v +++ /dev/null @@ -1,26 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t1_basic_code. -From refinedc.examples.tutorial Require Import t1_basic_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t1_basic.c]. *) -Section proof_init_int_test. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [init_int_test]. *) - Lemma type_init_int_test (init_int : loc) : - init_int â—áµ¥ init_int @ function_ptr type_of_init_int -∗ - typed_function (impl_init_int_test init_int) type_of_init_int_test. - Proof. - start_function "init_int_test" (p) => arg_out local_i. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "init_int_test" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "init_int_test". - Qed. -End proof_init_int_test. diff --git a/theories/examples/tutorial/t1_basic_proof_int_id.v b/theories/examples/tutorial/t1_basic_proof_int_id.v deleted file mode 100644 index fcb6c3a9ed2c16d91257cda2c9259283c803f344..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t1_basic_proof_int_id.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t1_basic_code. -From refinedc.examples.tutorial Require Import t1_basic_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t1_basic.c]. *) -Section proof_int_id. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [int_id]. *) - Lemma type_int_id : - ⊢ typed_function impl_int_id type_of_int_id. - Proof. - start_function "int_id" ([]) => arg_a. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "int_id" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "int_id". - Qed. -End proof_int_id. diff --git a/theories/examples/tutorial/t1_basic_proof_int_id2.v b/theories/examples/tutorial/t1_basic_proof_int_id2.v deleted file mode 100644 index 5b02e6251ea98e8df4c4fd8e8ee92d14aa380876..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t1_basic_proof_int_id2.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t1_basic_code. -From refinedc.examples.tutorial Require Import t1_basic_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t1_basic.c]. *) -Section proof_int_id2. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [int_id2]. *) - Lemma type_int_id2 : - ⊢ typed_function impl_int_id2 type_of_int_id2. - Proof. - start_function "int_id2" (n) => arg_a. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "int_id2" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "int_id2". - Qed. -End proof_int_id2. diff --git a/theories/examples/tutorial/t1_basic_proof_looping_add.v b/theories/examples/tutorial/t1_basic_proof_looping_add.v deleted file mode 100644 index 5194585fde9a137b606754c5c77409d4cc9afeaa..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t1_basic_proof_looping_add.v +++ /dev/null @@ -1,33 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t1_basic_code. -From refinedc.examples.tutorial Require Import t1_basic_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t1_basic.c]. *) -Section proof_looping_add. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [looping_add]. *) - Lemma type_looping_add : - ⊢ typed_function impl_looping_add type_of_looping_add. - Proof. - start_function "looping_add" ([va vb]) => arg_a arg_b. - split_blocks (( - <[ "#1" := - ∃ acc : Z, - arg_a â—â‚— (acc @ (int (i32))) ∗ - arg_b â—â‚— ((va + vb - acc) @ (int (i32))) ∗ - ⌜0 <= acc⌠- ]> $ - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "looping_add" "#0". - - repeat liRStep; liShow. - all: print_typesystem_goal "looping_add" "#1". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "looping_add". - Qed. -End proof_looping_add. diff --git a/theories/examples/tutorial/t1_basic_proof_min.v b/theories/examples/tutorial/t1_basic_proof_min.v deleted file mode 100644 index 6ea09f3b500f3cbe0636588fa856957db2ccd9c2..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t1_basic_proof_min.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t1_basic_code. -From refinedc.examples.tutorial Require Import t1_basic_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t1_basic.c]. *) -Section proof_min. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [min]. *) - Lemma type_min : - ⊢ typed_function impl_min type_of_min. - Proof. - start_function "min" ([a b]) => arg_a arg_b local_r. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "min" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "min". - Qed. -End proof_min. diff --git a/theories/examples/tutorial/t1_basic_proof_struct_test.v b/theories/examples/tutorial/t1_basic_proof_struct_test.v deleted file mode 100644 index 828dc7d4b8b3f5a68993b84bfe4517f89a8b5e39..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t1_basic_proof_struct_test.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t1_basic_code. -From refinedc.examples.tutorial Require Import t1_basic_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t1_basic.c]. *) -Section proof_struct_test. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [struct_test]. *) - Lemma type_struct_test : - ⊢ typed_function impl_struct_test type_of_struct_test. - Proof. - start_function "struct_test" (p) => arg_out. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "struct_test" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "struct_test". - Qed. -End proof_struct_test. diff --git a/theories/examples/tutorial/t1_basic_spec.v b/theories/examples/tutorial/t1_basic_spec.v deleted file mode 100644 index 338920a5279a630bff2aa03700df8dc665f3f160..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t1_basic_spec.v +++ /dev/null @@ -1,49 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t1_basic_code. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t1_basic.c]. *) -Section spec. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Type definitions. *) - - (* Specifications for function [int_id]. *) - Definition type_of_int_id := - fn(∀ () : (); (int (i32)); True) → ∃ () : (), (int (i32)); True. - - (* Specifications for function [int_id2]. *) - Definition type_of_int_id2 := - fn(∀ n : Z; (n @ (int (i32))); True) - → ∃ () : (), (n @ (int (i32))); True. - - (* Specifications for function [add1]. *) - Definition type_of_add1 := - fn(∀ n : Z; (n @ (int (i32))); ⌜n + 1 < it_max i32âŒ) - → ∃ () : (), ((n + 1) @ (int (i32))); True. - - (* Specifications for function [min]. *) - Definition type_of_min := - fn(∀ (a, b) : Z * Z; (a @ (int (i32))), (b @ (int (i32))); True) - → ∃ () : (), ((a `min` b) @ (int (i32))); True. - - (* Specifications for function [looping_add]. *) - Definition type_of_looping_add := - fn(∀ (va, vb) : Z * Z; (va @ (int (i32))), (vb @ (int (i32))); ⌜va + vb < it_max i32⌠∗ ⌜0 <= vaâŒ) - → ∃ () : (), ((va + vb) @ (int (i32))); True. - - (* Specifications for function [init_int]. *) - Definition type_of_init_int := - fn(∀ p : loc; (p @ (&own (uninit (i32)))); True) - → ∃ () : (), (void); (p â—â‚— ((1) @ (int (i32)))). - - (* Specifications for function [init_int_test]. *) - Definition type_of_init_int_test := - fn(∀ p : loc; (p @ (&own (uninit (i32)))); True) - → ∃ () : (), (void); True. - - (* Specifications for function [struct_test]. *) - Definition type_of_struct_test := - fn(∀ p : loc; (p @ (&own (uninit (struct_basic)))); True) - → ∃ () : (), (void); (p â—â‚— (struct (struct_basic) [@{type} (2) @ (int (i32)) ; (0) @ (int (i32)) ])). -End spec. diff --git a/theories/examples/tutorial/t2_pointers.c.generate b/theories/examples/tutorial/t2_pointers.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/tutorial/t2_pointers_code.v b/theories/examples/tutorial/t2_pointers_code.v deleted file mode 100644 index 19be6bdbaee1678f80892bc478f0b441ba2d8bd8..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t2_pointers_code.v +++ /dev/null @@ -1,394 +0,0 @@ -From refinedc.lang Require Export notation. -From refinedc.lang Require Import tactics. -From refinedc.typing Require Import annotations. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t2_pointers.c]. *) -Section code. - Definition file_0 : string := "theories/examples/tutorial/t2_pointers.c". - Definition loc_2 : location_info := LocationInfo file_0 14 4 14 14. - Definition loc_3 : location_info := LocationInfo file_0 14 11 14 13. - Definition loc_4 : location_info := LocationInfo file_0 14 11 14 13. - Definition loc_5 : location_info := LocationInfo file_0 14 12 14 13. - Definition loc_6 : location_info := LocationInfo file_0 14 12 14 13. - Definition loc_9 : location_info := LocationInfo file_0 19 4 19 18. - Definition loc_10 : location_info := LocationInfo file_0 20 4 20 32. - Definition loc_11 : location_info := LocationInfo file_0 21 4 21 26. - Definition loc_12 : location_info := LocationInfo file_0 22 4 22 23. - Definition loc_13 : location_info := LocationInfo file_0 22 11 22 21. - Definition loc_14 : location_info := LocationInfo file_0 22 11 22 16. - Definition loc_15 : location_info := LocationInfo file_0 22 11 22 16. - Definition loc_16 : location_info := LocationInfo file_0 22 20 22 21. - Definition loc_17 : location_info := LocationInfo file_0 21 11 21 24. - Definition loc_18 : location_info := LocationInfo file_0 21 11 21 16. - Definition loc_19 : location_info := LocationInfo file_0 21 11 21 16. - Definition loc_20 : location_info := LocationInfo file_0 21 20 21 24. - Definition loc_21 : location_info := LocationInfo file_0 21 20 21 24. - Definition loc_22 : location_info := LocationInfo file_0 20 15 20 31. - Definition loc_23 : location_info := LocationInfo file_0 20 15 20 23. - Definition loc_24 : location_info := LocationInfo file_0 20 15 20 23. - Definition loc_25 : location_info := LocationInfo file_0 20 24 20 30. - Definition loc_26 : location_info := LocationInfo file_0 20 25 20 30. - Definition loc_29 : location_info := LocationInfo file_0 19 16 19 17. - Definition loc_34 : location_info := LocationInfo file_0 29 4 29 19. - Definition loc_35 : location_info := LocationInfo file_0 30 4 30 11. - Definition loc_36 : location_info := LocationInfo file_0 31 4 31 24. - Definition loc_37 : location_info := LocationInfo file_0 31 11 31 22. - Definition loc_38 : location_info := LocationInfo file_0 31 11 31 13. - Definition loc_39 : location_info := LocationInfo file_0 31 11 31 13. - Definition loc_40 : location_info := LocationInfo file_0 31 12 31 13. - Definition loc_41 : location_info := LocationInfo file_0 31 12 31 13. - Definition loc_42 : location_info := LocationInfo file_0 31 17 31 22. - Definition loc_43 : location_info := LocationInfo file_0 31 17 31 22. - Definition loc_44 : location_info := LocationInfo file_0 30 4 30 6. - Definition loc_45 : location_info := LocationInfo file_0 30 5 30 6. - Definition loc_46 : location_info := LocationInfo file_0 30 5 30 6. - Definition loc_47 : location_info := LocationInfo file_0 30 9 30 10. - Definition loc_48 : location_info := LocationInfo file_0 29 16 29 18. - Definition loc_49 : location_info := LocationInfo file_0 29 16 29 18. - Definition loc_50 : location_info := LocationInfo file_0 29 17 29 18. - Definition loc_51 : location_info := LocationInfo file_0 29 17 29 18. - Definition loc_56 : location_info := LocationInfo file_0 36 4 36 23. - Definition loc_57 : location_info := LocationInfo file_0 38 4 38 13. - Definition loc_58 : location_info := LocationInfo file_0 39 4 47 5. - Definition loc_59 : location_info := LocationInfo file_0 39 10 43 5. - Definition loc_60 : location_info := LocationInfo file_0 40 8 40 20. - Definition loc_61 : location_info := LocationInfo file_0 41 8 41 19. - Definition loc_62 : location_info := LocationInfo file_0 42 8 42 14. - Definition loc_63 : location_info := LocationInfo file_0 42 14 42 9. - Definition loc_64 : location_info := LocationInfo file_0 42 8 42 13. - Definition loc_65 : location_info := LocationInfo file_0 42 9 42 13. - Definition loc_66 : location_info := LocationInfo file_0 42 11 42 12. - Definition loc_67 : location_info := LocationInfo file_0 42 11 42 12. - Definition loc_68 : location_info := LocationInfo file_0 41 8 41 13. - Definition loc_69 : location_info := LocationInfo file_0 41 16 41 18. - Definition loc_70 : location_info := LocationInfo file_0 41 16 41 18. - Definition loc_71 : location_info := LocationInfo file_0 41 17 41 18. - Definition loc_72 : location_info := LocationInfo file_0 41 17 41 18. - Definition loc_73 : location_info := LocationInfo file_0 40 8 40 13. - Definition loc_74 : location_info := LocationInfo file_0 40 16 40 19. - Definition loc_75 : location_info := LocationInfo file_0 40 16 40 19. - Definition loc_76 : location_info := LocationInfo file_0 43 11 47 5. - Definition loc_77 : location_info := LocationInfo file_0 44 8 44 19. - Definition loc_78 : location_info := LocationInfo file_0 45 8 45 14. - Definition loc_79 : location_info := LocationInfo file_0 45 14 45 9. - Definition loc_80 : location_info := LocationInfo file_0 46 8 46 20. - Definition loc_81 : location_info := LocationInfo file_0 46 8 46 13. - Definition loc_82 : location_info := LocationInfo file_0 46 16 46 19. - Definition loc_83 : location_info := LocationInfo file_0 46 16 46 19. - Definition loc_84 : location_info := LocationInfo file_0 45 8 45 13. - Definition loc_85 : location_info := LocationInfo file_0 45 9 45 13. - Definition loc_86 : location_info := LocationInfo file_0 45 11 45 12. - Definition loc_87 : location_info := LocationInfo file_0 45 11 45 12. - Definition loc_88 : location_info := LocationInfo file_0 44 8 44 13. - Definition loc_89 : location_info := LocationInfo file_0 44 16 44 18. - Definition loc_90 : location_info := LocationInfo file_0 44 16 44 18. - Definition loc_91 : location_info := LocationInfo file_0 44 17 44 18. - Definition loc_92 : location_info := LocationInfo file_0 44 17 44 18. - Definition loc_93 : location_info := LocationInfo file_0 39 7 39 8. - Definition loc_94 : location_info := LocationInfo file_0 39 7 39 8. - Definition loc_95 : location_info := LocationInfo file_0 38 4 38 5. - Definition loc_96 : location_info := LocationInfo file_0 38 8 38 12. - Definition loc_97 : location_info := LocationInfo file_0 38 9 38 12. - Definition loc_98 : location_info := LocationInfo file_0 36 14 36 15. - Definition loc_103 : location_info := LocationInfo file_0 54 4 54 11. - Definition loc_104 : location_info := LocationInfo file_0 55 4 55 11. - Definition loc_105 : location_info := LocationInfo file_0 56 4 64 5. - Definition loc_106 : location_info := LocationInfo file_0 56 10 60 5. - Definition loc_107 : location_info := LocationInfo file_0 57 8 57 12. - Definition loc_108 : location_info := LocationInfo file_0 58 8 58 15. - Definition loc_109 : location_info := LocationInfo file_0 58 15 58 9. - Definition loc_110 : location_info := LocationInfo file_0 59 8 59 12. - Definition loc_111 : location_info := LocationInfo file_0 59 8 59 11. - Definition loc_112 : location_info := LocationInfo file_0 59 8 59 11. - Definition loc_113 : location_info := LocationInfo file_0 59 9 59 11. - Definition loc_114 : location_info := LocationInfo file_0 59 9 59 11. - Definition loc_115 : location_info := LocationInfo file_0 58 8 58 14. - Definition loc_116 : location_info := LocationInfo file_0 58 9 58 14. - Definition loc_117 : location_info := LocationInfo file_0 58 11 58 13. - Definition loc_118 : location_info := LocationInfo file_0 58 11 58 13. - Definition loc_119 : location_info := LocationInfo file_0 57 8 57 11. - Definition loc_120 : location_info := LocationInfo file_0 57 8 57 11. - Definition loc_121 : location_info := LocationInfo file_0 57 9 57 11. - Definition loc_122 : location_info := LocationInfo file_0 57 9 57 11. - Definition loc_123 : location_info := LocationInfo file_0 60 11 64 5. - Definition loc_124 : location_info := LocationInfo file_0 61 8 61 12. - Definition loc_125 : location_info := LocationInfo file_0 62 8 62 15. - Definition loc_126 : location_info := LocationInfo file_0 62 15 62 9. - Definition loc_127 : location_info := LocationInfo file_0 63 8 63 12. - Definition loc_128 : location_info := LocationInfo file_0 63 8 63 11. - Definition loc_129 : location_info := LocationInfo file_0 63 8 63 11. - Definition loc_130 : location_info := LocationInfo file_0 63 9 63 11. - Definition loc_131 : location_info := LocationInfo file_0 63 9 63 11. - Definition loc_132 : location_info := LocationInfo file_0 62 8 62 14. - Definition loc_133 : location_info := LocationInfo file_0 62 9 62 14. - Definition loc_134 : location_info := LocationInfo file_0 62 11 62 13. - Definition loc_135 : location_info := LocationInfo file_0 62 11 62 13. - Definition loc_136 : location_info := LocationInfo file_0 61 8 61 11. - Definition loc_137 : location_info := LocationInfo file_0 61 8 61 11. - Definition loc_138 : location_info := LocationInfo file_0 61 9 61 11. - Definition loc_139 : location_info := LocationInfo file_0 61 9 61 11. - Definition loc_140 : location_info := LocationInfo file_0 56 7 56 8. - Definition loc_141 : location_info := LocationInfo file_0 56 7 56 8. - Definition loc_142 : location_info := LocationInfo file_0 55 4 55 6. - Definition loc_143 : location_info := LocationInfo file_0 55 9 55 10. - Definition loc_144 : location_info := LocationInfo file_0 55 9 55 10. - Definition loc_145 : location_info := LocationInfo file_0 54 4 54 6. - Definition loc_146 : location_info := LocationInfo file_0 54 9 54 10. - Definition loc_147 : location_info := LocationInfo file_0 54 9 54 10. - Definition loc_150 : location_info := LocationInfo file_0 71 4 71 12. - Definition loc_151 : location_info := LocationInfo file_0 72 4 80 5. - Definition loc_152 : location_info := LocationInfo file_0 72 10 76 5. - Definition loc_153 : location_info := LocationInfo file_0 73 8 73 13. - Definition loc_154 : location_info := LocationInfo file_0 74 8 74 15. - Definition loc_155 : location_info := LocationInfo file_0 74 15 74 9. - Definition loc_156 : location_info := LocationInfo file_0 75 8 75 11. - Definition loc_157 : location_info := LocationInfo file_0 75 8 75 10. - Definition loc_158 : location_info := LocationInfo file_0 75 8 75 10. - Definition loc_159 : location_info := LocationInfo file_0 75 9 75 10. - Definition loc_160 : location_info := LocationInfo file_0 75 9 75 10. - Definition loc_161 : location_info := LocationInfo file_0 74 8 74 14. - Definition loc_162 : location_info := LocationInfo file_0 74 9 74 14. - Definition loc_163 : location_info := LocationInfo file_0 74 11 74 13. - Definition loc_164 : location_info := LocationInfo file_0 74 11 74 13. - Definition loc_165 : location_info := LocationInfo file_0 73 8 73 12. - Definition loc_166 : location_info := LocationInfo file_0 73 8 73 12. - Definition loc_167 : location_info := LocationInfo file_0 73 9 73 12. - Definition loc_168 : location_info := LocationInfo file_0 73 9 73 12. - Definition loc_169 : location_info := LocationInfo file_0 73 10 73 12. - Definition loc_170 : location_info := LocationInfo file_0 73 10 73 12. - Definition loc_171 : location_info := LocationInfo file_0 76 11 80 5. - Definition loc_172 : location_info := LocationInfo file_0 77 8 77 11. - Definition loc_173 : location_info := LocationInfo file_0 78 8 78 13. - Definition loc_174 : location_info := LocationInfo file_0 79 8 79 15. - Definition loc_175 : location_info := LocationInfo file_0 79 15 79 9. - Definition loc_176 : location_info := LocationInfo file_0 79 8 79 14. - Definition loc_177 : location_info := LocationInfo file_0 79 9 79 14. - Definition loc_178 : location_info := LocationInfo file_0 79 11 79 13. - Definition loc_179 : location_info := LocationInfo file_0 79 11 79 13. - Definition loc_180 : location_info := LocationInfo file_0 78 8 78 12. - Definition loc_181 : location_info := LocationInfo file_0 78 8 78 12. - Definition loc_182 : location_info := LocationInfo file_0 78 9 78 12. - Definition loc_183 : location_info := LocationInfo file_0 78 9 78 12. - Definition loc_184 : location_info := LocationInfo file_0 78 10 78 12. - Definition loc_185 : location_info := LocationInfo file_0 78 10 78 12. - Definition loc_186 : location_info := LocationInfo file_0 77 8 77 10. - Definition loc_187 : location_info := LocationInfo file_0 77 8 77 10. - Definition loc_188 : location_info := LocationInfo file_0 77 9 77 10. - Definition loc_189 : location_info := LocationInfo file_0 77 9 77 10. - Definition loc_190 : location_info := LocationInfo file_0 72 7 72 8. - Definition loc_191 : location_info := LocationInfo file_0 72 7 72 8. - Definition loc_192 : location_info := LocationInfo file_0 71 4 71 6. - Definition loc_193 : location_info := LocationInfo file_0 71 9 71 11. - Definition loc_194 : location_info := LocationInfo file_0 71 10 71 11. - - (* Definition of function [read_int]. *) - Definition impl_read_int : function := {| - f_args := [ - ("a", LPtr) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_2 ; - Return (LocInfoE loc_3 (use{it_layout i32} (LocInfoE loc_5 (!{LPtr} (LocInfoE loc_6 ("a")))))) - ]> $∅ - )%E - |}. - - (* Definition of function [use_read_int]. *) - Definition impl_use_read_int (read_int : loc): function := {| - f_args := [ - ]; - f_local_vars := [ - ("local", it_layout i32); - ("read", it_layout i32) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "local" <-{ it_layout i32 } LocInfoE loc_29 (i2v 1 i32) ; - locinfo: loc_22 ; - "$0" <- LocInfoE loc_24 (read_int) with - [ LocInfoE loc_25 (&(LocInfoE loc_26 ("local"))) ] ; - "read" <-{ it_layout i32 } LocInfoE loc_22 ("$0") ; - locinfo: loc_11 ; - assert: (LocInfoE loc_17 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_17 ((LocInfoE loc_18 (use{it_layout i32} (LocInfoE loc_19 ("local")))) ={IntOp i32, IntOp i32} (LocInfoE loc_20 (use{it_layout i32} (LocInfoE loc_21 ("read")))))))) ; - locinfo: loc_12 ; - assert: (LocInfoE loc_13 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_13 ((LocInfoE loc_14 (use{it_layout i32} (LocInfoE loc_15 ("local")))) ={IntOp i32, IntOp i32} (LocInfoE loc_16 (i2v 1 i32)))))) ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [no_alias]. *) - Definition impl_no_alias : function := {| - f_args := [ - ("a", LPtr); - ("b", LPtr) - ]; - f_local_vars := [ - ("old_b", it_layout i32) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "old_b" <-{ it_layout i32 } - LocInfoE loc_48 (use{it_layout i32} (LocInfoE loc_50 (!{LPtr} (LocInfoE loc_51 ("b"))))) ; - locinfo: loc_35 ; - LocInfoE loc_45 (!{LPtr} (LocInfoE loc_46 ("a"))) <-{ it_layout i32 } - LocInfoE loc_47 (i2v 1 i32) ; - locinfo: loc_36 ; - assert: (LocInfoE loc_37 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_37 ((LocInfoE loc_38 (use{it_layout i32} (LocInfoE loc_40 (!{LPtr} (LocInfoE loc_41 ("b")))))) ={IntOp i32, IntOp i32} (LocInfoE loc_42 (use{it_layout i32} (LocInfoE loc_43 ("old_b")))))))) ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [local_vars]. *) - Definition impl_local_vars : function := {| - f_args := [ - ("b", it_layout bool_it) - ]; - f_local_vars := [ - ("var", it_layout i32); - ("dummy", it_layout i32); - ("p", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "var" <-{ it_layout i32 } LocInfoE loc_98 (i2v 1 i32) ; - locinfo: loc_57 ; - LocInfoE loc_95 ("p") <-{ LPtr } - LocInfoE loc_96 (&(LocInfoE loc_97 ("var"))) ; - locinfo: loc_93 ; - if: LocInfoE loc_93 (use{it_layout bool_it} (LocInfoE loc_94 ("b"))) - then - locinfo: loc_60 ; - Goto "#1" - else - locinfo: loc_77 ; - Goto "#2" - ]> $ - <[ "#1" := - locinfo: loc_60 ; - LocInfoE loc_73 ("dummy") <-{ it_layout i32 } - LocInfoE loc_74 (use{it_layout i32} (LocInfoE loc_75 ("var"))) ; - locinfo: loc_61 ; - LocInfoE loc_68 ("dummy") <-{ it_layout i32 } - LocInfoE loc_69 (use{it_layout i32} (LocInfoE loc_71 (!{LPtr} (LocInfoE loc_72 ("p"))))) ; - locinfo: loc_62 ; - expr: (LocInfoE loc_64 (&(LocInfoE loc_66 (!{LPtr} (LocInfoE loc_67 ("p")))))) ; - Return (VOID) - ]> $ - <[ "#2" := - locinfo: loc_77 ; - LocInfoE loc_88 ("dummy") <-{ it_layout i32 } - LocInfoE loc_89 (use{it_layout i32} (LocInfoE loc_91 (!{LPtr} (LocInfoE loc_92 ("p"))))) ; - locinfo: loc_78 ; - expr: (LocInfoE loc_84 (&(LocInfoE loc_86 (!{LPtr} (LocInfoE loc_87 ("p")))))) ; - locinfo: loc_80 ; - LocInfoE loc_81 ("dummy") <-{ it_layout i32 } - LocInfoE loc_82 (use{it_layout i32} (LocInfoE loc_83 ("var"))) ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [ptrs]. *) - Definition impl_ptrs : function := {| - f_args := [ - ("b", it_layout bool_it); - ("p", LPtr) - ]; - f_local_vars := [ - ("p1", LPtr); - ("p2", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_103 ; - LocInfoE loc_145 ("p1") <-{ LPtr } - LocInfoE loc_146 (use{LPtr} (LocInfoE loc_147 ("p"))) ; - locinfo: loc_104 ; - LocInfoE loc_142 ("p2") <-{ LPtr } - LocInfoE loc_143 (use{LPtr} (LocInfoE loc_144 ("p"))) ; - locinfo: loc_140 ; - if: LocInfoE loc_140 (use{it_layout bool_it} (LocInfoE loc_141 ("b"))) - then - locinfo: loc_107 ; - Goto "#1" - else - locinfo: loc_124 ; - Goto "#2" - ]> $ - <[ "#1" := - locinfo: loc_107 ; - expr: (LocInfoE loc_119 (use{it_layout i32} (LocInfoE loc_121 (!{LPtr} (LocInfoE loc_122 ("p1")))))) ; - locinfo: loc_108 ; - expr: (LocInfoE loc_115 (&(LocInfoE loc_117 (!{LPtr} (LocInfoE loc_118 ("p1")))))) ; - locinfo: loc_110 ; - expr: (LocInfoE loc_111 (use{it_layout i32} (LocInfoE loc_113 (!{LPtr} (LocInfoE loc_114 ("p2")))))) ; - Return (VOID) - ]> $ - <[ "#2" := - locinfo: loc_124 ; - expr: (LocInfoE loc_136 (use{it_layout i32} (LocInfoE loc_138 (!{LPtr} (LocInfoE loc_139 ("p2")))))) ; - locinfo: loc_125 ; - expr: (LocInfoE loc_132 (&(LocInfoE loc_134 (!{LPtr} (LocInfoE loc_135 ("p2")))))) ; - locinfo: loc_127 ; - expr: (LocInfoE loc_128 (use{it_layout i32} (LocInfoE loc_130 (!{LPtr} (LocInfoE loc_131 ("p1")))))) ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [ptrs2]. *) - Definition impl_ptrs2 : function := {| - f_args := [ - ("b", it_layout bool_it); - ("p", LPtr) - ]; - f_local_vars := [ - ("p1", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_150 ; - LocInfoE loc_192 ("p1") <-{ LPtr } - LocInfoE loc_193 (&(LocInfoE loc_194 ("p"))) ; - locinfo: loc_190 ; - if: LocInfoE loc_190 (use{it_layout bool_it} (LocInfoE loc_191 ("b"))) - then - locinfo: loc_153 ; - Goto "#1" - else - locinfo: loc_172 ; - Goto "#2" - ]> $ - <[ "#1" := - locinfo: loc_153 ; - expr: (LocInfoE loc_165 (use{it_layout i32} (LocInfoE loc_167 (!{LPtr} (LocInfoE loc_169 (!{LPtr} (LocInfoE loc_170 ("p1")))))))) ; - locinfo: loc_154 ; - expr: (LocInfoE loc_161 (&(LocInfoE loc_163 (!{LPtr} (LocInfoE loc_164 ("p1")))))) ; - locinfo: loc_156 ; - expr: (LocInfoE loc_157 (use{it_layout i32} (LocInfoE loc_159 (!{LPtr} (LocInfoE loc_160 ("p")))))) ; - Return (VOID) - ]> $ - <[ "#2" := - locinfo: loc_172 ; - expr: (LocInfoE loc_186 (use{it_layout i32} (LocInfoE loc_188 (!{LPtr} (LocInfoE loc_189 ("p")))))) ; - locinfo: loc_173 ; - expr: (LocInfoE loc_180 (use{it_layout i32} (LocInfoE loc_182 (!{LPtr} (LocInfoE loc_184 (!{LPtr} (LocInfoE loc_185 ("p1")))))))) ; - locinfo: loc_174 ; - expr: (LocInfoE loc_176 (&(LocInfoE loc_178 (!{LPtr} (LocInfoE loc_179 ("p1")))))) ; - Return (VOID) - ]> $∅ - )%E - |}. -End code. diff --git a/theories/examples/tutorial/t2_pointers_proof_local_vars.v b/theories/examples/tutorial/t2_pointers_proof_local_vars.v deleted file mode 100644 index e710add14ed1702e042d05b36fd1333510e7be45..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t2_pointers_proof_local_vars.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t2_pointers_code. -From refinedc.examples.tutorial Require Import t2_pointers_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t2_pointers.c]. *) -Section proof_local_vars. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [local_vars]. *) - Lemma type_local_vars : - ⊢ typed_function impl_local_vars type_of_local_vars. - Proof. - start_function "local_vars" ([]) => arg_b local_var local_dummy local_p. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "local_vars" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "local_vars". - Qed. -End proof_local_vars. diff --git a/theories/examples/tutorial/t2_pointers_proof_no_alias.v b/theories/examples/tutorial/t2_pointers_proof_no_alias.v deleted file mode 100644 index a559cb2dd250262bc4dfe5c6023eafbf080022f6..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t2_pointers_proof_no_alias.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t2_pointers_code. -From refinedc.examples.tutorial Require Import t2_pointers_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t2_pointers.c]. *) -Section proof_no_alias. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [no_alias]. *) - Lemma type_no_alias : - ⊢ typed_function impl_no_alias type_of_no_alias. - Proof. - start_function "no_alias" ([p q]) => arg_a arg_b local_old_b. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "no_alias" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "no_alias". - Qed. -End proof_no_alias. diff --git a/theories/examples/tutorial/t2_pointers_proof_ptrs.v b/theories/examples/tutorial/t2_pointers_proof_ptrs.v deleted file mode 100644 index 2610afbc92b23fd7d14c99f244a1c7853a8ca6a1..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t2_pointers_proof_ptrs.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t2_pointers_code. -From refinedc.examples.tutorial Require Import t2_pointers_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t2_pointers.c]. *) -Section proof_ptrs. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [ptrs]. *) - Lemma type_ptrs : - ⊢ typed_function impl_ptrs type_of_ptrs. - Proof. - start_function "ptrs" (p) => arg_b arg_p local_p1 local_p2. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "ptrs" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "ptrs". - Qed. -End proof_ptrs. diff --git a/theories/examples/tutorial/t2_pointers_proof_ptrs2.v b/theories/examples/tutorial/t2_pointers_proof_ptrs2.v deleted file mode 100644 index 33c6e300d5c8a87f093c85dc1b6151e2df8173fa..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t2_pointers_proof_ptrs2.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t2_pointers_code. -From refinedc.examples.tutorial Require Import t2_pointers_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t2_pointers.c]. *) -Section proof_ptrs2. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [ptrs2]. *) - Lemma type_ptrs2 : - ⊢ typed_function impl_ptrs2 type_of_ptrs2. - Proof. - start_function "ptrs2" (p) => arg_b arg_p local_p1. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "ptrs2" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "ptrs2". - Qed. -End proof_ptrs2. diff --git a/theories/examples/tutorial/t2_pointers_proof_read_int.v b/theories/examples/tutorial/t2_pointers_proof_read_int.v deleted file mode 100644 index e03e3236c867e96ada5baa5ea751525d07a79354..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t2_pointers_proof_read_int.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t2_pointers_code. -From refinedc.examples.tutorial Require Import t2_pointers_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t2_pointers.c]. *) -Section proof_read_int. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [read_int]. *) - Lemma type_read_int : - ⊢ typed_function impl_read_int type_of_read_int. - Proof. - start_function "read_int" ([p n]) => arg_a. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "read_int" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "read_int". - Qed. -End proof_read_int. diff --git a/theories/examples/tutorial/t2_pointers_proof_use_read_int.v b/theories/examples/tutorial/t2_pointers_proof_use_read_int.v deleted file mode 100644 index 33927290b6279c38608e7b7c67d3fbbdbfc56e5a..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t2_pointers_proof_use_read_int.v +++ /dev/null @@ -1,26 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t2_pointers_code. -From refinedc.examples.tutorial Require Import t2_pointers_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t2_pointers.c]. *) -Section proof_use_read_int. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [use_read_int]. *) - Lemma type_use_read_int (read_int : loc) : - read_int â—áµ¥ read_int @ function_ptr type_of_read_int -∗ - typed_function (impl_use_read_int read_int) type_of_use_read_int. - Proof. - start_function "use_read_int" ([]) => local_local local_read. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "use_read_int" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "use_read_int". - Qed. -End proof_use_read_int. diff --git a/theories/examples/tutorial/t2_pointers_spec.v b/theories/examples/tutorial/t2_pointers_spec.v deleted file mode 100644 index 9346f5a0cea4ca4d75096490f43694312054b78a..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t2_pointers_spec.v +++ /dev/null @@ -1,38 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t2_pointers_code. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t2_pointers.c]. *) -Section spec. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Type definitions. *) - - (* Specifications for function [read_int]. *) - Definition type_of_read_int := - fn(∀ (p, n) : loc * Z; (p @ (&own (n @ (int (i32))))); True) - → ∃ () : (), (n @ (int (i32))); (p â—â‚— (n @ (int (i32)))). - - (* Specifications for function [use_read_int]. *) - Definition type_of_use_read_int := - fn(∀ () : (); True) → ∃ () : (), (void); True. - - (* Specifications for function [no_alias]. *) - Definition type_of_no_alias := - fn(∀ (p, q) : loc * loc; (p @ (&own (int (i32)))), (q @ (&own (int (i32)))); True) - → ∃ () : (), (void); (p â—â‚— ((1) @ (int (i32)))) ∗ (q â—â‚— (int (i32))). - - (* Specifications for function [local_vars]. *) - Definition type_of_local_vars := - fn(∀ () : (); (boolean (bool_it)); True) → ∃ () : (), (void); True. - - (* Specifications for function [ptrs]. *) - Definition type_of_ptrs := - fn(∀ p : loc; (boolean (bool_it)), (p @ (&own (int (i32)))); True) - → ∃ () : (), (void); True. - - (* Specifications for function [ptrs2]. *) - Definition type_of_ptrs2 := - fn(∀ p : loc; (boolean (bool_it)), (p @ (&own (int (i32)))); True) - → ∃ () : (), (void); True. -End spec. diff --git a/theories/examples/tutorial/t3_list.c.generate b/theories/examples/tutorial/t3_list.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/tutorial/t3_list_code.v b/theories/examples/tutorial/t3_list_code.v deleted file mode 100644 index ca93b793fa090d554af23b6a4a2e5421da304bba..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t3_list_code.v +++ /dev/null @@ -1,833 +0,0 @@ -From refinedc.lang Require Export notation. -From refinedc.lang Require Import tactics. -From refinedc.typing Require Import annotations. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t3_list.c]. *) -Section code. - Definition file_0 : string := "theories/examples/tutorial/t3_list.c". - Definition loc_2 : location_info := LocationInfo file_0 124 4 124 25. - Definition loc_3 : location_info := LocationInfo file_0 125 4 125 42. - Definition loc_4 : location_info := LocationInfo file_0 126 4 126 42. - Definition loc_5 : location_info := LocationInfo file_0 127 4 127 42. - Definition loc_6 : location_info := LocationInfo file_0 129 4 129 28. - Definition loc_7 : location_info := LocationInfo file_0 131 4 131 15. - Definition loc_8 : location_info := LocationInfo file_0 132 4 132 15. - Definition loc_9 : location_info := LocationInfo file_0 133 4 133 15. - Definition loc_10 : location_info := LocationInfo file_0 135 4 135 29. - Definition loc_11 : location_info := LocationInfo file_0 136 4 136 29. - Definition loc_12 : location_info := LocationInfo file_0 137 4 137 29. - Definition loc_13 : location_info := LocationInfo file_0 139 4 139 29. - Definition loc_14 : location_info := LocationInfo file_0 141 4 141 25. - Definition loc_15 : location_info := LocationInfo file_0 143 4 143 29. - Definition loc_16 : location_info := LocationInfo file_0 145 4 145 23. - Definition loc_17 : location_info := LocationInfo file_0 146 4 146 23. - Definition loc_18 : location_info := LocationInfo file_0 147 4 147 23. - Definition loc_19 : location_info := LocationInfo file_0 149 4 149 28. - Definition loc_20 : location_info := LocationInfo file_0 151 4 151 32. - Definition loc_21 : location_info := LocationInfo file_0 152 4 152 32. - Definition loc_22 : location_info := LocationInfo file_0 153 4 153 32. - Definition loc_23 : location_info := LocationInfo file_0 155 4 155 32. - Definition loc_24 : location_info := LocationInfo file_0 156 4 156 32. - Definition loc_25 : location_info := LocationInfo file_0 157 4 157 32. - Definition loc_26 : location_info := LocationInfo file_0 157 4 157 8. - Definition loc_27 : location_info := LocationInfo file_0 157 4 157 8. - Definition loc_28 : location_info := LocationInfo file_0 157 9 157 23. - Definition loc_29 : location_info := LocationInfo file_0 157 25 157 30. - Definition loc_30 : location_info := LocationInfo file_0 157 25 157 30. - Definition loc_31 : location_info := LocationInfo file_0 156 4 156 8. - Definition loc_32 : location_info := LocationInfo file_0 156 4 156 8. - Definition loc_33 : location_info := LocationInfo file_0 156 9 156 23. - Definition loc_34 : location_info := LocationInfo file_0 156 25 156 30. - Definition loc_35 : location_info := LocationInfo file_0 156 25 156 30. - Definition loc_36 : location_info := LocationInfo file_0 155 4 155 8. - Definition loc_37 : location_info := LocationInfo file_0 155 4 155 8. - Definition loc_38 : location_info := LocationInfo file_0 155 9 155 23. - Definition loc_39 : location_info := LocationInfo file_0 155 25 155 30. - Definition loc_40 : location_info := LocationInfo file_0 155 25 155 30. - Definition loc_41 : location_info := LocationInfo file_0 153 11 153 30. - Definition loc_42 : location_info := LocationInfo file_0 153 11 153 17. - Definition loc_43 : location_info := LocationInfo file_0 153 11 153 17. - Definition loc_44 : location_info := LocationInfo file_0 153 12 153 17. - Definition loc_45 : location_info := LocationInfo file_0 153 12 153 17. - Definition loc_46 : location_info := LocationInfo file_0 153 21 153 30. - Definition loc_47 : location_info := LocationInfo file_0 153 29 153 30. - Definition loc_48 : location_info := LocationInfo file_0 152 11 152 30. - Definition loc_49 : location_info := LocationInfo file_0 152 11 152 17. - Definition loc_50 : location_info := LocationInfo file_0 152 11 152 17. - Definition loc_51 : location_info := LocationInfo file_0 152 12 152 17. - Definition loc_52 : location_info := LocationInfo file_0 152 12 152 17. - Definition loc_53 : location_info := LocationInfo file_0 152 21 152 30. - Definition loc_54 : location_info := LocationInfo file_0 152 29 152 30. - Definition loc_55 : location_info := LocationInfo file_0 151 11 151 30. - Definition loc_56 : location_info := LocationInfo file_0 151 11 151 17. - Definition loc_57 : location_info := LocationInfo file_0 151 11 151 17. - Definition loc_58 : location_info := LocationInfo file_0 151 12 151 17. - Definition loc_59 : location_info := LocationInfo file_0 151 12 151 17. - Definition loc_60 : location_info := LocationInfo file_0 151 21 151 30. - Definition loc_61 : location_info := LocationInfo file_0 151 29 151 30. - Definition loc_62 : location_info := LocationInfo file_0 149 11 149 26. - Definition loc_63 : location_info := LocationInfo file_0 149 11 149 19. - Definition loc_64 : location_info := LocationInfo file_0 149 11 149 19. - Definition loc_65 : location_info := LocationInfo file_0 149 20 149 25. - Definition loc_66 : location_info := LocationInfo file_0 149 21 149 25. - Definition loc_67 : location_info := LocationInfo file_0 147 4 147 9. - Definition loc_68 : location_info := LocationInfo file_0 147 12 147 22. - Definition loc_69 : location_info := LocationInfo file_0 147 12 147 15. - Definition loc_70 : location_info := LocationInfo file_0 147 12 147 15. - Definition loc_71 : location_info := LocationInfo file_0 147 16 147 21. - Definition loc_72 : location_info := LocationInfo file_0 147 17 147 21. - Definition loc_73 : location_info := LocationInfo file_0 146 4 146 9. - Definition loc_74 : location_info := LocationInfo file_0 146 12 146 22. - Definition loc_75 : location_info := LocationInfo file_0 146 12 146 15. - Definition loc_76 : location_info := LocationInfo file_0 146 12 146 15. - Definition loc_77 : location_info := LocationInfo file_0 146 16 146 21. - Definition loc_78 : location_info := LocationInfo file_0 146 17 146 21. - Definition loc_79 : location_info := LocationInfo file_0 145 4 145 9. - Definition loc_80 : location_info := LocationInfo file_0 145 12 145 22. - Definition loc_81 : location_info := LocationInfo file_0 145 12 145 15. - Definition loc_82 : location_info := LocationInfo file_0 145 12 145 15. - Definition loc_83 : location_info := LocationInfo file_0 145 16 145 21. - Definition loc_84 : location_info := LocationInfo file_0 145 17 145 21. - Definition loc_85 : location_info := LocationInfo file_0 143 11 143 27. - Definition loc_86 : location_info := LocationInfo file_0 143 11 143 17. - Definition loc_87 : location_info := LocationInfo file_0 143 11 143 17. - Definition loc_88 : location_info := LocationInfo file_0 143 18 143 23. - Definition loc_89 : location_info := LocationInfo file_0 143 19 143 23. - Definition loc_90 : location_info := LocationInfo file_0 143 25 143 26. - Definition loc_91 : location_info := LocationInfo file_0 141 4 141 8. - Definition loc_92 : location_info := LocationInfo file_0 141 11 141 24. - Definition loc_93 : location_info := LocationInfo file_0 141 11 141 18. - Definition loc_94 : location_info := LocationInfo file_0 141 11 141 18. - Definition loc_95 : location_info := LocationInfo file_0 141 19 141 23. - Definition loc_96 : location_info := LocationInfo file_0 141 19 141 23. - Definition loc_97 : location_info := LocationInfo file_0 139 11 139 27. - Definition loc_98 : location_info := LocationInfo file_0 139 11 139 17. - Definition loc_99 : location_info := LocationInfo file_0 139 11 139 17. - Definition loc_100 : location_info := LocationInfo file_0 139 18 139 23. - Definition loc_101 : location_info := LocationInfo file_0 139 19 139 23. - Definition loc_102 : location_info := LocationInfo file_0 139 25 139 26. - Definition loc_103 : location_info := LocationInfo file_0 137 4 137 8. - Definition loc_104 : location_info := LocationInfo file_0 137 11 137 28. - Definition loc_105 : location_info := LocationInfo file_0 137 11 137 15. - Definition loc_106 : location_info := LocationInfo file_0 137 11 137 15. - Definition loc_107 : location_info := LocationInfo file_0 137 16 137 20. - Definition loc_108 : location_info := LocationInfo file_0 137 16 137 20. - Definition loc_109 : location_info := LocationInfo file_0 137 22 137 27. - Definition loc_110 : location_info := LocationInfo file_0 137 22 137 27. - Definition loc_111 : location_info := LocationInfo file_0 136 4 136 8. - Definition loc_112 : location_info := LocationInfo file_0 136 11 136 28. - Definition loc_113 : location_info := LocationInfo file_0 136 11 136 15. - Definition loc_114 : location_info := LocationInfo file_0 136 11 136 15. - Definition loc_115 : location_info := LocationInfo file_0 136 16 136 20. - Definition loc_116 : location_info := LocationInfo file_0 136 16 136 20. - Definition loc_117 : location_info := LocationInfo file_0 136 22 136 27. - Definition loc_118 : location_info := LocationInfo file_0 136 22 136 27. - Definition loc_119 : location_info := LocationInfo file_0 135 4 135 8. - Definition loc_120 : location_info := LocationInfo file_0 135 11 135 28. - Definition loc_121 : location_info := LocationInfo file_0 135 11 135 15. - Definition loc_122 : location_info := LocationInfo file_0 135 11 135 15. - Definition loc_123 : location_info := LocationInfo file_0 135 16 135 20. - Definition loc_124 : location_info := LocationInfo file_0 135 16 135 20. - Definition loc_125 : location_info := LocationInfo file_0 135 22 135 27. - Definition loc_126 : location_info := LocationInfo file_0 135 22 135 27. - Definition loc_127 : location_info := LocationInfo file_0 133 4 133 10. - Definition loc_128 : location_info := LocationInfo file_0 133 5 133 10. - Definition loc_129 : location_info := LocationInfo file_0 133 5 133 10. - Definition loc_130 : location_info := LocationInfo file_0 133 13 133 14. - Definition loc_131 : location_info := LocationInfo file_0 132 4 132 10. - Definition loc_132 : location_info := LocationInfo file_0 132 5 132 10. - Definition loc_133 : location_info := LocationInfo file_0 132 5 132 10. - Definition loc_134 : location_info := LocationInfo file_0 132 13 132 14. - Definition loc_135 : location_info := LocationInfo file_0 131 4 131 10. - Definition loc_136 : location_info := LocationInfo file_0 131 5 131 10. - Definition loc_137 : location_info := LocationInfo file_0 131 5 131 10. - Definition loc_138 : location_info := LocationInfo file_0 131 13 131 14. - Definition loc_139 : location_info := LocationInfo file_0 129 11 129 26. - Definition loc_140 : location_info := LocationInfo file_0 129 11 129 19. - Definition loc_141 : location_info := LocationInfo file_0 129 11 129 19. - Definition loc_142 : location_info := LocationInfo file_0 129 20 129 25. - Definition loc_143 : location_info := LocationInfo file_0 129 21 129 25. - Definition loc_144 : location_info := LocationInfo file_0 127 20 127 41. - Definition loc_145 : location_info := LocationInfo file_0 127 20 127 25. - Definition loc_146 : location_info := LocationInfo file_0 127 20 127 25. - Definition loc_147 : location_info := LocationInfo file_0 127 26 127 40. - Definition loc_150 : location_info := LocationInfo file_0 126 20 126 41. - Definition loc_151 : location_info := LocationInfo file_0 126 20 126 25. - Definition loc_152 : location_info := LocationInfo file_0 126 20 126 25. - Definition loc_153 : location_info := LocationInfo file_0 126 26 126 40. - Definition loc_156 : location_info := LocationInfo file_0 125 20 125 41. - Definition loc_157 : location_info := LocationInfo file_0 125 20 125 25. - Definition loc_158 : location_info := LocationInfo file_0 125 20 125 25. - Definition loc_159 : location_info := LocationInfo file_0 125 26 125 40. - Definition loc_162 : location_info := LocationInfo file_0 124 18 124 24. - Definition loc_163 : location_info := LocationInfo file_0 124 18 124 22. - Definition loc_164 : location_info := LocationInfo file_0 124 18 124 22. - Definition loc_169 : location_info := LocationInfo file_0 27 4 27 26. - Definition loc_170 : location_info := LocationInfo file_0 27 11 27 25. - Definition loc_173 : location_info := LocationInfo file_0 35 4 35 32. - Definition loc_174 : location_info := LocationInfo file_0 35 11 35 31. - Definition loc_175 : location_info := LocationInfo file_0 35 11 35 13. - Definition loc_176 : location_info := LocationInfo file_0 35 11 35 13. - Definition loc_177 : location_info := LocationInfo file_0 35 12 35 13. - Definition loc_178 : location_info := LocationInfo file_0 35 12 35 13. - Definition loc_179 : location_info := LocationInfo file_0 35 17 35 31. - Definition loc_182 : location_info := LocationInfo file_0 43 4 43 51. - Definition loc_183 : location_info := LocationInfo file_0 44 4 44 19. - Definition loc_184 : location_info := LocationInfo file_0 45 4 45 19. - Definition loc_185 : location_info := LocationInfo file_0 46 4 46 16. - Definition loc_186 : location_info := LocationInfo file_0 46 11 46 15. - Definition loc_187 : location_info := LocationInfo file_0 46 11 46 15. - Definition loc_188 : location_info := LocationInfo file_0 45 4 45 14. - Definition loc_189 : location_info := LocationInfo file_0 45 4 45 8. - Definition loc_190 : location_info := LocationInfo file_0 45 4 45 8. - Definition loc_191 : location_info := LocationInfo file_0 45 17 45 18. - Definition loc_192 : location_info := LocationInfo file_0 45 17 45 18. - Definition loc_193 : location_info := LocationInfo file_0 44 4 44 14. - Definition loc_194 : location_info := LocationInfo file_0 44 4 44 8. - Definition loc_195 : location_info := LocationInfo file_0 44 4 44 8. - Definition loc_196 : location_info := LocationInfo file_0 44 17 44 18. - Definition loc_197 : location_info := LocationInfo file_0 44 17 44 18. - Definition loc_198 : location_info := LocationInfo file_0 43 24 43 50. - Definition loc_199 : location_info := LocationInfo file_0 43 24 43 29. - Definition loc_200 : location_info := LocationInfo file_0 43 24 43 29. - Definition loc_201 : location_info := LocationInfo file_0 43 30 43 49. - Definition loc_206 : location_info := LocationInfo file_0 55 2 57 3. - Definition loc_207 : location_info := LocationInfo file_0 58 2 58 25. - Definition loc_208 : location_info := LocationInfo file_0 59 2 59 25. - Definition loc_209 : location_info := LocationInfo file_0 60 2 60 18. - Definition loc_210 : location_info := LocationInfo file_0 61 2 61 34. - Definition loc_211 : location_info := LocationInfo file_0 62 2 62 13. - Definition loc_212 : location_info := LocationInfo file_0 62 9 62 12. - Definition loc_213 : location_info := LocationInfo file_0 62 9 62 12. - Definition loc_214 : location_info := LocationInfo file_0 61 2 61 6. - Definition loc_215 : location_info := LocationInfo file_0 61 2 61 6. - Definition loc_216 : location_info := LocationInfo file_0 61 7 61 26. - Definition loc_217 : location_info := LocationInfo file_0 61 28 61 32. - Definition loc_218 : location_info := LocationInfo file_0 61 28 61 32. - Definition loc_219 : location_info := LocationInfo file_0 60 2 60 4. - Definition loc_220 : location_info := LocationInfo file_0 60 3 60 4. - Definition loc_221 : location_info := LocationInfo file_0 60 3 60 4. - Definition loc_222 : location_info := LocationInfo file_0 60 7 60 17. - Definition loc_223 : location_info := LocationInfo file_0 60 7 60 17. - Definition loc_224 : location_info := LocationInfo file_0 60 7 60 11. - Definition loc_225 : location_info := LocationInfo file_0 60 7 60 11. - Definition loc_226 : location_info := LocationInfo file_0 59 14 59 24. - Definition loc_227 : location_info := LocationInfo file_0 59 14 59 24. - Definition loc_228 : location_info := LocationInfo file_0 59 14 59 18. - Definition loc_229 : location_info := LocationInfo file_0 59 14 59 18. - Definition loc_232 : location_info := LocationInfo file_0 58 22 58 24. - Definition loc_233 : location_info := LocationInfo file_0 58 22 58 24. - Definition loc_234 : location_info := LocationInfo file_0 58 23 58 24. - Definition loc_235 : location_info := LocationInfo file_0 58 23 58 24. - Definition loc_238 : location_info := LocationInfo file_0 55 28 57 3. - Definition loc_239 : location_info := LocationInfo file_0 56 6 56 28. - Definition loc_240 : location_info := LocationInfo file_0 56 13 56 27. - Definition loc_242 : location_info := LocationInfo file_0 55 6 55 26. - Definition loc_243 : location_info := LocationInfo file_0 55 6 55 8. - Definition loc_244 : location_info := LocationInfo file_0 55 6 55 8. - Definition loc_245 : location_info := LocationInfo file_0 55 7 55 8. - Definition loc_246 : location_info := LocationInfo file_0 55 7 55 8. - Definition loc_247 : location_info := LocationInfo file_0 55 12 55 26. - Definition loc_250 : location_info := LocationInfo file_0 70 4 70 23. - Definition loc_251 : location_info := LocationInfo file_0 74 4 79 5. - Definition loc_252 : location_info := LocationInfo file_0 80 4 80 13. - Definition loc_253 : location_info := LocationInfo file_0 80 11 80 12. - Definition loc_254 : location_info := LocationInfo file_0 80 11 80 12. - Definition loc_255 : location_info := LocationInfo file_0 74 4 79 5. - Definition loc_256 : location_info := LocationInfo file_0 74 32 79 5. - Definition loc_257 : location_info := LocationInfo file_0 75 8 75 20. - Definition loc_258 : location_info := LocationInfo file_0 76 8 76 20. - Definition loc_259 : location_info := LocationInfo file_0 77 8 77 14. - Definition loc_260 : location_info := LocationInfo file_0 78 8 78 14. - Definition loc_261 : location_info := LocationInfo file_0 74 4 79 5. - Definition loc_262 : location_info := LocationInfo file_0 74 4 79 5. - Definition loc_263 : location_info := LocationInfo file_0 78 8 78 9. - Definition loc_264 : location_info := LocationInfo file_0 78 12 78 13. - Definition loc_265 : location_info := LocationInfo file_0 78 12 78 13. - Definition loc_266 : location_info := LocationInfo file_0 77 8 77 9. - Definition loc_267 : location_info := LocationInfo file_0 77 12 77 13. - Definition loc_268 : location_info := LocationInfo file_0 77 12 77 13. - Definition loc_269 : location_info := LocationInfo file_0 76 8 76 15. - Definition loc_270 : location_info := LocationInfo file_0 76 8 76 9. - Definition loc_271 : location_info := LocationInfo file_0 76 8 76 9. - Definition loc_272 : location_info := LocationInfo file_0 76 18 76 19. - Definition loc_273 : location_info := LocationInfo file_0 76 18 76 19. - Definition loc_274 : location_info := LocationInfo file_0 75 8 75 9. - Definition loc_275 : location_info := LocationInfo file_0 75 12 75 19. - Definition loc_276 : location_info := LocationInfo file_0 75 12 75 19. - Definition loc_277 : location_info := LocationInfo file_0 75 12 75 13. - Definition loc_278 : location_info := LocationInfo file_0 75 12 75 13. - Definition loc_279 : location_info := LocationInfo file_0 74 11 74 30. - Definition loc_280 : location_info := LocationInfo file_0 74 11 74 12. - Definition loc_281 : location_info := LocationInfo file_0 74 11 74 12. - Definition loc_282 : location_info := LocationInfo file_0 74 16 74 30. - Definition loc_283 : location_info := LocationInfo file_0 70 4 70 5. - Definition loc_284 : location_info := LocationInfo file_0 70 8 70 22. - Definition loc_287 : location_info := LocationInfo file_0 87 2 87 19. - Definition loc_288 : location_info := LocationInfo file_0 91 2 93 3. - Definition loc_289 : location_info := LocationInfo file_0 94 2 94 12. - Definition loc_290 : location_info := LocationInfo file_0 94 2 94 6. - Definition loc_291 : location_info := LocationInfo file_0 94 3 94 6. - Definition loc_292 : location_info := LocationInfo file_0 94 3 94 6. - Definition loc_293 : location_info := LocationInfo file_0 94 9 94 11. - Definition loc_294 : location_info := LocationInfo file_0 94 9 94 11. - Definition loc_295 : location_info := LocationInfo file_0 91 2 93 3. - Definition loc_296 : location_info := LocationInfo file_0 91 31 93 3. - Definition loc_297 : location_info := LocationInfo file_0 92 4 92 26. - Definition loc_298 : location_info := LocationInfo file_0 91 2 93 3. - Definition loc_299 : location_info := LocationInfo file_0 91 2 93 3. - Definition loc_300 : location_info := LocationInfo file_0 92 4 92 7. - Definition loc_301 : location_info := LocationInfo file_0 92 10 92 25. - Definition loc_302 : location_info := LocationInfo file_0 92 11 92 25. - Definition loc_303 : location_info := LocationInfo file_0 92 12 92 18. - Definition loc_304 : location_info := LocationInfo file_0 92 12 92 18. - Definition loc_305 : location_info := LocationInfo file_0 92 14 92 17. - Definition loc_306 : location_info := LocationInfo file_0 92 14 92 17. - Definition loc_307 : location_info := LocationInfo file_0 91 8 91 30. - Definition loc_308 : location_info := LocationInfo file_0 91 8 91 12. - Definition loc_309 : location_info := LocationInfo file_0 91 8 91 12. - Definition loc_310 : location_info := LocationInfo file_0 91 9 91 12. - Definition loc_311 : location_info := LocationInfo file_0 91 9 91 12. - Definition loc_312 : location_info := LocationInfo file_0 91 16 91 30. - Definition loc_313 : location_info := LocationInfo file_0 87 16 87 18. - Definition loc_314 : location_info := LocationInfo file_0 87 16 87 18. - Definition loc_319 : location_info := LocationInfo file_0 104 4 104 21. - Definition loc_320 : location_info := LocationInfo file_0 109 4 118 5. - Definition loc_321 : location_info := LocationInfo file_0 119 4 119 13. - Definition loc_322 : location_info := LocationInfo file_0 119 11 119 12. - Definition loc_323 : location_info := LocationInfo file_0 109 4 118 5. - Definition loc_324 : location_info := LocationInfo file_0 109 35 118 5. - Definition loc_325 : location_info := LocationInfo file_0 110 8 110 27. - Definition loc_326 : location_info := LocationInfo file_0 112 8 112 33. - Definition loc_327 : location_info := LocationInfo file_0 113 8 115 9. - Definition loc_328 : location_info := LocationInfo file_0 117 8 117 26. - Definition loc_329 : location_info := LocationInfo file_0 109 4 118 5. - Definition loc_330 : location_info := LocationInfo file_0 109 4 118 5. - Definition loc_331 : location_info := LocationInfo file_0 117 8 117 12. - Definition loc_332 : location_info := LocationInfo file_0 117 15 117 25. - Definition loc_333 : location_info := LocationInfo file_0 117 16 117 25. - Definition loc_334 : location_info := LocationInfo file_0 117 16 117 19. - Definition loc_335 : location_info := LocationInfo file_0 117 16 117 19. - Definition loc_336 : location_info := LocationInfo file_0 113 23 115 9. - Definition loc_337 : location_info := LocationInfo file_0 114 12 114 21. - Definition loc_338 : location_info := LocationInfo file_0 114 19 114 20. - Definition loc_340 : location_info := LocationInfo file_0 113 11 113 21. - Definition loc_341 : location_info := LocationInfo file_0 113 11 113 16. - Definition loc_342 : location_info := LocationInfo file_0 113 11 113 16. - Definition loc_343 : location_info := LocationInfo file_0 113 12 113 16. - Definition loc_344 : location_info := LocationInfo file_0 113 12 113 16. - Definition loc_345 : location_info := LocationInfo file_0 113 20 113 21. - Definition loc_346 : location_info := LocationInfo file_0 113 20 113 21. - Definition loc_347 : location_info := LocationInfo file_0 112 23 112 32. - Definition loc_348 : location_info := LocationInfo file_0 112 23 112 32. - Definition loc_349 : location_info := LocationInfo file_0 112 23 112 26. - Definition loc_350 : location_info := LocationInfo file_0 112 23 112 26. - Definition loc_353 : location_info := LocationInfo file_0 110 21 110 26. - Definition loc_354 : location_info := LocationInfo file_0 110 21 110 26. - Definition loc_355 : location_info := LocationInfo file_0 110 22 110 26. - Definition loc_356 : location_info := LocationInfo file_0 110 22 110 26. - Definition loc_359 : location_info := LocationInfo file_0 109 10 109 33. - Definition loc_360 : location_info := LocationInfo file_0 109 10 109 15. - Definition loc_361 : location_info := LocationInfo file_0 109 10 109 15. - Definition loc_362 : location_info := LocationInfo file_0 109 11 109 15. - Definition loc_363 : location_info := LocationInfo file_0 109 11 109 15. - Definition loc_364 : location_info := LocationInfo file_0 109 19 109 33. - Definition loc_365 : location_info := LocationInfo file_0 104 19 104 20. - Definition loc_366 : location_info := LocationInfo file_0 104 19 104 20. - Definition loc_371 : location_info := LocationInfo file_0 164 2 164 18. - Definition loc_372 : location_info := LocationInfo file_0 174 2 179 3. - Definition loc_373 : location_info := LocationInfo file_0 174 2 179 3. - Definition loc_374 : location_info := LocationInfo file_0 174 31 179 3. - Definition loc_375 : location_info := LocationInfo file_0 175 4 175 25. - Definition loc_376 : location_info := LocationInfo file_0 176 4 176 20. - Definition loc_377 : location_info := LocationInfo file_0 177 4 177 14. - Definition loc_378 : location_info := LocationInfo file_0 178 4 178 19. - Definition loc_379 : location_info := LocationInfo file_0 174 2 179 3. - Definition loc_380 : location_info := LocationInfo file_0 174 2 179 3. - Definition loc_381 : location_info := LocationInfo file_0 178 4 178 7. - Definition loc_382 : location_info := LocationInfo file_0 178 10 178 18. - Definition loc_383 : location_info := LocationInfo file_0 178 10 178 18. - Definition loc_384 : location_info := LocationInfo file_0 177 4 177 7. - Definition loc_385 : location_info := LocationInfo file_0 177 5 177 7. - Definition loc_386 : location_info := LocationInfo file_0 177 5 177 7. - Definition loc_387 : location_info := LocationInfo file_0 177 10 177 13. - Definition loc_388 : location_info := LocationInfo file_0 177 10 177 13. - Definition loc_389 : location_info := LocationInfo file_0 176 4 176 13. - Definition loc_390 : location_info := LocationInfo file_0 176 4 176 7. - Definition loc_391 : location_info := LocationInfo file_0 176 4 176 7. - Definition loc_392 : location_info := LocationInfo file_0 176 16 176 19. - Definition loc_393 : location_info := LocationInfo file_0 176 16 176 19. - Definition loc_394 : location_info := LocationInfo file_0 176 17 176 19. - Definition loc_395 : location_info := LocationInfo file_0 176 17 176 19. - Definition loc_396 : location_info := LocationInfo file_0 175 4 175 12. - Definition loc_397 : location_info := LocationInfo file_0 175 15 175 24. - Definition loc_398 : location_info := LocationInfo file_0 175 15 175 24. - Definition loc_399 : location_info := LocationInfo file_0 175 15 175 18. - Definition loc_400 : location_info := LocationInfo file_0 175 15 175 18. - Definition loc_401 : location_info := LocationInfo file_0 174 8 174 29. - Definition loc_402 : location_info := LocationInfo file_0 174 8 174 11. - Definition loc_403 : location_info := LocationInfo file_0 174 8 174 11. - Definition loc_404 : location_info := LocationInfo file_0 174 15 174 29. - Definition loc_405 : location_info := LocationInfo file_0 164 15 164 17. - Definition loc_406 : location_info := LocationInfo file_0 164 15 164 17. - - (* Definition of struct [list]. *) - Program Definition struct_list := {| - sl_members := [ - (Some "head", LPtr); - (Some "tail", LPtr) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of function [test]. *) - Definition impl_test (alloc free init is_empty push pop reverse member : loc): function := {| - f_args := [ - ]; - f_local_vars := [ - ("list", LPtr); - ("elem2", LPtr); - ("elem1", LPtr); - ("elem3", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_162 ; - "$14" <- LocInfoE loc_164 (init) with [ ] ; - "list" <-{ LPtr } LocInfoE loc_162 ("$14") ; - locinfo: loc_156 ; - "$13" <- LocInfoE loc_158 (alloc) with - [ LocInfoE loc_159 (i2v (it_layout size_t).(ly_size) size_t) ] ; - "elem1" <-{ LPtr } - LocInfoE loc_156 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_156 ("$13"))) ; - locinfo: loc_150 ; - "$12" <- LocInfoE loc_152 (alloc) with - [ LocInfoE loc_153 (i2v (it_layout size_t).(ly_size) size_t) ] ; - "elem2" <-{ LPtr } - LocInfoE loc_150 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_150 ("$12"))) ; - locinfo: loc_144 ; - "$11" <- LocInfoE loc_146 (alloc) with - [ LocInfoE loc_147 (i2v (it_layout size_t).(ly_size) size_t) ] ; - "elem3" <-{ LPtr } - LocInfoE loc_144 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_144 ("$11"))) ; - locinfo: loc_139 ; - "$10" <- LocInfoE loc_141 (is_empty) with - [ LocInfoE loc_142 (&(LocInfoE loc_143 ("list"))) ] ; - locinfo: loc_6 ; - assert: (LocInfoE loc_139 ("$10")) ; - locinfo: loc_7 ; - LocInfoE loc_136 (!{LPtr} (LocInfoE loc_137 ("elem1"))) <-{ it_layout size_t } - LocInfoE loc_138 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_138 (i2v 1 i32))) ; - locinfo: loc_8 ; - LocInfoE loc_132 (!{LPtr} (LocInfoE loc_133 ("elem2"))) <-{ it_layout size_t } - LocInfoE loc_134 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_134 (i2v 2 i32))) ; - locinfo: loc_9 ; - LocInfoE loc_128 (!{LPtr} (LocInfoE loc_129 ("elem3"))) <-{ it_layout size_t } - LocInfoE loc_130 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_130 (i2v 3 i32))) ; - locinfo: loc_120 ; - "$9" <- LocInfoE loc_122 (push) with - [ LocInfoE loc_123 (use{LPtr} (LocInfoE loc_124 ("list"))) ; - LocInfoE loc_125 (use{LPtr} (LocInfoE loc_126 ("elem1"))) ] ; - locinfo: loc_10 ; - LocInfoE loc_119 ("list") <-{ LPtr } LocInfoE loc_120 ("$9") ; - locinfo: loc_112 ; - "$8" <- LocInfoE loc_114 (push) with - [ LocInfoE loc_115 (use{LPtr} (LocInfoE loc_116 ("list"))) ; - LocInfoE loc_117 (use{LPtr} (LocInfoE loc_118 ("elem2"))) ] ; - locinfo: loc_11 ; - LocInfoE loc_111 ("list") <-{ LPtr } LocInfoE loc_112 ("$8") ; - locinfo: loc_104 ; - "$7" <- LocInfoE loc_106 (push) with - [ LocInfoE loc_107 (use{LPtr} (LocInfoE loc_108 ("list"))) ; - LocInfoE loc_109 (use{LPtr} (LocInfoE loc_110 ("elem3"))) ] ; - locinfo: loc_12 ; - LocInfoE loc_103 ("list") <-{ LPtr } LocInfoE loc_104 ("$7") ; - locinfo: loc_97 ; - "$6" <- LocInfoE loc_99 (member) with - [ LocInfoE loc_100 (&(LocInfoE loc_101 ("list"))) ; - LocInfoE loc_102 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_102 (i2v 1 i32))) ] ; - locinfo: loc_13 ; - assert: (LocInfoE loc_97 ("$6")) ; - locinfo: loc_92 ; - "$5" <- LocInfoE loc_94 (reverse) with - [ LocInfoE loc_95 (use{LPtr} (LocInfoE loc_96 ("list"))) ] ; - locinfo: loc_14 ; - LocInfoE loc_91 ("list") <-{ LPtr } LocInfoE loc_92 ("$5") ; - locinfo: loc_85 ; - "$4" <- LocInfoE loc_87 (member) with - [ LocInfoE loc_88 (&(LocInfoE loc_89 ("list"))) ; - LocInfoE loc_90 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_90 (i2v 1 i32))) ] ; - locinfo: loc_15 ; - assert: (LocInfoE loc_85 ("$4")) ; - locinfo: loc_80 ; - "$3" <- LocInfoE loc_82 (pop) with - [ LocInfoE loc_83 (&(LocInfoE loc_84 ("list"))) ] ; - locinfo: loc_16 ; - LocInfoE loc_79 ("elem1") <-{ LPtr } LocInfoE loc_80 ("$3") ; - locinfo: loc_74 ; - "$2" <- LocInfoE loc_76 (pop) with - [ LocInfoE loc_77 (&(LocInfoE loc_78 ("list"))) ] ; - locinfo: loc_17 ; - LocInfoE loc_73 ("elem2") <-{ LPtr } LocInfoE loc_74 ("$2") ; - locinfo: loc_68 ; - "$1" <- LocInfoE loc_70 (pop) with - [ LocInfoE loc_71 (&(LocInfoE loc_72 ("list"))) ] ; - locinfo: loc_18 ; - LocInfoE loc_67 ("elem3") <-{ LPtr } LocInfoE loc_68 ("$1") ; - locinfo: loc_62 ; - "$0" <- LocInfoE loc_64 (is_empty) with - [ LocInfoE loc_65 (&(LocInfoE loc_66 ("list"))) ] ; - locinfo: loc_19 ; - assert: (LocInfoE loc_62 ("$0")) ; - locinfo: loc_20 ; - assert: (LocInfoE loc_55 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_55 ((LocInfoE loc_56 (use{it_layout size_t} (LocInfoE loc_58 (!{LPtr} (LocInfoE loc_59 ("elem1")))))) ={IntOp size_t, IntOp size_t} (LocInfoE loc_60 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_61 (i2v 1 i32)))))))) ; - locinfo: loc_21 ; - assert: (LocInfoE loc_48 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_48 ((LocInfoE loc_49 (use{it_layout size_t} (LocInfoE loc_51 (!{LPtr} (LocInfoE loc_52 ("elem2")))))) ={IntOp size_t, IntOp size_t} (LocInfoE loc_53 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_54 (i2v 2 i32)))))))) ; - locinfo: loc_22 ; - assert: (LocInfoE loc_41 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_41 ((LocInfoE loc_42 (use{it_layout size_t} (LocInfoE loc_44 (!{LPtr} (LocInfoE loc_45 ("elem3")))))) ={IntOp size_t, IntOp size_t} (LocInfoE loc_46 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_47 (i2v 3 i32)))))))) ; - locinfo: loc_23 ; - "_" <- LocInfoE loc_37 (free) with - [ LocInfoE loc_38 (i2v (it_layout size_t).(ly_size) size_t) ; - LocInfoE loc_39 (use{LPtr} (LocInfoE loc_40 ("elem1"))) ] ; - locinfo: loc_24 ; - "_" <- LocInfoE loc_32 (free) with - [ LocInfoE loc_33 (i2v (it_layout size_t).(ly_size) size_t) ; - LocInfoE loc_34 (use{LPtr} (LocInfoE loc_35 ("elem2"))) ] ; - locinfo: loc_25 ; - "_" <- LocInfoE loc_27 (free) with - [ LocInfoE loc_28 (i2v (it_layout size_t).(ly_size) size_t) ; - LocInfoE loc_29 (use{LPtr} (LocInfoE loc_30 ("elem3"))) ] ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [init]. *) - Definition impl_init : function := {| - f_args := [ - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_169 ; - Return (LocInfoE loc_170 (NULL)) - ]> $∅ - )%E - |}. - - (* Definition of function [is_empty]. *) - Definition impl_is_empty : function := {| - f_args := [ - ("l", LPtr) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_173 ; - Return (LocInfoE loc_174 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_174 ((LocInfoE loc_175 (use{LPtr} (LocInfoE loc_177 (!{LPtr} (LocInfoE loc_178 ("l")))))) ={PtrOp, PtrOp} (LocInfoE loc_179 (NULL)))))) - ]> $∅ - )%E - |}. - - (* Definition of function [push]. *) - Definition impl_push (alloc : loc): function := {| - f_args := [ - ("p", LPtr); - ("e", LPtr) - ]; - f_local_vars := [ - ("node", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_198 ; - "$0" <- LocInfoE loc_200 (alloc) with - [ LocInfoE loc_201 (i2v (layout_of struct_list).(ly_size) size_t) ] ; - "node" <-{ LPtr } - LocInfoE loc_198 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_198 ("$0"))) ; - locinfo: loc_183 ; - LocInfoE loc_193 ((LocInfoE loc_194 (!{LPtr} (LocInfoE loc_195 ("node")))) at{struct_list} "head") <-{ LPtr } - LocInfoE loc_196 (use{LPtr} (LocInfoE loc_197 ("e"))) ; - locinfo: loc_184 ; - LocInfoE loc_188 ((LocInfoE loc_189 (!{LPtr} (LocInfoE loc_190 ("node")))) at{struct_list} "tail") <-{ LPtr } - LocInfoE loc_191 (use{LPtr} (LocInfoE loc_192 ("p"))) ; - locinfo: loc_185 ; - Return (LocInfoE loc_186 (use{LPtr} (LocInfoE loc_187 ("node")))) - ]> $∅ - )%E - |}. - - (* Definition of function [pop]. *) - Definition impl_pop (free : loc): function := {| - f_args := [ - ("p", LPtr) - ]; - f_local_vars := [ - ("node", LPtr); - ("ret", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_242 ; - if: LocInfoE loc_242 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_242 ((LocInfoE loc_243 (use{LPtr} (LocInfoE loc_245 (!{LPtr} (LocInfoE loc_246 ("p")))))) ={PtrOp, PtrOp} (LocInfoE loc_247 (NULL))))) - then - locinfo: loc_239 ; - Goto "#2" - else - Goto "#3" - ]> $ - <[ "#1" := - "node" <-{ LPtr } - LocInfoE loc_232 (use{LPtr} (LocInfoE loc_234 (!{LPtr} (LocInfoE loc_235 ("p"))))) ; - "ret" <-{ LPtr } - LocInfoE loc_226 (use{LPtr} (LocInfoE loc_227 ((LocInfoE loc_228 (!{LPtr} (LocInfoE loc_229 ("node")))) at{struct_list} "head"))) ; - locinfo: loc_209 ; - LocInfoE loc_220 (!{LPtr} (LocInfoE loc_221 ("p"))) <-{ LPtr } - LocInfoE loc_222 (use{LPtr} (LocInfoE loc_223 ((LocInfoE loc_224 (!{LPtr} (LocInfoE loc_225 ("node")))) at{struct_list} "tail"))) ; - locinfo: loc_210 ; - "_" <- LocInfoE loc_215 (free) with - [ LocInfoE loc_216 (i2v (layout_of struct_list).(ly_size) size_t) ; - LocInfoE loc_217 (use{LPtr} (LocInfoE loc_218 ("node"))) ] ; - locinfo: loc_211 ; - Return (LocInfoE loc_212 (use{LPtr} (LocInfoE loc_213 ("ret")))) - ]> $ - <[ "#2" := - locinfo: loc_239 ; - Return (LocInfoE loc_240 (NULL)) - ]> $ - <[ "#3" := - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [reverse]. *) - Definition impl_reverse : function := {| - f_args := [ - ("p", LPtr) - ]; - f_local_vars := [ - ("w", LPtr); - ("t", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_250 ; - LocInfoE loc_283 ("w") <-{ LPtr } LocInfoE loc_284 (NULL) ; - locinfo: loc_251 ; - Goto "#1" - ]> $ - <[ "#1" := - locinfo: loc_279 ; - if: LocInfoE loc_279 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_279 ((LocInfoE loc_280 (use{LPtr} (LocInfoE loc_281 ("p")))) !={PtrOp, PtrOp} (LocInfoE loc_282 (NULL))))) - then - locinfo: loc_257 ; - Goto "#2" - else - locinfo: loc_252 ; - Goto "#3" - ]> $ - <[ "#2" := - locinfo: loc_257 ; - LocInfoE loc_274 ("t") <-{ LPtr } - LocInfoE loc_275 (use{LPtr} (LocInfoE loc_276 ((LocInfoE loc_277 (!{LPtr} (LocInfoE loc_278 ("p")))) at{struct_list} "tail"))) ; - locinfo: loc_258 ; - LocInfoE loc_269 ((LocInfoE loc_270 (!{LPtr} (LocInfoE loc_271 ("p")))) at{struct_list} "tail") <-{ LPtr } - LocInfoE loc_272 (use{LPtr} (LocInfoE loc_273 ("w"))) ; - locinfo: loc_259 ; - LocInfoE loc_266 ("w") <-{ LPtr } - LocInfoE loc_267 (use{LPtr} (LocInfoE loc_268 ("p"))) ; - locinfo: loc_260 ; - LocInfoE loc_263 ("p") <-{ LPtr } - LocInfoE loc_264 (use{LPtr} (LocInfoE loc_265 ("t"))) ; - locinfo: loc_261 ; - Goto "continue11" - ]> $ - <[ "#3" := - locinfo: loc_252 ; - Return (LocInfoE loc_253 (use{LPtr} (LocInfoE loc_254 ("w")))) - ]> $ - <[ "continue11" := - locinfo: loc_251 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [append]. *) - Definition impl_append : function := {| - f_args := [ - ("l1", LPtr); - ("l2", LPtr) - ]; - f_local_vars := [ - ("end", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "end" <-{ LPtr } - LocInfoE loc_313 (use{LPtr} (LocInfoE loc_314 ("l1"))) ; - locinfo: loc_288 ; - Goto "#1" - ]> $ - <[ "#1" := - locinfo: loc_307 ; - if: LocInfoE loc_307 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_307 ((LocInfoE loc_308 (use{LPtr} (LocInfoE loc_310 (!{LPtr} (LocInfoE loc_311 ("end")))))) !={PtrOp, PtrOp} (LocInfoE loc_312 (NULL))))) - then - locinfo: loc_297 ; - Goto "#2" - else - locinfo: loc_289 ; - Goto "#3" - ]> $ - <[ "#2" := - locinfo: loc_297 ; - LocInfoE loc_300 ("end") <-{ LPtr } - LocInfoE loc_301 (&(LocInfoE loc_302 ((LocInfoE loc_303 (!{LPtr} (LocInfoE loc_305 (!{LPtr} (LocInfoE loc_306 ("end")))))) at{struct_list} "tail"))) ; - locinfo: loc_298 ; - Goto "continue15" - ]> $ - <[ "#3" := - locinfo: loc_289 ; - LocInfoE loc_291 (!{LPtr} (LocInfoE loc_292 ("end"))) <-{ LPtr } - LocInfoE loc_293 (use{LPtr} (LocInfoE loc_294 ("l2"))) ; - Return (VOID) - ]> $ - <[ "continue15" := - locinfo: loc_288 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [member]. *) - Definition impl_member : function := {| - f_args := [ - ("p", LPtr); - ("k", it_layout size_t) - ]; - f_local_vars := [ - ("prev", LPtr); - ("cur", LPtr); - ("head", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "prev" <-{ LPtr } - LocInfoE loc_365 (use{LPtr} (LocInfoE loc_366 ("p"))) ; - locinfo: loc_320 ; - Goto "#1" - ]> $ - <[ "#1" := - locinfo: loc_359 ; - if: LocInfoE loc_359 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_359 ((LocInfoE loc_360 (use{LPtr} (LocInfoE loc_362 (!{LPtr} (LocInfoE loc_363 ("prev")))))) !={PtrOp, PtrOp} (LocInfoE loc_364 (NULL))))) - then - Goto "#2" - else - locinfo: loc_321 ; - Goto "#3" - ]> $ - <[ "#2" := - "cur" <-{ LPtr } - LocInfoE loc_353 (use{LPtr} (LocInfoE loc_355 (!{LPtr} (LocInfoE loc_356 ("prev"))))) ; - "head" <-{ LPtr } - LocInfoE loc_347 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_347 (use{LPtr} (LocInfoE loc_348 ((LocInfoE loc_349 (!{LPtr} (LocInfoE loc_350 ("cur")))) at{struct_list} "head"))))) ; - locinfo: loc_340 ; - if: LocInfoE loc_340 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_340 ((LocInfoE loc_341 (use{it_layout size_t} (LocInfoE loc_343 (!{LPtr} (LocInfoE loc_344 ("head")))))) ={IntOp size_t, IntOp size_t} (LocInfoE loc_345 (use{it_layout size_t} (LocInfoE loc_346 ("k"))))))) - then - locinfo: loc_337 ; - Goto "#5" - else - locinfo: loc_328 ; - Goto "#6" - ]> $ - <[ "#3" := - locinfo: loc_321 ; - Return (LocInfoE loc_322 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_322 (i2v 0 i32)))) - ]> $ - <[ "#4" := - locinfo: loc_328 ; - LocInfoE loc_331 ("prev") <-{ LPtr } - LocInfoE loc_332 (&(LocInfoE loc_333 ((LocInfoE loc_334 (!{LPtr} (LocInfoE loc_335 ("cur")))) at{struct_list} "tail"))) ; - locinfo: loc_329 ; - Goto "continue19" - ]> $ - <[ "#5" := - locinfo: loc_337 ; - Return (LocInfoE loc_338 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_338 (i2v 1 i32)))) - ]> $ - <[ "#6" := - locinfo: loc_328 ; - Goto "#4" - ]> $ - <[ "continue19" := - locinfo: loc_320 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [rev_append]. *) - Definition impl_rev_append : function := {| - f_args := [ - ("l1", LPtr); - ("l2", LPtr) - ]; - f_local_vars := [ - ("cur", LPtr); - ("cur_tail", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "cur" <-{ LPtr } - LocInfoE loc_405 (use{LPtr} (LocInfoE loc_406 ("l1"))) ; - locinfo: loc_372 ; - Goto "#1" - ]> $ - <[ "#1" := - locinfo: loc_401 ; - if: LocInfoE loc_401 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_401 ((LocInfoE loc_402 (use{LPtr} (LocInfoE loc_403 ("cur")))) !={PtrOp, PtrOp} (LocInfoE loc_404 (NULL))))) - then - locinfo: loc_375 ; - Goto "#2" - else - Goto "#3" - ]> $ - <[ "#2" := - locinfo: loc_375 ; - LocInfoE loc_396 ("cur_tail") <-{ LPtr } - LocInfoE loc_397 (use{LPtr} (LocInfoE loc_398 ((LocInfoE loc_399 (!{LPtr} (LocInfoE loc_400 ("cur")))) at{struct_list} "tail"))) ; - locinfo: loc_376 ; - LocInfoE loc_389 ((LocInfoE loc_390 (!{LPtr} (LocInfoE loc_391 ("cur")))) at{struct_list} "tail") <-{ LPtr } - LocInfoE loc_392 (use{LPtr} (LocInfoE loc_394 (!{LPtr} (LocInfoE loc_395 ("l2"))))) ; - locinfo: loc_377 ; - LocInfoE loc_385 (!{LPtr} (LocInfoE loc_386 ("l2"))) <-{ LPtr } - LocInfoE loc_387 (use{LPtr} (LocInfoE loc_388 ("cur"))) ; - locinfo: loc_378 ; - LocInfoE loc_381 ("cur") <-{ LPtr } - LocInfoE loc_382 (use{LPtr} (LocInfoE loc_383 ("cur_tail"))) ; - locinfo: loc_379 ; - Goto "continue26" - ]> $ - <[ "#3" := - Return (VOID) - ]> $ - <[ "continue26" := - locinfo: loc_372 ; - Goto "#1" - ]> $∅ - )%E - |}. -End code. diff --git a/theories/examples/tutorial/t3_list_proof_append.v b/theories/examples/tutorial/t3_list_proof_append.v deleted file mode 100644 index 5cad06ba4b6f0cddfc887f235a72af8ffbd51dfd..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t3_list_proof_append.v +++ /dev/null @@ -1,34 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t3_list_code. -From refinedc.examples.tutorial Require Import t3_list_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t3_list.c]. *) -Section proof_append. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [append]. *) - Lemma type_append : - ⊢ typed_function impl_append type_of_append. - Proof. - start_function "append" ([[p l1] l2]) => arg_l1 arg_l2 local_end. - split_blocks (( - <[ "#1" := - ∃ pl : loc, - ∃ l1_suffix : list type, - arg_l2 â—â‚— (l2 @ (list_t)) ∗ - local_end â—â‚— (pl @ (&own (l1_suffix @ (list_t)))) ∗ - arg_l1 â—â‚— (p @ (&own (wand (pl â—â‚— (l1_suffix ++ l2) @ list_t) ((l1 ++ l2) @ (list_t))))) - ]> $ - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "append" "#0". - - repeat liRStep; liShow. - all: print_typesystem_goal "append" "#1". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "append". - Qed. -End proof_append. diff --git a/theories/examples/tutorial/t3_list_proof_init.v b/theories/examples/tutorial/t3_list_proof_init.v deleted file mode 100644 index 2ac50ee82866457ff67e47c8816ef82e40f1bb30..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t3_list_proof_init.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t3_list_code. -From refinedc.examples.tutorial Require Import t3_list_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t3_list.c]. *) -Section proof_init. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [init]. *) - Lemma type_init : - ⊢ typed_function impl_init type_of_init. - Proof. - start_function "init" ([]). - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "init" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "init". - Qed. -End proof_init. diff --git a/theories/examples/tutorial/t3_list_proof_is_empty.v b/theories/examples/tutorial/t3_list_proof_is_empty.v deleted file mode 100644 index 439da44b15887aceb856422d648f0bc067f48dad..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t3_list_proof_is_empty.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t3_list_code. -From refinedc.examples.tutorial Require Import t3_list_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t3_list.c]. *) -Section proof_is_empty. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [is_empty]. *) - Lemma type_is_empty : - ⊢ typed_function impl_is_empty type_of_is_empty. - Proof. - start_function "is_empty" ([p l]) => arg_l. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "is_empty" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "is_empty". - Qed. -End proof_is_empty. diff --git a/theories/examples/tutorial/t3_list_proof_member.v b/theories/examples/tutorial/t3_list_proof_member.v deleted file mode 100644 index cefc893877fea7fff02ee66f87a337be39d0f8a4..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t3_list_proof_member.v +++ /dev/null @@ -1,38 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t3_list_code. -From refinedc.examples.tutorial Require Import t3_list_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t3_list.c]. *) -Section proof_member. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [member]. *) - Lemma type_member : - ⊢ typed_function impl_member type_of_member. - Proof. - start_function "member" ([[l p] n]) => arg_p arg_k local_prev local_cur local_head. - split_blocks (( - <[ "#1" := - ∃ l1 : list Z, - ∃ pc : loc, - arg_k â—â‚— (n @ (int (size_t))) ∗ - local_cur â—â‚— uninit LPtr ∗ - local_head â—â‚— uninit LPtr ∗ - local_prev â—â‚— (pc @ (&own ((l1 `at_type` int size_t) @ (list_t)))) ∗ - arg_p â—â‚— (p @ (&own (wand (pc â—â‚— (l1 `at_type` int size_t) @ list_t) ((l `at_type` int size_t) @ (list_t))))) ∗ - ⌜n ∈ l ↔ n ∈ l1⌠- ]> $ - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "member" "#0". - - repeat liRStep; liShow. - all: print_typesystem_goal "member" "#1". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try set_unfold; refined_solver. - all: print_sidecondition_goal "member". - Qed. -End proof_member. diff --git a/theories/examples/tutorial/t3_list_proof_pop.v b/theories/examples/tutorial/t3_list_proof_pop.v deleted file mode 100644 index 5cb4034024b988c5bebef225313c6b42ba2ef671..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t3_list_proof_pop.v +++ /dev/null @@ -1,26 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t3_list_code. -From refinedc.examples.tutorial Require Import t3_list_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t3_list.c]. *) -Section proof_pop. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [pop]. *) - Lemma type_pop (free : loc) : - free â—áµ¥ free @ function_ptr type_of_free -∗ - typed_function (impl_pop free) type_of_pop. - Proof. - start_function "pop" ([l p]) => arg_p local_node local_ret. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "pop" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "pop". - Qed. -End proof_pop. diff --git a/theories/examples/tutorial/t3_list_proof_push.v b/theories/examples/tutorial/t3_list_proof_push.v deleted file mode 100644 index e533a3dcc3c17e1e0fd6ce473b351e5ea6c2884a..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t3_list_proof_push.v +++ /dev/null @@ -1,26 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t3_list_code. -From refinedc.examples.tutorial Require Import t3_list_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t3_list.c]. *) -Section proof_push. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [push]. *) - Lemma type_push (alloc : loc) : - alloc â—áµ¥ alloc @ function_ptr type_of_alloc -∗ - typed_function (impl_push alloc) type_of_push. - Proof. - start_function "push" ([l ty]) => arg_p arg_e local_node. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "push" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "push". - Qed. -End proof_push. diff --git a/theories/examples/tutorial/t3_list_proof_rev_append.v b/theories/examples/tutorial/t3_list_proof_rev_append.v deleted file mode 100644 index 162f56ae045f9695fd60cda75a0ca32f1d6862c2..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t3_list_proof_rev_append.v +++ /dev/null @@ -1,38 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t3_list_code. -From refinedc.examples.tutorial Require Import t3_list_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t3_list.c]. *) -Section proof_rev_append. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [rev_append]. *) - Lemma type_rev_append : - ⊢ typed_function impl_rev_append type_of_rev_append. - Proof. - start_function "rev_append" ([[p l1] l2]) => arg_l1 arg_l2 local_cur local_cur_tail. - split_blocks (( - <[ "#1" := - ∃ l1_prefix : list type, - ∃ l1_suffix : list type, - ∃ cur_l2 : list type, - local_cur_tail â—â‚— uninit LPtr ∗ - local_cur â—â‚— (l1_suffix @ (list_t)) ∗ - arg_l2 â—â‚— (p @ (&own (cur_l2 @ (list_t)))) ∗ - arg_l1 â—â‚— (uninit (LPtr)) ∗ - ⌜cur_l2 = l1_prefix ++ l2⌠∗ - ⌜l1 = rev l1_prefix ++ l1_suffix⌠- ]> $ - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "rev_append" "#0". - - repeat liRStep; liShow. - all: print_typesystem_goal "rev_append" "#1". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "rev_append". - Qed. -End proof_rev_append. diff --git a/theories/examples/tutorial/t3_list_proof_reverse.v b/theories/examples/tutorial/t3_list_proof_reverse.v deleted file mode 100644 index c44e4ea3a65e8e7b069ad694b10f572837c0c16c..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t3_list_proof_reverse.v +++ /dev/null @@ -1,35 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t3_list_code. -From refinedc.examples.tutorial Require Import t3_list_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t3_list.c]. *) -Section proof_reverse. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [reverse]. *) - Lemma type_reverse : - ⊢ typed_function impl_reverse type_of_reverse. - Proof. - start_function "reverse" (l) => arg_p local_w local_t. - split_blocks (( - <[ "#1" := - ∃ l1 : list type, - ∃ l2 : list type, - local_t â—â‚— uninit LPtr ∗ - local_w â—â‚— (l1 @ (list_t)) ∗ - arg_p â—â‚— (l2 @ (list_t)) ∗ - ⌜l = rev l1 ++ l2⌠- ]> $ - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "reverse" "#0". - - repeat liRStep; liShow. - all: print_typesystem_goal "reverse" "#1". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "reverse". - Qed. -End proof_reverse. diff --git a/theories/examples/tutorial/t3_list_proof_test.v b/theories/examples/tutorial/t3_list_proof_test.v deleted file mode 100644 index eec6adc95ec737ca7ee93353d248222b0e11cb21..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t3_list_proof_test.v +++ /dev/null @@ -1,34 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t3_list_code. -From refinedc.examples.tutorial Require Import t3_list_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t3_list.c]. *) -Section proof_test. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [test]. *) - Lemma type_test (alloc free init is_empty push pop reverse member : loc) : - alloc â—áµ¥ alloc @ function_ptr type_of_alloc -∗ - free â—áµ¥ free @ function_ptr type_of_free -∗ - init â—áµ¥ init @ function_ptr type_of_init -∗ - is_empty â—áµ¥ is_empty @ function_ptr type_of_is_empty -∗ - push â—áµ¥ push @ function_ptr type_of_push -∗ - pop â—áµ¥ pop @ function_ptr type_of_pop -∗ - reverse â—áµ¥ reverse @ function_ptr type_of_reverse -∗ - member â—áµ¥ member @ function_ptr type_of_member -∗ - typed_function (impl_test alloc free init is_empty push pop reverse member) type_of_test. - Proof. - start_function "test" ([]) => local_list local_elem2 local_elem1 local_elem3. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "test" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by set_unfold; refined_solver. - all: print_sidecondition_goal "test". - Qed. -End proof_test. diff --git a/theories/examples/tutorial/t3_list_spec.v b/theories/examples/tutorial/t3_list_spec.v deleted file mode 100644 index 3f0533c1316045a0f582b0bbeb1e964b8ab7f9ad..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t3_list_spec.v +++ /dev/null @@ -1,141 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t3_list_code. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t3_list.c]. *) -Section spec. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Inlined code. *) - - Definition alloc_initialized := initialized "allocator_state" (). - - (* Definition of type [list_t]. *) - Definition list_t_rec : ((list type) -d> typeO) → ((list type) -d> typeO) := (λ self l, - ((maybe2 cons l) @ (optionalO (λ patt__, - let ty := patt__.1 in - let l := patt__.2 in - &own ( - struct struct_list [@{type} - (&own (ty)) ; - (guarded ("list_t_0") (apply_dfun self (l))) - ] - ) - ) null)) - )%I. - Typeclasses Opaque list_t_rec. - - Global Instance list_t_rec_ne : Contractive list_t_rec. - Proof. solve_type_proper. Qed. - - Definition list_t : rtype := {| - rty_type := (list type); - rty r__ := fixp list_t_rec r__ - |}. - - Lemma list_t_unfold (l : list type) : - (l @ list_t)%I ≡@{type} ( - ((maybe2 cons l) @ (optionalO (λ patt__, - let ty := patt__.1 in - let l := patt__.2 in - &own ( - struct struct_list [@{type} - (&own (ty)) ; - (guarded "list_t_0" (l @ list_t)) - ] - ) - ) null)) - )%I. - Proof. by rewrite {1}/with_refinement/=fixp_unfold. Qed. - - - Global Program Instance list_t_rmovable : RMovable list_t := - {| rmovable 'l := movable_eq _ _ (list_t_unfold l) |}. - Next Obligation. solve_ty_layout_eq. Qed. - - Global Instance list_t_simplify_hyp_place_inst l_ β_ (l : list type) : - SimplifyHypPlace l_ β_ (l @ list_t)%I (Some 100%N) := - λ T, i2p (simplify_hyp_place_eq l_ β_ _ _ T (list_t_unfold _)). - Global Instance list_t_simplify_goal_place_inst l_ β_ (l : list type) : - SimplifyGoalPlace l_ β_ (l @ list_t)%I (Some 100%N) := - λ T, i2p (simplify_goal_place_eq l_ β_ _ _ T (list_t_unfold _)). - - Global Program Instance list_t_simplify_hyp_val_inst v_ (l : list type) : - SimplifyHypVal v_ (l @ list_t)%I (Some 100%N) := - λ T, i2p (simplify_hyp_val_eq v_ _ _ (list_t_unfold _) T _). - Next Obligation. done. Qed. - Global Program Instance list_t_simplify_goal_val_inst v_ (l : list type) : - SimplifyGoalVal v_ (l @ list_t)%I (Some 100%N) := - λ T, i2p (simplify_goal_val_eq v_ _ _ (list_t_unfold _) T _). - Next Obligation. done. Qed. - - (* Type definitions. *) - - (* Specifications for function [alloc]. *) - Definition type_of_alloc := - fn(∀ size : nat; (size @ (int (size_t))); ⌜size + 16 < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (&own (uninit (mk_layout size 3))); True. - - (* Specifications for function [free]. *) - Definition type_of_free := - fn(∀ size : nat; (size @ (int (size_t))), (&own (uninit (mk_layout size 3))); (alloc_initialized) ∗ ⌜(8 | size)âŒ) - → ∃ () : (), (void); True. - - (* Specifications for function [alloc_array]. *) - Definition type_of_alloc_array := - fn(∀ (size, n) : nat * nat; (size @ (int (size_t))), (n @ (int (size_t))); ⌜size * n + 16 < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (&own (array (mk_layout size 3) (replicate n (uninit (mk_layout size 3))))); True. - - (* Specifications for function [free_array]. *) - Definition type_of_free_array := - fn(∀ (size, n) : nat * nat; (size @ (int (size_t))), (n @ (int (size_t))), (&own (array (mk_layout size 3) (replicate n (uninit (mk_layout size 3))))); ⌜size * n < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (void); True. - - (* Specifications for function [test]. *) - Definition type_of_test := - fn(∀ () : (); (alloc_initialized)) → ∃ () : (), (void); True. - - (* Specifications for function [init]. *) - Definition type_of_init := - fn(∀ () : (); True) → ∃ () : (), (([]) @ (list_t)); True. - - (* Specifications for function [is_empty]. *) - Definition type_of_is_empty := - fn(∀ (p, l) : loc * (list type); (p @ (&own (l @ (list_t)))); True) - → ∃ () : (), ((bool_decide (l = [])) @ (boolean (bool_it))); (p â—â‚— (l @ (list_t))). - - (* Specifications for function [push]. *) - Definition type_of_push := - fn(∀ (l, ty) : (list type) * type; (l @ (list_t)), (&own (ty)); (alloc_initialized)) - → ∃ () : (), ((ty :: l) @ (list_t)); True. - - (* Specifications for function [pop]. *) - Definition type_of_pop := - fn(∀ (l, p) : (list type) * loc; (p @ (&own (l @ (list_t)))); (alloc_initialized)) - → ∃ () : (), ((maybe2 cons l) @ (optionalO (λ patt__, - let ty := patt__.1 in - let l := patt__.2 in - &own (ty) ) null)); (p â—â‚— ((tail l) @ (list_t))). - - (* Specifications for function [reverse]. *) - Definition type_of_reverse := - fn(∀ l : (list type); (l @ (list_t)); True) - → ∃ () : (), ((rev l) @ (list_t)); True. - - (* Specifications for function [append]. *) - Definition type_of_append := - fn(∀ (p, l1, l2) : loc * (list type) * (list type); (p @ (&own (l1 @ (list_t)))), (l2 @ (list_t)); True) - → ∃ () : (), (void); (p â—â‚— ((l1 ++ l2) @ (list_t))). - - (* Specifications for function [member]. *) - Definition type_of_member := - fn(∀ (l, p, n) : (list Z) * loc * Z; (p @ (&own ((l `at_type` int size_t) @ (list_t)))), (n @ (int (size_t))); True) - → ∃ b : bool, (b @ (boolean (bool_it))); (p â—â‚— ((l `at_type` int size_t) @ (list_t))) ∗ ⌜b ↔ n ∈ lâŒ. - - (* Specifications for function [rev_append]. *) - Definition type_of_rev_append := - fn(∀ (p, l1, l2) : loc * (list type) * (list type); (l1 @ (list_t)), (p @ (&own (l2 @ (list_t)))); True) - → ∃ () : (), (void); (p â—â‚— (((rev l1) ++ l2) @ (list_t))). -End spec. - -Typeclasses Opaque list_t_rec. diff --git a/theories/examples/tutorial/t4_alloc.c.generate b/theories/examples/tutorial/t4_alloc.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/tutorial/t4_alloc_code.v b/theories/examples/tutorial/t4_alloc_code.v deleted file mode 100644 index 347f20ffcd55a143657e9dc25bcffe12349dcdab..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t4_alloc_code.v +++ /dev/null @@ -1,534 +0,0 @@ -From refinedc.lang Require Export notation. -From refinedc.lang Require Import tactics. -From refinedc.typing Require Import annotations. -From refinedc.examples.spinlock Require Import spinlock_annot. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t4_alloc.c]. *) -Section code. - Definition file_0 : string := "theories/examples/tutorial/t4_alloc.c". - Definition loc_2 : location_info := LocationInfo file_0 13 2 45 3. - Definition loc_3 : location_info := LocationInfo file_0 13 2 45 3. - Definition loc_4 : location_info := LocationInfo file_0 13 11 45 3. - Definition loc_5 : location_info := LocationInfo file_0 14 4 14 35. - Definition loc_6 : location_info := LocationInfo file_0 15 4 15 53. - Definition loc_7 : location_info := LocationInfo file_0 15 53 15 5. - Definition loc_8 : location_info := LocationInfo file_0 18 4 18 48. - Definition loc_9 : location_info := LocationInfo file_0 23 4 41 5. - Definition loc_10 : location_info := LocationInfo file_0 43 4 43 13. - Definition loc_11 : location_info := LocationInfo file_0 43 13 43 5. - Definition loc_12 : location_info := LocationInfo file_0 44 4 44 37. - Definition loc_13 : location_info := LocationInfo file_0 13 2 45 3. - Definition loc_14 : location_info := LocationInfo file_0 13 2 45 3. - Definition loc_15 : location_info := LocationInfo file_0 44 4 44 13. - Definition loc_16 : location_info := LocationInfo file_0 44 4 44 13. - Definition loc_17 : location_info := LocationInfo file_0 44 14 44 35. - Definition loc_18 : location_info := LocationInfo file_0 44 15 44 35. - Definition loc_19 : location_info := LocationInfo file_0 44 15 44 30. - Definition loc_20 : location_info := LocationInfo file_0 43 4 43 12. - Definition loc_21 : location_info := LocationInfo file_0 43 5 43 12. - Definition loc_22 : location_info := LocationInfo file_0 43 7 43 11. - Definition loc_23 : location_info := LocationInfo file_0 43 7 43 11. - Definition loc_24 : location_info := LocationInfo file_0 23 4 41 5. - Definition loc_25 : location_info := LocationInfo file_0 23 35 41 5. - Definition loc_26 : location_info := LocationInfo file_0 24 6 24 32. - Definition loc_27 : location_info := LocationInfo file_0 26 6 31 7. - Definition loc_28 : location_info := LocationInfo file_0 32 6 38 7. - Definition loc_29 : location_info := LocationInfo file_0 40 6 40 24. - Definition loc_30 : location_info := LocationInfo file_0 23 4 41 5. - Definition loc_31 : location_info := LocationInfo file_0 23 4 41 5. - Definition loc_32 : location_info := LocationInfo file_0 40 6 40 10. - Definition loc_33 : location_info := LocationInfo file_0 40 13 40 23. - Definition loc_34 : location_info := LocationInfo file_0 40 14 40 23. - Definition loc_35 : location_info := LocationInfo file_0 40 14 40 17. - Definition loc_36 : location_info := LocationInfo file_0 40 14 40 17. - Definition loc_37 : location_info := LocationInfo file_0 32 57 38 7. - Definition loc_38 : location_info := LocationInfo file_0 33 8 33 26. - Definition loc_39 : location_info := LocationInfo file_0 34 8 34 54. - Definition loc_40 : location_info := LocationInfo file_0 35 8 35 17. - Definition loc_41 : location_info := LocationInfo file_0 35 17 35 9. - Definition loc_42 : location_info := LocationInfo file_0 36 8 36 41. - Definition loc_43 : location_info := LocationInfo file_0 37 8 37 19. - Definition loc_44 : location_info := LocationInfo file_0 37 15 37 18. - Definition loc_45 : location_info := LocationInfo file_0 37 15 37 18. - Definition loc_46 : location_info := LocationInfo file_0 36 8 36 17. - Definition loc_47 : location_info := LocationInfo file_0 36 8 36 17. - Definition loc_48 : location_info := LocationInfo file_0 36 18 36 39. - Definition loc_49 : location_info := LocationInfo file_0 36 19 36 39. - Definition loc_50 : location_info := LocationInfo file_0 36 19 36 34. - Definition loc_51 : location_info := LocationInfo file_0 35 8 35 16. - Definition loc_52 : location_info := LocationInfo file_0 35 9 35 16. - Definition loc_53 : location_info := LocationInfo file_0 35 11 35 15. - Definition loc_54 : location_info := LocationInfo file_0 35 11 35 15. - Definition loc_55 : location_info := LocationInfo file_0 34 20 34 53. - Definition loc_56 : location_info := LocationInfo file_0 34 21 34 40. - Definition loc_57 : location_info := LocationInfo file_0 34 37 34 40. - Definition loc_58 : location_info := LocationInfo file_0 34 37 34 40. - Definition loc_59 : location_info := LocationInfo file_0 34 43 34 52. - Definition loc_60 : location_info := LocationInfo file_0 34 43 34 52. - Definition loc_61 : location_info := LocationInfo file_0 34 43 34 46. - Definition loc_62 : location_info := LocationInfo file_0 34 43 34 46. - Definition loc_65 : location_info := LocationInfo file_0 33 8 33 17. - Definition loc_66 : location_info := LocationInfo file_0 33 8 33 11. - Definition loc_67 : location_info := LocationInfo file_0 33 8 33 11. - Definition loc_68 : location_info := LocationInfo file_0 33 8 33 25. - Definition loc_69 : location_info := LocationInfo file_0 33 8 33 17. - Definition loc_70 : location_info := LocationInfo file_0 33 8 33 17. - Definition loc_71 : location_info := LocationInfo file_0 33 8 33 11. - Definition loc_72 : location_info := LocationInfo file_0 33 8 33 11. - Definition loc_73 : location_info := LocationInfo file_0 33 21 33 25. - Definition loc_74 : location_info := LocationInfo file_0 33 21 33 25. - Definition loc_76 : location_info := LocationInfo file_0 32 9 32 55. - Definition loc_77 : location_info := LocationInfo file_0 32 9 32 18. - Definition loc_78 : location_info := LocationInfo file_0 32 9 32 18. - Definition loc_79 : location_info := LocationInfo file_0 32 9 32 12. - Definition loc_80 : location_info := LocationInfo file_0 32 9 32 12. - Definition loc_81 : location_info := LocationInfo file_0 32 22 32 55. - Definition loc_82 : location_info := LocationInfo file_0 32 22 32 26. - Definition loc_83 : location_info := LocationInfo file_0 32 22 32 26. - Definition loc_84 : location_info := LocationInfo file_0 32 29 32 55. - Definition loc_85 : location_info := LocationInfo file_0 26 28 31 7. - Definition loc_86 : location_info := LocationInfo file_0 27 8 27 26. - Definition loc_87 : location_info := LocationInfo file_0 28 8 28 17. - Definition loc_88 : location_info := LocationInfo file_0 28 17 28 9. - Definition loc_89 : location_info := LocationInfo file_0 29 8 29 41. - Definition loc_90 : location_info := LocationInfo file_0 30 8 30 19. - Definition loc_91 : location_info := LocationInfo file_0 30 15 30 18. - Definition loc_92 : location_info := LocationInfo file_0 30 15 30 18. - Definition loc_93 : location_info := LocationInfo file_0 29 8 29 17. - Definition loc_94 : location_info := LocationInfo file_0 29 8 29 17. - Definition loc_95 : location_info := LocationInfo file_0 29 18 29 39. - Definition loc_96 : location_info := LocationInfo file_0 29 19 29 39. - Definition loc_97 : location_info := LocationInfo file_0 29 19 29 34. - Definition loc_98 : location_info := LocationInfo file_0 28 8 28 16. - Definition loc_99 : location_info := LocationInfo file_0 28 9 28 16. - Definition loc_100 : location_info := LocationInfo file_0 28 11 28 15. - Definition loc_101 : location_info := LocationInfo file_0 28 11 28 15. - Definition loc_102 : location_info := LocationInfo file_0 27 8 27 13. - Definition loc_103 : location_info := LocationInfo file_0 27 9 27 13. - Definition loc_104 : location_info := LocationInfo file_0 27 9 27 13. - Definition loc_105 : location_info := LocationInfo file_0 27 16 27 25. - Definition loc_106 : location_info := LocationInfo file_0 27 16 27 25. - Definition loc_107 : location_info := LocationInfo file_0 27 16 27 19. - Definition loc_108 : location_info := LocationInfo file_0 27 16 27 19. - Definition loc_110 : location_info := LocationInfo file_0 26 9 26 26. - Definition loc_111 : location_info := LocationInfo file_0 26 9 26 18. - Definition loc_112 : location_info := LocationInfo file_0 26 9 26 18. - Definition loc_113 : location_info := LocationInfo file_0 26 9 26 12. - Definition loc_114 : location_info := LocationInfo file_0 26 9 26 12. - Definition loc_115 : location_info := LocationInfo file_0 26 22 26 26. - Definition loc_116 : location_info := LocationInfo file_0 26 22 26 26. - Definition loc_117 : location_info := LocationInfo file_0 24 26 24 31. - Definition loc_118 : location_info := LocationInfo file_0 24 26 24 31. - Definition loc_119 : location_info := LocationInfo file_0 24 27 24 31. - Definition loc_120 : location_info := LocationInfo file_0 24 27 24 31. - Definition loc_123 : location_info := LocationInfo file_0 23 10 23 33. - Definition loc_124 : location_info := LocationInfo file_0 23 10 23 15. - Definition loc_125 : location_info := LocationInfo file_0 23 10 23 15. - Definition loc_126 : location_info := LocationInfo file_0 23 11 23 15. - Definition loc_127 : location_info := LocationInfo file_0 23 11 23 15. - Definition loc_128 : location_info := LocationInfo file_0 23 19 23 33. - Definition loc_129 : location_info := LocationInfo file_0 18 26 18 47. - Definition loc_130 : location_info := LocationInfo file_0 18 27 18 47. - Definition loc_131 : location_info := LocationInfo file_0 18 27 18 42. - Definition loc_134 : location_info := LocationInfo file_0 15 29 15 52. - Definition loc_135 : location_info := LocationInfo file_0 15 30 15 52. - Definition loc_136 : location_info := LocationInfo file_0 15 31 15 46. - Definition loc_137 : location_info := LocationInfo file_0 14 4 14 11. - Definition loc_138 : location_info := LocationInfo file_0 14 4 14 11. - Definition loc_139 : location_info := LocationInfo file_0 14 12 14 33. - Definition loc_140 : location_info := LocationInfo file_0 14 13 14 33. - Definition loc_141 : location_info := LocationInfo file_0 14 13 14 28. - Definition loc_142 : location_info := LocationInfo file_0 13 8 13 9. - Definition loc_145 : location_info := LocationInfo file_0 51 2 54 3. - Definition loc_146 : location_info := LocationInfo file_0 56 2 56 34. - Definition loc_147 : location_info := LocationInfo file_0 57 2 57 21. - Definition loc_148 : location_info := LocationInfo file_0 59 2 59 33. - Definition loc_149 : location_info := LocationInfo file_0 60 2 60 51. - Definition loc_150 : location_info := LocationInfo file_0 60 51 60 3. - Definition loc_151 : location_info := LocationInfo file_0 62 2 62 37. - Definition loc_152 : location_info := LocationInfo file_0 63 2 63 31. - Definition loc_153 : location_info := LocationInfo file_0 65 2 65 35. - Definition loc_154 : location_info := LocationInfo file_0 65 2 65 11. - Definition loc_155 : location_info := LocationInfo file_0 65 2 65 11. - Definition loc_156 : location_info := LocationInfo file_0 65 12 65 33. - Definition loc_157 : location_info := LocationInfo file_0 65 13 65 33. - Definition loc_158 : location_info := LocationInfo file_0 65 13 65 28. - Definition loc_159 : location_info := LocationInfo file_0 63 2 63 22. - Definition loc_160 : location_info := LocationInfo file_0 63 2 63 17. - Definition loc_161 : location_info := LocationInfo file_0 63 25 63 30. - Definition loc_162 : location_info := LocationInfo file_0 63 25 63 30. - Definition loc_163 : location_info := LocationInfo file_0 62 2 62 13. - Definition loc_164 : location_info := LocationInfo file_0 62 2 62 7. - Definition loc_165 : location_info := LocationInfo file_0 62 2 62 7. - Definition loc_166 : location_info := LocationInfo file_0 62 16 62 36. - Definition loc_167 : location_info := LocationInfo file_0 62 16 62 36. - Definition loc_168 : location_info := LocationInfo file_0 62 16 62 31. - Definition loc_169 : location_info := LocationInfo file_0 60 27 60 50. - Definition loc_170 : location_info := LocationInfo file_0 60 28 60 50. - Definition loc_171 : location_info := LocationInfo file_0 60 29 60 44. - Definition loc_172 : location_info := LocationInfo file_0 59 2 59 9. - Definition loc_173 : location_info := LocationInfo file_0 59 2 59 9. - Definition loc_174 : location_info := LocationInfo file_0 59 10 59 31. - Definition loc_175 : location_info := LocationInfo file_0 59 11 59 31. - Definition loc_176 : location_info := LocationInfo file_0 59 11 59 26. - Definition loc_177 : location_info := LocationInfo file_0 57 2 57 13. - Definition loc_178 : location_info := LocationInfo file_0 57 2 57 7. - Definition loc_179 : location_info := LocationInfo file_0 57 2 57 7. - Definition loc_180 : location_info := LocationInfo file_0 57 16 57 20. - Definition loc_181 : location_info := LocationInfo file_0 57 16 57 20. - Definition loc_182 : location_info := LocationInfo file_0 56 30 56 33. - Definition loc_183 : location_info := LocationInfo file_0 56 30 56 33. - Definition loc_186 : location_info := LocationInfo file_0 51 41 54 3. - Definition loc_187 : location_info := LocationInfo file_0 53 4 53 11. - Definition loc_190 : location_info := LocationInfo file_0 51 6 51 39. - Definition loc_191 : location_info := LocationInfo file_0 51 6 51 10. - Definition loc_192 : location_info := LocationInfo file_0 51 6 51 10. - Definition loc_193 : location_info := LocationInfo file_0 51 13 51 39. - Definition loc_196 : location_info := LocationInfo file_0 81 2 81 25. - Definition loc_197 : location_info := LocationInfo file_0 81 9 81 24. - Definition loc_198 : location_info := LocationInfo file_0 81 9 81 14. - Definition loc_199 : location_info := LocationInfo file_0 81 9 81 14. - Definition loc_200 : location_info := LocationInfo file_0 81 15 81 23. - Definition loc_201 : location_info := LocationInfo file_0 81 15 81 16. - Definition loc_202 : location_info := LocationInfo file_0 81 15 81 16. - Definition loc_203 : location_info := LocationInfo file_0 81 19 81 23. - Definition loc_204 : location_info := LocationInfo file_0 81 19 81 23. - Definition loc_207 : location_info := LocationInfo file_0 86 2 86 22. - Definition loc_208 : location_info := LocationInfo file_0 86 2 86 6. - Definition loc_209 : location_info := LocationInfo file_0 86 2 86 6. - Definition loc_210 : location_info := LocationInfo file_0 86 7 86 15. - Definition loc_211 : location_info := LocationInfo file_0 86 7 86 8. - Definition loc_212 : location_info := LocationInfo file_0 86 7 86 8. - Definition loc_213 : location_info := LocationInfo file_0 86 11 86 15. - Definition loc_214 : location_info := LocationInfo file_0 86 11 86 15. - Definition loc_215 : location_info := LocationInfo file_0 86 17 86 20. - Definition loc_216 : location_info := LocationInfo file_0 86 17 86 20. - Definition loc_219 : location_info := LocationInfo file_0 69 2 69 33. - Definition loc_220 : location_info := LocationInfo file_0 70 2 70 40. - Definition loc_221 : location_info := LocationInfo file_0 74 2 74 12. - Definition loc_222 : location_info := LocationInfo file_0 74 12 74 13. - Definition loc_223 : location_info := LocationInfo file_0 76 2 76 49. - Definition loc_224 : location_info := LocationInfo file_0 76 49 76 3. - Definition loc_225 : location_info := LocationInfo file_0 76 30 76 48. - Definition loc_226 : location_info := LocationInfo file_0 76 31 76 48. - Definition loc_227 : location_info := LocationInfo file_0 74 2 74 12. - Definition loc_228 : location_info := LocationInfo file_0 74 10 74 12. - Definition loc_229 : location_info := LocationInfo file_0 74 2 74 12. - Definition loc_230 : location_info := LocationInfo file_0 74 2 74 12. - Definition loc_231 : location_info := LocationInfo file_0 74 8 74 9. - Definition loc_232 : location_info := LocationInfo file_0 70 2 70 22. - Definition loc_233 : location_info := LocationInfo file_0 70 2 70 17. - Definition loc_234 : location_info := LocationInfo file_0 70 25 70 39. - Definition loc_235 : location_info := LocationInfo file_0 69 2 69 9. - Definition loc_236 : location_info := LocationInfo file_0 69 2 69 9. - Definition loc_237 : location_info := LocationInfo file_0 69 10 69 31. - Definition loc_238 : location_info := LocationInfo file_0 69 11 69 31. - Definition loc_239 : location_info := LocationInfo file_0 69 11 69 26. - - (* Definition of struct [atomic_flag]. *) - Program Definition struct_atomic_flag := {| - sl_members := [ - (Some "_Value", it_layout bool_it) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [spinlock]. *) - Program Definition struct_spinlock := {| - sl_members := [ - (Some "lock", it_layout bool_it) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [alloc_entry]. *) - Program Definition struct_alloc_entry := {| - sl_members := [ - (Some "size", it_layout size_t); - (Some "next", LPtr) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [alloc_state]. *) - Program Definition struct_alloc_state := {| - sl_members := [ - (Some "lock", layout_of struct_spinlock); - (None, mk_layout 7%nat 0%nat); - (Some "data", LPtr) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of function [alloc]. *) - Definition impl_alloc (allocator_state sl_lock sl_unlock : loc): function := {| - f_args := [ - ("size", it_layout size_t) - ]; - f_local_vars := [ - ("prev", LPtr); - ("cur", LPtr); - ("ret", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_2 ; - Goto "#1" - ]> $ - <[ "#1" := - locinfo: loc_142 ; - if: LocInfoE loc_142 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_142 (i2v 1 i32))) - then - locinfo: loc_5 ; - Goto "#2" - else - Goto "#3" - ]> $ - <[ "#10" := - locinfo: loc_29 ; - Goto "#8" - ]> $ - <[ "#11" := - locinfo: loc_86 ; - LocInfoE loc_103 (!{LPtr} (LocInfoE loc_104 ("prev"))) <-{ LPtr } - LocInfoE loc_105 (use{LPtr} (LocInfoE loc_106 ((LocInfoE loc_107 (!{LPtr} (LocInfoE loc_108 ("cur")))) at{struct_alloc_entry} "next"))) ; - locinfo: loc_87 ; - expr: (LocInfoE loc_98 (&(LocInfoE loc_100 (!{LPtr} (LocInfoE loc_101 ("prev")))))) ; - locinfo: loc_89 ; - "_" <- LocInfoE loc_94 (sl_unlock) with - [ LocInfoE loc_95 (AnnotExpr 1%nat LockA (LocInfoE loc_95 (&(LocInfoE loc_96 ((LocInfoE loc_97 (allocator_state)) at{struct_alloc_state} "lock"))))) ] ; - locinfo: loc_90 ; - Return (LocInfoE loc_91 (use{LPtr} (LocInfoE loc_92 ("cur")))) - ]> $ - <[ "#12" := - locinfo: loc_76 ; - Goto "#7" - ]> $ - <[ "#2" := - locinfo: loc_5 ; - "_" <- LocInfoE loc_138 (sl_lock) with - [ LocInfoE loc_139 (&(LocInfoE loc_140 ((LocInfoE loc_141 (allocator_state)) at{struct_alloc_state} "lock"))) ] ; - locinfo: loc_6 ; - annot: (UnlockA) ; - expr: (LocInfoE loc_134 (&(LocInfoE loc_135 ((LocInfoE loc_136 (allocator_state)) at{struct_alloc_state} "data")))) ; - "prev" <-{ LPtr } - LocInfoE loc_129 (&(LocInfoE loc_130 ((LocInfoE loc_131 (allocator_state)) at{struct_alloc_state} "data"))) ; - locinfo: loc_9 ; - Goto "#4" - ]> $ - <[ "#3" := - Return (VOID) - ]> $ - <[ "#4" := - locinfo: loc_123 ; - if: LocInfoE loc_123 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_123 ((LocInfoE loc_124 (use{LPtr} (LocInfoE loc_126 (!{LPtr} (LocInfoE loc_127 ("prev")))))) !={PtrOp, PtrOp} (LocInfoE loc_128 (NULL))))) - then - Goto "#5" - else - locinfo: loc_10 ; - Goto "#6" - ]> $ - <[ "#5" := - "cur" <-{ LPtr } - LocInfoE loc_117 (use{LPtr} (LocInfoE loc_119 (!{LPtr} (LocInfoE loc_120 ("prev"))))) ; - locinfo: loc_110 ; - if: LocInfoE loc_110 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_110 ((LocInfoE loc_111 (use{it_layout size_t} (LocInfoE loc_112 ((LocInfoE loc_113 (!{LPtr} (LocInfoE loc_114 ("cur")))) at{struct_alloc_entry} "size")))) ={IntOp size_t, IntOp size_t} (LocInfoE loc_115 (use{it_layout size_t} (LocInfoE loc_116 ("size"))))))) - then - locinfo: loc_86 ; - Goto "#11" - else - locinfo: loc_76 ; - Goto "#12" - ]> $ - <[ "#6" := - locinfo: loc_10 ; - expr: (LocInfoE loc_20 (&(LocInfoE loc_22 (!{LPtr} (LocInfoE loc_23 ("prev")))))) ; - locinfo: loc_12 ; - "_" <- LocInfoE loc_16 (sl_unlock) with - [ LocInfoE loc_17 (AnnotExpr 1%nat LockA (LocInfoE loc_17 (&(LocInfoE loc_18 ((LocInfoE loc_19 (allocator_state)) at{struct_alloc_state} "lock"))))) ] ; - locinfo: loc_13 ; - Goto "continue2" - ]> $ - <[ "#7" := - locinfo: loc_76 ; - if: LocInfoE loc_76 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_76 ((LocInfoE loc_77 (use{it_layout size_t} (LocInfoE loc_78 ((LocInfoE loc_79 (!{LPtr} (LocInfoE loc_80 ("cur")))) at{struct_alloc_entry} "size")))) ≥{IntOp size_t, IntOp size_t} (LocInfoE loc_81 ((LocInfoE loc_82 (use{it_layout size_t} (LocInfoE loc_83 ("size")))) +{IntOp size_t, IntOp size_t} (LocInfoE loc_84 (i2v (layout_of struct_alloc_entry).(ly_size) size_t))))))) - then - locinfo: loc_38 ; - Goto "#9" - else - locinfo: loc_29 ; - Goto "#10" - ]> $ - <[ "#8" := - locinfo: loc_29 ; - LocInfoE loc_32 ("prev") <-{ LPtr } - LocInfoE loc_33 (&(LocInfoE loc_34 ((LocInfoE loc_35 (!{LPtr} (LocInfoE loc_36 ("cur")))) at{struct_alloc_entry} "next"))) ; - locinfo: loc_30 ; - Goto "continue4" - ]> $ - <[ "#9" := - locinfo: loc_38 ; - LocInfoE loc_65 ((LocInfoE loc_66 (!{LPtr} (LocInfoE loc_67 ("cur")))) at{struct_alloc_entry} "size") <-{ it_layout size_t } - LocInfoE loc_68 ((LocInfoE loc_69 (use{it_layout size_t} (LocInfoE loc_70 ((LocInfoE loc_71 (!{LPtr} (LocInfoE loc_72 ("cur")))) at{struct_alloc_entry} "size")))) -{IntOp size_t, IntOp size_t} (LocInfoE loc_73 (use{it_layout size_t} (LocInfoE loc_74 ("size"))))) ; - "ret" <-{ LPtr } - LocInfoE loc_55 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_55 ((LocInfoE loc_56 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_57 (use{LPtr} (LocInfoE loc_58 ("cur")))))) at_offset{it_layout u8, PtrOp, IntOp size_t} (LocInfoE loc_59 (use{it_layout size_t} (LocInfoE loc_60 ((LocInfoE loc_61 (!{LPtr} (LocInfoE loc_62 ("cur")))) at{struct_alloc_entry} "size"))))))) ; - locinfo: loc_40 ; - expr: (LocInfoE loc_51 (&(LocInfoE loc_53 (!{LPtr} (LocInfoE loc_54 ("prev")))))) ; - locinfo: loc_42 ; - "_" <- LocInfoE loc_47 (sl_unlock) with - [ LocInfoE loc_48 (AnnotExpr 1%nat LockA (LocInfoE loc_48 (&(LocInfoE loc_49 ((LocInfoE loc_50 (allocator_state)) at{struct_alloc_state} "lock"))))) ] ; - locinfo: loc_43 ; - Return (LocInfoE loc_44 (use{LPtr} (LocInfoE loc_45 ("ret")))) - ]> $ - <[ "continue2" := - locinfo: loc_2 ; - Goto "#1" - ]> $ - <[ "continue4" := - locinfo: loc_9 ; - Goto "#4" - ]> $∅ - )%E - |}. - - (* Definition of function [free]. *) - Definition impl_free (allocator_state sl_lock sl_unlock : loc): function := {| - f_args := [ - ("size", it_layout size_t); - ("ptr", LPtr) - ]; - f_local_vars := [ - ("entry", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_190 ; - if: LocInfoE loc_190 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_190 ((LocInfoE loc_191 (use{it_layout size_t} (LocInfoE loc_192 ("size")))) <{IntOp size_t, IntOp size_t} (LocInfoE loc_193 (i2v (layout_of struct_alloc_entry).(ly_size) size_t))))) - then - locinfo: loc_187 ; - Goto "#2" - else - Goto "#3" - ]> $ - <[ "#1" := - "entry" <-{ LPtr } - LocInfoE loc_182 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_182 (use{LPtr} (LocInfoE loc_183 ("ptr"))))) ; - locinfo: loc_147 ; - LocInfoE loc_177 ((LocInfoE loc_178 (!{LPtr} (LocInfoE loc_179 ("entry")))) at{struct_alloc_entry} "size") <-{ it_layout size_t } - LocInfoE loc_180 (use{it_layout size_t} (LocInfoE loc_181 ("size"))) ; - locinfo: loc_148 ; - "_" <- LocInfoE loc_173 (sl_lock) with - [ LocInfoE loc_174 (&(LocInfoE loc_175 ((LocInfoE loc_176 (allocator_state)) at{struct_alloc_state} "lock"))) ] ; - locinfo: loc_149 ; - annot: (UnlockA) ; - expr: (LocInfoE loc_169 (&(LocInfoE loc_170 ((LocInfoE loc_171 (allocator_state)) at{struct_alloc_state} "data")))) ; - locinfo: loc_151 ; - LocInfoE loc_163 ((LocInfoE loc_164 (!{LPtr} (LocInfoE loc_165 ("entry")))) at{struct_alloc_entry} "next") <-{ LPtr } - LocInfoE loc_166 (use{LPtr} (LocInfoE loc_167 ((LocInfoE loc_168 (allocator_state)) at{struct_alloc_state} "data"))) ; - locinfo: loc_152 ; - LocInfoE loc_159 ((LocInfoE loc_160 (allocator_state)) at{struct_alloc_state} "data") <-{ LPtr } - LocInfoE loc_161 (use{LPtr} (LocInfoE loc_162 ("entry"))) ; - locinfo: loc_153 ; - "_" <- LocInfoE loc_155 (sl_unlock) with - [ LocInfoE loc_156 (AnnotExpr 1%nat LockA (LocInfoE loc_156 (&(LocInfoE loc_157 ((LocInfoE loc_158 (allocator_state)) at{struct_alloc_state} "lock"))))) ] ; - Return (VOID) - ]> $ - <[ "#2" := - locinfo: loc_187 ; - Return (VOID) - ]> $ - <[ "#3" := - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [alloc_array]. *) - Definition impl_alloc_array (alloc : loc): function := {| - f_args := [ - ("size", it_layout size_t); - ("n", it_layout size_t) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_197 ; - "$0" <- LocInfoE loc_199 (alloc) with - [ LocInfoE loc_200 ((LocInfoE loc_201 (use{it_layout size_t} (LocInfoE loc_202 ("n")))) ×{IntOp size_t, IntOp size_t} (LocInfoE loc_203 (use{it_layout size_t} (LocInfoE loc_204 ("size"))))) ] ; - locinfo: loc_196 ; - Return (LocInfoE loc_197 ("$0")) - ]> $∅ - )%E - |}. - - (* Definition of function [free_array]. *) - Definition impl_free_array (free : loc): function := {| - f_args := [ - ("size", it_layout size_t); - ("n", it_layout size_t); - ("ptr", LPtr) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_207 ; - "_" <- LocInfoE loc_209 (free) with - [ LocInfoE loc_210 ((LocInfoE loc_211 (use{it_layout size_t} (LocInfoE loc_212 ("n")))) ×{IntOp size_t, IntOp size_t} (LocInfoE loc_213 (use{it_layout size_t} (LocInfoE loc_214 ("size"))))) ; - LocInfoE loc_215 (use{LPtr} (LocInfoE loc_216 ("ptr"))) ] ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [init_alloc]. *) - Definition impl_init_alloc (allocator_state sl_init : loc): function := {| - f_args := [ - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_219 ; - "_" <- LocInfoE loc_236 (sl_init) with - [ LocInfoE loc_237 (&(LocInfoE loc_238 ((LocInfoE loc_239 (allocator_state)) at{struct_alloc_state} "lock"))) ] ; - locinfo: loc_220 ; - LocInfoE loc_232 ((LocInfoE loc_233 (allocator_state)) at{struct_alloc_state} "data") <-{ LPtr } - LocInfoE loc_234 (NULL) ; - locinfo: loc_221 ; - Goto "#1" - ]> $ - <[ "#1" := - locinfo: loc_231 ; - if: LocInfoE loc_231 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_231 (i2v 0 i32))) - then - locinfo: loc_229 ; - Goto "#2" - else - locinfo: loc_223 ; - Goto "#3" - ]> $ - <[ "#2" := - locinfo: loc_229 ; - Goto "continue13" - ]> $ - <[ "#3" := - locinfo: loc_223 ; - annot: (ShareAnnot) ; - expr: (LocInfoE loc_225 (&(LocInfoE loc_226 (allocator_state)))) ; - Return (VOID) - ]> $ - <[ "continue13" := - locinfo: loc_221 ; - Goto "#1" - ]> $∅ - )%E - |}. -End code. diff --git a/theories/examples/tutorial/t4_alloc_proof_alloc.v b/theories/examples/tutorial/t4_alloc_proof_alloc.v deleted file mode 100644 index 193dd1b465f830848005545237636123173db97f..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t4_alloc_proof_alloc.v +++ /dev/null @@ -1,48 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t4_alloc_code. -From refinedc.examples.tutorial Require Import t4_alloc_spec. -From refinedc.examples.spinlock Require Import spinlock_def. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t4_alloc.c]. *) -Section proof_alloc. - Context `{!typeG Σ} `{!globalG Σ}. - Context `{!lockG Σ}. - - (* Typing proof for [alloc]. *) - Lemma type_alloc (allocator_state sl_lock sl_unlock : loc) : - global_locs !! "allocator_state" = Some allocator_state → - global_initialized_types !! "allocator_state" = Some (GT () (λ '(), (alloc_state) : type)) → - sl_lock â—áµ¥ sl_lock @ function_ptr type_of_sl_lock -∗ - sl_unlock â—áµ¥ sl_unlock @ function_ptr type_of_sl_unlock -∗ - typed_function (impl_alloc allocator_state sl_lock sl_unlock) type_of_alloc. - Proof. - start_function "alloc" (size) => arg_size local_prev local_cur local_ret. - split_blocks (( - <[ "#1" := - arg_size â—â‚— (size @ (int (size_t))) ∗ - local_prev â—â‚— uninit LPtr ∗ - local_cur â—â‚— uninit LPtr ∗ - local_ret â—â‚— uninit LPtr ∗ - (initialized "allocator_state" ()) - ]> $ - ∅ - )%I : gmap block_id (iProp Σ)) (( - <[ "#4" := - ∃ pc : loc, - arg_size â—â‚— (size @ (int (size_t))) ∗ - local_cur â—â‚— uninit LPtr ∗ - local_ret â—â‚— uninit LPtr ∗ - local_prev â—â‚— (pc @ (&own (alloc_entry_t))) ∗ - (allocator_state at{struct_alloc_state}â‚— "data" â—â‚— wand (pc â—â‚— alloc_entry_t) alloc_entry_t) - ]> $ - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "alloc" "#0". - - repeat liRStep; liShow. - all: print_typesystem_goal "alloc" "#1". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "alloc". - Qed. -End proof_alloc. diff --git a/theories/examples/tutorial/t4_alloc_proof_alloc_array.v b/theories/examples/tutorial/t4_alloc_proof_alloc_array.v deleted file mode 100644 index 7f7c273d09fc4e18f805b8820171a87ea1ede07c..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t4_alloc_proof_alloc_array.v +++ /dev/null @@ -1,29 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t4_alloc_code. -From refinedc.examples.tutorial Require Import t4_alloc_spec. -From refinedc.examples.spinlock Require Import spinlock_def. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t4_alloc.c]. *) -Section proof_alloc_array. - Context `{!typeG Σ} `{!globalG Σ}. - Context `{!lockG Σ}. - - (* Typing proof for [alloc_array]. *) - Lemma type_alloc_array (alloc : loc) : - alloc â—áµ¥ alloc @ function_ptr type_of_alloc -∗ - typed_function (impl_alloc_array alloc) type_of_alloc_array. - Proof. - start_function "alloc_array" ([size n]) => arg_size arg_n. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "alloc_array" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by rewrite /layout_wf ?Nat2Z.inj_mul ?Z2Nat.id //; repeat apply Z.divide_mul_r. - all: print_sidecondition_goal "alloc_array". - Qed. -End proof_alloc_array. diff --git a/theories/examples/tutorial/t4_alloc_proof_free.v b/theories/examples/tutorial/t4_alloc_proof_free.v deleted file mode 100644 index 990c85cb526d31d9c3633f48bd653139866bc66c..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t4_alloc_proof_free.v +++ /dev/null @@ -1,32 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t4_alloc_code. -From refinedc.examples.tutorial Require Import t4_alloc_spec. -From refinedc.examples.spinlock Require Import spinlock_def. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t4_alloc.c]. *) -Section proof_free. - Context `{!typeG Σ} `{!globalG Σ}. - Context `{!lockG Σ}. - - (* Typing proof for [free]. *) - Lemma type_free (allocator_state sl_lock sl_unlock : loc) : - global_locs !! "allocator_state" = Some allocator_state → - global_initialized_types !! "allocator_state" = Some (GT () (λ '(), (alloc_state) : type)) → - sl_lock â—áµ¥ sl_lock @ function_ptr type_of_sl_lock -∗ - sl_unlock â—áµ¥ sl_unlock @ function_ptr type_of_sl_unlock -∗ - typed_function (impl_free allocator_state sl_lock sl_unlock) type_of_free. - Proof. - start_function "free" (size) => arg_size arg_ptr local_entry. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "free" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by rewrite ?Nat2Z.inj_mul ?Z2Nat.id //; apply Z.divide_factor_r. - all: print_sidecondition_goal "free". - Qed. -End proof_free. diff --git a/theories/examples/tutorial/t4_alloc_proof_free_array.v b/theories/examples/tutorial/t4_alloc_proof_free_array.v deleted file mode 100644 index 28cd0001cc8790a0cc9679cbda78e21b6ead4da8..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t4_alloc_proof_free_array.v +++ /dev/null @@ -1,29 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t4_alloc_code. -From refinedc.examples.tutorial Require Import t4_alloc_spec. -From refinedc.examples.spinlock Require Import spinlock_def. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t4_alloc.c]. *) -Section proof_free_array. - Context `{!typeG Σ} `{!globalG Σ}. - Context `{!lockG Σ}. - - (* Typing proof for [free_array]. *) - Lemma type_free_array (free : loc) : - free â—áµ¥ free @ function_ptr type_of_free -∗ - typed_function (impl_free_array free) type_of_free_array. - Proof. - start_function "free_array" ([size n]) => arg_size arg_n arg_ptr. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "free_array" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by rewrite /layout_wf ?Nat2Z.inj_mul ?Z2Nat.id //; repeat apply Z.divide_mul_r. - all: print_sidecondition_goal "free_array". - Qed. -End proof_free_array. diff --git a/theories/examples/tutorial/t4_alloc_proof_init_alloc.v b/theories/examples/tutorial/t4_alloc_proof_init_alloc.v deleted file mode 100644 index 3408da8eba1196529ded82fc37e0f46f9f0b33dc..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t4_alloc_proof_init_alloc.v +++ /dev/null @@ -1,35 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t4_alloc_code. -From refinedc.examples.tutorial Require Import t4_alloc_spec. -From refinedc.examples.spinlock Require Import spinlock_def. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t4_alloc.c]. *) -Section proof_init_alloc. - Context `{!typeG Σ} `{!globalG Σ}. - Context `{!lockG Σ}. - - (* Typing proof for [init_alloc]. *) - Lemma type_init_alloc (allocator_state sl_init : loc) : - global_locs !! "allocator_state" = Some allocator_state → - global_initialized_types !! "allocator_state" = Some (GT () (λ '(), (alloc_state) : type)) → - sl_init â—áµ¥ sl_init @ function_ptr type_of_sl_init -∗ - typed_function (impl_init_alloc allocator_state sl_init) type_of_init_alloc. - Proof. - start_function "init_alloc" ([]). - split_blocks (( - <[ "#1" := - (allocator_state â—â‚— (alloc_state)) - ]> $ - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "init_alloc" "#0". - - repeat liRStep; liShow. - all: print_typesystem_goal "init_alloc" "#1". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "init_alloc". - Qed. -End proof_init_alloc. diff --git a/theories/examples/tutorial/t4_alloc_spec.v b/theories/examples/tutorial/t4_alloc_spec.v deleted file mode 100644 index b76cfde10e03a3b928391427fed945d3e8f99e3b..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t4_alloc_spec.v +++ /dev/null @@ -1,175 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t4_alloc_code. -From refinedc.examples.spinlock Require Import spinlock_def. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t4_alloc.c]. *) -Section spec. - Context `{!typeG Σ} `{!globalG Σ}. - Context `{!lockG Σ}. - - (* Inlined code. *) - - Definition alloc_initialized := initialized "allocator_state" (). - - (* Definition of type [alloc_entry_t]. *) - Definition alloc_entry_t_rec : ((list nat) -d> typeO) → ((list nat) -d> typeO) := (λ self sizes, - ((maybe2 cons sizes) @ (optionalO (λ patt__ : (nat * _), - let size := patt__.1 in - let l := patt__.2 in - &own ( - constrained (padded (struct struct_alloc_entry [@{type} - (size @ (int (size_t))) ; - (guarded ("alloc_entry_t_0") (apply_dfun self (l))) - ]) struct_alloc_entry (mk_layout size 3)) ( - ⌜(8 | size)⌠- ) - ) - ) null)) - )%I. - Typeclasses Opaque alloc_entry_t_rec. - - Global Instance alloc_entry_t_rec_ne : Contractive alloc_entry_t_rec. - Proof. solve_type_proper. Qed. - - Definition alloc_entry_t : rtype := {| - rty_type := (list nat); - rty r__ := fixp alloc_entry_t_rec r__ - |}. - - Lemma alloc_entry_t_unfold (sizes : list nat) : - (sizes @ alloc_entry_t)%I ≡@{type} ( - ((maybe2 cons sizes) @ (optionalO (λ patt__ : (nat * _), - let size := patt__.1 in - let l := patt__.2 in - &own ( - constrained (padded (struct struct_alloc_entry [@{type} - (size @ (int (size_t))) ; - (guarded "alloc_entry_t_0" (l @ alloc_entry_t)) - ]) struct_alloc_entry (mk_layout size 3)) ( - ⌜(8 | size)⌠- ) - ) - ) null)) - )%I. - Proof. by rewrite {1}/with_refinement/=fixp_unfold. Qed. - - - Global Program Instance alloc_entry_t_rmovable : RMovable alloc_entry_t := - {| rmovable 'sizes := movable_eq _ _ (alloc_entry_t_unfold sizes) |}. - Next Obligation. solve_ty_layout_eq. Qed. - - Global Instance alloc_entry_t_simplify_hyp_place_inst l_ β_ (sizes : list nat) : - SimplifyHypPlace l_ β_ (sizes @ alloc_entry_t)%I (Some 100%N) := - λ T, i2p (simplify_hyp_place_eq l_ β_ _ _ T (alloc_entry_t_unfold _)). - Global Instance alloc_entry_t_simplify_goal_place_inst l_ β_ (sizes : list nat) : - SimplifyGoalPlace l_ β_ (sizes @ alloc_entry_t)%I (Some 100%N) := - λ T, i2p (simplify_goal_place_eq l_ β_ _ _ T (alloc_entry_t_unfold _)). - - Global Program Instance alloc_entry_t_simplify_hyp_val_inst v_ (sizes : list nat) : - SimplifyHypVal v_ (sizes @ alloc_entry_t)%I (Some 100%N) := - λ T, i2p (simplify_hyp_val_eq v_ _ _ (alloc_entry_t_unfold _) T _). - Next Obligation. done. Qed. - Global Program Instance alloc_entry_t_simplify_goal_val_inst v_ (sizes : list nat) : - SimplifyGoalVal v_ (sizes @ alloc_entry_t)%I (Some 100%N) := - λ T, i2p (simplify_goal_val_eq v_ _ _ (alloc_entry_t_unfold _) T _). - Next Obligation. done. Qed. - - (* Definition of type [alloc_state]. *) - Definition alloc_state_rec : (unit -d> typeO) → (unit -d> typeO) := (λ self n, - tyexists (λ lid : lock_id, - struct struct_alloc_state [@{type} - (spinlock (lid)) ; - (spinlocked (lid) ("data") (alloc_entry_t)) - ]) - )%I. - Typeclasses Opaque alloc_state_rec. - - Global Instance alloc_state_rec_ne : Contractive alloc_state_rec. - Proof. solve_type_proper. Qed. - - Definition alloc_state : rtype := {| - rty_type := unit; - rty r__ := fixp alloc_state_rec r__ - |}. - - Lemma alloc_state_unfold (n : unit) : - (n @ alloc_state)%I ≡@{type} ( - tyexists (λ lid : lock_id, - struct struct_alloc_state [@{type} - (spinlock (lid)) ; - (spinlocked (lid) ("data") (alloc_entry_t)) - ]) - )%I. - Proof. by rewrite {1}/with_refinement/=fixp_unfold. Qed. - - - Global Program Instance alloc_state_rmovable : RMovable alloc_state := - {| rmovable 'n := movable_eq _ _ (alloc_state_unfold n) |}. - Next Obligation. solve_ty_layout_eq. Qed. - - Global Instance alloc_state_simplify_hyp_place_inst l_ β_ (n : unit) : - SimplifyHypPlace l_ β_ (n @ alloc_state)%I (Some 100%N) := - λ T, i2p (simplify_hyp_place_eq l_ β_ _ _ T (alloc_state_unfold _)). - Global Instance alloc_state_simplify_goal_place_inst l_ β_ (n : unit) : - SimplifyGoalPlace l_ β_ (n @ alloc_state)%I (Some 100%N) := - λ T, i2p (simplify_goal_place_eq l_ β_ _ _ T (alloc_state_unfold _)). - - Global Program Instance alloc_state_simplify_hyp_val_inst v_ (n : unit) : - SimplifyHypVal v_ (n @ alloc_state)%I (Some 100%N) := - λ T, i2p (simplify_hyp_val_eq v_ _ _ (alloc_state_unfold _) T _). - Next Obligation. done. Qed. - Global Program Instance alloc_state_simplify_goal_val_inst v_ (n : unit) : - SimplifyGoalVal v_ (n @ alloc_state)%I (Some 100%N) := - λ T, i2p (simplify_goal_val_eq v_ _ _ (alloc_state_unfold _) T _). - Next Obligation. done. Qed. - - (* Type definitions. *) - - (* Function [atomic_thread_fence] has been skipped. *) - - (* Function [atomic_signal_fence] has been skipped. *) - - (* Specifications for function [sl_init]. *) - Definition type_of_sl_init := - fn(∀ p : loc; (p @ (&own (uninit (struct_spinlock)))); True) - → ∃ gamma : lock_id, (void); (p â—â‚— (spinlock (gamma))). - - (* Specifications for function [sl_lock]. *) - Definition type_of_sl_lock := - fn(∀ (p, gamma, beta) : loc * lock_id * own_state; (p @ (&frac{beta} (spinlock (gamma)))); True) - → ∃ () : (), (void); (p â—â‚—{beta} (spinlock (gamma))) ∗ (spinlock_token gamma []). - - (* Specifications for function [sl_unlock]. *) - Definition type_of_sl_unlock := - fn(∀ (p, gamma, beta) : loc * lock_id * own_state; (p @ (&frac{beta} (spinlock (gamma)))); (spinlock_token gamma [])) - → ∃ () : (), (void); (p â—â‚—{beta} (spinlock (gamma))). - - (* Specifications for function [alloc]. *) - Definition type_of_alloc := - fn(∀ size : nat; (size @ (int (size_t))); ⌜size + 16 < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (&own (uninit (mk_layout size 3))); True. - - (* Specifications for function [free]. *) - Definition type_of_free := - fn(∀ size : nat; (size @ (int (size_t))), (&own (uninit (mk_layout size 3))); (alloc_initialized) ∗ ⌜(8 | size)âŒ) - → ∃ () : (), (void); True. - - (* Specifications for function [alloc_array]. *) - Definition type_of_alloc_array := - fn(∀ (size, n) : nat * nat; (size @ (int (size_t))), (n @ (int (size_t))); ⌜size * n + 16 < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (&own (array (mk_layout size 3) (replicate n (uninit (mk_layout size 3))))); True. - - (* Specifications for function [free_array]. *) - Definition type_of_free_array := - fn(∀ (size, n) : nat * nat; (size @ (int (size_t))), (n @ (int (size_t))), (&own (array (mk_layout size 3) (replicate n (uninit (mk_layout size 3))))); ⌜size * n < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (void); True. - - (* Specifications for function [init_alloc]. *) - Definition type_of_init_alloc := - fn(∀ () : (); (global_with_type "allocator_state" Own (uninit struct_alloc_state))) - → ∃ () : (), (void); (alloc_initialized). -End spec. - -Typeclasses Opaque alloc_entry_t_rec. -Typeclasses Opaque alloc_state_rec. diff --git a/theories/examples/tutorial/t5_main.c.generate b/theories/examples/tutorial/t5_main.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/tutorial/t5_main_code.v b/theories/examples/tutorial/t5_main_code.v deleted file mode 100644 index 79fcb1a8373b0da2ca254386705ebfd5349e90db..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t5_main_code.v +++ /dev/null @@ -1,128 +0,0 @@ -From refinedc.lang Require Export notation. -From refinedc.lang Require Import tactics. -From refinedc.typing Require Import annotations. -From refinedc.examples.spinlock Require Import spinlock_annot. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t5_main.c]. *) -Section code. - Definition file_0 : string := "theories/examples/tutorial/t5_main.c". - Definition loc_2 : location_info := LocationInfo file_0 16 4 16 17. - Definition loc_3 : location_info := LocationInfo file_0 17 4 17 32. - Definition loc_4 : location_info := LocationInfo file_0 18 4 18 32. - Definition loc_5 : location_info := LocationInfo file_0 20 4 20 11. - Definition loc_6 : location_info := LocationInfo file_0 21 4 21 13. - Definition loc_7 : location_info := LocationInfo file_0 21 11 21 12. - Definition loc_8 : location_info := LocationInfo file_0 20 4 20 8. - Definition loc_9 : location_info := LocationInfo file_0 20 4 20 8. - Definition loc_10 : location_info := LocationInfo file_0 18 4 18 17. - Definition loc_11 : location_info := LocationInfo file_0 18 4 18 17. - Definition loc_12 : location_info := LocationInfo file_0 18 18 18 30. - Definition loc_13 : location_info := LocationInfo file_0 18 19 18 30. - Definition loc_14 : location_info := LocationInfo file_0 17 4 17 8. - Definition loc_15 : location_info := LocationInfo file_0 17 4 17 8. - Definition loc_16 : location_info := LocationInfo file_0 17 9 17 14. - Definition loc_17 : location_info := LocationInfo file_0 17 16 17 30. - Definition loc_18 : location_info := LocationInfo file_0 17 16 17 30. - Definition loc_19 : location_info := LocationInfo file_0 16 4 16 14. - Definition loc_20 : location_info := LocationInfo file_0 16 4 16 14. - Definition loc_23 : location_info := LocationInfo file_0 27 4 27 29. - Definition loc_24 : location_info := LocationInfo file_0 29 4 29 11. - Definition loc_25 : location_info := LocationInfo file_0 30 4 30 13. - Definition loc_26 : location_info := LocationInfo file_0 30 11 30 12. - Definition loc_27 : location_info := LocationInfo file_0 29 4 29 8. - Definition loc_28 : location_info := LocationInfo file_0 29 4 29 8. - Definition loc_29 : location_info := LocationInfo file_0 27 4 27 14. - Definition loc_30 : location_info := LocationInfo file_0 27 4 27 14. - Definition loc_31 : location_info := LocationInfo file_0 27 15 27 27. - Definition loc_32 : location_info := LocationInfo file_0 27 16 27 27. - - (* Definition of struct [atomic_flag]. *) - Program Definition struct_atomic_flag := {| - sl_members := [ - (Some "_Value", it_layout bool_it) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [spinlock]. *) - Program Definition struct_spinlock := {| - sl_members := [ - (Some "lock", it_layout bool_it) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [alloc_entry]. *) - Program Definition struct_alloc_entry := {| - sl_members := [ - (Some "size", it_layout size_t); - (Some "next", LPtr) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [alloc_state]. *) - Program Definition struct_alloc_state := {| - sl_members := [ - (Some "lock", layout_of struct_spinlock); - (None, mk_layout 7%nat 0%nat); - (Some "data", LPtr) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [latch]. *) - Program Definition struct_latch := {| - sl_members := [ - (Some "released", it_layout bool_it) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of function [main]. *) - Definition impl_main (initialized allocator_data test free init_alloc latch_release : loc): function := {| - f_args := [ - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_2 ; - "_" <- LocInfoE loc_20 (init_alloc) with [ ] ; - locinfo: loc_3 ; - "_" <- LocInfoE loc_15 (free) with - [ LocInfoE loc_16 (UnOp (CastOp $ IntOp size_t) (IntOp i32) (LocInfoE loc_16 (i2v 10000 i32))) ; - LocInfoE loc_17 (&(LocInfoE loc_18 (allocator_data))) ] ; - locinfo: loc_4 ; - "_" <- LocInfoE loc_11 (latch_release) with - [ LocInfoE loc_12 (&(LocInfoE loc_13 (initialized))) ] ; - locinfo: loc_5 ; - "_" <- LocInfoE loc_9 (test) with [ ] ; - locinfo: loc_6 ; - Return (LocInfoE loc_7 (i2v 0 i32)) - ]> $∅ - )%E - |}. - - (* Definition of function [main2]. *) - Definition impl_main2 (initialized test latch_wait : loc): function := {| - f_args := [ - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_23 ; - "_" <- LocInfoE loc_30 (latch_wait) with - [ LocInfoE loc_31 (&(LocInfoE loc_32 (initialized))) ] ; - locinfo: loc_24 ; - "_" <- LocInfoE loc_28 (test) with [ ] ; - locinfo: loc_25 ; - Return (LocInfoE loc_26 (i2v 0 i32)) - ]> $∅ - )%E - |}. -End code. diff --git a/theories/examples/tutorial/t5_main_proof_main.v b/theories/examples/tutorial/t5_main_proof_main.v deleted file mode 100644 index 181c2656a5c06a70dadf6906832d2814585193b6..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t5_main_proof_main.v +++ /dev/null @@ -1,35 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t5_main_code. -From refinedc.examples.tutorial Require Import t5_main_spec. -From refinedc.examples.spinlock Require Import spinlock_def. -From refinedc.examples.latch Require Import latch_def. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t5_main.c]. *) -Section proof_main. - Context `{!typeG Σ} `{!globalG Σ}. - Context `{!lockG Σ}. - - (* Typing proof for [main]. *) - Lemma type_main (initialized allocator_data test free init_alloc latch_release : loc) : - global_locs !! "initialized" = Some initialized → - global_locs !! "allocator_data" = Some allocator_data → - global_initialized_types !! "initialized" = Some (GT () (λ '(), (latch (alloc_initialized)) : type)) → - test â—áµ¥ test @ function_ptr type_of_test -∗ - free â—áµ¥ free @ function_ptr type_of_free -∗ - init_alloc â—áµ¥ init_alloc @ function_ptr type_of_init_alloc -∗ - latch_release â—áµ¥ latch_release @ function_ptr type_of_latch_release -∗ - typed_function (impl_main initialized allocator_data test free init_alloc latch_release) type_of_main. - Proof. - start_function "main" ([]). - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "main" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "main". - Qed. -End proof_main. diff --git a/theories/examples/tutorial/t5_main_proof_main2.v b/theories/examples/tutorial/t5_main_proof_main2.v deleted file mode 100644 index 836fbbb2bdcb92c4a1e3b2e103532f21797bd8e3..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t5_main_proof_main2.v +++ /dev/null @@ -1,32 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t5_main_code. -From refinedc.examples.tutorial Require Import t5_main_spec. -From refinedc.examples.spinlock Require Import spinlock_def. -From refinedc.examples.latch Require Import latch_def. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t5_main.c]. *) -Section proof_main2. - Context `{!typeG Σ} `{!globalG Σ}. - Context `{!lockG Σ}. - - (* Typing proof for [main2]. *) - Lemma type_main2 (initialized test latch_wait : loc) : - global_locs !! "initialized" = Some initialized → - global_initialized_types !! "initialized" = Some (GT () (λ '(), (latch (alloc_initialized)) : type)) → - test â—áµ¥ test @ function_ptr type_of_test -∗ - latch_wait â—áµ¥ latch_wait @ function_ptr type_of_latch_wait -∗ - typed_function (impl_main2 initialized test latch_wait) type_of_main2. - Proof. - start_function "main2" ([]). - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "main2" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "main2". - Qed. -End proof_main2. diff --git a/theories/examples/tutorial/t5_main_spec.v b/theories/examples/tutorial/t5_main_spec.v deleted file mode 100644 index 061c871f3e952c5ef99f046bd96e4b8057b30f3d..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t5_main_spec.v +++ /dev/null @@ -1,200 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t5_main_code. -From refinedc.examples.spinlock Require Import spinlock_def. -From refinedc.examples.latch Require Import latch_def. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t5_main.c]. *) -Section spec. - Context `{!typeG Σ} `{!globalG Σ}. - Context `{!lockG Σ}. - - (* Inlined code. *) - - Definition alloc_initialized := initialized "allocator_state" (). - - (* Definition of type [alloc_entry_t]. *) - Definition alloc_entry_t_rec : ((list nat) -d> typeO) → ((list nat) -d> typeO) := (λ self sizes, - ((maybe2 cons sizes) @ (optionalO (λ patt__ : (nat * _), - let size := patt__.1 in - let l := patt__.2 in - &own ( - constrained (padded (struct struct_alloc_entry [@{type} - (size @ (int (size_t))) ; - (guarded ("alloc_entry_t_0") (apply_dfun self (l))) - ]) struct_alloc_entry (mk_layout size 3)) ( - ⌜(8 | size)⌠- ) - ) - ) null)) - )%I. - Typeclasses Opaque alloc_entry_t_rec. - - Global Instance alloc_entry_t_rec_ne : Contractive alloc_entry_t_rec. - Proof. solve_type_proper. Qed. - - Definition alloc_entry_t : rtype := {| - rty_type := (list nat); - rty r__ := fixp alloc_entry_t_rec r__ - |}. - - Lemma alloc_entry_t_unfold (sizes : list nat) : - (sizes @ alloc_entry_t)%I ≡@{type} ( - ((maybe2 cons sizes) @ (optionalO (λ patt__ : (nat * _), - let size := patt__.1 in - let l := patt__.2 in - &own ( - constrained (padded (struct struct_alloc_entry [@{type} - (size @ (int (size_t))) ; - (guarded "alloc_entry_t_0" (l @ alloc_entry_t)) - ]) struct_alloc_entry (mk_layout size 3)) ( - ⌜(8 | size)⌠- ) - ) - ) null)) - )%I. - Proof. by rewrite {1}/with_refinement/=fixp_unfold. Qed. - - - Global Program Instance alloc_entry_t_rmovable : RMovable alloc_entry_t := - {| rmovable 'sizes := movable_eq _ _ (alloc_entry_t_unfold sizes) |}. - Next Obligation. solve_ty_layout_eq. Qed. - - Global Instance alloc_entry_t_simplify_hyp_place_inst l_ β_ (sizes : list nat) : - SimplifyHypPlace l_ β_ (sizes @ alloc_entry_t)%I (Some 100%N) := - λ T, i2p (simplify_hyp_place_eq l_ β_ _ _ T (alloc_entry_t_unfold _)). - Global Instance alloc_entry_t_simplify_goal_place_inst l_ β_ (sizes : list nat) : - SimplifyGoalPlace l_ β_ (sizes @ alloc_entry_t)%I (Some 100%N) := - λ T, i2p (simplify_goal_place_eq l_ β_ _ _ T (alloc_entry_t_unfold _)). - - Global Program Instance alloc_entry_t_simplify_hyp_val_inst v_ (sizes : list nat) : - SimplifyHypVal v_ (sizes @ alloc_entry_t)%I (Some 100%N) := - λ T, i2p (simplify_hyp_val_eq v_ _ _ (alloc_entry_t_unfold _) T _). - Next Obligation. done. Qed. - Global Program Instance alloc_entry_t_simplify_goal_val_inst v_ (sizes : list nat) : - SimplifyGoalVal v_ (sizes @ alloc_entry_t)%I (Some 100%N) := - λ T, i2p (simplify_goal_val_eq v_ _ _ (alloc_entry_t_unfold _) T _). - Next Obligation. done. Qed. - - (* Definition of type [alloc_state]. *) - Definition alloc_state_rec : (unit -d> typeO) → (unit -d> typeO) := (λ self n, - tyexists (λ lid : lock_id, - struct struct_alloc_state [@{type} - (spinlock (lid)) ; - (spinlocked (lid) ("data") (alloc_entry_t)) - ]) - )%I. - Typeclasses Opaque alloc_state_rec. - - Global Instance alloc_state_rec_ne : Contractive alloc_state_rec. - Proof. solve_type_proper. Qed. - - Definition alloc_state : rtype := {| - rty_type := unit; - rty r__ := fixp alloc_state_rec r__ - |}. - - Lemma alloc_state_unfold (n : unit) : - (n @ alloc_state)%I ≡@{type} ( - tyexists (λ lid : lock_id, - struct struct_alloc_state [@{type} - (spinlock (lid)) ; - (spinlocked (lid) ("data") (alloc_entry_t)) - ]) - )%I. - Proof. by rewrite {1}/with_refinement/=fixp_unfold. Qed. - - - Global Program Instance alloc_state_rmovable : RMovable alloc_state := - {| rmovable 'n := movable_eq _ _ (alloc_state_unfold n) |}. - Next Obligation. solve_ty_layout_eq. Qed. - - Global Instance alloc_state_simplify_hyp_place_inst l_ β_ (n : unit) : - SimplifyHypPlace l_ β_ (n @ alloc_state)%I (Some 100%N) := - λ T, i2p (simplify_hyp_place_eq l_ β_ _ _ T (alloc_state_unfold _)). - Global Instance alloc_state_simplify_goal_place_inst l_ β_ (n : unit) : - SimplifyGoalPlace l_ β_ (n @ alloc_state)%I (Some 100%N) := - λ T, i2p (simplify_goal_place_eq l_ β_ _ _ T (alloc_state_unfold _)). - - Global Program Instance alloc_state_simplify_hyp_val_inst v_ (n : unit) : - SimplifyHypVal v_ (n @ alloc_state)%I (Some 100%N) := - λ T, i2p (simplify_hyp_val_eq v_ _ _ (alloc_state_unfold _) T _). - Next Obligation. done. Qed. - Global Program Instance alloc_state_simplify_goal_val_inst v_ (n : unit) : - SimplifyGoalVal v_ (n @ alloc_state)%I (Some 100%N) := - λ T, i2p (simplify_goal_val_eq v_ _ _ (alloc_state_unfold _) T _). - Next Obligation. done. Qed. - - (* Type definitions. *) - - (* Specifications for function [test]. *) - Definition type_of_test := - fn(∀ () : (); (alloc_initialized)) → ∃ () : (), (void); True. - - (* Function [atomic_thread_fence] has been skipped. *) - - (* Function [atomic_signal_fence] has been skipped. *) - - (* Specifications for function [sl_init]. *) - Definition type_of_sl_init := - fn(∀ p : loc; (p @ (&own (uninit (struct_spinlock)))); True) - → ∃ gamma : lock_id, (void); (p â—â‚— (spinlock (gamma))). - - (* Specifications for function [sl_lock]. *) - Definition type_of_sl_lock := - fn(∀ (p, gamma, beta) : loc * lock_id * own_state; (p @ (&frac{beta} (spinlock (gamma)))); True) - → ∃ () : (), (void); (p â—â‚—{beta} (spinlock (gamma))) ∗ (spinlock_token gamma []). - - (* Specifications for function [sl_unlock]. *) - Definition type_of_sl_unlock := - fn(∀ (p, gamma, beta) : loc * lock_id * own_state; (p @ (&frac{beta} (spinlock (gamma)))); (spinlock_token gamma [])) - → ∃ () : (), (void); (p â—â‚—{beta} (spinlock (gamma))). - - (* Specifications for function [alloc]. *) - Definition type_of_alloc := - fn(∀ size : nat; (size @ (int (size_t))); ⌜size + 16 < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (&own (uninit (mk_layout size 3))); True. - - (* Specifications for function [free]. *) - Definition type_of_free := - fn(∀ size : nat; (size @ (int (size_t))), (&own (uninit (mk_layout size 3))); (alloc_initialized) ∗ ⌜(8 | size)âŒ) - → ∃ () : (), (void); True. - - (* Specifications for function [alloc_array]. *) - Definition type_of_alloc_array := - fn(∀ (size, n) : nat * nat; (size @ (int (size_t))), (n @ (int (size_t))); ⌜size * n + 16 < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (&own (array (mk_layout size 3) (replicate n (uninit (mk_layout size 3))))); True. - - (* Specifications for function [free_array]. *) - Definition type_of_free_array := - fn(∀ (size, n) : nat * nat; (size @ (int (size_t))), (n @ (int (size_t))), (&own (array (mk_layout size 3) (replicate n (uninit (mk_layout size 3))))); ⌜size * n < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (void); True. - - (* Specifications for function [init_alloc]. *) - Definition type_of_init_alloc := - fn(∀ () : (); (global_with_type "allocator_state" Own (uninit struct_alloc_state))) - → ∃ () : (), (void); (alloc_initialized). - - (* Specifications for function [latch_wait]. *) - Definition type_of_latch_wait := - fn(∀ (p, beta, P) : loc * own_state * (iProp Σ); (p @ (&frac{beta} (latch (P)))); True) - → ∃ () : (), (void); (p â—â‚—{beta} (latch (P))) ∗ (P). - - (* Specifications for function [latch_release]. *) - Definition type_of_latch_release := - fn(∀ (p, beta, P) : loc * own_state * (iProp Σ); (p @ (&frac{beta} (latch (P)))); (â–¡ P)) - → ∃ () : (), (void); (p â—â‚—{beta} (latch (P))). - - (* Specifications for function [main]. *) - Definition type_of_main := - fn(∀ () : (); (initialized "initialized" ()) ∗ (global_with_type "allocator_state" Own (uninit struct_alloc_state)) ∗ (global_with_type "allocator_data" Own (uninit (mk_layout (Z.to_nat 10000) 3)))) - → ∃ () : (), (int (i32)); True. - - (* Specifications for function [main2]. *) - Definition type_of_main2 := - fn(∀ () : (); (initialized "initialized" ())) - → ∃ () : (), (int (i32)); True. -End spec. - -Typeclasses Opaque alloc_entry_t_rec. -Typeclasses Opaque alloc_state_rec. diff --git a/theories/examples/tutorial/t6_struct.c.generate b/theories/examples/tutorial/t6_struct.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/tutorial/t6_struct_code.v b/theories/examples/tutorial/t6_struct_code.v deleted file mode 100644 index 9b5aa6bb7a2ea14d9551f96983d06868ec80572e..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t6_struct_code.v +++ /dev/null @@ -1,137 +0,0 @@ -From refinedc.lang Require Export notation. -From refinedc.lang Require Import tactics. -From refinedc.typing Require Import annotations. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t6_struct.c]. *) -Section code. - Definition file_0 : string := "theories/examples/tutorial/t6_struct.c". - Definition loc_2 : location_info := LocationInfo file_0 18 2 18 50. - Definition loc_3 : location_info := LocationInfo file_0 18 9 18 49. - Definition loc_4 : location_info := LocationInfo file_0 18 9 18 49. - Definition loc_6 : location_info := LocationInfo file_0 18 46 18 47. - Definition loc_7 : location_info := LocationInfo file_0 18 46 18 47. - Definition loc_8 : location_info := LocationInfo file_0 18 38 18 39. - Definition loc_9 : location_info := LocationInfo file_0 18 38 18 39. - Definition loc_10 : location_info := LocationInfo file_0 18 30 18 31. - Definition loc_11 : location_info := LocationInfo file_0 18 30 18 31. - Definition loc_14 : location_info := LocationInfo file_0 25 2 25 30. - Definition loc_15 : location_info := LocationInfo file_0 26 2 26 11. - Definition loc_16 : location_info := LocationInfo file_0 26 9 26 10. - Definition loc_17 : location_info := LocationInfo file_0 26 9 26 10. - Definition loc_21 : location_info := LocationInfo file_0 25 26 25 27. - Definition loc_22 : location_info := LocationInfo file_0 25 26 25 27. - Definition loc_27 : location_info := LocationInfo file_0 33 2 33 35. - Definition loc_28 : location_info := LocationInfo file_0 33 9 33 34. - Definition loc_29 : location_info := LocationInfo file_0 33 9 33 34. - Definition loc_32 : location_info := LocationInfo file_0 33 31 33 32. - Definition loc_33 : location_info := LocationInfo file_0 33 31 33 32. - Definition loc_37 : location_info := LocationInfo file_0 41 2 41 31. - Definition loc_38 : location_info := LocationInfo file_0 42 2 42 11. - Definition loc_39 : location_info := LocationInfo file_0 42 9 42 10. - Definition loc_40 : location_info := LocationInfo file_0 42 9 42 10. - Definition loc_41 : location_info := LocationInfo file_0 41 2 41 3. - Definition loc_42 : location_info := LocationInfo file_0 41 6 41 30. - Definition loc_43 : location_info := LocationInfo file_0 41 6 41 30. - Definition loc_45 : location_info := LocationInfo file_0 41 27 41 28. - Definition loc_46 : location_info := LocationInfo file_0 41 27 41 28. - - (* Definition of struct [color]. *) - Program Definition struct_color := {| - sl_members := [ - (Some "r", it_layout u8); - (Some "g", it_layout u8); - (Some "b", it_layout u8) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of function [rgb]. *) - Definition impl_rgb : function := {| - f_args := [ - ("r", it_layout u8); - ("g", it_layout u8); - ("b", it_layout u8) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_2 ; - Return (StructInit struct_color [ - ("r", LocInfoE loc_10 (use{it_layout u8} (LocInfoE loc_11 ("r"))) : expr) ; - ("g", LocInfoE loc_8 (use{it_layout u8} (LocInfoE loc_9 ("g"))) : expr) ; - ("b", LocInfoE loc_6 (use{it_layout u8} (LocInfoE loc_7 ("b"))) : expr) - ]) - ]> $∅ - )%E - |}. - - (* Definition of function [red]. *) - Definition impl_red : function := {| - f_args := [ - ("r", it_layout u8) - ]; - f_local_vars := [ - ("c", layout_of struct_color) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "c" <-{ layout_of struct_color } - StructInit struct_color [ - ("r", LocInfoE loc_21 (use{it_layout u8} (LocInfoE loc_22 ("r"))) : expr) ; - ("g", UnOp (CastOp $ IntOp u8) (IntOp i32) (i2v 0 i32) : expr) ; - ("b", UnOp (CastOp $ IntOp u8) (IntOp i32) (i2v 0 i32) : expr) - ] ; - locinfo: loc_15 ; - Return (LocInfoE loc_16 (use{layout_of struct_color} (LocInfoE loc_17 ("c")))) - ]> $∅ - )%E - |}. - - (* Definition of function [green]. *) - Definition impl_green : function := {| - f_args := [ - ("g", it_layout u8) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_27 ; - Return (StructInit struct_color [ - ("r", UnOp (CastOp $ IntOp u8) (IntOp i32) (i2v 0 i32) : expr) ; - ("g", LocInfoE loc_32 (use{it_layout u8} (LocInfoE loc_33 ("g"))) : expr) ; - ("b", UnOp (CastOp $ IntOp u8) (IntOp i32) (i2v 0 i32) : expr) - ]) - ]> $∅ - )%E - |}. - - (* Definition of function [blue]. *) - Definition impl_blue : function := {| - f_args := [ - ("b", it_layout u8) - ]; - f_local_vars := [ - ("c", layout_of struct_color) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_37 ; - LocInfoE loc_41 ("c") <-{ layout_of struct_color } - StructInit struct_color [ - ("r", UnOp (CastOp $ IntOp u8) (IntOp i32) (i2v 0 i32) : expr) ; - ("g", UnOp (CastOp $ IntOp u8) (IntOp i32) (i2v 0 i32) : expr) ; - ("b", LocInfoE loc_45 (use{it_layout u8} (LocInfoE loc_46 ("b"))) : expr) - ] ; - locinfo: loc_38 ; - Return (LocInfoE loc_39 (use{layout_of struct_color} (LocInfoE loc_40 ("c")))) - ]> $∅ - )%E - |}. -End code. diff --git a/theories/examples/tutorial/t6_struct_proof_blue.v b/theories/examples/tutorial/t6_struct_proof_blue.v deleted file mode 100644 index a4722b92ee9b244d5e11433b91beb425fd0f725c..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t6_struct_proof_blue.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t6_struct_code. -From refinedc.examples.tutorial Require Import t6_struct_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t6_struct.c]. *) -Section proof_blue. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [blue]. *) - Lemma type_blue : - ⊢ typed_function impl_blue type_of_blue. - Proof. - start_function "blue" (b) => arg_b local_c. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "blue" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "blue". - Qed. -End proof_blue. diff --git a/theories/examples/tutorial/t6_struct_proof_green.v b/theories/examples/tutorial/t6_struct_proof_green.v deleted file mode 100644 index 5d6772acab16aacacfc5925ce19ca3899af41ec6..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t6_struct_proof_green.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t6_struct_code. -From refinedc.examples.tutorial Require Import t6_struct_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t6_struct.c]. *) -Section proof_green. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [green]. *) - Lemma type_green : - ⊢ typed_function impl_green type_of_green. - Proof. - start_function "green" (g) => arg_g. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "green" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "green". - Qed. -End proof_green. diff --git a/theories/examples/tutorial/t6_struct_proof_red.v b/theories/examples/tutorial/t6_struct_proof_red.v deleted file mode 100644 index 2f8affe735180777f079dafb672ec5c551f8a147..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t6_struct_proof_red.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t6_struct_code. -From refinedc.examples.tutorial Require Import t6_struct_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t6_struct.c]. *) -Section proof_red. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [red]. *) - Lemma type_red : - ⊢ typed_function impl_red type_of_red. - Proof. - start_function "red" (r) => arg_r local_c. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "red" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "red". - Qed. -End proof_red. diff --git a/theories/examples/tutorial/t6_struct_proof_rgb.v b/theories/examples/tutorial/t6_struct_proof_rgb.v deleted file mode 100644 index f33a684bbce977c2ffb59c62c49cd0c2c8876a73..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t6_struct_proof_rgb.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t6_struct_code. -From refinedc.examples.tutorial Require Import t6_struct_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t6_struct.c]. *) -Section proof_rgb. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [rgb]. *) - Lemma type_rgb : - ⊢ typed_function impl_rgb type_of_rgb. - Proof. - start_function "rgb" ([[r g] b]) => arg_r arg_g arg_b. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "rgb" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "rgb". - Qed. -End proof_rgb. diff --git a/theories/examples/tutorial/t6_struct_spec.v b/theories/examples/tutorial/t6_struct_spec.v deleted file mode 100644 index 838b0642acf27587d0726c200db4f4d14c759f98..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t6_struct_spec.v +++ /dev/null @@ -1,84 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t6_struct_code. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t6_struct.c]. *) -Section spec. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Definition of type [color]. *) - Definition color_rec : (nat * nat * nat -d> typeO) → (nat * nat * nat -d> typeO) := (λ self patt__, - let r := patt__.1.1 in - let g := patt__.1.2 in - let b := patt__.2 in - struct struct_color [@{type} - (r @ (int (u8))) ; - (g @ (int (u8))) ; - (b @ (int (u8))) - ] - )%I. - Typeclasses Opaque color_rec. - - Global Instance color_rec_ne : Contractive color_rec. - Proof. solve_type_proper. Qed. - - Definition color : rtype := {| - rty_type := nat * nat * nat; - rty r__ := fixp color_rec r__ - |}. - - Lemma color_unfold (r : nat) (g : nat) (b : nat) : - ((r, g, b) @ color)%I ≡@{type} ( - struct struct_color [@{type} - (r @ (int (u8))) ; - (g @ (int (u8))) ; - (b @ (int (u8))) - ] - )%I. - Proof. by rewrite {1}/with_refinement/=fixp_unfold. Qed. - - - Global Program Instance color_rmovable : RMovable color := - {| rmovable '(r, g, b) := movable_eq _ _ (color_unfold r g b) |}. - Next Obligation. solve_ty_layout_eq. Qed. - - Global Instance color_simplify_hyp_place_inst l_ β_ (r : nat) (g : nat) (b : nat) : - SimplifyHypPlace l_ β_ ((r, g, b) @ color)%I (Some 100%N) := - λ T, i2p (simplify_hyp_place_eq l_ β_ _ _ T (color_unfold _ _ _)). - Global Instance color_simplify_goal_place_inst l_ β_ (r : nat) (g : nat) (b : nat) : - SimplifyGoalPlace l_ β_ ((r, g, b) @ color)%I (Some 100%N) := - λ T, i2p (simplify_goal_place_eq l_ β_ _ _ T (color_unfold _ _ _)). - - Global Program Instance color_simplify_hyp_val_inst v_ (r : nat) (g : nat) (b : nat) : - SimplifyHypVal v_ ((r, g, b) @ color)%I (Some 100%N) := - λ T, i2p (simplify_hyp_val_eq v_ _ _ (color_unfold _ _ _) T _). - Next Obligation. done. Qed. - Global Program Instance color_simplify_goal_val_inst v_ (r : nat) (g : nat) (b : nat) : - SimplifyGoalVal v_ ((r, g, b) @ color)%I (Some 100%N) := - λ T, i2p (simplify_goal_val_eq v_ _ _ (color_unfold _ _ _) T _). - Next Obligation. done. Qed. - - (* Type definitions. *) - - (* Specifications for function [rgb]. *) - Definition type_of_rgb := - fn(∀ (r, g, b) : nat * nat * nat; (r @ (int (u8))), (g @ (int (u8))), (b @ (int (u8))); True) - → ∃ () : (), (((r, g, b)) @ (color)); True. - - (* Specifications for function [red]. *) - Definition type_of_red := - fn(∀ r : nat; (r @ (int (u8))); True) - → ∃ () : (), (((r, 0, 0)%nat) @ (color)); True. - - (* Specifications for function [green]. *) - Definition type_of_green := - fn(∀ g : nat; (g @ (int (u8))); True) - → ∃ () : (), (((0, g, 0)%nat) @ (color)); True. - - (* Specifications for function [blue]. *) - Definition type_of_blue := - fn(∀ b : nat; (b @ (int (u8))); True) - → ∃ () : (), (((0, 0, b)%nat) @ (color)); True. -End spec. - -Typeclasses Opaque color_rec. diff --git a/theories/examples/tutorial/t7_arrays.c.generate b/theories/examples/tutorial/t7_arrays.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/tutorial/t7_arrays_code.v b/theories/examples/tutorial/t7_arrays_code.v deleted file mode 100644 index b1c0b8c177069ab1f908238f99980bca4bcf3be5..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t7_arrays_code.v +++ /dev/null @@ -1,193 +0,0 @@ -From refinedc.lang Require Export notation. -From refinedc.lang Require Import tactics. -From refinedc.typing Require Import annotations. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t7_arrays.c]. *) -Section code. - Definition file_0 : string := "theories/examples/tutorial/t7_arrays.c". - Definition loc_2 : location_info := LocationInfo file_0 14 2 14 16. - Definition loc_3 : location_info := LocationInfo file_0 15 2 15 16. - Definition loc_4 : location_info := LocationInfo file_0 16 2 16 12. - Definition loc_5 : location_info := LocationInfo file_0 16 2 16 7. - Definition loc_6 : location_info := LocationInfo file_0 16 2 16 7. - Definition loc_7 : location_info := LocationInfo file_0 16 2 16 4. - Definition loc_8 : location_info := LocationInfo file_0 16 2 16 4. - Definition loc_9 : location_info := LocationInfo file_0 16 5 16 6. - Definition loc_10 : location_info := LocationInfo file_0 16 5 16 6. - Definition loc_11 : location_info := LocationInfo file_0 16 10 16 11. - Definition loc_12 : location_info := LocationInfo file_0 16 10 16 11. - Definition loc_13 : location_info := LocationInfo file_0 15 2 15 7. - Definition loc_14 : location_info := LocationInfo file_0 15 2 15 7. - Definition loc_15 : location_info := LocationInfo file_0 15 2 15 4. - Definition loc_16 : location_info := LocationInfo file_0 15 2 15 4. - Definition loc_17 : location_info := LocationInfo file_0 15 5 15 6. - Definition loc_18 : location_info := LocationInfo file_0 15 5 15 6. - Definition loc_19 : location_info := LocationInfo file_0 15 10 15 15. - Definition loc_20 : location_info := LocationInfo file_0 15 10 15 15. - Definition loc_21 : location_info := LocationInfo file_0 15 10 15 15. - Definition loc_22 : location_info := LocationInfo file_0 15 10 15 12. - Definition loc_23 : location_info := LocationInfo file_0 15 10 15 12. - Definition loc_24 : location_info := LocationInfo file_0 15 13 15 14. - Definition loc_25 : location_info := LocationInfo file_0 15 13 15 14. - Definition loc_26 : location_info := LocationInfo file_0 14 10 14 15. - Definition loc_27 : location_info := LocationInfo file_0 14 10 14 15. - Definition loc_28 : location_info := LocationInfo file_0 14 10 14 15. - Definition loc_29 : location_info := LocationInfo file_0 14 10 14 12. - Definition loc_30 : location_info := LocationInfo file_0 14 10 14 12. - Definition loc_31 : location_info := LocationInfo file_0 14 13 14 14. - Definition loc_32 : location_info := LocationInfo file_0 14 13 14 14. - Definition loc_37 : location_info := LocationInfo file_0 32 2 32 23. - Definition loc_38 : location_info := LocationInfo file_0 34 2 34 14. - Definition loc_39 : location_info := LocationInfo file_0 43 2 45 3. - Definition loc_40 : location_info := LocationInfo file_0 43 2 45 3. - Definition loc_41 : location_info := LocationInfo file_0 43 2 45 3. - Definition loc_42 : location_info := LocationInfo file_0 47 2 47 13. - Definition loc_43 : location_info := LocationInfo file_0 47 9 47 12. - Definition loc_44 : location_info := LocationInfo file_0 47 9 47 12. - Definition loc_45 : location_info := LocationInfo file_0 43 28 45 3. - Definition loc_46 : location_info := LocationInfo file_0 44 4 44 32. - Definition loc_47 : location_info := LocationInfo file_0 43 2 45 3. - Definition loc_49 : location_info := LocationInfo file_0 43 24 43 25. - Definition loc_50 : location_info := LocationInfo file_0 44 24 44 32. - Definition loc_51 : location_info := LocationInfo file_0 44 24 44 27. - Definition loc_52 : location_info := LocationInfo file_0 44 30 44 31. - Definition loc_53 : location_info := LocationInfo file_0 44 30 44 31. - Definition loc_55 : location_info := LocationInfo file_0 44 7 44 22. - Definition loc_56 : location_info := LocationInfo file_0 44 7 44 12. - Definition loc_57 : location_info := LocationInfo file_0 44 7 44 12. - Definition loc_58 : location_info := LocationInfo file_0 44 7 44 12. - Definition loc_59 : location_info := LocationInfo file_0 44 7 44 9. - Definition loc_60 : location_info := LocationInfo file_0 44 7 44 9. - Definition loc_61 : location_info := LocationInfo file_0 44 10 44 11. - Definition loc_62 : location_info := LocationInfo file_0 44 10 44 11. - Definition loc_63 : location_info := LocationInfo file_0 44 15 44 22. - Definition loc_64 : location_info := LocationInfo file_0 44 15 44 22. - Definition loc_65 : location_info := LocationInfo file_0 44 15 44 22. - Definition loc_66 : location_info := LocationInfo file_0 44 15 44 17. - Definition loc_67 : location_info := LocationInfo file_0 44 15 44 17. - Definition loc_68 : location_info := LocationInfo file_0 44 18 44 21. - Definition loc_69 : location_info := LocationInfo file_0 44 18 44 21. - Definition loc_70 : location_info := LocationInfo file_0 43 17 43 22. - Definition loc_71 : location_info := LocationInfo file_0 43 17 43 18. - Definition loc_72 : location_info := LocationInfo file_0 43 17 43 18. - Definition loc_73 : location_info := LocationInfo file_0 43 21 43 22. - Definition loc_74 : location_info := LocationInfo file_0 43 21 43 22. - Definition loc_75 : location_info := LocationInfo file_0 43 14 43 15. - Definition loc_78 : location_info := LocationInfo file_0 34 12 34 13. - Definition loc_81 : location_info := LocationInfo file_0 32 13 32 23. - Definition loc_82 : location_info := LocationInfo file_0 32 20 32 22. - Definition loc_83 : location_info := LocationInfo file_0 32 21 32 22. - Definition loc_85 : location_info := LocationInfo file_0 32 5 32 11. - Definition loc_86 : location_info := LocationInfo file_0 32 5 32 6. - Definition loc_87 : location_info := LocationInfo file_0 32 5 32 6. - Definition loc_88 : location_info := LocationInfo file_0 32 10 32 11. - - (* Definition of function [permute]. *) - Definition impl_permute : function := {| - f_args := [ - ("ar", LPtr); - ("i", it_layout i32); - ("j", it_layout i32) - ]; - f_local_vars := [ - ("k", it_layout i32) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "k" <-{ it_layout i32 } - LocInfoE loc_26 (use{it_layout i32} (LocInfoE loc_28 ((LocInfoE loc_29 (!{LPtr} (LocInfoE loc_30 ("ar")))) at_offset{it_layout i32, PtrOp, IntOp i32} (LocInfoE loc_31 (use{it_layout i32} (LocInfoE loc_32 ("i"))))))) ; - locinfo: loc_3 ; - LocInfoE loc_14 ((LocInfoE loc_15 (!{LPtr} (LocInfoE loc_16 ("ar")))) at_offset{it_layout i32, PtrOp, IntOp i32} (LocInfoE loc_17 (use{it_layout i32} (LocInfoE loc_18 ("i"))))) <-{ it_layout i32 } - LocInfoE loc_19 (use{it_layout i32} (LocInfoE loc_21 ((LocInfoE loc_22 (!{LPtr} (LocInfoE loc_23 ("ar")))) at_offset{it_layout i32, PtrOp, IntOp i32} (LocInfoE loc_24 (use{it_layout i32} (LocInfoE loc_25 ("j"))))))) ; - locinfo: loc_4 ; - LocInfoE loc_6 ((LocInfoE loc_7 (!{LPtr} (LocInfoE loc_8 ("ar")))) at_offset{it_layout i32, PtrOp, IntOp i32} (LocInfoE loc_9 (use{it_layout i32} (LocInfoE loc_10 ("j"))))) <-{ it_layout i32 } - LocInfoE loc_11 (use{it_layout i32} (LocInfoE loc_12 ("k"))) ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [min_array]. *) - Definition impl_min_array : function := {| - f_args := [ - ("ar", LPtr); - ("n", it_layout i32) - ]; - f_local_vars := [ - ("i", it_layout i32); - ("res", it_layout i32) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_85 ; - if: LocInfoE loc_85 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_85 ((LocInfoE loc_86 (use{it_layout i32} (LocInfoE loc_87 ("n")))) ={IntOp i32, IntOp i32} (LocInfoE loc_88 (i2v 0 i32))))) - then - locinfo: loc_81 ; - Goto "#8" - else - Goto "#9" - ]> $ - <[ "#1" := - "res" <-{ it_layout i32 } LocInfoE loc_78 (i2v 0 i32) ; - "i" <-{ it_layout i32 } LocInfoE loc_75 (i2v 1 i32) ; - locinfo: loc_41 ; - Goto "#2" - ]> $ - <[ "#2" := - locinfo: loc_70 ; - if: LocInfoE loc_70 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_70 ((LocInfoE loc_71 (use{it_layout i32} (LocInfoE loc_72 ("i")))) <{IntOp i32, IntOp i32} (LocInfoE loc_73 (use{it_layout i32} (LocInfoE loc_74 ("n"))))))) - then - locinfo: loc_55 ; - Goto "#3" - else - locinfo: loc_42 ; - Goto "#4" - ]> $ - <[ "#3" := - locinfo: loc_55 ; - if: LocInfoE loc_55 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_55 ((LocInfoE loc_56 (use{it_layout i32} (LocInfoE loc_58 ((LocInfoE loc_59 (!{LPtr} (LocInfoE loc_60 ("ar")))) at_offset{it_layout i32, PtrOp, IntOp i32} (LocInfoE loc_61 (use{it_layout i32} (LocInfoE loc_62 ("i")))))))) <{IntOp i32, IntOp i32} (LocInfoE loc_63 (use{it_layout i32} (LocInfoE loc_65 ((LocInfoE loc_66 (!{LPtr} (LocInfoE loc_67 ("ar")))) at_offset{it_layout i32, PtrOp, IntOp i32} (LocInfoE loc_68 (use{it_layout i32} (LocInfoE loc_69 ("res"))))))))))) - then - locinfo: loc_50 ; - Goto "#6" - else - locinfo: loc_47 ; - Goto "#7" - ]> $ - <[ "#4" := - locinfo: loc_42 ; - Return (LocInfoE loc_43 (use{it_layout i32} (LocInfoE loc_44 ("res")))) - ]> $ - <[ "#5" := - locinfo: loc_47 ; - Goto "continue4" - ]> $ - <[ "#6" := - locinfo: loc_50 ; - LocInfoE loc_51 ("res") <-{ it_layout i32 } - LocInfoE loc_52 (use{it_layout i32} (LocInfoE loc_53 ("i"))) ; - locinfo: loc_47 ; - Goto "#5" - ]> $ - <[ "#7" := - locinfo: loc_47 ; - Goto "#5" - ]> $ - <[ "#8" := - locinfo: loc_81 ; - Return (LocInfoE loc_82 (UnOp NegOp (IntOp i32) (LocInfoE loc_83 (i2v 1 i32)))) - ]> $ - <[ "#9" := - Goto "#1" - ]> $ - <[ "continue4" := - LocInfoE loc_49 ("i") <-{ it_layout i32 } - (use{it_layout i32} (LocInfoE loc_49 ("i"))) +{IntOp i32, IntOp i32} (i2v 1 i32) ; - locinfo: loc_41 ; - Goto "#2" - ]> $∅ - )%E - |}. -End code. diff --git a/theories/examples/tutorial/t7_arrays_proof_min_array.v b/theories/examples/tutorial/t7_arrays_proof_min_array.v deleted file mode 100644 index 1f77f5243038b03d4bc35f077a700cac0c546fa8..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t7_arrays_proof_min_array.v +++ /dev/null @@ -1,45 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t7_arrays_code. -From refinedc.examples.tutorial Require Import t7_arrays_spec. -From refinedc.examples.tutorial Require Import t7_arrays_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t7_arrays.c]. *) -Section proof_min_array. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [min_array]. *) - Lemma type_min_array : - ⊢ typed_function impl_min_array type_of_min_array. - Proof. - start_function "min_array" ([[ar elts] n]) => arg_ar arg_n local_i local_res. - split_blocks (( - <[ "#2" := - ∃ res : nat, - ∃ i : nat, - arg_ar â—â‚— (ar @ (&own (array (i32) (elts `at_type` (int i32))))) ∗ - arg_n â—â‚— (n @ (int (i32))) ∗ - local_res â—â‚— (res @ (int (i32))) ∗ - local_i â—â‚— (i @ (int (i32))) ∗ - ⌜(i ≤ n)%nat⌠∗ - ⌜(res < min i n)%nat⌠∗ - ⌜(n ≤ length elts)%nat⌠∗ - ⌜index_of_min_list_Z (take i elts) res⌠- ]> $ - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "min_array" "#0". - - repeat liRStep; liShow. - all: print_typesystem_goal "min_array" "#2". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by apply: index_of_min_list_Z_take_1; solve_goal. - all: try by apply: index_of_min_list_Z_take_last; solve_goal. - all: try by apply: index_of_min_list_Z_take_not_last; solve_goal. - all: try (rewrite list_lookup_fmap H8; solve_goal). - all: try (assert (i = n) by lia; solve_goal). - all: print_sidecondition_goal "min_array". - Qed. -End proof_min_array. diff --git a/theories/examples/tutorial/t7_arrays_proof_permute.v b/theories/examples/tutorial/t7_arrays_proof_permute.v deleted file mode 100644 index ffb683121cd79a9a12c5b503d72545dad0c0986b..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t7_arrays_proof_permute.v +++ /dev/null @@ -1,26 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t7_arrays_code. -From refinedc.examples.tutorial Require Import t7_arrays_spec. -From refinedc.examples.tutorial Require Import t7_arrays_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t7_arrays.c]. *) -Section proof_permute. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [permute]. *) - Lemma type_permute : - ⊢ typed_function impl_permute type_of_permute. - Proof. - start_function "permute" ([[[[[ar elts] i] j] v1] v2]) => arg_ar arg_i arg_j local_k. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "permute" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "permute". - Qed. -End proof_permute. diff --git a/theories/examples/tutorial/t7_arrays_spec.v b/theories/examples/tutorial/t7_arrays_spec.v deleted file mode 100644 index cce99d5f7a7a8fdc2fc5113d36e7d05f214fe339..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t7_arrays_spec.v +++ /dev/null @@ -1,21 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t7_arrays_code. -From refinedc.examples.tutorial Require Import t7_arrays_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t7_arrays.c]. *) -Section spec. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Type definitions. *) - - (* Specifications for function [permute]. *) - Definition type_of_permute := - fn(∀ (ar, elts, i, j, v1, v2) : loc * (list Z) * nat * nat * Z * Z; (ar @ (&own (array (i32) (elts `at_type` (int i32))))), (i @ (int (i32))), (j @ (int (i32))); ⌜elts !! i = Some v1⌠∗ ⌜elts !! j = Some v2⌠∗ ⌜i ≠jâŒ) - → ∃ () : (), (void); (ar â—â‚— (array (i32) (<[j:=v1]>(<[i:=v2]>elts) `at_type` (int i32)))). - - (* Specifications for function [min_array]. *) - Definition type_of_min_array := - fn(∀ (ar, elts, n) : loc * (list Z) * nat; (ar @ (&own (array (i32) (elts `at_type` (int i32))))), (n @ (int (i32))); ⌜(n ≤ length elts)%natâŒ) - → ∃ () : (), ((n ≠0%nat) @ (optional (tyexists (λ i : nat, constrained (i @ (int (i32))) ⌜index_of_min_list_Z (take n elts) iâŒ)) ((-1) @ (int (i32))))); True. -End spec. diff --git a/theories/examples/tutorial/t8_tree.c.generate b/theories/examples/tutorial/t8_tree.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/tutorial/t8_tree_code.v b/theories/examples/tutorial/t8_tree_code.v deleted file mode 100644 index 3c9586008ff7b3ca269a70f39044091734d0809b..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_code.v +++ /dev/null @@ -1,1423 +0,0 @@ -From refinedc.lang Require Export notation. -From refinedc.lang Require Import tactics. -From refinedc.typing Require Import annotations. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section code. - Definition file_0 : string := "theories/examples/tutorial/t8_tree.c". - Definition loc_2 : location_info := LocationInfo file_0 25 2 25 24. - Definition loc_3 : location_info := LocationInfo file_0 25 9 25 23. - Definition loc_6 : location_info := LocationInfo file_0 33 2 33 49. - Definition loc_7 : location_info := LocationInfo file_0 34 2 34 30. - Definition loc_8 : location_info := LocationInfo file_0 35 2 35 18. - Definition loc_9 : location_info := LocationInfo file_0 36 2 36 31. - Definition loc_10 : location_info := LocationInfo file_0 37 2 37 14. - Definition loc_11 : location_info := LocationInfo file_0 37 9 37 13. - Definition loc_12 : location_info := LocationInfo file_0 37 9 37 13. - Definition loc_13 : location_info := LocationInfo file_0 36 2 36 13. - Definition loc_14 : location_info := LocationInfo file_0 36 2 36 6. - Definition loc_15 : location_info := LocationInfo file_0 36 2 36 6. - Definition loc_16 : location_info := LocationInfo file_0 36 16 36 30. - Definition loc_17 : location_info := LocationInfo file_0 35 2 35 11. - Definition loc_18 : location_info := LocationInfo file_0 35 2 35 6. - Definition loc_19 : location_info := LocationInfo file_0 35 2 35 6. - Definition loc_20 : location_info := LocationInfo file_0 35 14 35 17. - Definition loc_21 : location_info := LocationInfo file_0 35 14 35 17. - Definition loc_22 : location_info := LocationInfo file_0 34 2 34 12. - Definition loc_23 : location_info := LocationInfo file_0 34 2 34 6. - Definition loc_24 : location_info := LocationInfo file_0 34 2 34 6. - Definition loc_25 : location_info := LocationInfo file_0 34 15 34 29. - Definition loc_26 : location_info := LocationInfo file_0 33 22 33 48. - Definition loc_27 : location_info := LocationInfo file_0 33 22 33 27. - Definition loc_28 : location_info := LocationInfo file_0 33 22 33 27. - Definition loc_29 : location_info := LocationInfo file_0 33 28 33 47. - Definition loc_34 : location_info := LocationInfo file_0 45 2 45 49. - Definition loc_35 : location_info := LocationInfo file_0 46 2 46 20. - Definition loc_36 : location_info := LocationInfo file_0 47 2 47 18. - Definition loc_37 : location_info := LocationInfo file_0 48 2 48 22. - Definition loc_38 : location_info := LocationInfo file_0 49 2 49 14. - Definition loc_39 : location_info := LocationInfo file_0 49 9 49 13. - Definition loc_40 : location_info := LocationInfo file_0 49 9 49 13. - Definition loc_41 : location_info := LocationInfo file_0 48 2 48 13. - Definition loc_42 : location_info := LocationInfo file_0 48 2 48 6. - Definition loc_43 : location_info := LocationInfo file_0 48 2 48 6. - Definition loc_44 : location_info := LocationInfo file_0 48 16 48 21. - Definition loc_45 : location_info := LocationInfo file_0 48 16 48 21. - Definition loc_46 : location_info := LocationInfo file_0 47 2 47 11. - Definition loc_47 : location_info := LocationInfo file_0 47 2 47 6. - Definition loc_48 : location_info := LocationInfo file_0 47 2 47 6. - Definition loc_49 : location_info := LocationInfo file_0 47 14 47 17. - Definition loc_50 : location_info := LocationInfo file_0 47 14 47 17. - Definition loc_51 : location_info := LocationInfo file_0 46 2 46 12. - Definition loc_52 : location_info := LocationInfo file_0 46 2 46 6. - Definition loc_53 : location_info := LocationInfo file_0 46 2 46 6. - Definition loc_54 : location_info := LocationInfo file_0 46 15 46 19. - Definition loc_55 : location_info := LocationInfo file_0 46 15 46 19. - Definition loc_56 : location_info := LocationInfo file_0 45 22 45 48. - Definition loc_57 : location_info := LocationInfo file_0 45 22 45 27. - Definition loc_58 : location_info := LocationInfo file_0 45 22 45 27. - Definition loc_59 : location_info := LocationInfo file_0 45 28 45 47. - Definition loc_64 : location_info := LocationInfo file_0 57 2 61 3. - Definition loc_65 : location_info := LocationInfo file_0 57 26 61 3. - Definition loc_66 : location_info := LocationInfo file_0 58 4 58 29. - Definition loc_67 : location_info := LocationInfo file_0 59 4 59 30. - Definition loc_68 : location_info := LocationInfo file_0 60 4 60 34. - Definition loc_69 : location_info := LocationInfo file_0 60 4 60 8. - Definition loc_70 : location_info := LocationInfo file_0 60 4 60 8. - Definition loc_71 : location_info := LocationInfo file_0 60 9 60 28. - Definition loc_72 : location_info := LocationInfo file_0 60 30 60 32. - Definition loc_73 : location_info := LocationInfo file_0 60 30 60 32. - Definition loc_74 : location_info := LocationInfo file_0 60 31 60 32. - Definition loc_75 : location_info := LocationInfo file_0 60 31 60 32. - Definition loc_76 : location_info := LocationInfo file_0 59 4 59 13. - Definition loc_77 : location_info := LocationInfo file_0 59 4 59 13. - Definition loc_78 : location_info := LocationInfo file_0 59 14 59 28. - Definition loc_79 : location_info := LocationInfo file_0 59 15 59 28. - Definition loc_80 : location_info := LocationInfo file_0 59 16 59 20. - Definition loc_81 : location_info := LocationInfo file_0 59 16 59 20. - Definition loc_82 : location_info := LocationInfo file_0 59 18 59 19. - Definition loc_83 : location_info := LocationInfo file_0 59 18 59 19. - Definition loc_84 : location_info := LocationInfo file_0 58 4 58 13. - Definition loc_85 : location_info := LocationInfo file_0 58 4 58 13. - Definition loc_86 : location_info := LocationInfo file_0 58 14 58 27. - Definition loc_87 : location_info := LocationInfo file_0 58 15 58 27. - Definition loc_88 : location_info := LocationInfo file_0 58 16 58 20. - Definition loc_89 : location_info := LocationInfo file_0 58 16 58 20. - Definition loc_90 : location_info := LocationInfo file_0 58 18 58 19. - Definition loc_91 : location_info := LocationInfo file_0 58 18 58 19. - Definition loc_93 : location_info := LocationInfo file_0 57 5 57 25. - Definition loc_94 : location_info := LocationInfo file_0 57 5 57 7. - Definition loc_95 : location_info := LocationInfo file_0 57 5 57 7. - Definition loc_96 : location_info := LocationInfo file_0 57 6 57 7. - Definition loc_97 : location_info := LocationInfo file_0 57 6 57 7. - Definition loc_98 : location_info := LocationInfo file_0 57 11 57 25. - Definition loc_101 : location_info := LocationInfo file_0 70 2 70 36. - Definition loc_102 : location_info := LocationInfo file_0 71 2 71 30. - Definition loc_103 : location_info := LocationInfo file_0 72 2 72 56. - Definition loc_104 : location_info := LocationInfo file_0 73 2 73 39. - Definition loc_105 : location_info := LocationInfo file_0 73 9 73 38. - Definition loc_106 : location_info := LocationInfo file_0 73 9 73 19. - Definition loc_107 : location_info := LocationInfo file_0 73 9 73 19. - Definition loc_108 : location_info := LocationInfo file_0 73 20 73 34. - Definition loc_109 : location_info := LocationInfo file_0 73 21 73 34. - Definition loc_110 : location_info := LocationInfo file_0 73 22 73 26. - Definition loc_111 : location_info := LocationInfo file_0 73 22 73 26. - Definition loc_112 : location_info := LocationInfo file_0 73 24 73 25. - Definition loc_113 : location_info := LocationInfo file_0 73 24 73 25. - Definition loc_114 : location_info := LocationInfo file_0 73 36 73 37. - Definition loc_115 : location_info := LocationInfo file_0 73 36 73 37. - Definition loc_116 : location_info := LocationInfo file_0 72 20 72 56. - Definition loc_117 : location_info := LocationInfo file_0 72 27 72 55. - Definition loc_118 : location_info := LocationInfo file_0 72 27 72 37. - Definition loc_119 : location_info := LocationInfo file_0 72 27 72 37. - Definition loc_120 : location_info := LocationInfo file_0 72 38 72 51. - Definition loc_121 : location_info := LocationInfo file_0 72 39 72 51. - Definition loc_122 : location_info := LocationInfo file_0 72 40 72 44. - Definition loc_123 : location_info := LocationInfo file_0 72 40 72 44. - Definition loc_124 : location_info := LocationInfo file_0 72 42 72 43. - Definition loc_125 : location_info := LocationInfo file_0 72 42 72 43. - Definition loc_126 : location_info := LocationInfo file_0 72 53 72 54. - Definition loc_127 : location_info := LocationInfo file_0 72 53 72 54. - Definition loc_129 : location_info := LocationInfo file_0 72 5 72 18. - Definition loc_130 : location_info := LocationInfo file_0 72 5 72 6. - Definition loc_131 : location_info := LocationInfo file_0 72 5 72 6. - Definition loc_132 : location_info := LocationInfo file_0 72 9 72 18. - Definition loc_133 : location_info := LocationInfo file_0 72 9 72 18. - Definition loc_134 : location_info := LocationInfo file_0 72 9 72 13. - Definition loc_135 : location_info := LocationInfo file_0 72 9 72 13. - Definition loc_136 : location_info := LocationInfo file_0 72 11 72 12. - Definition loc_137 : location_info := LocationInfo file_0 72 11 72 12. - Definition loc_138 : location_info := LocationInfo file_0 71 21 71 30. - Definition loc_139 : location_info := LocationInfo file_0 71 28 71 29. - Definition loc_141 : location_info := LocationInfo file_0 71 5 71 19. - Definition loc_142 : location_info := LocationInfo file_0 71 5 71 14. - Definition loc_143 : location_info := LocationInfo file_0 71 5 71 14. - Definition loc_144 : location_info := LocationInfo file_0 71 5 71 9. - Definition loc_145 : location_info := LocationInfo file_0 71 5 71 9. - Definition loc_146 : location_info := LocationInfo file_0 71 7 71 8. - Definition loc_147 : location_info := LocationInfo file_0 71 7 71 8. - Definition loc_148 : location_info := LocationInfo file_0 71 18 71 19. - Definition loc_149 : location_info := LocationInfo file_0 71 18 71 19. - Definition loc_150 : location_info := LocationInfo file_0 70 27 70 36. - Definition loc_151 : location_info := LocationInfo file_0 70 34 70 35. - Definition loc_153 : location_info := LocationInfo file_0 70 5 70 25. - Definition loc_154 : location_info := LocationInfo file_0 70 5 70 7. - Definition loc_155 : location_info := LocationInfo file_0 70 5 70 7. - Definition loc_156 : location_info := LocationInfo file_0 70 6 70 7. - Definition loc_157 : location_info := LocationInfo file_0 70 6 70 7. - Definition loc_158 : location_info := LocationInfo file_0 70 11 70 25. - Definition loc_161 : location_info := LocationInfo file_0 82 2 82 20. - Definition loc_162 : location_info := LocationInfo file_0 88 2 95 3. - Definition loc_163 : location_info := LocationInfo file_0 96 2 96 11. - Definition loc_164 : location_info := LocationInfo file_0 96 9 96 10. - Definition loc_165 : location_info := LocationInfo file_0 88 2 95 3. - Definition loc_166 : location_info := LocationInfo file_0 88 31 95 3. - Definition loc_167 : location_info := LocationInfo file_0 89 4 89 34. - Definition loc_168 : location_info := LocationInfo file_0 90 4 94 5. - Definition loc_169 : location_info := LocationInfo file_0 88 2 95 3. - Definition loc_170 : location_info := LocationInfo file_0 88 2 95 3. - Definition loc_171 : location_info := LocationInfo file_0 90 23 92 5. - Definition loc_172 : location_info := LocationInfo file_0 91 6 91 28. - Definition loc_173 : location_info := LocationInfo file_0 91 6 91 9. - Definition loc_174 : location_info := LocationInfo file_0 91 12 91 27. - Definition loc_175 : location_info := LocationInfo file_0 91 13 91 27. - Definition loc_176 : location_info := LocationInfo file_0 91 14 91 20. - Definition loc_177 : location_info := LocationInfo file_0 91 14 91 20. - Definition loc_178 : location_info := LocationInfo file_0 91 16 91 19. - Definition loc_179 : location_info := LocationInfo file_0 91 16 91 19. - Definition loc_180 : location_info := LocationInfo file_0 92 11 94 5. - Definition loc_181 : location_info := LocationInfo file_0 93 6 93 29. - Definition loc_182 : location_info := LocationInfo file_0 93 6 93 9. - Definition loc_183 : location_info := LocationInfo file_0 93 12 93 28. - Definition loc_184 : location_info := LocationInfo file_0 93 13 93 28. - Definition loc_185 : location_info := LocationInfo file_0 93 14 93 20. - Definition loc_186 : location_info := LocationInfo file_0 93 14 93 20. - Definition loc_187 : location_info := LocationInfo file_0 93 16 93 19. - Definition loc_188 : location_info := LocationInfo file_0 93 16 93 19. - Definition loc_189 : location_info := LocationInfo file_0 90 7 90 22. - Definition loc_190 : location_info := LocationInfo file_0 90 7 90 8. - Definition loc_191 : location_info := LocationInfo file_0 90 7 90 8. - Definition loc_192 : location_info := LocationInfo file_0 90 11 90 22. - Definition loc_193 : location_info := LocationInfo file_0 90 11 90 22. - Definition loc_194 : location_info := LocationInfo file_0 90 11 90 17. - Definition loc_195 : location_info := LocationInfo file_0 90 11 90 17. - Definition loc_196 : location_info := LocationInfo file_0 90 13 90 16. - Definition loc_197 : location_info := LocationInfo file_0 90 13 90 16. - Definition loc_198 : location_info := LocationInfo file_0 89 25 89 34. - Definition loc_199 : location_info := LocationInfo file_0 89 32 89 33. - Definition loc_201 : location_info := LocationInfo file_0 89 7 89 23. - Definition loc_202 : location_info := LocationInfo file_0 89 7 89 18. - Definition loc_203 : location_info := LocationInfo file_0 89 7 89 18. - Definition loc_204 : location_info := LocationInfo file_0 89 7 89 13. - Definition loc_205 : location_info := LocationInfo file_0 89 7 89 13. - Definition loc_206 : location_info := LocationInfo file_0 89 9 89 12. - Definition loc_207 : location_info := LocationInfo file_0 89 9 89 12. - Definition loc_208 : location_info := LocationInfo file_0 89 22 89 23. - Definition loc_209 : location_info := LocationInfo file_0 89 22 89 23. - Definition loc_210 : location_info := LocationInfo file_0 88 8 88 30. - Definition loc_211 : location_info := LocationInfo file_0 88 8 88 12. - Definition loc_212 : location_info := LocationInfo file_0 88 8 88 12. - Definition loc_213 : location_info := LocationInfo file_0 88 9 88 12. - Definition loc_214 : location_info := LocationInfo file_0 88 9 88 12. - Definition loc_215 : location_info := LocationInfo file_0 88 16 88 30. - Definition loc_216 : location_info := LocationInfo file_0 82 16 82 19. - Definition loc_217 : location_info := LocationInfo file_0 82 17 82 19. - Definition loc_218 : location_info := LocationInfo file_0 82 18 82 19. - Definition loc_219 : location_info := LocationInfo file_0 82 18 82 19. - Definition loc_224 : location_info := LocationInfo file_0 104 2 113 3. - Definition loc_225 : location_info := LocationInfo file_0 104 26 106 3. - Definition loc_226 : location_info := LocationInfo file_0 105 4 105 49. - Definition loc_227 : location_info := LocationInfo file_0 105 4 105 6. - Definition loc_228 : location_info := LocationInfo file_0 105 5 105 6. - Definition loc_229 : location_info := LocationInfo file_0 105 5 105 6. - Definition loc_230 : location_info := LocationInfo file_0 105 9 105 48. - Definition loc_231 : location_info := LocationInfo file_0 105 9 105 13. - Definition loc_232 : location_info := LocationInfo file_0 105 9 105 13. - Definition loc_233 : location_info := LocationInfo file_0 105 14 105 28. - Definition loc_234 : location_info := LocationInfo file_0 105 30 105 31. - Definition loc_235 : location_info := LocationInfo file_0 105 30 105 31. - Definition loc_236 : location_info := LocationInfo file_0 105 33 105 47. - Definition loc_237 : location_info := LocationInfo file_0 106 9 113 3. - Definition loc_238 : location_info := LocationInfo file_0 107 4 107 30. - Definition loc_239 : location_info := LocationInfo file_0 108 4 112 5. - Definition loc_240 : location_info := LocationInfo file_0 108 21 110 5. - Definition loc_241 : location_info := LocationInfo file_0 109 6 109 35. - Definition loc_242 : location_info := LocationInfo file_0 109 6 109 16. - Definition loc_243 : location_info := LocationInfo file_0 109 6 109 16. - Definition loc_244 : location_info := LocationInfo file_0 109 17 109 30. - Definition loc_245 : location_info := LocationInfo file_0 109 18 109 30. - Definition loc_246 : location_info := LocationInfo file_0 109 19 109 23. - Definition loc_247 : location_info := LocationInfo file_0 109 19 109 23. - Definition loc_248 : location_info := LocationInfo file_0 109 21 109 22. - Definition loc_249 : location_info := LocationInfo file_0 109 21 109 22. - Definition loc_250 : location_info := LocationInfo file_0 109 32 109 33. - Definition loc_251 : location_info := LocationInfo file_0 109 32 109 33. - Definition loc_252 : location_info := LocationInfo file_0 110 11 112 5. - Definition loc_253 : location_info := LocationInfo file_0 111 6 111 36. - Definition loc_254 : location_info := LocationInfo file_0 111 6 111 16. - Definition loc_255 : location_info := LocationInfo file_0 111 6 111 16. - Definition loc_256 : location_info := LocationInfo file_0 111 17 111 31. - Definition loc_257 : location_info := LocationInfo file_0 111 18 111 31. - Definition loc_258 : location_info := LocationInfo file_0 111 19 111 23. - Definition loc_259 : location_info := LocationInfo file_0 111 19 111 23. - Definition loc_260 : location_info := LocationInfo file_0 111 21 111 22. - Definition loc_261 : location_info := LocationInfo file_0 111 21 111 22. - Definition loc_262 : location_info := LocationInfo file_0 111 33 111 34. - Definition loc_263 : location_info := LocationInfo file_0 111 33 111 34. - Definition loc_264 : location_info := LocationInfo file_0 108 7 108 20. - Definition loc_265 : location_info := LocationInfo file_0 108 7 108 8. - Definition loc_266 : location_info := LocationInfo file_0 108 7 108 8. - Definition loc_267 : location_info := LocationInfo file_0 108 11 108 20. - Definition loc_268 : location_info := LocationInfo file_0 108 11 108 20. - Definition loc_269 : location_info := LocationInfo file_0 108 11 108 15. - Definition loc_270 : location_info := LocationInfo file_0 108 11 108 15. - Definition loc_271 : location_info := LocationInfo file_0 108 13 108 14. - Definition loc_272 : location_info := LocationInfo file_0 108 13 108 14. - Definition loc_273 : location_info := LocationInfo file_0 107 23 107 30. - Definition loc_276 : location_info := LocationInfo file_0 107 7 107 21. - Definition loc_277 : location_info := LocationInfo file_0 107 7 107 16. - Definition loc_278 : location_info := LocationInfo file_0 107 7 107 16. - Definition loc_279 : location_info := LocationInfo file_0 107 7 107 11. - Definition loc_280 : location_info := LocationInfo file_0 107 7 107 11. - Definition loc_281 : location_info := LocationInfo file_0 107 9 107 10. - Definition loc_282 : location_info := LocationInfo file_0 107 9 107 10. - Definition loc_283 : location_info := LocationInfo file_0 107 20 107 21. - Definition loc_284 : location_info := LocationInfo file_0 107 20 107 21. - Definition loc_285 : location_info := LocationInfo file_0 104 5 104 25. - Definition loc_286 : location_info := LocationInfo file_0 104 5 104 7. - Definition loc_287 : location_info := LocationInfo file_0 104 5 104 7. - Definition loc_288 : location_info := LocationInfo file_0 104 6 104 7. - Definition loc_289 : location_info := LocationInfo file_0 104 6 104 7. - Definition loc_290 : location_info := LocationInfo file_0 104 11 104 25. - Definition loc_293 : location_info := LocationInfo file_0 121 2 121 20. - Definition loc_294 : location_info := LocationInfo file_0 126 2 133 3. - Definition loc_295 : location_info := LocationInfo file_0 135 2 135 49. - Definition loc_296 : location_info := LocationInfo file_0 135 2 135 6. - Definition loc_297 : location_info := LocationInfo file_0 135 3 135 6. - Definition loc_298 : location_info := LocationInfo file_0 135 3 135 6. - Definition loc_299 : location_info := LocationInfo file_0 135 9 135 48. - Definition loc_300 : location_info := LocationInfo file_0 135 9 135 13. - Definition loc_301 : location_info := LocationInfo file_0 135 9 135 13. - Definition loc_302 : location_info := LocationInfo file_0 135 14 135 28. - Definition loc_303 : location_info := LocationInfo file_0 135 30 135 31. - Definition loc_304 : location_info := LocationInfo file_0 135 30 135 31. - Definition loc_305 : location_info := LocationInfo file_0 135 33 135 47. - Definition loc_306 : location_info := LocationInfo file_0 126 2 133 3. - Definition loc_307 : location_info := LocationInfo file_0 126 31 133 3. - Definition loc_308 : location_info := LocationInfo file_0 127 4 127 32. - Definition loc_309 : location_info := LocationInfo file_0 128 4 132 5. - Definition loc_310 : location_info := LocationInfo file_0 126 2 133 3. - Definition loc_311 : location_info := LocationInfo file_0 126 2 133 3. - Definition loc_312 : location_info := LocationInfo file_0 128 23 130 5. - Definition loc_313 : location_info := LocationInfo file_0 129 6 129 28. - Definition loc_314 : location_info := LocationInfo file_0 129 6 129 9. - Definition loc_315 : location_info := LocationInfo file_0 129 12 129 27. - Definition loc_316 : location_info := LocationInfo file_0 129 13 129 27. - Definition loc_317 : location_info := LocationInfo file_0 129 14 129 20. - Definition loc_318 : location_info := LocationInfo file_0 129 14 129 20. - Definition loc_319 : location_info := LocationInfo file_0 129 16 129 19. - Definition loc_320 : location_info := LocationInfo file_0 129 16 129 19. - Definition loc_321 : location_info := LocationInfo file_0 130 11 132 5. - Definition loc_322 : location_info := LocationInfo file_0 131 6 131 29. - Definition loc_323 : location_info := LocationInfo file_0 131 6 131 9. - Definition loc_324 : location_info := LocationInfo file_0 131 12 131 28. - Definition loc_325 : location_info := LocationInfo file_0 131 13 131 28. - Definition loc_326 : location_info := LocationInfo file_0 131 14 131 20. - Definition loc_327 : location_info := LocationInfo file_0 131 14 131 20. - Definition loc_328 : location_info := LocationInfo file_0 131 16 131 19. - Definition loc_329 : location_info := LocationInfo file_0 131 16 131 19. - Definition loc_330 : location_info := LocationInfo file_0 128 7 128 22. - Definition loc_331 : location_info := LocationInfo file_0 128 7 128 8. - Definition loc_332 : location_info := LocationInfo file_0 128 7 128 8. - Definition loc_333 : location_info := LocationInfo file_0 128 11 128 22. - Definition loc_334 : location_info := LocationInfo file_0 128 11 128 22. - Definition loc_335 : location_info := LocationInfo file_0 128 11 128 17. - Definition loc_336 : location_info := LocationInfo file_0 128 11 128 17. - Definition loc_337 : location_info := LocationInfo file_0 128 13 128 16. - Definition loc_338 : location_info := LocationInfo file_0 128 13 128 16. - Definition loc_339 : location_info := LocationInfo file_0 127 25 127 32. - Definition loc_342 : location_info := LocationInfo file_0 127 7 127 23. - Definition loc_343 : location_info := LocationInfo file_0 127 7 127 18. - Definition loc_344 : location_info := LocationInfo file_0 127 7 127 18. - Definition loc_345 : location_info := LocationInfo file_0 127 7 127 13. - Definition loc_346 : location_info := LocationInfo file_0 127 7 127 13. - Definition loc_347 : location_info := LocationInfo file_0 127 9 127 12. - Definition loc_348 : location_info := LocationInfo file_0 127 9 127 12. - Definition loc_349 : location_info := LocationInfo file_0 127 22 127 23. - Definition loc_350 : location_info := LocationInfo file_0 127 22 127 23. - Definition loc_351 : location_info := LocationInfo file_0 126 8 126 30. - Definition loc_352 : location_info := LocationInfo file_0 126 8 126 12. - Definition loc_353 : location_info := LocationInfo file_0 126 8 126 12. - Definition loc_354 : location_info := LocationInfo file_0 126 9 126 12. - Definition loc_355 : location_info := LocationInfo file_0 126 9 126 12. - Definition loc_356 : location_info := LocationInfo file_0 126 16 126 30. - Definition loc_357 : location_info := LocationInfo file_0 121 16 121 19. - Definition loc_358 : location_info := LocationInfo file_0 121 17 121 19. - Definition loc_359 : location_info := LocationInfo file_0 121 18 121 19. - Definition loc_360 : location_info := LocationInfo file_0 121 18 121 19. - Definition loc_365 : location_info := LocationInfo file_0 145 4 147 5. - Definition loc_366 : location_info := LocationInfo file_0 148 4 148 24. - Definition loc_367 : location_info := LocationInfo file_0 148 24 148 5. - Definition loc_368 : location_info := LocationInfo file_0 149 4 149 36. - Definition loc_369 : location_info := LocationInfo file_0 149 11 149 35. - Definition loc_370 : location_info := LocationInfo file_0 149 11 149 19. - Definition loc_371 : location_info := LocationInfo file_0 149 11 149 19. - Definition loc_372 : location_info := LocationInfo file_0 149 20 149 34. - Definition loc_373 : location_info := LocationInfo file_0 149 21 149 34. - Definition loc_374 : location_info := LocationInfo file_0 149 22 149 26. - Definition loc_375 : location_info := LocationInfo file_0 149 22 149 26. - Definition loc_376 : location_info := LocationInfo file_0 149 24 149 25. - Definition loc_377 : location_info := LocationInfo file_0 149 24 149 25. - Definition loc_378 : location_info := LocationInfo file_0 148 4 148 23. - Definition loc_379 : location_info := LocationInfo file_0 148 5 148 23. - Definition loc_380 : location_info := LocationInfo file_0 148 6 148 17. - Definition loc_381 : location_info := LocationInfo file_0 148 6 148 17. - Definition loc_382 : location_info := LocationInfo file_0 148 6 148 10. - Definition loc_383 : location_info := LocationInfo file_0 148 6 148 10. - Definition loc_384 : location_info := LocationInfo file_0 148 8 148 9. - Definition loc_385 : location_info := LocationInfo file_0 148 8 148 9. - Definition loc_386 : location_info := LocationInfo file_0 145 38 147 5. - Definition loc_387 : location_info := LocationInfo file_0 146 8 146 25. - Definition loc_388 : location_info := LocationInfo file_0 146 15 146 24. - Definition loc_389 : location_info := LocationInfo file_0 146 15 146 24. - Definition loc_390 : location_info := LocationInfo file_0 146 15 146 19. - Definition loc_391 : location_info := LocationInfo file_0 146 15 146 19. - Definition loc_392 : location_info := LocationInfo file_0 146 17 146 18. - Definition loc_393 : location_info := LocationInfo file_0 146 17 146 18. - Definition loc_395 : location_info := LocationInfo file_0 145 7 145 36. - Definition loc_396 : location_info := LocationInfo file_0 145 7 145 18. - Definition loc_397 : location_info := LocationInfo file_0 145 7 145 18. - Definition loc_398 : location_info := LocationInfo file_0 145 7 145 11. - Definition loc_399 : location_info := LocationInfo file_0 145 7 145 11. - Definition loc_400 : location_info := LocationInfo file_0 145 9 145 10. - Definition loc_401 : location_info := LocationInfo file_0 145 9 145 10. - Definition loc_402 : location_info := LocationInfo file_0 145 22 145 36. - Definition loc_405 : location_info := LocationInfo file_0 160 2 162 3. - Definition loc_406 : location_info := LocationInfo file_0 164 2 179 3. - Definition loc_407 : location_info := LocationInfo file_0 164 21 175 3. - Definition loc_408 : location_info := LocationInfo file_0 165 4 174 5. - Definition loc_409 : location_info := LocationInfo file_0 165 36 170 5. - Definition loc_410 : location_info := LocationInfo file_0 166 6 166 25. - Definition loc_411 : location_info := LocationInfo file_0 166 25 166 7. - Definition loc_412 : location_info := LocationInfo file_0 167 6 167 32. - Definition loc_413 : location_info := LocationInfo file_0 168 6 168 29. - Definition loc_414 : location_info := LocationInfo file_0 169 6 169 20. - Definition loc_415 : location_info := LocationInfo file_0 169 6 169 15. - Definition loc_416 : location_info := LocationInfo file_0 169 6 169 10. - Definition loc_417 : location_info := LocationInfo file_0 169 6 169 10. - Definition loc_418 : location_info := LocationInfo file_0 169 8 169 9. - Definition loc_419 : location_info := LocationInfo file_0 169 8 169 9. - Definition loc_420 : location_info := LocationInfo file_0 169 18 169 19. - Definition loc_421 : location_info := LocationInfo file_0 169 18 169 19. - Definition loc_422 : location_info := LocationInfo file_0 168 6 168 12. - Definition loc_423 : location_info := LocationInfo file_0 168 6 168 12. - Definition loc_424 : location_info := LocationInfo file_0 168 13 168 24. - Definition loc_425 : location_info := LocationInfo file_0 168 14 168 24. - Definition loc_426 : location_info := LocationInfo file_0 168 14 168 18. - Definition loc_427 : location_info := LocationInfo file_0 168 14 168 18. - Definition loc_428 : location_info := LocationInfo file_0 168 16 168 17. - Definition loc_429 : location_info := LocationInfo file_0 168 16 168 17. - Definition loc_430 : location_info := LocationInfo file_0 168 26 168 27. - Definition loc_431 : location_info := LocationInfo file_0 168 26 168 27. - Definition loc_432 : location_info := LocationInfo file_0 167 6 167 7. - Definition loc_433 : location_info := LocationInfo file_0 167 10 167 31. - Definition loc_434 : location_info := LocationInfo file_0 167 10 167 18. - Definition loc_435 : location_info := LocationInfo file_0 167 10 167 18. - Definition loc_436 : location_info := LocationInfo file_0 167 19 167 30. - Definition loc_437 : location_info := LocationInfo file_0 167 20 167 30. - Definition loc_438 : location_info := LocationInfo file_0 167 20 167 24. - Definition loc_439 : location_info := LocationInfo file_0 167 20 167 24. - Definition loc_440 : location_info := LocationInfo file_0 167 22 167 23. - Definition loc_441 : location_info := LocationInfo file_0 167 22 167 23. - Definition loc_442 : location_info := LocationInfo file_0 166 6 166 24. - Definition loc_443 : location_info := LocationInfo file_0 166 7 166 24. - Definition loc_444 : location_info := LocationInfo file_0 166 8 166 18. - Definition loc_445 : location_info := LocationInfo file_0 166 8 166 18. - Definition loc_446 : location_info := LocationInfo file_0 166 8 166 12. - Definition loc_447 : location_info := LocationInfo file_0 166 8 166 12. - Definition loc_448 : location_info := LocationInfo file_0 166 10 166 11. - Definition loc_449 : location_info := LocationInfo file_0 166 10 166 11. - Definition loc_450 : location_info := LocationInfo file_0 170 11 174 5. - Definition loc_451 : location_info := LocationInfo file_0 171 6 171 24. - Definition loc_452 : location_info := LocationInfo file_0 172 6 172 36. - Definition loc_453 : location_info := LocationInfo file_0 173 6 173 15. - Definition loc_454 : location_info := LocationInfo file_0 173 6 173 8. - Definition loc_455 : location_info := LocationInfo file_0 173 7 173 8. - Definition loc_456 : location_info := LocationInfo file_0 173 7 173 8. - Definition loc_457 : location_info := LocationInfo file_0 173 11 173 14. - Definition loc_458 : location_info := LocationInfo file_0 173 11 173 14. - Definition loc_459 : location_info := LocationInfo file_0 172 6 172 10. - Definition loc_460 : location_info := LocationInfo file_0 172 6 172 10. - Definition loc_461 : location_info := LocationInfo file_0 172 11 172 30. - Definition loc_462 : location_info := LocationInfo file_0 172 32 172 34. - Definition loc_463 : location_info := LocationInfo file_0 172 32 172 34. - Definition loc_464 : location_info := LocationInfo file_0 172 33 172 34. - Definition loc_465 : location_info := LocationInfo file_0 172 33 172 34. - Definition loc_466 : location_info := LocationInfo file_0 171 6 171 9. - Definition loc_467 : location_info := LocationInfo file_0 171 12 171 23. - Definition loc_468 : location_info := LocationInfo file_0 171 12 171 23. - Definition loc_469 : location_info := LocationInfo file_0 171 12 171 16. - Definition loc_470 : location_info := LocationInfo file_0 171 12 171 16. - Definition loc_471 : location_info := LocationInfo file_0 171 14 171 15. - Definition loc_472 : location_info := LocationInfo file_0 171 14 171 15. - Definition loc_473 : location_info := LocationInfo file_0 165 7 165 35. - Definition loc_474 : location_info := LocationInfo file_0 165 7 165 17. - Definition loc_475 : location_info := LocationInfo file_0 165 7 165 17. - Definition loc_476 : location_info := LocationInfo file_0 165 7 165 11. - Definition loc_477 : location_info := LocationInfo file_0 165 7 165 11. - Definition loc_478 : location_info := LocationInfo file_0 165 9 165 10. - Definition loc_479 : location_info := LocationInfo file_0 165 9 165 10. - Definition loc_480 : location_info := LocationInfo file_0 165 21 165 35. - Definition loc_481 : location_info := LocationInfo file_0 175 9 179 3. - Definition loc_482 : location_info := LocationInfo file_0 175 26 177 3. - Definition loc_483 : location_info := LocationInfo file_0 176 4 176 27. - Definition loc_484 : location_info := LocationInfo file_0 176 4 176 10. - Definition loc_485 : location_info := LocationInfo file_0 176 4 176 10. - Definition loc_486 : location_info := LocationInfo file_0 176 11 176 22. - Definition loc_487 : location_info := LocationInfo file_0 176 12 176 22. - Definition loc_488 : location_info := LocationInfo file_0 176 12 176 16. - Definition loc_489 : location_info := LocationInfo file_0 176 12 176 16. - Definition loc_490 : location_info := LocationInfo file_0 176 14 176 15. - Definition loc_491 : location_info := LocationInfo file_0 176 14 176 15. - Definition loc_492 : location_info := LocationInfo file_0 176 24 176 25. - Definition loc_493 : location_info := LocationInfo file_0 176 24 176 25. - Definition loc_494 : location_info := LocationInfo file_0 177 9 179 3. - Definition loc_495 : location_info := LocationInfo file_0 178 4 178 28. - Definition loc_496 : location_info := LocationInfo file_0 178 4 178 10. - Definition loc_497 : location_info := LocationInfo file_0 178 4 178 10. - Definition loc_498 : location_info := LocationInfo file_0 178 11 178 23. - Definition loc_499 : location_info := LocationInfo file_0 178 12 178 23. - Definition loc_500 : location_info := LocationInfo file_0 178 12 178 16. - Definition loc_501 : location_info := LocationInfo file_0 178 12 178 16. - Definition loc_502 : location_info := LocationInfo file_0 178 14 178 15. - Definition loc_503 : location_info := LocationInfo file_0 178 14 178 15. - Definition loc_504 : location_info := LocationInfo file_0 178 25 178 26. - Definition loc_505 : location_info := LocationInfo file_0 178 25 178 26. - Definition loc_506 : location_info := LocationInfo file_0 175 12 175 25. - Definition loc_507 : location_info := LocationInfo file_0 175 12 175 13. - Definition loc_508 : location_info := LocationInfo file_0 175 12 175 13. - Definition loc_509 : location_info := LocationInfo file_0 175 16 175 25. - Definition loc_510 : location_info := LocationInfo file_0 175 16 175 25. - Definition loc_511 : location_info := LocationInfo file_0 175 16 175 20. - Definition loc_512 : location_info := LocationInfo file_0 175 16 175 20. - Definition loc_513 : location_info := LocationInfo file_0 175 18 175 19. - Definition loc_514 : location_info := LocationInfo file_0 175 18 175 19. - Definition loc_515 : location_info := LocationInfo file_0 164 5 164 19. - Definition loc_516 : location_info := LocationInfo file_0 164 5 164 6. - Definition loc_517 : location_info := LocationInfo file_0 164 5 164 6. - Definition loc_518 : location_info := LocationInfo file_0 164 10 164 19. - Definition loc_519 : location_info := LocationInfo file_0 164 10 164 19. - Definition loc_520 : location_info := LocationInfo file_0 164 10 164 14. - Definition loc_521 : location_info := LocationInfo file_0 164 10 164 14. - Definition loc_522 : location_info := LocationInfo file_0 164 12 164 13. - Definition loc_523 : location_info := LocationInfo file_0 164 12 164 13. - Definition loc_524 : location_info := LocationInfo file_0 160 27 162 3. - Definition loc_525 : location_info := LocationInfo file_0 161 4 161 11. - Definition loc_528 : location_info := LocationInfo file_0 160 5 160 25. - Definition loc_529 : location_info := LocationInfo file_0 160 5 160 7. - Definition loc_530 : location_info := LocationInfo file_0 160 5 160 7. - Definition loc_531 : location_info := LocationInfo file_0 160 6 160 7. - Definition loc_532 : location_info := LocationInfo file_0 160 6 160 7. - Definition loc_533 : location_info := LocationInfo file_0 160 11 160 25. - Definition loc_536 : location_info := LocationInfo file_0 189 2 189 17. - Definition loc_537 : location_info := LocationInfo file_0 189 9 189 16. - Definition loc_538 : location_info := LocationInfo file_0 189 9 189 14. - Definition loc_539 : location_info := LocationInfo file_0 189 9 189 14. - Definition loc_542 : location_info := LocationInfo file_0 198 2 198 19. - Definition loc_543 : location_info := LocationInfo file_0 198 9 198 18. - Definition loc_544 : location_info := LocationInfo file_0 198 9 198 13. - Definition loc_545 : location_info := LocationInfo file_0 198 9 198 13. - Definition loc_546 : location_info := LocationInfo file_0 198 14 198 17. - Definition loc_547 : location_info := LocationInfo file_0 198 14 198 17. - Definition loc_550 : location_info := LocationInfo file_0 206 2 206 41. - Definition loc_551 : location_info := LocationInfo file_0 206 41 206 3. - Definition loc_552 : location_info := LocationInfo file_0 207 2 207 15. - Definition loc_553 : location_info := LocationInfo file_0 207 2 207 11. - Definition loc_554 : location_info := LocationInfo file_0 207 2 207 11. - Definition loc_555 : location_info := LocationInfo file_0 207 12 207 13. - Definition loc_556 : location_info := LocationInfo file_0 207 12 207 13. - Definition loc_557 : location_info := LocationInfo file_0 206 35 206 40. - Definition loc_558 : location_info := LocationInfo file_0 206 36 206 40. - Definition loc_559 : location_info := LocationInfo file_0 206 38 206 39. - Definition loc_560 : location_info := LocationInfo file_0 206 38 206 39. - Definition loc_563 : location_info := LocationInfo file_0 217 2 217 41. - Definition loc_564 : location_info := LocationInfo file_0 217 41 217 3. - Definition loc_565 : location_info := LocationInfo file_0 218 2 218 22. - Definition loc_566 : location_info := LocationInfo file_0 218 9 218 21. - Definition loc_567 : location_info := LocationInfo file_0 218 9 218 15. - Definition loc_568 : location_info := LocationInfo file_0 218 9 218 15. - Definition loc_569 : location_info := LocationInfo file_0 218 16 218 17. - Definition loc_570 : location_info := LocationInfo file_0 218 16 218 17. - Definition loc_571 : location_info := LocationInfo file_0 218 19 218 20. - Definition loc_572 : location_info := LocationInfo file_0 218 19 218 20. - Definition loc_573 : location_info := LocationInfo file_0 217 35 217 40. - Definition loc_574 : location_info := LocationInfo file_0 217 36 217 40. - Definition loc_575 : location_info := LocationInfo file_0 217 38 217 39. - Definition loc_576 : location_info := LocationInfo file_0 217 38 217 39. - Definition loc_579 : location_info := LocationInfo file_0 227 2 227 41. - Definition loc_580 : location_info := LocationInfo file_0 227 41 227 3. - Definition loc_581 : location_info := LocationInfo file_0 228 2 228 15. - Definition loc_582 : location_info := LocationInfo file_0 228 2 228 8. - Definition loc_583 : location_info := LocationInfo file_0 228 2 228 8. - Definition loc_584 : location_info := LocationInfo file_0 228 9 228 10. - Definition loc_585 : location_info := LocationInfo file_0 228 9 228 10. - Definition loc_586 : location_info := LocationInfo file_0 228 12 228 13. - Definition loc_587 : location_info := LocationInfo file_0 228 12 228 13. - Definition loc_588 : location_info := LocationInfo file_0 227 35 227 40. - Definition loc_589 : location_info := LocationInfo file_0 227 36 227 40. - Definition loc_590 : location_info := LocationInfo file_0 227 38 227 39. - Definition loc_591 : location_info := LocationInfo file_0 227 38 227 39. - Definition loc_594 : location_info := LocationInfo file_0 237 2 237 41. - Definition loc_595 : location_info := LocationInfo file_0 237 41 237 3. - Definition loc_596 : location_info := LocationInfo file_0 238 2 238 15. - Definition loc_597 : location_info := LocationInfo file_0 238 2 238 8. - Definition loc_598 : location_info := LocationInfo file_0 238 2 238 8. - Definition loc_599 : location_info := LocationInfo file_0 238 9 238 10. - Definition loc_600 : location_info := LocationInfo file_0 238 9 238 10. - Definition loc_601 : location_info := LocationInfo file_0 238 12 238 13. - Definition loc_602 : location_info := LocationInfo file_0 238 12 238 13. - Definition loc_603 : location_info := LocationInfo file_0 237 35 237 40. - Definition loc_604 : location_info := LocationInfo file_0 237 36 237 40. - Definition loc_605 : location_info := LocationInfo file_0 237 38 237 39. - Definition loc_606 : location_info := LocationInfo file_0 237 38 237 39. - Definition loc_609 : location_info := LocationInfo file_0 245 2 245 22. - Definition loc_610 : location_info := LocationInfo file_0 246 2 246 15. - Definition loc_611 : location_info := LocationInfo file_0 250 2 250 17. - Definition loc_612 : location_info := LocationInfo file_0 252 2 252 25. - Definition loc_613 : location_info := LocationInfo file_0 253 2 253 25. - Definition loc_614 : location_info := LocationInfo file_0 255 2 255 17. - Definition loc_615 : location_info := LocationInfo file_0 258 2 258 17. - Definition loc_616 : location_info := LocationInfo file_0 259 2 259 25. - Definition loc_617 : location_info := LocationInfo file_0 261 2 261 17. - Definition loc_618 : location_info := LocationInfo file_0 264 2 264 17. - Definition loc_619 : location_info := LocationInfo file_0 266 2 266 11. - Definition loc_620 : location_info := LocationInfo file_0 266 9 266 10. - Definition loc_621 : location_info := LocationInfo file_0 264 2 264 12. - Definition loc_622 : location_info := LocationInfo file_0 264 2 264 12. - Definition loc_623 : location_info := LocationInfo file_0 264 13 264 15. - Definition loc_624 : location_info := LocationInfo file_0 264 14 264 15. - Definition loc_625 : location_info := LocationInfo file_0 261 2 261 9. - Definition loc_626 : location_info := LocationInfo file_0 261 2 261 9. - Definition loc_627 : location_info := LocationInfo file_0 261 10 261 12. - Definition loc_628 : location_info := LocationInfo file_0 261 11 261 12. - Definition loc_629 : location_info := LocationInfo file_0 261 14 261 15. - Definition loc_630 : location_info := LocationInfo file_0 259 9 259 23. - Definition loc_631 : location_info := LocationInfo file_0 259 9 259 16. - Definition loc_632 : location_info := LocationInfo file_0 259 9 259 16. - Definition loc_633 : location_info := LocationInfo file_0 259 17 259 19. - Definition loc_634 : location_info := LocationInfo file_0 259 18 259 19. - Definition loc_635 : location_info := LocationInfo file_0 259 21 259 22. - Definition loc_636 : location_info := LocationInfo file_0 258 2 258 9. - Definition loc_637 : location_info := LocationInfo file_0 258 2 258 9. - Definition loc_638 : location_info := LocationInfo file_0 258 10 258 12. - Definition loc_639 : location_info := LocationInfo file_0 258 11 258 12. - Definition loc_640 : location_info := LocationInfo file_0 258 14 258 15. - Definition loc_641 : location_info := LocationInfo file_0 255 2 255 9. - Definition loc_642 : location_info := LocationInfo file_0 255 2 255 9. - Definition loc_643 : location_info := LocationInfo file_0 255 10 255 12. - Definition loc_644 : location_info := LocationInfo file_0 255 11 255 12. - Definition loc_645 : location_info := LocationInfo file_0 255 14 255 15. - Definition loc_646 : location_info := LocationInfo file_0 253 9 253 23. - Definition loc_647 : location_info := LocationInfo file_0 253 9 253 16. - Definition loc_648 : location_info := LocationInfo file_0 253 9 253 16. - Definition loc_649 : location_info := LocationInfo file_0 253 17 253 19. - Definition loc_650 : location_info := LocationInfo file_0 253 18 253 19. - Definition loc_651 : location_info := LocationInfo file_0 253 21 253 22. - Definition loc_652 : location_info := LocationInfo file_0 252 9 252 23. - Definition loc_653 : location_info := LocationInfo file_0 252 9 252 16. - Definition loc_654 : location_info := LocationInfo file_0 252 9 252 16. - Definition loc_655 : location_info := LocationInfo file_0 252 17 252 19. - Definition loc_656 : location_info := LocationInfo file_0 252 18 252 19. - Definition loc_657 : location_info := LocationInfo file_0 252 21 252 22. - Definition loc_658 : location_info := LocationInfo file_0 250 2 250 9. - Definition loc_659 : location_info := LocationInfo file_0 250 2 250 9. - Definition loc_660 : location_info := LocationInfo file_0 250 10 250 12. - Definition loc_661 : location_info := LocationInfo file_0 250 11 250 12. - Definition loc_662 : location_info := LocationInfo file_0 250 14 250 15. - Definition loc_663 : location_info := LocationInfo file_0 246 2 246 3. - Definition loc_664 : location_info := LocationInfo file_0 246 6 246 14. - Definition loc_665 : location_info := LocationInfo file_0 246 6 246 11. - Definition loc_666 : location_info := LocationInfo file_0 246 6 246 11. - Definition loc_667 : location_info := LocationInfo file_0 246 12 246 13. - Definition loc_668 : location_info := LocationInfo file_0 245 13 245 21. - Definition loc_669 : location_info := LocationInfo file_0 245 13 245 19. - Definition loc_670 : location_info := LocationInfo file_0 245 13 245 19. - - (* Definition of struct [tree]. *) - Program Definition struct_tree := {| - sl_members := [ - (Some "left", LPtr); - (Some "right", LPtr); - (Some "key", it_layout i32); - (None, mk_layout 4%nat 0%nat) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of struct [dummy]. *) - Program Definition struct_dummy := {| - sl_members := [ - (Some "a", it_layout i32) - ]; - |}. - Solve Obligations with solve_struct_obligations. - - (* Definition of function [empty]. *) - Definition impl_empty : function := {| - f_args := [ - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_2 ; - Return (LocInfoE loc_3 (NULL)) - ]> $∅ - )%E - |}. - - (* Definition of function [init]. *) - Definition impl_init (alloc : loc): function := {| - f_args := [ - ("key", it_layout i32) - ]; - f_local_vars := [ - ("node", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_26 ; - "$0" <- LocInfoE loc_28 (alloc) with - [ LocInfoE loc_29 (i2v (layout_of struct_tree).(ly_size) size_t) ] ; - "node" <-{ LPtr } - LocInfoE loc_26 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_26 ("$0"))) ; - locinfo: loc_7 ; - LocInfoE loc_22 ((LocInfoE loc_23 (!{LPtr} (LocInfoE loc_24 ("node")))) at{struct_tree} "left") <-{ LPtr } - LocInfoE loc_25 (NULL) ; - locinfo: loc_8 ; - LocInfoE loc_17 ((LocInfoE loc_18 (!{LPtr} (LocInfoE loc_19 ("node")))) at{struct_tree} "key") <-{ it_layout i32 } - LocInfoE loc_20 (use{it_layout i32} (LocInfoE loc_21 ("key"))) ; - locinfo: loc_9 ; - LocInfoE loc_13 ((LocInfoE loc_14 (!{LPtr} (LocInfoE loc_15 ("node")))) at{struct_tree} "right") <-{ LPtr } - LocInfoE loc_16 (NULL) ; - locinfo: loc_10 ; - Return (LocInfoE loc_11 (use{LPtr} (LocInfoE loc_12 ("node")))) - ]> $∅ - )%E - |}. - - (* Definition of function [node]. *) - Definition impl_node (alloc : loc): function := {| - f_args := [ - ("left", LPtr); - ("key", it_layout i32); - ("right", LPtr) - ]; - f_local_vars := [ - ("node", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_56 ; - "$0" <- LocInfoE loc_58 (alloc) with - [ LocInfoE loc_59 (i2v (layout_of struct_tree).(ly_size) size_t) ] ; - "node" <-{ LPtr } - LocInfoE loc_56 (UnOp (CastOp $ PtrOp) (PtrOp) (LocInfoE loc_56 ("$0"))) ; - locinfo: loc_35 ; - LocInfoE loc_51 ((LocInfoE loc_52 (!{LPtr} (LocInfoE loc_53 ("node")))) at{struct_tree} "left") <-{ LPtr } - LocInfoE loc_54 (use{LPtr} (LocInfoE loc_55 ("left"))) ; - locinfo: loc_36 ; - LocInfoE loc_46 ((LocInfoE loc_47 (!{LPtr} (LocInfoE loc_48 ("node")))) at{struct_tree} "key") <-{ it_layout i32 } - LocInfoE loc_49 (use{it_layout i32} (LocInfoE loc_50 ("key"))) ; - locinfo: loc_37 ; - LocInfoE loc_41 ((LocInfoE loc_42 (!{LPtr} (LocInfoE loc_43 ("node")))) at{struct_tree} "right") <-{ LPtr } - LocInfoE loc_44 (use{LPtr} (LocInfoE loc_45 ("right"))) ; - locinfo: loc_38 ; - Return (LocInfoE loc_39 (use{LPtr} (LocInfoE loc_40 ("node")))) - ]> $∅ - )%E - |}. - - (* Definition of function [free_tree]. *) - Definition impl_free_tree (free free_tree : loc): function := {| - f_args := [ - ("t", LPtr) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_93 ; - if: LocInfoE loc_93 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_93 ((LocInfoE loc_94 (use{LPtr} (LocInfoE loc_96 (!{LPtr} (LocInfoE loc_97 ("t")))))) !={PtrOp, PtrOp} (LocInfoE loc_98 (NULL))))) - then - locinfo: loc_66 ; - Goto "#1" - else - Goto "#2" - ]> $ - <[ "#1" := - locinfo: loc_66 ; - "_" <- LocInfoE loc_85 (free_tree) with - [ LocInfoE loc_86 (&(LocInfoE loc_87 ((LocInfoE loc_88 (!{LPtr} (LocInfoE loc_90 (!{LPtr} (LocInfoE loc_91 ("t")))))) at{struct_tree} "left"))) ] ; - locinfo: loc_67 ; - "_" <- LocInfoE loc_77 (free_tree) with - [ LocInfoE loc_78 (&(LocInfoE loc_79 ((LocInfoE loc_80 (!{LPtr} (LocInfoE loc_82 (!{LPtr} (LocInfoE loc_83 ("t")))))) at{struct_tree} "right"))) ] ; - locinfo: loc_68 ; - "_" <- LocInfoE loc_70 (free) with - [ LocInfoE loc_71 (i2v (layout_of struct_tree).(ly_size) size_t) ; - LocInfoE loc_72 (use{LPtr} (LocInfoE loc_74 (!{LPtr} (LocInfoE loc_75 ("t"))))) ] ; - Return (VOID) - ]> $ - <[ "#2" := - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [member_rec]. *) - Definition impl_member_rec (member_rec : loc): function := {| - f_args := [ - ("t", LPtr); - ("k", it_layout i32) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_153 ; - if: LocInfoE loc_153 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_153 ((LocInfoE loc_154 (use{LPtr} (LocInfoE loc_156 (!{LPtr} (LocInfoE loc_157 ("t")))))) ={PtrOp, PtrOp} (LocInfoE loc_158 (NULL))))) - then - locinfo: loc_150 ; - Goto "#8" - else - locinfo: loc_141 ; - Goto "#9" - ]> $ - <[ "#1" := - locinfo: loc_141 ; - if: LocInfoE loc_141 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_141 ((LocInfoE loc_142 (use{it_layout i32} (LocInfoE loc_143 ((LocInfoE loc_144 (!{LPtr} (LocInfoE loc_146 (!{LPtr} (LocInfoE loc_147 ("t")))))) at{struct_tree} "key")))) ={IntOp i32, IntOp i32} (LocInfoE loc_148 (use{it_layout i32} (LocInfoE loc_149 ("k"))))))) - then - locinfo: loc_138 ; - Goto "#6" - else - locinfo: loc_129 ; - Goto "#7" - ]> $ - <[ "#2" := - locinfo: loc_129 ; - if: LocInfoE loc_129 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_129 ((LocInfoE loc_130 (use{it_layout i32} (LocInfoE loc_131 ("k")))) <{IntOp i32, IntOp i32} (LocInfoE loc_132 (use{it_layout i32} (LocInfoE loc_133 ((LocInfoE loc_134 (!{LPtr} (LocInfoE loc_136 (!{LPtr} (LocInfoE loc_137 ("t")))))) at{struct_tree} "key"))))))) - then - locinfo: loc_117 ; - Goto "#4" - else - locinfo: loc_105 ; - Goto "#5" - ]> $ - <[ "#3" := - locinfo: loc_105 ; - "$0" <- LocInfoE loc_107 (member_rec) with - [ LocInfoE loc_108 (&(LocInfoE loc_109 ((LocInfoE loc_110 (!{LPtr} (LocInfoE loc_112 (!{LPtr} (LocInfoE loc_113 ("t")))))) at{struct_tree} "right"))) ; - LocInfoE loc_114 (use{it_layout i32} (LocInfoE loc_115 ("k"))) ] ; - locinfo: loc_104 ; - Return (LocInfoE loc_105 ("$0")) - ]> $ - <[ "#4" := - locinfo: loc_117 ; - "$1" <- LocInfoE loc_119 (member_rec) with - [ LocInfoE loc_120 (&(LocInfoE loc_121 ((LocInfoE loc_122 (!{LPtr} (LocInfoE loc_124 (!{LPtr} (LocInfoE loc_125 ("t")))))) at{struct_tree} "left"))) ; - LocInfoE loc_126 (use{it_layout i32} (LocInfoE loc_127 ("k"))) ] ; - locinfo: loc_116 ; - Return (LocInfoE loc_117 ("$1")) - ]> $ - <[ "#5" := - locinfo: loc_105 ; - Goto "#3" - ]> $ - <[ "#6" := - locinfo: loc_138 ; - Return (LocInfoE loc_139 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_139 (i2v 1 i32)))) - ]> $ - <[ "#7" := - locinfo: loc_129 ; - Goto "#2" - ]> $ - <[ "#8" := - locinfo: loc_150 ; - Return (LocInfoE loc_151 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_151 (i2v 0 i32)))) - ]> $ - <[ "#9" := - locinfo: loc_141 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [member]. *) - Definition impl_member : function := {| - f_args := [ - ("t", LPtr); - ("k", it_layout i32) - ]; - f_local_vars := [ - ("cur", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "cur" <-{ LPtr } - LocInfoE loc_216 (&(LocInfoE loc_218 (!{LPtr} (LocInfoE loc_219 ("t"))))) ; - locinfo: loc_162 ; - Goto "#1" - ]> $ - <[ "#1" := - locinfo: loc_210 ; - if: LocInfoE loc_210 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_210 ((LocInfoE loc_211 (use{LPtr} (LocInfoE loc_213 (!{LPtr} (LocInfoE loc_214 ("cur")))))) !={PtrOp, PtrOp} (LocInfoE loc_215 (NULL))))) - then - locinfo: loc_201 ; - Goto "#2" - else - locinfo: loc_163 ; - Goto "#3" - ]> $ - <[ "#2" := - locinfo: loc_201 ; - if: LocInfoE loc_201 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_201 ((LocInfoE loc_202 (use{it_layout i32} (LocInfoE loc_203 ((LocInfoE loc_204 (!{LPtr} (LocInfoE loc_206 (!{LPtr} (LocInfoE loc_207 ("cur")))))) at{struct_tree} "key")))) ={IntOp i32, IntOp i32} (LocInfoE loc_208 (use{it_layout i32} (LocInfoE loc_209 ("k"))))))) - then - locinfo: loc_198 ; - Goto "#8" - else - locinfo: loc_189 ; - Goto "#9" - ]> $ - <[ "#3" := - locinfo: loc_163 ; - Return (LocInfoE loc_164 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_164 (i2v 0 i32)))) - ]> $ - <[ "#4" := - locinfo: loc_189 ; - if: LocInfoE loc_189 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_189 ((LocInfoE loc_190 (use{it_layout i32} (LocInfoE loc_191 ("k")))) <{IntOp i32, IntOp i32} (LocInfoE loc_192 (use{it_layout i32} (LocInfoE loc_193 ((LocInfoE loc_194 (!{LPtr} (LocInfoE loc_196 (!{LPtr} (LocInfoE loc_197 ("cur")))))) at{struct_tree} "key"))))))) - then - locinfo: loc_172 ; - Goto "#6" - else - locinfo: loc_181 ; - Goto "#7" - ]> $ - <[ "#5" := - locinfo: loc_169 ; - Goto "continue13" - ]> $ - <[ "#6" := - locinfo: loc_172 ; - LocInfoE loc_173 ("cur") <-{ LPtr } - LocInfoE loc_174 (&(LocInfoE loc_175 ((LocInfoE loc_176 (!{LPtr} (LocInfoE loc_178 (!{LPtr} (LocInfoE loc_179 ("cur")))))) at{struct_tree} "left"))) ; - locinfo: loc_169 ; - Goto "#5" - ]> $ - <[ "#7" := - locinfo: loc_181 ; - LocInfoE loc_182 ("cur") <-{ LPtr } - LocInfoE loc_183 (&(LocInfoE loc_184 ((LocInfoE loc_185 (!{LPtr} (LocInfoE loc_187 (!{LPtr} (LocInfoE loc_188 ("cur")))))) at{struct_tree} "right"))) ; - locinfo: loc_169 ; - Goto "#5" - ]> $ - <[ "#8" := - locinfo: loc_198 ; - Return (LocInfoE loc_199 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_199 (i2v 1 i32)))) - ]> $ - <[ "#9" := - locinfo: loc_189 ; - Goto "#4" - ]> $ - <[ "continue13" := - locinfo: loc_162 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [insert_rec]. *) - Definition impl_insert_rec (node insert_rec : loc): function := {| - f_args := [ - ("t", LPtr); - ("k", it_layout i32) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_285 ; - if: LocInfoE loc_285 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_285 ((LocInfoE loc_286 (use{LPtr} (LocInfoE loc_288 (!{LPtr} (LocInfoE loc_289 ("t")))))) ={PtrOp, PtrOp} (LocInfoE loc_290 (NULL))))) - then - locinfo: loc_230 ; - Goto "#1" - else - locinfo: loc_276 ; - Goto "#2" - ]> $ - <[ "#1" := - locinfo: loc_230 ; - "$0" <- LocInfoE loc_232 (node) with [ LocInfoE loc_233 (NULL) ; - LocInfoE loc_234 (use{it_layout i32} (LocInfoE loc_235 ("k"))) ; - LocInfoE loc_236 (NULL) ] ; - locinfo: loc_226 ; - LocInfoE loc_228 (!{LPtr} (LocInfoE loc_229 ("t"))) <-{ LPtr } - LocInfoE loc_230 ("$0") ; - Return (VOID) - ]> $ - <[ "#2" := - locinfo: loc_276 ; - if: LocInfoE loc_276 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_276 ((LocInfoE loc_277 (use{it_layout i32} (LocInfoE loc_278 ((LocInfoE loc_279 (!{LPtr} (LocInfoE loc_281 (!{LPtr} (LocInfoE loc_282 ("t")))))) at{struct_tree} "key")))) ={IntOp i32, IntOp i32} (LocInfoE loc_283 (use{it_layout i32} (LocInfoE loc_284 ("k"))))))) - then - locinfo: loc_273 ; - Goto "#6" - else - locinfo: loc_264 ; - Goto "#7" - ]> $ - <[ "#3" := - locinfo: loc_264 ; - if: LocInfoE loc_264 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_264 ((LocInfoE loc_265 (use{it_layout i32} (LocInfoE loc_266 ("k")))) <{IntOp i32, IntOp i32} (LocInfoE loc_267 (use{it_layout i32} (LocInfoE loc_268 ((LocInfoE loc_269 (!{LPtr} (LocInfoE loc_271 (!{LPtr} (LocInfoE loc_272 ("t")))))) at{struct_tree} "key"))))))) - then - locinfo: loc_241 ; - Goto "#4" - else - locinfo: loc_253 ; - Goto "#5" - ]> $ - <[ "#4" := - locinfo: loc_241 ; - "_" <- LocInfoE loc_243 (insert_rec) with - [ LocInfoE loc_244 (&(LocInfoE loc_245 ((LocInfoE loc_246 (!{LPtr} (LocInfoE loc_248 (!{LPtr} (LocInfoE loc_249 ("t")))))) at{struct_tree} "left"))) ; - LocInfoE loc_250 (use{it_layout i32} (LocInfoE loc_251 ("k"))) ] ; - Return (VOID) - ]> $ - <[ "#5" := - locinfo: loc_253 ; - "_" <- LocInfoE loc_255 (insert_rec) with - [ LocInfoE loc_256 (&(LocInfoE loc_257 ((LocInfoE loc_258 (!{LPtr} (LocInfoE loc_260 (!{LPtr} (LocInfoE loc_261 ("t")))))) at{struct_tree} "right"))) ; - LocInfoE loc_262 (use{it_layout i32} (LocInfoE loc_263 ("k"))) ] ; - Return (VOID) - ]> $ - <[ "#6" := - locinfo: loc_273 ; - Return (VOID) - ]> $ - <[ "#7" := - locinfo: loc_264 ; - Goto "#3" - ]> $∅ - )%E - |}. - - (* Definition of function [insert]. *) - Definition impl_insert (node : loc): function := {| - f_args := [ - ("t", LPtr); - ("k", it_layout i32) - ]; - f_local_vars := [ - ("cur", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "cur" <-{ LPtr } - LocInfoE loc_357 (&(LocInfoE loc_359 (!{LPtr} (LocInfoE loc_360 ("t"))))) ; - locinfo: loc_294 ; - Goto "#1" - ]> $ - <[ "#1" := - locinfo: loc_351 ; - if: LocInfoE loc_351 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_351 ((LocInfoE loc_352 (use{LPtr} (LocInfoE loc_354 (!{LPtr} (LocInfoE loc_355 ("cur")))))) !={PtrOp, PtrOp} (LocInfoE loc_356 (NULL))))) - then - locinfo: loc_342 ; - Goto "#2" - else - locinfo: loc_299 ; - Goto "#3" - ]> $ - <[ "#2" := - locinfo: loc_342 ; - if: LocInfoE loc_342 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_342 ((LocInfoE loc_343 (use{it_layout i32} (LocInfoE loc_344 ((LocInfoE loc_345 (!{LPtr} (LocInfoE loc_347 (!{LPtr} (LocInfoE loc_348 ("cur")))))) at{struct_tree} "key")))) ={IntOp i32, IntOp i32} (LocInfoE loc_349 (use{it_layout i32} (LocInfoE loc_350 ("k"))))))) - then - locinfo: loc_339 ; - Goto "#8" - else - locinfo: loc_330 ; - Goto "#9" - ]> $ - <[ "#3" := - locinfo: loc_299 ; - "$0" <- LocInfoE loc_301 (node) with [ LocInfoE loc_302 (NULL) ; - LocInfoE loc_303 (use{it_layout i32} (LocInfoE loc_304 ("k"))) ; - LocInfoE loc_305 (NULL) ] ; - locinfo: loc_295 ; - LocInfoE loc_297 (!{LPtr} (LocInfoE loc_298 ("cur"))) <-{ LPtr } - LocInfoE loc_299 ("$0") ; - Return (VOID) - ]> $ - <[ "#4" := - locinfo: loc_330 ; - if: LocInfoE loc_330 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_330 ((LocInfoE loc_331 (use{it_layout i32} (LocInfoE loc_332 ("k")))) <{IntOp i32, IntOp i32} (LocInfoE loc_333 (use{it_layout i32} (LocInfoE loc_334 ((LocInfoE loc_335 (!{LPtr} (LocInfoE loc_337 (!{LPtr} (LocInfoE loc_338 ("cur")))))) at{struct_tree} "key"))))))) - then - locinfo: loc_313 ; - Goto "#6" - else - locinfo: loc_322 ; - Goto "#7" - ]> $ - <[ "#5" := - locinfo: loc_310 ; - Goto "continue25" - ]> $ - <[ "#6" := - locinfo: loc_313 ; - LocInfoE loc_314 ("cur") <-{ LPtr } - LocInfoE loc_315 (&(LocInfoE loc_316 ((LocInfoE loc_317 (!{LPtr} (LocInfoE loc_319 (!{LPtr} (LocInfoE loc_320 ("cur")))))) at{struct_tree} "left"))) ; - locinfo: loc_310 ; - Goto "#5" - ]> $ - <[ "#7" := - locinfo: loc_322 ; - LocInfoE loc_323 ("cur") <-{ LPtr } - LocInfoE loc_324 (&(LocInfoE loc_325 ((LocInfoE loc_326 (!{LPtr} (LocInfoE loc_328 (!{LPtr} (LocInfoE loc_329 ("cur")))))) at{struct_tree} "right"))) ; - locinfo: loc_310 ; - Goto "#5" - ]> $ - <[ "#8" := - locinfo: loc_339 ; - Return (VOID) - ]> $ - <[ "#9" := - locinfo: loc_330 ; - Goto "#4" - ]> $ - <[ "continue25" := - locinfo: loc_294 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [tree_max]. *) - Definition impl_tree_max (tree_max : loc): function := {| - f_args := [ - ("t", LPtr) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_395 ; - if: LocInfoE loc_395 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_395 ((LocInfoE loc_396 (use{LPtr} (LocInfoE loc_397 ((LocInfoE loc_398 (!{LPtr} (LocInfoE loc_400 (!{LPtr} (LocInfoE loc_401 ("t")))))) at{struct_tree} "right")))) ={PtrOp, PtrOp} (LocInfoE loc_402 (NULL))))) - then - locinfo: loc_387 ; - Goto "#2" - else - locinfo: loc_366 ; - Goto "#3" - ]> $ - <[ "#1" := - locinfo: loc_366 ; - expr: (LocInfoE loc_378 (&(LocInfoE loc_379 ((LocInfoE loc_380 (!{LPtr} (LocInfoE loc_381 ((LocInfoE loc_382 (!{LPtr} (LocInfoE loc_384 (!{LPtr} (LocInfoE loc_385 ("t")))))) at{struct_tree} "right")))) at{struct_tree} "key")))) ; - locinfo: loc_369 ; - "$0" <- LocInfoE loc_371 (tree_max) with - [ LocInfoE loc_372 (&(LocInfoE loc_373 ((LocInfoE loc_374 (!{LPtr} (LocInfoE loc_376 (!{LPtr} (LocInfoE loc_377 ("t")))))) at{struct_tree} "right"))) ] ; - locinfo: loc_368 ; - Return (LocInfoE loc_369 ("$0")) - ]> $ - <[ "#2" := - locinfo: loc_387 ; - Return (LocInfoE loc_388 (use{it_layout i32} (LocInfoE loc_389 ((LocInfoE loc_390 (!{LPtr} (LocInfoE loc_392 (!{LPtr} (LocInfoE loc_393 ("t")))))) at{struct_tree} "key")))) - ]> $ - <[ "#3" := - locinfo: loc_366 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [remove]. *) - Definition impl_remove (free tree_max remove : loc): function := {| - f_args := [ - ("t", LPtr); - ("k", it_layout i32) - ]; - f_local_vars := [ - ("m", it_layout i32); - ("tmp", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_528 ; - if: LocInfoE loc_528 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_528 ((LocInfoE loc_529 (use{LPtr} (LocInfoE loc_531 (!{LPtr} (LocInfoE loc_532 ("t")))))) ={PtrOp, PtrOp} (LocInfoE loc_533 (NULL))))) - then - locinfo: loc_525 ; - Goto "#8" - else - locinfo: loc_515 ; - Goto "#9" - ]> $ - <[ "#1" := - locinfo: loc_515 ; - if: LocInfoE loc_515 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_515 ((LocInfoE loc_516 (use{it_layout i32} (LocInfoE loc_517 ("k")))) ={IntOp i32, IntOp i32} (LocInfoE loc_518 (use{it_layout i32} (LocInfoE loc_519 ((LocInfoE loc_520 (!{LPtr} (LocInfoE loc_522 (!{LPtr} (LocInfoE loc_523 ("t")))))) at{struct_tree} "key"))))))) - then - locinfo: loc_473 ; - Goto "#2" - else - locinfo: loc_506 ; - Goto "#5" - ]> $ - <[ "#2" := - locinfo: loc_473 ; - if: LocInfoE loc_473 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_473 ((LocInfoE loc_474 (use{LPtr} (LocInfoE loc_475 ((LocInfoE loc_476 (!{LPtr} (LocInfoE loc_478 (!{LPtr} (LocInfoE loc_479 ("t")))))) at{struct_tree} "left")))) !={PtrOp, PtrOp} (LocInfoE loc_480 (NULL))))) - then - locinfo: loc_410 ; - Goto "#3" - else - locinfo: loc_451 ; - Goto "#4" - ]> $ - <[ "#3" := - locinfo: loc_410 ; - expr: (LocInfoE loc_442 (&(LocInfoE loc_443 ((LocInfoE loc_444 (!{LPtr} (LocInfoE loc_445 ((LocInfoE loc_446 (!{LPtr} (LocInfoE loc_448 (!{LPtr} (LocInfoE loc_449 ("t")))))) at{struct_tree} "left")))) at{struct_tree} "key")))) ; - locinfo: loc_433 ; - "$0" <- LocInfoE loc_435 (tree_max) with - [ LocInfoE loc_436 (&(LocInfoE loc_437 ((LocInfoE loc_438 (!{LPtr} (LocInfoE loc_440 (!{LPtr} (LocInfoE loc_441 ("t")))))) at{struct_tree} "left"))) ] ; - locinfo: loc_412 ; - LocInfoE loc_432 ("m") <-{ it_layout i32 } LocInfoE loc_433 ("$0") ; - locinfo: loc_413 ; - "_" <- LocInfoE loc_423 (remove) with - [ LocInfoE loc_424 (&(LocInfoE loc_425 ((LocInfoE loc_426 (!{LPtr} (LocInfoE loc_428 (!{LPtr} (LocInfoE loc_429 ("t")))))) at{struct_tree} "left"))) ; - LocInfoE loc_430 (use{it_layout i32} (LocInfoE loc_431 ("m"))) ] ; - locinfo: loc_414 ; - LocInfoE loc_415 ((LocInfoE loc_416 (!{LPtr} (LocInfoE loc_418 (!{LPtr} (LocInfoE loc_419 ("t")))))) at{struct_tree} "key") <-{ it_layout i32 } - LocInfoE loc_420 (use{it_layout i32} (LocInfoE loc_421 ("m"))) ; - Return (VOID) - ]> $ - <[ "#4" := - locinfo: loc_451 ; - LocInfoE loc_466 ("tmp") <-{ LPtr } - LocInfoE loc_467 (use{LPtr} (LocInfoE loc_468 ((LocInfoE loc_469 (!{LPtr} (LocInfoE loc_471 (!{LPtr} (LocInfoE loc_472 ("t")))))) at{struct_tree} "right"))) ; - locinfo: loc_452 ; - "_" <- LocInfoE loc_460 (free) with - [ LocInfoE loc_461 (i2v (layout_of struct_tree).(ly_size) size_t) ; - LocInfoE loc_462 (use{LPtr} (LocInfoE loc_464 (!{LPtr} (LocInfoE loc_465 ("t"))))) ] ; - locinfo: loc_453 ; - LocInfoE loc_455 (!{LPtr} (LocInfoE loc_456 ("t"))) <-{ LPtr } - LocInfoE loc_457 (use{LPtr} (LocInfoE loc_458 ("tmp"))) ; - Return (VOID) - ]> $ - <[ "#5" := - locinfo: loc_506 ; - if: LocInfoE loc_506 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_506 ((LocInfoE loc_507 (use{it_layout i32} (LocInfoE loc_508 ("k")))) <{IntOp i32, IntOp i32} (LocInfoE loc_509 (use{it_layout i32} (LocInfoE loc_510 ((LocInfoE loc_511 (!{LPtr} (LocInfoE loc_513 (!{LPtr} (LocInfoE loc_514 ("t")))))) at{struct_tree} "key"))))))) - then - locinfo: loc_483 ; - Goto "#6" - else - locinfo: loc_495 ; - Goto "#7" - ]> $ - <[ "#6" := - locinfo: loc_483 ; - "_" <- LocInfoE loc_485 (remove) with - [ LocInfoE loc_486 (&(LocInfoE loc_487 ((LocInfoE loc_488 (!{LPtr} (LocInfoE loc_490 (!{LPtr} (LocInfoE loc_491 ("t")))))) at{struct_tree} "left"))) ; - LocInfoE loc_492 (use{it_layout i32} (LocInfoE loc_493 ("k"))) ] ; - Return (VOID) - ]> $ - <[ "#7" := - locinfo: loc_495 ; - "_" <- LocInfoE loc_497 (remove) with - [ LocInfoE loc_498 (&(LocInfoE loc_499 ((LocInfoE loc_500 (!{LPtr} (LocInfoE loc_502 (!{LPtr} (LocInfoE loc_503 ("t")))))) at{struct_tree} "right"))) ; - LocInfoE loc_504 (use{it_layout i32} (LocInfoE loc_505 ("k"))) ] ; - Return (VOID) - ]> $ - <[ "#8" := - locinfo: loc_525 ; - Return (VOID) - ]> $ - <[ "#9" := - locinfo: loc_515 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [sempty]. *) - Definition impl_sempty (empty : loc): function := {| - f_args := [ - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_537 ; - "$0" <- LocInfoE loc_539 (empty) with [ ] ; - locinfo: loc_536 ; - Return (LocInfoE loc_537 ("$0")) - ]> $∅ - )%E - |}. - - (* Definition of function [sinit]. *) - Definition impl_sinit (init : loc): function := {| - f_args := [ - ("key", it_layout i32) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_543 ; - "$0" <- LocInfoE loc_545 (init) with - [ LocInfoE loc_546 (use{it_layout i32} (LocInfoE loc_547 ("key"))) ] ; - locinfo: loc_542 ; - Return (LocInfoE loc_543 ("$0")) - ]> $∅ - )%E - |}. - - (* Definition of function [sfree_tree]. *) - Definition impl_sfree_tree (free_tree : loc): function := {| - f_args := [ - ("t", LPtr) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_550 ; - annot: (UnfoldOnceAnnot) ; - expr: (LocInfoE loc_557 (&(LocInfoE loc_559 (!{LPtr} (LocInfoE loc_560 ("t")))))) ; - locinfo: loc_552 ; - "_" <- LocInfoE loc_554 (free_tree) with - [ LocInfoE loc_555 (use{LPtr} (LocInfoE loc_556 ("t"))) ] ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [smember]. *) - Definition impl_smember (member : loc): function := {| - f_args := [ - ("t", LPtr); - ("k", it_layout i32) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_563 ; - annot: (UnfoldOnceAnnot) ; - expr: (LocInfoE loc_573 (&(LocInfoE loc_575 (!{LPtr} (LocInfoE loc_576 ("t")))))) ; - locinfo: loc_566 ; - "$0" <- LocInfoE loc_568 (member) with - [ LocInfoE loc_569 (use{LPtr} (LocInfoE loc_570 ("t"))) ; - LocInfoE loc_571 (use{it_layout i32} (LocInfoE loc_572 ("k"))) ] ; - locinfo: loc_565 ; - Return (LocInfoE loc_566 ("$0")) - ]> $∅ - )%E - |}. - - (* Definition of function [sinsert]. *) - Definition impl_sinsert (insert : loc): function := {| - f_args := [ - ("t", LPtr); - ("k", it_layout i32) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_579 ; - annot: (UnfoldOnceAnnot) ; - expr: (LocInfoE loc_588 (&(LocInfoE loc_590 (!{LPtr} (LocInfoE loc_591 ("t")))))) ; - locinfo: loc_581 ; - "_" <- LocInfoE loc_583 (insert) with - [ LocInfoE loc_584 (use{LPtr} (LocInfoE loc_585 ("t"))) ; - LocInfoE loc_586 (use{it_layout i32} (LocInfoE loc_587 ("k"))) ] ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [sremove]. *) - Definition impl_sremove (remove : loc): function := {| - f_args := [ - ("t", LPtr); - ("k", it_layout i32) - ]; - f_local_vars := [ - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_594 ; - annot: (UnfoldOnceAnnot) ; - expr: (LocInfoE loc_603 (&(LocInfoE loc_605 (!{LPtr} (LocInfoE loc_606 ("t")))))) ; - locinfo: loc_596 ; - "_" <- LocInfoE loc_598 (remove) with - [ LocInfoE loc_599 (use{LPtr} (LocInfoE loc_600 ("t"))) ; - LocInfoE loc_601 (use{it_layout i32} (LocInfoE loc_602 ("k"))) ] ; - Return (VOID) - ]> $∅ - )%E - |}. - - (* Definition of function [main]. *) - Definition impl_main (sempty sinit sfree_tree smember sinsert sremove : loc): function := {| - f_args := [ - ]; - f_local_vars := [ - ("t", LPtr) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - locinfo: loc_668 ; - "$4" <- LocInfoE loc_670 (sempty) with [ ] ; - "t" <-{ LPtr } LocInfoE loc_668 ("$4") ; - locinfo: loc_664 ; - "$3" <- LocInfoE loc_666 (sinit) with - [ LocInfoE loc_667 (i2v 3 i32) ] ; - locinfo: loc_610 ; - LocInfoE loc_663 ("t") <-{ LPtr } LocInfoE loc_664 ("$3") ; - locinfo: loc_611 ; - "_" <- LocInfoE loc_659 (sinsert) with - [ LocInfoE loc_660 (&(LocInfoE loc_661 ("t"))) ; - LocInfoE loc_662 (i2v 2 i32) ] ; - locinfo: loc_652 ; - "$2" <- LocInfoE loc_654 (smember) with - [ LocInfoE loc_655 (&(LocInfoE loc_656 ("t"))) ; - LocInfoE loc_657 (i2v 2 i32) ] ; - locinfo: loc_612 ; - assert: (LocInfoE loc_652 ("$2")) ; - locinfo: loc_646 ; - "$1" <- LocInfoE loc_648 (smember) with - [ LocInfoE loc_649 (&(LocInfoE loc_650 ("t"))) ; - LocInfoE loc_651 (i2v 3 i32) ] ; - locinfo: loc_613 ; - assert: (LocInfoE loc_646 ("$1")) ; - locinfo: loc_614 ; - "_" <- LocInfoE loc_642 (sremove) with - [ LocInfoE loc_643 (&(LocInfoE loc_644 ("t"))) ; - LocInfoE loc_645 (i2v 3 i32) ] ; - locinfo: loc_615 ; - "_" <- LocInfoE loc_637 (sinsert) with - [ LocInfoE loc_638 (&(LocInfoE loc_639 ("t"))) ; - LocInfoE loc_640 (i2v 3 i32) ] ; - locinfo: loc_630 ; - "$0" <- LocInfoE loc_632 (smember) with - [ LocInfoE loc_633 (&(LocInfoE loc_634 ("t"))) ; - LocInfoE loc_635 (i2v 2 i32) ] ; - locinfo: loc_616 ; - assert: (LocInfoE loc_630 ("$0")) ; - locinfo: loc_617 ; - "_" <- LocInfoE loc_626 (sremove) with - [ LocInfoE loc_627 (&(LocInfoE loc_628 ("t"))) ; - LocInfoE loc_629 (i2v 3 i32) ] ; - locinfo: loc_618 ; - "_" <- LocInfoE loc_622 (sfree_tree) with - [ LocInfoE loc_623 (&(LocInfoE loc_624 ("t"))) ] ; - locinfo: loc_619 ; - Return (LocInfoE loc_620 (i2v 0 i32)) - ]> $∅ - )%E - |}. -End code. diff --git a/theories/examples/tutorial/t8_tree_proof_empty.v b/theories/examples/tutorial/t8_tree_proof_empty.v deleted file mode 100644 index c617445ad222a7adf8be171b1e95248c2731e35d..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_proof_empty.v +++ /dev/null @@ -1,26 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_spec. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section proof_empty. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [empty]. *) - Lemma type_empty : - ⊢ typed_function impl_empty type_of_empty. - Proof. - start_function "empty" ([]). - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "empty" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "empty". - Qed. -End proof_empty. diff --git a/theories/examples/tutorial/t8_tree_proof_free_tree.v b/theories/examples/tutorial/t8_tree_proof_free_tree.v deleted file mode 100644 index 4358d0133c07646e4039957ebac734edfc305d5a..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_proof_free_tree.v +++ /dev/null @@ -1,28 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_spec. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section proof_free_tree. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [free_tree]. *) - Lemma type_free_tree (free free_tree : loc) : - free â—áµ¥ free @ function_ptr type_of_free -∗ - free_tree â—áµ¥ free_tree @ function_ptr type_of_free_tree -∗ - typed_function (impl_free_tree free free_tree) type_of_free_tree. - Proof. - start_function "free_tree" (p) => arg_t. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "free_tree" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "free_tree". - Qed. -End proof_free_tree. diff --git a/theories/examples/tutorial/t8_tree_proof_init.v b/theories/examples/tutorial/t8_tree_proof_init.v deleted file mode 100644 index 17a1920fa8d0c137dac1ea68233d12e48b13136e..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_proof_init.v +++ /dev/null @@ -1,27 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_spec. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section proof_init. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [init]. *) - Lemma type_init (alloc : loc) : - alloc â—áµ¥ alloc @ function_ptr type_of_alloc -∗ - typed_function (impl_init alloc) type_of_init. - Proof. - start_function "init" (k) => arg_key local_node. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "init" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "init". - Qed. -End proof_init. diff --git a/theories/examples/tutorial/t8_tree_proof_insert.v b/theories/examples/tutorial/t8_tree_proof_insert.v deleted file mode 100644 index 2308c401c6f6f3b47ce249b8591bb79d62ba7182..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_proof_insert.v +++ /dev/null @@ -1,36 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_spec. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section proof_insert. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [insert]. *) - Lemma type_insert (node : loc) : - node â—áµ¥ node @ function_ptr type_of_node -∗ - typed_function (impl_insert node) type_of_insert. - Proof. - start_function "insert" ([[p t] k]) => arg_t arg_k local_cur. - split_blocks (( - <[ "#1" := - ∃ p_cur : loc, - ∃ branch : tree Z, - arg_k â—â‚— (k @ (int (i32))) ∗ - local_cur â—â‚— (p_cur @ (&own (branch @ (tree_t)))) ∗ - arg_t â—â‚— (p @ (&own (wand (p_cur â—â‚— (tree_insert k branch) @ tree_t) ((tree_insert k t) @ (tree_t))))) - ]> $ - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "insert" "#0". - - repeat liRStep; liShow. - all: print_typesystem_goal "insert" "#1". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "insert". - Qed. -End proof_insert. diff --git a/theories/examples/tutorial/t8_tree_proof_insert_rec.v b/theories/examples/tutorial/t8_tree_proof_insert_rec.v deleted file mode 100644 index b5e354766e2d33d0e4dc3bb5db44d4001d221b1e..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_proof_insert_rec.v +++ /dev/null @@ -1,28 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_spec. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section proof_insert_rec. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [insert_rec]. *) - Lemma type_insert_rec (node insert_rec : loc) : - node â—áµ¥ node @ function_ptr type_of_node -∗ - insert_rec â—áµ¥ insert_rec @ function_ptr type_of_insert_rec -∗ - typed_function (impl_insert_rec node insert_rec) type_of_insert_rec. - Proof. - start_function "insert_rec" ([[p t] k]) => arg_t arg_k. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "insert_rec" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "insert_rec". - Qed. -End proof_insert_rec. diff --git a/theories/examples/tutorial/t8_tree_proof_main.v b/theories/examples/tutorial/t8_tree_proof_main.v deleted file mode 100644 index 481270d9aacfd8015cf51c696990286cc5e12a71..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_proof_main.v +++ /dev/null @@ -1,32 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_spec. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section proof_main. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [main]. *) - Lemma type_main (sempty sinit sfree_tree smember sinsert sremove : loc) : - sempty â—áµ¥ sempty @ function_ptr type_of_sempty -∗ - sinit â—áµ¥ sinit @ function_ptr type_of_sinit -∗ - sfree_tree â—áµ¥ sfree_tree @ function_ptr type_of_sfree_tree -∗ - smember â—áµ¥ smember @ function_ptr type_of_smember -∗ - sinsert â—áµ¥ sinsert @ function_ptr type_of_sinsert -∗ - sremove â—áµ¥ sremove @ function_ptr type_of_sremove -∗ - typed_function (impl_main sempty sinit sfree_tree smember sinsert sremove) type_of_main. - Proof. - start_function "main" ([]) => local_t. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "main" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "main". - Qed. -End proof_main. diff --git a/theories/examples/tutorial/t8_tree_proof_member.v b/theories/examples/tutorial/t8_tree_proof_member.v deleted file mode 100644 index aee9d1acdde09044a03d4a8db6c01f0af2c098ca..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_proof_member.v +++ /dev/null @@ -1,36 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_spec. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section proof_member. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [member]. *) - Lemma type_member : - ⊢ typed_function impl_member type_of_member. - Proof. - start_function "member" ([[p t] k]) => arg_t arg_k local_cur. - split_blocks (( - <[ "#1" := - ∃ p_cur : loc, - ∃ branch : tree Z, - arg_k â—â‚— (k @ (int (i32))) ∗ - local_cur â—â‚— (p_cur @ (&own (branch @ (tree_t)))) ∗ - arg_t â—â‚— (p @ (&own (wand (p_cur â—â‚— branch @ tree_t) (t @ (tree_t))))) ∗ - ⌜tree_member k t ↔ tree_member k branch⌠- ]> $ - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "member" "#0". - - repeat liRStep; liShow. - all: print_typesystem_goal "member" "#1". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "member". - Qed. -End proof_member. diff --git a/theories/examples/tutorial/t8_tree_proof_member_rec.v b/theories/examples/tutorial/t8_tree_proof_member_rec.v deleted file mode 100644 index c97d6bf5c0a985683626bdeb63fbad975a9f4e13..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_proof_member_rec.v +++ /dev/null @@ -1,27 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_spec. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section proof_member_rec. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [member_rec]. *) - Lemma type_member_rec (member_rec : loc) : - member_rec â—áµ¥ member_rec @ function_ptr type_of_member_rec -∗ - typed_function (impl_member_rec member_rec) type_of_member_rec. - Proof. - start_function "member_rec" ([[p t] k]) => arg_t arg_k. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "member_rec" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "member_rec". - Qed. -End proof_member_rec. diff --git a/theories/examples/tutorial/t8_tree_proof_node.v b/theories/examples/tutorial/t8_tree_proof_node.v deleted file mode 100644 index eee8838a1e9a84d49821b69d27e797a5529fb5b2..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_proof_node.v +++ /dev/null @@ -1,27 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_spec. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section proof_node. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [node]. *) - Lemma type_node (alloc : loc) : - alloc â—áµ¥ alloc @ function_ptr type_of_alloc -∗ - typed_function (impl_node alloc) type_of_node. - Proof. - start_function "node" ([[l k] r]) => arg_left arg_key arg_right local_node. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "node" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "node". - Qed. -End proof_node. diff --git a/theories/examples/tutorial/t8_tree_proof_remove.v b/theories/examples/tutorial/t8_tree_proof_remove.v deleted file mode 100644 index 6f3eb39840e861f6f128441451c844cad166ac42..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_proof_remove.v +++ /dev/null @@ -1,30 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_spec. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section proof_remove. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [remove]. *) - Lemma type_remove (free tree_max remove : loc) : - free â—áµ¥ free @ function_ptr type_of_free -∗ - tree_max â—áµ¥ tree_max @ function_ptr type_of_tree_max -∗ - remove â—áµ¥ remove @ function_ptr type_of_remove -∗ - typed_function (impl_remove free tree_max remove) type_of_remove. - Proof. - start_function "remove" ([[p t] k]) => arg_t arg_k local_m local_tmp. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "remove" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by case_bool_decide => //; simplify_eq. - all: print_sidecondition_goal "remove". - Qed. -End proof_remove. diff --git a/theories/examples/tutorial/t8_tree_proof_sempty.v b/theories/examples/tutorial/t8_tree_proof_sempty.v deleted file mode 100644 index 1a01c49ed6bed459065ba53dd47b85602212d2ac..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_proof_sempty.v +++ /dev/null @@ -1,28 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_spec. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section proof_sempty. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [sempty]. *) - Lemma type_sempty (empty : loc) : - empty â—áµ¥ empty @ function_ptr type_of_empty -∗ - typed_function (impl_sempty empty) type_of_sempty. - Proof. - start_function "sempty" ([]). - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "sempty" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by apply: LeafRel; solve_goal. - all: print_sidecondition_goal "sempty". - Qed. -End proof_sempty. diff --git a/theories/examples/tutorial/t8_tree_proof_sfree_tree.v b/theories/examples/tutorial/t8_tree_proof_sfree_tree.v deleted file mode 100644 index 49d95fc1904388f039aa196e6f0482ba6cf6da1d..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_proof_sfree_tree.v +++ /dev/null @@ -1,27 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_spec. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section proof_sfree_tree. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [sfree_tree]. *) - Lemma type_sfree_tree (free_tree : loc) : - free_tree â—áµ¥ free_tree @ function_ptr type_of_free_tree -∗ - typed_function (impl_sfree_tree free_tree) type_of_sfree_tree. - Proof. - start_function "sfree_tree" (p) => arg_t. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "sfree_tree" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "sfree_tree". - Qed. -End proof_sfree_tree. diff --git a/theories/examples/tutorial/t8_tree_proof_sinit.v b/theories/examples/tutorial/t8_tree_proof_sinit.v deleted file mode 100644 index ab6daf4e9207cdda9bcb88757c9b45c5fd1aa33c..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_proof_sinit.v +++ /dev/null @@ -1,28 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_spec. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section proof_sinit. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [sinit]. *) - Lemma type_sinit (init : loc) : - init â—áµ¥ init @ function_ptr type_of_init -∗ - typed_function (impl_sinit init) type_of_sinit. - Proof. - start_function "sinit" (k) => arg_key. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "sinit" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by apply: NodeRel; try apply LeafRel; set_solver. - all: print_sidecondition_goal "sinit". - Qed. -End proof_sinit. diff --git a/theories/examples/tutorial/t8_tree_proof_sinsert.v b/theories/examples/tutorial/t8_tree_proof_sinsert.v deleted file mode 100644 index 132bc5f1ecf2d914f33c0f6a65f8134084b1aa7d..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_proof_sinsert.v +++ /dev/null @@ -1,28 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_spec. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section proof_sinsert. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [sinsert]. *) - Lemma type_sinsert (insert : loc) : - insert â—áµ¥ insert @ function_ptr type_of_insert -∗ - typed_function (impl_sinsert insert) type_of_sinsert. - Proof. - start_function "sinsert" ([[p s] k]) => arg_t arg_k. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "sinsert" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by apply: tree_rel_insert; solve_goal. - all: print_sidecondition_goal "sinsert". - Qed. -End proof_sinsert. diff --git a/theories/examples/tutorial/t8_tree_proof_smember.v b/theories/examples/tutorial/t8_tree_proof_smember.v deleted file mode 100644 index ff136f9dbce969357bf542e0fcdf723f6aaeaf06..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_proof_smember.v +++ /dev/null @@ -1,28 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_spec. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section proof_smember. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [smember]. *) - Lemma type_smember (member : loc) : - member â—áµ¥ member @ function_ptr type_of_member -∗ - typed_function (impl_smember member) type_of_smember. - Proof. - start_function "smember" ([[p s] k]) => arg_t arg_k. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "smember" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by etrans; [done|]; symmetry; apply tree_rel_member. - all: print_sidecondition_goal "smember". - Qed. -End proof_smember. diff --git a/theories/examples/tutorial/t8_tree_proof_sremove.v b/theories/examples/tutorial/t8_tree_proof_sremove.v deleted file mode 100644 index 03654fb853be853b4a3b357f344363a21f27f815..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_proof_sremove.v +++ /dev/null @@ -1,28 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_spec. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section proof_sremove. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [sremove]. *) - Lemma type_sremove (remove : loc) : - remove â—áµ¥ remove @ function_ptr type_of_remove -∗ - typed_function (impl_sremove remove) type_of_sremove. - Proof. - start_function "sremove" ([[p s] k]) => arg_t arg_k. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "sremove" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: try by apply: tree_rel_remove; solve_goal. - all: print_sidecondition_goal "sremove". - Qed. -End proof_sremove. diff --git a/theories/examples/tutorial/t8_tree_proof_tree_max.v b/theories/examples/tutorial/t8_tree_proof_tree_max.v deleted file mode 100644 index 61eaa16d9d73b7f434ad1939f9f2414502f84700..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_proof_tree_max.v +++ /dev/null @@ -1,27 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_spec. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section proof_tree_max. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [tree_max]. *) - Lemma type_tree_max (tree_max : loc) : - tree_max â—áµ¥ tree_max @ function_ptr type_of_tree_max -∗ - typed_function (impl_tree_max tree_max) type_of_tree_max. - Proof. - start_function "tree_max" ([[[p l] k] r]) => arg_t. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "tree_max" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "tree_max". - Qed. -End proof_tree_max. diff --git a/theories/examples/tutorial/t8_tree_spec.v b/theories/examples/tutorial/t8_tree_spec.v deleted file mode 100644 index 91042b6619a45ed262f64a318aeaca67162b5575..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t8_tree_spec.v +++ /dev/null @@ -1,225 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t8_tree_code. -From refinedc.examples.tutorial Require Import t8_tree_extra. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t8_tree.c]. *) -Section spec. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Inlined code. *) - - Definition alloc_initialized := initialized "allocator_state" (). - - (* Definition of type [tree_t]. *) - Definition tree_t_rec : ((tree Z) -d> typeO) → ((tree Z) -d> typeO) := (λ self t, - ((node_data t) @ (optionalO (λ patt__, - let l := patt__.1.1 in - let k := patt__.1.2 in - let r := patt__.2 in - &own ( - struct struct_tree [@{type} - (guarded ("tree_t_0") (apply_dfun self (l))) ; - (guarded ("tree_t_1") (apply_dfun self (r))) ; - (k @ (int (i32))) - ] - ) - ) null)) - )%I. - Typeclasses Opaque tree_t_rec. - - Global Instance tree_t_rec_ne : Contractive tree_t_rec. - Proof. solve_type_proper. Qed. - - Definition tree_t : rtype := {| - rty_type := (tree Z); - rty r__ := fixp tree_t_rec r__ - |}. - - Lemma tree_t_unfold (t : tree Z) : - (t @ tree_t)%I ≡@{type} ( - ((node_data t) @ (optionalO (λ patt__, - let l := patt__.1.1 in - let k := patt__.1.2 in - let r := patt__.2 in - &own ( - struct struct_tree [@{type} - (guarded "tree_t_0" (l @ tree_t)) ; - (guarded "tree_t_1" (r @ tree_t)) ; - (k @ (int (i32))) - ] - ) - ) null)) - )%I. - Proof. by rewrite {1}/with_refinement/=fixp_unfold. Qed. - - - Global Program Instance tree_t_rmovable : RMovable tree_t := - {| rmovable 't := movable_eq _ _ (tree_t_unfold t) |}. - Next Obligation. solve_ty_layout_eq. Qed. - - Global Instance tree_t_simplify_hyp_place_inst l_ β_ (t : tree Z) : - SimplifyHypPlace l_ β_ (t @ tree_t)%I (Some 100%N) := - λ T, i2p (simplify_hyp_place_eq l_ β_ _ _ T (tree_t_unfold _)). - Global Instance tree_t_simplify_goal_place_inst l_ β_ (t : tree Z) : - SimplifyGoalPlace l_ β_ (t @ tree_t)%I (Some 100%N) := - λ T, i2p (simplify_goal_place_eq l_ β_ _ _ T (tree_t_unfold _)). - - Global Program Instance tree_t_simplify_hyp_val_inst v_ (t : tree Z) : - SimplifyHypVal v_ (t @ tree_t)%I (Some 100%N) := - λ T, i2p (simplify_hyp_val_eq v_ _ _ (tree_t_unfold _) T _). - Next Obligation. done. Qed. - Global Program Instance tree_t_simplify_goal_val_inst v_ (t : tree Z) : - SimplifyGoalVal v_ (t @ tree_t)%I (Some 100%N) := - λ T, i2p (simplify_goal_val_eq v_ _ _ (tree_t_unfold _) T _). - Next Obligation. done. Qed. - - (* Definition of type [stree_t]. *) - Definition stree_t_rec : ((gset Z) -d> typeO) → ((gset Z) -d> typeO) := (λ self s, - (tyexists (λ t, constrained (t @ (tree_t)) ⌜tree_rel s tâŒ)) - )%I. - Typeclasses Opaque stree_t_rec. - - Global Instance stree_t_rec_ne : Contractive stree_t_rec. - Proof. solve_type_proper. Qed. - - Definition stree_t : rtype := {| - rty_type := (gset Z); - rty r__ := fixp stree_t_rec r__ - |}. - - Lemma stree_t_unfold (s : gset Z) : - (s @ stree_t)%I ≡@{type} ( - (tyexists (λ t, constrained (t @ (tree_t)) ⌜tree_rel s tâŒ)) - )%I. - Proof. by rewrite {1}/with_refinement/=fixp_unfold. Qed. - - - Global Program Instance stree_t_rmovable : RMovable stree_t := - {| rmovable 's := movable_eq _ _ (stree_t_unfold s) |}. - Next Obligation. solve_ty_layout_eq. Qed. - - Global Instance stree_t_simplify_hyp_place_inst l_ β_ (s : gset Z) : - SimplifyHypPlace l_ β_ (s @ stree_t)%I (Some 100%N) := - λ T, i2p (simplify_hyp_place_eq l_ β_ _ _ T (stree_t_unfold _)). - Global Instance stree_t_simplify_goal_place_inst l_ β_ (s : gset Z) : - SimplifyGoalPlace l_ β_ (s @ stree_t)%I (Some 100%N) := - λ T, i2p (simplify_goal_place_eq l_ β_ _ _ T (stree_t_unfold _)). - - Global Program Instance stree_t_simplify_hyp_val_inst v_ (s : gset Z) : - SimplifyHypVal v_ (s @ stree_t)%I (Some 100%N) := - λ T, i2p (simplify_hyp_val_eq v_ _ _ (stree_t_unfold _) T _). - Next Obligation. done. Qed. - Global Program Instance stree_t_simplify_goal_val_inst v_ (s : gset Z) : - SimplifyGoalVal v_ (s @ stree_t)%I (Some 100%N) := - λ T, i2p (simplify_goal_val_eq v_ _ _ (stree_t_unfold _) T _). - Next Obligation. done. Qed. - - (* Type definitions. *) - - (* Specifications for function [alloc]. *) - Definition type_of_alloc := - fn(∀ size : nat; (size @ (int (size_t))); ⌜size + 16 < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (&own (uninit (mk_layout size 3))); True. - - (* Specifications for function [free]. *) - Definition type_of_free := - fn(∀ size : nat; (size @ (int (size_t))), (&own (uninit (mk_layout size 3))); (alloc_initialized) ∗ ⌜(8 | size)âŒ) - → ∃ () : (), (void); True. - - (* Specifications for function [alloc_array]. *) - Definition type_of_alloc_array := - fn(∀ (size, n) : nat * nat; (size @ (int (size_t))), (n @ (int (size_t))); ⌜size * n + 16 < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (&own (array (mk_layout size 3) (replicate n (uninit (mk_layout size 3))))); True. - - (* Specifications for function [free_array]. *) - Definition type_of_free_array := - fn(∀ (size, n) : nat * nat; (size @ (int (size_t))), (n @ (int (size_t))), (&own (array (mk_layout size 3) (replicate n (uninit (mk_layout size 3))))); ⌜size * n < it_max size_t⌠∗ ⌜(8 | size)⌠∗ (alloc_initialized)) - → ∃ () : (), (void); True. - - (* Specifications for function [empty]. *) - Definition type_of_empty := - fn(∀ () : (); True) → ∃ () : (), (leaf @ (tree_t)); True. - - (* Specifications for function [init]. *) - Definition type_of_init := - fn(∀ k : Z; (k @ (int (i32))); (alloc_initialized)) - → ∃ () : (), ((node leaf k leaf) @ (tree_t)); True. - - (* Specifications for function [node]. *) - Definition type_of_node := - fn(∀ (l, k, r) : (tree Z) * Z * (tree Z); (l @ (tree_t)), (k @ (int (i32))), (r @ (tree_t)); (alloc_initialized)) - → ∃ () : (), ((node l k r) @ (tree_t)); True. - - (* Specifications for function [free_tree]. *) - Definition type_of_free_tree := - fn(∀ p : loc; (p @ (&own (tree_t))); (alloc_initialized)) - → ∃ () : (), (void); (p â—â‚— (uninit (LPtr))). - - (* Specifications for function [member_rec]. *) - Definition type_of_member_rec := - fn(∀ (p, t, k) : loc * (tree Z) * Z; (p @ (&own (t @ (tree_t)))), (k @ (int (i32))); True) - → ∃ b : bool, (b @ (boolean (bool_it))); (p â—â‚— (t @ (tree_t))) ∗ ⌜b ↔ tree_member k tâŒ. - - (* Specifications for function [member]. *) - Definition type_of_member := - fn(∀ (p, t, k) : loc * (tree Z) * Z; (p @ (&own (t @ (tree_t)))), (k @ (int (i32))); True) - → ∃ b : bool, (b @ (boolean (bool_it))); (p â—â‚— (t @ (tree_t))) ∗ ⌜b ↔ tree_member k tâŒ. - - (* Specifications for function [insert_rec]. *) - Definition type_of_insert_rec := - fn(∀ (p, t, k) : loc * (tree Z) * Z; (p @ (&own (t @ (tree_t)))), (k @ (int (i32))); (alloc_initialized)) - → ∃ () : (), (void); (p â—â‚— ((tree_insert k t) @ (tree_t))). - - (* Specifications for function [insert]. *) - Definition type_of_insert := - fn(∀ (p, t, k) : loc * (tree Z) * Z; (p @ (&own (t @ (tree_t)))), (k @ (int (i32))); (alloc_initialized)) - → ∃ () : (), (void); (p â—â‚— ((tree_insert k t) @ (tree_t))). - - (* Specifications for function [tree_max]. *) - Definition type_of_tree_max := - fn(∀ (p, l, k, r) : loc * (tree Z) * Z * (tree Z); (p @ (&own ((node l k r) @ (tree_t)))); True) - → ∃ res : Z, (res @ (int (i32))); ⌜tree_max (node l k r) = Some res⌠∗ (p â—â‚— ((node l k r) @ (tree_t))). - - (* Specifications for function [remove]. *) - Definition type_of_remove := - fn(∀ (p, t, k) : loc * (tree Z) * Z; (p @ (&own (t @ (tree_t)))), (k @ (int (i32))); (alloc_initialized)) - → ∃ () : (), (void); (p â—â‚— ((tree_remove k t) @ (tree_t))). - - (* Specifications for function [sempty]. *) - Definition type_of_sempty := - fn(∀ () : (); True) → ∃ () : (), ((∅) @ (stree_t)); True. - - (* Specifications for function [sinit]. *) - Definition type_of_sinit := - fn(∀ k : Z; (k @ (int (i32))); (alloc_initialized)) - → ∃ () : (), (({[k]}) @ (stree_t)); True. - - (* Specifications for function [sfree_tree]. *) - Definition type_of_sfree_tree := - fn(∀ p : loc; (p @ (&own (stree_t))); (alloc_initialized)) - → ∃ () : (), (void); (p â—â‚— (uninit (LPtr))). - - (* Specifications for function [smember]. *) - Definition type_of_smember := - fn(∀ (p, s, k) : loc * (gset Z) * Z; (p @ (&own (s @ (stree_t)))), (k @ (int (i32))); True) - → ∃ b : bool, (b @ (boolean (bool_it))); (p â—â‚— (s @ (stree_t))) ∗ ⌜b ↔ k ∈ sâŒ. - - (* Specifications for function [sinsert]. *) - Definition type_of_sinsert := - fn(∀ (p, s, k) : loc * (gset Z) * Z; (p @ (&own (s @ (stree_t)))), (k @ (int (i32))); (alloc_initialized)) - → ∃ () : (), (void); (p â—â‚— (({[k]} ∪ s) @ (stree_t))). - - (* Specifications for function [sremove]. *) - Definition type_of_sremove := - fn(∀ (p, s, k) : loc * (gset Z) * Z; (p @ (&own (s @ (stree_t)))), (k @ (int (i32))); (alloc_initialized)) - → ∃ () : (), (void); (p â—â‚— ((s ∖ {[k]}) @ (stree_t))). - - (* Specifications for function [main]. *) - Definition type_of_main := - fn(∀ () : (); (alloc_initialized)) - → ∃ () : (), ((0) @ (int (i32))); True. -End spec. - -Typeclasses Opaque tree_t_rec. -Typeclasses Opaque stree_t_rec. diff --git a/theories/examples/tutorial/t9_switch.c.generate b/theories/examples/tutorial/t9_switch.c.generate deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/theories/examples/tutorial/t9_switch_code.v b/theories/examples/tutorial/t9_switch_code.v deleted file mode 100644 index f9ee5feafc6bf9aba06fa14b600201a0aef7d8b7..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t9_switch_code.v +++ /dev/null @@ -1,469 +0,0 @@ -From refinedc.lang Require Export notation. -From refinedc.lang Require Import tactics. -From refinedc.typing Require Import annotations. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t9_switch.c]. *) -Section code. - Definition file_0 : string := "theories/examples/tutorial/t9_switch.c". - Definition loc_2 : location_info := LocationInfo file_0 7 2 7 12. - Definition loc_3 : location_info := LocationInfo file_0 9 2 14 3. - Definition loc_4 : location_info := LocationInfo file_0 16 2 16 11. - Definition loc_5 : location_info := LocationInfo file_0 16 9 16 10. - Definition loc_6 : location_info := LocationInfo file_0 16 9 16 10. - Definition loc_7 : location_info := LocationInfo file_0 9 13 14 3. - Definition loc_8 : location_info := LocationInfo file_0 9 14 10 14. - Definition loc_10 : location_info := LocationInfo file_0 10 10 10 14. - Definition loc_11 : location_info := LocationInfo file_0 10 14 11 14. - Definition loc_13 : location_info := LocationInfo file_0 11 10 11 14. - Definition loc_14 : location_info := LocationInfo file_0 11 14 12 14. - Definition loc_16 : location_info := LocationInfo file_0 12 10 12 14. - Definition loc_17 : location_info := LocationInfo file_0 12 14 13 14. - Definition loc_19 : location_info := LocationInfo file_0 13 10 13 14. - Definition loc_20 : location_info := LocationInfo file_0 13 10 13 11. - Definition loc_21 : location_info := LocationInfo file_0 12 10 12 11. - Definition loc_22 : location_info := LocationInfo file_0 11 10 11 11. - Definition loc_23 : location_info := LocationInfo file_0 10 10 10 11. - Definition loc_24 : location_info := LocationInfo file_0 9 10 9 11. - Definition loc_25 : location_info := LocationInfo file_0 9 10 9 11. - Definition loc_26 : location_info := LocationInfo file_0 7 10 7 11. - Definition loc_27 : location_info := LocationInfo file_0 7 10 7 11. - Definition loc_32 : location_info := LocationInfo file_0 24 2 24 12. - Definition loc_33 : location_info := LocationInfo file_0 26 2 32 3. - Definition loc_34 : location_info := LocationInfo file_0 34 2 34 11. - Definition loc_35 : location_info := LocationInfo file_0 34 9 34 10. - Definition loc_36 : location_info := LocationInfo file_0 34 9 34 10. - Definition loc_37 : location_info := LocationInfo file_0 26 13 32 3. - Definition loc_38 : location_info := LocationInfo file_0 26 14 27 14. - Definition loc_40 : location_info := LocationInfo file_0 27 10 27 14. - Definition loc_41 : location_info := LocationInfo file_0 27 14 28 14. - Definition loc_43 : location_info := LocationInfo file_0 28 10 28 14. - Definition loc_44 : location_info := LocationInfo file_0 28 14 29 14. - Definition loc_46 : location_info := LocationInfo file_0 29 10 29 14. - Definition loc_47 : location_info := LocationInfo file_0 29 14 30 14. - Definition loc_49 : location_info := LocationInfo file_0 30 10 30 14. - Definition loc_50 : location_info := LocationInfo file_0 30 14 31 15. - Definition loc_52 : location_info := LocationInfo file_0 31 11 31 15. - Definition loc_53 : location_info := LocationInfo file_0 31 11 31 12. - Definition loc_54 : location_info := LocationInfo file_0 30 10 30 11. - Definition loc_55 : location_info := LocationInfo file_0 29 10 29 11. - Definition loc_56 : location_info := LocationInfo file_0 28 10 28 11. - Definition loc_57 : location_info := LocationInfo file_0 27 10 27 11. - Definition loc_58 : location_info := LocationInfo file_0 26 10 26 11. - Definition loc_59 : location_info := LocationInfo file_0 26 10 26 11. - Definition loc_60 : location_info := LocationInfo file_0 24 10 24 11. - Definition loc_61 : location_info := LocationInfo file_0 24 10 24 11. - Definition loc_66 : location_info := LocationInfo file_0 41 2 41 12. - Definition loc_67 : location_info := LocationInfo file_0 43 2 49 3. - Definition loc_68 : location_info := LocationInfo file_0 51 2 51 11. - Definition loc_69 : location_info := LocationInfo file_0 51 9 51 10. - Definition loc_70 : location_info := LocationInfo file_0 51 9 51 10. - Definition loc_71 : location_info := LocationInfo file_0 43 13 49 3. - Definition loc_72 : location_info := LocationInfo file_0 43 14 44 14. - Definition loc_74 : location_info := LocationInfo file_0 44 10 44 14. - Definition loc_75 : location_info := LocationInfo file_0 44 15 44 21. - Definition loc_76 : location_info := LocationInfo file_0 44 21 45 14. - Definition loc_78 : location_info := LocationInfo file_0 45 10 45 14. - Definition loc_79 : location_info := LocationInfo file_0 45 15 45 21. - Definition loc_80 : location_info := LocationInfo file_0 45 21 46 14. - Definition loc_82 : location_info := LocationInfo file_0 46 10 46 14. - Definition loc_83 : location_info := LocationInfo file_0 46 15 46 21. - Definition loc_84 : location_info := LocationInfo file_0 46 21 47 14. - Definition loc_86 : location_info := LocationInfo file_0 47 10 47 14. - Definition loc_87 : location_info := LocationInfo file_0 47 15 47 21. - Definition loc_88 : location_info := LocationInfo file_0 47 21 48 14. - Definition loc_90 : location_info := LocationInfo file_0 48 10 48 14. - Definition loc_91 : location_info := LocationInfo file_0 48 15 48 21. - Definition loc_92 : location_info := LocationInfo file_0 48 10 48 11. - Definition loc_93 : location_info := LocationInfo file_0 47 10 47 11. - Definition loc_94 : location_info := LocationInfo file_0 46 10 46 11. - Definition loc_95 : location_info := LocationInfo file_0 45 10 45 11. - Definition loc_96 : location_info := LocationInfo file_0 44 10 44 11. - Definition loc_97 : location_info := LocationInfo file_0 43 10 43 11. - Definition loc_98 : location_info := LocationInfo file_0 43 10 43 11. - Definition loc_99 : location_info := LocationInfo file_0 41 10 41 11. - Definition loc_100 : location_info := LocationInfo file_0 41 10 41 11. - Definition loc_105 : location_info := LocationInfo file_0 59 2 59 12. - Definition loc_106 : location_info := LocationInfo file_0 61 2 61 22. - Definition loc_107 : location_info := LocationInfo file_0 62 2 73 3. - Definition loc_108 : location_info := LocationInfo file_0 75 2 75 11. - Definition loc_109 : location_info := LocationInfo file_0 75 9 75 10. - Definition loc_110 : location_info := LocationInfo file_0 75 9 75 10. - Definition loc_111 : location_info := LocationInfo file_0 62 17 73 3. - Definition loc_112 : location_info := LocationInfo file_0 62 18 72 26. - Definition loc_114 : location_info := LocationInfo file_0 67 10 72 26. - Definition loc_116 : location_info := LocationInfo file_0 67 10 72 26. - Definition loc_117 : location_info := LocationInfo file_0 67 13 72 11. - Definition loc_118 : location_info := LocationInfo file_0 67 15 67 19. - Definition loc_119 : location_info := LocationInfo file_0 67 19 68 14. - Definition loc_121 : location_info := LocationInfo file_0 68 10 68 14. - Definition loc_122 : location_info := LocationInfo file_0 68 14 69 14. - Definition loc_124 : location_info := LocationInfo file_0 69 10 69 14. - Definition loc_125 : location_info := LocationInfo file_0 69 14 70 14. - Definition loc_127 : location_info := LocationInfo file_0 70 10 70 14. - Definition loc_128 : location_info := LocationInfo file_0 71 12 71 16. - Definition loc_129 : location_info := LocationInfo file_0 67 10 72 26. - Definition loc_130 : location_info := LocationInfo file_0 67 10 72 26. - Definition loc_131 : location_info := LocationInfo file_0 71 14 71 15. - Definition loc_132 : location_info := LocationInfo file_0 71 12 71 15. - Definition loc_133 : location_info := LocationInfo file_0 71 14 71 15. - Definition loc_134 : location_info := LocationInfo file_0 71 14 71 15. - Definition loc_136 : location_info := LocationInfo file_0 70 10 70 11. - Definition loc_137 : location_info := LocationInfo file_0 69 10 69 11. - Definition loc_138 : location_info := LocationInfo file_0 68 10 68 11. - Definition loc_139 : location_info := LocationInfo file_0 67 15 67 16. - Definition loc_140 : location_info := LocationInfo file_0 72 19 72 24. - Definition loc_141 : location_info := LocationInfo file_0 72 19 72 20. - Definition loc_142 : location_info := LocationInfo file_0 72 19 72 20. - Definition loc_143 : location_info := LocationInfo file_0 72 23 72 24. - Definition loc_144 : location_info := LocationInfo file_0 62 10 62 15. - Definition loc_145 : location_info := LocationInfo file_0 62 10 62 11. - Definition loc_146 : location_info := LocationInfo file_0 62 10 62 11. - Definition loc_147 : location_info := LocationInfo file_0 62 14 62 15. - Definition loc_148 : location_info := LocationInfo file_0 61 10 61 21. - Definition loc_149 : location_info := LocationInfo file_0 61 10 61 17. - Definition loc_150 : location_info := LocationInfo file_0 61 11 61 12. - Definition loc_151 : location_info := LocationInfo file_0 61 11 61 12. - Definition loc_152 : location_info := LocationInfo file_0 61 15 61 16. - Definition loc_153 : location_info := LocationInfo file_0 61 20 61 21. - Definition loc_156 : location_info := LocationInfo file_0 59 10 59 11. - - (* Definition of function [test_switch]. *) - Definition impl_test_switch : function := {| - f_args := [ - ("i", it_layout i32) - ]; - f_local_vars := [ - ("o", it_layout i32) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "o" <-{ it_layout i32 } - LocInfoE loc_26 (use{it_layout i32} (LocInfoE loc_27 ("i"))) ; - locinfo: loc_3 ; - Switch i32 - (LocInfoE loc_24 (use{it_layout i32} (LocInfoE loc_25 ("i")))) - ( - <[ 0 := 0%nat ]> $ - <[ 1 := 1%nat ]> $ - <[ 2 := 2%nat ]> $ - <[ 3 := 3%nat ]> ∅ - ) - ( - (locinfo: loc_8 ; - Goto "#2") :: - (locinfo: loc_11 ; - Goto "#3") :: - (locinfo: loc_14 ; - Goto "#4") :: - (locinfo: loc_17 ; - Goto "#5") :: [] - ) - (locinfo: loc_4 ; - Goto "#1") - ]> $ - <[ "#1" := - locinfo: loc_4 ; - Return (LocInfoE loc_5 (use{it_layout i32} (LocInfoE loc_6 ("o")))) - ]> $ - <[ "#2" := - locinfo: loc_10 ; - LocInfoE loc_23 ("o") <-{ it_layout i32 } - LocInfoE loc_10 ((LocInfoE loc_10 (use{it_layout i32} (LocInfoE loc_23 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_10 (i2v 1 i32))) ; - locinfo: loc_11 ; - Goto "#3" - ]> $ - <[ "#3" := - locinfo: loc_13 ; - LocInfoE loc_22 ("o") <-{ it_layout i32 } - LocInfoE loc_13 ((LocInfoE loc_13 (use{it_layout i32} (LocInfoE loc_22 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_13 (i2v 1 i32))) ; - locinfo: loc_14 ; - Goto "#4" - ]> $ - <[ "#4" := - locinfo: loc_16 ; - LocInfoE loc_21 ("o") <-{ it_layout i32 } - LocInfoE loc_16 ((LocInfoE loc_16 (use{it_layout i32} (LocInfoE loc_21 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_16 (i2v 1 i32))) ; - locinfo: loc_17 ; - Goto "#5" - ]> $ - <[ "#5" := - locinfo: loc_19 ; - LocInfoE loc_20 ("o") <-{ it_layout i32 } - LocInfoE loc_19 ((LocInfoE loc_19 (use{it_layout i32} (LocInfoE loc_20 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_19 (i2v 1 i32))) ; - locinfo: loc_4 ; - Goto "#1" - ]> $ - <[ "#6" := - locinfo: loc_4 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [test_switch_default]. *) - Definition impl_test_switch_default : function := {| - f_args := [ - ("i", it_layout i32) - ]; - f_local_vars := [ - ("o", it_layout i32) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "o" <-{ it_layout i32 } - LocInfoE loc_60 (use{it_layout i32} (LocInfoE loc_61 ("i"))) ; - locinfo: loc_33 ; - Switch i32 - (LocInfoE loc_58 (use{it_layout i32} (LocInfoE loc_59 ("i")))) - ( - <[ 0 := 0%nat ]> $ - <[ 1 := 1%nat ]> $ - <[ 2 := 2%nat ]> $ - <[ 3 := 3%nat ]> ∅ - ) - ( - (locinfo: loc_38 ; - Goto "#2") :: - (locinfo: loc_41 ; - Goto "#3") :: - (locinfo: loc_44 ; - Goto "#4") :: - (locinfo: loc_47 ; - Goto "#5") :: [] - ) - (locinfo: loc_50 ; - Goto "#6") - ]> $ - <[ "#1" := - locinfo: loc_34 ; - Return (LocInfoE loc_35 (use{it_layout i32} (LocInfoE loc_36 ("o")))) - ]> $ - <[ "#2" := - locinfo: loc_40 ; - LocInfoE loc_57 ("o") <-{ it_layout i32 } - LocInfoE loc_40 ((LocInfoE loc_40 (use{it_layout i32} (LocInfoE loc_57 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_40 (i2v 1 i32))) ; - locinfo: loc_41 ; - Goto "#3" - ]> $ - <[ "#3" := - locinfo: loc_43 ; - LocInfoE loc_56 ("o") <-{ it_layout i32 } - LocInfoE loc_43 ((LocInfoE loc_43 (use{it_layout i32} (LocInfoE loc_56 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_43 (i2v 1 i32))) ; - locinfo: loc_44 ; - Goto "#4" - ]> $ - <[ "#4" := - locinfo: loc_46 ; - LocInfoE loc_55 ("o") <-{ it_layout i32 } - LocInfoE loc_46 ((LocInfoE loc_46 (use{it_layout i32} (LocInfoE loc_55 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_46 (i2v 1 i32))) ; - locinfo: loc_47 ; - Goto "#5" - ]> $ - <[ "#5" := - locinfo: loc_49 ; - LocInfoE loc_54 ("o") <-{ it_layout i32 } - LocInfoE loc_49 ((LocInfoE loc_49 (use{it_layout i32} (LocInfoE loc_54 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_49 (i2v 1 i32))) ; - locinfo: loc_50 ; - Goto "#6" - ]> $ - <[ "#6" := - locinfo: loc_52 ; - LocInfoE loc_53 ("o") <-{ it_layout i32 } - LocInfoE loc_52 ((LocInfoE loc_52 (use{it_layout i32} (LocInfoE loc_53 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_52 (i2v 1 i32))) ; - locinfo: loc_34 ; - Goto "#1" - ]> $ - <[ "#7" := - locinfo: loc_34 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [incr_less_than_5]. *) - Definition impl_incr_less_than_5 : function := {| - f_args := [ - ("i", it_layout i32) - ]; - f_local_vars := [ - ("o", it_layout i32) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "o" <-{ it_layout i32 } - LocInfoE loc_99 (use{it_layout i32} (LocInfoE loc_100 ("i"))) ; - locinfo: loc_67 ; - Switch i32 - (LocInfoE loc_97 (use{it_layout i32} (LocInfoE loc_98 ("i")))) - ( - <[ 0 := 0%nat ]> $ - <[ 1 := 1%nat ]> $ - <[ 2 := 2%nat ]> $ - <[ 3 := 3%nat ]> $ - <[ 4 := 4%nat ]> ∅ - ) - ( - (locinfo: loc_72 ; - Goto "#2") :: - (locinfo: loc_76 ; - Goto "#3") :: - (locinfo: loc_80 ; - Goto "#4") :: - (locinfo: loc_84 ; - Goto "#5") :: - (locinfo: loc_88 ; - Goto "#6") :: [] - ) - (locinfo: loc_68 ; - Goto "#1") - ]> $ - <[ "#1" := - locinfo: loc_68 ; - Return (LocInfoE loc_69 (use{it_layout i32} (LocInfoE loc_70 ("o")))) - ]> $ - <[ "#2" := - locinfo: loc_74 ; - LocInfoE loc_96 ("o") <-{ it_layout i32 } - LocInfoE loc_74 ((LocInfoE loc_74 (use{it_layout i32} (LocInfoE loc_96 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_74 (i2v 1 i32))) ; - locinfo: loc_68 ; - Goto "#1" - ]> $ - <[ "#3" := - locinfo: loc_78 ; - LocInfoE loc_95 ("o") <-{ it_layout i32 } - LocInfoE loc_78 ((LocInfoE loc_78 (use{it_layout i32} (LocInfoE loc_95 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_78 (i2v 1 i32))) ; - locinfo: loc_68 ; - Goto "#1" - ]> $ - <[ "#4" := - locinfo: loc_82 ; - LocInfoE loc_94 ("o") <-{ it_layout i32 } - LocInfoE loc_82 ((LocInfoE loc_82 (use{it_layout i32} (LocInfoE loc_94 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_82 (i2v 1 i32))) ; - locinfo: loc_68 ; - Goto "#1" - ]> $ - <[ "#5" := - locinfo: loc_86 ; - LocInfoE loc_93 ("o") <-{ it_layout i32 } - LocInfoE loc_86 ((LocInfoE loc_86 (use{it_layout i32} (LocInfoE loc_93 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_86 (i2v 1 i32))) ; - locinfo: loc_68 ; - Goto "#1" - ]> $ - <[ "#6" := - locinfo: loc_90 ; - LocInfoE loc_92 ("o") <-{ it_layout i32 } - LocInfoE loc_90 ((LocInfoE loc_90 (use{it_layout i32} (LocInfoE loc_92 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_90 (i2v 1 i32))) ; - locinfo: loc_68 ; - Goto "#1" - ]> $ - <[ "#7" := - locinfo: loc_68 ; - Goto "#1" - ]> $∅ - )%E - |}. - - (* Definition of function [duffs_identity]. *) - Definition impl_duffs_identity : function := {| - f_args := [ - ("i", it_layout i32) - ]; - f_local_vars := [ - ("o", it_layout i32); - ("n", it_layout i32) - ]; - f_init := "#0"; - f_code := ( - <[ "#0" := - "o" <-{ it_layout i32 } LocInfoE loc_156 (i2v 0 i32) ; - "n" <-{ it_layout i32 } - LocInfoE loc_148 ((LocInfoE loc_149 ((LocInfoE loc_150 (use{it_layout i32} (LocInfoE loc_151 ("i")))) +{IntOp i32, IntOp i32} (LocInfoE loc_152 (i2v 3 i32)))) /{IntOp i32, IntOp i32} (LocInfoE loc_153 (i2v 4 i32))) ; - locinfo: loc_107 ; - Switch i32 - (LocInfoE loc_144 ((LocInfoE loc_145 (use{it_layout i32} (LocInfoE loc_146 ("i")))) %{IntOp i32, IntOp i32} (LocInfoE loc_147 (i2v 4 i32)))) - ( - <[ 0 := 0%nat ]> $ - <[ 3 := 1%nat ]> $ - <[ 2 := 2%nat ]> $ - <[ 1 := 3%nat ]> ∅ - ) - ( - (locinfo: loc_112 ; - Goto "#2") :: - (locinfo: loc_119 ; - Goto "#3") :: - (locinfo: loc_122 ; - Goto "#4") :: - (locinfo: loc_125 ; - Goto "#8") :: [] - ) - (locinfo: loc_108 ; - Goto "#1") - ]> $ - <[ "#1" := - locinfo: loc_108 ; - Return (LocInfoE loc_109 (use{it_layout i32} (LocInfoE loc_110 ("o")))) - ]> $ - <[ "#2" := - locinfo: loc_114 ; - Goto "#6" - ]> $ - <[ "#3" := - locinfo: loc_121 ; - LocInfoE loc_138 ("o") <-{ it_layout i32 } - LocInfoE loc_121 ((LocInfoE loc_121 (use{it_layout i32} (LocInfoE loc_138 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_121 (i2v 1 i32))) ; - locinfo: loc_122 ; - Goto "#4" - ]> $ - <[ "#4" := - locinfo: loc_124 ; - LocInfoE loc_137 ("o") <-{ it_layout i32 } - LocInfoE loc_124 ((LocInfoE loc_124 (use{it_layout i32} (LocInfoE loc_137 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_124 (i2v 1 i32))) ; - locinfo: loc_125 ; - Goto "#8" - ]> $ - <[ "#5" := - locinfo: loc_140 ; - if: LocInfoE loc_140 (UnOp (CastOp $ IntOp bool_it) (IntOp i32) (LocInfoE loc_140 ((LocInfoE loc_141 (use{it_layout i32} (LocInfoE loc_142 ("n")))) >{IntOp i32, IntOp i32} (LocInfoE loc_143 (i2v 0 i32))))) - then - locinfo: loc_114 ; - Goto "#6" - else - locinfo: loc_108 ; - Goto "#7" - ]> $ - <[ "#6" := - locinfo: loc_118 ; - LocInfoE loc_139 ("o") <-{ it_layout i32 } - LocInfoE loc_118 ((LocInfoE loc_118 (use{it_layout i32} (LocInfoE loc_139 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_118 (i2v 1 i32))) ; - locinfo: loc_119 ; - Goto "#3" - ]> $ - <[ "#7" := - locinfo: loc_108 ; - Goto "#1" - ]> $ - <[ "#8" := - locinfo: loc_127 ; - LocInfoE loc_136 ("o") <-{ it_layout i32 } - LocInfoE loc_127 ((LocInfoE loc_127 (use{it_layout i32} (LocInfoE loc_136 ("o")))) +{IntOp i32, IntOp i32} (LocInfoE loc_127 (i2v 1 i32))) ; - locinfo: loc_128 ; - LocInfoE loc_131 ("n") <-{ it_layout i32 } - LocInfoE loc_132 ((LocInfoE loc_133 (use{it_layout i32} (LocInfoE loc_134 ("n")))) -{IntOp i32, IntOp i32} (i2v 1 i32)) ; - locinfo: loc_129 ; - Goto "continue12" - ]> $ - <[ "#9" := - locinfo: loc_108 ; - Goto "#1" - ]> $ - <[ "continue12" := - Goto "#5" - ]> $∅ - )%E - |}. -End code. diff --git a/theories/examples/tutorial/t9_switch_proof_duffs_identity.v b/theories/examples/tutorial/t9_switch_proof_duffs_identity.v deleted file mode 100644 index 15d9d51510d561c607dbad759404c3d2d95b18e3..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t9_switch_proof_duffs_identity.v +++ /dev/null @@ -1,34 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t9_switch_code. -From refinedc.examples.tutorial Require Import t9_switch_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t9_switch.c]. *) -Section proof_duffs_identity. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [duffs_identity]. *) - Lemma type_duffs_identity : - ⊢ typed_function impl_duffs_identity type_of_duffs_identity. - Proof. - start_function "duffs_identity" (i) => arg_i local_o local_n. - split_blocks (( - <[ "#5" := - ∃ n : Z, - arg_i â—â‚— (i @ (int (i32))) ∗ - local_n â—â‚— (n @ (int (i32))) ∗ - local_o â—â‚— ((i - 4 * n) @ (int (i32))) ∗ - ⌜0 ≤ n⌠- ]> $ - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "duffs_identity" "#0". - - repeat liRStep; liShow. - all: print_typesystem_goal "duffs_identity" "#5". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "duffs_identity". - Qed. -End proof_duffs_identity. diff --git a/theories/examples/tutorial/t9_switch_proof_incr_less_than_5.v b/theories/examples/tutorial/t9_switch_proof_incr_less_than_5.v deleted file mode 100644 index 5444ea1ea0bf5fe5b986f13443799e7fe5ddfa2b..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t9_switch_proof_incr_less_than_5.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t9_switch_code. -From refinedc.examples.tutorial Require Import t9_switch_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t9_switch.c]. *) -Section proof_incr_less_than_5. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [incr_less_than_5]. *) - Lemma type_incr_less_than_5 : - ⊢ typed_function impl_incr_less_than_5 type_of_incr_less_than_5. - Proof. - start_function "incr_less_than_5" (i) => arg_i local_o. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "incr_less_than_5" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "incr_less_than_5". - Qed. -End proof_incr_less_than_5. diff --git a/theories/examples/tutorial/t9_switch_proof_test_switch.v b/theories/examples/tutorial/t9_switch_proof_test_switch.v deleted file mode 100644 index 0a0ec263a6836cee11920740f9bfece95e679188..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t9_switch_proof_test_switch.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t9_switch_code. -From refinedc.examples.tutorial Require Import t9_switch_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t9_switch.c]. *) -Section proof_test_switch. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [test_switch]. *) - Lemma type_test_switch : - ⊢ typed_function impl_test_switch type_of_test_switch. - Proof. - start_function "test_switch" (i) => arg_i local_o. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "test_switch" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "test_switch". - Qed. -End proof_test_switch. diff --git a/theories/examples/tutorial/t9_switch_proof_test_switch_default.v b/theories/examples/tutorial/t9_switch_proof_test_switch_default.v deleted file mode 100644 index d6ab44d1f64ac819b8eb96bfaefdcce0ade3d3e1..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t9_switch_proof_test_switch_default.v +++ /dev/null @@ -1,25 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t9_switch_code. -From refinedc.examples.tutorial Require Import t9_switch_spec. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t9_switch.c]. *) -Section proof_test_switch_default. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Typing proof for [test_switch_default]. *) - Lemma type_test_switch_default : - ⊢ typed_function impl_test_switch_default type_of_test_switch_default. - Proof. - start_function "test_switch_default" (i) => arg_i local_o. - split_blocks (( - ∅ - )%I : gmap block_id (iProp Σ)) (( - ∅ - )%I : gmap block_id (iProp Σ)). - - repeat liRStep; liShow. - all: print_typesystem_goal "test_switch_default" "#0". - Unshelve. all: prepare_sideconditions; normalize_and_simpl_goal; try solve_goal. - all: print_sidecondition_goal "test_switch_default". - Qed. -End proof_test_switch_default. diff --git a/theories/examples/tutorial/t9_switch_spec.v b/theories/examples/tutorial/t9_switch_spec.v deleted file mode 100644 index 5e0dd9b219ca6b68cce9eba96e53e709c51fb144..0000000000000000000000000000000000000000 --- a/theories/examples/tutorial/t9_switch_spec.v +++ /dev/null @@ -1,30 +0,0 @@ -From refinedc.typing Require Import typing. -From refinedc.examples.tutorial Require Import t9_switch_code. -Set Default Proof Using "Type". - -(* Generated from [theories/examples/tutorial/t9_switch.c]. *) -Section spec. - Context `{!typeG Σ} `{!globalG Σ}. - - (* Type definitions. *) - - (* Specifications for function [test_switch]. *) - Definition type_of_test_switch := - fn(∀ i : nat; (i @ (int (i32))); True) - → ∃ () : (), ((if bool_decide (i ≤ 4)%nat then 4%nat else i) @ (int (i32))); True. - - (* Specifications for function [test_switch_default]. *) - Definition type_of_test_switch_default := - fn(∀ i : nat; (i @ (int (i32))); ⌜i + 1 < it_max i32âŒ) - → ∃ () : (), (((if bool_decide (i ≤ 4) then 5 else i + 1)%nat) @ (int (i32))); True. - - (* Specifications for function [incr_less_than_5]. *) - Definition type_of_incr_less_than_5 := - fn(∀ i : nat; (i @ (int (i32))); True) - → ∃ () : (), (((if bool_decide (i ≤ 4) then i + 1 else i)%nat) @ (int (i32))); True. - - (* Specifications for function [duffs_identity]. *) - Definition type_of_duffs_identity := - fn(∀ i : Z; (i @ (int (i32))); ⌜0 < i⌠∗ ⌜i + 3 < it_max i32âŒ) - → ∃ () : (), (i @ (int (i32))); True. -End spec. diff --git a/theories/examples/tutorial/alloc_internal.h b/tutorial/alloc_internal.h similarity index 100% rename from theories/examples/tutorial/alloc_internal.h rename to tutorial/alloc_internal.h diff --git a/theories/examples/tutorial/binary_search_defs.v b/tutorial/binary_search_defs.v similarity index 100% rename from theories/examples/tutorial/binary_search_defs.v rename to tutorial/binary_search_defs.v diff --git a/theories/examples/tutorial/exercises/quicksort.c b/tutorial/exercises/quicksort.c similarity index 100% rename from theories/examples/tutorial/exercises/quicksort.c rename to tutorial/exercises/quicksort.c diff --git a/theories/examples/tutorial/list.h b/tutorial/list.h similarity index 100% rename from theories/examples/tutorial/list.h rename to tutorial/list.h diff --git a/theories/examples/tutorial/misc.c b/tutorial/misc.c similarity index 100% rename from theories/examples/tutorial/misc.c rename to tutorial/misc.c diff --git a/theories/examples/tutorial/solutions/quicksort.c b/tutorial/solutions/quicksort.c similarity index 100% rename from theories/examples/tutorial/solutions/quicksort.c rename to tutorial/solutions/quicksort.c diff --git a/theories/examples/tutorial/t0_intro.c b/tutorial/t0_intro.c similarity index 100% rename from theories/examples/tutorial/t0_intro.c rename to tutorial/t0_intro.c diff --git a/theories/examples/tutorial/t10_loops.c b/tutorial/t10_loops.c similarity index 100% rename from theories/examples/tutorial/t10_loops.c rename to tutorial/t10_loops.c diff --git a/theories/examples/tutorial/t11_tree_set.c b/tutorial/t11_tree_set.c similarity index 100% rename from theories/examples/tutorial/t11_tree_set.c rename to tutorial/t11_tree_set.c diff --git a/theories/examples/tutorial/t1_basic.c b/tutorial/t1_basic.c similarity index 100% rename from theories/examples/tutorial/t1_basic.c rename to tutorial/t1_basic.c diff --git a/theories/examples/tutorial/t2_pointers.c b/tutorial/t2_pointers.c similarity index 100% rename from theories/examples/tutorial/t2_pointers.c rename to tutorial/t2_pointers.c diff --git a/theories/examples/tutorial/t3_list.c b/tutorial/t3_list.c similarity index 100% rename from theories/examples/tutorial/t3_list.c rename to tutorial/t3_list.c diff --git a/theories/examples/tutorial/t4_alloc.c b/tutorial/t4_alloc.c similarity index 100% rename from theories/examples/tutorial/t4_alloc.c rename to tutorial/t4_alloc.c diff --git a/theories/examples/tutorial/t5_main.c b/tutorial/t5_main.c similarity index 100% rename from theories/examples/tutorial/t5_main.c rename to tutorial/t5_main.c diff --git a/theories/examples/tutorial/t6_struct.c b/tutorial/t6_struct.c similarity index 100% rename from theories/examples/tutorial/t6_struct.c rename to tutorial/t6_struct.c diff --git a/theories/examples/tutorial/t7_arrays.c b/tutorial/t7_arrays.c similarity index 100% rename from theories/examples/tutorial/t7_arrays.c rename to tutorial/t7_arrays.c diff --git a/theories/examples/tutorial/t7_arrays_extra.v b/tutorial/t7_arrays_extra.v similarity index 100% rename from theories/examples/tutorial/t7_arrays_extra.v rename to tutorial/t7_arrays_extra.v diff --git a/theories/examples/tutorial/t8_tree.c b/tutorial/t8_tree.c similarity index 100% rename from theories/examples/tutorial/t8_tree.c rename to tutorial/t8_tree.c diff --git a/theories/examples/tutorial/t8_tree_extra.v b/tutorial/t8_tree_extra.v similarity index 100% rename from theories/examples/tutorial/t8_tree_extra.v rename to tutorial/t8_tree_extra.v diff --git a/theories/examples/tutorial/t9_switch.c b/tutorial/t9_switch.c similarity index 100% rename from theories/examples/tutorial/t9_switch.c rename to tutorial/t9_switch.c diff --git a/theories/examples/tutorial/t_adequacy.v b/tutorial/t_adequacy.v similarity index 100% rename from theories/examples/tutorial/t_adequacy.v rename to tutorial/t_adequacy.v