Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type binop = Add | Sub | Mul | Div
- type monop = UnaryMinus
- type promise={d:(data ref) option; ex:expr; gamma: env}
- and data =
- | Numeric of expr array (*num[n1,...nm]*)
- | String of expr array(*str[s1,...sm]*)
- | Gen of (data ref) array (*gen[nu1...num]*)
- | Closure of f list * expr * env (*\f1..\fn.e,G*)
- | PromiseD of promise
- and u=
- | Value of data
- | Promise of promise
- and expr =
- | Num of float (*n*)
- | Str of string (*s*)
- | Symbol of string
- | ArrayAccess of expr * expr (*x[[e]]*)
- | CompoundExpression of expr * expr (*{e;e}*)
- | FunctionDeclaration of f list * expr (*function(f1,..fn) e*)
- | Application of expr * a list (*x(a1,...an)*)
- | AssignExpression of expr * expr (*x<-e*)
- | ArrayAssignWithIndex of expr * expr * expr (*x[e]<-e*)
- | U of u ref (*u*)
- | PartialEvaluation of (data ref) * (a list) (*nu(a1,..an)*)
- (* | BinOp of binop * expr * expr
- | MonOp of monop * expr*)
- and f=
- | Identifier of string
- | AssignParam of string * expr
- and a=
- | Expr of expr
- | AssignArg of string * expr
- and frameElement=
- | PromiseF of promise
- | DataRef of (data ref)
- and frame = (expr, frameElement) Hashtbl.t
- and env= (frame ref) list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement