# DML

DML - Directed Multigraph Language, is an esoteric programming language. DML may be considered a cellular automaton, though the underlying topology is not a grid of squares, but rather a graph - a directed multigraph.

DML is a visual programming language, meaning that a DML program is simply a graphical representation of the graph. We consider this graphical representation as primary, and any necessary text representation as secondary.

Vertices in the graph are marked 1 (black) or 0 (white).

### Neighborhood

The neighbors of a vertex X are those vertices for which there is an edge which links from that vertex to X.

### Operation

The DML program defines the initial state of the automaton. The automaton evolves by proceeding though cycles, with the initial state being cycle 0, and the following states 1, 2, 3 etc.

With each cycle, we calculate the new state of each vertex, based on the old states of its neighbors, specifically if exactly one neighbor of X is in state 1, then the new state of X is 1, otherwise the state is 0.

### I/O

A DML program can accept input and produce output. Two special vertices are defined - the left-most vertex on the graph is called R (read), while the rightmost vertex is called W (write).

TODO: I/O description.

Settings

The following settings are defined (how?).

bits_per_byte - number of bits that make up a byte cycles_per_bit - number of cycles that make up a bit cycles - number of cycles that the program will run

TODO: Settings Description

### Examples

#### Program Fragments

#### Programs

- adder