Commit 5153dd1b authored by Aliaume Lopez's avatar Aliaume Lopez

Merge branch 'master' of gitlab.crans.org:alopez/stage-L3-2016

parents 200ac662 1e2c81c3
OCAMLCC=ocamlc
OSRC=utils.ml lexer.ml ast.ml parser.ml dot.ml solver.ml typesystem.ml dags.ml compiler.ml ptg.ml rewriting.ml
OSRCL=utils.mli
.PHONY: test clean doc
doc/index.html: $(OSRCL) $(OSRC)
doc/index.html: $(OSRC)
ocamldoc -html -d doc $(OSRCL)
doc: doc/index.html
open doc/index.html
tests: $(OSRC) $(OSRCL) tests.ml
$(OCAMLCC) $(OSRCL)
tests: $(OSRC) tests.ml
$(OCAMLCC) -g -o tests $(OSRC) tests.ml
./tests
circuits: $(OSRC) $(OSRCL) circuits.ml
$(OCAMLCC) $(OSRCL)
circuits: $(OSRC) circuits.ml
$(OCAMLCC) -g -o circuits $(OSRC) circuits.ml
./circuits
......
type 'a circuit =
Par of 'a * 'a
| Seq of 'a * 'a
| VarI of string
| VarO of string
| Const of string * int * int
| Id of int
| IdPoly
| Links of (string * string) list * 'a
val fmap : ('a -> 'b) -> 'a circuit -> 'b circuit
type circ = Circ of circ circuit
type 'a typed_circ = TCirc of ('a typed_circ circuit * 'a)
val foldc : ('a circuit -> 'a) -> circ -> 'a
val foldc_typed : ('a circuit -> 'b -> 'a) -> 'b typed_circ -> 'a
val ( === ) : circ -> circ -> circ
val ( ||| ) : circ -> circ -> circ
val empty : circ
val vari : string -> circ
val varo : string -> circ
val const : string -> int -> int -> circ
val id : int -> circ
val idpoly : circ
val links : (string * string) list -> circ -> circ
val twist : circ
val trace : circ -> circ
val bindi : string -> circ -> circ
val bindo : string -> circ -> circ
val print_ast : circ -> string
type nid = int
type label = VarI of string | VarO of string | Const of string
type port = nid * int option
val map_port : ('a -> 'b) -> 'a * 'c -> 'b * 'c
type 'a lidag = {
iports : port list;
oports : port list;
nodes : (nid * int * int) list;
edges : (port * port) list;
labels : (nid * label) list;
ibinders : nid list;
obinders : nid list;
}
val empty_dag : 'a lidag
val anonym_link :
start:'a -> finish:'b -> ('a * 'c option) * ('b * 'd option)
val mapids : (nid -> nid) -> 'a lidag -> 'b lidag
val maxid : 'a lidag -> nid
val sequence : first:'a lidag -> second:'b lidag -> 'c lidag
val parallel : top:'a lidag -> bottom:'b lidag -> 'c lidag
val ( >>= ) : 'a list -> ('a -> 'b list) -> 'b list
val link : vars:(string * string) list -> dag:'a lidag -> 'b lidag
val constant : name:string -> inputs:int -> outputs:int -> 'a lidag
val ivar : name:string -> 'a lidag
val ovar : name:string -> 'a lidag
val identity : number:int -> 'a lidag
val parallels : 'a lidag list -> 'a lidag
val sequences : 'a lidag list -> 'a lidag
val example_circuit : 'a lidag
val tightening1 :
middle:'a lidag -> first:'b lidag -> last:'b lidag -> 'b lidag
val tightening2 :
middle:'a lidag -> first:'a lidag -> last:'a lidag -> 'b lidag
module SM :
sig
type key = String.t
type 'a t = 'a Map.Make(String).t
val empty : 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val singleton : key -> 'a -> 'a t
val remove : key -> 'a t -> 'a t
val merge :
(key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool
val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
val cardinal : 'a t -> int
val bindings : 'a t -> (key * 'a) list
val min_binding : 'a t -> key * 'a
val max_binding : 'a t -> key * 'a
val choose : 'a t -> key * 'a
val split : key -> 'a t -> 'a t * 'a option * 'a t
val find : key -> 'a t -> 'a
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
end
type dot = string
type node_mod = string SM.t
type uid = int
val addPrelude : string -> string
val count : int ref
val uid : unit -> int
val renderMods : string SM.t -> string
val mod_shape : 'a -> 'a SM.t -> 'a SM.t
val mod_color : 'a -> 'a SM.t -> 'a SM.t
val mod_label : string -> string SM.t -> string SM.t
val mod_style : string -> string SM.t -> string SM.t
val mod_width : float -> string SM.t -> string SM.t
val mod_height : float -> string SM.t -> string SM.t
val mod_fixedsize : bool -> string SM.t -> string SM.t
val mkLabel : int -> int option -> string -> string
val mkNode : int -> string SM.t -> string
val emptyMod : 'a SM.t
val baseMod : string SM.t
val inputsOutputs : string -> int -> int -> string SM.t -> string SM.t
val mkLink : int -> int option -> int -> int option -> string
val rank_group : string -> int list -> string
val addDot : string -> string -> string
val addDots : string list -> string
val tests : 'a list
type v_id = int
type c_var = Const of int | Var of v_id
val calcul_type : Ast.circ -> (c_var * c_var) Ast.typed_circ * int array
val tests : (string * (unit -> unit)) list
val split : int -> 'a list -> 'a list * 'a list
val range : int -> int list
val replicate : int -> 'a -> 'a list
val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
val zipWith : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list
val surround : string -> string -> string -> string
val permute_lignes : int -> int -> 'a array -> unit
val array_find : ('a -> bool) -> 'a array -> (int * 'a) option
val ( <|> ) : 'a option -> 'a option -> 'a option
val insertV :
merge:('a -> 'a -> 'a) ->
key:'b -> value:'a -> func:('b * 'a) list -> ('b * 'a) list
val imageV : elem:'a -> func:('a * 'b) list -> 'b option
val fiberV : elem:'a -> func:('b * 'a) list -> 'b list
val remove_duplicates : 'a list -> 'a list
val of_option : 'a option -> 'a
val list_of_options : 'a option list -> 'a list
val remove_list : 'a list -> 'a list -> 'a list
val correct_list : ('a * 'b) list -> ('a * 'b) list
val tests : (string * (unit -> unit)) list
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment