Closed ZvikaZ closed 3 years ago
ECJ's GP facility does not have arbitrary-arity GPNodes built-in. To add them would require some hacking.
Sean
On May 3, 2021, at 4:20 PM, Zvika @.***> wrote:
According to the manual, page 152 (printed at the bottom, 154 according to the PDF viewer), it seems that each GPNode must have a pre-defined number of children:
gp.fs.0.func.2 = ec.app.myapp.Mul gp.fs.0.func.2.nc = nc2 gp.fs.0.func.3 = ec.app.myapp.Sub gp.fs.0.func.3.nc = nc2 gp.fs.0.func.4 = ec.app.myapp.Sin gp.fs.0.func.4.nc = nc1
Where in ncN the N defines the number of children - one for Sin, and always two for Mul. However, we're trying to build here Lisp expressions, and in Lisp it's possible to have different number of parameters to function - ( 2 3) is legal, but also ( 2 3 37).
How can we express that notion in ECJ?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Thanks. Closing.
According to the manual, page 152 (printed at the bottom, 154 according to the PDF viewer), it seems that each
GPNode
must have a pre-defined number of children:Where in
ncN
theN
defines the number of children - one forSin
, and always two forMul
. However, we're trying to build here Lisp expressions, and in Lisp it's possible to have different number of parameters to function -(* 2 3)
is legal, but also(* 2 3 37)
.How can we express that notion in ECJ?