-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1002 from CakeML/to_data_cv
In-logic compilation updated to use cv compute
- Loading branch information
Showing
146 changed files
with
5,608 additions
and
1,620 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
(* | ||
Translation of basis types and functions for use with cv_compute. | ||
*) | ||
open preamble cv_transLib cv_stdTheory; | ||
|
||
val _ = new_theory "basis_cv"; | ||
|
||
val _ = cv_memLib.use_long_names := true; | ||
|
||
Triviality list_mem[cv_inline] = listTheory.MEM; | ||
|
||
val _ = cv_trans sptreeTheory.fromAList_def; | ||
val _ = cv_trans miscTheory.SmartAppend_def; | ||
val _ = cv_trans miscTheory.append_aux_def; | ||
val _ = cv_trans miscTheory.append_def; | ||
val _ = cv_trans miscTheory.tlookup_def; | ||
val _ = cv_trans mlstringTheory.implode_def; | ||
val _ = cv_trans mlstringTheory.explode_thm; | ||
val _ = cv_trans mlstringTheory.strcat_thm; | ||
val _ = cv_trans mlstringTheory.str_def; | ||
val _ = cv_auto_trans mlstringTheory.concat_def; | ||
val _ = cv_trans miscTheory.list_max_def; | ||
val _ = cv_trans (miscTheory.max3_def |> PURE_REWRITE_RULE [GREATER_DEF]); | ||
|
||
val toChar_pre = cv_trans_pre mlintTheory.toChar_def | ||
val num_to_chars_pre = cv_auto_trans_pre mlintTheory.num_to_chars_def; | ||
|
||
Theorem IMP_toChar_pre: | ||
n < 16 ⇒ mlint_toChar_pre n | ||
Proof | ||
gvs [toChar_pre] | ||
QED | ||
|
||
Theorem num_to_chars_pre[cv_pre,local]: | ||
∀a0 a1 a2 a3. mlint_num_to_chars_pre a0 a1 a2 a3 | ||
Proof | ||
ho_match_mp_tac mlintTheory.num_to_chars_ind \\ rw [] | ||
\\ rw [] \\ simp [Once num_to_chars_pre] | ||
\\ once_rewrite_tac [toChar_pre] \\ gvs [] \\ rw [] | ||
\\ ‘k MOD 10 < 10’ by gvs [] \\ simp [] | ||
QED | ||
|
||
Triviality Num_ABS: | ||
Num (ABS i) = Num i | ||
Proof | ||
Cases_on ‘i’ \\ gvs [] | ||
QED | ||
|
||
val _ = cv_trans (mlintTheory.toString_def |> SRULE [Num_ABS]); | ||
val _ = cv_trans mlintTheory.num_to_str_def; | ||
|
||
val _ = Feedback.set_trace "TheoryPP.include_docs" 0; | ||
val _ = export_theory(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.