Module Tools

module Tools: sig .. end
Tools to be used in the project.


Usefull modules.


module IMap: Map.S  with type key = int
Implementation of maps with integer keys.
module ISet: Set.S  with type elt = int
Implementation of sets of integers.
module MSet: Set.S  with type elt = int IMap.t
Implementation of sets of maps with integer keys.
module ISSet: Set.S  with type elt = ISet.t
Implementation of sets of sets of integers.
module SISet: Set.S  with type elt = string * int
Implementation of sets of pairs of a sting and an integer.
module TrSet: Set.S  with type elt = int * string * int
Sets of transitions, as triples.
module Trans: Set.S  with type elt = ISet.t * SISet.t
Sets of petri transitions.

Types and exceptions.


type ptrans = ISet.t * SISet.t 
Petri transitions
type marquage = ISet.t 
Alias for ISet.t
type readstate = int IMap.t 
Alias for maps from integers to integers.
exception ContreExemple of int * string * string Expr.ground
Exception to be raised when a ground term proving non-inclusion has been found.
exception NotDefined
Exception to be raised when a HTML id tag can't be found.

Some basic functions.


val get_def : 'a -> ('b -> 'c -> 'a) -> 'b -> 'c -> 'a
get_def default f a b will try and compute f a b, and will return default if the exception Not_found is raised.
val bind : ('a -> 'b list) -> 'a list -> 'b list
bind f [a_1;a_2;...;a_n] returns the list (f a_1)@(f a_2)@...@(f a_n).
val dom : 'a IMap.t -> ISet.t
dom m computes the set of indexes that are bound to something in m.
val input : Trans.t -> marquage
val img : readstate -> ISet.t -> ISet.t

Printing functions.


val printlist : ('a -> string) -> 'a list -> string
val printimap : ('a -> string) -> 'a IMap.t -> string
val printiset : ISet.t -> string
val printisset : ISSet.t -> string
val printsiset : SISet.t -> string
val printmset : MSet.t -> string
val printtrset : TrSet.t -> string

Input function.


val input_file : string -> string list
List of the lines in a file.