module type VAR_WITHOUT_IMG = sig
.. end
This module type is the signature of the typevars without
the image operations. The type is used by the MapVar
Module
to modify the interface to the image. There the two functions
allowing the modifications of the image are hidden.
The image of the vars are the from type img. Solving the constraints
means maps variables to values in a way, that the constraints are
satisfied.
type
obs
type of the observer
type
t
Type variables are instances of this type
val create : unit -> t
create a new uniquie type variable
val compare : t -> t -> int
compare type variables. It looks if you have added aliases, and
if so, the two type variable are equal.
val total_ord : t -> t -> int
compare type variables. It do not look
if you have added aliases!
val add_alias : t -> t -> unit
make two variables equal
val do_normalize : t -> unit
This function is called by observers every time something
with the image of the variable changes. The variable should
then call the normalize function of the image to ensure that
the assignment is up to date.
val add_observer : obs -> t -> unit
add a new observer
val remove_observer : obs -> t -> unit
remove a observer
val string_of : t -> string
converts a variable to a string
val reset : unit -> unit
Resets the internal counter that allows to differ
variables from each other. Do not call this function
exept for testing. If you use it, you will use the
invariant, that two variables are different if you
create two with the create function.
val get_all_ts : unit -> t list