Skip to content
KitploitKITPLOIT
ИнструментыЭксплойтыБлог
Log in
Отправить
ИнструментыЭксплойтыБлог
Отправить

Инструменты для хакинга, пентеста и кибербезопасности — ваш арсенал защиты!

Kitploit — это каталог инструментов для хакинга, кибербезопасности и пентестинга. Находите последние обновления проектов для поиска уязвимостей, анализа систем, автоматизации тестирования и усиления вашей безопасности.

ЛентыКонтактыКонфиденциальность© 2026 Kitploit

Каталог инструментов

Категории

Все категории
Loading categories
strilight — Lifts x86-64 binary loops into closed-form SMT constraints via strided interval analysis, enabling O(1) symbolic execution and crackme key recovery. | Kitploit
Инструменты/GitHubGitHub/asama7706r-ui/strilight
Static AnalysisCode AnalysisReverse EngineeringBinary Analysis
GitHubasama7706r-ui/strilight

strilight

Lifts x86-64 binary loops into closed-form SMT constraints via strided interval analysis, enabling O(1) symbolic execution and crackme key recovery.

Репозиторий
2026 дней назадЕщё не проверено

Популярное

Смотреть все →

Откройте для себя самые используемые инструменты нашего сообщества.

Изучить все инструменты

Просмотрите нашу коллекцию инструментов

Смотреть все инструменты →
Сайт
Поделиться
Контент недоступен на запрошенном языке. Показываем английскую версию.

Strilight (v0.2.0)

High-Performance Algebraic Loop Lifting & Exact Rational Recurrence Engine for Python and C

Release Python Version Complexity Exact Arithmetic Tests License


Overview: Why Iterate When You Can Solve?

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:

  1. State Transition Formulation: It statically inspects the loop body and formulates its mathematical state transition matrix:

$$ \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}} $$

  1. Closed-Form Solution: It solves the recurrence system in closed form, reducing execution time from $\mathcal{O}(N)$ to $\mathcal{O}(1)$ (for scalar/periodic/telescoping series) or $\mathcal{O}(\log N)$ (via fast binary matrix exponentiation).

Design Philosophy: Developer Quality-of-Life First

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:

  • Readable Code: Natural, expressive equations that mirror textbook physics, but execute sluggishly when iterated millions of times.
  • Hand-Optimized Code: Convoluted, manually unrolled loops and obscure arithmetic shortcuts that run fast, but are brittle, difficult to debug, and obscure the underlying physics.

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.


Architectural Foundations

1. Exact Rational Arithmetic over $\mathbb{Q}$ (Zero Precision Loss)

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}$:

  • Multipliers and offsets are modeled as canonical fractions ($\frac{p}{q}$).
  • Emits double-precision kernels in C and exact Fraction representations in Python, guaranteeing 100% bit-exact mathematical parity.

2. Multi-Variable Coupled Recurrence Systems ($\mathcal{O}(\log N)$)

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.

3. Transparent @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):

  1. AST Extraction: Inspects the function AST, identifies for loop constructs, and extracts induction variables.
  2. Closed-Form Synthesis: Translates the loop into equivalent closed-form recurrence models or binary matrix exponentiation kernels.
  3. In-Place Splicing: Replaces the loop AST nodes in-place, compiles the callable into memory, and injects runtime globals (Fraction, math) without polluting module namespaces.
  4. Contract Reflection: Attaches _loop_summary and _invariant_contract to the compiled function object, enabling downstream compilers and verification tools to inspect the underlying transition matrix $\mathbf{A}$.
  5. Graceful Fallback: If non-linear indexing or unsupported dynamic calls are encountered, Strilight emits a diagnostic warning and cleanly falls back to native execution without crashing.
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)

4. Contract-Guided C Source Directives (#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;
}

5. Cross-File Symbol & Constant Resolution (CrossFileResolver)

Numerical simulations frequently define parameters in separate header files or configuration modules. Strilight's CrossFileResolver:

  • Statically traces local module imports and C #include / #define directives.
  • Evaluates literal constant expressions (e.g. SOLAR_MASS = 4 * PI * PI) across files via AST evaluation without executing arbitrary runtime code or using unsafe eval.

6. Array Slice Induction & Cyclic Table Lookups

  • Cyclic Array Lookup: Lifts cyclic table lookups (table[i % P]) into precomputed prefix-sum closed formulas in $\mathcal{O}(1)$.
  • In-Place Array Slice Mutation: Classifies constant fills and arithmetic progressions, synthesizing optimal hardware memset calls or vector slice assignments (arr[:N] = ...).
Скачать инструмент