DemeterF Implementation: Examples, Code and Libraries




Our Current Tech Report (Submitted OOPSLA 2008)

Example FOOP Language implementaion page (For OOPSLA 2008 Submission)

Scheme apf-lib implementaion of AP-F

Here's a copy of the original paper on our Traversals

Here's the JavaDoc, Source and Library. Last updated March 26th 2008.
Everything is Compiled with Java 1.5.
JavaDoc
Sources
Library Jar

More Complicated DemeterF/DemeterJ Example: Compiler/Assembler

Below are links to a few simpler examples using the Library. The more recent ones first.

edu.neu.ccs.demeterf.examples.TossExample is a test of the new ValueThrow class that allows traversals to be cut short.

Html-ized Code: TossExample.java.html
Plain Java Code: TossExample.java



edu.neu.ccs.demeterf.examples.TUExample is a test of the new generic TUCombiner class.


                 CountLeafs: 4
            !Bad CountLeafs: 22
                CountLeafs2: 4
 w/o  Node Data CountLeafs3: 4
 with Node Data CountLeafs3: 4
    

Html-ized Code: TUExample.java.html
Plain Java Code: TUExample.java



edu.neu.ccs.demeterf.examples.ParallelTree is a quick test of Parallel Traversals.
On my single processor machine it produces:


     P-SUM: 998250
    P-Time: 0.689 sec

     S-SUM: 998250
    S-Time: 0.072 sec
    

Html-ized Code: ParallelTree.java.html
Plain Java Code: ParallelTree.java



This is the test output of edu.neu.ccs.demeterf.examples.FuncTest


    String: (1 (5 (2 (6 (3 (4 (7 ())))))))
    Length: 7
       Sum: 28
      Add1: (2 (6 (3 (7 (4 (5 (8 ())))))))
       I2S: ('1' ('5' ('2' ('6' ('3' ('4' ('7' ())))))))
    

Html-ized Code: FuncTest.java.html
Plain Java Code: FuncTest.java



This is the output of edu.neu.ccs.demeterf.examples.EvalTest


    Before: (/ (+ (+ (* 9 6) 8) (- 5 7)) 4)
    AddOne: (/ (+ (+ (* 10 7) 9) (- 6 8)) 5)
      Eval: 15
   Num2Str: (/ (+ (+ (* "9":4 "6":4) "8":3) (- "5":3 "7":3)) "4":1)
     Depth: 4
    

Html-ized Code: EvalTest.java.html
Plain Java Code: EvalTest.java



And the output of edu.neu.ccs.demeterf.examples.ContainerCheck


        Item = C[8, (C[8, (E[3] (C[8, (E[4] (E[2] ()))] ()))] (E[5] ()))]
      Weight = 14
  Violations = 2
    

Html-ized Code: ContainerTest.java.html
Plain Java Code: ContainerTest.java