Tools: the target linter
Library · Source module
Tools: the target linter
Canonical certification enforces a fixed symbolic program, realized access models, total execution, format typing, and full resource accounting in the core. This linter provides additional heuristic statement guidance for raw conditional proof consumers.
This is heuristic guidance for conditional judgments, not a certification boundary. Canonical Runs and Program.Certifies are recognized but reported as unsupported by these conditional heuristics, never marked as passing them.
A conditional headline contains ConditionalRuns, ConditionalRunsW, ConditionalRunsL, ConditionalRunsLaw, Impl.Satisfies or Routine.Meets (the judgment of a routine, which is total). For each conditional occurrence the linter checks:
* (a) uniformity. The program (the tree of ConditionalRuns …, the implementation of Impl.Satisfies, or the routine of Routine.Meets), with the tables of Stmt.link set apart, mentions no variable of the statement other than universally quantified sizes (ℕ), rational constants (ℚ), types and instances; and reaches no noncomputable definition (a function of the sizes that no machine computes). * (b) universality. The interpretation is a variable of the statement (or Interp.link of one, or a registered model primitive, ops_register_model), not existentially quantified, not fixed by an equation, and constrained by at least one hypothesis (its contracts). * (c) joint witness. The contract set of the statement is the set of NLAlib predicates of its hypotheses on the interpretation, closed under the parameters they share (the machine, the decoding, the law of the tape, …). Some witness theorem covers all of it at once. A witness is a theorem named exists_… (or registered by ops_register_witness). Its conclusion starts with one or more existential quantifiers, then states the NLAlib predicates together. The check uses predicate heads, including parent structures and field predicates. It matches declarations, not proof or axiom provenance. Core certification and the independent safety/axiom audit provide those guarantees. It does not compare arguments or verify parameter ranges, so distinct interpretations in the leading quantifiers can still satisfy the head check independently. * (d) closed-form counts. The counts and the workspace of the statement reach no Count.push, stmtCost, stmtPeak, staticCost, staticPeak, Count.upper or Profile.cost. * (e) liberal headlines. A liberal statement (ConditionalRunsL, Impl.Satisfies … .liberal) has a companion success statement (ConditionalRuns, ConditionalRunsW, ConditionalRunsLaw, or a total Impl.Satisfies) about the same program. The companion is in the same module or named <name>_success. Its conclusion must establish the success judgment, either directly or in a conjunction. Programs are compared syntactically up to renaming of parameters, including the arguments of linked tables. The companion's program and interpretation must be independent of existential choices. * (f) ξ only in tables. The algorithm's tree (the program with its tables set apart) reaches no ξ-taking primitive (ops_register_xi, or a constructor named …Xi). An Impl.Satisfies or a Routine.Meets about an implementation or a routine that a table or profile uses is exempt.
Commands: #ops_lint c₁ c₂ … (an error per conditional violation, information for a pass or explicit UNSUPPORTED schema diagnostic) and #ops_lint_scan (all headlines of the modules NLAlib.Ops.* other than the core files, the program logic NLAlib.Ops.Logic.* (generic rules, not headlines) and the tools; one line per theorem; an information).
Main results
#ops_lint and #ops_lint_scan provide conditional statement guidance and explicit schema diagnostics.
Declarations
- NLAlib.Ops.Tools.Lint.Ctx
- NLAlib.Ops.Tools.Lint.Head
- NLAlib.Ops.Tools.Lint.Occ
- NLAlib.Ops.Tools.Lint.allowedInProg
- NLAlib.Ops.Tools.Lint.argByName
- NLAlib.Ops.Tools.Lint.contractSet
- NLAlib.Ops.Tools.Lint.countForbidden
- NLAlib.Ops.Tools.Lint.dataType
- NLAlib.Ops.Tools.Lint.elabOpsLint
- NLAlib.Ops.Tools.Lint.elabOpsLintScan
- NLAlib.Ops.Tools.Lint.fieldHeads
- NLAlib.Ops.Tools.Lint.findOccs
- NLAlib.Ops.Tools.Lint.headOf
- NLAlib.Ops.Tools.Lint.heads
- NLAlib.Ops.Tools.Lint.inLib
- NLAlib.Ops.Tools.Lint.interpIssue
- NLAlib.Ops.Tools.Lint.isTableLike
- NLAlib.Ops.Tools.Lint.lintDecl
- NLAlib.Ops.Tools.Lint.lintOcc
- NLAlib.Ops.Tools.Lint.mkCtx
- NLAlib.Ops.Tools.Lint.modConsts
- NLAlib.Ops.Tools.Lint.modOf
- NLAlib.Ops.Tools.Lint.opsLint
- NLAlib.Ops.Tools.Lint.opsLintScan
- NLAlib.Ops.Tools.Lint.peelLink
- NLAlib.Ops.Tools.Lint.pinsInterp
- NLAlib.Ops.Tools.Lint.progKey
- NLAlib.Ops.Tools.Lint.proofStatement
- NLAlib.Ops.Tools.Lint.reach
- NLAlib.Ops.Tools.Lint.scanTargets
- NLAlib.Ops.Tools.Lint.schemaIssue
- NLAlib.Ops.Tools.Lint.successKeys
- NLAlib.Ops.Tools.Lint.successKeysOf
- NLAlib.Ops.Tools.Lint.tableImpls
- NLAlib.Ops.Tools.Lint.witnessHeads
- NLAlib.Ops.Tools.Lint.witnessHeads.collect
- NLAlib.Ops.Tools.Lint.witnessHeads.conjuncts
- NLAlib.Ops.Tools.Lint.witnesses
- NLAlib.Ops.Tools.Lint.xiPrims