Skip to content
docs
Arxo ↗

Coming from Drools

For LLMs7 sections

In short: in Drools you keep a session alive, insert, update and retract facts, and call fireAllRules(); the engine re-evaluates incrementally and fires activations from the agenda. Arxo has no working memory and no agenda. Each state of the facts is a case, evaluated from scratch, and the answer is the set of conclusions with their proof, not a sequence of firings. A Drools session becomes a series of evaluations; not Fact() over memory becomes negation over a closed register; insertLogical becomes a strict rule whose conclusion disappears when its premise does; and salience has no counterpart, because order is not part of the answer. This page follows the fact-lifecycle example of the Drools comparison. The Arxo package quoted here passes law engine check; its scenarios and the Drools side of the experiment have not been run yet, so the page shows how the rules are written, not measured outcomes.

DroolsArxoWhat changes for you
A stateful session: insert, update, delete (retract), then fireAllRules()Each state of the facts is evaluated as its own case; a change is a new evaluation of the same questionThere is no incremental memory to manage; you compare answers between states
A DRL rule, when / thenA rule with when / then; the then part is a conclusion, not an actionRules derive statements; they do not modify facts
salience, agenda groups and setFocus, activation-groupNo agenda; firing order is not computedOrder is a property of the Drools run. Salience is not a priority between norms; precedence between conclusions is a priority with a reason
insertLogical with truth maintenanceA strict rule from the base fact to the dependent conclusionRemove the base and evaluate again: the conclusion has no support. The justification counting itself has no counterpart
not Fact() over working memoryA closure over a register plus not in a rule bodyAbsence counts as “false” only for a register declared complete; outside it, absence is unknown
no-loop and rules that update their own factsA rule cannot retrigger itself: conclusions do not change the facts it readsThe loop guard has nothing to guard
A stateless sessionEvery evaluation is already independentNo wrapper needed
A queryA truth question about the factThe same question form as any other
Event listeners and debug logs for explanationThe proof graph is the engine’s own outputThe trace does not need a wrapper

The first branch of the example fires when an amount is above a threshold. In Drools, an update that lowers the amount deactivates the rule. In Arxo there is nothing to deactivate: the new amount is a new case, and the question is asked again.

The package adds one thing that DRL leaves implicit: a presumption that the branch’s conclusion is absent until a basis for it is established. ConsequenceR1 concludes consequence_r1(s) when the asserted amount is above 10; DefaultNoR1 concludes its negation for any session on file. A priority with a reason decides between them:

Arxo Law
priority BranchBasisOverDefaultR1 {
prefer ConsequenceR1 over DefaultNoR1;
reason lex_specialis;
}

With the amount above the threshold, the basis beats the presumption. Below it, the presumption stands and the answer is an explicit “no” rather than silence. (The label lines of the rules on this page carry Russian descriptions and are omitted from the excerpts.)

insertLogical keeps a derived fact alive only while its justification holds, and retracts it automatically, with cascades, when the last justification goes. In Arxo a derived fact never outlives its premises, because nothing is stored between evaluations:

Arxo Law
rule LogicalConsequence strict {
for s: Session;
when asserted_logical_base(s);
then logical_consequence(s);
}

Evaluate with the base fact and logical_consequence(s) is established. Evaluate again without it and the conclusion has no support. The two sides can be compared on the final set of facts; the counting mechanism stays on the Drools side.

In DRL, not Fact() is true whenever working memory holds no matching fact. In Arxo, the absence of a fact is not a fact. To let absence mean “false”, the package declares that the register of blocking facts is complete for the sessions on file:

Arxo Law
closure BlockingAbsence {
predicate asserted_blocking;
domain session_on_file;
snapshot "urn:snapshot:exp-drools-factstand:blocking:2026-09-30";
complete_as_of @2026-09-30T00:00:00Z;
derive_explicit_negative true;
}

Two defeasible rules then read it. AbsenceFires concludes absence_consequence(s) for a session on file with not asserted_blocking(s); BlockedSilence concludes the negation when a blocking fact is asserted. An explicit presence beats the conclusion drawn from absence:

Arxo Law
priority PresenceOverAbsence {
prefer BlockedSilence over AbsenceFires;
reason explicit_exception;
}

Outside the domain of the closure, silence stays silence: the negative literal is not satisfied and AbsenceFires does not fire. The Drools comparison treats this difference as a contract class between the two systems, not as a defect of either.

Salience, agenda focus and activation groups decide which activation fires first, and an activation group lets only one of its rules fire. Arxo computes neither order nor exclusivity of firing: when two rules apply, both conclusions are in the answer. If one conclusion must prevail over another, that is written as a priority with a reason. In the experiment, firing order is compared only between Drools revisions, and the Arxo side is compared on the set of conclusions and the final facts.

  • Gain: answers that do not depend on history. The same facts give the same answer, whatever sequence of inserts and retracts led to them, and the answer carries its own proof.
  • Gain: declared precedence. Where Drools uses salience to order firings, a conflict between conclusions in Arxo is settled by a named priority or stays visible.
  • Give up: the living session. Long-lived stateful sessions, incremental re-evaluation over large working memories, truth maintenance with justification counting and event-stream processing with temporal operators and windows stay on the Drools side.
  • Give up: firing order as a result. If your process depends on which rule fires first, that logic has no Arxo form.

Documentation for Arxo. Writings — blog.arxo.io.

Anonymous visit counts on stats.arxo.io, no cookies.