graph-rewriting-lambdascope 0.4.4 → 0.4.5
raw patch · 16 files changed
+56/−3 lines, 16 files
Files
- LICENSE +1/−1
- examples/Omega.l +1/−0
- examples/asperti_guerrini_3011.l +3/−0
- examples/asperti_guerrini_3011_simpl.l +2/−0
- examples/asperti_guerrini_3012.l +3/−0
- examples/exp.l +14/−0
- examples/fix.l +1/−0
- examples/flip_const_id.l +5/−0
- examples/head123.l +4/−0
- examples/lamping.l +3/−0
- examples/lamping_simpl.l +6/−0
- examples/repeat_naive.l +2/−0
- examples/repeat_optim.l +2/−0
- examples/sum1234.l +5/−0
- examples/twice.l +1/−0
- graph-rewriting-lambdascope.cabal +3/−2
LICENSE view
@@ -5,6 +5,6 @@ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.-* Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.+* Neither the name of the University of Utrecht nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ examples/Omega.l view
@@ -0,0 +1,1 @@+let omega = λx.x x in omega omega
+ examples/asperti_guerrini_3011.l view
@@ -0,0 +1,3 @@+λx.λy.(λf.(λh.(h λp.(h λq.p))+ λl.(((f λn.(l n))x)y))+ λg.λu.λv.((g u)(g v)))
+ examples/asperti_guerrini_3011_simpl.l view
@@ -0,0 +1,2 @@+λa b c d. let s = λa b c. let t = λx. a in (t c) (t b)+in s (λe. c (λf.e f) a b) (s d)
+ examples/asperti_guerrini_3012.l view
@@ -0,0 +1,3 @@+λx.λy.(λf.(λh.(h λp.(h λq.q))+ λl.(((f λn.(l n))x)y))+ λg.λu.λv.((g u)(g v)))
+ examples/exp.l view
@@ -0,0 +1,14 @@+let+ id = λx.x+ zero = λf x. x+ one = λf x. f x+ two = λf x. f (f x)+ three = λf x. f (f (f x))+ four = λf x. f (f (f (f x)))+ five = λf x. f (f (f (f (f x))))+ six = λf x. f (f (f (f (f (f x)))))+ seven = λf x. f (f (f (f (f (f (f x))))))+ eight = λf x. f (f (f (f (f (f (f (f x)))))))+ nine = λf x. f (f (f (f (f (f (f (f (f x))))))))+ ten = λf x. f (f (f (f (f (f (f (f (f (f x)))))))))+in (λx.x two two id id) four
+ examples/fix.l view
@@ -0,0 +1,1 @@+let fix f = f (fix f) in fix
+ examples/flip_const_id.l view
@@ -0,0 +1,5 @@+let+ flip f x y = f y x+ const x y = x+ id x = x+in flip const a id b
+ examples/head123.l view
@@ -0,0 +1,4 @@+let+ Cons x xs = λcons nil. cons x xs+ Nil = λcons nil. nil+in (Cons 1 (Cons 2 (Cons 3 Nil))) (λx xs. x) 0
+ examples/lamping.l view
@@ -0,0 +1,3 @@+((λg.(g(g(λx.x))))+ (λh.((λf.(f(f(λz.z))))+ (λw.(h(w(λy.y)))))))
+ examples/lamping_simpl.l view
@@ -0,0 +1,6 @@+let+ id = λx.x+ shared = λa. let+ shared = λb. a (b id)+ in shared (shared id)+in shared (shared id)
+ examples/repeat_naive.l view
@@ -0,0 +1,2 @@+let repeat x = Cons x (repeat x)+in repeat 7
+ examples/repeat_optim.l view
@@ -0,0 +1,2 @@+let repeat x = let loop = Cons x loop in loop+in repeat 7
+ examples/sum1234.l view
@@ -0,0 +1,5 @@+let+ Cons x xs = λcons nil. cons x xs+ Nil = λcons nil. nil+ sum list = list (λx xs . (λx y . Plus x y) x (sum xs)) 0+in sum (Cons 1 (Cons 2 (Cons 3 Nil)))
+ examples/twice.l view
@@ -0,0 +1,1 @@+let twice f x = f (f x) in twice twice inc
graph-rewriting-lambdascope.cabal view
@@ -1,5 +1,5 @@ Name: graph-rewriting-lambdascope-Version: 0.4.4+Version: 0.4.5 Copyright: (c) 2010, Jan Rochel License: BSD3 License-File: LICENSE@@ -9,9 +9,10 @@ Build-Type: Simple Synopsis: Implementation of Lambdascope as an interactive graph-rewriting system Description:- Lambdascope is an optimal implementation of the λβ-calculus described in the paper "Lambdascope - Another optimal implementation of the lambda-calculus" by Vincent van Oostrom, Kees-Jan van de Looij, and Marijn Zwitserlood.+ Lambdascope is an optimal implementation of the λβ-calculus described in the paper "Lambdascope - Another optimal implementation of the lambda-calculus" by Vincent van Oostrom, Kees-Jan van de Looij, and Marijn Zwitserlood. Examples of lambda terms are supplied in the "examples" directory. Category: Graphs, Application Cabal-Version: >= 1.6+Data-Files: examples/*.l Executable: lambdascope Main-Is: Main.hs