[0.3.2] - 2026-06-09
Added
- SMT-verified function extraction (new
smtfeature, off by default;src/extraction/module):extraction::extract_pure_blocks()— extracts pure fixed-width-integer sub-blocks from over-budget free functions, committing the extraction only when the OxiZ SMT solver proves semantic equivalence is preservedExtractionOutcomeenum:Committed,SkippedRefuted(safety net — rewriter bug caught via counterexample),SkippedUnsupported- Internal pipeline:
detector::find_candidate(live-variable analysis) →rewriter::rewrite(helper synthesis) →gate::verify_and_decide(QF_BV proof with whole-function inline-back and componentwise fallback) dataflow.rs— live-variable dataflow analysis driving the extraction detector
- SMT equivalence oracle (
src/smt/module, feature-gatedsmt):EquivBuilder— proves two pure fixed-width-integer Rust functions equivalent for all inputs using QF_BV theory via the OxiZ solver; returnsVerified,Refuted(Counterexample), orUnsupportedis_pure_supported_expr()/is_pure_supported_block()— non-mutating purity probes with no SMT overheadIntTypeandint_type_of()— integer-type inference for SMT encoding
splitrs smt-verify-equivCLI subcommand (src/smt_cli.rs) — standalone equivalence checker between two Rust function sources- Array-splitting mode (
src/array_splitter.rs):- Splits oversized
static/constarray literals (data tables) across multiple chunk files using element-level partitioning - Reconstructs the original
pub static NAME: &[T]inmod.rsvia aconst fncompile-time concatenation (T: Copy; type-agnostic, no synthetic default required) analyse_arrays(),ArrayItem,ArrayAnalysispublic API
- Splits oversized
- Test-module splitter (
src/test_module_splitter.rs):- Splits multiple
#[cfg(test)]/#[cfg(all(test, ...))]top-level mod blocks into per-moduletests_NAME.rsfiles - Falls back to classic single
tests.rsextraction when only one test module is present
- Splits multiple
- Editor integrations (
editors/):- Emacs:
splitrs.el— LSP client configuration with ERT test suite - IntelliJ: Kotlin plugin (
SplitrsLspServerDescriptor/SplitrsLspServerSupportProvider) with Gradle build - Neovim: Lua plugin (
lua/splitrs/init.lua) with nvim-lspconfig-style setup and Busted spec - VS Code: TypeScript extension (
src/extension.ts) withvscode-languageclientand test suite
- Emacs:
- Config module (
src/config.rs): structured.splitrs.tomlsupport withSplitRsConfig,NamingConfig,OutputConfig, and[[target_modules]]routing rules - Helper dependency tracker (
src/helper_dependency_tracker.rs) — tracks inter-helper dependencies for smarter module co-location - New integration test suites:
cross_module_visibility_tests,doc_comment_preservation_tests,extract_and_target_tests,extract_pure_cli_tests,extraction_e2e_tests,lsp_integration,semantic_naming_tests,smt_encoder_tests,smt_verify_equiv_cli_tests,standalone_extraction_tests,trait_impl_grouping_tests
Changed
FileAnalyzersubstantially extended with per-type trait-impl grouping and semantic module naming heuristicsmodule_generatorexpanded: per-type<type>_traits.rsmodules replace the legacy sharedtrait_impls.rs; semantic naming for constants/macros/type-alias buckets- CLI (
main.rs) extended with new subcommands,--smt-verify, array-split, and test-split flags examples/large_struct.rs: poisoned-mutexunwrap()replaced withunwrap_or_else(|e| e.into_inner())(no-unwrap policy)
Dependencies
- New optional (behind
smtfeature, off by default):oxiz = "0.2.3"(COOLJAPAN OxiZ SMT solver)num-bigint = "0.4"(fixed-width integer arithmetic for equivalence proofs)
Full Changelog: v0.3.1...v0.3.2