Skip to main content

Host-side DSL for Adaptive-AUTOSAR-style nodes that talk to Classical AUTOSAR via the Theia CAN/FR gateway. Inspired by ARText.

Project description

artheia

A host-side DSL for modeling Adaptive-AUTOSAR-style components — atomic nodes with explicit TIPC addresses and typed ports, wired into compositions and clusters — plus the code generators that turn an .art model into C++ scaffolds, .proto wire types, deploy manifests, and netgraphs for the Theia runtime.

Inspired by ARText (the syntax aesthetic + the structural concepts: atomic components, ports, prototypes, compositions, connectors), but its own thing — not AUTOSAR-tool-compatible.

Install

pip install -e .            # or: pip install --find-links /opt/theia/wheels artheia

Gives you the artheia CLI, the artheia-lsp language server (for the editor integrations), and artheia-mcp (the generator surface as an MCP server).

The grammar in one breath

Three primitives, bottom to top:

Primitive Is a Owns
node thread one TIPC type/instance, typed ports, a behavior class
composition process (one executable) node prototypes + in-process wiring (connect)
cluster distribution bundle compositions + inter-process wiring; the deploy unit

Around them: message/enum (proto3-equivalent data), interface (senderReceiver for streams, clientServer for request/reply), and import across packages.

Example

package system.demo

// --- data ----------------------------------------------------------------
enum Mode { IDLE = 0  RUN = 1 }

message Tick   { uint32 seq }
message SetMode { Mode mode }

// --- contracts -----------------------------------------------------------
interface senderReceiver TickStream { }          // a stream of Tick
interface clientServer   ModeCtl {
    operation Set(in r:SetMode) returns Tick
}

// --- a node: one thread, one TIPC endpoint -------------------------------
node atomic Counter {
    tipc type=0x80020001 instance=0
    ports {
        receiver ticks_in requires TickStream     // inbound stream
        server   ctl      provides ModeCtl        // request/reply surface
    }
}

node atomic Driver {
    tipc type=0x80020002 instance=0
    ports {
        sender ticks_out provides TickStream
        client mode_call requires ModeCtl
    }
}

// --- a composition: the process, wiring prototypes together --------------
composition DemoProc {
    prototype Counter counter
    prototype Driver  driver

    connect driver.ticks_out to counter.ticks_in
    connect driver.mode_call to counter.ctl
}

// --- a cluster: the deploy/package unit ----------------------------------
cluster Demo {
    composition DemoProc proc
}

What you do with a model

artheia parse        system/system.art                 # resolve + validate the tree
artheia check-addresses system/system.art              # assert TIPC addresses unique
artheia gen-app --kind fc <component>.art --out apps    # C++ scaffold (lib/main/impl)
artheia gen-proto    <component>.art --out platform/proto
artheia gen-netgraph <component>.art --out netgraph.json
artheia gen-manifest <component>.art manifest/app.py    # deploy manifest module

Run artheia --help for the full command set (~30 generators incl. DBC/FIBEX import, config-schema migration, and the rig/manifest pipeline). The gen_server shape follows OTP — handle_call / handle_cast / handle_info per node.

Editor support

.art files get highlighting + LSP (diagnostics, goto-definition, completion) in VS Code and Emacs via the artheia-lsp server — see the umbrella repo's contrib/editors/.

Layout

artheia/
  grammar/*.tx        textX grammar
  model/              name resolution + validators
  generators/         the gen-* code generators + Jinja2 templates
  lsp/                the artheia-lsp language server (pygls)
  adapters/           the artheia-mcp server (FastMCP)
  cli.py              the `artheia` CLI (Click)

License

Apache-2.0 — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

artheia-0.1.0.tar.gz (330.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

artheia-0.1.0-py3-none-any.whl (341.7 kB view details)

Uploaded Python 3

File details

Details for the file artheia-0.1.0.tar.gz.

File metadata

  • Download URL: artheia-0.1.0.tar.gz
  • Upload date:
  • Size: 330.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for artheia-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bdb032dbd5e26cef067285becbbb0dda47fef37defa107e4a9c967f600959c89
MD5 4afd8bbbee48a05676d46f693c559508
BLAKE2b-256 e137e24cdb217a7a35db908ece624a30353b3e39bd5c563c9617da432c05d1bb

See more details on using hashes here.

File details

Details for the file artheia-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: artheia-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 341.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for artheia-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4117aa06f19cab1dc9aa399c30f2c9ca3f2562ec2ac3af9c5efe97c7424abd62
MD5 01dd35800a15887a54338b31fa85b479
BLAKE2b-256 d7f2469c0b4fa383f7bf76940188ad68f394b257e22c751ffd17b234f0a3d222

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page