author | huffman |
Fri, 02 Sep 2011 20:58:31 -0700 | |
changeset 44678 | 21eb31192850 |
parent 43317 | f9283eb3a4bf |
child 47108 | 2a1953f0d20d |
permissions | -rw-r--r-- |
31378 | 1 |
|
2 |
(* Author: Florian Haftmann, TU Muenchen *) |
|
24195 | 3 |
|
31378 | 4 |
header {* Pervasive test of code generator using pretty literals *} |
24195 | 5 |
|
37695
71e84a203c19
introduced distinct session HOL-Codegenerator_Test
haftmann
parents:
37475
diff
changeset
|
6 |
theory Generate_Pretty |
71e84a203c19
introduced distinct session HOL-Codegenerator_Test
haftmann
parents:
37475
diff
changeset
|
7 |
imports Candidates_Pretty |
24195 | 8 |
begin |
9 |
||
37695
71e84a203c19
introduced distinct session HOL-Codegenerator_Test
haftmann
parents:
37475
diff
changeset
|
10 |
lemma [code, code del]: "nat_of_char = nat_of_char" .. |
71e84a203c19
introduced distinct session HOL-Codegenerator_Test
haftmann
parents:
37475
diff
changeset
|
11 |
lemma [code, code del]: "char_of_nat = char_of_nat" .. |
71e84a203c19
introduced distinct session HOL-Codegenerator_Test
haftmann
parents:
37475
diff
changeset
|
12 |
|
43317 | 13 |
declare Quickcheck_Narrowing.zero_code_int_code[code del] |
14 |
declare Quickcheck_Narrowing.one_code_int_code[code del] |
|
15 |
declare Quickcheck_Narrowing.int_of_code[code del] |
|
16 |
||
37745
6315b6426200
checking generated code for various target languages
haftmann
parents:
37695
diff
changeset
|
17 |
subsection {* Check whether generated code compiles *} |
6315b6426200
checking generated code for various target languages
haftmann
parents:
37695
diff
changeset
|
18 |
|
6315b6426200
checking generated code for various target languages
haftmann
parents:
37695
diff
changeset
|
19 |
text {* |
37824 | 20 |
If any of the checks fails, inspect the code generated |
21 |
by a corresponding @{text export_code} command. |
|
37745
6315b6426200
checking generated code for various target languages
haftmann
parents:
37695
diff
changeset
|
22 |
*} |
6315b6426200
checking generated code for various target languages
haftmann
parents:
37695
diff
changeset
|
23 |
|
40711
81bc73585eec
globbing constant expressions use more idiomatic underscore rather than star
haftmann
parents:
37825
diff
changeset
|
24 |
export_code _ checking SML OCaml? Haskell? Scala? |
25616 | 25 |
|
24195 | 26 |
end |