Candidate programs: code plus the provenance that justifies it.
{:code program text :via realization and wrapper ids, pre-order :requires every capability the text relies on :stack languages from outermost to innermost}
Candidate programs: code plus the provenance that justifies it.
{:code program text
:via realization and wrapper ids, pre-order
:requires every capability the text relies on
:stack languages from outermost to innermost}(best-first entries)Lazy seq of candidates, cheapest :cost first, from queue entries:
a candidate emitted when popped {:open f ...} a bound: f returns an ascending seq of entries {:stream s ...} an ascending seq of entries, opened one at a time
An entry's :cost is a lower bound for everything it opens; :key ranks ties. A bound costs nothing until it reaches the front of the queue.
Lazy seq of candidates, cheapest :cost first, from queue entries:
a candidate emitted when popped
{:open f ...} a bound: f returns an ascending seq of entries
{:stream s ...} an ascending seq of entries, opened one at a time
An entry's :cost is a lower bound for everything it opens; :key ranks
ties. A bound costs nothing until it reaches the front of the queue.(combine f & seqs)Lazy product of candidate seqs, cheapest total cost first. Each seq must be ascending by :cost. f receives the codes and returns the combined code. Ties pop by key, then by index tuple, so the walk is deterministic.
Lazy product of candidate seqs, cheapest total cost first. Each seq must be ascending by :cost. f receives the codes and returns the combined code. Ties pop by key, then by index tuple, so the walk is deterministic.
(entry-kind e)The kind of queue entry e: :bound when it has an :open fn, :stream when it has a :stream, else :candidate.
The kind of queue entry e: :bound when it has an :open fn, :stream when it has a :stream, else :candidate.
What popping entry e yields: {:emit candidate} or {:enqueue entries}, entries to push in order. Only a popped bound calls its :open, and only a popped stream realizes its next element.
What popping entry e yields: {:emit candidate} or {:enqueue entries},
entries to push in order. Only a popped bound calls its :open, and only a
popped stream realizes its next element.(leaf code)A single candidate from an encoder result, or none when it returned nil. It costs nothing by itself; stamp adds the realization's cost.
A single candidate from an encoder result, or none when it returned nil. It costs nothing by itself; stamp adds the realization's cost.
(merge-parts f parts)One candidate from candidates parts, in order: :code is f applied to their codes, :via and :key concatenate, :requires unions, :stack is the longest, :cost sums.
One candidate from candidates parts, in order: :code is f applied to their codes, :via and :key concatenate, :requires unions, :stack is the longest, :cost sums.
(pop-min queue)[e rest] for the least entry e of queue and the queue without it, or nil when queue is empty. e carries no insertion number.
[e rest] for the least entry e of queue and the queue without it, or nil when queue is empty. e carries no insertion number.
(push queue e)queue with entry e added; nil leaves it unchanged. Entries of equal rank pop in the order they were pushed.
queue with entry e added; nil leaves it unchanged. Entries of equal rank pop in the order they were pushed.
(stamp cand r lang)Attribute cand to realization r rendered in lang: r's weight is added and its rank [0 cost id] leads the key.
Attribute cand to realization r rendered in lang: r's weight is added and its rank [0 cost id] leads the key.
(successors t)The index tuples after tuple t: t with one coordinate incremented, for each coordinate at or after its last nonzero one. From the zero tuple this reaches every tuple of naturals exactly once.
The index tuples after tuple t: t with one coordinate incremented, for each coordinate at or after its last nonzero one. From the zero tuple this reaches every tuple of naturals exactly once.
(weight r)What realization r adds to a candidate's :cost: its :cost, except a literal encoder, which adds nothing; its cost ranks ties through :key.
What realization r adds to a candidate's :cost: its :cost, except a literal encoder, which adds nothing; its cost ranks ties through :key.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |