Module CfTypes

module CfTypes: sig .. end
Datatypes and Runtime Tools


Exceptions
exception Error of string
General runtime error exception.

Types
type variable 
type renv 

Runtime Error Reporting
val setLocation : Loc.loc -> unit
Sets current location and environment.
val setVariableDependence : variable -> variable list -> unit
Specifies a variable dependency.
val error : string -> unit
Reports an error with an instantiation trace.
val typeToString : variable -> string

Task Queue
val readyTask : renv * (unit -> unit) -> unit
Sends a task into the ready queue.
val executeTasks : unit -> unit
Executues tasks in queue.

Sync slots.
type slot 
val newSlot : renv -> int -> (unit -> unit) -> slot
Creates a new slot.
val sync : slot -> unit
Syncs a slot.
val incrSlot : slot -> unit
Increments slots counter.
val slotVariableStrict : slot -> variable -> unit
Slots a variable. Records must me complete.
val slotVariableLenient : slot -> variable -> unit
Slots a variable. Records may be incomplete.
val unify : variable -> variable -> unit
Unifies two variables.
val isEqual : renv ->
variable -> variable -> variable -> unit
Compares two variables.

Free Values
val newFree : unit -> variable
Creates a new free variable.
val newFreeLoc : Loc.loc -> string -> renv -> variable
Creates a new free variable with a location.
val newFreeWithTask : renv -> (variable -> unit) -> variable
Assigns a slot of a new free variable.

Integers
val newInteger : Intbig.intbig -> variable
val isInteger : variable -> bool
val getInteger : variable -> Intbig.intbig
val getInt : variable -> int

Floats
val newFloat : float -> variable
val isFloat : variable -> bool
val getFloat : variable -> float

Booleans
val newBoolean : bool -> variable
val isBoolean : variable -> bool
val getBoolean : variable -> bool

Vectors
val zero_width_vector : variable
val is_zero_width_vector : variable -> bool
val checkBits : string -> unit
val newVector : Cf_fnf.producer -> variable
val newVectorConst : Intbig.intbig -> Intbig.intbig -> Cf_fnf.system -> variable
val isVector : variable -> bool
val getWidth : variable -> int
val getProducer : variable -> Cf_fnf.producer
val checkWidth : variable -> unit
val checkWidthNotZero : variable -> unit
val checkWidthIs : variable -> int -> unit
val checkWidthsAreSame : variable -> variable -> unit

Properties
val isProperty : variable -> bool
val newPropertyVector : variable -> variable
val newPropertyNot : variable -> variable
val newPropertyOr : variable -> variable -> variable
val newPropertyNext : variable -> variable
val newPropertyUntil : variable -> variable -> variable

Records
val newRecord : int -> string array -> variable array -> variable
val isRecord : variable -> bool
val recordInfo : variable -> variable
val getFieldByName : variable -> string -> variable
val getFieldByIndex : variable -> int -> variable

Lists
val isList : variable -> bool
val listToString : variable -> string
val stringToList : string -> variable
val listToIntegerList : variable -> Intbig.intbig list
val listToIntList : variable -> int list

Components
val newComp : renv * Loc.loc * int * string * string array * (renv -> unit) ->
variable
val isComp : variable -> bool
val getCompInfo : variable ->
renv * Loc.loc * int * string * string array * (renv -> unit)

Systems
val newSystem : renv -> variable
val isSystem : variable -> bool
val getRenv : variable -> renv
val getPorts : variable -> variable

Runtime environment (renv).
val getEnvId : renv -> Cf_fnf.system
val newEnvRoot : unit -> renv
val extendEnv : renv ->
Loc.loc ->
renv * Loc.loc * int * string * string array * 'a ->
string -> renv
val getRelativeEnv : renv -> int -> renv
val getRenvValues : renv -> variable array

Check all ports determined.
val checkAllPortsDetermined : unit -> unit