DemeterF

Traversal-based Generic Programming in Java and C#


Implementation(s), Documentation and Examples




Description

Quick Summary

DemeterF, is an implementation of Functional Adaptive Programming. DemeterF is able to generate classes and related functions from a structural description (including concrete syntax) and includes a traversal library that supports functional, side-effect free, implicitly parallel traversal computation.

DemeterF is useful for succinctly describing data structures, generating classes and related functions (Parsing, Printing, Equality, etc.), and implementing computations over structures using traversals.

With DemeterF traversals you express the essential computation over a structure without having to mention exactly how it is constructed. Because the traversal is functional, the system can easily typecheck the interaction of functions and structures to gaurentee safety.

Features
  1. Concise data structure descriptions (Class Dictionaries, CDs) and behavior injection (Behavior files, BEHs)
  2. Automatic generation of data generic functions for Parsing, Printing, etc.
  3. Traversal implementations are compatible with handwritten and generated Java/C# classes
  4. Implicitly parallel traversals with control
  5. Generated classes can be built/packaged automatically as a JAR/DLL

Details:

We have full implementations in Java and C#, with a functional prototype in Scheme.

-- Both the Java and C# versions include an HTTP Server/Client implementation. See the source for details and examples ( Java| C# )

-- Here is a listing of all DemeterF related Papers and Documentation

-- I've completed the DemeterF introductory document... Here are the PDFs and corresponding source code files.
Last updated Sept 8th 2009
Intro-Java : shape.java and threetree.java
Intro-C# : shape.cs and threetree.cs

Updates:

-- A simple HowTo for using DemeterF with Eclipse on Linux or with Cygwin on Windows

-- There is also one for those that don't like Unix at all Here

-- Here's a more complicated example of a simple Compiler


I've written the same BST test in the three supported DemeterF/AP-F languages.
Java: Text / Html
C#: Text / Html
Scheme: Text / Html

Downloads:

Below are all the files/pages of the various DemeterF versions.
See demfgen for information on the DemeterF Class Generator, and CSJavaCC for the JavaCC based C# parser generator.

Java

Here's the Java Source, Library, and Documentation. Everything is compiled with Java 1.5 compatibility (I use JSDK 1.6).
Last updated May 23rd 2010.
Java Source (or Browse It)
Library (Jar)
JavaDoc

Related Extras:
DemeterF + JavaCC in a single JAR
Library for MacOS Tiger/JDK-1.5
JavaCC (Jar)
DemeterF Eclipse Plugin (includes src)
Previous Stable Versions

Here are some DemeterF Examples.

C#

Here's the related files. More stuff to come... Also check the DemFGen page for more info.
Last updated May 23rd 2009.
C# Source (or Browse It)
Library (DLL)
CSJavaCC (C# parser generator)


Scheme

Here's a few links. Examples are included in the download; more are included on the project page.
Last updated Aug. 19th 2009.
MzScheme Source/Library
apf-lib Project Page