WUNDEROS · WUNDERLOG REFERENCE · PL-WL-001 · PRE-RELEASE

Wunderlog / A query language for and about agents

Wunderlog is a variant of Datalog with stratified negation, aggregation, and metric temporal operators (DatalogMTL). Facts, as stored in WunderOS, have five slots: subject, predicate, and object, plus optional context and lineage. Queries join them, select them by time, find similar facts, and trace the evidence behind a result. Each entry in this reference explains a construct, shows its syntax, and gives an example.

The shape of a query

A pentad has five slots: subject, predicate, object, context, and lineage. Variables share a binding by name. A rule joins its body, computes values, applies constraints, and projects its head.

Ssubject
Ppredicate
Oobject
Ccontext
Llineage

Write commands end in ., read commands in ?, and rule queries in ?. Transmissions group statements into sessions. A question mark alone does not imply a read-only operation: :take consumes a tuple.

(S,P,O[,C,L]) is the ASCII pentad form; ★(...) is its Unicode counterpart. A comma-separated pentad describes a pattern or result shape. ⊢(...) / :rd(...) names the non-consuming read operation. A body pattern participates in the join; a head pattern describes the answer to project. One parenthesized expression, such as (?Price + ?Tax), is grouping, and [a,b,c] is a record.

This reference states the agreed language; the source catalog records parser coverage separately. Queries need data; probes need registered indexes; operational commands need the appropriate execution surface and authority. Parsing does not establish those conditions. Refusal examples show a supported shape or correction, not a failing command.

Context and Lineage: scope and source

The first three slots say who or what is related. Context and Lineage say under which domain scope the assertion holds and where it came from. Alice can be a reviewer for project Aurora and an owner for project Orion. The project is Context; a meeting record or import that supplied the assertion is user Lineage.

These are values your application supplies and queries. WunderOS also records operational context and system provenance. They answer different questions and are not extra values that a caller can set by filling the fourth or fifth slot.

Domain values and system metadata
PartQuestion it answersExample and use
User Context · CUnder which project, case, conversation, or other domain scope does this hold?app:project_aurora. Put it in the fourth slot to restrict a pattern to that scope, or use ?Scope to return the scope.
System context · sys-CUnder which WunderOS operational scope was this recorded or evaluated?The system tracks session and ingest scope; authenticated tenant isolation and tier routing have their own controls. Reserved system context also carries internal bookkeeping such as persona and opinion data. A project name in C does not set these controls.
User Lineage · LWhich domain source is cited for this assertion?app:minutes_42, a document, speaker, or import. Put it in the fifth slot to find assertions with that citation, or use ?Source to return it.
System provenance · sys-LWhich agent recorded it, when, and through which recorded derivation?WunderOS stamps writer identity and row identity and records trace roots and lineage evidence where available. Trace and audit APIs inspect that evidence. Writing a citation in L does not set the authenticated author or mint a proof.

For example, this assertion says that Alice is a reviewer in project Aurora, citing meeting record 42. The names belong to the application; the system records its own metadata around the write.

:out(app:alice,app:role,app:reviewer,app:project_aurora,app:minutes_42).

Ask for Alice’s role in that project and return its source:

:rd(app:alice,app:role,?Role,app:project_aurora,?Source)?

Or work from the citation: find the role assertions that cite meeting record 42, returning their people, roles, and scopes.

:rd(?Who,app:role,?Role,?Scope,app:minutes_42)?

WunderOS’s language-extraction pipeline also emits reserved semantic roles: location and purpose into C, instrument and source into L. Internally these use sys.extraction.* role-map keys. Those extracted roles are distinct from the authenticated writer and cryptographic trace metadata; “source” in extracted language is not itself an attestation.

A Context value may name a financial year or a conversation, but world validity is stored in dedicated time fields. Use :valid_at and :as_of for the two clocks. Three-slot patterns leave user C and L unconstrained; they do not ask for empty system metadata.

★

A query with teeth: agent audit

Which agent tool calls disclosed restricted data without a recorded human approval? Examine completed, high-consequence actions whose policy decision required approval. Follow the actor, delegated run, declared purpose, policy version, and linked audit receipts. Exclude approved actions and those with an audit waiver.

This is a query about the agent’s own activity. Its resource identifier points to business data; the audit view records what the agent did with that resource, under whose delegation, with which decision and evidence. The relation names below describe that audit view. A policy decision of accept does not by itself establish that every required approval was recorded.

19 joins · 2 exclusions · 1 computed binding · 2 guards · Context · Lineage · two time axes

:as_of("2026-07-10T00:00:00Z") :valid_at("2026-07-05T00:00:00Z") (?Action,needs_audit,?DurationMs,?Run,?Receipt) :-
  (?Action,type,tool_invocation,?Run,?Receipt),
  (?Action,actor,?Agent),
  (?Action,tool,?Tool),
  (?Tool,side_effect,external_disclosure),
  (?Tool,consequence_score,?Risk),
  (?Action,resource,?Resource),
  (?Resource,classification,restricted,?Run,?ClassificationSource),
  (?Run,delegated_by,?Principal),
  (?Run,purpose,?Purpose),
  (?Action,purpose,?Purpose),
  (?Action,decision,?Decision),
  (?Decision,outcome,accept,?Run,?DecisionReceipt),
  (?Decision,policy_version,?Policy),
  (?Policy,requires,human_approval),
  (?Receipt,depends_on,?DecisionReceipt),
  (?Receipt,verification,verified),
  (?Action,state,completed),
  (?Action,started_ms,?Started),
  (?Action,completed_ms,?Completed),
  !(?Action,approval_status,approved),
  !(?Action,audit_disposition,waived),
  ?DurationMs := ?Completed - ?Started
  | ?Risk >= 3,
  ?DurationMs >= 0?

?Run is Context: it joins the invocation, classification observation, and policy decision within one execution. The repeated ?Purpose connects the action’s declared purpose to its delegation. The fifth slots cite the action and decision receipts; depends_on follows the recorded evidence link between them. verification = verified is a recorded verification result in the audit view. Matching that result does not itself verify a signature, and putting a citation in Lineage does not create system evidence.

The result supplies the action, its elapsed time in milliseconds, the run, and the action receipt for investigation. An absent approval record is a reason to review the action, not proof that approval never existed. The query reports candidates; it neither grants authority nor changes the audit record.

What was known, and what had happened?

The query examines the July 5 world state using only evidence known by July 10. Those two cuts apply throughout, including the approval and waiver exclusions. Suppose an approval was signed on July 4 before the action, but its receipt reached memory on July 15. Keep :valid_at at July 5 and advance :as_of to July 20: the newly available evidence can remove that action from the review results.

That is a correction to what the auditor knows about the past. An approval first granted after the action is different: it does not establish that the agent had prior authorization. Context identifies the run, user Lineage cites its records, system provenance supports their authenticity, and the two clocks distinguish the action’s world from the auditor’s knowledge.

★

A query with teeth: procurement

This second example queries business facts that an agent may have learned or imported. Such facts can remain authoritative in an ERP; the query illustrates joining a memory view of them. The agent-audit example above concerns the system’s own activity and evidence.

Which purchase orders required review on July 5, according to what was known on July 10? Find unpaid orders from flagged suppliers in high-risk countries, owned by a team with an active reviewer, where gross cost exceeds the team’s approval limit by at least $10. Match the order and limit within the same budget Context. Follow the limit’s user Lineage to its cited policy and require that policy to be ratified. Exclude orders already cancelled or approved.

17 joins · 2 exclusions · 3 computed bindings · 3 guards · Context · Lineage · two time axes

:as_of("2026-07-10T00:00:00Z") :valid_at("2026-07-05T00:00:00Z") (?Order,needs_review,?Excess,?Budget,?PolicySource) :-
  (?Order,type,purchase_order,?Budget,_),
  (?Order,supplier,?Supplier),
  (?Order,owner,?Owner),
  (?Order,subtotal_cents,?Subtotal),
  (?Order,tax_cents,?Tax),
  (?Order,currency,?Currency),
  (?Currency,usd_rate_ppm,?Rate),
  (?Owner,team,?Team),
  (?Team,approval_limit_usd_cents,?Limit,?Budget,?PolicySource),
  (?PolicySource,policy_status,ratified),
  (?Team,reviewer,?Reviewer),
  (?Reviewer,status,active),
  (?Supplier,country,?Country),
  (?Country,risk_score,?Risk),
  (?Supplier,compliance_status,flagged),
  (?Order,invoice,?Invoice),
  (?Invoice,state,unpaid),
  !(?Order,state,cancelled),
  !(?Order,state,approved),
  ?LocalGross := ?Subtotal + ?Tax,
  ?UsdGross := ?LocalGross * ?Rate / 1000000,
  ?Excess := ?UsdGross - ?Limit
  | ?Risk >= 3,
  ?UsdGross > ?Limit,
  ?Excess >= 1000?

The two qualifiers scope the entire query. :as_of selects the knowledge cutoff; :valid_at selects the world instant being examined. Each join and exclusion belongs to that same historical view: the budget limit, policy status, reviewer status, and cancellation or approval evidence all answer the July 5 question using July 10 knowledge.

Amounts are integer cents; exchange rates are parts per million. The query adds tax, converts to USD, and computes the excess. It returns the order, excess, budget Context, and policy citation. The shared ?Budget joins the order’s scope to the limit’s scope; ?PolicySource connects the fifth slot to a policy-status assertion. That is domain lineage, not a system proof of policy authority.

For example, a $200 order plus $10 tax, at a 1:1 exchange rate and a $100 team limit, has an excess of 11,000 cents. Cancelled, approved, below-limit, low-risk, paid, inactive-reviewer, wrong-budget, and unratified-policy cases are excluded. The query reports review candidates; it does not approve or mutate orders.

The same decision, seen through two clocks

Suppose the recorded approval limit is $100. On July 15, a correction arrives saying that the limit has been $250 since July 1. The correction’s transaction time is July 15; its world-valid start is July 1. In the full query above, keep :valid_at("2026-07-05T00:00:00Z") fixed and change only :as_of from July 10 to July 20. The same order can then leave the review results because the later knowledge includes the corrected limit. The following focused reads isolate that one input, first using July 10 knowledge:

:as_of("2026-07-10T00:00:00Z") :valid_at("2026-07-05T00:00:00Z") :historically[0,0](team_procurement,approval_limit_usd_cents,?Limit)?

Now ask about the same July 5 world instant using what was known on July 20:

:as_of("2026-07-20T00:00:00Z") :valid_at("2026-07-05T00:00:00Z") :historically[0,0](team_procurement,approval_limit_usd_cents,?Limit)?

The earlier knowledge cut sees the old 10,000-cent limit; the later cut can see the corrected 25,000-cent limit, provided the old assertion was superseded accordingly. A 21,000-cent order exceeds the first and falls below the second. The world date stays fixed: what changes is the information available to answer the question. The zero-width historically[0,0] query asks about that point in world time.

01

Terms & values

↗

Terms are the values and patterns from which facts and queries are built. Constants identify values, variables request bindings, and structured terms group related information.

atom | :atom | ns:predicate(args)

atom | :atom | ns:predicate(args)

A constant names a particular thing or value, so it matches that same thing wherever it appears in a pattern. Lowercase bare atoms and colon-prefixed system atoms are constants. Namespaced applications combine a relation name with positional arguments; an application is not a variable.

:out(alice, likes, :tea).
Unicode / agent
⇑(alice, likes, :tea).
?Name

?Name

A named variable starts with ?. Reusing its name joins clauses on the same value.

:rd(?Who, likes, tea)?
Unicode / agent
⊢(?Who, likes, tea)?
_

_

A wildcard accepts a value without naming or returning it. Each underscore is independent, so two underscores do not require equal values. Use wildcards in positive body patterns; facts, rule heads, and filters require concrete values or named variables instead.

:rd(alice, likes, _)?
Unicode / agent
⊢(alice, likes, _)?
42 | -2 | +3

42 | -2 | +3

An integer literal supplies an exact whole-number value for comparisons and computation. Signs belong to the numeric expression. Decimal floats are accepted only in specialized positions such as probe parameters and weights; quote decimal text elsewhere.

:out(alice, age, -2).

Notation − = - (unary minus)

Unicode / agent
⇑(alice, age, -2).
"UTF-8 text"

"UTF-8 text"

A text literal carries characters as data rather than interpreting them as relation names, variables, or operators. Double-quoted text supports UTF-8. Quoting matters: a glyph inside a string remains part of that string.

:out(alice, says, "hello world").
Unicode / agent
⇑(alice, says, "hello world").
0xHEX

0xHEX

A hexadecimal literal represents bytes, which are useful for identifiers and references whose byte layout matters. It does not make an arbitrary value a valid reference. Trace and image APIs impose their own size and type requirements.

:out(alice, digest, 0xCAFE).
Unicode / agent
⇑(alice, digest, 0xCAFE).
[t1, t2, …]

[t1, t2, …]

A record groups an ordered sequence of terms into one value. Its fields can themselves be records, allowing structured values in a slot or expression. The empty record [] is a value of its own and differs from the atom nil.

:out(alice, values, [1, "two", [3], []]).
Unicode / agent
⇑(alice, values, [1, "two", [3], []]).
YYYY-MM-DD | YYYY-MM-DDThh:mm:ssZ

YYYY-MM-DD | YYYY-MM-DDThh:mm:ssZ

Dates and zoned timestamps name calendar values in a term. A time qualifier has a stricter job: it selects an instant for evaluation and requires quoted text with a time zone. A bare civil date therefore cannot stand in for a qualifier's instant.

:out(alice, date, 2026-11-15).
Unicode / agent
⇑(alice, date, 2026-11-15).
(S,P,O,C,L)

★(S,P,O,C,L)

A pentad states a relation between a subject and an object, qualified by Context and Lineage. S is the thing discussed, P the relation, O its target or value, C the domain scope, and L the domain source or provenance. Comma-separated parentheses construct a pentad with three to five slots. Parentheses around one expression group it; square brackets construct a record. Underscore remains the wildcard. Three-slot patterns leave C and L unconstrained; they do not request empty system metadata.

(?X, seen, tea) :- (?X, likes, tea, home, source)?

Notation ★(...) = (...); :pentad, :mem, and :5 are accepted ASCII aliases

Unicode / agent
★(?X, seen, tea) ← ★(?X, likes, tea, home, source)?
:with(role = value, …)

⟪role = value, …⟫

A role map gives names to the participants in a relation that needs more than a subject and one object. For a transfer, roles can identify its recipient and amount within the object slot. Each role uses an equals sign in both ASCII and Unicode forms.

:out(purchase1, purchase, :with(buyer = alice, item = tea, seller = bob)).

Notation ⟪buyer = alice, item = tea⟫ = :with(buyer = alice, item = tea)

Unicode / agent
⇑(purchase1, purchase, ⟪buyer = alice, item = tea, seller = bob⟫).
:match_or_new("surface")

∃("surface")

Match-or-new uses a surface form to resolve an entity or request creation of one through the receiving execution surface. It is a value-producing slot filler for entity resolution. It is not string concatenation, and its existence glyph does not introduce a general logical quantifier.

:out(:match_or_new("Ada Lovelace"),type,person).

Notation ∃ = :match_or_new

Unicode / agent
⇑(∃("Ada Lovelace"),type,person).
:img("64 hex digits")

▣("64 hex digits")

An image slot reference identifies captured image content without embedding the image bytes in the pentad. It is exactly 32 bytes encoded as 64 hexadecimal digits. Malformed identifiers are rejected.

:out(alice,portrait,:img("0000000000000000000000000000000000000000000000000000000000000000")).

Notation ▣ = :img

Unicode / agent
⇑(alice,portrait,▣("0000000000000000000000000000000000000000000000000000000000000000")).
C in (S,P,O,C,L)

C in ★(S,P,O,C,L)

Context states the domain scope in which an assertion holds, such as a project, case, conversation, or document. A Context value in a pattern restricts that scope; a variable can return it. User Context is separate from operational sys-C, tenant authority, tier routing, and the dedicated world-time columns. This example asks for Alice's role within project Aurora and returns the cited source.

:rd(app:alice,app:role,?Role,app:project_aurora,?Source)?

Notation fourth pentad slot

Unicode / agent
⊢(app:alice,app:role,?Role,app:project_aurora,?Source)?
L in (S,P,O,C,L)

L in ★(S,P,O,C,L)

User Lineage states where the assertion comes from in the application's domain: a document, speaker, import, or other citation. It can be matched or returned like another slot. This example finds role assertions citing one meeting record. Setting L does not set the authenticated writer, create a trace receipt, or prove that the cited document supports the claim; those belong to system provenance.

:rd(?Who,app:role,?Role,?Scope,app:minutes_42)?

Notation fifth pentad slot

Unicode / agent
⊢(?Who,app:role,?Role,?Scope,app:minutes_42)?
02

Read & write

↗

A standalone command reads or changes memory. Its verb determines the operation; its terminator completes the command. A question mark does not by itself promise a read-only action.

:out(S,P,O).

⇑(S,P,O).

An emit command asserts a fact into memory through the write surface. Supply ground values: a variable is a question to answer, not a value to store in a fact. Write commands end with a period, and the receiving API applies its write authority and validation.

:out(alice, likes, tea).

Notation ⇑ = :out

Unicode / agent
⇑(alice, likes, tea).
ns:relation(args).

ns:relation(args).

A namespaced application followed by a period is a compact way to assert a relation. The parser treats it as an implicit emit command rather than a query. Its positional arguments supply the relation's values.

app:ticket("123", :open).
Unicode / agent
app:ticket("123", :open).
:rd(S,P,O)?

⊢(S,P,O)?

A read asks for stored tuples that match a pattern and binds its named variables to matching values. It leaves those tuples available for later reads. The question mark ends the query command.

:rd(alice, likes, ?Drink)?

Notation ⊢ = :rd

Unicode / agent
⊢(alice, likes, ?Drink)?
:infer(subject,predicate,hops)?

⇶(subject,predicate,hops)?

An inference request asks what follows from a subject through a named relation. Its integer hop count specifies the requested inference depth. This example starts from Alice and asks for inference through the parent relation with a depth of two. It belongs with queries because it requests an answer rather than asserting a fact or administering memory.

:infer(alice, parent, 2)?

Notation ⇶ = :infer

Unicode / agent
⇶(alice, parent, 2)?
:take(S,P,O)?

⇓(S,P,O)?

A consume command claims a matching tuple, removing its availability through the consume operation. This supports coordination in which a work item should be taken rather than merely observed. It ends in a question mark even though it changes state.

:take(alice, likes, tea)?

Notation ⇓ = :take

Unicode / agent
⇓(alice, likes, tea)?
:retract(S,P,O).

⊶(S,P,O).

A retraction withdraws an assertion through the write surface. Use it when the assertion is to be treated as wrong, rather than simply older than its replacement. Lifecycle and history rules govern how the recorded assertion remains visible to forensic reads.

:retract(alice, likes, tea).

Notation ⊶ = :retract

Unicode / agent
⊶(alice, likes, tea).
:revise(old,new).

⊸(old,new).

A revision replaces an old assertion with a new assertion in one atomic revise operation. The two arguments identify the old and replacement pentads. This expresses a correction without asking a caller to coordinate separate retract and emit commands.

:revise((alice, likes, tea), (alice, likes, coffee)).

Notation ⊸ = :revise

Unicode / agent
⊸(★(alice, likes, tea), ★(alice, likes, coffee)).
goal ; goal [; goal ...]?

goal ∨ goal [∨ goal ...]?

Read alternatives share one final question mark. Commas join goals before alternatives are evaluated. Parentheses override precedence. Every path must bind the variables in the head and any branch variable used after the group. Headless branches expose the same named variables. A head may omit branch-local witnesses. Projected answers occur once. Proof output retains the distinct derivations. Writes and consumes are refused before execution.

(?Who,contributor_to,?Journal) :- (?Who,lives_in,paris), ((?Who,writes_for,?Journal) ; (?Who,edits_for,?Journal))?

Notation ∨ = ;

Unicode / agent
★(?Who,contributor_to,?Journal) ← ★(?Who,lives_in,paris), (★(?Who,writes_for,?Journal) ∨ ★(?Who,edits_for,?Journal))?
:rd(...)? |>> bindings | pentad | proof

⊢(...)? |>> bindings | pentad | proof

A result modifier chooses how the answer is presented: variable bindings, returned pentads, or proof-oriented output. It follows the query after |>> and needs no additional terminator. The receiving execution surface determines which representations it can supply.

:rd(alice, likes, ?Drink)? |>> proof
Unicode / agent
⊢(alice, likes, ?Drink)? |>> proof
:ns_bind(name).

≜(name).

The namespace-binding command names a namespace using a bare atom. Its keyword and glyph forms parse equivalently, but the ordinary command-to-statement bridge currently returns ns_bind_not_mapped. It must not be presented as a working namespace registration API on that path.

:ns_bind(app).

Notation ≜ = :ns_bind

Unicode / agent
≜(app).
:image_bytes("32 hex digits")?

:image_bytes("32 hex digits")?

An image-byte read retrieves the captured content named by a 16-byte content hash. The hash is encoded as 32 hexadecimal digits. This retrieval address is distinct from the 32-byte reference used as an image slot filler.

:image_bytes("00000000000000000000000000000000")?
Unicode / agent
:image_bytes("00000000000000000000000000000000")?
:out(S,P,O,C,L).

⇑(S,P,O,C,L).

A five-slot assertion supplies domain Context and Lineage explicitly. Here Alice is a reviewer for project Aurora, according to meeting record 42. The application chooses the project and citation; WunderOS separately records operational scope, writer identity, and system provenance. The five-slot payload does not let a caller manufacture system metadata.

:out(app:alice,app:role,app:reviewer,app:project_aurora,app:minutes_42).

Notation ⇑ = :out

Unicode / agent
⇑(app:alice,app:role,app:reviewer,app:project_aurora,app:minutes_42).
03

Rules & binding

↗

A rule-shaped query describes an answer on the left and the conditions that produce it on the right. Shared variables join clauses, while filters, computations, and exclusions refine the result.

head :- body, body?

head ← body, body?

A rule query describes an answer in its head and the conditions that produce it in its body. Clauses sharing a variable join on that value; computations and comparisons refine the joined rows. End with ? to ask for the derived answer, and bind every projected head variable in the body.

(?X, grandparent, bob) :- (?X, parent, ?Y), (?Y, parent, bob)?

Notation ← = :- (query)

Unicode / agent
★(?X, grandparent, bob) ← ★(?X, parent, ?Y), ★(?Y, parent, bob)?
:routine(name) :- body.

:routine(name) ← body.

Install the ordered steps in Loom under the given atom name.

:routine(parent_step) :- (?X, parent, bob).
Unicode / agent
:routine(parent_step) ← ★(?X, parent, bob).
Read-door rule evaluation

Read-door rule evaluation

A request-scoped rule computes an answer for the current read request without storing its derived head as a new fact. This is useful for temporary joins and reports. The receiving API chooses this execution policy; parsing the rule alone does not establish it.

(?X, answer, ?Y) :- (?X, parent, ?Y)?
Unicode / agent
★(?X, answer, ?Y) ← ★(?X, parent, ?Y)?
!atom

¬atom

Negation excludes a joined row when the negated body pattern has a match. First bind the variables through positive clauses so the test has a definite meaning. Negative dependencies must be stratified; a predicate named not is not the negation operator.

(?X, eligible, yes) :- (?X, member, yes), !(?X, banned, yes)?

Notation ¬ = !

Unicode / agent
★(?X, eligible, yes) ← ★(?X, member, yes), ¬★(?X, banned, yes)?
| lhs = != < <= > >= rhs

| lhs = ≠ < ≤ > ≥ rhs

A guard keeps only rows for which a comparison holds, such as orders whose cost exceeds a limit. Comparisons may follow a guard bar or appear as comma-separated body goals. The greater-than form is represented internally as less-than with its operands swapped.

(?X, adult, yes) :- (?X, age, ?Age) | ?Age >= 18, ?Age != 99?

Notation ≥ = >=; ≤ = <=

Unicode / agent
★(?X, adult, yes) ← ★(?X, age, ?Age) | ?Age ≥ 18, ?Age ≠ 99?
lhs = | != | < | <= | > | >= rhs

lhs = | ≠ | < | ≤ | > | ≥ rhs

A comparison relates two values within a rule, using equality, inequality, or ordering. All six comparison forms work as body goals, and either operand may contain arithmetic. Shared variables connect the comparison to values supplied elsewhere in the body.

(?X, adult, yes) :- (?X, age, ?Age), ?Age >= 18?

Notation ≥ = >=; ≤ = <=

Unicode / agent
★(?X, adult, yes) ← ★(?X, age, ?Age), ?Age ≥ 18?
+ - * / % ^ (expression)

+ − × ÷ % ^ (expression)

Arithmetic computes a value from numbers and bound variables. Operator precedence determines grouping unless parentheses override it. Ground expressions can be evaluated during lowering; expressions containing variables need the rule body to supply their inputs.

(?X, next_age, ?Age + 1) :- (?X, age, ?Age)?
Unicode / agent
★(?X, next_age, ?Age + 1) ← ★(?X, age, ?Age)?
computed term in a rule

computed term in a rule

A computed term in a rule is turned into an assignment goal so its value can be used by the rule. Explicit binding gives that computed result a name. There is no general :assign builtin; := binds scalar, aggregate, or window outputs according to the expression that follows it.

(?X, next_age, ?Age + 1) :- (?X, age, ?Age)?
Unicode / agent
★(?X, next_age, ?Age + 1) ← ★(?X, age, ?Age)?
?Output := expression

?Output ≔ expression

A binding names the result of a scalar expression, making it available to later computations in the same rule body or aggregate scope. Inputs must already have values when evaluated. Chained bindings run in body order after the relational join. An existing output unifies: equality keeps the row and a conflict drops it. Undefined expressions drop the row in the interpreter; native planning rejects unbound inputs with plan_unbound_assignment. Binding is not valid in a head, fact, nested term, or negation.

(?X, next_age, ?Next) :- (?X, age, ?Age), ?Next := ?Age + 1?

Notation ?Output ≔ expression = ?Output := expression

Unicode / agent
★(?X, next_age, ?Next) ← ★(?X, age, ?Age), ?Next ≔ ?Age + 1?
:analogy(P,C,?D)

∺(P,C,?D)

Analogy estimates how a known relation applies to a new concept. P names the relation, C is a bound concept, and D receives the estimated completion. The operation learns from the relation's known pairs; it does not assert the answer as a new fact. Here a query estimates a selected country's currency.

(?Country, inferred_currency, ?Currency) :- (?Country, selected, yes), :analogy(currency_of, ?Country, ?Currency)?

Notation ∺ = :analogy

Unicode / agent
★(?Country, inferred_currency, ?Currency) ← ★(?Country, selected, yes), ∺(currency_of, ?Country, ?Currency)?
:analogy(A,B,C,?D)

∺(A,B,C,?D)

Four-place analogy asks: A is to B as C is to what? A, B, and C must already be bound; D receives the estimated completion. This form supplies one A-to-B example instead of learning from a named relation's known pairs. The example uses USA-to-dollar to estimate Mexico's currency. Both arities use the same estimator and confidence calculation, and neither asserts the answer as a fact. An already-bound D must match the estimate.

(mexico, inferred_currency, ?Currency) :- :analogy(usa, dollar, mexico, ?Currency)?

Notation ∺ = :analogy; arity selects relation or pair

Unicode / agent
★(mexico, inferred_currency, ?Currency) ← ∺(usa, dollar, mexico, ?Currency)?
:match(regex,text)

≍(regex,text)

A regular-expression test keeps rows whose text matches the entire pattern. Use it to recognize structured text, such as a particular identifier format; use contains for a literal substring. Prefix ! to negate the test. An invalid regex drops the row under either polarity.

(?X, selected, yes) :- (?X, name, ?Name), :match("A.*", ?Name)?

Notation ≍ = :match

Unicode / agent
★(?X, selected, yes) ← ★(?X, name, ?Name), ≍("A.*", ?Name)?
:contains(substring,text)

⊂(substring,text)

A containment test keeps rows whose text includes the supplied literal substring. The first argument is the substring and the second is the text to inspect. Prefix ! to keep rows where that substring is absent.

(?X, selected, yes) :- (?X, name, ?Name), :contains("ice", ?Name)?

Notation ⊂ = :contains

Unicode / agent
★(?X, selected, yes) ← ★(?X, name, ?Name), ⊂("ice", ?Name)?
standing head :- body?

∇ head ← body?

A standing query asks the system to maintain a subscription to a rule rather than perform only a one-shot evaluation. Its admission restrictions differ from ordinary query refusals. Parsing this syntax does not itself register or activate the subscription.

standing (?X, answer, ?Y) :- (?X, parent, ?Y)?

Notation ∇ = standing

Unicode / agent
∇ ★(?X, answer, ?Y) ← ★(?X, parent, ?Y)?
:rd(S,:predicate+N,O)?

⊢(S,:predicate+N,O)?

A bounded path read follows repeated applications of a system predicate through the requested number of hops. It expresses reachability without spelling every intermediate join. A +N suffix supplies the bound; a bare + currently defaults to five hops and is not unlimited recursion.

:rd(alice,:knows+3,?Who)?

Notation ⊢ = :rd

Unicode / agent
⊢(alice,:knows+3,?Who)?
purchase-order review: 22 goals + 3 guards

purchase-order review: 22 goals + 3 guards

Find unpaid, unapproved purchase orders from flagged suppliers in high-risk countries when gross USD cost exceeds the team's approval limit by at least 1000 cents. The order and approval limit must share a budget Context. The limit's user Lineage names a policy whose status must be ratified; that citation is application data, not authenticated system provenance. The reviewer must be active. Project the order, excess, budget, and policy source. Currency rates use integer parts per million, amounts use integer cents, and division truncates.

(?Order,needs_review,?Excess,?Budget,?PolicySource) :- (?Order,type,purchase_order,?Budget,_), (?Order,supplier,?Supplier), (?Order,owner,?Owner), (?Order,subtotal_cents,?Subtotal), (?Order,tax_cents,?Tax), (?Order,currency,?Currency), (?Currency,usd_rate_ppm,?Rate), (?Owner,team,?Team), (?Team,approval_limit_usd_cents,?Limit,?Budget,?PolicySource), (?PolicySource,policy_status,ratified), (?Team,reviewer,?Reviewer), (?Reviewer,status,active), (?Supplier,country,?Country), (?Country,risk_score,?Risk), (?Supplier,compliance_status,flagged), (?Order,invoice,?Invoice), (?Invoice,state,unpaid), !(?Order,state,cancelled), !(?Order,state,approved), ?LocalGross := ?Subtotal + ?Tax, ?UsdGross := ?LocalGross * ?Rate / 1000000, ?Excess := ?UsdGross - ?Limit | ?Risk >= 3, ?UsdGross > ?Limit, ?Excess >= 1000?
Unicode / agent
★(?Order,needs_review,?Excess,?Budget,?PolicySource) ← ★(?Order,type,purchase_order,?Budget,_), ★(?Order,supplier,?Supplier), ★(?Order,owner,?Owner), ★(?Order,subtotal_cents,?Subtotal), ★(?Order,tax_cents,?Tax), ★(?Order,currency,?Currency), ★(?Currency,usd_rate_ppm,?Rate), ★(?Owner,team,?Team), ★(?Team,approval_limit_usd_cents,?Limit,?Budget,?PolicySource), ★(?PolicySource,policy_status,ratified), ★(?Team,reviewer,?Reviewer), ★(?Reviewer,status,active), ★(?Supplier,country,?Country), ★(?Country,risk_score,?Risk), ★(?Supplier,compliance_status,flagged), ★(?Order,invoice,?Invoice), ★(?Invoice,state,unpaid), ¬★(?Order,state,cancelled), ¬★(?Order,state,approved), ?LocalGross ≔ ?Subtotal + ?Tax, ?UsdGross ≔ ?LocalGross × ?Rate ÷ 1000000, ?Excess ≔ ?UsdGross − ?Limit | ?Risk ≥ 3, ?UsdGross > ?Limit, ?Excess ≥ 1000?
bitemporal purchase-order review: 22 goals + 3 guards

bitemporal purchase-order review: 22 goals + 3 guards

Ask which purchase orders required review on July 5 using only information known by July 10. The transaction-time cutoff and world-valid instant scope the whole query: its budget Context join, policy Lineage lookup, exclusions, computations, and guards. Holding valid_at fixed while advancing as_of asks how later knowledge changes the answer about the same world instant.

:as_of("2026-07-10T00:00:00Z") :valid_at("2026-07-05T00:00:00Z") (?Order,needs_review,?Excess,?Budget,?PolicySource) :- (?Order,type,purchase_order,?Budget,_), (?Order,supplier,?Supplier), (?Order,owner,?Owner), (?Order,subtotal_cents,?Subtotal), (?Order,tax_cents,?Tax), (?Order,currency,?Currency), (?Currency,usd_rate_ppm,?Rate), (?Owner,team,?Team), (?Team,approval_limit_usd_cents,?Limit,?Budget,?PolicySource), (?PolicySource,policy_status,ratified), (?Team,reviewer,?Reviewer), (?Reviewer,status,active), (?Supplier,country,?Country), (?Country,risk_score,?Risk), (?Supplier,compliance_status,flagged), (?Order,invoice,?Invoice), (?Invoice,state,unpaid), !(?Order,state,cancelled), !(?Order,state,approved), ?LocalGross := ?Subtotal + ?Tax, ?UsdGross := ?LocalGross * ?Rate / 1000000, ?Excess := ?UsdGross - ?Limit | ?Risk >= 3, ?UsdGross > ?Limit, ?Excess >= 1000?
Unicode / agent
Ⓣ("2026-07-10T00:00:00Z") Ⓥ("2026-07-05T00:00:00Z") ★(?Order,needs_review,?Excess,?Budget,?PolicySource) ← ★(?Order,type,purchase_order,?Budget,_), ★(?Order,supplier,?Supplier), ★(?Order,owner,?Owner), ★(?Order,subtotal_cents,?Subtotal), ★(?Order,tax_cents,?Tax), ★(?Order,currency,?Currency), ★(?Currency,usd_rate_ppm,?Rate), ★(?Owner,team,?Team), ★(?Team,approval_limit_usd_cents,?Limit,?Budget,?PolicySource), ★(?PolicySource,policy_status,ratified), ★(?Team,reviewer,?Reviewer), ★(?Reviewer,status,active), ★(?Supplier,country,?Country), ★(?Country,risk_score,?Risk), ★(?Supplier,compliance_status,flagged), ★(?Order,invoice,?Invoice), ★(?Invoice,state,unpaid), ¬★(?Order,state,cancelled), ¬★(?Order,state,approved), ?LocalGross ≔ ?Subtotal + ?Tax, ?UsdGross ≔ ?LocalGross × ?Rate ÷ 1000000, ?Excess ≔ ?UsdGross − ?Limit | ?Risk ≥ 3, ?UsdGross > ?Limit, ?Excess ≥ 1000?
agent audit: 22 goals + 2 guards

agent audit: 22 goals + 2 guards

Find completed agent tool calls that disclosed restricted data under a high-consequence policy but have no recorded human approval or audit waiver. This audit view relates actions, actors, delegated runs, purposes, policy decisions, and verified receipt records. Context joins the action, classification observation, and decision to the same run. Lineage cites the action and decision records; the receipt dependency connects their evidence. Return the action, duration in milliseconds, run, and action receipt. Missing approval is a review candidate, not proof that no approval ever existed.

(?Action,needs_audit,?DurationMs,?Run,?Receipt) :- (?Action,type,tool_invocation,?Run,?Receipt), (?Action,actor,?Agent), (?Action,tool,?Tool), (?Tool,side_effect,external_disclosure), (?Tool,consequence_score,?Risk), (?Action,resource,?Resource), (?Resource,classification,restricted,?Run,?ClassificationSource), (?Run,delegated_by,?Principal), (?Run,purpose,?Purpose), (?Action,purpose,?Purpose), (?Action,decision,?Decision), (?Decision,outcome,accept,?Run,?DecisionReceipt), (?Decision,policy_version,?Policy), (?Policy,requires,human_approval), (?Receipt,depends_on,?DecisionReceipt), (?Receipt,verification,verified), (?Action,state,completed), (?Action,started_ms,?Started), (?Action,completed_ms,?Completed), !(?Action,approval_status,approved), !(?Action,audit_disposition,waived), ?DurationMs := ?Completed - ?Started | ?Risk >= 3, ?DurationMs >= 0?
Unicode / agent
★(?Action,needs_audit,?DurationMs,?Run,?Receipt) ← ★(?Action,type,tool_invocation,?Run,?Receipt), ★(?Action,actor,?Agent), ★(?Action,tool,?Tool), ★(?Tool,side_effect,external_disclosure), ★(?Tool,consequence_score,?Risk), ★(?Action,resource,?Resource), ★(?Resource,classification,restricted,?Run,?ClassificationSource), ★(?Run,delegated_by,?Principal), ★(?Run,purpose,?Purpose), ★(?Action,purpose,?Purpose), ★(?Action,decision,?Decision), ★(?Decision,outcome,accept,?Run,?DecisionReceipt), ★(?Decision,policy_version,?Policy), ★(?Policy,requires,human_approval), ★(?Receipt,depends_on,?DecisionReceipt), ★(?Receipt,verification,verified), ★(?Action,state,completed), ★(?Action,started_ms,?Started), ★(?Action,completed_ms,?Completed), ¬★(?Action,approval_status,approved), ¬★(?Action,audit_disposition,waived), ?DurationMs ≔ ?Completed − ?Started | ?Risk ≥ 3, ?DurationMs ≥ 0?
bitemporal agent audit: 22 goals + 2 guards

bitemporal agent audit: 22 goals + 2 guards

Audit the July 5 state of agent activity using only records known by July 10. Both time axes scope the entire audit query, including its approval and waiver exclusions. A signed approval issued before the action but ingested on July 15 can remove the candidate at a July 20 knowledge cutoff while the world instant stays July 5. An approval first granted after the action does not establish prior authorization.

:as_of("2026-07-10T00:00:00Z") :valid_at("2026-07-05T00:00:00Z") (?Action,needs_audit,?DurationMs,?Run,?Receipt) :- (?Action,type,tool_invocation,?Run,?Receipt), (?Action,actor,?Agent), (?Action,tool,?Tool), (?Tool,side_effect,external_disclosure), (?Tool,consequence_score,?Risk), (?Action,resource,?Resource), (?Resource,classification,restricted,?Run,?ClassificationSource), (?Run,delegated_by,?Principal), (?Run,purpose,?Purpose), (?Action,purpose,?Purpose), (?Action,decision,?Decision), (?Decision,outcome,accept,?Run,?DecisionReceipt), (?Decision,policy_version,?Policy), (?Policy,requires,human_approval), (?Receipt,depends_on,?DecisionReceipt), (?Receipt,verification,verified), (?Action,state,completed), (?Action,started_ms,?Started), (?Action,completed_ms,?Completed), !(?Action,approval_status,approved), !(?Action,audit_disposition,waived), ?DurationMs := ?Completed - ?Started | ?Risk >= 3, ?DurationMs >= 0?
Unicode / agent
Ⓣ("2026-07-10T00:00:00Z") Ⓥ("2026-07-05T00:00:00Z") ★(?Action,needs_audit,?DurationMs,?Run,?Receipt) ← ★(?Action,type,tool_invocation,?Run,?Receipt), ★(?Action,actor,?Agent), ★(?Action,tool,?Tool), ★(?Tool,side_effect,external_disclosure), ★(?Tool,consequence_score,?Risk), ★(?Action,resource,?Resource), ★(?Resource,classification,restricted,?Run,?ClassificationSource), ★(?Run,delegated_by,?Principal), ★(?Run,purpose,?Purpose), ★(?Action,purpose,?Purpose), ★(?Action,decision,?Decision), ★(?Decision,outcome,accept,?Run,?DecisionReceipt), ★(?Decision,policy_version,?Policy), ★(?Policy,requires,human_approval), ★(?Receipt,depends_on,?DecisionReceipt), ★(?Receipt,verification,verified), ★(?Action,state,completed), ★(?Action,started_ms,?Started), ★(?Action,completed_ms,?Completed), ¬★(?Action,approval_status,approved), ¬★(?Action,audit_disposition,waived), ?DurationMs ≔ ?Completed − ?Started | ?Risk ≥ 3, ?DurationMs ≥ 0?
04

Aggregates

↗

Aggregates reduce several joined values to one result, optionally per group or within a correlated scope. A scalar function computes within one row; an aggregate computes across rows.

?N := count(?V)

?N ≔ #(?V)

Count reduces the joined values to their cardinality and binds that number to the output variable. It answers how many values the group contributes, rather than returning one contributing row. This rule aggregate is distinct from the history-count wrapper.

(total, value, ?N) :- (?X, score, ?V), ?N := count(?V)?

Notation ≔ = :=; # = count

Unicode / agent
★(total, value, ?N) ← ★(?X, score, ?V), ?N ≔ #(?V)?
?N := sum(?V)

?N ≔ Σ(?V)

Sum adds the numeric values contributed by a joined group and binds the total. Use it for totals such as quantity or cost after a join. The aggregate output is a computed value rather than a selected source row.

(total, value, ?N) :- (?X, score, ?V), ?N := sum(?V)?

Notation Σ = sum

Unicode / agent
★(total, value, ?N) ← ★(?X, score, ?V), ?N ≔ Σ(?V)?
?N := min(?V)

?N ≔ ⊓(?V)

Aggregate minimum selects the smallest value contributed by a group. Min and max can retain a contributing witness, unlike reductions such as count and sum. A unary aggregate binding uses the same glyph as scalar min, whose call requires at least two arguments.

(total, value, ?N) :- (?X, score, ?V), ?N := min(?V)?

Notation ⊓ = min

Unicode / agent
★(total, value, ?N) ← ★(?X, score, ?V), ?N ≔ ⊓(?V)?
?N := max(?V)

?N ≔ ⊔(?V)

Aggregate maximum selects the largest value contributed by a group. It can retain a contributing witness under the min/max witness rules. Its unary binding is a row reduction; a call with two or more arguments is the scalar maximum function.

(total, value, ?N) :- (?X, score, ?V), ?N := max(?V)?

Notation ⊔ = max

Unicode / agent
★(total, value, ?N) ← ★(?X, score, ?V), ?N ≔ ⊔(?V)?
?N := avg(?V)

?N ≔ μ(?V)

Average reduces a group of numeric values to their mean and binds that result. It is useful when a total alone would hide how many values contributed. Grouping determines which rows belong to each average.

(total, value, ?N) :- (?X, score, ?V), ?N := avg(?V)?

Notation μ = avg

Unicode / agent
★(total, value, ?N) ← ★(?X, score, ?V), ?N ≔ μ(?V)?
?N := median(?V)

?N ≔ ⊟(?V)

Median reduces a group to its middle value under the aggregate's ordering rules. It describes the center of the group rather than its sum or an extreme. The output variable receives the reduction result.

(total, value, ?N) :- (?X, score, ?V), ?N := median(?V)?

Notation ⊟ = median

Unicode / agent
★(total, value, ?N) ← ★(?X, score, ?V), ?N ≔ ⊟(?V)?
?N := stddev(?V)

?N ≔ ⊠(?V)

Standard deviation measures how widely the group's numeric values are dispersed. A tightly clustered group has less spread than one whose values differ greatly. The output variable receives the aggregate result.

(total, value, ?N) :- (?X, score, ?V), ?N := stddev(?V)?

Notation ⊠ = stddev

Unicode / agent
★(total, value, ?N) ← ★(?X, score, ?V), ?N ≔ ⊠(?V)?
?N := percentile(P,?V)

?N ≔ ℘(P,?V)

A percentile selects a value at the requested rank within a group, allowing a query to describe a distribution beyond its average. P supplies the percentile and must be an integer literal. The output variable receives the selected aggregate value.

(total, value, ?N) :- (?X, score, ?V), ?N := percentile(95, ?V)?

Notation ℘ = percentile

Unicode / agent
★(total, value, ?N) ← ★(?X, score, ?V), ?N ≔ ℘(95, ?V)?
?N := string_agg(?V)

?N ≔ ⧺(?V)

String aggregation collects a group's values into one string. It sorts the values and joins them with commas. Scalar concatenation instead preserves argument order and adds no separator, so the two operations have different glyphs.

(total, value, ?N) :- (?X, name, ?V), ?N := string_agg(?V)?

Notation ⧺ = string_agg

Unicode / agent
★(total, value, ?N) ← ★(?X, name, ?V), ?N ≔ ⧺(?V)?
?N := array_agg(?V)

?N ≔ ⨄(?V)

Array aggregation collects a group's values into an array result rather than combining them numerically or joining them as text. The output is the collection produced by the reduction, not one of its witness rows.

(total, value, ?N) :- (?X, score, ?V), ?N := array_agg(?V)?

Notation ⨄ = array_agg

Unicode / agent
★(total, value, ?N) ← ★(?X, score, ?V), ?N ≔ ⨄(?V)?
?N := first(?V,?Order)

?N ≔ ⋖(?V,?Order)

First selects a value using a separate, bound ordering variable to determine which row comes first. It is useful when the desired value and the field that orders it differ. Bind the ordering variable in the body before using this aggregate.

(total, value, ?N) :- (?X, score, ?V), ?N := first(?V, ?X)?

Notation ⋖ = first

Unicode / agent
★(total, value, ?N) ← ★(?X, score, ?V), ?N ≔ ⋖(?V, ?X)?
?N := last(?V,?Order)

?N ≔ ⋗(?V,?Order)

Last selects the value at the other end of a group ordered by a bound ordering variable. It uses that variable to choose the row rather than relying on incidental join order. Bind both the value and its ordering input in the body.

(total, value, ?N) :- (?X, score, ?V), ?N := last(?V, ?X)?

Notation ⋗ = last

Unicode / agent
★(total, value, ?N) ← ★(?X, score, ?V), ?N ≔ ⋗(?V, ?X)?
?N := count(?V) by ?Group

?N ≔ #(?V) ▷ ?Group

Grouping partitions the joined rows by one or more variables and computes a separate aggregate for each group. For example, grouping by team produces one count per team instead of a single count for the entire result. This by suffix belongs to fused body aggregation.

(?Group, count, ?N) :- (?X, team, ?Group), ?N := count(?X) by ?Group?

Notation ▷ = by

Unicode / agent
★(?Group, count, ?N) ← ★(?X, team, ?Group), ?N ≔ #(?X) ▷ ?Group?
?N := count(?V) { body }

?N ≔ #(?V) { body }

An explicit aggregate scope supplies a separate body over which to reduce values. Outer bindings correlate that body with the current row. Do not append by; local variables cannot escape a non-witness reduction. The bridge limits nested scopes to three levels.

(?X, count, ?N) :- (?X, type, person), ?N := count(?Y) { (?X, likes, ?Y) }?
Unicode / agent
★(?X, count, ?N) ← ★(?X, type, person), ?N ≔ #(?Y) { ★(?X, likes, ?Y) }?
05

Time windows

↗

Windows organize timestamps into buckets or restrict a query to a recent interval. Bucketing produces a value to group by; a sliding-window test only filters.

?Bucket := tumble[1h](?Time)

?Bucket ≔ ⊞[1h](?Time)

A tumbling window partitions time into fixed-width buckets and binds the bucket for each timestamp. Rows in the same bucket can then be grouped or joined. Widths accept duration units, such as one hour.

(?B, value, ?T) :- (event, at, ?T), ?B := tumble[1h](?T)?

Notation ⊞ = tumble; ⟦ ⟧ = [ ]

Unicode / agent
★(?B, value, ?T) ← ★(event, at, ?T), ?B ≔ ⊞[1h](?T)?
recent[24h](?Time)

◷[24h](?Time)

A recent-window test keeps timestamps within a sliding interval anchored at now. Use it to restrict a query to a recent period without computing a bucket identifier. Unlike tumble, it filters rows rather than binding a window value.

(event, recent, ?T) :- (event, at, ?T), recent[24h](?T)?

Notation ◷ = recent; ⟦ ⟧ = [ ]

Unicode / agent
★(event, recent, ?T) ← ★(event, at, ?T), ◷[24h](?T)?
06

History & paging

↗

History wrappers choose a view, order it, or page through it. They compose around a read. View selection and pagination are separate from choosing the world's time or the system's knowledge cutoff.

:current(inner)?

⏚(inner)?

The current wrapper selects the canonical view of the inner read, using the read surface's lifecycle policy to decide which assertions are current. It expresses view selection, not a world-time instant. Use valid_at when the question is when a fact held in the world.

:current(:rd(alice, likes, ?X))?

Notation ⏚ = :current

Unicode / agent
⏚(⊢(alice, likes, ?X))?
:all(inner)?

ℋ(inner)?

The all wrapper admits superseded history as well as the canonical view. This is useful when inspecting how recorded assertions changed. It does not itself choose a transaction or world-time cut; those are separate temporal qualifiers.

:all(:rd(alice, likes, ?X))?

Notation ℋ = :all

Unicode / agent
ℋ(⊢(alice, likes, ?X))?
:limit(n,inner)?

↥(n,inner)?

A limit caps how many rows the inner read returns, making a large result usable in pages. The cap must be an integer literal of at least one. Ordering belongs to the selected read surface; a limit alone does not establish a new sort order.

:limit(10, :rd(alice, likes, ?X))?

Notation ↥ = :limit

Unicode / agent
↥(10, ⊢(alice, likes, ?X))?
:offset(n,inner)?

↷(n,inner)?

An offset skips a specified number of rows from the inner read before returning its result. Combine it with a limit when the selected read surface supports offset paging. The offset must be a nonnegative integer literal.

:offset(10, :rd(alice, likes, ?X))?

Notation ↷ = :offset

Unicode / agent
↷(10, ⊢(alice, likes, ?X))?
:count(inner)?

#(inner)?

The history-count wrapper asks for the count associated with an inner history read. It is a query wrapper, rather than a reduction over values in a rule body. The shared # glyph is distinguished by this query position.

:count(:rd(alice, likes, ?X))?

Notation # = :count

Unicode / agent
#(⊢(alice, likes, ?X))?
:newest(:as_of|:valid_at,inner)?

↓(Ⓣ|Ⓥ,inner)?

Newest orders an inner read from newer to older on the selected time axis. Choose as_of for transaction time or valid_at for world time. Choosing an axis for sorting does not set the corresponding temporal cutoff.

:newest(:as_of, :rd(alice, likes, ?X))?

Notation ↓ = :newest

Unicode / agent
↓(Ⓣ, ⊢(alice, likes, ?X))?
:after("32 hex digits",inner)?

↣("32 hex digits",inner)?

A cursor continues a paged read after a particular row, so the caller can resume from a returned position. Supply the row's 16-byte ULID as 32 hexadecimal digits. Its 26-character display spelling is not the cursor format this wrapper accepts.

:after("00000000000000000000000000000001", :rd(alice, likes, ?X))?

Notation ↣ = :after

Unicode / agent
↣("00000000000000000000000000000001", ⊢(alice, likes, ?X))?
:with_utility(inner)?

∝(inner)?

The utility wrapper adds utility scores to the inner query's results. It supplies information a caller can use to assess the returned rows. It does not itself filter those rows or order them by score.

:with_utility(:rd(alice, likes, ?X))?

Notation ∝ = :with_utility

Unicode / agent
∝(⊢(alice, likes, ?X))?
07

Temporal queries

↗

Temporal operators ask when and for how long a pattern holds. Bitemporal qualifiers independently choose the system's knowledge cutoff and the fact's world-valid time.

:as_of("instant") query

Ⓣ("instant") query

Transaction time answers what WunderOS had recorded or could see at a particular knowledge cutoff. An as_of qualifier excludes information that arrived later, even when it describes an earlier event in the world. Supply a quoted zoned instant.

:as_of("2026-11-15T00:00:00Z") :rd(alice, likes, ?X)?

Notation Ⓣ = :as_of

Unicode / agent
Ⓣ("2026-11-15T00:00:00Z") ⊢(alice, likes, ?X)?
:valid_at("instant") query

Ⓥ("instant") query

World time answers when a Fact was true in the domain it describes. A valid_at qualifier selects that instant independently of when WunderOS learned the fact. Combine it with as_of to ask what the system knew then about the world at another time.

:valid_at("2026-11-15T00:00:00Z") :rd(alice, likes, ?X)?

Notation Ⓥ = :valid_at

Unicode / agent
Ⓥ("2026-11-15T00:00:00Z") ⊢(alice, likes, ?X)?
:once(pattern)?

♦(pattern)?

Once asks whether a pattern held at least once in the relevant past interval. One qualifying occurrence can satisfy it; the pattern need not hold throughout the interval. A metric interval can restrict how far back the query looks.

:once(alice, likes, tea)?

Notation ♦ = :once

Unicode / agent
♦(alice, likes, tea)?
:historically(pattern)?

■(pattern)?

Historically asks whether a pattern held throughout the relevant past interval. This is a continuity question rather than a search for one occurrence. Use once when a single past occurrence is sufficient.

:historically(alice, likes, tea)?

Notation ■ = :historically

Unicode / agent
■(alice, likes, tea)?
:prev(pattern)?

●(pattern)?

Previous asks about the preceding temporal step. It expresses a relation to that step rather than selecting the newest stored row. Temporal steps and metric intervals belong to the temporal evaluator's model.

:prev(alice, likes, tea)?

Notation ● = :prev

Unicode / agent
●(alice, likes, tea)?
:next(pattern)?

○(pattern)?

Next asks about the following temporal step. It is a temporal query, not a paging command or a request for the next returned row. Its execution depends on the temporal surface that receives it.

:next(alice, likes, tea)?

Notation ○ = :next

Unicode / agent
○(alice, likes, tea)?
:eventually(pattern)?

◇(pattern)?

Eventually asks whether a pattern becomes true in the relevant future interval. The answer may depend on evidence that has not arrived yet, so execution can park pending satisfaction. A metric interval bounds the future period being considered.

:eventually(alice, likes, tea)?

Notation ◇ = :eventually

Unicode / agent
◇(alice, likes, tea)?
:always(pattern)?

□(pattern)?

Always asks whether a pattern holds throughout the relevant future interval. A single occurrence is insufficient; the question concerns the whole interval. It is the future-facing counterpart of historically.

:always(alice, likes, tea)?

Notation □ = :always

Unicode / agent
□(alice, likes, tea)?
:since(a,b)?

↤(a,b)?

Since relates two patterns: the second supplies a past anchor and the first must hold continuously from that anchor to the evaluation point. It therefore joins anchor evidence with continuity evidence. A metric interval constrains the qualifying anchor's distance in time.

:since((alice, likes, tea), (alice, joined, club))?

Notation ↤ = :since

Unicode / agent
↤(★(alice, likes, tea), ★(alice, joined, club))?
:once[lo,hi](pattern)?

♦⟦lo,hi⟧(pattern)?

A metric interval bounds a temporal operator's reach with lower and upper durations. It can qualify once, historically, prev, next, eventually, always, and since. Durations lower to milliseconds; an interval cannot be attached to now.

:once[0,5h](alice,likes,tea)?

Notation ⟦ ⟧ delimit intervals; −∞ and ∞ are open bounds

Unicode / agent
♦⟦0, 5h⟧(alice, likes, tea)?
:as_of("knowledge cut") :valid_at("world instant") :historically[0,0](S,P,?O)?

Ⓣ("knowledge cut") Ⓥ("world instant") ■⟦0,0⟧(S,P,?O)?

This historical read asks what approval limit was believed on July 10 for July 5. The two dates answer different questions: as_of controls which information had arrived, while valid_at selects when the fact held in the world. A zero-width historically interval makes this a point-in-world-time fact query. A correction learned on July 15 is absent from this earlier knowledge cut.

:as_of("2026-07-10T00:00:00Z") :valid_at("2026-07-05T00:00:00Z") :historically[0,0](team_procurement,approval_limit_usd_cents,?Limit)?

Notation Ⓣ = :as_of; Ⓥ = :valid_at; ■ = :historically

Unicode / agent
Ⓣ("2026-07-10T00:00:00Z") Ⓥ("2026-07-05T00:00:00Z") ■⟦0,0⟧(team_procurement,approval_limit_usd_cents,?Limit)?
:as_of("later knowledge cut") :valid_at("same world instant") :historically[0,0](S,P,?O)?

Ⓣ("later knowledge cut") Ⓥ("same world instant") ■⟦0,0⟧(S,P,?O)?

This read holds the world date at July 5 but advances the knowledge cutoff to July 20. A correction learned on July 15 and effective from July 1 can now change the answer about July 5. That is bitemporal revision of knowledge, not a claim that the world changed between the two queries.

:as_of("2026-07-20T00:00:00Z") :valid_at("2026-07-05T00:00:00Z") :historically[0,0](team_procurement,approval_limit_usd_cents,?Limit)?

Notation Ⓣ = :as_of; Ⓥ = :valid_at; ■ = :historically

Unicode / agent
Ⓣ("2026-07-20T00:00:00Z") Ⓥ("2026-07-05T00:00:00Z") ■⟦0,0⟧(team_procurement,approval_limit_usd_cents,?Limit)?
08

Typed writes

↗

Typed writes distinguish an observation, an interval-valid fact, a derived reflection, and a compensation. Their different metadata requirements preserve what kind of claim was recorded.

:event(S,P,O).

⊙(S,P,O).

An Event records a primary observation of something that happened. Its observation time belongs to the system record; it does not acquire a Fact's independent world-valid interval. The typed write surface distinguishes this observation from a correctable fact or a derived reflection.

:event(alice, joined, club).

Notation ⊙ = :event

Unicode / agent
⊙(alice, joined, club).
:fact(S,P,O) |>> valid(from,to).

𝕋(S,P,O) |>> valid(from,to).

A typed Fact states something that is true over an explicit world-time interval, such as a contract tier being in force. The valid modifier supplies that interval separately from when the system records it. Bare fact syntax parses, but the write bridge enforces the required metadata.

:fact(alice, member, club) |>> valid("2026-01-01T00:00:00Z", "2027-01-01T00:00:00Z").

Notation 𝕋 = :fact

Unicode / agent
𝕋(alice, member, club) |>> valid("2026-01-01T00:00:00Z", "2027-01-01T00:00:00Z").
:reflect(S,P,O) |>> from(sources) |>> conf("score").

∴(S,P,O) |>> from(sources) |>> conf("score").

A Reflection records a conclusion synthesized from source evidence, together with provenance and confidence. Its sources explain what the conclusion was derived from. Bare reflect syntax parses, but lowering requires provenance rather than inventing it.

:reflect(alice, likes, tea) |>> from(source) |>> conf("0.9").

Notation ∴ = :reflect

Unicode / agent
∴(alice, likes, tea) |>> from(source) |>> conf("0.9").
:compensate(S,P,O) |>> from(sources) |>> conf("score").

↺(S,P,O) |>> from(sources) |>> conf("score").

A Compensation records the corrective action associated with a failed or reversed operation. It specializes Reflection: the write carries source provenance and confidence, while its type identifies the compensation in audit views. Writing the record is not itself an instruction to undo an arbitrary external action.

:compensate(alice, likes, coffee) |>> from(source) |>> conf("0.9").

Notation ↺ = :compensate

Unicode / agent
↺(alice, likes, coffee) |>> from(source) |>> conf("0.9").
09

Similarity & graphs

↗

Similarity queries use registered indexes and structured query values to retrieve nearby candidates. Their output can participate in a larger query, but their registration and grounding requirements still apply.

:cloud(atom = weight, …)

≋(atom = weight, …)

A cloud represents a weighted collection of atoms as one value for similarity operations. Weights express each atom's contribution to the collection. Lowering resolves names through the lexicon and permits up to 32 entries.

:out(alice, vector, :cloud(tea = 0.7, coffee = 0.3)).

Notation ≋ = :cloud

Unicode / agent
⇑(alice, vector, ≋(tea = 0.7, coffee = 0.3)).
:graph(weights | (src,dst,kind), …)

⬠(weights | (src,dst,kind), …)

A graph value adds relationships among weighted atoms, allowing a probe to describe structure as well as membership. Edges name their source and destination entries. Their kinds are weak or strong, and the existing bar-separated grammar separates weights from edges.

:out(alice, graph, :graph(tea = 0.7, coffee = 0.3 | (tea, coffee, strong))).

Notation ⬠ = :graph

Unicode / agent
⇑(alice, graph, ⬠(tea = 0.7, coffee = 0.3 | (tea, coffee, strong))).
:scene(domain | cloud = weight, …)

◫(domain | cloud = weight, …)

A scene groups weighted clouds into a higher-level value for hierarchical similarity. A domain identifies the kind of scene: episode, doc, multimodal, or persona. Each inner slot must lower to a cloud rather than an arbitrary term.

:out(alice, scene, :scene(episode | :cloud(tea = 1.0) = 1.0)).

Notation ◫ = :scene

Unicode / agent
⇑(alice, scene, ◫(episode | ≋(tea = 1.0) = 1.0)).
::register relation:index as kind in tier.

::register relation:index as kind in tier.

Index registration makes a named relation index available to similarity queries. Its kind determines the query parameters and value shapes that later probes can use. The optional tier is wm, ep, lm, sm, or in; omitting it selects the registry default.

::register drinks:embed as cloud in sm.
Unicode / agent
::register drinks:embed as cloud in sm.
:probe relation:index{bindings | query = term, k = n}

~relation:index{bindings | query = term, k = n}

An L1 probe searches a registered index for values similar to its query value. It binds the requested outputs and accepts parameters such as k when the index kind supports them. Query variables must already be grounded, and named parameters are validated for that index.

(?X, match, yes) :- :probe drinks:embed{?X | query = tea, k = 10}?

Notation ~ = :probe

Unicode / agent
★(?X, match, yes) ← ~drinks:embed{?X | query = tea, k = 10}?
:scene_probe relation:index{bindings | query = term, k = n}

≈relation:index{bindings | query = term, k = n}

A scene probe searches a registered hierarchical scene index using a structured scene query. It lets the query retain relationships among component clouds rather than flattening the scene into one ordinary value. The index must exist before the probe can execute.

(?X, match, yes) :- :scene_probe scenes:hierarchical{?X | query = tea, k = 10}?

Notation ≈ = :scene_probe

Unicode / agent
★(?X, match, yes) ← ≈scenes:hierarchical{?X | query = tea, k = 10}?
:neighbors relation:index_graph{bindings | parameters}

⋈relation:index_graph{bindings | parameters}

A neighbors scan traverses a registered proximity graph to retrieve graph neighbors under its parameters. This is a graph access operation, distinct from ordinary relational matching. The parser preserves the _graph suffix; registry lookup removes it.

(?X, neighbor, ?Y) :- :neighbors drinks:embed_graph{?X, ?Y | k = 10}?

Notation ⋈ = :neighbors

Unicode / agent
★(?X, neighbor, ?Y) ← ⋈drinks:embed_graph{?X, ?Y | k = 10}?
:resonate(query,output)

∿(query,output)

Resonate is a short form for a cloud probe against the automatically registered _system:resonate index in the semantic tier. It supplies a query and output without spelling the full probe. Use an explicit probe when top-k or threshold controls are needed.

(?X, match, yes) :- :resonate(tea, ?X)?

Notation ∿ = :resonate

Unicode / agent
★(?X, match, yes) ← ∿(tea, ?X)?
10

Transmissions

↗

Transmissions group commands into sessions with shared scope and output choices. Memory-tier modifiers select semantic, episodic, institutional (iota), or other memory. A session supplies the default scope; a squirt can supply its own. A complete standalone statement keeps its punctuation inside either scope.

WZ:: items

WZ:: items

WZ:: starts a session. The next WZ:: or the end of a complete transmission closes it. Simple items may omit their terminator.

WZ:: (alice likes ?Drink)
Unicode / agent
WZ:: (alice likes ?Drink)
WZ:: :wm :ep :sm :sc :in :lm :co :all :li items

WZ:: ω ε σ σχ ι λ κ Ω Λ items

Tier selectors choose the memory tiers used by reads within a transmission's scope. They are operational routing choices, not values written into the user's Context slot. The mem spelling is a pentad constructor, not a tier prefix; Ω selects all tiers for reads.

WZ:: :sm (alice likes ?Drink)

Notation ω=:wm; ε=:ep; σ=:sm; σχ=:sc; ι=:in; λ=:lm; κ=:co; Ω=:all; Λ=:li

Unicode / agent
WZ::σ (alice likes ?Drink)
WZ:: :sm items

WZ:: σ items

Semantic memory holds consolidated knowledge. The sm selector chooses exactly semantic memory, excluding the schema subtier. Request sm and sc together to read both. Tier selection does not set the Context slot.

WZ:: :sm (alice likes ?Drink)

Notation σ = :sm

Unicode / agent
WZ:: σ (alice likes ?Drink)
WZ:: :ep items

WZ:: ε items

Episodic memory records experiences and events. The ep selector chooses that tier; temporal operators separately specify when a pattern holds. This query asks which tool an action used in episodic memory.

WZ:: :ep (?Action tool ?Tool)

Notation ε = :ep

Unicode / agent
WZ:: ε (?Action tool ?Tool)
WZ:: :in items

WZ:: ι items

The institutional tier selects knowledge supplied by its owner.

WZ:: :in (alice works_for ?Organization)

Notation ι = :in

Unicode / agent
WZ:: ι (alice works_for ?Organization)
WZ:: :sc (?S predicate_definition ?O)

WZ:: σχ (?S predicate_definition ?O)

WaxSchema stores predicate definitions: the vocabulary used to describe facts. The sc selector chooses schema memory independently of semantic memory. Use sm and sc together to select both. Schema rows carry WaxDewey addresses beginning with the schema marker σχ.

WZ:: :sc (?S predicate_definition ?O)

Notation σχ = :sc

Unicode / agent
WZ:: σχ (?S predicate_definition ?O)
:scope("x-wb:/tier/...")

@"x-wb:/tier/..."

An address scope narrows reads to a WaxDewey region. A prefix selects its subtree; a complete point address selects one row. The address supplies its tier. An explicit conflicting tier is an error. A squirt's explicit scope replaces the frame default. Every read in the query, including negation, uses that scope: absence means no match within the selected region.

WZ:: events { :scope("x-wb:/ep/0/42") (?Action tool ?Tool) }

Notation @"address" = :scope("address")

Unicode / agent
WZ:: events { @"x-wb:/ep/0/42" (?Action tool ?Tool) }
:scope("address") query?

@"address" query?

The same address scope can qualify a standalone query. It bounds all input reads before joins, reductions, or exclusions run. as_of and valid_at independently choose the system's knowledge cutoff and the world's time. An episodic address read returns an error if eviction has made the resident source incomplete.

:scope("x-wb:/ep/0/42") :rd(?Action, tool, ?Tool)?

Notation @"address" = :scope("address")

Unicode / agent
@"x-wb:/ep/0/42" ⊢(?Action, tool, ?Tool)?
WZ:: tiers? label? { tiers? |>> format items }

WZ:: tiers? label? { tiers? |>> format items }

A squirt is a labelled or unlabelled group of statements inside a session frame. It inherits the frame's tier scope and result representation unless it supplies its own. Explicit squirt tiers replace the frame default; they do not add to it. The optional result modifier selects bindings, pentad, or proof. Several sibling squirts let one transmission carry queries with different memory scopes and answer forms. The example reads episodic events, semantic knowledge, and institutional knowledge in separate groups.

WZ:: :ep :sm events { :ep (?Action tool ?Tool) } knowledge { :sm (alice likes ?Drink) } institution { :in (alice works_for ?Organization) }

Notation ε=:ep; σ=:sm; ι=:in

Unicode / agent
WZ:: ε σ events { ε (?Action tool ?Tool) } knowledge { σ (alice likes ?Drink) } institution { ι (alice works_for ?Organization) }
WZ:: |>> proof items

WZ:: |>> proof items

A frame result modifier sets the answer representation for a frame or a squirt. A more specific statement modifier can select its own representation. It controls presentation of results rather than changing the facts stored in memory.

WZ:: |>> proof (alice likes ?Drink)
Unicode / agent
WZ:: |>> proof (alice likes ?Drink)
name(?S, ?O) => (S, P, O)

name(?S, ?O) ⇒ (S, P, O)

Write transmission-wide definitions before the first session.

ancestor(?S, ?O) => (?S, parent, ?O)

Notation ⇒ = =>

Unicode / agent
ancestor(?S, ?O) ⇒ (?S, parent, ?O)
// comment

// comment

A line comment annotates source text for a reader and has no query meaning. The lexer discards everything from the comment marker through the end of that line. A final comment also works when the input has no trailing newline.

:rd(alice, likes, tea)? // read
Unicode / agent
⊢(alice, likes, tea)? // read
WZ:: defaults squirt...

WZ:: defaults squirt...

One transmission can ask about recorded actions in a particular episodic region, preferences in semantic memory, and the schema that describes the vocabulary. The events squirt replaces the frame default with an address scope; preferences selects exactly semantic memory; vocabulary selects exactly schema and asks for pentad output. Context and Lineage remain ordinary query values within those scopes.

WZ:: :ep :sm
  events { :scope("x-wb:/ep/0/42") :rd(?Action,tool,?Tool,?Run,?Receipt) }
  preferences { :sm :rd(?Agent,preference,?Preference,?Project,?Source) }
  vocabulary { :sc |>> pentad (?Predicate predicate_definition ?Definition) }

Notation ε=:ep; σ=:sm; σχ=:sc; @"address"=:scope("address")

Unicode / agent
WZ:: εσ
  events { @"x-wb:/ep/0/42" ⊢(?Action,tool,?Tool,?Run,?Receipt) }
  preferences { σ ⊢(?Agent,preference,?Preference,?Project,?Source) }
  vocabulary { σχ |>> pentad (?Predicate predicate_definition ?Definition) }
11

Declarations

↗

Declarations describe the columns of a relation. They give names and optional value classes to its roles without asserting any relation data.

declare relation(role:entity,role:data).

⊩ relation(role:entity,role:data).

A relation declaration names a relation's columns so later uses can identify their roles. Columns can optionally be classified as entity or data. The declaration describes the relation; it does not assert a row of that relation.

declare purchase(buyer:entity, item:data).

Notation ⊩ = declare

Unicode / agent
⊩ purchase(buyer:entity, item:data).
12

Trace evidence

↗

Trace operations inspect system evidence: retrieve its payload, verify a receipt, walk its supporting graph, or audit a scope. A user citation in Lineage is useful domain data but does not create this evidence.

:resolve(:trace_ref(0xHEX),?Output)?

↪(⌖(0xHEX),?Output)?

Resolve retrieves the evidence bytes identified by a trace reference. It does not perform an explanation graph walk or establish that the evidence has a seal. Execution requires an authenticated operator and an adapter for the evidence's owner.

:resolve(:trace_ref(0x00000000000000000000000000000001), ?Evidence)?

Notation ↪ = :resolve

Unicode / agent
↪(⌖(0x00000000000000000000000000000001), ?Evidence)?
:attest(:trace_ref(0xHEX),?Output)?

✓(⌖(0xHEX),?Output)?

Attest retrieves and verifies the retained receipt for a trace reference under the owner's trusted key context. Evidence whose receipt is not yet available can be pending; missing evidence can be unavailable. This is a system evidence operation, not a claim made by filling the user Lineage slot.

:attest(:trace_ref(0x00000000000000000000000000000001), ?Evidence)?

Notation ✓ = :attest

Unicode / agent
✓(⌖(0x00000000000000000000000000000001), ?Evidence)?
:explain(ref,:bounds(depth,nodes,bytes),?Output)?

∵(ref,⧉(depth,nodes,bytes),?Output)?

Explain walks the evidence behind a trace reference to show how it was supported. Depth, node-count, and byte bounds keep the traversal finite. It operates on recorded trace evidence rather than interpreting a free-text citation as a proof.

:explain(:trace_ref(0x00000000000000000000000000000001), :bounds(2, 10, 1024), ?Evidence)?

Notation ∵ = :explain

Unicode / agent
∵(⌖(0x00000000000000000000000000000001), ⧉(2, 10, 1024), ?Evidence)?
:audit(:all,?Cut,?Output)?

⌕(:all,?Cut,?Output)?

Audit inspects the requested evidence scope at a cut binding, allowing an operator to examine a defined portion of the trace history. Trace inputs must already be grounded. Trace goals cannot participate in recursive rule evaluation.

:audit(:all, ?Cut, ?Evidence)?

Notation ⌕ = :audit

Unicode / agent
⌕(:all, ?Cut, ?Evidence)?
:trace_ref(0xHEX|?Ref)

⌖(0xHEX|?Ref)

A trace-reference constructor marks a value as the identifier of system evidence. It accepts a 16-byte hexadecimal ID or a named variable that will supply the reference. A citation string in user Lineage is not automatically such a reference.

:resolve(:trace_ref(0x00000000000000000000000000000001),?R)?

Notation ⌖ = :trace_ref

Unicode / agent
↪(⌖(0x00000000000000000000000000000001),?R)?
:bounds(depth,nodes,bytes)

⧉(depth,nodes,bytes)

Explanation bounds specify the maximum traversal depth, visited nodes, and returned bytes for a trace walk. They let a caller request useful evidence within a finite budget. Each limit is an integer literal validated against the trace API's allowed bounds.

:explain(:trace_ref(0x00000000000000000000000000000001),:bounds(1,2,3),?R)?

Notation ⧉ = :bounds

Unicode / agent
∵(⌖(0x00000000000000000000000000000001),⧉(1,2,3),?R)?
13

Operational commands

↗

These operational interfaces expose specialized history, registration, and administration. Their handlers supply authorization and argument contracts; parsing their names does not guarantee ordinary query execution.

:diff(args)?

:diff(args)?

An Astwerk diff compares two commit references and returns changes subject to its cap. It answers what changed between recorded states rather than comparing two arbitrary strings. Argument validation and execution belong to the Astwerk read surface.

:diff(alice)?
Unicode / agent
:diff(alice)?
:blame(args)?

:blame(args)?

Astwerk blame retrieves attribution for a commit reference, answering where the recorded state came from. It is an operational history read, not an ordinary relation predicate. Its dedicated execution surface validates the reference and authority.

:blame(alice)?
Unicode / agent
:blame(alice)?
:audit_log(args)?

:audit_log(args)?

The audit-log query retrieves recorded audit activity for inspection. It lets an authorized caller examine system actions rather than infer them from application facts. The dedicated audit surface validates its arguments and access.

:audit_log(alice)?
Unicode / agent
:audit_log(alice)?
:spend_log(args)?

:spend_log(args)?

The spend-log query retrieves recorded spending activity, such as the system's accounted resource use. It is an operational history API with its own authorization and argument checks. It is not an aggregate over an arbitrary user relation named spend.

:spend_log(alice)?
Unicode / agent
:spend_log(alice)?
:cap_log(args)?

:cap_log(args)?

The capability-log query retrieves the capability history exposed by its operational surface. It supports inspection of recorded capability activity. The receiving handler controls which arguments and caller authorities are accepted.

:cap_log(alice)?
Unicode / agent
:cap_log(alice)?
:skill_retrievals(args)?

:skill_retrievals(args)?

The skill-retrieval history query reports recorded retrieval activity for skills. It helps an authorized caller inspect which skill retrievals occurred. Its dedicated history handler supplies the argument and access contract.

:skill_retrievals(alice)?
Unicode / agent
:skill_retrievals(alice)?
:case_type(args).

:case_type(args).

A case-type definition describes a type consumed by the case registry. It is a registration write rather than an ordinary read or derived rule. The registry supplies the definition's validation and interpretation.

:case_type(example).
Unicode / agent
:case_type(example).
:lexicon_redact(args).

:lexicon_redact(args).

Lexicon redaction is an operator action for redacting the terms selected by its arguments. It uses a dedicated handler and authority checks. The documentation example demonstrates syntax only and does not execute the redaction.

:lexicon_redact(example).
Unicode / agent
:lexicon_redact(example).
:vaccine_quarantine(args).

:vaccine_quarantine(args).

Quarantine places the selected target under the vaccine subsystem's operator control. This is an administrative action through the dedicated vaccine endpoint, not a predicate that filters query rows. The endpoint enforces its argument and authorization rules.

:vaccine_quarantine(example).
Unicode / agent
:vaccine_quarantine(example).
:vaccine_unquarantine(args).

:vaccine_unquarantine(args).

Unquarantine releases the selected target from vaccine quarantine through the operator endpoint. It reverses the administrative quarantine state rather than retracting an arbitrary user assertion. The dedicated handler controls authorization and validation.

:vaccine_unquarantine(example).
Unicode / agent
:vaccine_unquarantine(example).
14

Graph analytics

↗

Graph analytics derive properties of a relation's topology. Role projection selects the edge endpoints when the source relation has more than two participants.

cc(:relation,?Node,?Component)

◉(:relation,?Node,?Component)

Connected-components analysis groups nodes that belong to the same connected part of a source relation's graph. It binds each node and its component, allowing later clauses to compare or group component membership. The source relation supplies the graph's edges.

comp(?N, ?C) :- cc(:link, ?N, ?C)?

Notation ◉ = cc

Unicode / agent
comp(?N, ?C) ← ◉(:link, ?N, ?C)?
cc(:relation,?N,?C) :with(from = :src, to = :dst)

◉(:relation,?N,?C) ⟪from = :src, to = :dst⟫

A role projection tells graph analysis which two roles in an n-ary relation supply each edge's endpoints. For example, src and dst can be selected while other roles remain relation data. It adapts a multi-participant relation to connected-components analysis without changing the stored relation.

comp(?N, ?C) :- cc(:link, ?N, ?C) :with(from = :src, to = :dst)?

Notation :with(from = :src, to = :dst) = ⟪from = :src, to = :dst⟫

Unicode / agent
comp(?N, ?C) ← ◉(:link, ?N, ?C) ⟪from = :src, to = :dst⟫?
15

Value functions

↗

Value functions compute a scalar within a row, such as a string, length, conversion, or extremum. They can appear in computed expressions; inputs must be available when the expression is evaluated.

:cat(a,b,…)

⊕(a,b,…)

Scalar concatenation joins two or more argument values into one string in their supplied order, adding no separator. Use it to construct labels or identifiers. Ground calls can fold during lowering; calls that depend on rule variables become computed assignments.

(?X, label, :cat(?Name, "!")) :- (?X, name, ?Name)?

Notation ⊕ = :cat

Unicode / agent
★(?X, label, ⊕(?Name, "!")) ← ★(?X, name, ?Name)?
:strlen(text)

ℓ(text)

String length returns how long a text value is under the engine's string operations. The result is a scalar that can be bound, compared, or used in arithmetic. It inspects the text value rather than the length of its source-code spelling with quotes.

(?X, length, :strlen(?Name)) :- (?X, name, ?Name)?

Notation ℓ = :strlen

Unicode / agent
★(?X, length, ℓ(?Name)) ← ★(?X, name, ?Name)?
:substr(text,start,length)

⊏(text,start,length)

Substring extracts a contiguous portion of text using a start and length. Both must be nonnegative. A start beyond the end drops the row; a requested length that runs past the end is clamped to the remaining text.

(?X, prefix, :substr(?Name, 0, 2)) :- (?X, name, ?Name)?

Notation ⊏ = :substr

Unicode / agent
★(?X, prefix, ⊏(?Name, 0, 2)) ← ★(?X, name, ?Name)?
:ord(text)

ℕ(text)

Ordinal encoding turns a string's UTF-8 bytes into one positive integer. It starts at one, then multiplies by 256 and adds each byte in order. This is a whole-string encoding, not the Unicode code point of a character.

(?X, ordinal, :ord(?Name)) :- (?X, name, ?Name)?

Notation ℕ = :ord

Unicode / agent
★(?X, ordinal, ℕ(?Name)) ← ★(?X, name, ?Name)?
:to_number(text)

ℤ(text)

Number conversion reads decimal, hexadecimal, or binary text as an integer. Use it before numerical operations when an input arrives as text. Invalid text cannot supply a numeric binding and drops that binding.

(?X, number, :to_number(?Text)) :- (?X, text, ?Text)?

Notation ℤ = :to_number

Unicode / agent
★(?X, number, ℤ(?Text)) ← ★(?X, text, ?Text)?
:to_string(value)

𝒮(value)

String conversion supplies a value's text representation for later text operations or output. In the evaluator, scalar values already carry string spellings, so this operation preserves that spelling. It does not quote or escape a value as Wunderlog source code.

(?X, text, :to_string(?Number)) :- (?X, number, ?Number)?

Notation 𝒮 = :to_string

Unicode / agent
★(?X, text, 𝒮(?Number)) ← ★(?X, number, ?Number)?
:max(a,b,…)

⊔(a,b,…)

Scalar maximum chooses the greatest of two or more supplied arguments within one row. It compares numerically when all arguments are numbers and lexicographically otherwise. This differs from aggregate max, which reduces values across rows.

(?X, capped, :max(?N, 10)) :- (?X, number, ?N)?

Notation ⊔ = :max

Unicode / agent
★(?X, capped, ⊔(?N, 10)) ← ★(?X, number, ?N)?
:min(a,b,…)

⊓(a,b,…)

Scalar minimum chooses the least of two or more supplied arguments within one row. It compares numerically when all arguments are numbers and lexicographically otherwise. Its shared glyph is distinguished from unary aggregate min by arity and binding grammar.

(?X, capped, :min(?N, 10)) :- (?X, number, ?N)?

Notation ⊓ = :min

Unicode / agent
★(?X, capped, ⊓(?N, 10)) ← ★(?X, number, ?N)?
16

Query errors & fixes

↗

A refusal explains why the requested answer could not be produced. It is different from an exact empty result. Each entry below explains the condition and the corresponding correction or alternative.

resonance_wavefront

resonance_wavefront

The substrate returned a resonance wavefront rather than row fingerprints. Use a served exact read when row identities are required.

:rd(alice, likes, ?Drink)?

Notation wire label: ok_resonance

Unicode / agent
⊢(alice, likes, ?Drink)?
zrp_miss

zrp_miss

A budgeted walk found nothing. This is not proof of absence and differs from an exact no_result. Use an exact served read to establish absence.

:rd(alice, likes, ?Drink)?

Notation wire label: ok_miss

Unicode / agent
⊢(alice, likes, ?Drink)?
empty_feasible_set

empty_feasible_set

No served primitive can answer a body atom. Rewrite to a supported shape; do not treat this as an empty answer.

(?X, answer, ?Y) :- (?X, parent, ?Y)?
Unicode / agent
★(?X, answer, ?Y) ← ★(?X, parent, ?Y)?
ungrounded_head_variable

ungrounded_head_variable

A projected variable is bound by no body atom. Bind it positively or remove it from the head.

(?X, answer, ?Y) :- (?X, parent, ?Y)?
Unicode / agent
★(?X, answer, ?Y) ← ★(?X, parent, ?Y)?
ungrounded_negation_variable

ungrounded_negation_variable

A variable occurs only in a negated atom. A negation tests absence and cannot bind. Bind the variable positively, or project it out with a helper rule and negate that.

(?X, eligible, yes) :- (?X, member, yes), !(?X, banned_by, ?Who)?
Unicode / agent
★(?X, eligible, yes) ← ★(?X, member, yes), ¬★(?X, banned_by, ?Who)?
aggregate_witness_escape

aggregate_witness_escape

A variable local to a non-witness reduction escaped its scope. Project the reduction output; min/max have separate witness semantics.

(?X, count, ?N) :- (?X, type, person), ?N := count(?Y) { (?X, likes, ?Y) }?
Unicode / agent
★(?X, count, ?N) ← ★(?X, type, person), ?N ≔ #(?Y) { ★(?X, likes, ?Y) }?
anonymous_variable_misuse

anonymous_variable_misuse

Underscore was used in a head, fact, or filter. Use a concrete value or a positively bound named variable.

(?X, answer, yes) :- (?X, likes, _)?
Unicode / agent
★(?X, answer, yes) ← ★(?X, likes, _)?
variable_in_fact

variable_in_fact

An asserted fact contains a variable. Supply ground values or use a rule query.

:out(alice, likes, tea).
Unicode / agent
⇑(alice, likes, tea).
unstratifiable_cycle

unstratifiable_cycle

A dependency cycle passes through negation or aggregation. Break the cycle into stratified stages.

(?X, eligible, yes) :- (?X, member, yes), !(?X, banned, yes)?
Unicode / agent
★(?X, eligible, yes) ← ★(?X, member, yes), ¬★(?X, banned, yes)?
recursion_through_probe

recursion_through_probe

A rule recurs through a similarity probe. Separate top-k retrieval from the recursive rule. The documented detector checks self-recursion, not all multi-rule cycles.

(?X, match, yes) :- ~drinks:embed{?X | query = tea, k = 10}?
Unicode / agent
★(?X, match, yes) ← ~drinks:embed{?X | query = tea, k = 10}?
request_scoped_rule_unsupported

request_scoped_rule_unsupported

The read door cannot project the requested rule shape. Supply a tuple-bearing head and a supported recursive role projection. It never falls through to materialization.

(?X, answer, ?Y) :- (?X, parent, ?Y)?
Unicode / agent
★(?X, answer, ?Y) ← ★(?X, parent, ?Y)?
trace_operator_context_required

trace_operator_context_required

Trace evidence needs an authenticated operator and owner adapter. Obtain the proper context rather than changing query syntax.

:resolve(:trace_ref(0x00000000000000000000000000000001), ?Evidence)?
Unicode / agent
↪(⌖(0x00000000000000000000000000000001), ?Evidence)?
↔

Notation & glyphs

Core operators have paired symbolic and ASCII forms. Filled temporal shapes refer to the past; open shapes refer to the future. Diamonds mean “at least once,” squares mean “throughout,” and circles mean “one step.”

Unicode is the primary form for agents; ASCII is the human-facing spelling. Both are accepted. The pairs below are checked against the parser. Query composition, scalar functions, and value constructors have glyph forms. Diagnostic and administrative commands keep names. Min/max share their glyphs across scalar and aggregate calls; arity distinguishes them. Count uses query versus rule-binding context.

Equivalent forms, grouped by language family
GlyphASCIIFamilyIn context
★(S,P,O[,C,L])pentad
Example
ASCII
(?X, p, ?Y) :- (?X, p, ?Y)?
Glyph
(?X, p, ?Y) :- ★(?X, p, ?Y)?
⇑:outwrite
Example
ASCII
:out(a, p, b).
Glyph
⇑(a, p, b).
⇓:takeread
Example
ASCII
:take(a, p, b)?
Glyph
⇓(a, p, b)?
⊢:rdread
Example
ASCII
:rd(a, p, b)?
Glyph
⊢(a, p, b)?
⊶:retractwrite
Example
ASCII
:retract(a, p, b).
Glyph
⊶(a, p, b).
⊸:revisewrite
Example
ASCII
:revise(a,b).
Glyph
⊸(a,b).
⊙:eventwrite
Example
ASCII
:event(a,p,b).
Glyph
⊙(a,p,b).
𝕋:factwrite
Example
ASCII
:fact(a,p,b).
Glyph
𝕋(a,p,b).
∴:reflectwrite
Example
ASCII
:reflect(a,p,b).
Glyph
∴(a,p,b).
↺:compensatewrite
Example
ASCII
:compensate(a,p,b).
Glyph
↺(a,p,b).
←:-rule
Example
ASCII
(?X,p,?Y) :- (?X,q,?Y)?
Glyph
(?X,p,?Y) ← (?X,q,?Y)?
∇standingrule
Example
ASCII
standing (?X,p,?Y) :- (?X,q,?Y)?
Glyph
∇ (?X,p,?Y) :- (?X,q,?Y)?
∨;rule
Example
ASCII
:rd(?X,p,b) ; :rd(?X,q,d)?
Glyph
⊢(?X,p,b) ∨ ⊢(?X,q,d)?
⊩declaredeclaration
Example
ASCII
declare edge(from:entity,to:entity).
Glyph
⊩ edge(from:entity,to:entity).
≔:=binding
Example
ASCII
(a,p,?N) :- ?N := 2 + 3?
Glyph
(a,p,?N) :- ?N ≔ 2 + 3?
≥>=comparison
Example
ASCII
(a,p,?N) :- (a,q,?N) | ?N >= 1?
Glyph
(a,p,?N) :- (a,q,?N) | ?N ≥ 1?
≤<=comparison
Example
ASCII
(a,p,?N) :- (a,q,?N) | ?N <= 1?
Glyph
(a,p,?N) :- (a,q,?N) | ?N ≤ 1?
Σsumaggregate
Example
ASCII
(a,p,?N) :- (a,q,?V), ?N := sum(?V)?
Glyph
(a,p,?N) :- (a,q,?V), ?N := Σ(?V)?
#countaggregate
Example
ASCII
(a,p,?N) :- (a,q,?V), ?N := count(?V)?
Glyph
(a,p,?N) :- (a,q,?V), ?N := #(?V)?
⊓minaggregate
Example
ASCII
(a,p,?N) :- (a,q,?V), ?N := min(?V)?
Glyph
(a,p,?N) :- (a,q,?V), ?N := ⊓(?V)?
⊔maxaggregate
Example
ASCII
(a,p,?N) :- (a,q,?V), ?N := max(?V)?
Glyph
(a,p,?N) :- (a,q,?V), ?N := ⊔(?V)?
μavgaggregate
Example
ASCII
(a,p,?N) :- (a,q,?V), ?N := avg(?V)?
Glyph
(a,p,?N) :- (a,q,?V), ?N := μ(?V)?
⊟medianaggregate
Example
ASCII
(a,p,?N) :- (a,q,?V), ?N := median(?V)?
Glyph
(a,p,?N) :- (a,q,?V), ?N := ⊟(?V)?
⊠stddevaggregate
Example
ASCII
(a,p,?N) :- (a,q,?V), ?N := stddev(?V)?
Glyph
(a,p,?N) :- (a,q,?V), ?N := ⊠(?V)?
℘percentileaggregate
Example
ASCII
(a,p,?N) :- (a,q,?V), ?N := percentile(95,?V)?
Glyph
(a,p,?N) :- (a,q,?V), ?N := ℘(95,?V)?
⧺string_aggaggregate
Example
ASCII
(a,p,?N) :- (a,q,?V), ?N := string_agg(?V)?
Glyph
(a,p,?N) :- (a,q,?V), ?N := ⧺(?V)?
⨄array_aggaggregate
Example
ASCII
(a,p,?N) :- (a,q,?V), ?N := array_agg(?V)?
Glyph
(a,p,?N) :- (a,q,?V), ?N := ⨄(?V)?
⋖firstaggregate
Example
ASCII
(a,p,?N) :- (?T,q,?V), ?N := first(?V,?T)?
Glyph
(a,p,?N) :- (?T,q,?V), ?N := ⋖(?V,?T)?
⋗lastaggregate
Example
ASCII
(a,p,?N) :- (?T,q,?V), ?N := last(?V,?T)?
Glyph
(a,p,?N) :- (?T,q,?V), ?N := ⋗(?V,?T)?
▷byaggregate
Example
ASCII
(?G,p,?N) :- (?G,q,?V), ?N := count(?V) by ?G?
Glyph
(?G,p,?N) :- (?G,q,?V), ?N := count(?V) ▷ ?G?
⊞tumblewindow
Example
ASCII
(?B,p,?T) :- (a,q,?T), ?B := tumble[1h](?T)?
Glyph
(?B,p,?T) :- (a,q,?T), ?B := ⊞[1h](?T)?
◷recentwindow
Example
ASCII
(a,p,?T) :- (a,q,?T), recent[1h](?T)?
Glyph
(a,p,?T) :- (a,q,?T), ◷[1h](?T)?
♦:oncetemporal
Example
ASCII
:once(a,p,b)?
Glyph
♦(a,p,b)?
◇:eventuallytemporal
Example
ASCII
:eventually(a,p,b)?
Glyph
◇(a,p,b)?
●:prevtemporal
Example
ASCII
:prev(a,p,b)?
Glyph
●(a,p,b)?
○:nexttemporal
Example
ASCII
:next(a,p,b)?
Glyph
○(a,p,b)?
■:historicallytemporal
Example
ASCII
:historically(a,p,b)?
Glyph
■(a,p,b)?
□:alwaystemporal
Example
ASCII
:always(a,p,b)?
Glyph
□(a,p,b)?
↤:sincetemporal
Example
ASCII
:since(a,b)?
Glyph
↤(a,b)?
Ⓣ:as_oftemporal
Example
ASCII
:as_of("2026-01-01T00:00:00Z"): :rd(a,p,b)?
Glyph
Ⓣ("2026-01-01T00:00:00Z"): :rd(a,p,b)?
Ⓥ:valid_attemporal
Example
ASCII
:valid_at("2026-01-01T00:00:00Z"): :rd(a,p,b)?
Glyph
Ⓥ("2026-01-01T00:00:00Z"): :rd(a,p,b)?
⟦ ⟧[ ]interval
Example
ASCII
:once[0,5h](a,p,b)?
Glyph
:once⟦0,5h⟧(a,p,b)?
−∞ ∞omitted boundinterval
Example
ASCII
:once[,](a,p,b)?
Glyph
:once⟦−∞,∞⟧(a,p,b)?
⟪ ⟫:with(...)roles
Example
ASCII
:out(a,p,:with(from = b,to = c)).
Glyph
:out(a,p,⟪from = b,to = c⟫).
◉ccanalytic
Example
ASCII
comp(?N,?C) :- cc(:link,?N,?C)?
Glyph
comp(?N,?C) :- ◉(:link,?N,?C)?
⟪from = :src,to = :dst⟫:with(from = :src,to = :dst)analytic
Example
ASCII
comp(?N,?C) :- cc(:link,?N,?C) :with(from = :src,to = :dst)?
Glyph
comp(?N,?C) :- cc(:link,?N,?C) ⟪from = :src,to = :dst⟫?
~:probeprobe
Example
ASCII
(?X,p,yes) :- :probe drinks:embed{?X | query = tea,k = 10}?
Glyph
(?X,p,yes) :- ~drinks:embed{?X | query = tea,k = 10}?
≈:scene_probeprobe
Example
ASCII
(?X,p,yes) :- :scene_probe scenes:hierarchical{?X | query = tea,k = 10}?
Glyph
(?X,p,yes) :- ≈scenes:hierarchical{?X | query = tea,k = 10}?
⋈:neighborsprobe
Example
ASCII
(?X,p,?Y) :- :neighbors drinks:embed_graph{?X,?Y | k = 10}?
Glyph
(?X,p,?Y) :- ⋈drinks:embed_graph{?X,?Y | k = 10}?
↪:resolvetrace
Example
ASCII
:resolve(:trace_ref(0x00000000000000000000000000000001),?R)?
Glyph
↪(:trace_ref(0x00000000000000000000000000000001),?R)?
✓:attesttrace
Example
ASCII
:attest(:trace_ref(0x00000000000000000000000000000001),?R)?
Glyph
✓(:trace_ref(0x00000000000000000000000000000001),?R)?
∵:explaintrace
Example
ASCII
:explain(:trace_ref(0x00000000000000000000000000000001),:bounds(1,2,3),?R)?
Glyph
∵(:trace_ref(0x00000000000000000000000000000001),:bounds(1,2,3),?R)?
⌕:audittrace
Example
ASCII
:audit(:all,?Cut,?R)?
Glyph
⌕(:all,?Cut,?R)?
⇒=>frame
Example
ASCII
p(?S, ?O) => (?S, q, ?O)
Glyph
p(?S, ?O) ⇒ (?S, q, ?O)
ω:wmtier
Example
ASCII
WZ:: :wm (a p ?O)
Glyph
WZ:: ω (a p ?O)
ε:eptier
Example
ASCII
WZ:: :ep (a p ?O)
Glyph
WZ:: ε (a p ?O)
σ:smtier
Example
ASCII
WZ:: :sm (a p ?O)
Glyph
WZ:: σ (a p ?O)
ι:intier
Example
ASCII
WZ:: :in (a p ?O)
Glyph
WZ:: ι (a p ?O)
λ:lmtier
Example
ASCII
WZ:: :lm (a p ?O)
Glyph
WZ:: λ (a p ?O)
κ:cotier
Example
ASCII
WZ:: :co (a p ?O)
Glyph
WZ:: κ (a p ?O)
Ω:alltier
Example
ASCII
WZ:: :all (a p ?O)
Glyph
WZ:: Ω (a p ?O)
Λ:litier
Example
ASCII
WZ:: :li (a p ?O)
Glyph
WZ:: Λ (a p ?O)
⊓:minscalar
Example
ASCII
(a,p,?N) :- ?N := :min(3,2)?
Glyph
★(a,p,?N) ← ?N ≔ ⊓(3,2)?
⊔:maxscalar
Example
ASCII
(a,p,?N) :- ?N := :max(3,2)?
Glyph
★(a,p,?N) ← ?N ≔ ⊔(3,2)?
#:counthistory
Example
ASCII
:count(:rd(a,p,?X))?
Glyph
#(⊢(a,p,?X))?
≜:ns_bindnamespace
Example
ASCII
:ns_bind(app).
Glyph
≜(app).
⇶:inferinfer
Example
ASCII
:infer(a,p,2)?
Glyph
⇶(a,p,2)?
≍:matchrules
Example
ASCII
(?X, selected, yes) :- (?X, name, ?Name), :match("A.*", ?Name)?
Glyph
★(?X, selected, yes) ← ★(?X, name, ?Name), ≍("A.*", ?Name)?
⊂:containsrules
Example
ASCII
(?X, selected, yes) :- (?X, name, ?Name), :contains("ice", ?Name)?
Glyph
★(?X, selected, yes) ← ★(?X, name, ?Name), ⊂("ice", ?Name)?
⏚:currenthistory
Example
ASCII
:current(:rd(alice, likes, ?X))?
Glyph
⏚(⊢(alice, likes, ?X))?
ℋ:allhistory
Example
ASCII
:all(:rd(alice, likes, ?X))?
Glyph
ℋ(⊢(alice, likes, ?X))?
↥:limithistory
Example
ASCII
:limit(10, :rd(alice, likes, ?X))?
Glyph
↥(10, ⊢(alice, likes, ?X))?
↷:offsethistory
Example
ASCII
:offset(10, :rd(alice, likes, ?X))?
Glyph
↷(10, ⊢(alice, likes, ?X))?
↓:newesthistory
Example
ASCII
:newest(:as_of, :rd(alice, likes, ?X))?
Glyph
↓(Ⓣ, ⊢(alice, likes, ?X))?
↣:afterhistory
Example
ASCII
:after("00000000000000000000000000000001", :rd(alice, likes, ?X))?
Glyph
↣("00000000000000000000000000000001", ⊢(alice, likes, ?X))?
∝:with_utilityhistory
Example
ASCII
:with_utility(:rd(alice, likes, ?X))?
Glyph
∝(⊢(alice, likes, ?X))?
⊕:catbuiltins
Example
ASCII
(?X, label, :cat(?Name, "!")) :- (?X, name, ?Name)?
Glyph
★(?X, label, ⊕(?Name, "!")) ← ★(?X, name, ?Name)?
ℓ:strlenbuiltins
Example
ASCII
(?X, length, :strlen(?Name)) :- (?X, name, ?Name)?
Glyph
★(?X, length, ℓ(?Name)) ← ★(?X, name, ?Name)?
⊏:substrbuiltins
Example
ASCII
(?X, prefix, :substr(?Name, 0, 2)) :- (?X, name, ?Name)?
Glyph
★(?X, prefix, ⊏(?Name, 0, 2)) ← ★(?X, name, ?Name)?
ℕ:ordbuiltins
Example
ASCII
(?X, ordinal, :ord(?Name)) :- (?X, name, ?Name)?
Glyph
★(?X, ordinal, ℕ(?Name)) ← ★(?X, name, ?Name)?
ℤ:to_numberbuiltins
Example
ASCII
(?X, number, :to_number(?Text)) :- (?X, text, ?Text)?
Glyph
★(?X, number, ℤ(?Text)) ← ★(?X, text, ?Text)?
𝒮:to_stringbuiltins
Example
ASCII
(?X, text, :to_string(?Number)) :- (?X, number, ?Number)?
Glyph
★(?X, text, 𝒮(?Number)) ← ★(?X, number, ?Number)?
≋:cloudprobes
Example
ASCII
:out(alice, vector, :cloud(tea = 0.7, coffee = 0.3)).
Glyph
⇑(alice, vector, ≋(tea = 0.7, coffee = 0.3)).
⬠:graphprobes
Example
ASCII
:out(alice, graph, :graph(tea = 0.7, coffee = 0.3 | (tea, coffee, strong))).
Glyph
⇑(alice, graph, ⬠(tea = 0.7, coffee = 0.3 | (tea, coffee, strong))).
◫:sceneprobes
Example
ASCII
:out(alice, scene, :scene(episode | :cloud(tea = 1.0) = 1.0)).
Glyph
⇑(alice, scene, ◫(episode | ≋(tea = 1.0) = 1.0)).
▣:imgterms
Example
ASCII
:out(alice,portrait,:img("0000000000000000000000000000000000000000000000000000000000000000")).
Glyph
⇑(alice,portrait,▣("0000000000000000000000000000000000000000000000000000000000000000")).
∃:match_or_newterms
Example
ASCII
:out(:match_or_new("Ada Lovelace"),type,person).
Glyph
⇑(∃("Ada Lovelace"),type,person).
∿:resonateprobes
Example
ASCII
(?X, match, yes) :- :resonate(tea, ?X)?
Glyph
★(?X, match, yes) ← ∿(tea, ?X)?
⌖:trace_reftrace
Example
ASCII
:resolve(:trace_ref(0x00000000000000000000000000000001),?R)?
Glyph
↪(⌖(0x00000000000000000000000000000001),?R)?
⧉:boundstrace
Example
ASCII
:explain(:trace_ref(0x00000000000000000000000000000001),:bounds(1,2,3),?R)?
Glyph
∵(⌖(0x00000000000000000000000000000001),⧉(1,2,3),?R)?
¬!negation
Example
ASCII
(a,p,?V) :- (a,q,?V), !(a,r,?V)?
Glyph
★(a,p,?V) ← ★(a,q,?V), ¬★(a,r,?V)?
≠!=comparison
Example
ASCII
(a,p,?V) :- (a,q,?V), ?V != 1?
Glyph
★(a,p,?V) ← ★(a,q,?V), ?V ≠ 1?
−-arithmetic
Example
ASCII
(a,p,?N) :- ?N := 10 - 2?
Glyph
★(a,p,?N) ← ?N ≔ 10 − 2?
×*arithmetic
Example
ASCII
(a,p,?N) :- ?N := 3 * 2?
Glyph
★(a,p,?N) ← ?N ≔ 3 × 2?
÷/arithmetic
Example
ASCII
(a,p,?N) :- ?N := 10 / 2?
Glyph
★(a,p,?N) ← ?N ≔ 10 ÷ 2?
∺:analogyanalogy
Example
ASCII
(mexico,currency,?D) :- :analogy(currency_of,mexico,?D)?
Glyph
★(mexico,currency,?D) ← ∺(currency_of,mexico,?D)?
∺:analogy(A,B,C,?D)analogy
Example
ASCII
(mexico,currency,?D) :- :analogy(usa,dollar,mexico,?D)?
Glyph
★(mexico,currency,?D) ← ∺(usa,dollar,mexico,?D)?
σχ:sctier
Example
ASCII
WZ:: :sc (?S predicate_definition ?O)
Glyph
WZ:: σχ (?S predicate_definition ?O)

Catalog b0d64891351d · Spec for agents ↗