Locy Errors and Limits¶
Common Error Classes¶
- Parse errors: invalid Locy syntax.
- Compile errors: invalid dependencies, type/schema mismatches, stratification violations.
- Runtime errors: timeout, iteration limit, memory constraints, mutation constraints.
Operational Limits (via LocyConfig)¶
max_iterations: recursion cap per recursive stratum.timeout: overall evaluation budget.max_derived_bytes: derived fact memory bound.max_explain_depth: derivation tree depth bound.max_slg_depth: goal-directed recursion bound.max_abduce_candidates/max_abduce_results: abduction search bounds.deterministic_best_by: enforce deterministic tie-breaking inBEST BYclauses.strict_probability_domain: reject probability inputs outside[0, 1]instead of clamping.probability_epsilon: MPROD threshold for switching to log-space accumulation.exact_probability: enable BDD-based exact evaluation for shared-proof aggregate groups.max_bdd_variables: cap per-group BDD complexity before fallback.top_k_proofs: limit proof enumeration per aggregate group (controls memory/CPU for large proof spaces).
Warning Codes¶
Locy has two warning channels. Runtime warnings (RuntimeWarningCode) surface in result.warnings at evaluation time. Compile-time warnings (WarningCode) surface in compile_warnings when the program is compiled. Both are informational; the program still runs.
Runtime warnings (result.warnings)¶
SharedProbabilisticDependency: multiple proof paths inside one MNOR/MPROD group reuse shared evidence.BddLimitExceeded: exact mode was enabled, but the group exceededmax_bdd_variablesand fell back to independence mode.CrossGroupCorrelationNotExact: shared evidence spans multiple aggregate groups; each group is exact internally, but correlation across groups is still approximate.FuzzyNotProbabilistic:LocyConfig.semiring = MaxMinProbis active and a rule emitsPROB. Fuzzy-truth math is being applied to a column declared as a probability; either pick the right semiring or drop thePROBannotation.TopKPruningCrossedDependency: underTopKProofs(k), pruning dropped a proof that shared a base fact with a kept proof. The kept set is an approximation; increasekfor exactness.
Compile-time warnings (compile_warnings)¶
SharedNeuralInputArgument: two or more model invocations in the same rule receive the same INPUT variable argument, so their outputs are correlated. DownstreamMNORunder-estimates joint risk. Mark the models@independentto suppress.SharedNeuralFeatureValue: two or more model invocations in the same rule share an equivalent feature value expression — the same correlation concern even when binding variables differ.@independentsuppresses.SharedRetrievalContext: multiplesimilar_to/semantic_matchfeatures in the same rule share the same query embedding. The features are not independent of each other; the rule's joint composition may be biased.UncalibratedNeuralPredicate: a rule invokes a PROB model declaring noCALIBRATION(orCALIBRATION none); the uncalibrated probability compounds miscalibration downstream.UncalibratedLLMLogprobs: an uncalibratedCREATE MODELwhosexervo_aliaslooks like an LLM provider — raw logprobs are not calibrated probabilities.ProbabilityDomainViolation: a probability input fell outside[0, 1](clamped, or rejected understrict_probability_domain).FoldInRecursivePath: a clause has a recursive IS-ref and a FOLD aggregate but no ALONG — almost always a semantic mistake.EceBinningBias:VALIDATE METRICS ecewas requested; equal-width-binned ECE is biased in the small-sample regime. Preferdebiased_ece.
Recommended Profiles¶
Development¶
- Lower iteration and timeout values.
- Keep deterministic tie-break enabled.
Production¶
- Set explicit timeout and memory budgets.
- Monitor command result sizes.
- Restrict unconstrained
QUERYandABDUCEpatterns.
Escalation Playbook¶
- Reduce goal scope.
- Add stronger filters.
- Split large programs by module.
- Profile expensive rule strata.