diff --git a/README.txt b/README.txt
new file mode 100644
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,17 @@
+Tested on Ubuntu 14.04
+
+INSTALL
+
+   cabal build
+
+RUN
+
+   dist/build/lambda-cbv/lambda-cbv <PATH>
+
+For example: dist/build/lambda-cbv/lambda-cbv programs/fib-double-cbna.cbv
+
+TESTS
+
+   ./run-tests.sh
+
+should produce the same output provided in full.output
diff --git a/full.output b/full.output
new file mode 100644
--- /dev/null
+++ b/full.output
@@ -0,0 +1,183 @@
+programs/fib-clash2-cbne.cbv:
+Result:
+26
+
+Output Entity: standard-out
+7,5,3,1,2,4,2,3,1,2,6,4,2,3,1,2,5,3,1,2,4,2,3,1,2
+programs/ct-eval.cbv:
+Result:
+0
+programs/ast-output.cbv:
+Result:
+3
+
+Output Entity: standard-out
+3
+programs/ast-app.cbv:
+Result:
+7
+programs/mp6.cbv:
+Result:
+42
+programs/letdown-product-static.cbv:
+Result:
+24
+programs/mp3.cbv:
+Result:
+5
+
+Output Entity: standard-out
+5
+programs/fib-const-cbne.cbv:
+Result:
+42
+programs/fib-double-cbne.cbv:
+Result:
+26
+
+Output Entity: standard-out
+7,5,3,1,2,4,2,3,1,2,6,4,2,3,1,2,5,3,1,2,4,2,3,1,2
+programs/basics2.cbv:
+Result:
+5
+programs/comparison1b.cbv:
+Result:
+14
+
+Output Entity: standard-out
+1,0,1,0
+programs/mp4.cbv:
+Result:
+10
+programs/fib-double-cbv2.cbv:
+Result:
+26
+
+Output Entity: standard-out
+7,5,3,1,2,4,2,3,1,2,6,4,2,3,1,2,5,3,1,2,4,2,3,1,2
+programs/fib-clash2-cbna2.cbv:
+Result:
+26
+
+Output Entity: standard-out
+7,5,3,1,2,4,2,3,1,2,6,4,2,3,1,2,5,3,1,2,4,2,3,1,2,7,5,3,1,2,4,2,3,1,2,6,4,2,3,1,2,5,3,1,2,4,2,3,1,2
+programs/comparison1c.cbv:
+Result:
+14
+
+Output Entity: standard-out
+1,0
+programs/ast-from-downml.cbv:
+Result:
+astv(integer-add,astv(naturals,3),astv(naturals,4))
+programs/fib-clash-cbna.cbv:
+Result:
+26
+
+Output Entity: standard-out
+7,5,3,1,2,4,2,3,1,2,6,4,2,3,1,2,5,3,1,2,4,2,3,1,2,7,5,3,1,2,4,2,3,1,2,6,4,2,3,1,2,5,3,1,2,4,2,3,1,2
+programs/comparison2a.cbv:
+Result:
+28
+
+Output Entity: standard-out
+3,3,3,3,4,4,4,4
+programs/basics4.cbv:
+Result:
+7
+programs/app1.cbv:
+Result:
+4
+programs/fib-clash-cbna2.cbv:
+Result:
+26
+
+Output Entity: standard-out
+7,5,3,1,2,4,2,3,1,2,6,4,2,3,1,2,5,3,1,2,4,2,3,1,2,7,5,3,1,2,4,2,3,1,2,6,4,2,3,1,2,5,3,1,2,4,2,3,1,2
+programs/mp5.cbv:
+Result:
+astv(give,astv(give,astv(structural-assigned,astv(bound-value,astv(algebraic-datatypes,"plus"))),astv(apply,astv(given),astv(tuple,astv(give,astv(give,astv(structural-assigned,astv(bound-value,astv(algebraic-datatypes,"plus"))),astv(apply,astv(given),astv(tuple,astv(give,astv(give,astv(structural-assigned,astv(bound-value,astv(algebraic-datatypes,"plus"))),astv(apply,astv(given),astv(tuple,astv(naturals,1),astv(given)))),astv(apply,astv(given),astv(tuple,astv(structural-assigned,astv(bound-value,astv(algebraic-datatypes,"x"))),astv(given)))),astv(given)))),astv(apply,astv(given),astv(tuple,astv(structural-assigned,astv(bound-value,astv(algebraic-datatypes,"x"))),astv(given)))),astv(given)))),astv(apply,astv(given),astv(tuple,astv(structural-assigned,astv(bound-value,astv(algebraic-datatypes,"x"))),astv(given))))
+programs/ast-lam.cbv:
+Result:
+42
+programs/mp2.cbv:
+Result:
+astv(give,astv(give,astv(structural-assigned,astv(bound-value,astv(algebraic-datatypes,"plus"))),astv(apply,astv(given),astv(tuple,astv(naturals,3),astv(given)))),astv(apply,astv(given),astv(tuple,astv(naturals,2),astv(given))))
+programs/ast-from-downml2.cbv:
+Result:
+7
+programs/ast-let-product-dynamic.cbv:
+Result:
+15
+programs/comparison2b.cbv:
+Result:
+24
+
+Output Entity: standard-out
+3,3
+programs/let-product-dynamic.cbv:
+Result:
+15
+programs/basics3.cbv:
+Result:
+6
+programs/fib-const-cbna.cbv:
+Result:
+42
+programs/app3.cbv:
+Result:
+42
+programs/fib-double-cbv.cbv:
+Result:
+26
+
+Output Entity: standard-out
+7,5,3,1,2,4,2,3,1,2,6,4,2,3,1,2,5,3,1,2,4,2,3,1,2
+programs/fib-const-cbv.cbv:
+Result:
+42
+
+Output Entity: standard-out
+7,5,3,1,2,4,2,3,1,2,6,4,2,3,1,2,5,3,1,2,4,2,3,1,2
+programs/ast-app2.cbv:
+Result:
+7
+programs/ast-let-product-static.cbv:
+Result:
+15
+programs/fib-clash2-cbna.cbv:
+Result:
+13
+
+Output Entity: standard-out
+7,5,3,1,2,4,2,3,1,2,6,4,2,3,1,2,5,3,1,2,4,2,3,1,2
+programs/comparison1a.cbv:
+Result:
+14
+
+Output Entity: standard-out
+2,1,0,3,2,1,0
+programs/letdown1.cbv:
+Result:
+astv(asts,astv(naturals,2))
+programs/fib-double-cbna.cbv:
+Result:
+26
+
+Output Entity: standard-out
+7,5,3,1,2,4,2,3,1,2,6,4,2,3,1,2,5,3,1,2,4,2,3,1,2,7,5,3,1,2,4,2,3,1,2,6,4,2,3,1,2,5,3,1,2,4,2,3,1,2
+programs/curry.cbv:
+Result:
+5
+programs/app2.cbv:
+Result:
+7
+programs/basics1.cbv:
+Result:
+3
+programs/mp1.cbv:
+Result:
+astv(naturals,7)
+
+Output Entity: standard-out
+2
diff --git a/funcons-lambda-cbv-mp.cabal b/funcons-lambda-cbv-mp.cabal
--- a/funcons-lambda-cbv-mp.cabal
+++ b/funcons-lambda-cbv-mp.cabal
@@ -2,9 +2,10 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                funcons-lambda-cbv-mp
-version:             0.1.0.0
-synopsis:            Basic call-by-value lambda-calculus with operational semantics based on Funcons
--- description:         
+version:             0.1.0.2
+synopsis:            call-by-value lambda-calculus with meta-programming
+description:         Basic call-by-value lambda-calculus with operational semantics based on Funcons and meta-programming extensions
+
 license:             BSD3
 license-file:        LICENSE
 author:              L. Thomas van Binsbergen
@@ -13,6 +14,10 @@
 category:            Language
 build-type:          Simple
 extra-source-files:  ChangeLog.md
+                      programs/*.cbv
+                      run-tests.sh
+                      full.output
+                      README.txt
 cabal-version:       >=1.10
 
 executable lambda-cbv
@@ -21,7 +26,7 @@
   -- other-extensions:    
   build-depends:        base >=4.9 && <= 5.0
                       , gll >= 0.4.0.3
-                      , funcons-tools >= 0.2.0.1
+                      , funcons-tools >= 0.2.0.5
                       , containers >= 0.5.7
                       , text >= 1.2.2
   hs-source-dirs:      src
diff --git a/programs/app1.cbv b/programs/app1.cbv
new file mode 100644
--- /dev/null
+++ b/programs/app1.cbv
@@ -0,0 +1,3 @@
+
+let plus1 = \x. 1+x
+in plus1 3
diff --git a/programs/app2.cbv b/programs/app2.cbv
new file mode 100644
--- /dev/null
+++ b/programs/app2.cbv
@@ -0,0 +1,3 @@
+
+let plus1 = \x. 1+x
+in plus1 3 + plus1 2
diff --git a/programs/app3.cbv b/programs/app3.cbv
new file mode 100644
--- /dev/null
+++ b/programs/app3.cbv
@@ -0,0 +1,5 @@
+
+let mult = \y. \x. if x <= 0 then 0
+                             else y + this (x + -1)
+in let plus1 = \x. 1+x
+   in mult (plus1 3 + plus1 2) 6
diff --git a/programs/ast-app.cbv b/programs/ast-app.cbv
new file mode 100644
--- /dev/null
+++ b/programs/ast-app.cbv
@@ -0,0 +1,4 @@
+
+let plus3 = App (Bound "plus") (lift 3)
+ in eval(plus3) 4
+
diff --git a/programs/ast-app2.cbv b/programs/ast-app2.cbv
new file mode 100644
--- /dev/null
+++ b/programs/ast-app2.cbv
@@ -0,0 +1,3 @@
+
+let seven = App (App (Bound "plus") (lift 3)) (lift 4)
+ in eval(seven)
diff --git a/programs/ast-from-downml.cbv b/programs/ast-from-downml.cbv
new file mode 100644
--- /dev/null
+++ b/programs/ast-from-downml.cbv
@@ -0,0 +1,2 @@
+
+Plus $([|[|3|]|]) [| 4 |]
diff --git a/programs/ast-from-downml2.cbv b/programs/ast-from-downml2.cbv
new file mode 100644
--- /dev/null
+++ b/programs/ast-from-downml2.cbv
@@ -0,0 +1,2 @@
+
+$(Plus $([|[|3|]|]) [| 4 |])
diff --git a/programs/ast-lam.cbv b/programs/ast-lam.cbv
new file mode 100644
--- /dev/null
+++ b/programs/ast-lam.cbv
@@ -0,0 +1,3 @@
+
+letdown astlam = Lam (Bind "x") (Bound "x")
+ in $(astlam) 42
diff --git a/programs/ast-let-product-dynamic.cbv b/programs/ast-let-product-dynamic.cbv
new file mode 100644
--- /dev/null
+++ b/programs/ast-let-product-dynamic.cbv
@@ -0,0 +1,7 @@
+
+let gen = \n. if n <= 0 then lift 0 
+                        else Plus (Bound "x") (this (n + -1))
+in let product = \n. Lam (Bind "x") (gen n )
+   in let triple = eval( product 3 )
+      in triple 5
+
diff --git a/programs/ast-let-product-static.cbv b/programs/ast-let-product-static.cbv
new file mode 100644
--- /dev/null
+++ b/programs/ast-let-product-static.cbv
@@ -0,0 +1,6 @@
+
+letdown gen = \n. if n <= 0 then lift 0 
+                            else Plus (Bound "x") (this (n + -1))
+in letdown product = \n. Lam (Bind "x") (gen n )
+   in $(product 3) 5
+
diff --git a/programs/ast-output.cbv b/programs/ast-output.cbv
new file mode 100644
--- /dev/null
+++ b/programs/ast-output.cbv
@@ -0,0 +1,2 @@
+
+eval(Output (lift 3))
diff --git a/programs/basics1.cbv b/programs/basics1.cbv
new file mode 100644
--- /dev/null
+++ b/programs/basics1.cbv
@@ -0,0 +1,2 @@
+let x = 3
+in x
diff --git a/programs/basics2.cbv b/programs/basics2.cbv
new file mode 100644
--- /dev/null
+++ b/programs/basics2.cbv
@@ -0,0 +1,1 @@
+3 + 2 // 3+2 is lexed as 2 integers (`3` and `+2`)
diff --git a/programs/basics3.cbv b/programs/basics3.cbv
new file mode 100644
--- /dev/null
+++ b/programs/basics3.cbv
@@ -0,0 +1,2 @@
+let x = 3 + 2 
+in x + 1
diff --git a/programs/basics4.cbv b/programs/basics4.cbv
new file mode 100644
--- /dev/null
+++ b/programs/basics4.cbv
@@ -0,0 +1,1 @@
+(\x. x) 7
diff --git a/programs/comparison1a.cbv b/programs/comparison1a.cbv
new file mode 100644
--- /dev/null
+++ b/programs/comparison1a.cbv
@@ -0,0 +1,7 @@
+
+let gen = \y. \x. if x <= 0 then 0
+                            else y + this (output (x + -1))
+in let double = gen 2
+   in double 3 + double 4 // prints 2, 1, 0, 3, 2, 1, 0
+
+
diff --git a/programs/comparison1b.cbv b/programs/comparison1b.cbv
new file mode 100644
--- /dev/null
+++ b/programs/comparison1b.cbv
@@ -0,0 +1,7 @@
+
+let gen = \x. if x <= 0 then lift 0
+                        else [| y + $(this (output (x + -1))) |]
+in let double = \y. eval(gen 2)
+   in double 3 + double 4 // prints 1, 0, 1, 0
+
+
diff --git a/programs/comparison1c.cbv b/programs/comparison1c.cbv
new file mode 100644
--- /dev/null
+++ b/programs/comparison1c.cbv
@@ -0,0 +1,8 @@
+
+let gen = \x. if x <= 0 then lift 0
+                        else App (App (Bound "plus") (Bound "y")) (this (output (x + -1)))
+in let code = gen 2
+   in let double = \y. eval(code)
+      in double 3 + double 4 // prints 1, 0
+
+
diff --git a/programs/comparison2a.cbv b/programs/comparison2a.cbv
new file mode 100644
--- /dev/null
+++ b/programs/comparison2a.cbv
@@ -0,0 +1,8 @@
+
+let gen = \x. if x <= 0 then lift 0
+                        else [| (output y) + $(this (x + -1)) |]
+in let code = gen 2
+   in let quadruple = \y. (eval(code) + eval(code))
+      in quadruple 3 + quadruple 4 // prints 3,3,3,3, 4,4,4,4
+
+
diff --git a/programs/comparison2b.cbv b/programs/comparison2b.cbv
new file mode 100644
--- /dev/null
+++ b/programs/comparison2b.cbv
@@ -0,0 +1,8 @@
+
+let gen = \x. if x <= 0 then lift 0
+                        else [| (output y) + $(this (x + -1)) |]
+in let code = gen 2
+   in let quadruple = \y. (!code + eval(code))
+      in quadruple 3 + quadruple 4 // prints 3,3 and yields 24 (4 too 
+
+
diff --git a/programs/ct-eval.cbv b/programs/ct-eval.cbv
new file mode 100644
--- /dev/null
+++ b/programs/ct-eval.cbv
@@ -0,0 +1,3 @@
+
+letdown x = lift 0
+in $(x)
diff --git a/programs/curry.cbv b/programs/curry.cbv
new file mode 100644
--- /dev/null
+++ b/programs/curry.cbv
@@ -0,0 +1,3 @@
+
+let f = \x. \y. x + y
+ in f 2 3
diff --git a/programs/fib-clash-cbna.cbv b/programs/fib-clash-cbna.cbv
new file mode 100644
--- /dev/null
+++ b/programs/fib-clash-cbna.cbv
@@ -0,0 +1,7 @@
+
+let fib = \n. if (output n) <= 2 
+                then 1
+                else this (n + -2) + this (n + -1)
+in let double = \a. eval(a) + eval(a)
+   in double [| fib 7 |] 
+                               
diff --git a/programs/fib-clash-cbna2.cbv b/programs/fib-clash-cbna2.cbv
new file mode 100644
--- /dev/null
+++ b/programs/fib-clash-cbna2.cbv
@@ -0,0 +1,10 @@
+
+let fib = \n. if (output n) <= 2 
+                then 1
+                else this (n + -2) + this (n + -1)
+in let double = \fib. eval(fib) + eval(fib)
+   in double [| $(lift fib) 7 |] 
+// dereferences outer `fib` once, as part of application of `double`
+// applies the resulting lambda twice, thus computing the 7th fib number twice
+// can be solved by replacing first inner $fib by !fib
+                               
diff --git a/programs/fib-clash2-cbna.cbv b/programs/fib-clash2-cbna.cbv
new file mode 100644
--- /dev/null
+++ b/programs/fib-clash2-cbna.cbv
@@ -0,0 +1,7 @@
+
+let fib = \n. if (output n) <= 2 
+                then 1
+                else this (n + -2) + this (n + -1)
+in let double = \n. eval(n) + (let fib = \x. 0 in eval(n))
+   in double [| fib 7 |] // computes 7th fibno once, snd eval(n) gives 0, yields 13
+                               
diff --git a/programs/fib-clash2-cbna2.cbv b/programs/fib-clash2-cbna2.cbv
new file mode 100644
--- /dev/null
+++ b/programs/fib-clash2-cbna2.cbv
@@ -0,0 +1,7 @@
+
+let fib = \n. if (output n) <= 2 
+                then 1
+                else this (n + -2) + this (n + -1)
+in let double = \n. eval(n) + (let fib = \x. 0 in eval(n))
+   in double [| $(lift fib) 7 |] // computes 7th fibno twice, yields 26
+                               
diff --git a/programs/fib-clash2-cbne.cbv b/programs/fib-clash2-cbne.cbv
new file mode 100644
--- /dev/null
+++ b/programs/fib-clash2-cbne.cbv
@@ -0,0 +1,7 @@
+
+let fib = \n. if (output n) <= 2 
+                then 1
+                else this (n + -2) + this (n + -1)
+in let double = \n. !n + (let fib = \x. 0 in eval(n))
+   in double [| fib 7 |] // computes 7th fibno once, snd eval(n) gives 13, yields 26
+                               
diff --git a/programs/fib-const-cbna.cbv b/programs/fib-const-cbna.cbv
new file mode 100644
--- /dev/null
+++ b/programs/fib-const-cbna.cbv
@@ -0,0 +1,7 @@
+
+let fib = \n. if (output n) <= 2 
+                then 1
+                else this (n + -2) + this (n + -1)
+in let const = \n. \k. eval n
+   in const [|42|] [|fib 7|]
+                               
diff --git a/programs/fib-const-cbne.cbv b/programs/fib-const-cbne.cbv
new file mode 100644
--- /dev/null
+++ b/programs/fib-const-cbne.cbv
@@ -0,0 +1,7 @@
+
+let fib = \n. if (output n) <= 2 
+                then 1
+                else this (n + -2) + this (n + -1)
+in let const = \n. \k. !n
+   in const [|42|] [|fib 7|]
+                               
diff --git a/programs/fib-const-cbv.cbv b/programs/fib-const-cbv.cbv
new file mode 100644
--- /dev/null
+++ b/programs/fib-const-cbv.cbv
@@ -0,0 +1,7 @@
+
+let fib = \n. if (output n) <= 2 
+                then 1
+                else this (n + -2) + this (n + -1)
+in let const = \n. \k. n
+   in const 42 (fib 7)
+                               
diff --git a/programs/fib-double-cbna.cbv b/programs/fib-double-cbna.cbv
new file mode 100644
--- /dev/null
+++ b/programs/fib-double-cbna.cbv
@@ -0,0 +1,7 @@
+
+let fib = \n. if (output n) <= 2 
+                then 1
+                else this (n + -2) + this (n + -1)
+in let double = \n. eval(n) + eval(n) //equivalent to \n. (fib 7) (fib 7) when run
+   in double [| fib 7 |]
+                               
diff --git a/programs/fib-double-cbne.cbv b/programs/fib-double-cbne.cbv
new file mode 100644
--- /dev/null
+++ b/programs/fib-double-cbne.cbv
@@ -0,0 +1,7 @@
+
+let fib = \n. if (output n) <= 2 
+                then 1
+                else this (n + -2) + this (n + -1)
+in let double = \n. !n + eval(n) //equivalent to \n. (fib 7) (fib 7) when run
+   in double [| fib 7 |]
+                               
diff --git a/programs/fib-double-cbv.cbv b/programs/fib-double-cbv.cbv
new file mode 100644
--- /dev/null
+++ b/programs/fib-double-cbv.cbv
@@ -0,0 +1,7 @@
+
+let fib = \n. if (output n) <= 2 
+                then 1
+                else this (n + -2) + this (n + -1)
+in let double = \n. n + n
+   in double (fib 7)
+                               
diff --git a/programs/fib-double-cbv2.cbv b/programs/fib-double-cbv2.cbv
new file mode 100644
--- /dev/null
+++ b/programs/fib-double-cbv2.cbv
@@ -0,0 +1,7 @@
+
+let fib = \n. if (output n) <= 2 
+                then 1
+                else this (n + -2) + this (n + -1)
+in let double = \n. 13 + 13
+   in double (fib 7)
+                               
diff --git a/programs/let-product-dynamic.cbv b/programs/let-product-dynamic.cbv
new file mode 100644
--- /dev/null
+++ b/programs/let-product-dynamic.cbv
@@ -0,0 +1,5 @@
+
+let gen = \n. if n <= 0 then [|0|] else [| x + $(this (n + -1)) |]
+in let product = \n. [| \x. $( gen n ) |]
+   in (eval (product 3)) 5
+
diff --git a/programs/letdown-product-static.cbv b/programs/letdown-product-static.cbv
new file mode 100644
--- /dev/null
+++ b/programs/letdown-product-static.cbv
@@ -0,0 +1,5 @@
+
+letdown gen = \n. if n <= 0 then [|0|] else [| x + $(this (n + -1)) |]
+in letdown product = \n. [| \x. $( gen n ) |]
+   in $( product 3 ) 8 
+
diff --git a/programs/letdown1.cbv b/programs/letdown1.cbv
new file mode 100644
--- /dev/null
+++ b/programs/letdown1.cbv
@@ -0,0 +1,3 @@
+
+letdown f = \x.lift x
+in $(f (f (f 2)))
diff --git a/programs/mp1.cbv b/programs/mp1.cbv
new file mode 100644
--- /dev/null
+++ b/programs/mp1.cbv
@@ -0,0 +1,2 @@
+
+lift(output 2 + 5)
diff --git a/programs/mp2.cbv b/programs/mp2.cbv
new file mode 100644
--- /dev/null
+++ b/programs/mp2.cbv
@@ -0,0 +1,2 @@
+
+[| 3 + 2 |]
diff --git a/programs/mp3.cbv b/programs/mp3.cbv
new file mode 100644
--- /dev/null
+++ b/programs/mp3.cbv
@@ -0,0 +1,2 @@
+
+output ($([| 3 + 2 |]))
diff --git a/programs/mp4.cbv b/programs/mp4.cbv
new file mode 100644
--- /dev/null
+++ b/programs/mp4.cbv
@@ -0,0 +1,4 @@
+
+let code = [| 3 + x |]
+in let x = 7
+    in eval(code)
diff --git a/programs/mp5.cbv b/programs/mp5.cbv
new file mode 100644
--- /dev/null
+++ b/programs/mp5.cbv
@@ -0,0 +1,4 @@
+
+let code = \y. if y <= 0 then lift 1
+                         else [| $(this (y + -1)) + x |]
+in code 3
diff --git a/programs/mp6.cbv b/programs/mp6.cbv
new file mode 100644
--- /dev/null
+++ b/programs/mp6.cbv
@@ -0,0 +1,5 @@
+
+letdown code = \y. if y <= 0 then [| 0 |]
+                             else [| x + $(this (y + -1)) |]
+in let x = 7 
+   in $(code 6)
diff --git a/run-tests.sh b/run-tests.sh
new file mode 100644
--- /dev/null
+++ b/run-tests.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+run_test() {
+  echo $1:;
+  out=$(dist/build/lambda-cbv/lambda-cbv $1 --refocus);
+  if [[ $out ]]
+    then  echo "$out";
+  fi
+}
+export -f run_test
+find programs -name "*.cbv" | xargs -n1 -I{} bash -c 'run_test "$@"' _ {} 
