From 88006e957373bbd72ec68897474303964885fc68 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 1 Nov 2017 13:36:15 -0400 Subject: - Minor refactorings. - Fixed some bugs. - Enabled macro-expansion for statements. --- .../test/luxc/lang/analysis/procedure/host.jvm.lux | 2 +- new-luxc/test/test/luxc/lang/analysis/type.lux | 4 +- new-luxc/test/test/luxc/lang/translation/case.lux | 28 +++--- .../test/test/luxc/lang/translation/function.lux | 16 +-- .../test/test/luxc/lang/translation/primitive.lux | 8 +- .../luxc/lang/translation/procedure/common.jvm.lux | 56 +++++------ .../luxc/lang/translation/procedure/host.jvm.lux | 112 ++++++++++----------- .../test/test/luxc/lang/translation/reference.lux | 12 +-- .../test/test/luxc/lang/translation/structure.lux | 10 +- 9 files changed, 124 insertions(+), 124 deletions(-) (limited to 'new-luxc/test') diff --git a/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux b/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux index cda281e04..0f8848a21 100644 --- a/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux +++ b/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux @@ -34,7 +34,7 @@ [(def: ( procedure params output-type) (-> Text (List Code) Type Bool) (|> (do Monad - [runtime-bytecode @runtime;generate] + [runtime-bytecode @runtime;translate] (&;with-scope (&;with-expected-type output-type (@;analyse-procedure analyse evalL;eval procedure params)))) diff --git a/new-luxc/test/test/luxc/lang/analysis/type.lux b/new-luxc/test/test/luxc/lang/analysis/type.lux index 78107ecb6..e93068ea3 100644 --- a/new-luxc/test/test/luxc/lang/analysis/type.lux +++ b/new-luxc/test/test/luxc/lang/analysis/type.lux @@ -53,7 +53,7 @@ ($_ seq (test (format "Can analyse type-checking.") (|> (do Monad - [runtime-bytecode @runtime;generate] + [runtime-bytecode @runtime;translate] (&;with-scope (@common;with-unknown-type (@;analyse-check analyse eval;eval typeC exprC)))) @@ -78,7 +78,7 @@ false))) (test (format "Can analyse type-coercion.") (|> (do Monad - [runtime-bytecode @runtime;generate] + [runtime-bytecode @runtime;translate] (&;with-scope (@common;with-unknown-type (@;analyse-coerce analyse eval;eval typeC exprC)))) diff --git a/new-luxc/test/test/luxc/lang/translation/case.lux b/new-luxc/test/test/luxc/lang/translation/case.lux index 3a8608ea7..ace2e0290 100644 --- a/new-luxc/test/test/luxc/lang/translation/case.lux +++ b/new-luxc/test/test/luxc/lang/translation/case.lux @@ -68,16 +68,16 @@ [[valueS pathS] gen-case to-bind r;nat] ($_ seq - (test "Can generate pattern-matching." + (test "Can translate pattern-matching." (|> (do meta;Monad - [runtime-bytecode @runtime;generate - sampleI (@;generate-case expressionT;generate - valueS - (` ("lux case alt" - ("lux case seq" (~ pathS) - ("lux case exec" true)) - ("lux case seq" ("lux case bind" +0) - ("lux case exec" false)))))] + [runtime-bytecode @runtime;translate + sampleI (@;translate-case expressionT;translate + valueS + (` ("lux case alt" + ("lux case seq" (~ pathS) + ("lux case exec" true)) + ("lux case seq" ("lux case bind" +0) + ("lux case exec" false)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -87,11 +87,11 @@ false))) (test "Can bind values." (|> (do meta;Monad - [runtime-bytecode @runtime;generate - sampleI (@;generate-case expressionT;generate - (code;nat to-bind) - (` ("lux case seq" ("lux case bind" +0) - ("lux case exec" (0)))))] + [runtime-bytecode @runtime;translate + sampleI (@;translate-case expressionT;translate + (code;nat to-bind) + (` ("lux case seq" ("lux case bind" +0) + ("lux case exec" (0)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) diff --git a/new-luxc/test/test/luxc/lang/translation/function.lux b/new-luxc/test/test/luxc/lang/translation/function.lux index 1896adff3..999f4f432 100644 --- a/new-luxc/test/test/luxc/lang/translation/function.lux +++ b/new-luxc/test/test/luxc/lang/translation/function.lux @@ -48,8 +48,8 @@ ($_ seq (test "Can read arguments." (|> (do meta;Monad - [runtime-bytecode @runtime;generate - sampleI (expressionT;generate (` ("lux call" (~ functionS) (~@ argsS))))] + [runtime-bytecode @runtime;translate + sampleI (expressionT;translate (` ("lux call" (~ functionS) (~@ argsS))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -63,10 +63,10 @@ [#let [partial-arity (n.inc cut-off) preS (list;take partial-arity argsS) postS (list;drop partial-arity argsS)] - runtime-bytecode @runtime;generate - sampleI (expressionT;generate (` ("lux call" - ("lux call" (~ functionS) (~@ preS)) - (~@ postS))))] + runtime-bytecode @runtime;translate + sampleI (expressionT;translate (` ("lux call" + ("lux call" (~ functionS) (~@ preS)) + (~@ postS))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -87,8 +87,8 @@ functionS (` ("lux function" (~ (code;nat super-arity)) [] ("lux function" (~ (code;nat sub-arity)) [(~@ (list/map code;int env))] ((~ (code;int arg-var))))))] - runtime-bytecode @runtime;generate - sampleI (expressionT;generate (` ("lux call" (~ functionS) (~@ argsS))))] + runtime-bytecode @runtime;translate + sampleI (expressionT;translate (` ("lux call" (~ functionS) (~@ argsS))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) diff --git a/new-luxc/test/test/luxc/lang/translation/primitive.lux b/new-luxc/test/test/luxc/lang/translation/primitive.lux index 8604ed369..e8aaddb5a 100644 --- a/new-luxc/test/test/luxc/lang/translation/primitive.lux +++ b/new-luxc/test/test/luxc/lang/translation/primitive.lux @@ -30,9 +30,9 @@ %text% (r;text +5)] (with-expansions [ (do-template [ ] - [(test (format "Can generate " ".") + [(test (format "Can translate " ".") (|> (do meta;Monad - [sampleI (expressionT;generate ( ))] + [sampleI (expressionT;translate ( ))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -48,9 +48,9 @@ ["frac" Frac code;frac %frac% f.=] ["text" Text code;text %text% T/=])] ($_ seq - (test "Can generate unit." + (test "Can translate unit." (|> (do meta;Monad - [sampleI (expressionT;generate (' []))] + [sampleI (expressionT;translate (' []))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) diff --git a/new-luxc/test/test/luxc/lang/translation/procedure/common.jvm.lux b/new-luxc/test/test/luxc/lang/translation/procedure/common.jvm.lux index 8c44007d0..e15627851 100644 --- a/new-luxc/test/test/luxc/lang/translation/procedure/common.jvm.lux +++ b/new-luxc/test/test/luxc/lang/translation/procedure/common.jvm.lux @@ -31,8 +31,8 @@ (with-expansions [ (do-template [ ] [(test (|> (do meta;Monad - [sampleI (expressionT;generate (` ( (~ (code;nat subject)) - (~ (code;nat param)))))] + [sampleI (expressionT;translate (` ( (~ (code;nat subject)) + (~ (code;nat param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -50,7 +50,7 @@ ($_ seq (test "bit count" (|> (do meta;Monad - [sampleI (expressionT;generate (` ("bit count" (~ (code;nat subject)))))] + [sampleI (expressionT;translate (` ("bit count" (~ (code;nat subject)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -62,9 +62,9 @@ (test "bit shift-right" (|> (do meta;Monad - [sampleI (expressionT;generate (` ("bit shift-right" - (~ (code;int (nat-to-int subject))) - (~ (code;nat param)))))] + [sampleI (expressionT;translate (` ("bit shift-right" + (~ (code;int (nat-to-int subject))) + (~ (code;nat param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -84,7 +84,7 @@ (~~ (do-template [ ] [(test (|> (do meta;Monad - [sampleI (expressionT;generate (` ()))] + [sampleI (expressionT;translate (` ()))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -99,7 +99,7 @@ (~~ (do-template [ ] [(test (|> (do meta;Monad - [sampleI (expressionT;generate (` ( (~ (code;nat subject)))))] + [sampleI (expressionT;translate (` ( (~ (code;nat subject)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -114,8 +114,8 @@ (~~ (do-template [ ] [(test (|> (do meta;Monad - [runtime-bytecode @runtime;generate - sampleI (expressionT;generate (` ( (~ (code;nat subject)) (~ (code;nat param)))))] + [runtime-bytecode @runtime;translate + sampleI (expressionT;translate (` ( (~ (code;nat subject)) (~ (code;nat param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -142,7 +142,7 @@ (with-expansions [ (do-template [ ] [(test (|> (do meta;Monad - [sampleI (expressionT;generate (` ()))] + [sampleI (expressionT;translate (` ()))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -157,7 +157,7 @@ (do-template [ ] [(test (|> (do meta;Monad - [sampleI (expressionT;generate (` ( (~ (code;int subject)))))] + [sampleI (expressionT;translate (` ( (~ (code;int subject)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -172,8 +172,8 @@ (do-template [ ] [(test (|> (do meta;Monad - [runtime-bytecode @runtime;generate - sampleI (expressionT;generate (` ( (~ (code;int subject)) (~ (code;int param)))))] + [runtime-bytecode @runtime;translate + sampleI (expressionT;translate (` ( (~ (code;int subject)) (~ (code;int param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -204,8 +204,8 @@ (with-expansions [ (do-template [ ] [(test (|> (do meta;Monad - [runtime-bytecode @runtime;generate - sampleI (expressionT;generate (` ( (~ (code;frac subject)) (~ (code;frac param)))))] + [runtime-bytecode @runtime;translate + sampleI (expressionT;translate (` ( (~ (code;frac subject)) (~ (code;frac param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -234,7 +234,7 @@ (with-expansions [ (do-template [ ] [(test (|> (do meta;Monad - [sampleI (expressionT;generate (` ()))] + [sampleI (expressionT;translate (` ()))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -253,8 +253,8 @@ (do-template [ ] [(test (|> (do meta;Monad - [runtime-bytecode @runtime;generate - sampleI (expressionT;generate (` ( (~ (code;frac subject)))))] + [runtime-bytecode @runtime;translate + sampleI (expressionT;translate (` ( (~ (code;frac subject)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -271,8 +271,8 @@ (test "frac encode|decode" (|> (do meta;Monad - [runtime-bytecode @runtime;generate - sampleI (expressionT;generate (` ("frac decode" ("frac encode" (~ (code;frac subject))))))] + [runtime-bytecode @runtime;translate + sampleI (expressionT;translate (` ("frac decode" ("frac encode" (~ (code;frac subject))))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (^multi (#e;Success valueT) @@ -300,7 +300,7 @@ (~~ (do-template [ ] [(test (|> (do meta;Monad - [sampleI (expressionT;generate (` ()))] + [sampleI (expressionT;translate (` ()))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -315,8 +315,8 @@ (~~ (do-template [ ] [(test (|> (do meta;Monad - [runtime-bytecode @runtime;generate - sampleI (expressionT;generate (` ( (~ (code;deg subject)))))] + [runtime-bytecode @runtime;translate + sampleI (expressionT;translate (` ( (~ (code;deg subject)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -330,8 +330,8 @@ (~~ (do-template [ ] [(test (|> (do meta;Monad - [runtime-bytecode @runtime;generate - sampleI (expressionT;generate (` ( (~ (code;deg subject)) (~ (code;deg param)))))] + [runtime-bytecode @runtime;translate + sampleI (expressionT;translate (` ( (~ (code;deg subject)) (~ (code;deg param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -351,8 +351,8 @@ (~~ (do-template [ ] [(test (|> (do meta;Monad - [runtime-bytecode @runtime;generate - sampleI (expressionT;generate (` ( (~ (code;deg subject)) (~ (code;nat special)))))] + [runtime-bytecode @runtime;translate + sampleI (expressionT;translate (` ( (~ (code;deg subject)) (~ (code;nat special)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) diff --git a/new-luxc/test/test/luxc/lang/translation/procedure/host.jvm.lux b/new-luxc/test/test/luxc/lang/translation/procedure/host.jvm.lux index 35453c44b..0dd539120 100644 --- a/new-luxc/test/test/luxc/lang/translation/procedure/host.jvm.lux +++ b/new-luxc/test/test/luxc/lang/translation/procedure/host.jvm.lux @@ -32,7 +32,7 @@ (with-expansions [<2step> (do-template [ ] [(test (format " / " ) (|> (do meta;Monad - [sampleI (expressionT;generate (|> (~ ( )) (`)))] + [sampleI (expressionT;translate (|> (~ ( )) (`)))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -63,7 +63,7 @@ (~~ (do-template [ ] [(test (format " / " " / " ) (|> (do meta;Monad - [sampleI (expressionT;generate (|> (~ ( )) (`)))] + [sampleI (expressionT;translate (|> (~ ( )) (`)))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -89,7 +89,7 @@ (~~ (do-template [ ] [(test (format " / " " / " ) (|> (do meta;Monad - [sampleI (expressionT;generate (|> (~ ( )) (`)))] + [sampleI (expressionT;translate (|> (~ ( )) (`)))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueT) @@ -127,9 +127,9 @@ (with-expansions [ (do-template [ ] [(test (|> (do meta;Monad - [sampleI (expressionT;generate (` ( ((~ (code;text )) - (
 (~ ( subject)))
-                                                                                               (
 (~ ( param)))))))]
+                                                    [sampleI (expressionT;translate (` ( ((~ (code;text ))
+                                                                                                (
 (~ ( subject)))
+                                                                                                (
 (~ ( param)))))))]
                                                     (@eval;eval sampleI))
                                                   (meta;run (init-compiler []))
                                                   (case> (#e;Success valueT)
@@ -165,9 +165,9 @@
                    (~~ (do-template [ ]
                          [(test 
                                 (|> (do meta;Monad
-                                      [sampleI (expressionT;generate (` ( ((~ (code;text ))
-                                                                                 ( (~ (code;nat subject)))
-                                                                                 ( (~ (code;nat param)))))))]
+                                      [sampleI (expressionT;translate (` ( ((~ (code;text ))
+                                                                                  ( (~ (code;nat subject)))
+                                                                                  ( (~ (code;nat param)))))))]
                                       (@eval;eval sampleI))
                                     (meta;run (init-compiler []))
                                     (case> (#e;Success valueT)
@@ -198,9 +198,9 @@
                    (~~ (do-template [     
]
                          [(test 
                                 (|> (do meta;Monad
-                                      [sampleI (expressionT;generate (` ( ((~ (code;text ))
-                                                                                 ( (~ (
 subject)))
-                                                                                 ("jvm convert long-to-int" (~ (code;nat shift)))))))]
+                                      [sampleI (expressionT;translate (` ( ((~ (code;text ))
+                                                                                  ( (~ (
 subject)))
+                                                                                  ("jvm convert long-to-int" (~ (code;nat shift)))))))]
                                       (@eval;eval sampleI))
                                     (meta;run (init-compiler []))
                                     (case> (#e;Success valueT)
@@ -229,9 +229,9 @@
            (with-expansions [ (do-template [ ]
                                        [(test 
                                               (|> (do meta;Monad
-                                                    [sampleI (expressionT;generate (` ((~ (code;text ))
-                                                                                       (
 (~ ( subject)))
-                                                                                       (
 (~ ( param))))))]
+                                                    [sampleI (expressionT;translate (` ((~ (code;text ))
+                                                                                        (
 (~ ( subject)))
+                                                                                        (
 (~ ( param))))))]
                                                     (@eval;eval sampleI))
                                                   (meta;run (init-compiler []))
                                                   (case> (#e;Success valueT)
@@ -283,12 +283,12 @@
         (with-expansions [ (do-template [     ]
                                     [(test 
                                            (|> (do meta;Monad
-                                                 [sampleI (expressionT;generate (|> (jvm//array//new +0  size)
-                                                                                    (jvm//array//write  idx )
-                                                                                    (jvm//array//read  idx)
-                                                                                    (~)
-                                                                                    
-                                                                                    (`)))]
+                                                 [sampleI (expressionT;translate (|> (jvm//array//new +0  size)
+                                                                                     (jvm//array//write  idx )
+                                                                                     (jvm//array//read  idx)
+                                                                                     (~)
+                                                                                     
+                                                                                     (`)))]
                                                  (@eval;eval sampleI))
                                                (meta;run (init-compiler []))
                                                (case> (#e;Success outputZ)
@@ -332,12 +332,12 @@
         (with-expansions [ (do-template [     ]
                                     [(test 
                                            (|> (do meta;Monad
-                                                 [sampleI (expressionT;generate (|> (jvm//array//new +0  size)
-                                                                                    (jvm//array//write  idx )
-                                                                                    (jvm//array//read  idx)
-                                                                                    (~)
-                                                                                    
-                                                                                    (`)))]
+                                                 [sampleI (expressionT;translate (|> (jvm//array//new +0  size)
+                                                                                     (jvm//array//write  idx )
+                                                                                     (jvm//array//read  idx)
+                                                                                     (~)
+                                                                                     
+                                                                                     (`)))]
                                                  (@eval;eval sampleI))
                                                (meta;run (init-compiler []))
                                                (case> (#e;Success outputT)
@@ -360,11 +360,11 @@
                           [#let [inner (|> ("jvm array new" +0 "java.lang.Double" (~ (code;nat size)))
                                            ("jvm array write" "java.lang.Double" (~ (code;nat idx)) (~ (code;frac valueD)))
                                            (`))]
-                           sampleI (expressionT;generate (|> ("jvm array new" +1 "java.lang.Double" (~ (code;nat size)))
-                                                             ("jvm array write" "#Array" (~ (code;nat idx)) (~ inner))
-                                                             ("jvm array read" "#Array" (~ (code;nat idx)))
-                                                             ("jvm array read" "java.lang.Double" (~ (code;nat idx)))
-                                                             (`)))]
+                           sampleI (expressionT;translate (|> ("jvm array new" +1 "java.lang.Double" (~ (code;nat size)))
+                                                              ("jvm array write" "#Array" (~ (code;nat idx)) (~ inner))
+                                                              ("jvm array read" "#Array" (~ (code;nat idx)))
+                                                              ("jvm array read" "java.lang.Double" (~ (code;nat idx)))
+                                                              (`)))]
                           (@eval;eval sampleI))
                         (meta;run (init-compiler []))
                         (case> (#e;Success outputT)
@@ -374,7 +374,7 @@
                                false)))
               (test "jvm array length"
                     (|> (do meta;Monad
-                          [sampleI (expressionT;generate (` ("jvm array length" ("jvm array new" +0 "java.lang.Object" (~ (code;nat size))))))]
+                          [sampleI (expressionT;translate (` ("jvm array length" ("jvm array new" +0 "java.lang.Object" (~ (code;nat size))))))]
                           (@eval;eval sampleI))
                         (meta;run (init-compiler []))
                         (case> (#e;Success outputT)
@@ -424,7 +424,7 @@
         ($_ seq
             (test "jvm object null"
                   (|> (do meta;Monad
-                        [sampleI (expressionT;generate (` ("jvm object null?" ("jvm object null"))))]
+                        [sampleI (expressionT;translate (` ("jvm object null?" ("jvm object null"))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputT)
@@ -434,7 +434,7 @@
                              false)))
             (test "jvm object null?"
                   (|> (do meta;Monad
-                        [sampleI (expressionT;generate (` ("jvm object null?" (~ (code;int sample)))))]
+                        [sampleI (expressionT;translate (` ("jvm object null?" (~ (code;int sample)))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputT)
@@ -444,7 +444,7 @@
                              false)))
             (test "jvm object synchronized"
                   (|> (do meta;Monad
-                        [sampleI (expressionT;generate (` ("jvm object synchronized" (~ (code;int monitor)) (~ (code;int sample)))))]
+                        [sampleI (expressionT;translate (` ("jvm object synchronized" (~ (code;int monitor)) (~ (code;int sample)))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputT)
@@ -454,11 +454,11 @@
                              false)))
             (test "jvm object throw"
                   (|> (do meta;Monad
-                        [_ @runtime;generate
-                         sampleI (expressionT;generate (` ("lux try" ("lux function" +1 []
-                                                                      ("jvm object throw" ("jvm member invoke constructor"
-                                                                                           "java.lang.Throwable"
-                                                                                           (~ exception-message$)))))))]
+                        [_ @runtime;translate
+                         sampleI (expressionT;translate (` ("lux try" ("lux function" +1 []
+                                                                       ("jvm object throw" ("jvm member invoke constructor"
+                                                                                            "java.lang.Throwable"
+                                                                                            (~ exception-message$)))))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputT)
@@ -473,7 +473,7 @@
                              false)))
             (test "jvm object class"
                   (|> (do meta;Monad
-                        [sampleI (expressionT;generate (` ("jvm object class" (~ (code;text class)))))]
+                        [sampleI (expressionT;translate (` ("jvm object class" (~ (code;text class)))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputT)
@@ -483,7 +483,7 @@
                              false)))
             (test "jvm object instance?"
                   (|> (do meta;Monad
-                        [sampleI (expressionT;generate (` ("jvm object instance?" (~ (code;text instance-class)) (~ instance))))]
+                        [sampleI (expressionT;translate (` ("jvm object instance?" (~ (code;text instance-class)) (~ instance))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputT)
@@ -513,7 +513,7 @@
         ($_ seq
             (test "jvm member static get"
                   (|> (do meta;Monad
-                        [sampleI (expressionT;generate (` ("jvm convert int-to-long" ("jvm member static get" "java.util.GregorianCalendar" "AD" "int"))))]
+                        [sampleI (expressionT;translate (` ("jvm convert int-to-long" ("jvm member static get" "java.util.GregorianCalendar" "AD" "int"))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputT)
@@ -523,8 +523,8 @@
                              false)))
             (test "jvm member static put"
                   (|> (do meta;Monad
-                        [sampleI (expressionT;generate (` ("jvm member static put" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor"
-                                                           ("jvm member static get" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor"))))]
+                        [sampleI (expressionT;translate (` ("jvm member static put" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor"
+                                                            ("jvm member static get" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor"))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputT)
@@ -534,7 +534,7 @@
                              false)))
             (test "jvm member virtual get"
                   (|> (do meta;Monad
-                        [sampleI (expressionT;generate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String" (~ value-memberS))))]
+                        [sampleI (expressionT;translate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String" (~ value-memberS))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputT)
@@ -544,9 +544,9 @@
                              false)))
             (test "jvm member virtual put"
                   (|> (do meta;Monad
-                        [sampleI (expressionT;generate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String"
-                                                           ("jvm member virtual put" "org.omg.CORBA.ValueMember" "name" "java.lang.String"
-                                                            (~ (code;text other-sample-string)) (~ value-memberS)))))]
+                        [sampleI (expressionT;translate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String"
+                                                            ("jvm member virtual put" "org.omg.CORBA.ValueMember" "name" "java.lang.String"
+                                                             (~ (code;text other-sample-string)) (~ value-memberS)))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputT)
@@ -571,7 +571,7 @@
         ($_ seq
             (test "jvm member invoke static"
                   (|> (do meta;Monad
-                        [sampleI (expressionT;generate (` ("jvm member invoke static" "java.lang.Long" "decode" "java.lang.Long" (~ coded-intS))))]
+                        [sampleI (expressionT;translate (` ("jvm member invoke static" "java.lang.Long" "decode" "java.lang.Long" (~ coded-intS))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputT)
@@ -581,8 +581,8 @@
                              false)))
             (test "jvm member invoke virtual"
                   (|> (do meta;Monad
-                        [sampleI (expressionT;generate (` ("jvm member invoke virtual" "java.lang.Object" "equals" "boolean"
-                                                           (~ (code;int sample)) (~ object-longS))))]
+                        [sampleI (expressionT;translate (` ("jvm member invoke virtual" "java.lang.Object" "equals" "boolean"
+                                                            (~ (code;int sample)) (~ object-longS))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputT)
@@ -592,8 +592,8 @@
                              false)))
             (test "jvm member invoke interface"
                   (|> (do meta;Monad
-                        [sampleI (expressionT;generate (` ("jvm member invoke interface" "java.util.Collection" "add" "boolean"
-                                                           (~ array-listS) (~ object-longS))))]
+                        [sampleI (expressionT;translate (` ("jvm member invoke interface" "java.util.Collection" "add" "boolean"
+                                                            (~ array-listS) (~ object-longS))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputT)
@@ -603,7 +603,7 @@
                              false)))
             (test "jvm member invoke constructor"
                   (|> (do meta;Monad
-                        [sampleI (expressionT;generate array-listS)]
+                        [sampleI (expressionT;translate array-listS)]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputT)
diff --git a/new-luxc/test/test/luxc/lang/translation/reference.lux b/new-luxc/test/test/luxc/lang/translation/reference.lux
index 0bc2bb325..1aee7df46 100644
--- a/new-luxc/test/test/luxc/lang/translation/reference.lux
+++ b/new-luxc/test/test/luxc/lang/translation/reference.lux
@@ -47,8 +47,8 @@
             (test "Can refer to definitions."
                   (|> (do meta;Monad
                         [_ (_module;with-module +0 module-name
-                             (statementT;generate-def def-name Int valueI empty-metaI (' {})))
-                         sampleI (expressionT;generate (code;symbol [module-name def-name]))]
+                             (statementT;translate-def def-name Int valueI empty-metaI (' {})))
+                         sampleI (expressionT;translate (code;symbol [module-name def-name]))]
                         (evalT;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success valueT)
@@ -66,10 +66,10 @@
         ($_ seq
             (test "Can refer to local variables/registers."
                   (|> (do meta;Monad
-                        [sampleI (caseT;generate-let expressionT;generate
-                                                     register
-                                                     (code;int value)
-                                                     (` ((~ (code;int (nat-to-int register))))))]
+                        [sampleI (caseT;translate-let expressionT;translate
+                                                      register
+                                                      (code;int value)
+                                                      (` ((~ (code;int (nat-to-int register))))))]
                         (evalT;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputT)
diff --git a/new-luxc/test/test/luxc/lang/translation/structure.lux b/new-luxc/test/test/luxc/lang/translation/structure.lux
index a8f74ec6a..f32ab40e1 100644
--- a/new-luxc/test/test/luxc/lang/translation/structure.lux
+++ b/new-luxc/test/test/luxc/lang/translation/structure.lux
@@ -65,9 +65,9 @@
       (do @
         [size (|> r;nat (:: @ map (|>. (n.% +10) (n.max +2))))
          members (r;list size gen-primitive)]
-        (test "Can generate tuple."
+        (test "Can translate tuple."
               (|> (do meta;Monad
-                    [sampleI (expressionT;generate (code;tuple members))]
+                    [sampleI (expressionT;translate (code;tuple members))]
                     (@eval;eval sampleI))
                   (meta;run (init-compiler []))
                   (case> (#e;Success valueT)
@@ -85,10 +85,10 @@
          tag (|> r;nat (:: @ map (n.% num-tags)))
          #let [last? (n.= (n.dec num-tags) tag)]
          member gen-primitive]
-        (test "Can generate variant."
+        (test "Can translate variant."
               (|> (do meta;Monad
-                    [runtime-bytecode @runtime;generate
-                     sampleI (expressionT;generate (` ((~ (code;nat tag)) (~ (code;bool last?)) (~ member))))]
+                    [runtime-bytecode @runtime;translate
+                     sampleI (expressionT;translate (` ((~ (code;nat tag)) (~ (code;bool last?)) (~ member))))]
                     (@eval;eval sampleI))
                   (meta;run (init-compiler []))
                   (case> (#e;Success valueT)
-- 
cgit v1.2.3