mirror of
https://github.com/ProgramSnail/pass_strategy_synthesis.git
synced 2025-12-31 05:08:15 +00:00
semantic interpreter v1, semantic interpreter tests, fixes
This commit is contained in:
parent
1c74f0c3ef
commit
a2d4bb93e6
4 changed files with 350 additions and 4 deletions
15
lib/lib.ml
15
lib/lib.ml
|
|
@ -64,6 +64,19 @@ type l_prog = (l_fun_decl, l_body) a_prog ilogic
|
|||
|
||||
(* --- comments --- *)
|
||||
|
||||
(*
|
||||
f 0:
|
||||
WRITE(0)
|
||||
|
||||
f' 0:
|
||||
READ(0)
|
||||
|
||||
main:
|
||||
f(0)
|
||||
READ(0)
|
||||
|
||||
*)
|
||||
|
||||
(*
|
||||
>> ref | const ref | copy:
|
||||
|
||||
|
|
@ -90,7 +103,7 @@ call function with arg ref that modifies & write after any function call => !ref
|
|||
(* module Tree = struct *)
|
||||
(* ocanren type 'a tree = Leaf | Node of 'a * 'a tree * 'a tree *)
|
||||
|
||||
(* type inttree = GT.int tree [@@deriving gt ~options:{show}] *)
|
||||
(* type int tree = GT.int tree [@@deriving gt ~options:{show}] *)
|
||||
(* A shortcut for "ground" tree we're going to work with in "functional" code *)
|
||||
(* type rtree = Std.Nat.ground tree [@@deriving gt ~options:{show}] *)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue