forked from team-checkr/fsharp-starter
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathInterpreter.fs
More file actions
33 lines (26 loc) · 743 Bytes
/
Interpreter.fs
File metadata and controls
33 lines (26 loc) · 743 Bytes
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
module Interpreter
open Types
(*
This defines the input and output for the interpreter. Please do not
change the definitions below as they are needed for the validation and
evaluation tools!
*)
type InterpreterMemory =
{ variables: Map<string, int>
arrays: Map<string, List<int>> }
type Input =
{ determinism: Determinism
assignment: InterpreterMemory
trace_size: int }
type ProgramState =
| Running
| Stuck
| Terminated
type ProgramTrace =
{ node: string
state: ProgramState
memory: InterpreterMemory }
type Output = List<ProgramTrace>
// Start you implementation here
let analysis (src: string) (input: Input) : Output =
failwith "Interpreter not yet implemented"