diff options
Diffstat (limited to '')
14 files changed, 37 insertions, 43 deletions
diff --git a/new-luxc/test/test/luxc/generator/case.lux b/new-luxc/test/test/luxc/generator/case.lux index 7763cd852..e4201a30b 100644 --- a/new-luxc/test/test/luxc/generator/case.lux +++ b/new-luxc/test/test/luxc/generator/case.lux @@ -11,7 +11,6 @@ (meta [code]) test) (luxc (lang ["ls" synthesis]) - [synthesizer] (generator ["@" case] [";G" expression] ["@;" eval] diff --git a/new-luxc/test/test/luxc/generator/function.lux b/new-luxc/test/test/luxc/generator/function.lux index e7a0e7d61..2db2719b7 100644 --- a/new-luxc/test/test/luxc/generator/function.lux +++ b/new-luxc/test/test/luxc/generator/function.lux @@ -14,7 +14,6 @@ [host] test) (luxc (lang ["ls" synthesis]) - [synthesizer] (generator [";G" expression] ["@;" eval] ["@;" runtime] diff --git a/new-luxc/test/test/luxc/generator/primitive.lux b/new-luxc/test/test/luxc/generator/primitive.lux index 6de14d0e5..1ce93cee9 100644 --- a/new-luxc/test/test/luxc/generator/primitive.lux +++ b/new-luxc/test/test/luxc/generator/primitive.lux @@ -13,7 +13,6 @@ test) (luxc [";L" host] (lang ["ls" synthesis]) - [synthesizer] (generator [";G" expression] ["@;" runtime] ["@;" eval] diff --git a/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux b/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux index 5e3c07bea..0c24a4020 100644 --- a/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux +++ b/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux @@ -17,7 +17,6 @@ [host] test) (luxc (lang ["ls" synthesis]) - [synthesizer] (generator [";G" expression] ["@;" eval] ["@;" runtime] diff --git a/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux b/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux index d571c578b..91b20d3d4 100644 --- a/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux +++ b/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux @@ -18,7 +18,6 @@ test) (luxc [";L" host] (lang ["ls" synthesis]) - [synthesizer] (generator [";G" expression] ["@;" eval] ["@;" runtime] diff --git a/new-luxc/test/test/luxc/generator/structure.lux b/new-luxc/test/test/luxc/generator/structure.lux index 37320fa99..7c342dbc4 100644 --- a/new-luxc/test/test/luxc/generator/structure.lux +++ b/new-luxc/test/test/luxc/generator/structure.lux @@ -17,7 +17,6 @@ test) (luxc [";L" host] (lang ["ls" synthesis]) - [synthesizer] (generator [";G" expression] ["@;" eval] ["@;" runtime] diff --git a/new-luxc/test/test/luxc/synthesizer/case/special.lux b/new-luxc/test/test/luxc/lang/synthesis/case/special.lux index 30e64fc77..585c7d349 100644 --- a/new-luxc/test/test/luxc/synthesizer/case/special.lux +++ b/new-luxc/test/test/luxc/lang/synthesis/case/special.lux @@ -8,8 +8,8 @@ test) (luxc (lang ["la" analysis] ["ls" synthesis] - [";L" variable #+ Variable]) - [synthesizer]) + (synthesis [";S" expression]) + [";L" variable #+ Variable])) (../.. common)) (context: "Dummy variables." @@ -21,7 +21,7 @@ {("lux case bind" (~ (code;nat temp))) (~ (la;var (variableL;local temp)))}))]] (test "Dummy variables created to mask expressions get eliminated during synthesis." - (|> (synthesizer;synthesize maskA) + (|> (expressionS;synthesize maskA) (corresponds? maskedA)))))) (context: "Let expressions." @@ -34,7 +34,7 @@ {("lux case bind" (~ (code;nat registerA))) (~ outputA)}))]] (test "Can detect and reify simple 'let' expressions." - (|> (synthesizer;synthesize letA) + (|> (expressionS;synthesize letA) (case> (^ [_ (#;Form (list [_ (#;Text "lux let")] [_ (#;Nat registerS)] inputS outputS))]) (and (n.= registerA registerS) (corresponds? inputA inputS) @@ -58,7 +58,7 @@ {false (~ elseA) true (~ thenA)})))]] (test "Can detect and reify simple 'if' expressions." - (|> (synthesizer;synthesize ifA) + (|> (expressionS;synthesize ifA) (case> (^ [_ (#;Form (list [_ (#;Text "lux if")] inputS thenS elseS))]) (and (corresponds? inputA inputS) (corresponds? thenA thenS) diff --git a/new-luxc/test/test/luxc/synthesizer/common.lux b/new-luxc/test/test/luxc/lang/synthesis/common.lux index a74c64402..a74c64402 100644 --- a/new-luxc/test/test/luxc/synthesizer/common.lux +++ b/new-luxc/test/test/luxc/lang/synthesis/common.lux diff --git a/new-luxc/test/test/luxc/synthesizer/function.lux b/new-luxc/test/test/luxc/lang/synthesis/function.lux index cab0da847..f364536cb 100644 --- a/new-luxc/test/test/luxc/synthesizer/function.lux +++ b/new-luxc/test/test/luxc/lang/synthesis/function.lux @@ -15,8 +15,8 @@ test) (luxc (lang ["la" analysis] ["ls" synthesis] - [";L" variable #+ Variable]) - [synthesizer]) + (synthesis [";S" expression]) + [";L" variable #+ Variable])) (.. common)) (def: gen-function//constant @@ -101,7 +101,7 @@ [args3 prediction3 function3] gen-function//local] ($_ seq (test "Nested functions will get folded together." - (|> (synthesizer;synthesize function1) + (|> (expressionS;synthesize function1) (case> (^ [_ (#;Form (list [_ (#;Text "lux function")] [_ (#;Nat args)] [_ (#;Tuple captured)] output))]) (and (n.= args1 args) (corresponds? prediction1 output)) @@ -109,7 +109,7 @@ _ (n.= +0 args1)))) (test "Folded functions provide direct access to captured variables." - (|> (synthesizer;synthesize function2) + (|> (expressionS;synthesize function2) (case> (^ [_ (#;Form (list [_ (#;Text "lux function")] [_ (#;Nat args)] [_ (#;Tuple captured)] [_ (#;Form (list [_ (#;Int output)]))]))]) (and (n.= args2 args) @@ -118,7 +118,7 @@ _ false))) (test "Folded functions properly offset local variables." - (|> (synthesizer;synthesize function3) + (|> (expressionS;synthesize function3) (case> (^ [_ (#;Form (list [_ (#;Text "lux function")] [_ (#;Nat args)] [_ (#;Tuple captured)] [_ (#;Form (list [_ (#;Int output)]))]))]) (and (n.= args3 args) @@ -136,7 +136,7 @@ argsA (r;list num-args gen-primitive)] ($_ seq (test "Can synthesize function application." - (|> (synthesizer;synthesize (la;apply argsA funcA)) + (|> (expressionS;synthesize (la;apply argsA funcA)) (case> (^ [_ (#;Form (list& [_ (#;Text "lux call")] funcS argsS))]) (and (corresponds? funcA funcS) (list;every? (product;uncurry corresponds?) @@ -145,6 +145,6 @@ _ false))) (test "Function application on no arguments just synthesizes to the function itself." - (|> (synthesizer;synthesize (la;apply (list) funcA)) + (|> (expressionS;synthesize (la;apply (list) funcA)) (corresponds? funcA))) )))) diff --git a/new-luxc/test/test/luxc/synthesizer/loop.lux b/new-luxc/test/test/luxc/lang/synthesis/loop.lux index fd8c95ce1..90b303857 100644 --- a/new-luxc/test/test/luxc/synthesizer/loop.lux +++ b/new-luxc/test/test/luxc/lang/synthesis/loop.lux @@ -11,9 +11,9 @@ ["r" math/random "r/" Monad<Random>] test) (luxc (lang ["la" analysis] - ["ls" synthesis]) - [synthesizer] - (synthesizer ["&&;" loop])) + ["ls" synthesis] + (synthesis [";S" expression] + [";S" loop]))) (.. common)) (def: (does-recursion? arity exprS) @@ -129,7 +129,7 @@ [[prediction arity analysis] gen-recursion] ($_ seq (test "Can accurately identify (and then reify) tail recursion." - (case (synthesizer;synthesize analysis) + (case (expressionS;synthesize analysis) (^ [_ (#;Form (list [_ (#;Text "lux function")] [_ (#;Nat _arity)] [_ (#;Tuple _env)] _body))]) (|> _body (does-recursion? arity) @@ -145,15 +145,15 @@ [[prediction arity analysis] gen-recursion] ($_ seq (test "Can reify loops." - (case (synthesizer;synthesize (la;apply (list;repeat arity (' [])) analysis)) + (case (expressionS;synthesize (la;apply (list;repeat arity (' [])) analysis)) (^ [_ (#;Form (list [_ (#;Text "lux loop")] [_ (#;Nat in_register)] [_ (#;Tuple _inits)] _body))]) (and (n.= arity (list;size _inits)) - (not (&&loop;contains-self-reference? _body))) + (not (loopS;contains-self-reference? _body))) (^ [_ (#;Form (list& [_ (#;Text "lux call")] [_ (#;Form (list [_ (#;Text "lux function")] _arity _env _bodyS))] argsS))]) - (&&loop;contains-self-reference? _bodyS) + (loopS;contains-self-reference? _bodyS) _ false)))))) diff --git a/new-luxc/test/test/luxc/synthesizer/primitive.lux b/new-luxc/test/test/luxc/lang/synthesis/primitive.lux index 2a1490193..d907a4c04 100644 --- a/new-luxc/test/test/luxc/synthesizer/primitive.lux +++ b/new-luxc/test/test/luxc/lang/synthesis/primitive.lux @@ -8,8 +8,8 @@ ["r" math/random] test) (luxc (lang ["la" analysis] - ["ls" synthesis]) - [synthesizer])) + ["ls" synthesis] + (synthesis [";S" expression])))) (context: "Primitives" (<| (times +100) @@ -22,7 +22,7 @@ %text% (r;text +5)] (`` ($_ seq (test (format "Can synthesize unit.") - (|> (synthesizer;synthesize (' [])) + (|> (expressionS;synthesize (' [])) (case> (^code []) true @@ -30,7 +30,7 @@ false))) (~~ (do-template [<desc> <analysis> <synthesis> <sample>] [(test (format "Can synthesize " <desc> ".") - (|> (synthesizer;synthesize (<analysis> <sample>)) + (|> (expressionS;synthesize (<analysis> <sample>)) (case> [_ (<synthesis> value)] (is <sample> value) diff --git a/new-luxc/test/test/luxc/synthesizer/procedure.lux b/new-luxc/test/test/luxc/lang/synthesis/procedure.lux index c659c5e34..2263a1616 100644 --- a/new-luxc/test/test/luxc/synthesizer/procedure.lux +++ b/new-luxc/test/test/luxc/lang/synthesis/procedure.lux @@ -9,8 +9,8 @@ ["r" math/random "r/" Monad<Random>] test) (luxc (lang ["la" analysis] - ["ls" synthesis]) - [synthesizer]) + ["ls" synthesis] + (synthesis [";S" expression]))) (.. common)) (context: "Procedures" @@ -21,7 +21,7 @@ argsA (r;list num-args gen-primitive)] ($_ seq (test "Can synthesize procedure calls." - (|> (synthesizer;synthesize (la;procedure nameA argsA)) + (|> (expressionS;synthesize (la;procedure nameA argsA)) (case> (^ [_ (#;Form (list& [_ (#;Text procedure)] argsS))]) (and (text/= nameA procedure) (list;every? (product;uncurry corresponds?) diff --git a/new-luxc/test/test/luxc/synthesizer/structure.lux b/new-luxc/test/test/luxc/lang/synthesis/structure.lux index 517f087d1..eab568bbe 100644 --- a/new-luxc/test/test/luxc/synthesizer/structure.lux +++ b/new-luxc/test/test/luxc/lang/synthesis/structure.lux @@ -9,8 +9,8 @@ ["r" math/random "r/" Monad<Random>] test) (luxc (lang ["la" analysis] - ["ls" synthesis]) - [synthesizer]) + ["ls" synthesis] + (synthesis [";S" expression]))) (.. common)) (context: "Variants" @@ -21,7 +21,7 @@ memberA gen-primitive] ($_ seq (test "Can synthesize variants." - (|> (synthesizer;synthesize (la;sum tagA size +0 memberA)) + (|> (expressionS;synthesize (la;sum tagA size +0 memberA)) (case> (^ [_ (#;Form (list [_ (#;Nat tagS)] [_ (#;Bool last?S)] memberS))]) (and (n.= tagA tagS) (B/= (n.= (n.dec size) tagA) @@ -39,7 +39,7 @@ membersA (r;list size gen-primitive)] ($_ seq (test "Can synthesize tuple." - (|> (synthesizer;synthesize (la;product membersA)) + (|> (expressionS;synthesize (la;product membersA)) (case> [_ (#;Tuple membersS)] (and (n.= size (list;size membersS)) (list;every? (product;uncurry corresponds?) (list;zip2 membersA membersS))) diff --git a/new-luxc/test/tests.lux b/new-luxc/test/tests.lux index f96d5bdfc..5ec79d1e5 100644 --- a/new-luxc/test/tests.lux +++ b/new-luxc/test/tests.lux @@ -13,13 +13,13 @@ ["_;A" function] ["_;A" type] (procedure ["_;A" common] - ["_;A" host]))) - (synthesizer ["_;S" primitive] - ["_;S" structure] - (case ["_;S" special]) - ["_;S" function] - ["_;S" procedure] - ["_;S" loop]) + ["_;A" host])) + (synthesis ["_;S" primitive] + ["_;S" structure] + (case ["_;S" special]) + ["_;S" function] + ["_;S" procedure] + ["_;S" loop])) (generator ["_;G" primitive] ["_;G" structure] ["_;G" case] |