Skip to content

goutham3133/arforge

 
 

Repository files navigation

ARForge

YAML-first AUTOSAR Classic SWC design. Version-controlled, CI-friendly, no license server.

AUTOSAR Classic 4.2 License Python Platform Tests

ARForge lets you design AUTOSAR Classic SWCs and compositions in plain YAML, validate them against semantic rules, and export deterministic AUTOSAR-aligned ARXML for the currently supported scope — without a GUI tool or license server. It runs on Linux and Windows, integrates with Visual Studio Code, and fits naturally into any CI pipeline.


Why ARForge

AUTOSAR SWC design in GUI-based tools is expensive, opaque, and hostile to version control. Diffs are unreadable, validation is manual, and the toolchain cannot run in CI. ARForge is designed from the ground up for the opposite: a YAML source of truth that is readable, diffable, and automatable.

Text-first design SWCs, compositions, interfaces, modes, and types — all in human-readable YAML
Semantic validation Stable finding codes across supported constructs. Catches design problems before export
Clean ARXML export Deterministic, ordered AUTOSAR-aligned output for the currently supported feature set
CI-ready CLI Validate and export in a pipeline with no GUI dependency or license server
VS Code integration YAML schema autocomplete, inline diagnostics, and task runner built in

Who this is for

ARForge is aimed at AUTOSAR engineers, independent consultants, and teams who want SWC design to live in version control and run in CI — without a commercial toolchain. It works well for greenfield SWC development, architecture work done offline, and automated ARXML generation from a controlled source of truth.


What ARForge covers

Current implementation targets a practical AUTOSAR Classic 4.2 subset:

Area Details
Data types Base, implementation, and application types; scalar, array, and struct; units and compu methods (linear, text table)
Sender-Receiver interfaces Data elements, implicit/explicit/queued ComSpec, receiver init values, queue length validation
Client-Server interfaces Operations, in/out/inout arguments, return types, possible errors, sync/async call modes, timeout configuration
Mode-Switch interfaces ModeDeclarationGroup definitions, mode manager and user ports, ModeSwitchEvent runnable triggers
SWC types Provides/requires ports, runnables, TimingEvent, InitEvent, OperationInvokedEvent, DataReceiveEvent, ModeSwitchEvent
Runnable access reads, writes, calls, raisesErrors — all validated against port direction and interface kind
System composition Component prototypes, SWC type references, port-level assembly connectors for SR, CS, and mode-switch
Validation Stable finding codes, three severity levels (error/warning/info), verbose diagnostics
Export Jinja2-based ARXML, monolithic or split-by-SWC, deterministic ordering, shared rendering logic across both modes
Code skeletons Template-driven C .h / .c starter files generated from validated SWC models
Diagrams Unified generate diagram command for PlantUML architecture views

Quickstart

Install

Linux / macOS

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Windows

python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt

A minimal SWC in YAML

# swcs/SpeedSensor.yaml
swc:
  name: "SpeedSensor"
  description: "Publishes the current vehicle speed."
  ports:
    - name: "Pp_VehicleSpeed"
      direction: "provides"
      interfaceRef: "If_VehicleSpeed"
    - name: "Pp_PowerState"
      direction: "provides"
      interfaceRef: "If_PowerState"
  runnables:
    - name: "Runnable_PublishVehicleSpeed"
      timingEventMs: 10
      writes:
        - port: "Pp_VehicleSpeed"
          dataElement: "VehicleSpeed"

Typical workflow

# Initialize a new project scaffold
python -m arforge.cli init my-project

# Validate — stable finding codes on any semantic issue
python -m arforge.cli validate examples/autosar.project.yaml

# Export - monolithic or split by component type
python -m arforge.cli export examples/autosar.project.yaml --out build/out --split-by-swc

# Generate starter C skeletons for SWCs
python -m arforge.cli generate code examples/autosar.project.yaml --lang c --out build/code

# Generate architecture diagrams
python -m arforge.cli generate diagram examples/autosar.project.yaml --out build/diagrams

generate code produces deterministic starter skeletons for each SWC, for example <SwcName>.h and <SwcName>.c. The output is intentionally scaffold-level code with Rte_Read_*, Rte_Write_*, and Rte_Call_* placeholders rather than full AUTOSAR RTE integration.

The diagram generator writes:

  • composition_<System>.puml
  • subcomposition_<Subcomposition>.puml
  • interfaces_wiring.puml
  • interfaces_contracts.puml
  • behavior_<SWC>.puml

Run tests

pytest -q

The test suite covers valid and invalid inputs across all supported AUTOSAR constructs. Every validation rule has explicit test cases for both correct and incorrect models.


VS Code integration

ARForge includes a .vscode/ configuration for YAML schema validation, autocomplete, and task runner integration out of the box.

The full setup instructions, task list, and arforge.projectFile configuration live in docs/project-structure.md. If you just want the essentials:

  • install the VS Code Python and YAML extensions
  • open the repository root in VS Code
  • set arforge.projectFile in .vscode/settings.json if you want tasks to target a different manifest

Documentation

Start with docs/index.md.

Doc Contents
Overview What ARForge does and where it fits in a workflow
Project Structure Project manifest, scaffold layout, and build output
Modeling Concepts Full YAML modeling reference with examples
Validation Validation rule families and severities
CLI All commands and options
Architecture Internal pipeline, for contributors
Roadmap Current capabilities and planned features

Contributing

Issues and pull requests are welcome. See CONTRIBUTING.md for contribution expectations and the maintainer-led project model.


License

Apache-2.0. See DISCLAIMER.md for project independence and affiliation notes.


Contact

Bojan Zivkovic — questions, feedback, collaboration, or consulting inquiries welcome via LinkedIn or GitHub Issues.

About

YAML-first AUTOSAR Classic SWC design. Version-controlled, CI-friendly, no license server.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 89.1%
  • Jinja 10.9%