Osaka Programming Language CLI (interpreter + VM + equivalence lock)
Project description
OsakaProgrammingLanguage (Osaka Lang)
Osaka Lang is a custom programming language runtime written in Python with:
- an AST interpreter
- a bytecode compiler + VM
- an equivalence lock for interpreter/VM behavior checks
The package exposes the CLI command:
osaka
Installation
From PyPI (recommended)
python3 -m pip install --upgrade OsakaProgrammingLanguage
Verify:
osaka --help
From TestPyPI
python3 -m pip install --index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple \
OsakaProgrammingLanguage
From local source (development)
python3 -m pip install --upgrade "/absolute/path/to/Osaka Lang"
Quick Start
Run a file:
osaka examples/hello.saka
Run with debug:
osaka --debug examples/hello.saka
Start REPL:
osaka --repl
If a program emits no output, Osaka prints:
Tip: Use --debug for traces
CLI Reference
--no-lock— disable equivalence lock--vm-only— run VM path only--interpreter-only— run interpreter path only--lock-strict— fail on lock mismatch--warnings-as-errors— treat warnings as errors in checks--debug— enable parse and execution trace verbosity--show-lexer-tokens— print lexer tokens--repl— interactive interpreter REPL
Language Semantics (Technical)
Kind system
Every runtime value has a kind:
truth(authoritative)grain(uncertain)
Declarations:
truthaboutgrain x = ...;grainsoftruth x = ...;
For arithmetic/concat/comparison flows, results are generally truth only when both operands are truth; otherwise they degrade to grain.
Control-flow constraints
if and while conditions must evaluate to truth at runtime. Grain conditions raise runtime errors (for example while-condition must be truthaboutgrain).
Mutation governance
Ah(x)— acknowledge variable before mutationyouknowsealsright(x)— assumption marker for mutation pathwayIvebeengot(x)— legacy lockout (blocks writes)Hecho(x)— freeze finalized variable
Current behavior includes warnings for mutation without acknowledgement and hard blocks for legacy/frozen variables.
Functions
Both syntaxes are accepted:
function add(a, b) { return a + b; }
func add2(a, b) { return a + b; }
Current interpreter rule: function parameters are bound as grain in function scope unless promoted.
Collections
- Lists:
[1, 2, 3] - Maps:
{"k": 1} - Index read/write:
arr[i],arr[i] = v,m["k"]
Built-ins:
len,keys,values,containspush,pop,slice
Runtime/meta built-ins
SataAndagi()— runtime bootstrap/info map (truth)Americaya(x)— promote returned value totruthGetittogether()— stabilize unresolved grain state
Parser note: Getittogether is callable (Getittogether()), while Escalator / Elevator are declaration-style statements.
Architecture
Front-end
lexer.pytokenizes source.parser.pybuilds AST (ast_nodes.py).
Interpreter path
interpreter.pyexecutes AST againstruntime.pystate.- Tracks values, kinds, warnings/errors, traces, and buffered stdout/stderr.
Compiler + VM path
compiler.pylowers AST to bytecode (bytecode.py).vm.pyexecutes bytecode.verifier.pychecks stack effects, call arity, and block validity.
Equivalence path
equiv_test.pyruns both engines.equiv_lock.pycompares traces and output for drift detection.
Testing and Validation
python3 run_tests.py
python3 run_tests.py --filter 06_sataandagi.saka
python3 -m unittest tests/test_verifier.py
python3 equiv_lock.py tests/equivalence/06_sataandagi.saka
Contributor Map
lexer.py— lexer rulesparser.py— parser + AST constructionast_nodes.py— AST node definitionsinterpreter.py— interpreter semanticscompiler.py,bytecode.py,vm.py— compile + VM runtimeverifier.py— verifier rulesequiv_lock.py,equiv_test.py— equivalence toolingarg_parser.py,saka.py— CLI wiring
When changing language semantics:
- Update interpreter behavior.
- Mirror behavior in compiler/VM.
- Update verifier rules if signatures/ops changed.
- Update tests, especially in
tests/equivalence/. - Re-run equivalence and verifier checks.
Packaging and Release
Metadata lives in pyproject.toml:
- package name:
OsakaProgrammingLanguage - console script:
osaka = saka:main
Typical release flow:
rm -rf build dist *.egg-info
python3 -m pip install --upgrade build twine
python3 -m build
python3 -m twine check dist/*
python3 -m twine upload dist/*
License: MIT (LICENSE).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file osakaprogramminglanguage-0.1.1.tar.gz.
File metadata
- Download URL: osakaprogramminglanguage-0.1.1.tar.gz
- Upload date:
- Size: 33.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f878ddf267935a95a1e0e2f5db1589409b2bdd93731a4bfe899586fbdedad6b
|
|
| MD5 |
982ead999ce87d08928e565753121b0a
|
|
| BLAKE2b-256 |
6fe6343750c1f25d8d3e4f65bc4900fc2cbaaa6de11641f281d8522b573cd60e
|
File details
Details for the file osakaprogramminglanguage-0.1.1-py3-none-any.whl.
File metadata
- Download URL: osakaprogramminglanguage-0.1.1-py3-none-any.whl
- Upload date:
- Size: 38.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b03519dae30f971aa2efd35649ec6a1f2825f104757b047736a8e0b492404f0d
|
|
| MD5 |
66846fb1270054d1f1a16dc4f928e35e
|
|
| BLAKE2b-256 |
3f2e56d1d65d846b27df1bdc2ff7a62014f2e937391533907fb8f517ec0897fb
|