A framework to draw interaction nets in Asymptote

asynets is an Asymptote library which I developped to draw interaction nets in my PhD dissertation. You can download the package here: asynets-0.01b.tar.bz2.

From the README


A library for rendering interaction nets using Asymptote.

* Installation

Unpack with:

    tar xjf asynets-*.tar.bz2

This version has been tested with Asymptote 1.33 only.

* Structure of the package

The core modules:
		some global variables
		define type 'render' and provide a unified rendering process
		define type 'type', which consists mainly in a Label and an
		orientation, and provide useful functions on these
		define type 'link', which consists mainly in a path and a set of
		types, and provide useful functions on these (notably cut and
		define type 'cell', which consists mainly in a picture and a set of
		ports (links)

More specialized modules:
		provide functions to create rectangular cells (with rounded
		provide functions to create triangular cells (the base holding
		auxilliary ports has rounded corners, the point holding the
		principal port is sharp)
		ugly hack to force promotion boxes into the framework provided
		by the 'cell' type
		this one is used to generate the redex and reduct part of a
		reduction from the same source file
		a testbed framework

The following modules makes use of all this to create differential linear
logic interaction nets:
		provide functions to create differential net cells, generic
		nets, and easy-to-create promotion boxes
		provide functions to generate communication zones à la

* Note

This is quick and dirty code, generally undocumented. It has been
written while I was composing my PhD thesis, for the sole purpose of
allowing me to generate those numerous figures I needed.  Example files
(named 'exemple_*.asy') can hint at the way things work.  Source files
of the main modules also provide numerous test functions (prototyped
'void test_something(picture)'), that were introduced for debugging: the
code of these is generally short and easily understood.

The following Asymptote session runs all known test functions one after
the other:

	$ asy 
	Welcome to Asymptote version 1.29 (to view the manual, type help)
	> import diffnets
	> runtests()

For each test there is an prompt of the form:

	Running test: test_link
	├-> Tags: [link] [test_link].
	├-> Clean picture.
	├-> Draw.
	├-> Ship out.
	└-> Next ? (Y/n)

The first line provides a description of the test, which can be fed to
grep in order to find the corresponding file and line. One can filter
the list of tests to be run using tags: runtest("box") runs only those
tests with tag "box".

* Copyright and license

The asynets package is written and poorly maintained by Lionel Vaux
<>. It is distributed under Sam Hocevar's WTFPL,
version 2 or later: see

Any kind of feedback is appreciated, in order to make this program
useful or at least usable.

Last update on 2008-02-01.

Valid XHTML and CSS?