Releases: asama7706r-ui/strilight
Releases · asama7706r-ui/strilight
Release list
v0.2.0
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[0.2.0] - 2026-09-05
Added
1. Exact Rational Arithmetic over $\mathbb{Q}$ (strilight.engine.vsa.models)
- Implemented exact fractional arithmetic within
AffineExprusing Python'sfractions.Fraction, ensuring complete precision preservation without floating-point rounding drift. - Added
AffineExpr.__truediv__andAffineExpr.__rsub__supporting closed operations over the rational field$\mathbb{Q}$ . - Upgraded matrix exponentiation code generators in both C and Python backends:
- In C code generation (
CodeGenerator.to_c_statements): dynamically switches matrix type definitions and accumulators from integer (uint32_t) to double-precision (double) when non-integer coefficients or fractional strides are present. - In Python code generation (
CodeGenerator.to_python_statements): emitsFraction(n, d)terms and preserves rational values without forced modular reductions.
- In C code generation (
- Introduced the Globals Injection pattern in
SourceLifter: automatically binds required runtime dependencies (Fraction,math) into the compiled callable's global namespace, eliminating inline import overhead.
2. Multi-Language Frontend & Automated Source Lifting (strilight.frontend)
- Modularized the frontend into an extensible adapter architecture with
BaseLanguageLifter:-
Python Subsystem (
strilight.frontend.python): Pure AST-based analyzer for Pythonforloops, range expressions, and multi-variable recurrence induction. -
C Subsystem (
strilight.frontend.c):pycparser-based analyzer supporting Cforloops, struct member dereferences (body->pos.x), and sequential affine assignments.
-
Python Subsystem (
- Implemented the
@acceleratefunction decorator for Python: performs AST inspection at definition time, extracts loop structures, synthesizes equivalent$O(1)$ or$O(\log N)$ recurrence closed forms, and replaces loop bodies in-place. - Implemented
#pragma strilight accelerateand#pragma strilight fusedirectives in C:- Detects adjacent loops sharing identical iteration domains and fuses them into a single unified recurrence kernel.
- Implemented array slice mutation lifting: classifies constant fills (
arr[:N] = c), linear progressions, and accumulative modifications, generating optimized native slice assignments ormemsetcalls. - Added
CrossFileResolver(strilight.frontend.resolver): statically traces cross-module imports and extracts numerical constants across project boundaries without dynamic evaluation. - Added
CentralForceOrbitMatcher(strilight.frontend.orbit_matcher): provides automated detection and analytical carrier fitting for central force and orbital mechanics patterns.
3. Algebraic State Tensor Capsules & Dimensional Reduction (strilight.engine.vsa.models)
- Implemented
CompositeTensorDescriptor: decouples abstract vector state spaces from underlying memory representation. - Implemented algebraic interface condensation via Schur reduction: projects high-dimensional state dynamics onto boundary interface variables, enabling exact
$O(1)$ state reconstruction via back-substitution. - Implemented
VariableCouplingMatrix.decompose_block_diagonal: uses graph component analysis to partition large coupled multi-variable recurrence systems into independent sub-matrices.
4. Spatiotemporal 2D Coordinate & Analytical Perturbation Models
- Implemented
SpatiotemporalCoordinate: models two-dimensional execution coordinates$\langle k, \xi \rangle$ (iteration index, intra-iteration offset) with lexicographical ordering. - Implemented
SpatiotemporalTickModel: provides unified timing models resolving read-after-write dependencies across loop iterations. - Implemented
OrbitPerturbationSystem: decomposes complex trajectories into analytical carriers and discrete perturbation models with turn counters ($K_{\text{flip}}$ ) and secular drift formulation.
Changed
-
Architectural Modularity:
- Structured the pure mathematical engine (
strilight.engine) and language frontends (strilight.frontend) for seamless zero-dependency source lifting. - Ensured complete standalone execution with zero mandatory external compilation or emulation dependencies.
- Structured the pure mathematical engine (
-
Mathematical Core Generalization:
- Designed language-agnostic recurrence models:
VariableLoopExprandVariableCouplingMatrix. - Unified
LoopSummary.var_exprsas the centralized store for symbolic induction expressions.
- Designed language-agnostic recurrence models:
-
Abstract Domains Modernization (
strilight.engine.domains):- Consolidated
Interval,StridedInterval, andDisjointIntervalSetunder a unified domains package. - Enforced zero-stride (
$\sigma = 0$ ) handling for singleton intervals to preserve pointer alignment in abstract address arithmetic.
- Consolidated
-
Packaging and Distribution:
- Updated build specifications to focus on the core algebraic engine and frontend acceleration API.
- Modernized package metadata, project description, and dependencies in
pyproject.tomlandsetup.py.
Fixed
- Fixed symbolic loop evaluation in
models.py: ensuredLoopSummary.iterationsdefaults toNoneinstead of0, preventing unintended zero-iteration identity reductions. - Fixed numeric truncation in
lifter.py: resolved an issue where floating-point strides and constants were cast to integers (int(0.5) == 0); they are now preserved as exactFractioninstances. - Fixed code generation for mixed-type matrices: prevented C compilers from truncating rational multipliers by generating appropriate floating-point type definitions (
double). - Fixed runtime execution in synthesized functions: eliminated potential
NameErrorexceptions by injecting module references into execution globals before compiling.
Performance & Verification
-
Recurrence Matrix Acceleration: Accelerated
$10^6$ -iteration multi-variable linear recurrences from$O(N)$ to$O(\log N)$ , achieving bit-exact numerical parity verified across GCC-O2/-O3and CPython runtimes. -
Cyclic Array Lookup Summation: Evaluated
$10^6$ -iteration cyclic array summation loops via@accelerate, replacing step-by-step iterations with$O(1)$ closed forms. - Test Coverage: 252 unit and integration tests passing across engine models, abstract domains, code generation, and multi-language frontend lifters.