diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-07-12 10:07:23 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-07-12 17:56:10 -0300 |
| commit | e56efc19f71898d798c44b5955fe74451ee0fc6f (patch) | |
| tree | 017f20b42fe55662791ead46344893e5d1bf6426 /lib/world.ml | |
| parent | e92c8e00290bab8db328058c437b471c0f1671a4 (diff) | |
| download | SOL-e56efc19f71898d798c44b5955fe74451ee0fc6f.tar.gz SOL-e56efc19f71898d798c44b5955fe74451ee0fc6f.zip | |
lexicographic order proven well founded, checker extracted and verifying admission
Diffstat (limited to '')
| -rw-r--r-- | lib/world.ml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/world.ml b/lib/world.ml index 8ade9da..a053c2c 100644 --- a/lib/world.ml +++ b/lib/world.ml @@ -586,6 +586,27 @@ module Standalone = struct in match lex_measure calls candidates with | None -> Error (Non_total_component members) + | Some measure + when + (* The search is an untrusted heuristic; the + measure it found is validated call by call with + the lexicographic checker extracted from Rocq, + whose soundness and well-foundedness are + proven. *) + not + (List.for_all + (fun c -> + let project bindings = + List.map + (fun label -> + Pattern.to_checker (Label.Map.find label bindings)) + measure + in + Decrease_extracted.lex_ltb Label.equal + Pattern.checker_leaf_equal (project c.args) + (project c.head)) + calls) -> + Error (Non_total_component members) | Some measure -> Ok (List.fold_left |
