Open THinnerichs opened 2 months ago
When you say you don't get a single program, are you saying the iterator is fully exhausted without a single program? Or is it just that it doesn't find any program quickly?
It gets stuck in search and doesn't terminate.
I think the issue is that the program space is too large.
For max_depth = 3
, there are already 115643 programs.
For max_depth= 4
, I had to kill the search at ~100s millions of programs.
So max_depth= 8
is not feasible.
Especially a DFS is very tough, because then the first UniformTree
to iterate over is already very large.
One of the UniformTree
s we iterate over is:
replace_bustle(substitute_bustle(tS, tS, tS, tI), len_cvc(tS), Int(Input), Input)
Where tS
is one of the 25 terminal strings.
Where tI
is one of the 3 terminal integers.
Where Input
is one of the 4 inputs.
Making for a total of 25*25*25*3*25*4*4 = 18750000
complete programs.
However, since we enforce 3 contains constraints for 3 different Input
s, 0 of these programs are actually valid.
Unfortunately, this deduction can not be made until one of the 2 Input
holes is filled. The hole heuristic is set to left-most, so we will first enumerate all combinations of tS, tS, tS, tI, tS
, before we fill in one an Input
to conclude the tree is infeasible. In other words, we do a lot of work just to conclude the entire uniform tree is infeasible.
Implement a ContainsAll([44, 45, 46])
constraint that can immediately recognize that
replace_bustle(substitute_bustle(tS, tS, tS, tI), len_cvc(tS), Int({44, 45, 46, 47}), {44, 45, 46, 47})
is infeasible.
You say it also doesn't work with BFSIterator
, but I do get some programs that way (until it starts to attempt to enumerate large invalid uniform trees like in the example above).
When you say you don't get a single program, are you saying the iterator is fully exhausted without a single program? Or is it just that it doesn't find any program quickly?
It doesn't return any program at all for me. Speaking code:
julia> for h in iter
println(rulenode2expr(h, grammar))
end
never prints anything.
You say it also doesn't work with
BFSIterator
, but I do get some programs that way (until it starts to attempt to enumerate large invalid uniform trees like in the example above).
Hm, that is odd. I literally get no solution at all running it for 30s. No additional constraints, plain setup as above.
I am trying to generate programs over a specific benchmark. As the grammar is too wide, I am using constraints to find only programs that contain the input.
Setup
The benchmark
(re-implementation of the BUSTLE grammar for SyGuS)
Then I run
Then I add constraints to contain the inputs
which gives me the correct
Contains
constraints.Now I init my iterator.
(Also doesn't work with
BFSIterator
andRandomSearchIterator
.Issue
Now when I try to run it with
or with
iterate(iter)
, I do not get a single program. However, if I only add 2 constraints usingfor i in 1:2
instead (see above), I get all the programs I need.If I use the regular
SyGuS.SLIA
grammar for this problem everything works flawlessly. Maybe its the grammar width?