POCR Migration Matrix
The POCR implementation is represented in Lotus without an SVF dependency. This page records every algorithm-bearing POCR source group and whether Lotus ports it directly or merges it into an equivalent existing component.
General solvers
StdCFLSolverBackend::SparseSetandSparseBitVectorimplement the indexed classical worklist algorithm.PocrCFLSolverBackend::Pocruses paired predecessor and successor reachability trees. Primary transitive arcs are registered before tree traversal; closure pairs are then queued as secondary facts. TheX -> X AandX -> A Xcases traverse the appropriate tree and prune a subtree when its summary edge already exists, as incheckStree/checkPtree. Structural identity is kept separate from semantic epsilon, so non-nullable cycles correctly derive reflexive pairs.HPocrCFLSolverBackend::HierarchicalPocradds POCR’s separate FIFO primary list, drains it before the ordinary FIFO worklist, and repeats when ordinary processing produces new primary facts.FocrCFLandTRFocrCFLMerged as
SolverBackend::FullyOrdered. Its edge-critical graph is the reduced storage, while its public relation exposes the exact closure. The TR variant’s separate secondary container is subsumed by this relation abstraction rather than exposed as a second selector; ECG insertion, redundant-critical-edge removal, and primary/secondary scheduling remain.TRCFLMerged into
SolverBackend::TransitiveClosure. Lotus’s per-symbol incremental closure already separates transitive pairs from the ordinary relation and omits the literalX -> X Xworklist join. POCR’s version has unresolved secondary-edge TODOs, so it is not retained as a duplicate mode.GspanAAandGspanVFAGeneralized as
SolverBackend::Graspanwhile retaining POCR’s two relations and source-ordered epoch update. For every source it evaluatesold + new, unarynew,new + old, andnew + new, then moves that source’s delta intooldand installs its next delta. Sources with no local delta are still revisited forold + newjoins through a middle node, matching the artifact implementation.GRAA,GRVFA,GRGspanAA, andGRGspanVFAThese classes differ only by hard-coded production tables.
buildPocrClientGrammarowns exact standard and rewritten alias/value-flow tables;gr-aa/gr-vfapair them with the worklist andgrgspan-aa/grgspan-vfapair them with Graspan. The larger artifactaanew.cfg/vfnew.cfggrammars also load through the canonicalGrammarfrontend. Both forms have regression coverage. No duplicate solver class is needed.
Clients and preprocessing
StdAA/PocrAA/FocrAAStdAAremains the grammar-driven path.PocrAAandFocrAAare nativePocrAliasEngineandFocrAliasEngineimplementations underSolvers/Engines/POCR. They preserve POCR’s horizontal propagation, symmetricV/Mfacts, dereference matching, attributed field matching, and one-sided hybrid-tree or ECG traversal.AliasClientis the sole alias client and selects these engines throughsolveSpecialized. Optional ECG cycle simplification is available forFocrAliasEngine.StdVFA/PocrVFA/FocrVFAStdVFAremains the grammar-driven path.PocrVFAandFocrVFAare nativePocrValueFlowEngineandFocrValueFlowEngineimplementations underSolvers/Engines/POCR. They preserve online reachability insertion and verticalcall_i A ret_imatching.ValueFlowClientis the sole value-flow client and selects these engines throughsolveSpecialized. Optional ECG cycle simplification is available forFocrValueFlowEngine.SCCElimination,PEGFold, andIVFGFoldPorted by
GraphSimplificationusing Lotus’s non-recursive Tarjan utility, representative maps, source-node preservation, and client-specific folding. Foldable direct pairs are detected once on the post-SCC graph and merged before the separate dynamic common-dereference phase, matching POCR’s phase order rather than repeatedly redetecting direct pairs. POCRdis mapped to the physical Lotus PEGaddrbarorientation;vgepand Lotus indirect/thread flow edges participate in their corresponding direct-edge reductions.PEGInterDyckandIVFGInterDyckPorted as the
prune_interdyckgraph-simplification phase. Lotus’s separateInterleavedDyckGraphReductionremains the single implementation of the stronger PLDI’20 reduction pipeline; it is not copied intoClassical.RSMandGFPatternPorted as
RecursiveStateMachine,NodePairPattern, andFoldabilityChecker, with thelotus-cfl-foldabilitydriver. The port implements the intended false-state and two-box enumeration guards instead of preserving the inverted/accumulating conditions in the artifact source.
Formats, relations, and controls
CFGandCFLGraph/PEG/IVFGMerged into
GrammarandLabeledGraph. Both modern Lotus formats and POCR’s tabular attributed formats are accepted directly. Standard and rewritten alias engines completeabar/dbar/fbar_iexactly as POCR’s PEG initializer does, so physical-only and already-bidirectional PEG files have the same result. Legacy attributed productions retain POCR’s runtime rule that an indexed head gets index zero when neither RHS symbol is indexed; omitted graph-edge indices also default to zero.CFLDataandHybridDataReplaced by Lotus
Relationbackends andPocrTransitiveClosure.ECGandBSECGMerged into
FullyOrderedTransitiveClosure. The pointer and bitset ECG variants do not warrant separate public algorithms. POCR’s optionalecgsccpath is controlled bySolverOptions::simplify_focr_cyclesor--focr-sccand is off by default, matching POCR. The same option applies to both specialized FOCR engines.CFLOpt::ucflPorted through
SolverOptions::unidirectionaland the grammar’sInsert/Follow/Countmetadata.CFLStat,AAStat,VFAStat, and output optionsMerged into
ReachabilityStatsand the existing structured command-line reporting.--relation-output,--graph-output,--start-only, and--json-statscover relation pairs, normalized/preprocessed graphs, count symbols, and reproducible algorithm counters without process-global SVF options.
Statistics and graph/relation output use Lotus’s existing structured CLI reporting. Tests compare all exact solver relations with an independent cubic recognizer over 1,000 generated problems, cover incremental updates, ECG cycle simplification, primary/secondary scheduling, and tree-join execution, and run POCR-format and rewritten client grammars through their applicable backends.