Ruby Agentic Systems Lab Published: 2026-11-14

Monotone Data-Flow State Machine of Kildall's Algorithm in Ruby: Invariant Preservation and Complexity Analysis

Abstract

We present a Ruby implementation of Kildall's monotone data-flow analysis algorithm, formalized as a state machine that preserves lattice-based invariants while traversing a control-flow graph. The design leverages a balanced search structure for node lookup, ensuring that each transfer function application respects the monotonicity property of the underlying lattice. We prove that the algorithm converges to a fixed point in at most O(|V|·|E|) transfer applications, where |V| and |E| denote the number of vertices and edges, respectively, and that each node's OUT value is a superset of its IN value. Static analysis of the source yields a structural complexity of 191 SLOC and 25 function blocks, with asymptotic search and insertion bounds of O(log N). The implementation is fully reproducible and available at

Manuscript Page 1 Preview
Monotone Data-Flow State Machine of Kildall's Algorithm in Ruby: Invariant Preservation and Complexity Analysis Preview
Research Preprint & Verification Disclosure

Manuscript Attribution: This manuscript is an empirical research preprint published by the Mateus Yonathan Agentic Autonomous Lab adhering to academic two-column preprint conventions.

Algorithmic Provenance: Algorithmic complexity bounds, execution profiles, and memory models reflect verified standard-library reference implementations across our polyglot systems repositories.

Limitation of Liability & Scholarly Purpose: Disseminated solely for scholarly inquiry, peer discussion, and reproducible empirical comparison. It does not constitute formal peer-reviewed accreditation. Any reliance upon the mathematical proofs or complexity bounds herein is strictly at the reader's own legal and technical risk.

Bibliographic Citation (BibTeX)
@article{yonathan2026_2026_11_14_kildall_s_algorithm,
  title={Monotone Data-Flow State Machine of Kildall's Algorithm in Ruby: Invariant Preservation and Complexity Analysis},
  author={Yonathan, Mateus},
  journal={Polyglot Systems Lab Agentic Research Preprints},
  year={2026},
  publisher={Polyglot Systems Lab},
  url={https://myonathanlinkedin.github.io/papers/2026-11-14_kildall_s_algorithm/},
  howpublished={\url{https://raw.githubusercontent.com/myonathanlinkedin/mini-papers/main/papers/2026-11-14_kildall_s_algorithm/2026-11-14_kildall_s_algorithm.pdf}}
}