Open swasey opened 1 month ago
I confirm this is a bug (in elpi).
I think the expected behavior is the second one, that is the query term to findall_solutions
is not assigned.
In any case, you should look for the value of N in the list of results, eg findall_solutions (Gen _) [Gen N]
or something like this.
The discrepancy comes from the fact that cpp.name.gen
has only one clause so I believe Elpi does not even set up the trail to backtrack (this is a little bug IMO). If you add a second clause to gen
, then the two tests behave the same.
I clarify the doc here https://github.com/LPCIC/elpi/pull/230
Thanks for taking a look, and for adjusting the docs.
My chief concern had been that the discrepancy might be a symptom of a deeper flaw. (I do look to the list to instantiate things.)
I ran across what appears to be an inconsistency.
In the following, I invoke
findall_solutions
with two (deterministic) queries. In the first query the nameN
intest
gets unified with the solution. In the second query, it does not.