Skip to content
yuretz edited this page Jan 21, 2018 · 1 revision

Ideas for the future

Divergence mitigation

Inspired by Arrowed Core.logic.

Smarter inteleaving strategy

  1. Detect recursion by tweaking Invoke(), passing down the call stack and adding a recursion flag to Relation.
  2. Wrap IEnumerable<Context> into a class that encapsulates two parts of enumeration: a "guaranteed converging" one and a "potentially diverging" one.
  3. In Relation's Unit() and Product() take an advantage of this information to enumerate the converging branches first.

Tabling

Add automatic "tabling" support to recursive relations.

Infinite loops

Could we use knowledge about dependency variables, comparison of Context diffs added by relations and relation function purity assumption to detect some of the loops generating empty Contexts infinitely?

Clone this wiki locally