From 35224ee4d78093f48c6c902edbb22f409e0cf66f Mon Sep 17 00:00:00 2001 From: "M.V. Hutz" Date: Sun, 11 Jan 2026 20:31:36 -0500 Subject: [PATCH] style: renamed samples to tests --- cmd/lambda/benchmark_test.go | 10 +++---- samples/church.txt | 7 ----- samples/fast.txt | 11 -------- samples/saccharine.txt | 52 ------------------------------------ samples/simple.txt | 16 ----------- samples/thunk.txt | 1 - 6 files changed, 5 insertions(+), 92 deletions(-) delete mode 100644 samples/church.txt delete mode 100644 samples/fast.txt delete mode 100644 samples/saccharine.txt delete mode 100644 samples/simple.txt delete mode 100644 samples/thunk.txt diff --git a/cmd/lambda/benchmark_test.go b/cmd/lambda/benchmark_test.go index ed5d871..eec47df 100644 --- a/cmd/lambda/benchmark_test.go +++ b/cmd/lambda/benchmark_test.go @@ -51,11 +51,11 @@ func runSample(samplePath string) error { // Benchmark all samples using sub-benchmarks. func BenchmarkSamples(b *testing.B) { samples := map[string]string{ - "Church": "../../samples/church.txt", - "Fast": "../../samples/fast.txt", - "Saccharine": "../../samples/saccharine.txt", - "Simple": "../../samples/simple.txt", - "Thunk": "../../samples/thunk.txt", + "Church": "../../samples/church.test", + "Fast": "../../samples/fast.test", + "Saccharine": "../../samples/saccharine.test", + "Simple": "../../samples/simple.test", + "Thunk": "../../samples/thunk.test", } for name, path := range samples { diff --git a/samples/church.txt b/samples/church.txt deleted file mode 100644 index ca9c44e..0000000 --- a/samples/church.txt +++ /dev/null @@ -1,7 +0,0 @@ -0 := \f.\x.x -inc n := \f x.(f (n f x)) -exp n m := (m n) - -N := (inc (inc (inc (inc (inc (inc 0)))))) - -(exp N N) diff --git a/samples/fast.txt b/samples/fast.txt deleted file mode 100644 index 3c84b21..0000000 --- a/samples/fast.txt +++ /dev/null @@ -1,11 +0,0 @@ -fix f := (\x.(f (x x)) \x.(f (x x))) - -inc := (fix \self.\l.(((l \x.\y.x) ((((l \x.\y.y) \x.\y.x) \c.((c \x.\y.x) \c.((c \x.\y.y) (self ((l \x.\y.y) \x.\y.y))))) \c.((c \x.\y.x) \c.((c \x.\y.x) ((l \x.\y.y) \x.\y.y))))) \c.((c \x.\y.x) \c.((c \x.\y.x) \VAR0.\x.\y.y)))) -one := \c.((c \x.\y.x) \c.((c \x.\y.x) \VAR0.\x.\y.y)) -double := \N.\c.((c \x.\y.x) \c.((c \x.\y.y) N)) -print := (fix \self.\l.(((l \x.\y.x) (((((l \x.\y.y) \x.\y.x) 1) 0) (self ((l \x.\y.y) \x.\y.y)))) END)) - - -N := \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.x) \VAR0.\x.\y.y)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) - -(print N) diff --git a/samples/saccharine.txt b/samples/saccharine.txt deleted file mode 100644 index 10584cf..0000000 --- a/samples/saccharine.txt +++ /dev/null @@ -1,52 +0,0 @@ -T x y := x -F x y := y -if b t e := (b t e) - -pair a b := \c.(c a b) -left p := (p T) -right p := (p F) - -print n := (n 0 1 end) - -fix f := (\x.(f (x x)) \x.(f (x x))) - -some x := (pair T x) -none := \.F -isfull := left -unwrap := right - -nil := none -push i l := (some (pair i l)) -peek l := (left (unwrap l)) -pop l := (right (unwrap l)) - -inc := (fix \self l.{ - (if (isfull l) - (if (peek l) - (push F (self (pop l))) - (push T (pop l)) - ) - (push T nil) - ) -}) - -print := (fix \self l.{ - (if (isfull l) - ((if (peek l) 1 0) (self (pop l))) - END - ) -}) - -one := (push T nil) -double N := (push F N) - -N := - (double (double (double (double (double - (double (double (double (double (double - (double (double (double (double (double - (double (double (double (double (double - (double (double (double (double (double - (double (double (double (double (double - one)))))))))))))))))))))))))))))) - -(print N) diff --git a/samples/simple.txt b/samples/simple.txt deleted file mode 100644 index 192f069..0000000 --- a/samples/simple.txt +++ /dev/null @@ -1,16 +0,0 @@ -(\0. - (\inc. - (\add. - (\mult. - (\exp. - (exp (inc (inc (inc (inc 0)))) (inc (inc (inc (inc (inc 0)))))) - \n m.(m n) - ) - \m n f.(m (n f)) - ) - \n m.(m inc n) - ) - \n f x.(f (n f x)) - ) - \f x.x -) diff --git a/samples/thunk.txt b/samples/thunk.txt deleted file mode 100644 index 4181291..0000000 --- a/samples/thunk.txt +++ /dev/null @@ -1 +0,0 @@ -(\.VALUE anything) \ No newline at end of file