This release completes the WAT/WASM backend with full support for all major Python-like language constructs, OOP patterns, and compatibility fixes across the code generator.
- Stateful classes use a linear-memory bump allocator in generated WAT; each
self.attrfield is stored asf64at a compile-time byte offset. (global $__heap_ptr (mut i32) …)is emitted only when stateful classes are present.self.attrwrites lower tof64.store; reads lower tof64.load; compound assignments (self.x += delta) use a temporary local to avoid address recomputation.- External
obj.attrreads lower tof64.loadwhen the variable's class is statically known. - Instance method calls pass the actual heap address as
selffor stateful classes.
- Subclass hierarchies are resolved at WAT-emit time; inherited methods dispatch to the correct parent-class WAT export.
withstatement: context-manager blocks lower to WAT enter/exit call sequences.try/except: structured exception-handling blocks compile to WATif/elsecontrol flow.lambda: anonymous functions lower to WAT functions with explicit argument forwarding.match/case: structural pattern matching lowers to WATif/elsechains.async/await: async functions andawaitlower to synchronous WAT equivalents.
@propertysetter/getter descriptors lower to distinct WAT getter/setter exports.b"..."bytes literals stored in the WAT data section; referenced by pointer/length pairs.TupleLiteralcode generation now correctly wraps elements in parentheses.
- WAT backend source reorganized into themed sub-modules (control flow, OOP, literals, builtins).
- Updated builtin aliases for expanded localized coverage.
docs/wat_oop_model.md: reference document for the WAT OOP object model design.AGENTS.md: agent guidance for AI-assisted development workflows.
- All WAT backend correctness fixes from gap-filling and test stabilization applied.
- Update documentation
- Extended
WATCodeGeneratorto lower class methods to standalone WAT functions. - Added lowering for constructor-style calls (
ClassName(...)) to class__init__with implicitself. - Added lowering for class attribute calls (
Class.method(...)) and simple instance method calls (obj.method(...)) when object type can be inferred from local assignments. - Added targeted regressions for class lowering and call lowering in
tests/wat_generator_test.py.
- Added
tests/complete_features_wasm_execution_test.pyto validate allexamples/complete_features_*.mlend-to-end:- parse multilingual source
- generate WAT
- compile WAT to binary WASM
- write
.watand.wasmartifacts - instantiate and execute
__mainin Wasmtime
- Added Wasmtime fuel metering in this test to bound runtime for heavy complete-feature programs while preserving executable validation.
- Added deterministic WAT symbol sanitization for generated function/local/parameter identifiers.
- Preserved original exported function names while using WAT-safe internal
$symbols. - Fixed previously failing WAT→WASM compilation paths for non-ASCII identifiers (for example Arabic identifiers in complete-feature examples).
- Updated
.github/workflows/wasm-backends-test.ymlto include a primary-job gate that runs complete-feature WAT/WASM artifact + execution validation. - This adds a dedicated regression barrier for executable WASM quality, not just WAT text validity.
- Full test suite status after integration:
1778 passed, 2 skipped. - Pylint checks on touched files remain clean (
10.00/10in targeted runs).
- New
WATCodeGeneratorcompiles the multilingual AST directly to WebAssembly Text (WAT). - Browser playground shows the generated WAT and executes it via wabt.js + native
WebAssembly.instantiate(). - Playground also shows the generated Rust/Wasmtime bridge scaffold for local compilation.
- Regression tests validate WAT output across all 17 languages (
tests/complete_features_wat_test.py).
- WebAssembly compilation target with performance gains on compute-intensive operations.
- Python ↔ WASM bridge for type conversion and memory management.
- Smart backend selector for auto-detection and transparent fallback to Python.
- 25+ pure Python fallback implementations for guaranteed cross-platform compatibility.
- 20 multilingual WASM corpus projects in 4 languages each.
- Documentation suite: WASM architecture overview, installation guides, performance tuning, troubleshooting, and FAQ.
:wat(:wasm) — toggle display of generated WAT before execution.:rust(:wasmtime) — toggle display of generated Rust/Wasmtime bridge code before execution.--show-watand--show-ruststartup flags for thereplsubcommand mirror the interactive toggles.- Extends the existing
:python/--show-pythonpattern uniformly across all three backends.
- All 17
complete_features_XX.mlexample files now cover the full Python 3.12 feature checklist: numeric literals, augmented and bitwise assignments, chained assignment, type annotations, ternary expressions, default/variadic parameters, lambdas, list/dict/generator/nested/filtered comprehensions,try/except/else, exception chaining, multiple handlers,match/case/default, decorators, multiple inheritance, static/class methods, properties, and docstrings. - Keyword-variable name clashes (Spanish
y= AND, Danish/Swedishi= IN) resolved in example files.
- Fixed broken relative links (
../CHANGELOG.md,../USAGE.md,../examples/README.md) indocs/reference.mdanddocs/fr/programmation.md. - CLI
multilingual run <file>.mlcorrectly handles.mlfile execution. - New tests:
language_completeness_cli_test.py,operators_cli_test.py. - 1671 tests passing, 2 skipped (WASM Rust compile requires
rustcwasm32 target).
- Created comprehensive
examples/complete_features_XX.mlfiles for all 17 supported languages. - Each file demonstrates full language feature set: imports, functions, closures, classes, control flow, generators, exceptions, comprehensions, and advanced constructs.
- Ensures feature parity across all languages—if code works in English, equivalent translated code works identically in all other 16 languages.
- Added an all-language full-pipeline regression test that starts from one core template, renders per-language keywords, transpiles, and executes for every supported language.
- Expanded equivalence validation to check deterministic transpiled Python parity across language frontends.
- Added import-hook support for loading
.mlmodules and packages (__init__.ml) via Python import machinery. - Enabled multilingual imports automatically in executor and REPL runtime paths.
- Added integration tests for English/French cross-imports, package imports, and manual enable/disable flow.
- Added five new European language packs: Polish (
pl), Dutch (nl), Swedish (sv), Danish (da), and Finnish (fi). - Localized keyword mappings, parser/semantic error messages, REPL help/messages/aliases, operator descriptions, and runtime builtin aliases for the new languages.
- Fixed legacy keyword placeholders surfaced by full-pipeline testing (Italian
IS, TamilNOT). - All 17 languages now have complete feature coverage with working examples.
- Added a contributor-ready onboarding checklist/template for new language packs.
- Added a
multilingual smokelanguage-pack validation path and wired it into workflows.
- Strengthened CI gates with packaging sanity checks and CLI smoke runs in addition to tests/lint.
- Added cross-language import examples under
examples/and updated docs (README.md,USAGE.md,examples/README.md). - Test suite: 85 tests passing with zero regressions.
- Added a surface-normalization layer for selected alternate phrasing patterns.
- Expanded frontend equivalence coverage, including iterable-first loop variants.
- Added support for advanced constructs such as async flows, walrus operator, set literals, and dict unpacking.
- Improved multilingual REPL usage with language switching and optional generated-Python display.
- Strengthened end-to-end parity across language frontends targeting one core execution path.
- Refined README project positioning around "one programming model, many human languages."
- Added focused docs for naturalness, CNL scope, stdlib localization boundaries, and translation governance.
- Expanded regression and equivalence tests across parser, core IR, runtime, and surface normalization.
- Updated package metadata and released as
0.2.0.
- Expanded supported programming languages to 12:
en,fr,es,de,it,pt,hi,ar,bn,ta,zh,ja. - Added full keyword coverage for Italian and Portuguese in the USM keyword registry.
- Added parser/semantic error message coverage for Italian and Portuguese.
- Reworked REPL command handling to be data-driven via
resources/repl/commands.json. - Added multilingual command aliases and localized help/messages.
- Added discovery commands:
:kw [XX]for language keywords:ops [XX]for operators/symbols
- Localized REPL listing messages across supported languages.
- Introduced data-driven localized builtin aliases via
resources/usm/builtins_aliases.json. - Kept universal builtin names available while adding localized aliases (e.g., French
intervalleforrange). - Runtime builtin alias loading is now dynamic in
RuntimeBuiltins.
- Simplified and reorganized top-level documentation.
- Updated
README.mdwith a clearer multilingual-first introduction and improved REPL guidance. - Added extensive multilingual REPL smoke-test examples in
docs/reference.md. - Added
docs/language_onboarding.mddocumenting the data-driven process for adding new languages. - Improved cross-linking between
README.md,USAGE.md, anddocs/reference.md. - Moved detailed execution/AST examples and full example command list into
USAGE.md.
- Addressed lint issues in touched files and normalized line endings.
- Test suite status at latest run:
602 passed, 1 skipped.