arbogen icon indicating copy to clipboard operation
arbogen copied to clipboard

issue with generating ternary trees

Open fredokun opened this issue 11 years ago • 1 comments

The following spec works:


set min 100; set max 120; set try 500;

Functor ::= Term * Term ; CFunctor ::= Term * Term ; Term ::= Name * + Functor * + CFunctor * ;


however it generates 'Term' nodes whereas 'Term' is not a directly recursive rule

If we change the same spec as follows:


set min 100; set max 120; set try 5000;

Term ::= Name * + Functor * Term * Term * + CFunctor * Term * Term * ;


then only trees of size 1 are generated

Finally, with:


set min 100; set max 120; set try 5000;

Term ::= Name * + Functor * Term * Term * * + CFunctor * Term * Term * ;


There seems to be an infinite loop

fredokun avatar Jul 12 '13 13:07 fredokun

There is no atom in these grammars, this cannot work with the current implementation.

Maybe atoms were implicitly added in a former implementation, back when this issue was posted?

I think I'm gonna close this issue unless it can be translated in to a bug with the current implementation

Kerl13 avatar Jan 19 '22 11:01 Kerl13