fredokun / arbogen Goto Github PK
View Code? Open in Web Editor NEWa fast uniform random tree generator
License: GNU General Public License v2.0
a fast uniform random tree generator
License: GNU General Public License v2.0
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
If the user sets a min that is bigger then the max in his grammar , Arbogen doesn't detect the problem and keeps running trying to find the tree.
Add the possibility to sample several trees with same parameters
Is it worth doing indentation in dot files ?
It causes performance issue :
for example, with examples/binary100000.spec settings and seed=4242,
it takes 14 seconds on my machine to generate and export the tree to non-indented dot file, vs. almost 3 minutes with indentation.
Another spec that should actually work (was proposed by Mr Antoine)
set zstart 0.1;
set min 10;
set max 2000;
set try 500;
Tree ::= Leaf * * + Tree * SEQ(Tree) * ;
Pour le packaging Debian j'ai un idée , pourquoi pas notre script de packaging soit global et pas pour un architecture specific. Ca vaut dire quand on lance le script il détecte l'architecture d'ordinateur et tous cas il va compile après donc on est sure notre exécutable va marcher. Ca nous fait un script pour tous et pas plusier.
We currently try to do singular sampling regardless of the grammar at play.
This approach is numerically unstable and fails on linear grammars.
It seems better to tune the value of the parameter z
so that the expected size of the output matches size_max
./bin/arbogen.native -seed 42424242 -min 10 -max 20 examples/binary.spec
A ...:'....:'':...':......
R :'' ._ . `. \ , '':
B ': . " .| \ `>/ _.-':
O .:' .`'. `-. '. /' ,.. .:
G :' `. `\| \./ ' :
E :. ,,-''''' "-. | | ....:
N '. ..''' `\ : |
'''''''' \' |
*fast* uniform random | =|
tree generator | |
|- |
'''''''''''''''''''''''''''''''''''''''
(C) F. Peschanski et al. under the GPL
Loading grammar file: examples/binary.spec
==> Grammar file loaded
Generating tree
Random number generator used is ocaml
==> Tree generated with 23 nodes
[[[[],[[],[]]],[[[[],[]],[]],[]]],[]]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.