Conversation
This is still heavily WIP. As of this commit, lots of things are hardcoded (including the domain) and/or done in a hacky way. The sampled programs are not checked for dreamcoder compatibility, either.
another hack bites the dust
The program sampler is now much more modular w.r.t. which domain to use, supports arbitrary unigram PCFGs, does not hard-code terminals, etc. This update also removes some needless "pub" modifiers for fields, instead using getter functions.
|
@mlb2251 in |
|
I think I agree with keeping it in And I bet with some refactoring later the same implementation of |
E.g. the constant 2 will now just be listed as "2" rather than "(2)" in the generated program. This prevents it from being parsed as a list sexpr.
|
I suppose we'll wait with making more progress on this until we have some more domains to try it on. |
|
@mlb2251 am I right in thinking this has been superseded entirely by your synthesizer? If so, should we close this PR too? |
|
@theoxo lets keep it open for a little bit, I haven't totally looked into this. Right now we can enumerate but not sample in the synthesizer https://github.com/mlb2251/synthestitch |
As discussed yesterday, we would probably benefit from having a way to synthesize test programs from a domain specification. This would allow us to test new features, and in the long term might even prove useful internally too (e.g. using synthesized programs to find library fns).
This is heavily WIP. TODO:
Handle multi-arg functions with nested apps (i.e. classical lambda calc style - dreamcoder requires this, right?)No need for this I suppose if apps aren't needed