evaluate(|rulls*): ([Rule(head, body) | remainingrules*], goal, store*) ->
    (<Fst><evaluate(|rulls*)> (rulls*, subgoal, []), free-store*)
    where
      ...
      (local-store*, free-store*) := <unify> (head, goal, [], store*);
      ...
      <debug>free-store*; // Prints [non-empty list]
      ...
      // Same as right hand side of rule; Prints ("true", [non-empty list])
      <debug>(<Fst><evaluate(|rulls*)> (rulls*, subgoal, []), free-store*)
  ...

  // <debug> Prints ("true", [])
  evaluate-full: (rulls*, Query(goal)) -> <evaluate(|desugared-rules*);debug> (desugared-rules*, <desugar-all> goal, [])
    where ...

The problem is the output of evaluate is supposed to be ("true", [non-empty list]), as is confirmed by its final debug, but evaluate-full receives ("true", []) when calling evaluate.

Submitted on 31 May 2016 at 11:16

On 31 May 2016 at 11:21 D. Pelsmaeker commented:

Be careful with the * suffix for variables. It is actually an operator that will unroll the list in some cases and not in others.


On 1 June 2016 at 13:35 Gabriël Konat commented:

I don’t understand this code and I cannot reproduce it this way. Can you create a minimal example that reproduces the problem?


On 1 July 2016 at 16:41 Gabriël Konat closed this issue.

Log in to post comments