Rule-based reasoners and blackboard systems are programs in which many independent "if this pattern holds, do that" rules read and rewrite one shared memory. They are hard to parallelize safely. If two rules fire at once and one deletes a fact the other just relied on, the result can match no legal one-at-a-time order of the same rules. The standard fix is to lock the facts each rule reads. Rules that fire on the absence of a fact ("if no vehicle track exists here, create one") are the hard case, because nothing exists yet to lock. The best-measured locking scheme handles these with synthetic placeholder locks and runs its conflict checks inside a single serialized section. That cost halved its available speedup, and the serialized section becomes the ceiling as cores grow.
We propose to stop locking and to reuse a structure these systems already maintain. Production systems keep an incremental matcher, the Rete network: a dataflow graph that, after every change to memory, updates which rule instances are currently enabled. When a committed write deletes a fact a pending rule read, the matcher retracts that rule instance. It also retracts the instance when a write adds a fact that a pending rule required to be absent. That retraction is exactly the read–write conflict serializability must catch. Rules therefore fire optimistically against the current state. At commit time a rule succeeds only if the matcher has not retracted its instance, and the matcher's existing indexing decides which commits must be ordered against each other. This removes the pseudo-locks for absent facts and the global checking section. It leaves one new failure mode, wasted speculative work, so the second half of the proposal measures when that waste, rather than locks or memory bandwidth, drives concurrency saturation, meaning the point where adding cores stops helping or starts hurting.
Core Claim
The claim has two parts. First, in a parallel production or blackboard system, the incremental matcher's retraction events are a sound and precise conflict detector for serializable rule firing, including rules with negative conditions. Second, sequencing commits per matcher partition, rather than globally, moves the saturation point beyond where asynchronous locking saturates on negation-heavy workloads, with zero serializability violations. The second claim is falsifiable: either the scheme beats a faithful reimplementation of the strongest locking algorithm at that algorithm's best core count, or it does not.
Soundness is easy to argue under the usual production-system semantics. A firing reads its matched facts plus the absence of matches for its negated patterns, and it may only delete or modify facts it matched. Every write that would make the firing non-serializable therefore either deletes a read fact or creates a fact matching a negated pattern, and both cause the matcher to retract the instance. Consider the classic write-skew case, two "if no X, create X" firings: the first committer's insertion retracts the second's instance. The argument needs one assumption, and it is the real engineering risk. A commit's propagation through the matcher must finish before any commit that could be retracted by it validates. Our design enforces this with per-partition commit sequencing, where a partition is the set of matcher nodes a write can reach. Whether real rule sets partition well enough to avoid recreating a global bottleneck is an empirical question this project answers.
Relation to Prior Work
Four papers motivate the problem by measuring where parallel rule systems stall. Comparison of Three Algorithms for Ensuring Serializable Executions in Parallel Production Systems compares batch-synchronous, asynchronous-test and asynchronous-locking schemes. Its locking algorithm (A3) uses matcher-generated pseudo-tokens to lock absent facts and runs interference checks in a critical region. The authors name parallelizing that check as open work. We keep their matcher but use it to validate rather than to manufacture locks. Control Issues in Parallel Rule-Firing Production Systems shows that asynchronous "fire-when-ready" firing with per-fact locks costs about 1% overhead, but it cannot handle negative references without falling back to conservative synchronization. Our method targets exactly the case it excludes. Effects of Parallelism on Blackboard System Scheduling shows that dispatching tasks touching disjoint blackboard regions cuts lock waiting. It also argues that busy processors are not productive ones when they run tasks other workers will make obsolete. That "competition principle" is the waste our optimistic scheme risks, and we measure it directly. Transactional Blackboards brought database-style locking, commit protocols and deadlock resolution to blackboards, but reported no speedup curves. We supply the measurement it lacks and use optimistic validation instead of its pessimistic locks.
The concurrency-saturation literature constrains the design. Optimising Parallel ABox Reasoning of EL Ontologies and Towards a Concurrent Approximate Description Logic Reasoner remove locks entirely for monotonic reasoning, yet saturate at 4–6 and about 10 workers respectively. The first attributes its plateau to memory bandwidth. Lock removal alone therefore does not buy scaling, and our evaluation must separate memory-bound plateaus from coordination-bound ones. Seven Challenges in Parallel SAT Solving documents the "more is less" effect and calls for per-instance core allocation. This motivates our small admission-control component, which we keep only if it beats a tuned static worker count. ALAS: Transactional and Dynamic Multi-Agent LLM Planning motivates the long-action regime. It shows that localized transactional repair beats global replanning for language-model agents whose actions take seconds, a regime where holding locks for the duration of an action is costly. We do not run language-model agents. We emulate long actions by injecting delays into rule actions.
Research Program
We will build a parallel rule engine on a modern shared-memory multicore machine. Each worker repeatedly takes an enabled rule instance and executes its action against a private write buffer. Each instance carries an atomic validity flag that the matcher clears on retraction. To commit, a worker acquires the sequence point for each matcher partition its writes reach, checks the flag, publishes the writes, and propagates them through the matcher before releasing.
Partitions are computed offline from the compiled matcher. Two rules share a partition if a write by one can reach a node feeding the other, including through negated patterns. This parallels the dependency analysis in Implementation of Multiple Rule Firing Production Systems on Hypercube, but we use it to sequence commits rather than to skip conflict resolution.
To study saturation, we split each run's wall time into five parts: useful firing, aborted firing, commit-sequence waiting, match propagation, and memory stalls (from hardware counters). With $N$ workers, mean action time $\tau$ and abort fraction $a(N)$, useful throughput is roughly
$$X(N) \approx \frac{N}{\tau}\,\bigl(1 - a(N)\bigr) - C(N),$$
where $C(N)$ is lost throughput from commit waiting and memory stalls. Saturation occurs where the growth in $a(N)$ and $C(N)$ cancels the gain from extra workers. The admission controller caps in-flight speculative firings so that the measured retraction rate stays below a threshold. It is an ablatable add-on, not the core claim.
Baselines
The naive references are serial execution on our machine and unchecked parallel firing. For Toru-Waltz-N, Comparison of Three Algorithms reports a 12.79 s serial time and a 10.7x ceiling without serialization checks on its hardware. We rerun both on our machine and also count how often unchecked runs produce non-serializable final memories. This shows how much correctness costs and whether the workload actually produces conflicts.
The strongest existing method is A3 asynchronous locking with pseudo-tokens, which reached 5.70x (versus 4.64x for A2 and 2.80x for A1) on Toru-Waltz-N in that paper. Those numbers come from 1992 hardware, so we reimplement A3 inside our engine. It will share the same matcher, memory layout, worker pool and core counts. We will also give its lock table the same sharding effort we give our partitions, so it is not handicapped by an old global lock. Beating A3 means higher peak speedup, a later saturation point, or both, with zero violations, on workloads containing negative conditions.
We also run Neiman's fire-when-ready per-fact locking, reported at 8–10x on 16 processors in Control Issues. It runs only on negation-free variants, where it is correct, and our method must at least match it there. On DVMT we add Decker's access-collision scheduling, reported at 4.1x on 5 processors versus 3.8x without it in Effects of Parallelism. It also serves as a dispatch policy we can layer onto our engine.
Three ablations isolate the key ingredient. The first replaces per-partition sequencing with one global commit lock, showing whether partitioning matters. The second replaces matcher retraction with plain read-set validation, in which a negated pattern is treated as reading its whole fact class; this tests whether the matcher's precision matters. The third replaces the admission controller with the best static worker count found by an exhaustive offline sweep. Every configuration gets the same sweep over core counts and the same number of repeated runs.
Why not just…?
Why not just keep A3 and shard its lock table? This is the most serious competitor, and it is a baseline for that reason. Sharding helps lock acquisition, but pseudo-tokens still have to be created and checked for every negated pattern. Comparison of Three Algorithms places that work inside the checking critical region. If sharded A3 matches us across core counts and action durations, the honest conclusion is that the critical region, not the locking style, was the problem, and our contribution shrinks to an analysis result.
Why not just use database optimistic concurrency or snapshot isolation? Snapshot isolation allows write skew, which is precisely the "if no X, create X" pattern, so it is not serializable here. The unchecked-violation counts will show how often this happens on these workloads. Plain optimistic validation without predicate tracking has to treat a negated pattern as a read of a whole fact class, which should cause many false aborts. The read-set ablation measures exactly this. If its abort rate is close to ours, the matcher adds nothing and we will say so.
Why not just tune the worker count offline? For a fixed workload this may work as well as adaptive admission control, especially given the sharp saturation points in Seven Challenges and Optimising Parallel ABox Reasoning. We therefore compare against the oracle static count and drop the controller if it does not beat that count by a clear margin on workloads whose conflict rate changes across phases, such as DVMT's phases. The validation mechanism does not depend on this outcome.
Why not just go lock-free with partitioned contexts? Context partitioning gives no serializability for rules that delete facts or test absence, and the description-logic results show it still saturates at modest core counts on memory bandwidth. We include a monotonic ABox workload to check whether our engine hits the same wall. If it does, the scheme cannot help memory-bound reasoning, and we will report that limit plainly.
Proposed Experiments
The workloads are Toru-Waltz-N, the hypercube suite (Cafeteria, Hotel, Tournament, Toru-Waltz16) from Implementation of Multiple Rule Firing Production Systems on Hypercube, DVMT from Effects of Parallelism, and SyGENiA/Not-Galen ABoxes as a monotonic, memory-bound control. These classic programs may need reconstruction from their published descriptions. We will release our reconstructions and validate each against its serial output. For the ABox control, PEL's reported 16.2 s to 7.8 s on NGS-10 from 1 to 4 workers gives an external sanity check on scaling shape, though not on absolute time.
For every method and core count from 1 up to the machine maximum, we report speedup over serial on the same machine, the saturation point (the core count of peak speedup), the five-part time breakdown, abort and false-abort rates, and serializability. Serializability is checked by replaying the committed order serially and comparing final memories.
The first decisive check is the head-to-head against reimplemented A3 on Toru-Waltz-N and DVMT, which contain negative conditions. Our method must exceed A3's peak speedup or push its saturation point later, with zero violations. The second varies injected action delay from microseconds to seconds and locates the crossover where optimistic validation overtakes locking. We predict the crossover moves toward shorter actions as matcher partitions become finer. If no crossover exists, the long-action rationale borrowed from ALAS is wrong for this engine. The third check uses the time breakdown to say whether each method's plateau is caused by aborts, commit waiting, or memory stalls. That attribution is the saturation result the field currently lacks for transactional blackboards, whichever method wins.
References
- Comparison of Three Algorithms for Ensuring Serializable Executions in Parallel Production Systems
- Control Issues in Parallel Rule-Firing Production Systems
- Effects of Parallelism on Blackboard System Scheduling
- Transactional Blackboards
- Optimising Parallel ABox Reasoning of EL Ontologies
- Towards a Concurrent Approximate Description Logic Reasoner
- Seven Challenges in Parallel SAT Solving
- ALAS: Transactional and Dynamic Multi-Agent LLM Planning
- Implementation of Multiple Rule Firing Production Systems on Hypercube