Evaluating a list of copied-substring matching jobs on the word RAM
ProvedBackreferenceMatching.SubstringIndex.ContextQueries.Native.run_plan_nativeregular-expressionsstring-algorithmsword-ram
Suppose the regular-expression jobs are stored consecutively in a word-RAM array and the text indices have been built. One fixed command reads the list and returns one precisely when at least one job accepts the text. Each job can use the short-text procedure or the indexed procedure, according to the mode selected for the whole list. The running time is the sum of the job costs plus a constant amount of work per job; the hypotheses state the memory and word bounds needed by those procedures.
Preamble
import Definitions.Def_BackreferenceMatching_RegularCopyJobs open BackreferenceMatching BackreferenceMatching.ArrayRAM BackreferenceMatching.SubstringIndex.RadixMachine BackreferenceMatching.SubstringIndex.ContextQueries.Native BackreferenceMatching.Automata BackreferenceMatching.Automata.MatrixRAM BackreferenceMatching.Repetition BackreferenceMatching.Repetition.IndexRAM Lax808846Proofs.Imp Lax808846Proofs.Reasoning
Formal statement
theorem BackreferenceMatching.SubstringIndex.ContextQueries.Native.run_plan_native {q B cap : ℕ} (short : Bool) (w : Word q) (js : List (BranchJob q)) (s : Env)
(ctx : JobWorkspace s short cap w (js.flatMap BranchJob.words)) (one : 1 < B)
(fit : (js.flatMap BranchJob.words).length < B)
(bounds : ∀ j∈js,∀ base,nextOffset base j ≤ (js.flatMap BranchJob.words).length → Feasible B cap base short j w) :
∃ t,Lax808846Proofs.Reasoning.Run B (runPlan q short) s t (4+packetLoopCost (fun j => kernelTime short j w.length) js) ∧
t.vars "allHits"=(js.any (fun j => plannedBit short j w)).toNat := by
sorrySource
S. Kumabe and Y. Uezato, On the Complexity of the Matching Problem of Regular Expressions with Backreferences, arXiv:2605.07289. https://arxiv.org/abs/2605.07289