File: test10st_codegen.thy

package info (click to toggle)
ott 0.34%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 6,440 kB
  • sloc: ml: 25,103; makefile: 1,375; awk: 736; lisp: 183; sh: 14; sed: 4
file content (41 lines) | stat: -rw-r--r-- 799 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
theory test10st_codegen 
imports test10st_snapshot_out Executable_Set
begin

ML "reset Codegen.quiet_mode"

(* Code generation for the test10st simply typed lambda calculus. *)

constdefs
 ta :: t
"ta == (t_App (t_Lam ''z'' (t_Var ''z''))) (t_Lam ''y'' (t_Var ''y''))"
;

code_module Test10st_codegen file "test10st_codegen.ml" contains 
(*is_v
tsubst_T
tsubst_t*)
reduce_ta  = "(ta,_):reduce"


(* ...to build and demo the resulting test10st_codegen.ml code...

Isabelle test10st_codegen.thy
...`use' that...

...in a shell...
isabelle
use "test10st_codegen.ml";
open Test10st_codegen;

...a test term...
ta;
val it = t_App (t_Lam (["z"], t_Var ["z"]), t_Lam (["y"], t_Var ["y"]))

...a sample reduction...
DSeq.hd(reducep__1 ta);
val it = t_Lam (["y"], t_Var ["y"]) : Test10st_codegen.t 

*)

end