Thalatta

Thalatta is an algorithmic graph description language. It is a specialized tool combining graph description task with a programming language by having a syntax for procedural generation.

Language overview

The following is an example of Thalatta language program:

and = 0;
xor = 1;
bits = 2;
a = [bits]node(xor, 0);
b = [bits]node(xor, 1);
c = node(and) <- node(xor, 2);
out = [bits+1]node(xor);
p = [bits]node(xor) <- a <- b;
g = [bits]node(and) <- a <- b;
out[0:bits] <- ([bits]node(and) <- p);
foreach (out) {
	@ <- (node(and) <- p[0:@0] <- c);
	for (i = 0; i < @0; ++i)
		@ <- (node(and) <- p[i+1:@0] <- g[i]);
}

If to consider nodes storing 0 as logic and gates and 1 as logic xor gates consequently with directed edges connecting them, this creates a valid 2-bit carry-lookahead adder. It can be expressed as the following graph:

A huge graph image that is the result of execution of code above

Reference for the latest Thalatta version is distributed together with the reference implementation source.

Thalatta Compiler

This page offers a reference implementation of a Thalatta compiler.

As of dependencies it requires

Available versions for downloading are

Complete changelog is available through a git repository at anongit at git dot nakidai dot ru colon thac.