This is just a brainstorm, which I hope someone will look into more deeply.

  • >x> is "and"
  • | is "or"
  • <x< is "cut" (more on this later)

Orc's evaluation order is breadth-first rather than depth-first like Prolog. In many scenarios we are only interested in the first solution (first publication), so depth-first evaluation is more efficient (this exact idea is explored in Deparallelization).

and: >x>, or: |#

Ignoring cut, the logical meaning of these combinators is obvious.

cut: <x<#

Prolog's cut operator (!) prevents backtracking. Since Orc's evaluation is breadth-first no direct translation is possible, but there is a rough analogy. "F <x< G" evaluates F with only the first possible value of G, just as G, !, F does.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-1) was last changed on 06-May-2009 17:11 by AdrianQuark