Skip to content

Commit

Permalink
Fix machine-code compiler code in face of thm rebinding restrictions
Browse files Browse the repository at this point in the history
Fix is to explicitly allow rebinds when this code makes its
definitions and does its theorem-saving.
  • Loading branch information
mn200 committed Oct 10, 2023
1 parent 300c979 commit 10d9569
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/machine-code/decompiler/decompilerLib.sml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ struct
val (Type, Term) = parse_from_grammars addressTheory.address_grammars
end

val new_definition = Definition.new_definition (* not boolSyntax! *)
fun allow_rebinds f x = Feedback.trace ("Theory.allow_rebinds", 1) f x
val new_definition =
allow_rebinds Definition.new_definition (* not boolSyntax! *)
val save_thm = allow_rebinds save_thm


(* -------------------------------------------------------------------------- *)
(* Decompilation stages: *)
Expand Down
3 changes: 3 additions & 0 deletions examples/machine-code/hoare-triple/tailrecLib.sml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ struct
end

val tailrec_definitions = ref ([]:thm list);
fun allow_rebinds f x = Feedback.trace ("Theory.allow_rebinds", 1) f x
val new_definition = allow_rebinds new_definition
val save_thm = allow_rebinds save_thm

(* tactic, move to helperLib? *)

Expand Down

0 comments on commit 10d9569

Please sign in to comment.