package b0

  1. Overview
  2. Docs
Software construction and deployment kit

Install

dune-project
 Dependency

Authors

Maintainers

Sources

b0-0.0.6.tbz
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0

doc/b0.std/B0_dot/index.html

Module B0_dotSource

Dot graph generation.

Note. No support for ports. Should be too hard to add though.

References

Generation sequences

Sourcetype 'a seq

The type for sequences.

Sourceval empty : 'a seq

An empty sequence.

Sourceval (++) : 'a seq -> 'a seq -> 'a seq

s ++ s' is sequence s' concatenated to s.

Graphs

Sourcetype id = string

The type for ids, they can be any string and are escaped.

Sourcetype st

The type for dot statements.

Sourcetype att

The type for dot attributes.

Sourcetype t

The type for dot graphs.

Sourceval edge : ?atts:att seq -> id -> id -> st seq

edge ~atts id id' is an edge from id to id' with attribute atts if specified.

Sourceval node : ?atts:att seq -> id -> st seq

nod ~atts id is a node with id id and attributes atts if specified.

Sourceval atts : [ `Graph | `Node | `Edge ] -> att seq -> st seq

atts kind atts are attributes atts for kind.

Sourceval att : string -> string -> att seq

att k v is attribute k with value v.

Sourceval att_html : string -> string -> att seq

att_html k v is an HTML-like label v for k.

Sourceval label : string -> att seq

label l is label attribute l.

Sourceval color : string -> att seq

color c is a color attribute l.

Sourceval subgraph : ?id:id -> st seq -> st seq

subgraph ~id sts is subgraph id (default unlabelled) with statements sts.

Sourceval graph : ?id:id -> ?strict:bool -> [ `Graph | `Digraph ] -> st seq -> t

graph ~id ~strict g sts is according to g a graph or digraph id (default unlabelled) with statements sts. If strict is true (defaults to false) multi-edges are not created.

Output

Sourceval buffer_add : Buffer.t -> t -> unit

buffer_add b g adds the dot graph g to b.

Sourceval to_string : t -> string

to_string g is the dot graph g as a string.

Sourceval output : Out_channel.t -> t -> unit

output oc g outputs the dot graph g on b.