Commits

Cat's Eye Technologies  committed d103621

Convert documentation to Markdown.

  • Participants
  • Parent commits e89408e

Comments (0)

Files changed (8)

File README.markdown

+The Arboretuum Programming Language
+===================================
+
+March 2008, Chris Pressey, Cat's Eye Technologies.
+
+Description
+-----------
+
+Arboretuum is a language based on an experimental variant of
+tree-rewriting which we call forest-rewriting. Appropriate to its name,
+during forest-rewriting, multiple trees (specifically, a finite set) are
+rewritten. Each tree is labelled with a name; a rewriting pattern can
+refer to multiple trees, and must match all of them simultaneously in
+order for a replacement to occur.
+
+As an experiment, Arboretuum was not entirely a success.
+Forest-rewriting unfortunately turned out to be insufficient for what I
+wanted to apply it to, namely compiler specification. The idea was to
+have each tree associated with some data structure used in the
+compilation process (AST, symbol table, output buffer, etc.) However, it
+became apparent that, by itself, forest-rewriting could not synchronize
+the data across the trees the way it would need to be synchronized in a
+real compiler. I plan to tackle the problem again, with a different
+variation on rewriting, in a future project.
+
+Regardless, Arboretuum is Turing-complete, as tree-rewriting is simply a
+special case of forest-rewriting: just have one tree in the forest.
+
+Implementation
+--------------
+
+I will refer you to the reference implementation of Arboretuum for
+details on the semantics of the language. Ordinarily I frown upon this
+sort of practice — normatively defining a language by an implementation
+rather than by a specification — but the interests of brevity, the
+experimental tack of the project, the unsuccessful outcome of the
+experiment, and the relative well-definedness of the implementation
+language (the purely functional subset of R5RS Scheme) conspire to
+make the consequences of this choice less painful than usual.
+
+The reference implementation comprises the following files:
+
+-   `preprocess.scm`
+
+    Pre-processes the input program into an internal format suitable for
+    forest-rewriting.
+
+-   `unify.scm`
+
+    Implementation of the unification algorithm which is used to match
+    the pattern part of rewriting rules to the forest.
+
+-   `forest-rewrite.scm`
+
+    Implements the forest-rewriting process proper.
+
+-   `utils.scm`
+
+    Miscellanous support procedures, including `mergesort`,
+    `vector-store` (a side-effect-free alternative to `vector-set!`),
+    `print` and `test`.
+
+In addition, the following supplementary files which are not definitive
+w.r.t. the Arboretuum language are included in the project:
+
+-   `tests.scm`
+
+    Gives a set of unit tests to confirm the absence of certain
+    erroneous behaviours. (Obviously, no number of unit tests could
+    confirm the absence of *errors*...)
+
+-   `tree-rewrite.scm`
+
+    Some basic tree-rewriting code, to provide contrast between it's
+    complexity and that of forest rewriting.
+
+Note that the Scheme implementation of algorithms in the above files are
+to be taken as *pedantic* rather than *efficient*. They are meant to be
+read (perhaps even enjoyed?) and only incidentally to be executed.
+
+History
+-------
+
+This project was begun in January 2006. I'd been meaning to release it
+for a while before actually doing so in March of 2008.
+
+Happy forest-rewriting!
+
+-Chris Pressey  
+Cat's Eye Technologies  
+March 4, 2008  
+Chicago, Illinois, USA

File doc/arboretuum.html

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<!-- encoding: UTF-8 -->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<title>The Arboretuum Programming Language</title>
-  <!-- begin html doc dynamic markup -->
-  <script type="text/javascript" src="/contrib/jquery-1.6.4.min.js"></script>
-  <script type="text/javascript" src="/scripts/documentation.js"></script>
-  <!-- end html doc dynamic markup -->
-</head>
-<body>
-
-<h1>The Arboretuum Programming Language</h1>
-
-<p>March 2008, Chris Pressey, Cat's Eye Technologies.</p>
-
-<h2>Description</h2>
-
-<p><dfn>Arboretuum</dfn> is a language based on an experimental variant of
-tree-rewriting which we call <dfn>forest-rewriting</dfn>.  Appropriate to its name, during
-forest-rewriting, multiple trees (specifically, a finite set) are rewritten.
-Each tree is labelled with a name; a rewriting pattern can refer to multiple trees,
-and must match all of them simultaneously in order for a replacement to occur.</p>
-
-<p>As an experiment, Arboretuum was not entirely a success.  Forest-rewriting unfortunately turned out to
-be insufficient for what I wanted to apply it to, namely compiler specification.  The idea
-was to have each tree associated with some data structure used in the compilation process
-(AST, symbol table, output buffer, etc.)  However, it became apparent that, by itself,
-forest-rewriting could not synchronize the data across the trees the way it would need
-to be synchronized in a real compiler.  I plan to tackle the problem again, with a different variation
-on rewriting, in a future project.</p>
-
-<p>Regardless, Arboretuum is Turing-complete, as tree-rewriting is simply a special
-case of forest-rewriting: just have one tree in the forest.</p>
-
-<h2>Implementation</h2>
-
-<p>I will refer you to the reference implementation of Arboretuum
-for details on the semantics of the language.  Ordinarily I frown upon this
-sort of practice — normatively defining a language by an implementation
-rather than by a specification — but the interests of brevity, the experimental tack of the
-project, the unsuccessful outcome of the experiment, and the relative
-well-definedness of the implementation language (the purely functional subset of R<sup>5</sup>RS Scheme) conspire
-to make the consequences of this choice less painful than usual.</p>
-
-<p>The reference implementation comprises the following files:</p>
-
-<ul>
-
-<li><code>preprocess.scm</code>
-<p>Pre-processes the input program into an internal format
-suitable for forest-rewriting.
-</p></li>
-
-<li><code>unify.scm</code>
-<p>Implementation of the unification algorithm which is used to match
-the pattern part of rewriting rules to the forest.
-</p></li>
-
-<li><code>forest-rewrite.scm</code>
-<p>Implements the forest-rewriting process proper.
-</p></li>
-
-<li><code>utils.scm</code>
-<p>Miscellanous support procedures, including <code>mergesort</code>,
-<code>vector-store</code> (a side-effect-free alternative to <code>vector-set!</code>),
-<code>print</code> and <code>test</code>.
-</p></li>
-
-</ul>
-
-<p>In addition, the following supplementary files which are not definitive
-w.r.t. the Arboretuum language are included in the project:</p>
-
-<ul>
-
-<li><code>tests.scm</code>
-<p>Gives a set of unit tests to confirm the absence of certain erroneous behaviours.
-(Obviously, no number of unit tests could confirm the absence of <em>errors</em>...)
-</p></li>
-
-<li><code>tree-rewrite.scm</code>
-<p>Some basic tree-rewriting code, to provide contrast between it's complexity
-and that of forest rewriting.</p></li>
-
-</ul>
-
-<p>Note that the Scheme implementation of algorithms in the above files are
-to be taken as <em>pedantic</em> rather than <em>efficient</em>.
-They are meant to be read (perhaps even enjoyed?) and only incidentally
-to be executed.</p>
-
-<h2>History</h2>
-
-<p>This project was begun in January 2006.  I'd been meaning to release
-it for a while before actually doing so in March of 2008.</p>
-
-<p>Happy forest-rewriting!</p>
-
-<p>-Chris Pressey
-<br/>Cat's Eye Technologies
-<br/>March 4, 2008
-<br/>Chicago, Illinois, USA</p>
-
-
-</body>
-</html>

File src/forest-rewrite.scm

File contents unchanged.

File src/preprocess.scm

File contents unchanged.

File src/tests.scm

File contents unchanged.

File src/tree-rewrite.scm

File contents unchanged.

File src/unify.scm

File contents unchanged.

File src/utils.scm

File contents unchanged.