-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexec-sig.sml
More file actions
33 lines (30 loc) · 1 KB
/
exec-sig.sml
File metadata and controls
33 lines (30 loc) · 1 KB
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
signature EXEC =
sig
val cleanupStream : ('a * 'b) Stream.stream -> 'a Stream.stream
val println : string -> unit
val errorMessage : exn -> string
val printerror : exn -> unit
val readFile : string -> Parse.C1P.result
val go : string -> MADeBruijn.cmd
val expToInt : MADeBruijn.exp -> int
val cmdToInt : MADeBruijn.cmd -> int
(* useful for testing
* -parses the contents of the specified file as a C1 program
* -verifies certain static properties
* -compiles it to MA
* -typechecks it
* -executes it to a final state of a nat cmd
* -prints the value of this nat cmd as an int
* -handles and pretty prints all exceptions
*)
val execProgram : string -> unit
(* useful for debugging
* -parses the contents of the specified file as a C1 program
* -verifies certain static properties
* -compiles it to MA
* -typechecks it
* -executes it to a final state of a nat cmd
* -returns the value of this nat cmd as an int
*)
val evalProgram : string -> int
end