
Lifts x86-64 binary loops into closed-form SMT constraints via strided interval analysis, enabling O(1) symbolic execution and crackme key recovery.
High-Performance Algebraic Loop Lifting & Exact Rational Recurrence Engine for Python and C
Traditional compilers, runtimes, and JIT engines (such as GCC, Clang, PyPy, or Numba) treat loops as repetitive control-flow sequences, executing instructions step-by-step:
$$ \text{Runtime Cost} = \mathcal{O}(N) $$
When $N = 10^6$ or $10^9$, sequential execution incurs billions of CPU cycles. Strilight fundamentally re-engineers loop execution through Symbolic Algebraic Lifting:
$$ \vec{\mathbf{X}}(N) = \mathbf{A}^N \cdot \vec{\mathbf{X}}0 + \sum{k=0}^{N-1} \mathbf{A}^{N-1-k} \vec{\mathbf{B}} $$
Strilight does not pretend to introduce esoteric magic; it is fundamentally a developer quality-of-life tool.
In physical modeling, scientific computing, and numerical simulation, engineers frequently face a frustrating dilemma:
Strilight resolves this dilemma. You write the physical or mathematical concept in whatever straightforward, natural syntax you prefer. Strilight inspects your loop structure, derives the exact closed-form recurrence formulas, and accelerates execution behind the scenes—preserving complete readability and simplicity in your codebase.
Floating-point arithmetic introduces cumulative truncation errors ($1/3 \times 3 \approx 0.9999999999999999$). Strilight performs affine induction and stride analysis over the field of rational numbers $\mathbb{Q}$:
Fraction representations in Python, guaranteeing 100% bit-exact mathematical parity.Variables that mutually depend on each other (e.g., physical simulations where position depends on velocity and velocity depends on acceleration) are automatically extracted into a Variable Coupling Matrix ($\mathbf{A}$). Strilight performs binary exponentiation on $\mathbf{A}$, executing millions of iterations in under 2 nanoseconds.
@accelerate Decorator (How It Works)Decorating any standard Python function with @accelerate executes an automated pipeline at function definition time (zero per-call runtime analysis overhead):
for loop constructs, and extracts induction variables.Fraction, math) without polluting module namespaces._loop_summary and _invariant_contract to the compiled function object, enabling downstream compilers and verification tools to inspect the underlying transition matrix $\mathbf{A}$.from strilight import accelerate
@accelerate
def compute_simulation(steps: int) -> int:
acc = 0
for i in range(steps):
acc += (i * 3) + 7
return acc
# Executes in O(1) time (~0.001 ms even if steps = 100,000,000)
result = compute_simulation(100_000_000)
#pragma strilight)Unlike Python's dynamic reflection, C code transformations in Strilight strictly follow an explicit Developer-Contract Model via OpenMP-style pragma directives. The engine never mutates C source code implicitly; transformations occur solely when directed by explicit developer contract clauses (contract, target, include, model):
#pragma strilight accelerate: Explicitly authorizes Strilight to lift the annotated C for loop into an equivalent closed-form mathematical expression.#pragma strilight fuse: Explicit developer directive instructing Strilight to fuse designated adjacent loops sharing identical iteration domains into a unified $\mathcal{O}(\log N)$ binary matrix recurrence kernel.// Example of contract-guided multi-loop fusion via developer directive
int simulate_motion(int n) {
int pos = 0, vel = 10;
#pragma strilight fuse
for (int i = 0; i < n; i++) {
pos += vel;
}
for (int i = 0; i < n; i++) {
vel += 2;
}
return pos;
}
CrossFileResolver)Numerical simulations frequently define parameters in separate header files or configuration modules. Strilight's CrossFileResolver:
#include / #define directives.SOLAR_MASS = 4 * PI * PI) across files via AST evaluation without executing arbitrary runtime code or using unsafe eval.table[i % P]) into precomputed prefix-sum closed formulas in $\mathcal{O}(1)$.memset calls or vector slice assignments (arr[:N] = ...).