maciej-bendkowski / boltzmann-brain

Analytic sampler compiler for combinatorial systems
BSD 3-Clause "New" or "Revised" License
30 stars 5 forks source link

The well-foundedness check is a bit too restrictive #22

Open Kerl13 opened 4 years ago

Kerl13 commented 4 years ago

Boltzmann brain rejects the binary tree example from the example folder with the following error message:

[ERR] (18-09-2020 13:40:32) Given system is not well-founded at zero.

The grammar is:

B = Leaf (0) | Node B B.

I guess using --force on this particular example is fine but I think it'd be nice if bb could accept this type of grammars.

maciej-bendkowski commented 4 years ago

It would be a nice feature. Unfortunately, it requires the so-called general implicit theorem and, in particular, a different algorithm, see Section 5.2 of "Algorithms for Combinatorial Structures: Well-Founded Systems and Newton Iteration" by Pivoteau, Salvy, and Soria.

maciej-bendkowski commented 4 years ago

For the time being, you can use the --force flag.

Kerl13 commented 3 years ago

Oh I see, thanks for the pointer! I didn't suspect this to be that a subtle point.

If I can use the --force flag whenever I know the general implicit theorem applies, this is not a big issue then.