Overview
What MARS Is
- A small, typed language for robotics code plus a component configuration system.
- Designed to model and abstract robot hardware composition in
.marscfiles and run logic in.marsprograms. - Executes on a bytecode-interpreted VM with unit-aware numeric types and a small standard library.
High-Level Architecture
- Language surface:
.marsfiles with functions, control flow, classes, arrays/dicts, and units. - Component configuration:
.marscfiles describe components, inheritance, parameters, and subcomponents. - Execution runs on an internal VM; compiler details are intentionally kept out of the main documentation.
- Optional tooling: component graph visualizers (Graphviz).
Hello World
Example:
print("hello, mars");
Run from the repo root:
python mars_compiler\main.py
main.py executes mars_compiler/test_file.mars by default. To run another file, import and call the interpreter from Python:
python - <<'PY'
from mars_compiler.interpreter import interpret_code_from_file
interpret_code_from_file("path/to/your_file.mars", debug=False)
PY