Published November 11, 2025
| Version v0.2.1
Software
Open
pollywog
Authors/Creators
Description
Added
- Decompilation Module (
pollywog/decomp.py) - Convert .lfcalc files back to Python codedecompile()- Read .lfcalc file and generate Python codedecompile_to_string()- Convert CalcSet to Python code string- Phase 1: Direct conversion (exact structure recreation)
- Phase 2: Pattern detection (automatic helper recognition)
- Pattern Detection (
pollywog/patterns.py) - Smart recognition of common calculation patterns- WeightedAverage pattern detection
- Sum pattern detection
- Product pattern detection
- Average pattern detection
- Confidence scoring (>90% threshold)
- Graceful fallback to direct code
- Jupyter Magic Command -
%pw.loadfor interactive .lfcalc loading- Behaves like built-in
%loadcommand - First run: decompiles and replaces cell content
- Second run: executes loaded Python code
- Integrated with pattern detection
- Behaves like built-in
- Examples and documentation for decompilation workflows
examples/decompile_example.py- Comprehensive usage examplesexamples/pw_load_magic_demo.ipynb- Jupyter magic demonstration
Changed
- Decompilation now automatically detects and uses helper functions (WeightedAverage, Sum, Product, Average)
- Generated Python code imports helpers when patterns are detected
- Enhanced CLAUDE.md with decompilation architecture details
Testing
- Added 28 new tests (21 pattern detection + 7 integration tests)
- All 146 tests passing
- Roundtrip validation: .lfcalc → Python → exec → CalcSet → .lfcalc
Notes
Files
endarthur/pollywog-v0.2.1.zip
Files
(177.8 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:218eaf00e6b1663a1c9478b43669cc94
|
177.8 kB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/endarthur/pollywog/tree/v0.2.1 (URL)
Software
- Repository URL
- https://github.com/endarthur/pollywog