Language › Language reference

Language

arche-lang — pattern reference

Every construct the language accepts, with its syntax, its properties and an example. This page is generated from the language definition (src/spec.ts) by archec patterns. A complete file using every pattern is examples/patterns/patterns.arche.

The sets#

The declarations come in sets, like Go's language and its packages: the core is what every model is written with, and what to learn first; the others are for a purpose. Each declaration below says its set.

Set What it is for Declarations
The core What every model is written with: the project and its files, the catalogs, data and messages, requirements, components with their ports, functions, variables and state machines, links, traces, and test plans. project, package, include, kind, layer, tag, color, port-type, wire, interface, contract, type, enum, struct, field, const, message, requirement, verify, defaults, system, component, port, handler, fn, var, memory, states, state, link, trace, test-plan, case, cases, step
Deployment Where the parts run: processors and their cores, containers, binaries, processes, threads and interrupts, the bus each link takes, latency chains, and the watchdogs a part keeps. core, deployment, container, binary, process, thread, isr, route, chain, watchdog, allocator, place
Functional analysis & scenarios Who uses the system and what for, its functions and their flows, the events its machines react to, operating modes, scenarios and their sequences, the simulation. actor, mission, event, use-case, system-function, function-flow, function-chain, step, edge, operating-mode, deliverable, means, icd, scenario, participant, sequence, alt, when, workflow, simulation, stimulus, keyframe, canvas
Safety, security & design space Hazards and safety goals, failure modes and fault trees, the threat analysis, design decisions, variants, parameters and studies, viewpoints and the project's rules. hazard, safety-goal, failure-mode, gate, control-action, uca, loss-scenario, asset, damage-scenario, threat, attack-path, security-goal, decision, variant, parameter, study, viewpoint, rule
Product UI The user interface of the product: its device, screens, layouts and elements, bound to the model (the words inside ui { } are words only there). ui
The Arche app How the Arche app shows the project: its pages and tabs, panels and widgets, stories, benchmarks, visuals, tables, the menu and plugins. Kept in app/*.arche. app, page, tab, panel, widget, story, step, benchmark, run, visual, animation, table, column, menu, entry, plugin
Project tooling Libraries and their versions, translations, units, property definitions, tag groups, and files written as they are. library, translations, file, raw, unit, property, tag-group, generator, importer, exporter, option

Lexical rules#

Element Syntax
Line comment // …
Block comment /* … */
Doc comment (becomes the description of the next declaration) /// …
Identifier letters, digits, _; - allowed inside (REQ-BRK-001, f-boot) — write subtraction with spaces
Number 42, 3.14, 1e-3, 0xFF, 0b1010, 1_000_000
Quantity number + unit, no space: 5ms, 100MHz, 3.3V, 2kg. Time units (ns, us, µs, ms, s, min, h) are durations
String "…" with \n \t \" \\; other backslashes are kept (LaTeX-friendly: "$\frac{a}{b}$")
Multi-line string """…""" (common indentation removed)
Code block ```python … ```, ```latex … ```, ```yaml … ```
Lists, records, ranges [a, b], {x: 1, y: 2}, 0..250, 1..*
Separators Newlines end a property; on one line, ; separates them ({ at 1, 2; satisfies R } — the linter asks for it). A property's values start on its line; after a , they may continue on the next

LaTeX#

Any description, requirement text, rationale or objective may contain inline math $…$ or display math $$…$$. A math property (or a ```latex / ```math block) holds raw LaTeX. The math is kept as written in the generated YAML; archec doc main.arche -o spec.tex typesets it in a complete LaTeX specification. \$ writes a literal dollar.

requirement REQ-BRK-001 "Stopping distance" {
  text "The vehicle shall stop within $d \le \frac{v^2}{2\mu g}$ on dry asphalt."
  math ```latex
  \mu \ge 0.7
  ```
}

Short forms#

Write the short form. The long one is still accepted, but the linter marks each one (long-form, a hint with its quick fix) and archec fmt --simplify --write rewrites them all without changing the generated project — so a reader only ever has to know one spelling.

Short Long Rule
out tx: can "CAN" sends A, B port tx "CAN": can out sends [A, B] A port starts with its direction: in, out or inout
out tx: can "CAN", part cam: Camera "Front" out tx "CAN": can The type comes right after the name, the display name after the type
purpose "Fuses the sensors" main "Fuses the sensors" What a component is for — main is easy to read as fn main
do send(hmi.bus, GO(True)), expect adcu.state == 'Ready' do "send(hmi.bus, GO(True))", expect "adcu.state == \"Ready\"" Test steps and stimuli take Python as it is, one assertion per expect; the linter checks the messages and states it names
A -> B on e / log('x') A -> B on e / "log('x')" A transition action is Python as it is
fn f(x: int32) ```python …``` fn f(x: int32) { body ```python …``` } A code fence right after a function is its body; inside a block, a bare fence is too
tags safety, asil-d tags [safety, asil-d] Lists of names need no brackets
states { state Off; state On; … } states { initial Off; state Off; … } The first state is the initial one, unless initial says otherwise
a.tx -> b.rx "Bus" a.tx -> b.rx "Bus" : can { carries [A, B] } A link's type comes from its ports, and what it carries from what the source port sends (and the target accepts)
component Sensor {
  out data: can "Samples" sends SAMPLE
  in cfg: can receives CONFIG
  fn main ```python
    while True:
        await wait(ms(10))
        send(self.data, SAMPLE(value=1))
  ```
}
system Rig { part s: Sensor; part c: Controller; s.data -> c.data_in "Samples" }

Types and pointers#

Built-in types: bool, uint8, int8, uint16, int16, uint32, int32, uint64, int64, float32, float64, char, byte, string, bytes, duration, timestamp, any, void — plus every type, enum and struct you declare. A type may be an array (uint8[16], Sample[]) and a pointer:

Type Meaning
*T or T* an address of a T; pointer-size bytes (project property, default 4)
**T, char** a pointer to a pointer
*void an untyped address
*T[4] an array of four pointers

A pointer is initialised with an address, a constant or nil. In the Arche project it becomes a catalog entry ptr_T (an unsigned integer as wide as an address, unit address); a pointer field to a structure is an association in the class diagram. A pointer in a message payload is flagged: an address means nothing in the receiver's memory.

project "Firmware" { pointer-size 4 }
struct Block { size: uint32; next: *Block; data: uint8* }
component Allocator {
  var free_list: *Block = nil
  memory DMA_SRC @ 0x4000_0010 : *void rw
  fn alloc(n: uint32) -> *Block ```python
    return self.free_list
  ```
}

Python in .py files#

Code longer than a few lines reads better in a .py file, with your editor's Python support. code "ctrl.py" on a component (or a system, or the project) names the file; in the model a function's name goes where a ``` block would. archec copies each body into the Arche project, so Arche runs exactly what the same code written inline would give (archec fmt --extract-code --write moves existing blocks out, and that is tested to change nothing).

In the model In the .py file Rule
fn main (no block) async def main(self): A fn with no block takes the def of the same name in the component's own file
fn add(a: int32, b: int32) def add(self, a, b): Parameters: self, then the fn's arguments, in order
on-enter enter_on def enter_on(self): Any code property takes the def it names: on-enter, on-exit, on-receive, on-write, body
Off -> On on GO / turn_on def turn_on(self, msg): A transition's action can name a def too
(nothing) def on_exit_On(self): Bound by its name: on_enter_<State>, on_exit_<State>, on_receive_<port>, on_write_<MEMORY>
project { code "shared.py" } def log_off(self): A file on the project or an enclosing system is shared: its defs bind only when named

A hook's parameters are the names Arche gives it, the ones you use: a port msg, message, port, value, prev, rise, fall and the fields of the messages it receives; a state from_, to; a memory block index, value, field, writer. Imports, constants and helper functions at the top of the file are copied into the bodies that use them — a copy per body, so a top-level name cannot keep state between calls: keep it on the component (var n in the model, self.n in Python). A def's docstring becomes the function's description. from arche import * is for the editor only: archec stubs (or the VS Code extension, on its own) writes arche.py beside the .py files with Arche's helpers and the model's messages and constants.

Code edited in the Arche app comes back with archec pull main.arche --write (into the def or ``` block it came from; a build will not overwrite it until it is pulled), and Arche's errors — "(Controller › Control loop, line 4)", a line of the copy — are mapped back to the source line by archec test, archec run and archec where (and the VS Code commands Run Tests and Go to Simulator Error…).

component ctrl "Controller" {
  code "ctrl.py"
  in sense: i2c receives SAMPLE { on-receive on_sense }
  fn main "Control loop"
  fn command(rpm: Rpm)
  states {
    state Off
    state On { on-enter enter_on }      // on-exit: def on_exit_On, by its name
  }
}
# ctrl.py
from arche import *

async def main(self):
    while True:
        await wait(PERIOD)
        await self.command(self.target)

def command(self, rpm):
    send(self.bus, SPEED_CMD(rpm=rpm))

def on_sense(self, msg):
    self.last = msg

def enter_on(self):
    log("on")

def on_exit_On(self):
    log("off")

Project & files#

Splitting a specification over files, project metadata, the versioned libraries a project uses, and code generators of your own.

project#

Project metadata: name, version, authors. One per project.

  • Keywords: project
  • Set: the core
  • Where: top level
  • Syntax: project "Name" { version "1.0" … }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
version string Specification version.
edition string The language edition it is written in, as go.mod names a Go version: edition "0.12" — the old keyword spellings are errors from 0.12 on (archec fmt --edition 0.12 writes the standard ones and sets it). Without one, the project is read as it always was.
author string Author(s).
layout refs Left pane modules for layout.yaml.
libraries text Folders shared between projects, where include also looks (after the including file's own folder): libraries "../shared", "/opt/arche-libs". include "std/…" is the standard library that ships with archec.
trust verified | reviewed | community Which Arche Store libraries the project accepts: trust verified (only verified publishers, such as board vendors), trust reviewed (also libraries a store reviewer read), trust community (any, the default). Your own libraries, not from the store, are always accepted.
level simple | full How much of the language the editor offers: level simple (the core: systems, components, ports, links, functions, state machines, requirements, tests — an advanced declaration says how to use it), level full (everything, the default).
pointer-size number Bytes in an address: the size of every *T pointer (default 4).
uses any A library the project depends on, and the versions it accepts: uses kria-parts "^1.4" (1.4 or newer, before 2.0), "~1.4" (1.4.x), "1.4.2", ">=1.2 <2". It is looked for in the libraries folders, as <name>/ or <name>@<version>/ with a library.arche; the newest version in the range is used, or the one arche.lock names (archec lib lock). include "kria-parts/kria.arche" is then a file of that version.
assets text Files and folders copied into the generated project as they are (images, sources, templates): assets "visuals", "code". Paths are relative to this file.
languages refs Languages of the content, the source one first (layout.yaml languages); translations are written "Texte" en "Text", or with en "Text" on the next line, indented under the text.
logo string The logo shown in the app (layout.yaml).
source-root string The folder of the implementation sources (layout.yaml sourceRoot).
pptx-template any The PowerPoint template slides are exported with, and how much of it they take (full): layout.yaml pptxTemplate.
infer-links bool infer-links false: a link gets a type and carried messages only when they are written on it (not from its ports).
auto-catalogs bool auto-catalogs false: kinds, layers, tags, port types and colors that are used but not declared are not added to their catalogs.
derived-from string The store package the project was started from, as archec new --from (or --template) records it: derived-from "arche/rover-esp32@0.1.0". The project is a copy, free to change; when it is published, its library carries this line on, so the store draws the family tree.
omit text Files the generated project does not have, though archec would write them: omit "layers.yaml".
code text TypeScript or Python files shared by the whole model: their functions can be named from any component (on-enter log_on).
handlers typescript | python | arche The language the behaviour is written in: typescript (what archec new writes), python, or arche (the action language, translated to TypeScript for Arche and to C, Rust or Go for firmware). A block says its own (ts, python, ```arche). Without it, a project with Python code is python, any other typescript. docs/handlers.md.
project "Autonomous car" {
  version "0.3"
  author "Systems team"
}

library#

A library: a folder of .arche files shared between projects, named and versioned in its library.arche. The folder is <name>/ or <name>@<version>/ in a project's libraries folder, so versions sit side by side; a project says which it accepts with uses <name> "<range>". archec lib lists what a project uses and archec lib lock records it in arche.lock.

  • Keywords: library
  • Set: project tooling
  • Where: top level
  • Syntax: library kria-parts { version "1.4.0" }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
version string Its version, as major.minor.patch: a new major version for a change that breaks the projects using it, a new minor one for an addition.
archec string The archec versions it works with, as a range: archec ">=0.10".
uses any A library it uses in turn, with the versions it accepts.
author string Author(s).
owner ident Who publishes it in the Arche Store: owner acme makes it acme/kria-parts there. A project still uses kria-parts.
kind architecture | driver | spec | board | template | ui-kit | library What it holds, which the Arche Store shows differently: an architecture (a system to reuse or extend), a driver (a component and its code), a spec (requirements, interfaces, ICDs), a board, a template (a project to start from: archec new --template owner/name copies it), a ui-kit (a theme for a ui: theme "owner/name"), or a library of parts and types (the default).
license string Its license, as an SPDX expression: license "Apache-2.0". archec store publish refuses a library without one.
keywords refs Words the Arche Store search finds it by.
derived-from string The store package it was made from, written as archec add takes it: derived-from "st/stm32g4-base@^1.0". The store draws the family tree.
export-control any Its export classification, which the publisher declares: none, ear99, or a control number such as "5D002". archec store publish refuses a library without it, and holds one that reads like defence technology for review. It is the publisher's statement, not legal advice.
edition string The language edition its files are written in (as a project's edition).
url string Its home page or repository.
library kria-parts "KR260 parts" {
  version "1.4.0"
  archec ">=0.10"
}

translations#

The texts of the model in another language, apart: each line is an element (its id, or its path) and its name in that language, or one of its text properties (REQ-1.description), or — for a text no path names, a sequence step or a branch — the text itself ("initialisation" "start-up"), translated wherever it is written. The model's own files then read in one language; it is the same as writing en "…" after each text. archec refactor translations main.arche --extract en moves the inline ones into a file of their own. An entry that names nothing, or repeats a translation written inline, is pointed out.

  • Keywords: translations
  • Set: project tooling
  • Where: top level
  • Syntax: translations en { REQ-1 "Start"; REQ-1.text "The pump shall start."; Station.ctrl "Controller"; "démarrage" "start-up" }
translations en {
  REQ-START "Start on command"
  REQ-START.text "The pump shall start within 100 ms of a START command."
}

include#

Include another .arche file (relative path). Each file is included once; cycles are reported. Inside a system or component body, the file holds part of that body (its parts, links, functions…), read as if written where the include is — a large system split into one file per subsystem. requires "../../interfaces/spi" at the top of a file is an include that says what the file depends on: a component kept in a components/<name>/ folder (a component library) may use only what its folder declares, the standard library, and what it requires — so the folder can be copied into another project (component-not-self-contained). include "std/units", "std/buses", "std/interfaces", "std/parts" are the standard library shipped with archec; a path not found beside the file is looked for in the project's libraries.

  • Keywords: include · requires (old spelling: import)
  • Set: the core
  • Where: top level, inside system, inside component
  • Syntax: include "path/to/file.arche"
include "common/messages.arche"

package#

package chassis on its own line, first in a file, puts the whole file in the package, as in Go; package chassis { … } groups part of one. A group of declarations — components, messages, types, requirements — under one name, so a large model reads by part. Inside, names are written as usual; from anywhere, chassis.BrakeEcu names one explicitly (a bare BrakeEcu works too). Arche ids are global, so a name is still declared once in the whole project: a package groups and qualifies, it does not let two things share an id. include inside a package puts that file's declarations in it.

  • Keywords: package (old spelling: namespace)
  • Set: the core
  • Where: top level
  • Syntax: package name (the rest of the file is in it, as in Go) | package name { declarations… }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
package chassis {
  message BRAKE_CMD { force: float32 }
  component BrakeEcu { in can: can receives BRAKE_CMD }
}
system Car { part brakes: chassis.BrakeEcu }

raw#

A file of the project that Arche does not define: data "file.yaml" = { … } writes the value as YAML (a record, a list), checked as any value is; `raw "file.yaml" ```yaml … ```` writes the text verbatim — the escape hatch for anything the language does not model yet.

  • Keywords: raw · data
  • Set: project tooling
  • Where: top level
  • Syntax: `data "file.yaml" = { key: value, … } | raw "file.yaml" ```yaml … ````
raw "plots.yaml" ```yaml
version: 1
plots: []
```

file#

Fields of a generated file itself (its top level), with attr: file "requirements.yaml" { attr version = nil }.

  • Keywords: file
  • Set: project tooling
  • Where: top level
  • Syntax: file "name.yaml" { version 1; attr key = value }
Property Value Meaning
version any The file's version field; version nil when it has none.
file "deliverables.yaml" { attr version = 1 }

generator#

A code generator of your own, run as archec gen --target <id> beside the built-in targets. It reads the generator model — the project as JSON, every name resolved, each message's layout on the wire, each element's file and line (schemas/generator-model.v1.json) — and returns files. Three kinds: templates "folder" (text files with {{ }} placeholders), script "gen.js" (module.exports = function generate(model, ctx) { … }, run in a sandbox) or command "python3 gen.py" (any language: the model as JSON on stdin, the files as JSON on stdout). from <generator> is another one with other options: how a project sets those of a generator a library ships. Its files go to <output>/<id>/, never over one marked keep that exists.

  • Keywords: generator
  • Set: project tooling
  • Where: top level
  • Syntax: generator id "Label" [from base] { templates "dir" | script "gen.js" | command "…"; option k "…" { type string; default v }; options { k v }; builtins c; after c; needs deployment; output "dir"; api 1 }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
templates string A folder of templates (relative to this file): every file in it is one, {{ }} filled from the model; a file named _x is a partial ({{> x}}). See docs/generators.md.
script string A JavaScript file, or TypeScript (gen.ts: its types stripped; archec generator types writes the model's declarations), relative to this file, whose export is function generate(model, ctx), returning { files: { "path": "text" } }. It runs in a sandbox: no require, no file system but its own folder (ctx.readFile), no network.
command string A command run in this file's folder: the model as JSON on its stdin, { "files": [{ "path", "text", "keep" }], "notes", "errors" } on its stdout.
options any Its options, as a record — what the model's options holds; archec gen --option k=v changes one for a run.
needs deployment needs deployment: it reads a deployment, and says so when there is none.
output string The folder its files go to, under the output (its id by default; "." for the output itself).
api number The version of the generator model it reads (1).
builtins any Built-in targets whose files it reads: the model's builtins holds them, { c: [{ path, text }] }, for a template or a command (a script may also call ctx.builtin("c")).
after any A hook: it changes the files of these targets, and archec gen --target c runs it after the target (--no-hooks does not) — a license header on every file, a file more. A script or a command; it gets the files (ctx.files, the model's after) and returns only what it changes, null to take a file away.
generator rte "RTE glue" {
  templates "generators/rte"
  options { prefix "kc_" }
  needs deployment
}

importer#

An importer of your own: a file of another tool read into arche-lang, run as archec import <file> when its extensions match one no built-in importer reads (or --importer <id>). A script "import.ts" (export default function importFile(input, ctx), sandboxed: ctx.readFile reads the imported file's folder and the plugin's own, nothing else) or a command "python3 x.py" (the input as JSON on stdin) returns .arche files with notes and errors; archec writes them and checks them. Usually in a plugin (docs/plugins.md).

  • Keywords: importer
  • Set: project tooling
  • Where: top level
  • Syntax: importer id "Label" [from base] { script "import.ts" | command "…"; extensions ".x", ".y"; option k "…" { type string; default v }; options { k v } }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
script string A JavaScript or TypeScript file, relative to this file, whose export is function importFile(input, ctx): input holds the file's name, path and text and the options; it returns { files: { "main.arche": "…" }, notes, errors }. Sandboxed: no require, no network; ctx.readFile(rel) reads beside the imported file, ctx.readOwn(rel) the plugin's folder.
command string A command run in this file's folder: the input as JSON on its stdin (file, name, text, options), { "files": [{ "path", "text" }], "notes", "errors" } on its stdout.
extensions any The file endings it reads (.ccmproject): archec import picks it for those, unless a built-in importer reads them.
reads any Folders around the imported file, relative to its folder, that its script may read too (ctx.readFile) — where the format's files name others; archec import --allow-read <dir> adds one for a run.
options any Its options, as a record — what the input's options holds; --option k=v changes one for a run.
api number The version of the importer input it reads (1).
importer melody "Melody CCM" {
  script "import.ts"
  extensions ".ccmproject"
}

exporter#

An exporter of your own: the model written as a file of another tool, run as archec export <main.arche> --format <id> -o out.x (or picked by -o's ending). It reads the generator model (the same JSON, version 1) and returns files, as a generator does: templates, a script or a command. Usually in a plugin (docs/plugins.md).

  • Keywords: exporter
  • Set: project tooling
  • Where: top level
  • Syntax: exporter id "Label" [from base] { templates "dir" | script "export.ts" | command "…"; extension ".x"; option k "…" { type string; default v }; options { k v }; needs deployment }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
templates string A folder of templates, as a generator's (docs/generators.md).
script string A JavaScript or TypeScript file whose export is function generate(model, ctx), returning { files: { "path": "text" } }, sandboxed as a generator's.
command string A command run in this file's folder: the generator model as JSON on its stdin, { "files": [{ "path", "text" }] } on its stdout.
extension string The ending of the file it writes (.ccmproject): archec export -o out.ccmproject picks it by that ending.
options any Its options, as a record — the model's options; --option k=v changes one for a run.
needs deployment needs deployment: it reads a deployment, and says so when there is none.
api number The version of the generator model it reads (1).
exporter melody "Melody CCM" {
  script "export.ts"
  extension ".ccmproject"
}

option#

An option of a generator, declared: its type, its default, the values it may take, what it is for. archec check holds what a generator started from it (or --option) sets to it — an option it does not declare, a value of the wrong type or not among its values; its default goes into the model's options when nothing sets it; the editor completes and explains it in options { }; archec gen --list lists it.

  • Keywords: option
  • Set: project tooling
  • Where: inside generator, inside importer, inside exporter
  • Syntax: option name "What it is for" { type string|int|float|bool|list; default v; values a, b }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
type string | int | float | bool | list What it holds: string, int, float, bool or list (any, when not said).
default any Its value when nothing sets it.
values any The values it may take, and no other.
option prefix "The prefix of the C names" { type string; default "kc_" }

Catalogs#

The project vocabulary: kinds, layers, tags, colors and port types. Undeclared kinds, layers and tags that are used are added automatically.

kind#

An element kind for the kinds catalog (kinds.yaml).

  • Keywords: kind
  • Set: the core
  • Where: top level
  • Syntax: kind id "Label" { icon "«P»" }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
icon string Short icon text shown on the canvas.
color color name A palette color id, or a literal "#rrggbb".
kind ecu "ECU" { icon "«E»"; description "Electronic control unit." }

layer#

An abstraction layer (layers.yaml). Declare most abstract first: the order is the meaning.

  • Keywords: layer
  • Set: the core
  • Where: top level
  • Syntax: layer id "Label"
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
layer logical "Logical"
layer physical "Physical"

tag#

A tag for the tag catalog (tags.yaml).

  • Keywords: tag
  • Set: the core
  • Where: top level
  • Syntax: tag id "Label" { group status }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
color color name A palette color id, or a literal "#rrggbb".
group ident Tag type (tag-types.yaml) the tag belongs to.
tag safety "Safety-critical" { group domain; color red }

color#

A palette color (colors.yaml). One value, or light/dark per theme.

  • Keywords: color (old spelling: colour)
  • Set: the core
  • Where: top level
  • Syntax: color id = "#rrggbb" | color id { light "#…"; dark "#…" }
Property Value Meaning
light string Light-theme value.
dark string Dark-theme value.
color brand = "#0b6e4f"
color alert { light "#c62828"; dark "#ef5350" }

port-type#

A port type (types.yaml): the kind of connection a port offers, with its wires and timing.

  • Keywords: port-type (old spellings: porttype, bus)
  • Set: the core
  • Where: top level
  • Syntax: port-type id "Label" { color …; handling message; wire … }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
color color name A palette color id, or a literal "#rrggbb".
handling http | message What an in port of this type answers: http (method+path) or message.
latency duration Transit latency (simulation timing).
bitrate any Bitrate in bit/s, e.g. 1Mbps or 1000000.
jitter duration Random jitter added to latency.
memory-mapped bool A memory-mapped bus (AXI, a register file): its ports are read and written as addresses (Arche memoryMapped).
potential any A physical port's potential (across) variable and its unit: equal at every port linked together (a voltage, a velocity, a temperature, a pressure). A port type with a potential and a flow is physical: its links connect parts with no direction, and archec physics solves the network.
flow any A physical port's flow (through) variable and its unit: the flows into the ports linked together add up to zero (Kirchhoff). Positive into the part.
port-type can-fd "CAN FD" {
  color amber
  handling message
  bitrate 2Mbps
  wire canh "CAN_H" inout
  wire canl "CAN_L" inout
}

wire#

One conductor of a port type.

  • Keywords: wire
  • Set: the core
  • Where: inside port-type
  • Syntax: wire id "Name" [in|out|inout] { signal "3V3 CMOS" }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
signal string Electrical signal standard.
wire sclk "SCLK" out { signal "3V3 CMOS" }

Data#

Types, constants and the message catalog.

type#

A named data type (data-types.yaml) — a built-in read in a unit, with an optional range. type Iq native { … } is a type the code provides: its name in each language and the header (C, C++), or the module (Go), that declares it — the generated code uses it as it is (PYCOGEN's native types).

  • Keywords: type
  • Set: the core
  • Where: top level
  • Syntax: type Id = base [unit u] [range lo..hi] | type Id native { c "name" include "h.h"; cpp "ns::Name" include "h.h"; rust "crate::Name"; go "pkg.Name" import "path" }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
unit string Physical unit, written as it is (unit km/h, unit m/s², unit °C); one with a space is quoted.
range range Allowed range lo..hi.
native bool The type is the code's: written in the header, type Iq native { … }.
cpp string A native type's name in C++, and its header: cpp "dsp::Iq" include "dsp/iq.h".
c string A native type's name in C, and the header that declares it: c "iq_t" include "dsp/iq.h".
rust string A native type's path in Rust: rust "dsp::Iq".
go string A native type's name in Go, and the package to import: go "dsp.Iq" import "example.com/dsp".
type Speed = float32 unit km/h range 0..250

type Iq native "IQ sample" {
  cpp "dsp::Iq" include "dsp/iq.h"
  rust "dsp::Iq"
}

enum#

An enumeration (data-types.yaml). Literals in order; = n when the encoding is not the position.

  • Keywords: enum
  • Set: the core
  • Where: top level
  • Syntax: enum Id { A, B = 4, C }
Property Value Meaning
literal-form object | name literal-form object: every literal is written {name: …} in Arche, even with no value (default: a bare name when it has none).
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
enum DriveMode { MANUAL, ASSISTED, AUTONOMOUS = 4 }

struct#

A structure (data-types.yaml). Fields are name: Type, optionally with unit, range, default; optional T is a field that may be absent (multiplicity 0..1). union Command { stop; move: MoveArgs; speed: float32 } holds one of its cases: a bare name has no payload, name: Type carries one. Arche gets a struct with a case field (the enum CommandCase) and one optional field per payload; archec gen embassy writes a Rust enum. exception NotFound { id: uint32 } is a struct an operation raises (IDL's exception): what it carries is its fields.

  • Keywords: struct · union · exception (old spelling: record)
  • Set: the core
  • Where: top level
  • Syntax: struct Id [extends Base] { name: [optional] Type [= default] [unit u] } | union Id { case; case: Type } | exception Id { name: Type }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
extends type name Base structure whose fields come first.
abstract bool Only ever specialised.
struct ImuSample {
  ts: uint64 unit ns
  accel: float32[3] unit m/s²
  gyro: float32[3] unit rad/s
}

field#

A field of a struct, message or memory record. The field keyword is optional: name: Type. = value is its default: a message built without the field (BRAKE_CMD(force=1.0)) carries it, and a struct field with no default of its own is built from its fields' defaults — so header: Header needs writing only when it differs.

  • Keywords: field
  • Set: the core
  • Where: inside struct, inside message, inside memory, inside field, inside icd
  • Syntax: name: Type [= default] ["Label"] [unit u] [range lo..hi] [bits "7:0"] — in a message: [at n] [bits n] [scale x] [offset x] [signed] [checksum crc8] [counter]
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
unit string Physical unit, written as it is (unit km/h, unit m/s², unit °C); one with a space is quoted.
range range Allowed range.
bits any In a memory record, the bitfield ("7:0"). In a message, how many bits the field takes on the wire (bits 12): the message then has a wire format.
at number The bit of the frame a message field starts at (wire format): its least significant bit little-endian, its most significant big-endian, as a DBC start bit counts. Default: right after the field before.
scale number A message field sent as a whole number: raw = round((value - offset) / scale), value = raw × scale + offset (wire format, DBC factor).
offset number What raw 0 stands for, with scale (wire format, DBC offset).
signed bool The raw value on the wire is two's complement (default: when the field's type is signed).
byte-order little | big This field's byte order on the wire, when not the message's: little (Intel) or big (Motorola).
checksum crc8 | xor8 An 8-bit checksum of the frame's other bytes, written by encode and checked by decode: crc8 (SAE J1850) or xor8.
counter bool A rolling counter: the generated C wiring counts it up at each send, wrapping at its bits.
size number Size in bytes: of a memory record's field, or of a message field on the wire (size 0: it travels out of band, as a chip-select line does, and costs no transfer time).
multiplicity any 1 (default), 0..1, 0..*, 1..4.
aggregation composition | aggregation | association composition | aggregation | association.
enable: uint8 bits "0:0"

const#

A project constant (variables.yaml): readable by name from every piece of behaviour code. Durations become ns.

  • Keywords: const (old spelling: constant)
  • Set: the core
  • Where: top level
  • Syntax: const NAME [: Type] = value [unit u]
Property Value Meaning
tbc bool To be confirmed: the value is not final.
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
unit string Unit shown beside the value.
const MAX_SPEED = 130 unit km/h
const WATCHDOG = 50ms

message#

A message of the project catalog (messages.yaml): a scalar payload (: float32), a struct (: ImuSample) or inline fields. A message with fields may say its exact wire format, as a CAN DBC does: byte-order and size on it, at, bits, scale, offset, signed, checksum, counter on its fields. The DBC, the ICD and the C, Rust, Go and Python codecs (archec gen --target wire) then put each field on its bits.

  • Keywords: message (old spelling: msg)
  • Set: the core
  • Where: top level
  • Syntax: message ID ["Name"] [: Type] { field: Type … }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
color color name A palette color id, or a literal "#rrggbb".
unit string Unit of a scalar payload.
period duration Nominal emission period.
byte-order little | big Gives the message a wire format (bit-exact, as a DBC says it): its fields' byte order, little (Intel, the default) or big (Motorola). See at, bits, scale on its fields.
size number Gives the message a wire format: the frame's length in bytes (default: as many as its fields reach). The bits no field takes are zeros.
kind metric kind metric: a metric — a value an algorithm publishes about its processing (a level, a count), read by others through pub-sub topics (topic "/chain/*/snr"). A package of metrics is a metric package.
message BRAKE_CMD "Brake command" {
  force: float32 unit N
  emergency: bool
}

Operational & requirements#

Who uses the system, what it is for, what it shall do, and the documents that say so.

actor#

An external entity that interacts with the system (actors.yaml).

  • Keywords: actor
  • Set: functional analysis & scenarios
  • Where: top level
  • Syntax: actor id "Name" { description "…" }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
actor driver "Driver" { description "Supervises the vehicle and can take over." }

mission#

A high-level goal the system must fulfil (missions.yaml).

  • Keywords: mission (old spelling: goal)
  • Set: functional analysis & scenarios
  • Where: top level
  • Syntax: mission id "Name" { involves [actors] }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
involves list of actor names Actors involved.
mission reach-destination "Reach the destination safely" { involves driver, passenger }

requirement#

A requirement. Top-level ones go to requirements.yaml; nested ones stay on their element.

  • Keywords: requirement (old spelling: req)
  • Set: the core
  • Where: top level, inside component, inside system, inside port, inside fn, inside link
  • Syntax: requirement ID "Name" { text "The system shall …" priority high … }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
text text The requirement statement ("shall"). LaTeX math allowed.
rationale text Why it exists.
math code A LaTeX formula that is part of the requirement.
priority low | medium | high | critical Priority.
complexity easy | medium | hard Rough complexity estimate (Arche writes Easy, Medium, Hard).
status draft | proposed | approved | implemented | verified | obsolete Lifecycle status.
category ident functional, performance, safety, interface…
method test | analysis | inspection | demonstration Verification method: test, analysis, inspection, demonstration (Arche verification).
asil any Its ISO 26262 level: QM, A … D — that of what it derives from (a safety goal, a requirement), or a decomposition of it written asil "B(D)", two or more decomposed requirements adding up to the parent's level on independent elements (archec cert).
dal A | B | C | D | E | a | b | c | d | e Its DO-178C design assurance level: A (catastrophic) … E — that of what it derives from.
ears string The requirement in EARS, about the parts of the model: when brakes receives BRAKE_CMD, brakes shall be in Braking within 50ms; while …, (state-driven), if … then (unwanted), none (ubiquitous). Checked against the parts, states and messages; it gives the text when there is none, a formal property for archec verify, and a test case (archec gen --target ears-tests).
formal string What the model checker proves of the state machines (archec verify, NuSMV): never brakes in Fault, always …, eventually …, adcu in Ready leads to adcu in Autonomous — parts by their path, in a state (or one inside it), and, or, not. eventually and leads to take a deadline, within 50ms: the monitors, archec replay and archec verify --conflicts check it; NuSMV, untimed, checks the property without it.
metric any The measured quantity that makes the requirement checkable (with limit). A message field (metric BRAKE_CMD.force) is measured in the real system's logs by archec replay.
limit any The bound the metric must respect: "<= 12000", "0..100", or a number, a maximum.
derives list of requirement names Parent requirements this one derives from.
refines list of element names Elements this one refines.
verified-by list of test plan names Test plans or cases that verify it.
satisfied-by list of element names Elements that satisfy it.
mission list of mission names Mission it serves.
document deliverable name The deliverable it is written in: the requirement is listed in that document (Documentation page).
origin text Where it comes from: a customer reference, a document, a parent system requirement (Arche source).
source text Old name of origin (source is where code lives, on a component or a function): still read, archec fmt --simplify renames it.
owner string Who answers for it.
issue string Its issue in the tracker (Jira, GitHub, GitLab): written by archec issues sync when it opens one for a failing case or an unverified requirement, or by hand to link one.
tbc bool To be confirmed: the value or the wording is not final.
tags list of tag names Tags from the tag catalog.
requirement REQ-BRK-001 "Emergency braking distance" {
  text "The vehicle shall stop within $d \le \frac{v^2}{2\mu g} + v\,t_r$."
  priority critical
  method test
  verified-by TP-AEB
}

verify#

How it is verified (IVV): at which level, with which means, by which procedure, and the test cases that do it.

  • Keywords: verify (old spelling: ivv)
  • Set: the core
  • Where: inside requirement, inside component, inside system, inside link
  • Syntax: verify { level integration; means "…"; procedure "…"; tests TC-1, TC-2 }
Property Value Meaning
level ident unit, integration, system, acceptance…
means any The means (bench, simulator, tool): a text, or the name of a means declared once.
procedure text What is done, and what is expected.
tests list of case names The test cases that verify it.
verify {
  level integration
  means "Integration bench" fr "Banc d'intégration"
  procedure "Type POINT 10 20: one OK line."
  tests TC-OPS-01
}

means#

A means of verification (a bench, a simulator, a tool) named once: verify { means bench } then says it by name, and Arche gets its text (and translations) as if written there.

  • Keywords: means
  • Set: functional analysis & scenarios
  • Where: top level
  • Syntax: means id "What it is" [en "…"]
means bench "Banc d'intégration KR260" en "KR260 integration bench"

defaults#

Values the requirements (or verify blocks…) of this file share, written once: each one that does not set a property takes it from here. At the top of a file it covers the whole file; inside a component or system, that block and what it contains, in this file. The nearest defaults wins, and an element's own value always does. The generated project is the same as if each element wrote them.

  • Keywords: defaults
  • Set: the core
  • Where: top level, inside component, inside system
  • Syntax: defaults requirement { status draft; method test; document SRS }
defaults requirement { status draft; method test; document SRS }

decision#

A design decision (an architecture decision record): the context, the options weighed, the one chosen and why, what it answers and what it affects. Written to Arche as a requirement of category decision — listed, linked and documented with the requirements — with answers as a derives trace and affects as satisfies traces from the elements that carry it out.

  • Keywords: decision (old spelling: adr)
  • Set: safety, security & design space
  • Where: top level
  • Syntax: decision ADR-n "Title" { status accepted; context "…"; option "A"; option "B"; chosen "A"; because "…"; answers REQ-…; affects element… }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
status proposed | accepted | rejected | superseded | deprecated Where it stands.
context text The situation that asks for a decision.
option text An option weighed (repeatable).
chosen text The option taken.
because text Why (Arche rationale).
consequences text What follows from it, good and bad.
answers list of requirement names The requirements it answers.
affects list of element names The elements that carry it out.
supersedes list of requirement names Earlier decisions it replaces.
date string When it was taken, YYYY-MM-DD.
owner string Who took it.
tags list of tag names Tags from the tag catalog.
decision ADR-007 "A lockstep core owns the brake path" {
  status accepted
  context "The emergency brake must survive a single core fault."
  option "Lockstep core"
  option "Two independent MCUs"
  chosen "Lockstep core"
  because "One part, diagnostics in hardware, no voting software."
  answers REQ-SAF-001
  affects Car.adcu.brakes_path
}

deliverable#

A document the project delivers — a specification, an ICD, a design (deliverables.yaml). The Documentation page assembles each one from the model: the requirements whose document names it and what it covers.

  • Keywords: deliverable
  • Set: functional analysis & scenarios
  • Where: top level
  • Syntax: deliverable ID "Name" { group "Software" kind specification status draft covers [REQ-1] }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
group string The heading it is listed under on the Documentation page.
kind ident What it is: specification, ICD, design… (free text, not the kinds catalog). A mock-up is shown, not read, and is left out of the Documentation page.
status planned | in-progress | draft | review | approved | delivered | blocked Where it stands.
progress number Percent done, when someone has said.
version string Its version.
due string Due date, YYYY-MM-DD.
owner string Who writes it.
file string The document itself: a project file or a URL (deliverables.yaml document).
covers list of element names What it has to answer: requirements (read in full in the document) or any other element.
notes text Free notes, shown under its fields.
deliverable SRS "Software Requirements Specification" {
  kind specification
  status draft
  group "Software"
  version "0.3"
}

Structure#

Systems (model files), components, their ports and the links between them, and the contracts the two ends of a link agree on.

system#

A model — one Arche model file. Its children are the root components of the canvas; links connect them.

  • Keywords: system (old spelling: model)
  • Set: the core
  • Where: top level
  • Syntax: system Id "Name" { component … ; part x: Def ; a.p -> b.q }
Property Value Meaning
on-init code What the part runs once it is made, before any part starts: a ```arche block (its variables set from its parameters, a buffer filled…). archec sim runs every part's on-init at 0, in the order of the parts, before their on-start.
on-start code What the part runs when it starts: after every part's on-init, before its state machine enters its first state and its fn main runs.
on-stop code What the part runs when it stops: archec sim runs it at the end of the run (--for), in the order of the parts.
on-release code What the part runs when it is released, after every part's on-stop: what on-init took, given back.
equation any Continuous behaviour, integrated by the simulation between events: equation der(level) = (inflow - out) / AREA (a state: d(level)/dt per second) or equation out = K * sqrt(level) (algebraic, evaluated in order). Names are its variables, its ports (a port's flow: what leaves an out arrives at the in ports it links to, flows into one port add up), constants, parameters, t (seconds) and the functions sqrt, exp, ln, log10, sin, cos, min, max, clamp, abs, pow… In a part with physical ports (a port type with a potential and a flow), an equation has no direction: v = p.v - n.v, c * der(v) = p.i, p.i + n.i = 0, der(x) anywhere in it, a port's variables written port.name; archec physics sorts and solves them.
solver duration The fixed step its equations are integrated at (RK4); 1ms when not said.
fmu string An FMU (FMI 2.0 for co-simulation, an .fmu or its folder) that is its continuous behaviour: copied into the project (fmus/) and stepped by the simulation at the solver step. Its inputs are the flows into its in ports, or its variables, of the same name; its outputs go to its out ports, or its variables (upper.level is upper_level). archec import plant.fmu writes the component.
solver-sample duration How often a solved value is written to the trace (10ms when not said).
budget any A budget: the allowance for a number added up over everything beneath (budget power 150W, budget mass 20kg), or a limit that holds everywhere (budget temperature max 85°C). The same-named numbers of the blocks inside are the draws (power 15W, or a var power). Written as Arche budget variables (rollup: sum | max); an overrun is reported with who draws what. Units are not converted: a draw in another unit is reported.
variants list of variant names The variants it belongs to (variant declarations); one that says nothing belongs to all.
source text Where it is implemented (repeatable): a file, a folder or a glob (src/planner/**, src/*.ts), from the main file's folder. Arche sources. archec recover writes them; archec conform checks the code's imports against the links with them (the most specific source names a file).
ref element name This component is another model's component, shown here: ref tile.tile (Arche ref: {file, component}).
hardware any Its hardware sheet, as a record: the board, the module, their part numbers, dimensions, power… (Arche hardware). os, ram, isa, freq and bitrate are added to it.
implementation any Where its code lives, as a record: language, path, module, type (Arche code; code "x.py" is the Python the simulation runs).
summary text On a component definition (a template): the line its catalog entry shows, apart from the component's own description (templates.yaml, the entry's description).
code text TypeScript or Python files holding this element's behaviour (ctrl.ts, ctrl.py). A fn with no ``` block takes the function of the same name; on-enter name (any code property) takes the function named; on_enter_State, on_exit_State, on_receive_port, on_write_MEM bind by themselves. Bodies are copied into the Arche project, with the top-level constants and helpers each one uses — a copy per function, so a top-level name cannot keep state between calls: keep it on the component (var n, self.n).
handlers typescript | python | arche The language its behaviour is written in, when not the project's: typescript, python or arche (the action language). docs/handlers.md.
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
tags list of tag names Tags from the tag catalog.
color color name A palette color id, or a literal "#rrggbb".
kind kind name Element kind from the kinds catalog (processor, device, bus…).
layer layer name Abstraction layer (operational, system, logical, physical…).
template ident Canvas shape template (box by default).
text-color color name Text color on the canvas.
at point Canvas position x, y (auto-laid-out when absent).
note-at point Where its note sits on the canvas, from the block: x, y.
size point Canvas size width, height.
image any A picture shown in the box on the canvas: a file path relative to this .arche file — copied into the project's images/ when it is built, so a component folder carries its own pictures — or the name of a file already in images/. , cover fills the box (default contain).
prop prop A free key/value property of the component.
purpose string What the component is FOR, one prose line each (Arche's main functions).
main string Old name of purpose (easy to confuse with fn main): still read, archec fmt --simplify renames it.
clock duration The component clock (period) used by wait clock.
mass any Mass budget contribution (any unit literal).
power any Power budget contribution.
shape any Its body's shape, for a physics engine (archec gen --target mujoco): box x, y, z (full sizes), sphere r, capsule or cylinder r, length (along z), at x, y, z where its centre is in the part's frame, rot how it is turned there (rot y 90deg, or roll, pitch, yaw rot 0, 90deg, 0).
joint any How the part moves relative to the part it is in (the world for a top part): hinge or slide along an axis (x, y, z, or [x, y, z]), ball, free, fixed (the default); at x, y, z where its frame is in its parent's, rot how it is turned there (roll, pitch, yaw about the parent's x, y, z: rot 0, 0, 90deg; or an axis and an angle: rot z 90deg; the axis is in the turned frame), range lo..hi its limits (rad or m), = value where it starts.
cost any Unit cost.
nature hardware | software Whether it is a piece of hardware (a target threads run on) or of software (runs on a thread). Set for you: by cores / core, and by a deployment.
cores number Number of identical cores, named cpu0 … cpuN-1 — makes the component a processor threads can be placed on.
core-type string What the cores are ("Cortex-A78").
os linux | linux-rt | qnx | rtos | freertos | zephyr | autosar-os | bare-metal What runs on the processor. On rtos and bare-metal a binary is one address space: its threads are RTOS tasks (tasks.yaml).
ram any Memory of the processor (16GiB): the budget process memory-limits are checked against.
isa ident Instruction set (arm64, riscv32…).
hal std | stm32 | rp | nrf | esp32 The Embassy HAL archec gen --target embassy builds against: std (a host process), stm32, rp, nrf, esp32. Default: std on Linux/QNX, else a Cortex-M skeleton that names the HAL to pick.
chip string The exact chip, as the HAL crate names it (stm32f446re, rp2040, nrf52840): the HAL feature archec gen enables.
freq any Core clock (2.2GHz).
bitrate any Bitrate of a kind bus component (2Mbps): the bus routes use, for transfer time and bus load.
ipc-latency duration Latency between two processes on this processor: the simulated latency of a link between them that states none.
runtime containerd | docker | podman | none The container runtime of a Linux processor: what a deployment's containers on it run under. archec gen --target containerd writes their images and compose file.
satisfies list of requirement names Requirements this element satisfies (emitted to traces.yaml).
verifies list of requirement names Requirements this element verifies.
refines list of element names Elements this one refines.
realizes list of element names Elements (one layer up) this one realizes.
allocated-to list of element names Elements this one is allocated to.
deploys list of element names Elements this one deploys.
traces list of element names Generic trace to other elements.
file string The model file it is written to (default: its id, car.yaml).
listed bool listed false: a model file the Models list does not offer (reached from the menu).
system Car "Autonomous car" {
  layer physical
  part lidar: Lidar
  part fusion: FusionEcu
  lidar.cloud -> fusion.lidar_in
}

component#

A component. At top level it is a reusable definition (templates.yaml); inside a system or component it is a child — part x: Def instantiates a definition, {…} overrides it. component LidarFront extends Lidar { … } is a definition built on another: it has the base's kind, ports, functions, variables, parameters and state machine, and what it writes adds to them or replaces them (by id); its state machine adds states and transitions to the base's.

  • Keywords: component · part (old spellings: block, subsystem, device, processor)
  • Set: the core
  • Where: top level, inside component, inside system
  • Syntax: component id ["Name"] [extends Base | : Definition] { kind …; port …; fn …; var …; memory …; states { … } }
Property Value Meaning
on-init code What the part runs once it is made, before any part starts: a ```arche block (its variables set from its parameters, a buffer filled…). archec sim runs every part's on-init at 0, in the order of the parts, before their on-start.
on-start code What the part runs when it starts: after every part's on-init, before its state machine enters its first state and its fn main runs.
on-stop code What the part runs when it stops: archec sim runs it at the end of the run (--for), in the order of the parts.
on-release code What the part runs when it is released, after every part's on-stop: what on-init took, given back.
equation any Continuous behaviour, integrated by the simulation between events: equation der(level) = (inflow - out) / AREA (a state: d(level)/dt per second) or equation out = K * sqrt(level) (algebraic, evaluated in order). Names are its variables, its ports (a port's flow: what leaves an out arrives at the in ports it links to, flows into one port add up), constants, parameters, t (seconds) and the functions sqrt, exp, ln, log10, sin, cos, min, max, clamp, abs, pow… In a part with physical ports (a port type with a potential and a flow), an equation has no direction: v = p.v - n.v, c * der(v) = p.i, p.i + n.i = 0, der(x) anywhere in it, a port's variables written port.name; archec physics sorts and solves them.
solver duration The fixed step its equations are integrated at (RK4); 1ms when not said.
fmu string An FMU (FMI 2.0 for co-simulation, an .fmu or its folder) that is its continuous behaviour: copied into the project (fmus/) and stepped by the simulation at the solver step. Its inputs are the flows into its in ports, or its variables, of the same name; its outputs go to its out ports, or its variables (upper.level is upper_level). archec import plant.fmu writes the component.
solver-sample duration How often a solved value is written to the trace (10ms when not said).
budget any A budget: the allowance for a number added up over everything beneath (budget power 150W, budget mass 20kg), or a limit that holds everywhere (budget temperature max 85°C). The same-named numbers of the blocks inside are the draws (power 15W, or a var power). Written as Arche budget variables (rollup: sum | max); an overrun is reported with who draws what. Units are not converted: a draw in another unit is reported.
variants list of variant names The variants it belongs to (variant declarations); one that says nothing belongs to all.
source text Where it is implemented (repeatable): a file, a folder or a glob (src/planner/**, src/*.ts), from the main file's folder. Arche sources. archec recover writes them; archec conform checks the code's imports against the links with them (the most specific source names a file).
ref element name This component is another model's component, shown here: ref tile.tile (Arche ref: {file, component}).
hardware any Its hardware sheet, as a record: the board, the module, their part numbers, dimensions, power… (Arche hardware). os, ram, isa, freq and bitrate are added to it.
implementation any Where its code lives, as a record: language, path, module, type (Arche code; code "x.py" is the Python the simulation runs).
summary text On a component definition (a template): the line its catalog entry shows, apart from the component's own description (templates.yaml, the entry's description).
code text TypeScript or Python files holding this element's behaviour (ctrl.ts, ctrl.py). A fn with no ``` block takes the function of the same name; on-enter name (any code property) takes the function named; on_enter_State, on_exit_State, on_receive_port, on_write_MEM bind by themselves. Bodies are copied into the Arche project, with the top-level constants and helpers each one uses — a copy per function, so a top-level name cannot keep state between calls: keep it on the component (var n, self.n).
handlers typescript | python | arche The language its behaviour is written in, when not the project's: typescript, python or arche (the action language). docs/handlers.md.
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
tags list of tag names Tags from the tag catalog.
color color name A palette color id, or a literal "#rrggbb".
kind kind name Element kind from the kinds catalog (processor, device, bus…).
layer layer name Abstraction layer (operational, system, logical, physical…).
template ident Canvas shape template (box by default).
text-color color name Text color on the canvas.
at point Canvas position x, y (auto-laid-out when absent).
note-at point Where its note sits on the canvas, from the block: x, y.
size point Canvas size width, height.
image any A picture shown in the box on the canvas: a file path relative to this .arche file — copied into the project's images/ when it is built, so a component folder carries its own pictures — or the name of a file already in images/. , cover fills the box (default contain).
prop prop A free key/value property of the component.
purpose string What the component is FOR, one prose line each (Arche's main functions).
main string Old name of purpose (easy to confuse with fn main): still read, archec fmt --simplify renames it.
clock duration The component clock (period) used by wait clock.
mass any Mass budget contribution (any unit literal).
power any Power budget contribution.
shape any Its body's shape, for a physics engine (archec gen --target mujoco): box x, y, z (full sizes), sphere r, capsule or cylinder r, length (along z), at x, y, z where its centre is in the part's frame, rot how it is turned there (rot y 90deg, or roll, pitch, yaw rot 0, 90deg, 0).
joint any How the part moves relative to the part it is in (the world for a top part): hinge or slide along an axis (x, y, z, or [x, y, z]), ball, free, fixed (the default); at x, y, z where its frame is in its parent's, rot how it is turned there (roll, pitch, yaw about the parent's x, y, z: rot 0, 0, 90deg; or an axis and an angle: rot z 90deg; the axis is in the turned frame), range lo..hi its limits (rad or m), = value where it starts.
cost any Unit cost.
nature hardware | software Whether it is a piece of hardware (a target threads run on) or of software (runs on a thread). Set for you: by cores / core, and by a deployment.
cores number Number of identical cores, named cpu0 … cpuN-1 — makes the component a processor threads can be placed on.
core-type string What the cores are ("Cortex-A78").
os linux | linux-rt | qnx | rtos | freertos | zephyr | autosar-os | bare-metal What runs on the processor. On rtos and bare-metal a binary is one address space: its threads are RTOS tasks (tasks.yaml).
ram any Memory of the processor (16GiB): the budget process memory-limits are checked against.
isa ident Instruction set (arm64, riscv32…).
hal std | stm32 | rp | nrf | esp32 The Embassy HAL archec gen --target embassy builds against: std (a host process), stm32, rp, nrf, esp32. Default: std on Linux/QNX, else a Cortex-M skeleton that names the HAL to pick.
chip string The exact chip, as the HAL crate names it (stm32f446re, rp2040, nrf52840): the HAL feature archec gen enables.
freq any Core clock (2.2GHz).
bitrate any Bitrate of a kind bus component (2Mbps): the bus routes use, for transfer time and bus load.
ipc-latency duration Latency between two processes on this processor: the simulated latency of a link between them that states none.
runtime containerd | docker | podman | none The container runtime of a Linux processor: what a deployment's containers on it run under. archec gen --target containerd writes their images and compose file.
satisfies list of requirement names Requirements this element satisfies (emitted to traces.yaml).
verifies list of requirement names Requirements this element verifies.
refines list of element names Elements this one refines.
realizes list of element names Elements (one layer up) this one realizes.
allocated-to list of element names Elements this one is allocated to.
deploys list of element names Elements this one deploys.
traces list of element names Generic trace to other elements.
asil any Its ISO 26262 integrity level: QM, A … D — at least that of the requirements it satisfies (asil-allocation).
dal A | B | C | D | E | a | b | c | d | e Its DO-178C design assurance level: A (catastrophic) … E — at least that of the requirements it satisfies.
vendor string Who makes it: product { vendor "Espressif" }. The BOM and the board store read it.
part-number string The maker's part (or order) number: product { part-number "NUCLEO-G474RE" }.
url string Its product page or datasheet: product { url "https://…" }.
driver string Its driver in the hardware store's Go code (lib/arche-hw-store/devices/go, adapted from Gobot): the constructor archec gen --target go calls, with the bus and address its links and port say.
tested-with refs On a kind board: the devices tried on it, which the Boards view offers first.
stereotype splitter | joiner | cylinder | macro-algo | do-not-use-sw-caches | pipeline | local-memory-only | disable-thresholds | bypass-config-threading What kind of algorithm it is (kind algorithm): splitter (one input, cut over several outputs), joiner (several inputs, one output), cylinder (its executions spread over several cores), macro-algo, do-not-use-sw-caches, pipeline (it supports pipelining), local-memory-only. On a part: disable-thresholds, bypass-config-threading.
after refs On a part of a composite algorithm: the parts it executes after, with no data between them (a precedence link).
working-memory any On an algorithm: the memory it works in, saved (kept from one execution to the next) or tmp (scratch, for one execution): working-memory saved 4KiB. A deployment place says the allocator.
component Lidar "Lidar" {
  purpose "Scans the scene"
  kind device
  out cloud: ethernet sends POINT_CLOUD
  in pwr: power
  fn scan ```arche
    send cloud POINT_CLOUD { points: 1 }
  ```
}

port#

A port: a link endpoint with a type and direction. sends lists catalog messages; = child.port delegates to a child. port id: T is a port that says no direction.

  • Keywords: port · in · out · inout
  • Set: the core
  • Where: inside component, inside system, inside system-function
  • Syntax: in|out|inout id: [requires|provides] type ["Name"] [sends MSG, …] { handler … } | port id = child.port
Property Value Meaning
provides list of port type names Interfaces this port provides (Arche provides): its component implements their operations. A port that provides its own type says it in the header: out api: provides BrakeApi.
requires list of port type names Interfaces this port requires: the other end of each link must provide them. A port that requires its own type says it in the header: out tx: requires panel-device.
side ident Which side of the box it is drawn on: left, right, top, bottom.
address number The address of the device behind the port on its bus: an I²C address (address 0x77). Two parts with the same address on one bus is an error. A part overrides its definition's (part env2: Bme280 { inout i2c { address 0x76 } }).
pins any The pins of the chip this port is wired to, by role: pins { tx GPIO2; rx GPIO3 } (CAN), pins { sck PIN_18; mosi PIN_19; miso PIN_16; cs PIN_17; int PIN_20 } (an SPI CAN controller). A board of the store says them; archec gen --target embassy drives the peripheral on them instead of its defaults. level 3.3V in it is the pins' I/O level, not a pin: a link between two levels is a warning (pin-level); archec pins shows each board's pin map.
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
color color name A palette color id, or a literal "#rrggbb".
sends list of message names Messages this port sends (out / inout).
unit string The unit of what flows on it (a port an equation names): both ends of a link must measure the same quantity.
receives list of message names Messages this port accepts (in / inout) — emitted as message handlers.
on-receive code Python run when a message arrives or a wire level changes. A ``` block, or the name of a def in a code .py file.
produces refs On an output: the errors its part makes by itself there — omission, commission, value, early, late. A failure-mode of the part that produces one rates it. archec derives each hazard's fault tree from them (archec safety).
contains refs On an input: the errors that stop there — a watchdog, a range check, a voter. all is every type.
turns any On an input: errors that go on as another type — turns value into omission (a check that drops a bad value makes it silent).
from refs On an output: the inputs whose errors reach it (by default, every input).
from-all refs On an output fed redundantly: an error leaves only when every one of these inputs carries it (an AND in the derived fault tree).
noise any On a sensor's out port: the standard deviation of the gaussian noise on what it reads, added to each float field of what it sends whose unit is that quantity (noise 0.002rad; noise 0.05m/s², 0.001rad/s for an IMU; a bare number, every float field). Then the field's range saturates it. Drawn from a seed, so a run repeats (archec sim --seed): in the simulator, the MuJoCo bridge, and the C of a sim build (-DARCHE_SIM) — production firmware adds none.
resolution any On a sensor's out port: the step its reading is rounded to (an ADC's LSB, an encoder's count), by quantity as noise.
gain number On an actuator's in port: its output per unit of command (1 by default). The command is first clamped to its field's range (MuJoCo's ctrlrange).
lag duration On an actuator's in port: the time constant of a first-order lag from its command to its output (a motor's current loop, a valve).
force-range range On an actuator's in port: where its output saturates, lo..hi (a motor's peak torque; MuJoCo's forcerange).
latency duration Added to the latency of its links: on a sensor's out port, how old its reading is when it is sent; on an actuator's in port, its dead time. MuJoCo's sensor and actuator delay.
bitrate any Bitrate in bit/s, e.g. 1Mbps or 1000000.
jitter duration Random jitter added to latency.
pattern fire-and-forget | request-reply | pub-sub | broadcast | service | dataflow Interaction pattern, on the sending side: fire-and-forget (default — the sender never waits), request-reply (a correlated reply, call/reply in Python), pub-sub (1 → N subscribers), broadcast (everyone on the medium), service (a call to whoever serves a service name, wherever it runs: no link), dataflow (a source streams vectors of samples to sinks, which run when enough have come: threshold).
buffer queue | sample | stream What the receiver keeps: queue (every message counts; simulated as link queue), sample (last value wins; simulated as a queue of 1 that drops the oldest), stream (a continuous flow).
depth number Length of a queue buffer (depth alone means buffer queue).
overflow drop-oldest | drop-newest | block When a queue is full: drop-oldest, drop-newest (default), or block (analysis only — the simulator drops the newest).
timeout duration How long a request-reply waits for its reply.
retries number How many times a request-reply is sent again after a timeout.
async bool A request-reply that does not block: the reply arrives at a handler.
deferred bool On a request-reply server: the reply is sent later, not when the handler returns (PYCOGEN's deferred response).
deadline duration The latest a message may arrive after it was sent.
stale-after duration A sample older than this is stale.
reliability reliable | best-effort reliable (every message arrives, possibly late) or best-effort (may be lost).
topic string The topic name of a pub-sub port (DDS / ROS 2 / MQTT). Its parts in braces are filled when the message is published, each from the field of that name (topic "/track/{id}"), or of the type written ({sensor: uint8}): PYCOGEN's sub-topics. A port with a topic is matched by its topic: a subscriber is an in port of the same topic, not a link (topic-wired).
service string The name of the service a port calls (an out) or serves (an in): a call reaches whoever serves that name, wherever it runs — no link, as PYCOGEN's services. Gives the port pattern service.
vector ident On a dataflow port: the type of one sample of the vectors it streams (PYCOGEN's DataVector).
header ident On a dataflow port: the type of the header each vector carries (DataVector[header]).
threshold number On a dataflow sink: how many samples must have come for it to run (the execution threshold).
push-threshold number On a dataflow source: how many samples it gathers before it pushes them to its sinks.
backpressure-threshold number On a dataflow sink: how many samples waiting make it ask its source to slow down (with backpressure on).
history number On a dataflow sink: how many samples of the vector before it each run sees again (a filter's overlap).
max-processing number On a dataflow sink: the most samples one run takes (the maximum processing size).
backpressure on | off On a dataflow port: on when the sink may make its source wait (backpressure-threshold), off (the default) when samples past its capacity are lost. Both ends of a link say the same.
transfer copy | share In buffering { }: copy (each consumer has its own buffer) or share (one buffer, shared).
on-deadline code What the part does instead, with a message it starts on later than the port's deadline after it was sent (a busy part, a slow link): its transitions, on-receive and handlers do not run for it. A ```arche block; simulated, and generated in C and in Rust (Embassy). Without it a late message is handled as any other.
satisfies list of requirement names Requirements this element satisfies (emitted to traces.yaml).
verifies list of requirement names Requirements this element verifies.
refines list of element names Elements this one refines.
realizes list of element names Elements (one layer up) this one realizes.
allocated-to list of element names Elements this one is allocated to.
deploys list of element names Elements this one deploys.
traces list of element names Generic trace to other elements.
max-size any In buffering { }, on a dataflow port: the largest buffer it holds, in bytes.
destroy after-transfer | after-processing In buffering { }: when a buffer is freed — after-transfer (once sent) or after-processing (once the consumer is done). share with after-transfer frees what another still reads: an error.
build any In buffering { }, on an output: allocate a new buffer, or reuse input — the buffer of an input of the same part, written in place.
allocator refs In buffering { }: the allocator its buffers come from (a deployment's allocator).
inout can0: can-fd "CAN" sends BRAKE_CMD receives WHEEL_SPEED

interface#

A contract a port takes part in: the messages that may cross it and the operations a provider implements (an Arche port type with messages and operations, in types.yaml). A port says provides I or requires I; a link whose one end requires what the other does not provide is reported, and so is a provider without a function for each operation. extends adds another interface's messages and operations. In a ```arche body, port.op(…) on a port that requires it calls the operation of the part at the other end of the link (docs/spec.md, Calling another part). As in IDL: an argument is in (the default), out or inout; oneway fn has no result and the caller does not wait; raises E1, E2 names the exceptions it may raise; attribute x: T (readonly attribute) is a value the provider holds.

  • Keywords: interface (old spelling: contract)
  • Set: the core
  • Where: top level
  • Syntax: interface Id "Name" { messages A, B; extends Base; [readonly] attribute x: T; [oneway] fn op([in|out|inout] arg: Type) [-> Type] [raises E, …] }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
color color name A palette color id, or a literal "#rrggbb".
messages list of message names The messages that may cross a port taking part in it.
extends list of port type names Interfaces whose messages and operations are this one's too.
source text Where it is implemented (repeatable): a file or a folder — a driver class, a trait. Arche sources.
handling http | message What an in port of this type answers: http (method+path) or message.
latency duration Transit latency (simulation timing).
bitrate any Bitrate in bit/s, e.g. 1Mbps or 1000000.
jitter duration Random jitter added to latency.
exception Busy { reason: string }

interface BrakeApi "Brake API" {
  messages BRAKE_CMD, BRAKE_STATUS
  readonly attribute applied: uint16
  fn apply(force: float32) -> bool raises Busy
  fn status(out force: float32)
  oneway fn reset()
}
component BrakeEcu {
  in can: can-fd provides BrakeApi
  fn apply(force: float32) -> bool ```arche
    return true
  ```
}

contract#

What a component (or an interface, or a port type) assumes of what it receives and guarantees of what it sends. A clause is a condition on a port's message fields or on a variable: cmd.force in 0..1000N, status.mode == 2, out.level <= 5V, conditions joined by and; always and eventually may open it, within 20ms [after cmd] may close it. At each link a.p -> b.q, what a guarantees on p must imply what b assumes on q: ranges and equalities on the same field, in the same unit (time units are converted, others are not), and deadlines (a guarantee within 20ms meets an assumption within 50ms). An unmet assumption is contract-unmet; one archec cannot decide is contract-unknown. On an interface or a port type, the clauses name the message (BRAKE_CMD.force) or the field, and hold on every port that takes part in it: guarantees where it sends, assumptions where it receives. Arche has no place for contracts: they stay in the model (and in archec sysml).

  • Keywords: contract
  • Set: the core
  • Where: inside component, inside system, inside interface, inside port-type
  • Syntax: contract { assume <cond> [and <cond>…]; guarantee [always|eventually] <cond> [within 20ms [after port]] } — cond: path in lo..hi | path ==|!=|<|<=|>|>= value | [not] path
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
assume any A condition this side relies on, to the end of the line: cmd.force in 0..1000N.
guarantee any A condition this side ensures, to the end of the line: status.applied within 20ms after cmd.
component BrakeEcu {
  in cmd: can-fd receives BRAKE_CMD
  out status: can-fd sends BRAKE_STATUS
  contract {
    assume cmd.force in 0..1000N
    guarantee status.applied within 20ms after cmd
  }
}

handler#

What an in port answers: an HTTP route (POST "/boot" -> boot) or a message (BRAKE_CMD -> apply).

  • Keywords: handler (old spelling: on)
  • Set: the core
  • Where: inside port
  • Syntax: handler METHOD "/path" -> fn | handler MESSAGE -> fn
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
body code Python body run for this message. A ``` block, or the name of a def in a code .py file.
handler POST "/api/v1/boot" -> boot
handler BRAKE_CMD -> apply_brake

A link between two ports (or components) in this scope. link is optional: a.p -> b.q works on its own line.

  • Keywords: link (old spelling: connect)
  • Set: the core
  • Where: inside component, inside system
  • Syntax: a.port -> b.port ["Name"] [{ latency 2ms }] — type and messages come from the ports; : porttypeandcarries M, … override them
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
color color name A palette color id, or a literal "#rrggbb".
carries list of message names Messages on the wire (ICD).
template ident Link template.
variants list of variant names The variants it belongs to (variant declarations); one that says nothing belongs to all.
prop prop A free key/value property of the component.
latency duration Transit latency (simulation timing).
bitrate any Bitrate in bit/s, e.g. 1Mbps or 1000000.
jitter duration Random jitter added to latency.
pattern fire-and-forget | request-reply | pub-sub | broadcast | service | dataflow Interaction pattern, on the sending side: fire-and-forget (default — the sender never waits), request-reply (a correlated reply, call/reply in Python), pub-sub (1 → N subscribers), broadcast (everyone on the medium), service (a call to whoever serves a service name, wherever it runs: no link), dataflow (a source streams vectors of samples to sinks, which run when enough have come: threshold).
buffer queue | sample | stream What the receiver keeps: queue (every message counts; simulated as link queue), sample (last value wins; simulated as a queue of 1 that drops the oldest), stream (a continuous flow).
depth number Length of a queue buffer (depth alone means buffer queue).
overflow drop-oldest | drop-newest | block When a queue is full: drop-oldest, drop-newest (default), or block (analysis only — the simulator drops the newest).
timeout duration How long a request-reply waits for its reply.
retries number How many times a request-reply is sent again after a timeout.
async bool A request-reply that does not block: the reply arrives at a handler.
deferred bool On a request-reply server: the reply is sent later, not when the handler returns (PYCOGEN's deferred response).
deadline duration The latest a message may arrive after it was sent.
stale-after duration A sample older than this is stale.
reliability reliable | best-effort reliable (every message arrives, possibly late) or best-effort (may be lost).
topic string The topic name of a pub-sub port (DDS / ROS 2 / MQTT). Its parts in braces are filled when the message is published, each from the field of that name (topic "/track/{id}"), or of the type written ({sensor: uint8}): PYCOGEN's sub-topics. A port with a topic is matched by its topic: a subscriber is an in port of the same topic, not a link (topic-wired).
service string The name of the service a port calls (an out) or serves (an in): a call reaches whoever serves that name, wherever it runs — no link, as PYCOGEN's services. Gives the port pattern service.
vector ident On a dataflow port: the type of one sample of the vectors it streams (PYCOGEN's DataVector).
header ident On a dataflow port: the type of the header each vector carries (DataVector[header]).
threshold number On a dataflow sink: how many samples must have come for it to run (the execution threshold).
push-threshold number On a dataflow source: how many samples it gathers before it pushes them to its sinks.
backpressure-threshold number On a dataflow sink: how many samples waiting make it ask its source to slow down (with backpressure on).
history number On a dataflow sink: how many samples of the vector before it each run sees again (a filter's overlap).
max-processing number On a dataflow sink: the most samples one run takes (the maximum processing size).
backpressure on | off On a dataflow port: on when the sink may make its source wait (backpressure-threshold), off (the default) when samples past its capacity are lost. Both ends of a link say the same.
transfer copy | share On a dataflow port: how a vector reaches the sink — copy (the default: the sink gets its own) or share (the same buffer, not copied).
bus ident The bus it takes in the simulation (Arche timing.bus), when no deployment route says so: bus spi_tx0.
lidar.cloud -> fusion.lidar_in "Point cloud" { latency 2ms }
link chassis adcu.can0 -> brakes.can "Brake CAN" { carries BRAKE_CMD }

icd#

A message of the link's interface control document, as the link carries it: its fields (name: Type). Without one, the ICD lists the messages the link carries.

  • Keywords: icd
  • Set: functional analysis & scenarios
  • Where: inside link
  • Syntax: icd id "Name" { field: Type; … }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
icd m1 "Pointing" { Azimuth: float64; Elevation: float64 }

canvas#

Where the blocks of a system (or a component definition) sit on the canvas, kept apart from its structure: one line per block, path at x, y [size w, h]. Dragging a block in the diagram writes here when the system has one. (Not to be confused with project { layout … }, the Arche app's left pane.) A block placed here takes no at of its own.

  • Keywords: canvas
  • Set: functional analysis & scenarios
  • Where: top level
  • Syntax: canvas System { part at x, y; part.child at x, y size w, h }
canvas Car {
  lidar at 40, 40
  adcu at 420, 200 size 260, 240
}

Behaviour#

Functions, data, memory maps and state machines, and the events a machine reacts to that are not messages. Code blocks are Python, as Arche runs it.

fn#

A function the component exposes. private fn hides it. main runs at t=0 as the component's thread.

  • Keywords: fn (old spellings: function, operation)
  • Set: the core
  • Where: inside component, inside system, inside interface
  • Syntax: fn name ["Label"] ([in|out|inout] arg: Type, …) [-> Type] [raises E, …] ```arche … ``` | fn name { calls …; ```arche … ``` } | oneway fn name(…) (```python for Python)
Property Value Meaning
source text Where it is implemented (repeatable): a file, a folder, a glob, path:line. Arche sources. For archec conform, its files are its component's.
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
tags list of tag names Tags from the tag catalog.
calls list of function names Functions it calls: own (f) or a direct child's (child.f).
in-states list of state names States it may be called in (default: all).
visibility public | private public (default) or private.
body code What it does: a arche block (the action language, checked and translated to Python, Rust, C and Go), a python block, or the name of a def in a code .py file.
wcet duration Worst-case execution time.
oneway bool An operation with no result, which the caller does not wait for: written before it, oneway fn notify(t: Track). It has no out or inout argument and no -> Type (oneway-result).
raises list of type names The exceptions an operation may raise, after its result: fn lookup(id: uint32) -> Track raises NotFound, Busy.
satisfies list of requirement names Requirements this element satisfies (emitted to traces.yaml).
verifies list of requirement names Requirements this element verifies.
refines list of element names Elements this one refines.
realizes list of element names Elements (one layer up) this one realizes.
allocated-to list of element names Elements this one is allocated to.
deploys list of element names Elements this one deploys.
traces list of element names Generic trace to other elements.
fn apply_brake(force: float32) ```arche
  pressure = force * GAIN
```

fn actuate(p: *Valve) -> bool {
  calls apply_brake
  ```arche
  return true
  ```
}

var#

A component variable; its value is the initial value. In an interface, attribute x: T is a value its provider holds and a client may read (and write, unless readonly attribute): IDL's attribute.

  • Keywords: var · attribute (old spellings: variable, let)
  • Set: the core
  • Where: inside component, inside system, inside interface
  • Syntax: var name[: Type[n]] [= value] [unit u] (no type: any type, written as none in Arche) | [readonly] attribute name: Type (in an interface)
Property Value Meaning
readonly bool An interface attribute a client reads and does not write: written before it, readonly attribute id: uint32.
tbc bool To be confirmed: the value is not final.
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
unit string Physical unit, written as it is (unit km/h, unit m/s², unit °C); one with a space is quoted.
range range Allowed range.
initial string Its starting value as Arche text, not as an expression: Arche starts it as this word (initial "BOOT"), or as a number or a list when the text reads as one. = "BOOT" is the Python string "BOOT", quotes included.
parameter configuration | internal In an algorithm (kind algorithm): a configuration parameter, set again when it is configured, or an internal one, its own. Its instantiation parameters are the component's parameters (component Filter(taps: int32 = 16)).
var retries: uint8 = 3
var thresholds: float32[4] = [0.1, 0.2, 0.4, 0.8]

memory#

A memory block / register map: size × count at an address, optionally a record of bitfields. On a processor, a memory with no type and no address is one of its memories: memory ddr { size 2GiB } (shared when other processors reach it, else local) — what a deployment's allocators are in.

  • Keywords: memory (old spellings: register, regs)
  • Set: the core
  • Where: inside component, inside system
  • Syntax: memory NAME @ 0x4000_0000 : uint32[8] rw { field: uint8 bits "7:0" }
Property Value Meaning
size any Bytes of one element, as written (instead of the size of its type or fields); on a processor's memory, its size (size 1GiB).
count number Number of elements, as written.
reset any Value at reset.
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
on-write code Python run when another component writes the block. A ``` block, or the name of a def in a code .py file.
shared bool Reachable from peers over a memory-mapped link.
memory CTRL @ 0x4000_0000 : uint32 rw {
  enable: uint8 bits "0:0"
  mode: uint8 bits "3:1"
}

states#

The component's state machine. It starts in its first state (initial X starts it elsewhere); A -> B on trig [guard] / action are transitions. The linter walks it: a state nothing reaches (unreachable-state), a state with no way out that is not pseudo final (deadlock-state; a state every state falls into, * -> Fault, is a safe state and may be one), a transition on a message no input port receives or with a guard that is false (dead-transition), one that an earlier unguarded one on the same trigger always beats (shadowed-transition), and two guarded ones whose guards may hold together (nondeterministic). archec gen --target uppaal (or nusmv) hands it to a model checker.

  • Keywords: states (old spellings: statemachine, machine)
  • Set: the core
  • Where: inside component, inside system
  • Syntax: states { state A; state B { state B1 }; A -> B on go [ready] / start() }
Property Value Meaning
initial state name State entered at start.
states {
  state Off "Powered off"
  state On { state Idle; state Driving }
  Off -> Idle on power_on
  Idle -> Driving on go [speed_ok] / engage()
}

state#

A state. Nest states for a statechart; pseudo makes a pseudo-state.

  • Keywords: state (old spelling: mode)
  • Set: the core
  • Where: inside states, inside state
  • Syntax: state id ["Name"] { on-enter ```arche …```; state child … }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
pseudo state | mode | initial | final | choice | fork | join | history | deep-history | terminate | entry | exit A pseudo-state: what it is instead of a state (pseudo initial, pseudo choice…).
kind state | mode | initial | final | choice | fork | join | history | deep-history | terminate | entry | exit Old name of pseudo (kind names a catalog kind elsewhere): still read, archec fmt --simplify renames it.
on-enter code What runs on entering: a arche block, a python block, or the name of a def in a code .py file.
on-exit code What runs on leaving: a arche block, a python block, or the name of a def in a code .py file.
do list of function names Functions active while in the state (doActivity) — or what it does, as text (do "CBIT of every tile").
entry-activity list of function names What it does on entering, as text (UML entry activity; repeatable). on-enter is the Python that does it.
exit-activity list of function names What it does on leaving, as text (UML exit activity; repeatable).
region any Orthogonal region name: a name, or a quoted label.
state Driving "Autonomous driving" {
  on-enter ```arche
    log "engaged"
  ```
}

transition#

A transition A -> B on trigger [guard] / action. With a deadline, a trigger the part starts on too late (a message later than that after it was sent, a timer later than that after it ran out) runs on-deadline instead of the transition — as Lingua Franca's deadlines.

  • Keywords: (no keyword)
  • Where: inside states, inside state
  • Syntax: A -> B [as id] [on trigger] [[guard] | when "guard"] [/ action] [{ deadline 10ms; on-deadline ```arche … ``` }]
Property Value Meaning
deadline duration The latest the part may start on the trigger after it was sent (or the timer ran out).
on-deadline code What runs instead of the transition when the trigger comes too late: a ```arche block. The guard is checked first; the transition is then not taken.
Idle -> Driving on go [speed_ok] / engage()

event#

An event a state machine reacts to that is not a message: Idle -> Run on dry_run. Declared, a trigger that names it is not a typo (the linter warns on a trigger that is neither a message, nor an event, nor a member of its part — unknown-trigger). It has no payload and is not sent on a port: the generated C machine takes it as one of its events (…_fire(self, CTRL_EV_DRY_RUN)); the simulation fires only messages, so a test or a panel raises it. Declared in a component, it is that component's.

  • Keywords: event
  • Set: functional analysis & scenarios
  • Where: top level, inside component, inside system
  • Syntax: event id ["Name"] [{ description "…" }]
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
event dry_run "Dry run" { description "The operator asks for a run without water." }

Deployment#

Where and in what the parts run: processors and their cores, containers, binaries, processes, threads and interrupts, the bus each link takes, latency chains, and the watchdogs a part keeps. A deployment is kept apart from the system it places, so the logical model does not change. How two parts talk — pattern and buffer on ports and links — is in the port and link properties; a deadline is on a port or a transition.

core#

A named core of a processor — a place a thread can run. cores N declares N identical ones (cpu0 …); core names a special one (an accelerator, a lockstep safety core).

  • Keywords: core
  • Set: deployment
  • Where: inside component
  • Syntax: core id ["Name"] { type "Cortex-R52" }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
color color name A palette color id, or a literal "#rrggbb".
type string What the core is.
core safety "Safety island" { type "Cortex-R52" }

deployment#

Where and in what the parts of a system run: binaries placed on processors, their processes and threads, and the bus each link takes. Kept apart from the system, like canvas, so one system can have several deployments. Emitted to processes.yaml, threads.yaml, tasks.yaml and containers.yaml, thread: on each part, and link timing.

  • Keywords: deployment
  • Set: deployment
  • Where: top level
  • Syntax: deployment Id ["Name"] { system Sys; platform Hw; binary b on cpu { process p { thread t { runs part } } }; container c "image" on cpu { binary … }; route a.p -> b.q over bus }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
system system name The system whose parts run (the logical model). Default: the only system.
platform system name The system of processors and buses they run on. Default: the same system.
packaging container | ros2 How its software ships. container: each process of a binary on a Linux processor runs in a container of its own on that processor, named after it — its core(s) the cpuset, its memory-limit the cgroup's, the host's network, sys_nice when a thread is real-time; a binary's threads with no process share one named after the binary. Containers written out stay as written; write one out to give it an image, a device or another network. ros2: each binary on a Linux processor is a ROS 2 (ament) package, an executable per process, a node per part it runs — its ports publishers, subscriptions and services, its periodic threads timers (archec gen --target ros2).
deployment Vehicle "L4 stack on the vehicle" {
  system Car
  platform CarHw
  binary adas "adas-stack" on adcu_soc {
    process driving {
      core cpu2
      thread drive { runs adcu; priority 80 }
    }
  }
  route adcu.can_brake -> brakes.can over chassis_can { priority 3 }
}

container#

An OCI container on a Linux processor whose runtime is containerd (or docker / podman): its image after the id, the cores and memory its cgroup allows, its network and the devices it sees. Its binaries run in it — they take its on. In the Arche project it is an entry of containers.yaml (processor, cpuset, memory-limit, network, image), and its processes and threads say container:. archec gen --target containerd writes a Containerfile per container and a compose file for nerdctl compose, --target k8s a Kubernetes Deployment pinned to its processor's node.

  • Keywords: container
  • Set: deployment
  • Where: inside deployment
  • Syntax: container id "registry/image:tag" on processor { core cpu2, cpu3; memory-limit 4GiB; network host; binary … }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
on refs The processor it runs on: a part of the platform with cores, os linux / linux-rt and runtime containerd.
core refs The cores its cgroup may use (cpuset). Default: every core of the processor.
memory-limit any Memory its cgroup may use (4GiB): its processes' memory-limits are checked against it, and the containers of a processor against its ram.
network host | bridge | none Its network: host shares the processor's (a link to another container costs the processor's ipc-latency), bridge gives it its own (a link leaving it costs its latency), none cuts it off. A container on a CAN bus needs host: a SocketCAN interface (can0) is a network interface.
latency duration On a bridge network: the latency of a link between it and another container of the processor (default: the processor's ipc-latency).
device any Host devices it sees ("/dev/ttyS1"): a binary in it whose link is routed over a serial bus needs one. Not CAN: SocketCAN is reached through network host.
capabilities refs Linux capabilities added to it: sys_nice lets its threads use policy fifo / rr; all runs it privileged.
prop prop An environment variable of the container: prop NAME = "value".
container perception "registry.local/adas/perception:1.4" on adcu_soc {
  core cpu2, cpu3
  memory-limit 4GiB
  network host
  capabilities sys_nice
  binary planner {
    language rust
    thread drive { runs adcu; priority 80; policy fifo }
  }
}

binary#

What is built and installed: one executable or firmware image, placed on a processor of the platform — or written inside a container, which it runs in and takes its on from. On an rtos / bare-metal processor it is one address space: write its threads directly in it (they become RTOS tasks).

  • Keywords: binary (old spellings: executable, firmware)
  • Set: deployment
  • Where: inside deployment, inside container
  • Syntax: binary id ["file name"] on processor { process … ; thread … }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
on refs The processor it runs on: a part of the platform with cores. Inside a container, leave it out: the container's.
language rust | c | cpp | python | ada | go Source language. go: archec gen --target go writes the binary's program, on a Linux board.
options any Options of a generator for this binary (or process) only, over the generator's own: options pycogen { orb "rteorb" }; options { … } is for whichever generator runs. The generator model gives each binary, and each process, its options resolved.
binary brake_fw "brake.elf" on brake_mcu {
  thread ctl { runs brakes; period 1ms; step regulate; priority 10 }
}

process#

An address space and fault boundary inside a binary (processes.yaml). Arche pins a process to one core: a thread with a core of its own is placed on it directly.

  • Keywords: process (old spelling: partition)
  • Set: deployment
  • Where: inside binary
  • Syntax: process id ["Name"] { core cpu0; memory-limit 512MiB; thread … }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
core refs The core the process runs on.
memory-limit any Memory it may use (512MiB), checked against the processor's ram.
options any Options of a generator for this binary (or process) only, over the generator's own: options pycogen { orb "rteorb" }; options { … } is for whichever generator runs. The generator model gives each binary, and each process, its options resolved.
process driving {
  core cpu2
  memory-limit 4GiB
  thread drive { runs adcu; priority 80 }
}

thread#

A unit of scheduling (threads.yaml, or tasks.yaml on an RTOS). It runs parts: their functions, handlers and state machine execute on it, one at a time. With a period it is time-triggered and calls step each period; without one it wakes on each message.

  • Keywords: thread (old spelling: task)
  • Set: deployment
  • Where: inside binary, inside process
  • Syntax: thread id ["Name"] { runs part, …; priority 50; period 10ms; step fn; core cpu1; deadline 8ms }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
runs refs The parts of the system (paths, adcu.npu) that execute on this thread. A function (planner.replan) is analysed on this thread, but Arche places whole parts.
priority number Higher is more urgent (SCHED_FIFO / FreeRTOS sense).
period duration Activation period: the thread is time-triggered.
step refs The function of one of its parts called each period (simulated with an rt.timer the compiler adds beside the part).
deadline duration Relative deadline (default: the period).
core refs The core it runs on — overrides its process's.
policy fifo | rr | edf Scheduling policy.
stack any Stack size (8KiB or a number of bytes).
wcet duration Worst-case execution time of one activation. Default: from the wcet of the functions it runs (its step and what it calls, else its costliest function).
queue number The size of its message queue: what waits for it while it runs (an active object's queue). Without it the queue is unbounded — on an RTOS, say it.
affinity refs The cores it may run on, when one core does not say it: the scheduler picks among them.
thread ctl "Brake control" { runs brakes; period 1ms; step regulate; priority 10 }

isr#

An interrupt service routine: a thread started by an interrupt, above every task of its core.

  • Keywords: isr (old spelling: interrupt)
  • Set: deployment
  • Where: inside binary, inside process
  • Syntax: isr id ["Name"] { runs part; irq 42; wcet 20us; min-interval 1ms }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
runs refs The parts (or one function) it runs.
irq number Interrupt number.
priority number Priority (default: one above every thread of its processor).
core refs The core it is taken on.
wcet duration Worst-case execution time.
min-interval duration Shortest time between two interrupts: its period in the analysis.
isr can_rx { runs brakes; irq 42; wcet 15us; min-interval 500us }

route#

The bus a link of the system takes when its two ends run on different processors. Simulated as a shared medium: one transfer at a time, by priority.

  • Keywords: route
  • Set: deployment
  • Where: inside deployment
  • Syntax: route a.port -> b.port over bus { priority 3; id 0x120 }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
over refs The bus: a component of the platform with kind bus, linked to both processors.
priority number Arbitration priority on the bus (higher wins).
id any Frame id on the bus (CAN id, VLAN…).
latency duration Transit latency (simulation timing).
route adcu.can_brake -> brakes.can over chassis_can { priority 3; id 0x120 }

chain#

A cause-effect chain through parts of the system, with a latency budget: the analysis adds up execution, waiting for periods and transport along it, and warns past the budget.

  • Keywords: chain
  • Set: deployment
  • Where: inside deployment
  • Syntax: chain id ["Name"] { through a, b, c; budget 100ms }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
through refs The parts the data goes through, in order.
budget duration The worst-case end-to-end latency allowed.
satisfies list of requirement names Requirements this element satisfies (emitted to traces.yaml).
chain obstacle "Obstacle to brake command" { through adcu, brakes; budget 100ms }

watchdog#

A timer the part restarts with kick <name> in a ```arche body: armed when the part starts, it runs out timeout after the last kick, and then on-timeout runs, once — until the next kick arms it again. As Lingua Franca's watchdogs. Simulated (archec sim), and generated in C (archec gen --target c) and in Rust (--target embassy: an embassy_time timer in the part's task); archec difftest compares the C with the simulator.

  • Keywords: watchdog
  • Set: deployment
  • Where: inside component, inside system
  • Syntax: watchdog name ["Label"] { timeout 50ms; on-timeout ```arche … ``` }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
timeout duration How long after the last kick (or the start) it runs out.
on-timeout code What runs when it runs out: a ```arche block (goto Fault, a send…).
watchdog link "Link lost" {
  timeout 50ms
  on-timeout ```arche
    goto Lost
  ```
}

allocator#

A memory allocator of a deployment: a pool of blocks of one size, a partition, a flipflop (two buffers in turn), a heap or static memory — in a processor's memory, inside another allocator (parent). In a process it is that process's own; in a binary or the deployment, shared makes it reachable from several. Parts, ports and algorithms take their memory from allocators through a place.

  • Keywords: allocator
  • Set: deployment
  • Where: inside deployment, inside binary, inside process
  • Syntax: allocator id ["Name"] { kind pool; block-size 4KiB; blocks 16; memory cpu.ddr; alignment 64; parent heap; shared; mapped }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
kind pool | partition | flipflop | heap | static How it hands out memory: pool (blocks of block-size), partition, flipflop, heap or static (one block).
block-size any The size of one block (4KiB): for a heap or static, all of it.
blocks number How many blocks it has (1 by default).
memory refs The memory of the processor it is in: a memory of the processor (memory cpu.ddr).
alignment number The alignment of each block, in bytes: a block is rounded up to it.
parent refs The allocator its memory comes from: its blocks × block-size must fit in one of the parent's blocks.
shared bool Reachable from other processes (private to its process by default).
mapped bool In memory mapped into each process that uses it (not on a local memory).
allocator frames "Frame buffers" { kind pool; block-size 4KiB; blocks 16; memory cpu.ddr }

place#

How one part (or one port) of the system executes and where its memory comes from, in a deployment. In a process, a part no thread runs is placed in it with no thread of its own: execution passive (it runs in its callers' threads) or protected (one caller at a time). memory hrt|lrt <allocator> is its memory for real-time and non-real-time data, memory saved|tmp <allocator> an algorithm's working memory, memory comm <allocator> its ports' (parameters marshalled into a queue); on a port, its buffering.

  • Keywords: place
  • Set: deployment
  • Where: inside deployment, inside binary, inside process
  • Syntax: place part[.port] { execution passive|protected|active; memory hrt pool; memory comm pool; buffering { … } }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
execution active | passive | protected active (it runs on a thread: write it in the thread's runs), passive (in its callers' threads) or protected (passive, one caller at a time). Default: active when a thread runs it, else passive.
memory any An allocator for one use: hrt (its real-time data), lrt (the rest), saved / tmp (an algorithm's working memory), comm (what its ports marshal). Repeatable: memory hrt frames.
max-size any In buffering { }, on a dataflow port: the largest buffer it holds, in bytes.
transfer copy | share In buffering { }: copy (each consumer has its own buffer) or share (one buffer, shared).
destroy after-transfer | after-processing In buffering { }: when a buffer is freed — after-transfer (once sent) or after-processing (once the consumer is done). share with after-transfer frees what another still reads: an error.
build any In buffering { }, on an output: allocate a new buffer, or reuse input — the buffer of an input of the same part, written in place.
allocator refs In buffering { }: the allocator its buffers come from (a deployment's allocator).
place split.input {
  memory comm frames
  buffering { max-size 4KiB; transfer copy; destroy after-processing; allocator frames }
}

Safety#

Hazards and safety goals (ISO 26262, written to safety.yaml as Arche reads them), failure modes and fault-tree gates (checked, and typeset in the LaTeX specification). The error model of the parts — produces, contains, turns, from on their ports — gives each hazard with error … on … a derived fault tree, and an FMEA row per error source (archec safety). STPA: control actions between the parts, their unsafe control actions of the four types, each traced to hazards and constraints, and the loss scenarios behind them.

hazard#

A hazardous event (ISO 26262-3): what the system does, in which situation, rated for severity (S0–S3), exposure (E0–E4) and controllability (C0–C3) — its ASIL is derived from the three, never written. goal names the safety goal that answers it. caused-by lists the failure modes and gates that lead to it (OR); with target (per hour) the probability of the top event is checked. Written to safety.yaml (hazards).

  • Keywords: hazard
  • Set: safety, security & design space
  • Where: top level
  • Syntax: hazard id "Label" { situation; effect; item }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
situation text The situation it happens in.
effect text What follows.
item string The item or function it comes from.
severity ident S0 none … S3 life-threatening.
exposure ident E0 incredible … E4 high probability.
controllability ident C0 controllable … C3 uncontrollable.
goal ident The safety goal that answers it.
tags refs Tags.
caused-by list of failure mode or gate names Failure modes and gates that lead to it (any one is enough).
target number The probability per hour the top event must stay under (checked against its fault tree).
error any Its top event in the error model: these errors reaching this port (or part) of a system — error omission on Car.brakes.cmd. archec derives its fault tree from the error model and checks it against caused-by.
hazard HZ-01 "Unintended braking" {
  situation "Motorway, 130 km/h"
  effect "Rear-end collision"
  severity S3
  exposure E4
  controllability C3
  goal SG-01
  caused-by FM-VALVE, G-PUMPS
  target 1e-8
}

safety-goal#

A safety goal: the top-level safety requirement answering hazards, with the state the system must reach and the time it has (FTTI). Its ASIL is the highest of its hazards'; one written lower is reported. Written to safety.yaml (safetyGoals).

  • Keywords: safety-goal
  • Set: safety, security & design space
  • Where: top level
  • Syntax: safety-goal id "Label" { safe-state; ftti; asil }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
safe-state text The state to reach or keep.
ftti duration Fault-tolerant time interval (100ms).
asil ident An ASIL decided elsewhere (else the highest of its hazards).
tags refs Tags.
safety-goal SG-01 "No braking without a demand" { safe-state "Brake pressure released"; ftti 100ms }

failure-mode#

A failure mode (FMEA): what fails, of which element, with what effect; rated for severity, occurrence and detection (1–10, their product is the RPN), with its probability per hour for fault trees. Checked and typeset in the LaTeX specification; Arche has no place for it yet.

  • Keywords: failure-mode
  • Set: safety, security & design space
  • Where: top level
  • Syntax: failure-mode Id "What fails" { of element; effect "…"; severity 9; occurrence 3; detection 4; probability 1e-7; causes HZ-…; mitigated-by … }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
of element name The element that fails.
effect text What follows.
severity number Severity of the effect, 1–10.
occurrence number How often it happens, 1–10.
detection number How hard it is to detect, 1–10 (10: undetectable).
probability number Probability per hour, for fault trees.
causes list of hazard names The hazards it leads to.
mitigated-by list of element names What answers it: requirements, elements.
produces refs The error it makes at the outputs of its element (of): omission, commission, value, early, late. It is then a basic event of the fault trees archec derives, with its probability.
inject string How a test makes it happen in the simulation: a fault, as fault writes it (freeze brakes, drop adcu.can_brake, stuck brakes.can force=0). at 20ms fault FM-VALVE then injects it.
failure-mode FM-VALVE "Brake valve stuck open" {
  of Car.brakes
  effect "Pressure on one wheel without a demand"
  severity 9
  occurrence 3
  detection 4
  probability 1e-7
  causes HZ-01
}

gate#

A fault-tree gate: all A, B fails when every one does (probability: the product), any A, B when one does. A hazard's caused-by and other gates name it.

  • Keywords: gate
  • Set: safety, security & design space
  • Where: top level
  • Syntax: gate Id "Event" { all A, B } | gate Id "Event" { any A, B }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
all list of failure mode or gate names Every one must fail (AND).
any list of failure mode or gate names One is enough (OR).
gate G-PUMPS "Both pumps fail" { all FM-PUMP-A, FM-PUMP-B }

control-action#

A control action (STPA): what a controller (from, a part) commands of the process it controls (to, a part), over the links of the architecture, and what it learns back (feedback). Its unsafe control actions (uca) are written in it, one for each of the four ways a control action can be unsafe — or the type is said not-applicable. Checked and typeset by archec (archec safety); Arche has no place for it yet.

  • Keywords: control-action
  • Set: safety, security & design space
  • Where: top level
  • Syntax: control-action Id "What" { from controller; to process; carries MSG; feedback MSG; not-applicable timing; uca … }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
from element name The controller: the part that gives it.
to element name The controlled process: the part that receives it. A link (or a way through parts) from from to to must exist.
carries list of message names The messages that carry it.
feedback list of message names What the controller learns back from the process: messages. A link back from to to from must exist.
not-applicable refs The UCA types considered and found not hazardous here (not-provided, provided, timing, duration); because says why.
because text Why the types said not-applicable are.
control-action CA-BRAKE "Apply the brakes" {
  from Car.adcu
  to Car.brakes
  carries BRAKE_CMD
  feedback WHEEL_SPEED
  not-applicable duration
  because "The brakes release on their own when the command stops."
  uca UCA-1 "No braking with an obstacle within the stopping distance" {
    type not-provided
    causes HZ-01
    constraint REQ-SAF-1
  }
}

uca#

An unsafe control action (STPA), in its control action: in which context giving it — or not — is hazardous. Of one of four types: not-provided (not given when needed), provided (given when it causes a hazard), timing (too early, too late, out of order), duration (stopped too soon, applied too long). It names the hazards it leads to (causes) and the constraint that prevents it (constraint, a requirement). Its loss scenarios — how it could happen — are written in it.

  • Keywords: uca
  • Set: safety, security & design space
  • Where: inside control-action
  • Syntax: uca Id "Unsafe when" { type not-provided; context "…"; causes HZ-…; constraint REQ-…; loss-scenario … }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
type not-provided | provided | timing | duration How the control action is unsafe: not-provided, provided (causing a hazard), timing (too early, too late, out of order), duration (stopped too soon, applied too long).
context text The situation that makes it unsafe.
causes list of hazard names The hazards it leads to.
constraint list of requirement names The constraints that prevent it: requirements (or safety goals).
uca UCA-1 "No braking with an obstacle within the stopping distance" {
  type not-provided
  context "Obstacle ahead, closer than the stopping distance"
  causes HZ-01
  constraint REQ-SAF-1
}

loss-scenario#

A loss scenario (STPA), in its unsafe control action: how it could come about — a controller that decides wrong, feedback that is missing or wrong, an actuator or a process that does not do what it is told — and the constraint that prevents it.

  • Keywords: loss-scenario
  • Set: safety, security & design space
  • Where: inside uca
  • Syntax: loss-scenario Id "How" { factor feedback; constraint REQ-… }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
factor controller | feedback | control-path | process Where it comes from: the controller (its algorithm or process model), the feedback, the control path (actuator, link), or the controlled process.
constraint list of requirement names The requirements that prevent it.
loss-scenario LS-1 "The radar misses the obstacle in heavy rain" {
  factor feedback
  constraint REQ-SAF-2
}

Cybersecurity#

A threat analysis and risk assessment (ISO/SAE 21434): assets, damage scenarios, threats and attack paths (rated, checked and typeset by archec — archec tara), and security goals (Arche requirements of category security).

asset#

A cybersecurity asset (ISO/SAE 21434 TARA): something worth protecting — a message, a function, a key, the data of a part — and the properties of it an attack can break. Checked and typeset by archec (archec tara); Arche has no place for it yet.

  • Keywords: asset
  • Set: safety, security & design space
  • Where: top level
  • Syntax: asset Id "What" { of element; properties integrity, availability }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
of element name The element (part, port, link, message…) it is.
properties refs The cybersecurity properties at stake.
tags list of tag names Tags.
asset AS-BRAKE "Brake commands" { of Car.adcu.can_brake; properties integrity, availability }

damage-scenario#

A damage scenario: what happens to the road user when a property of an asset is broken, rated by impact category (severe, major, moderate, negligible). Its impact is the worst of its ratings.

  • Keywords: damage-scenario
  • Set: safety, security & design space
  • Where: top level
  • Syntax: damage-scenario Id "What happens" { asset AS-…; property integrity; safety severe; financial …; operational …; privacy … }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
asset asset name The asset harmed.
property confidentiality | integrity | availability | authenticity | authorization | non-repudiation The property broken.
safety severe | major | moderate | negligible Impact on safety.
financial severe | major | moderate | negligible Financial impact.
operational severe | major | moderate | negligible Operational impact.
privacy severe | major | moderate | negligible Impact on privacy.
damage-scenario DS-BRAKE "Unintended full braking on the motorway" { asset AS-BRAKE; property integrity; safety severe; operational major }

threat#

A threat scenario: how an attacker brings a damage scenario about, through which entry point and from how far (vector). Its risk (1–5) comes from the impact of what it damages and the feasibility of its easiest attack path; its CAL from the impact and the vector. A risk of 4 or 5 needs a treatment, and reduce a security goal.

  • Keywords: threat
  • Set: safety, security & design space
  • Where: top level
  • Syntax: threat Id "How" { damages DS-…; stride spoofing; via element; vector network; treatment reduce; goal CSG-… }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
damages list of damage scenario names The damage scenarios it leads to.
stride spoofing | tampering | repudiation | disclosure | denial | elevation Its STRIDE category.
via element name The entry point: the element the attack goes through.
vector network | adjacent | local | physical From how far: network (remote), adjacent (radio, a shared bus), local (a port on the car), physical (hands on the part).
treatment reduce | avoid | share | retain What is done with the risk: reduce (security goals), avoid (remove what makes it possible), share (contract, insurance) or retain (a claim says why).
goal list of requirement names The security goals that reduce it.
claim text Why a retained or shared risk is acceptable.
threat TS-SPOOF "Spoofed brake commands on the chassis CAN" {
  damages DS-BRAKE
  stride spoofing
  via Car.chassis_can
  vector adjacent
  treatment reduce
  goal CSG-01
}

attack-path#

An attack path: the steps an attacker takes to carry a threat out, rated for attack potential (ISO/SAE 21434 annex G): elapsed time, expertise, knowledge of the item, window of opportunity and equipment. The points add up to the feasibility: 0–9 high, 10–13 medium, 14–19 low, 20 and more very low.

  • Keywords: attack-path
  • Set: safety, security & design space
  • Where: top level
  • Syntax: attack-path Id "How" { threat TS-…; step "…"; elapsed week; expertise proficient; knowledge restricted; window easy; equipment specialized }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
threat threat name The threat it carries out.
step text One step of the attack (repeatable).
elapsed day | week | month | half-year | beyond Time it takes: day (≤ 1 day), week, month, half-year (≤ 6 months), beyond.
expertise layman | proficient | expert | multiple-experts Expertise it needs.
knowledge public | restricted | confidential | strict Knowledge of the item it needs.
window unlimited | easy | moderate | difficult Window of opportunity.
equipment standard | specialized | bespoke | multiple-bespoke Equipment it needs.
attack-path AP-OBD "Frames injected from the diagnostic port" {
  threat TS-SPOOF
  step "Plug a CAN adapter into the OBD port"
  step "Replay a captured BRAKE_CMD"
  elapsed week
  expertise proficient
  knowledge restricted
  window moderate
  equipment standard
}

security-goal#

A cybersecurity goal: the top-level security requirement answering threats, with its CAL (cybersecurity assurance level, CAL1–CAL4; derived from its threats when not written, and one written lower is reported). Written to Arche as a requirement of category security.

  • Keywords: security-goal
  • Set: safety, security & design space
  • Where: top level
  • Syntax: security-goal Id "Title" { text "…"; answers TS-…; cal CAL3 }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
text text What shall hold.
answers list of threat names The threats it answers.
cal CAL1 | CAL2 | CAL3 | CAL4 Its CAL, when decided elsewhere.
tags list of tag names Tags.
security-goal CSG-01 "Brake commands are authentic" { text "The brake ECU shall act only on brake commands from the ADCU."; answers TS-SPOOF }

Design space#

The numbers a design is sized for, the alternative designs of a product line, the studies that compare them, and views by concern — written to parameters.yaml, variants.yaml, studies.yaml and viewpoints.yaml, as Arche reads them.

parameter#

A number the design is sized for: given (value, with choices or min/max for a knob) or derived (expr, a formula over other parameters and constants, recomputed when they move). Readable by name from behaviour code, as a constant; a variant can redefine it; a study sweeps it. Written to parameters.yaml (parameters).

  • Keywords: parameter (old spelling: param)
  • Set: safety, security & design space
  • Where: top level
  • Syntax: parameter id "Label" { value; expr; unit }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
value any Its value (a given parameter).
expr any Its formula (a derived parameter).
unit string Its unit.
choices any The values it may take.
min number Lowest value.
max number Highest value.
step number Step between values.
group string Section it is listed in.
tags refs Tags.
range range The values it may take, range lo..hi: its min and max.
tolerance any How far it may be from its value: tolerance 5%, tolerance 0.5 (in its own unit), tolerance 20us, or tolerance -2%, +5%. Written to Arche as its min/max, so a slider and a sweep keep to it; worst-case and monte-carlo studies vary it.
distribution uniform | normal How its value spreads within the tolerance, for monte-carlo: uniform (the default) or normal (the tolerance is 3σ).
parameter TILES_FITTED { value 4; choices 1, 2, 4, 8; group "Aperture" }
parameter ELEMENTS { expr ELEMENTS_PER_TILE * TILES_FITTED }

variant#

One design of a product line (a 150% model): components and links that say variants a, b belong only to those; everything else to all. set P = expr redefines a parameter in it; default is the one chosen when none is. Arche narrows the canvas, the simulation and the costs to the variant chosen. Written to variants.yaml (variants).

  • Keywords: variant
  • Set: safety, security & design space
  • Where: top level
  • Syntax: variant id "Label" { summary; default; set }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
summary text What it is, in a sentence.
default bool Chosen when no variant is.
set any Parameters it redefines: set NAME = expression (repeatable).
pros any What speaks for it.
cons any What speaks against it.
tags refs Tags.
variant cff "B · the fan-out computes" {
  default
  set LOAD_LANES = TILES_FITTED
  pros "One lane per tile."
  cons "Logic to design and verify."
}

study#

A trade study: parameters swept, variants compared, outputs read at each point. Arche evaluates the formulas, or with run simulates every point, and plots the result. Written to studies.yaml (studies).

  • Keywords: study (old spelling: trade-study)
  • Set: safety, security & design space
  • Where: top level
  • Syntax: study id "Label" { seed; sweep; across }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
seed number The seed of the random draws (monte-carlo, and Arche's random()): the same seed, the same draws.
sweep any A parameter and its values: sweep NAME = 1, 2, 4 (repeatable).
across refs Variants compared on the same axes.
run bool Simulate every point (else evaluate the formulas).
output any What is read at each point: output id = expression (repeatable).
chart-x ident The parameter on the x axis.
chart-y refs Outputs on the y axis.
log-y bool Logarithmic y axis.
worst-case any Sweep the toleranced parameters (all, or those named) at both ends of their tolerance: Arche evaluates every corner, and archec study gives each output's lowest and highest value.
monte-carlo number Draw this many random designs within the tolerances (distribution says how each spreads): archec study gives each output's mean, σ and percentiles. Arche shows the study at the nominal values.
study st-scale "Cost of another tile" {
  sweep TILES_FITTED = 1, 2, 4, 8
  across soft, cff
  output update_us = update
  chart-x TILES_FITTED
}

viewpoint#

A view by concern: whose question it answers, and which blocks answer it (by kind, layer, tag or text — fields ANDed, values ORed). Picked on the Arche canvas; nothing is removed from the model. Written as a query (include, exclude, depth), it is also a diagram of its own, laid out automatically: the blocks the query picks, at any depth, and the links between them. Written to viewpoints.yaml (viewpoints).

  • Keywords: viewpoint (old spelling: view)
  • Set: safety, security & design space
  • Where: top level
  • Syntax: viewpoint id "Label" { stakeholder; concern; kinds }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
stakeholder string Who asks.
concern text The question it answers.
kinds refs Blocks of these kinds.
layers refs Blocks in these layers.
tags refs Blocks with these tags.
text string Blocks whose name contains this.
of system name The system the view is drawn from (else the first one).
include any What the view shows, a query read in order with exclude: * (the top parts), a path (adcu, adcu.*, adcu.**), kind sensor, tag safety, layer physical, or the neighbours of a block — * -> adcu, adcu -> *, * <-> adcu, lidar -> adcu. Terms separated by commas. Drawn by archec diagram and the editor, laid out automatically.
exclude any What the view leaves out, with the terms of include; a -> b hides the links from a to b.
depth number How many links away * -> x and x -> * look (default 1).
viewpoint compute "Compute" {
  stakeholder "Software lead"
  concern "Which parts run software, and what they talk to."
  kinds processor
}

Scenarios, verification & traceability#

End-to-end cases, test plans, typed relationships and simulation runs.

scenario#

An end-to-end architecture scenario (scenarios.yaml): participants and ordered sequences of calls/messages.

  • Keywords: scenario
  • Set: functional analysis & scenarios
  • Where: top level
  • Syntax: scenario id "Name" { participant Sys.comp { role "…" }; sequence id "…" { a.p -> b.q : fn "note" } }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
verifies list of requirement names Requirements the scenario verifies (traces from it, in traces.yaml); a value may give its trace an id: verifies REQ-1 as t-7.
scenario emergency-stop "Emergency stop" {
  participant Car.lidar { role "Detects the obstacle" }
  participant Car.fusion
  sequence s1 "Detection to braking" {
    Car.lidar.cloud -> Car.fusion.lidar_in : POINT_CLOUD
    Car.fusion -> Car.fusion : plan "Private planning step"
  }
}

workflow#

A process (a workflow): who does what, in which order, with its branches. Its lanes are the blocks taking part — a person or a team is a block too — and each line is a hand-off (sales -> ops : provision "…") or an activity in one lane (sales: qualify "…"); alt { when "…" { … } when "…" { … } } (and loop, opt, par) branch it as in a sequence. in System lets lanes be written by their name. Written to Arche as a scenario (scenarios.yaml), with one sequence.

  • Keywords: workflow (old spelling: process)
  • Set: functional analysis & scenarios
  • Where: top level
  • Syntax: workflow id "Name" [in System] { lanes a, b; a: activity "…"; a -> b : handoff "…"; alt { when "…" { … } } }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
lanes list of element names The blocks taking part.
workflow onboarding "Onboard a customer" in Shop {
  lanes sales, ops
  sales: qualify "Qualify the lead"
  sales -> ops : provision "Ask for an account"
  ops: create "Create the account"
}

participant#

A component taking part in a scenario, by path System.comp.child.

  • Keywords: participant
  • Set: functional analysis & scenarios
  • Where: inside scenario
  • Syntax: participant System.comp [as alias] { role "…"; ports p, q }
Property Value Meaning
role string What it does in the scenario.
ports refs Ports the case exercises.
participant Car.fusion { role "Plans the stop"; ports lidar_in, can0 }

sequence#

An ordered list of steps from[.port] -> to[.port] [: fn|MESSAGE] ["note"].

  • Keywords: sequence
  • Set: functional analysis & scenarios
  • Where: inside scenario
  • Syntax: sequence id "Name" { a.p -> b.q : fn "note" }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
sequence boot "Boot" { Car.hmi -> Car.fusion : start }

alt#

A combined fragment of a sequence: alternatives (alt), a loop, an option, parallel parts. Its branches are when "condition" { steps }.

  • Keywords: alt · loop · opt · par · break · critical
  • Set: functional analysis & scenarios
  • Where: inside sequence, inside when
  • Syntax: alt { when "cond" { a -> b : f } when "else" { … } }
alt {
  when "table valide" en "table valid" { cff -> cff : main "lookup kept" }
  when "table absente" { cff -> cff : main "mapped = 0" }
}

when#

A branch of a fragment: its condition (or the loop's), and its steps.

  • Keywords: when
  • Set: functional analysis & scenarios
  • Where: inside alt
  • Syntax: when "condition" { a -> b : f; … }
when "toutes les SENSOR_PERIOD" { timer -> imu : read }

test-plan#

A test plan (testplans.yaml): cases of steps with do, wait and expect assertions.

  • Keywords: test-plan (old spellings: testplan, tests)
  • Set: the core
  • Where: top level
  • Syntax: test-plan ID "Name" { scenario s; case TC "…" { step "…" { do python…; wait 10ms; expect python… } } }
Property Value Meaning
file string The file it is written to (default testplans.yaml; Arche reads every testplans*.yaml).
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
scenario scenario name Scenario the plan exercises.
setup any Observer code run before every case: Python to the end of the line, or a ``` block.
check-sequence bool Check the run against the scenario sequence.
verifies list of requirement names Requirements verified by every case.
model system name System the plan runs on (default: the simulation model).
issue string Its issue in the tracker (Jira, GitHub, GitLab): written by archec issues sync when it opens one for a failing case or an unverified requirement, or by hand to link one.
test-plan TP-AEB "Automatic emergency braking" {
  verifies REQ-BRK-001
  case TC-AEB-01 "Obstacle at 30 m" {
    step "Obstacle appears" {
      do send(lidar.cloud, POINT_CLOUD(obstacle=30))
      expect within 100ms: received(brakes, "BRAKE_CMD") == 1
    }
  }
}

case#

A test case. Runs on a fresh simulation.

  • Keywords: case
  • Set: the core
  • Where: inside test-plan
  • Syntax: case ID "Name" { objective "…"; step … }
Property Value Meaning
setup code Python run before the case's steps.
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
objective text What the case shows.
preconditions text State before the case.
verifies list of requirement names Requirements this case verifies.
timeout duration Case timeout.
keyframe ident The keyframe of the system it starts from: its variables set before the case's steps (in its setup).
issue string Its issue in the tracker (Jira, GitHub, GitLab): written by archec issues sync when it opens one for a failing case or an unverified requirement, or by hand to link one.
case TC-01 "Nominal" { objective "Brakes engage" }

cases#

Test cases written as a table: one body, and a rows block with a line per case — id first, then a column per value. {column} anywhere in the label or the body (a text, code, an id) is that row's cell; a cell - leaves out every line that uses it; a cell holding a | is quoted. Each row is an ordinary case.

  • Keywords: cases
  • Set: the core
  • Where: inside test-plan
  • Syntax: cases "Speed {v}" { at 0ms do car.speed = {v}; within 1s expect car.state == "{s}"; rows { id | v | s; TC-1 | 10 | Slow; TC-2 | 30 | Fast } }
cases "Cruise at {v} m/s" {
  at 0ms do car.speed = {v}
  within 1s expect car.state == "{state}"
  rows {
    id      | v  | state
    TC-CR-1 | 10 | Slow
    TC-CR-2 | 30 | Fast
  }
}

step#

A test step: observer code, a wait, and assertions (within 30ms: …, eventually: …, never: …). do and expect take Python as it is, to the end of the line (or a ;, or the } of a one-line block); the linter checks the messages (MSG(…), sent("MSG")) and states (part.state == "S") it names. On a ui: do press hmi.engage, do change hmi.limit 80, expect hmi.mode.text == "…", expect hmi.engage.enabled, expect hmi.screen == Details — a case with one runs on the browser simulator (docs/ui.md).

  • Keywords: step
  • Set: the core
  • Where: inside case
  • Syntax: step ["Name"] { do python…; wait 10ms; expect python… }
Property Value Meaning
do any Observer code run at the start of the step: Python to the end of the line, or a ``` block.
wait duration Time to let pass after do.
expect any One assertion per expect: a Python condition, optionally within 30ms:, eventually: or never:.
fault any A fault injected at the start of the step (as a moment's fault).
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
step "Engage" {
  do send(hmi.btn, ENGAGE())
  wait 50ms
  expect car.ctrl.state == "Driving"
}

trace#

A typed relationship between two elements (traces.yaml).

  • Keywords: trace
  • Set: the core
  • Where: top level, inside component, inside system
  • Syntax: trace satisfies|verifies|derives|refines|allocates|realizes|involves|deploys|traces A -> B ["comment"]
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
trace allocates Car.fusion.plan -> Car.fusion.can0 "Planning drives the CAN bus"

simulation#

Behavioural simulation settings (simulation.yaml): which model runs, for how long, and the stimuli replayed. Without one, the first system is simulated.

  • Keywords: simulation
  • Set: functional analysis & scenarios
  • Where: top level
  • Syntax: simulation { model System; horizon 600ms; stimulus "…" { at 1ms; do python… } }
Property Value Meaning
model system name The system to simulate.
horizon duration Simulated duration.
seed number Random seed.
scenario scenario name Scenario the run is checked against.
panel ident Control panel shown beside the run.
lanes any Chronogram lanes (glob patterns).
deployment deployment name The deployment the run uses (threads, cores, buses). Default: the only one, when there is one.
simulation {
  model Car
  horizon 500ms
  seed 42
  lanes "adcu.*", "brakes.*"
  stimulus "Obstacle at 30 m" { at 20ms; do send(lidar.cloud, POINT_CLOUD(nearest=30.0)) }
}

stimulus#

Something done to the model at a given time during the run.

  • Keywords: stimulus
  • Set: functional analysis & scenarios
  • Where: inside simulation
  • Syntax: stimulus "Label" { at 1ms; do python… }
Property Value Meaning
at duration When.
do any Observer code: Python to the end of the line (or the }), or a ``` block.
stimulus "Driver engages" { at 5ms; do send(hmi.bus, ENGAGE_REQ(True)) }

keyframe#

A named start state of the system, as MuJoCo's keyframes: each line sets a part's variable (ctrl.gain = 2, a physical network's state c.v = 1V), the position of a part's joint (arm.upper.joint = 0.5, rad or m; a ball's turn wrist.joint = [0, 0, 30deg]; a free body's drone.joint.at = [0, 0, 2m] and drone.joint.rot; their speeds joint.vel, a free body's joint.spin) or the command an actuator starts with (arm.motor.cmd = 0.2, its in port). archec sim --keyframe, archec physics --keyframe (and --linearize --at <keyframe>) start from it, a test case with keyframe does, and archec gen --target mujoco writes it as a <key>.

  • Keywords: keyframe
  • Set: functional analysis & scenarios
  • Where: inside system
  • Syntax: keyframe name ["Label"] { part.var = value; part.joint = value; actuator.port = value }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
set any One line of it: path = value (written without set).
keyframe raised "Arm raised" {
  arm.upper.joint = 1.2
  arm.motor.cmd = 0.4
  ctrl.target = 1.2
}

Product UI#

The user interface of the product, in the component that owns the display: its device, its screens, laid out in rows and columns, and the elements bound to the model — what they show, what a press sends, where it goes. The words below are words only inside a ui { } (and its screens and layouts): elsewhere label, button or row are names like any other. docs/ui.md is the guide.

ui#

The user interface of the product, in the component that owns the display: the device (display 800x480, input touch, theme dark), and its screens — screen, dialog, overlay — laid out in row, column, grid and stack, with elements bound to the model (gauge speedo { value speed }, button stop "Stop" { on press send cmd STOP() }). The screens are the UI's states: it starts on the first (or initial), goto X and back move between them. archec checks what each element is bound to (ui-binding), what a press sends (ui-dead-press), the screens it cannot reach (ui-unreachable), the safety messages it shows (ui-safety), the fit on the display (ui-fit), contrast and labels (ui-a11y) and the translations (ui-text); archec ui prints the resolved model the previews and generators read. docs/ui.md.

  • Keywords: ui
  • Set: product ui
  • Where: inside component, inside system
  • Syntax: ui { display 800x480; input touch; theme dark; screen Id "Title" { row { gauge g { value v } } }; overlay Id { telltale … } }
Property Value Meaning
display any The display, WxH in pixels (display 800x480). Without it, the display of a part's hardware record (its board) is taken.
dpi number Pixels per inch of the display: with it, archec checks touch targets are at least 9 mm (ui-fit).
input touch | encoder | keys | pointer How it is used: touch (the default), encoder (a knob and a press), keys, pointer (a mouse).
theme any Its colors: dark or light, a theme constant (const ACME = { base: "dark", primary: "#00b0ff" }, then theme ACME) or the theme of a ui-kit the project uses (theme "acme/automotive-dark"); colors changes some.
density compact | normal | comfortable How much space things take: compact, normal, comfortable.
colors any The theme's colors changed, as a record: background, surface, foreground, muted, primary, danger, warning, ok ("#rrggbb" or a palette color). Contrast is checked (ui-a11y).
initial ident The screen it starts on (else the first).
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
satisfies list of requirement names Requirements this element satisfies (emitted to traces.yaml).
verifies list of requirement names Requirements this element verifies.
refines list of element names Elements this one refines.
realizes list of element names Elements (one layer up) this one realizes.
allocated-to list of element names Elements this one is allocated to.
deploys list of element names Elements this one deploys.
traces list of element names Generic trace to other elements.
ui {
  display 800x480
  input touch
  theme dark
  screen Driving "Driving" {
    row {
      gauge speedo { value speed; range 0..200; unit km/h }
      button stop "Stop" { style danger; on press send cmd STOP() }
    }
  }
  overlay Warnings {
    telltale brake "Brake fault" { on bus.BRAKE_FAULT; color amber }
  }
}

screen#

A screen: what the display shows at one time. The screens are the states of the UI: it starts on the first one (or the ui's initial), goto X and back move between them. Its children are laid out as a column.

  • Keywords: screen
  • Where: inside ui
  • Syntax: screen Id ["Title"] { on enter <action>; <elements and layouts> }
Property Value Meaning
description text What it is for, in prose.
on any on enter <action> when it is shown, on exit <action> when it is left.
padding number Space inside its edges, in pixels.
gap number Space between its children, in pixels.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
screen Driving "Driving" {
  row { gauge speedo { value speed } }
}

dialog#

A dialog: a screen shown over the current one until it is left (back, or goto).

  • Keywords: dialog
  • Where: inside ui
  • Syntax: dialog Id ["Title"] { on enter <action>; <elements and layouts> }
Property Value Meaning
description text What it is for, in prose.
on any on enter <action> when it is shown, on exit <action> when it is left.
padding number Space inside its edges, in pixels.
gap number Space between its children, in pixels.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
dialog Confirm "Stop the car?" {
  row {
    button yes "Stop" { style danger; on press send cmd STOP() }
    button no "Cancel" { on press back }
  }
}

overlay#

An overlay: shown over every screen, all the time — where telltales and warnings go, so no screen hides them.

  • Keywords: overlay
  • Where: inside ui
  • Syntax: overlay Id ["Title"] { on enter <action>; <elements and layouts> }
Property Value Meaning
description text What it is for, in prose.
on any on enter <action> when it is shown, on exit <action> when it is left.
padding number Space inside its edges, in pixels.
gap number Space between its children, in pixels.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
overlay Warnings {
  telltale brake "Brake fault" { on bus.BRAKE_FAULT; color amber }
}

row#

Its children side by side, left to right.

  • Keywords: row
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: row [id] { gap 8; align center; <elements and layouts> }
Property Value Meaning
gap number Space between its children, in pixels.
align start | center | end | stretch | between How its children line up across it: start, center, end, stretch; between spreads them along it.
padding number Space inside its edges, in pixels.
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
row { gap 8; button a "A"; button b "B" }

column#

Its children one under the other.

  • Keywords: column
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: column [id] { gap 8; align center; <elements and layouts> }
Property Value Meaning
gap number Space between its children, in pixels.
align start | center | end | stretch | between How its children line up across it: start, center, end, stretch; between spreads them along it.
padding number Space inside its edges, in pixels.
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
column { label a "A"; label b "B" }

grid#

Its children in a grid of columns columns, row by row.

  • Keywords: grid
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: grid [id] { gap 8; align center; <elements and layouts> }
Property Value Meaning
gap number Space between its children, in pixels.
align start | center | end | stretch | between How its children line up across it: start, center, end, stretch; between spreads them along it.
padding number Space inside its edges, in pixels.
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
columns number How many columns.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
grid { columns 3; button a "1"; button b "2"; button c "3" }

stack#

Its children on top of one another (a picture with a label over it).

  • Keywords: stack
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: stack [id] { gap 8; align center; <elements and layouts> }
Property Value Meaning
gap number Space between its children, in pixels.
align start | center | end | stretch | between How its children line up across it: start, center, end, stretch; between spreads them along it.
padding number Space inside its edges, in pixels.
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
stack { image map { src "map.png" }; label pos { text "${x}" } }

spacer#

Empty space that takes what is left in its row or column (grow).

  • Keywords: spacer
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: spacer [{ grow 1 }]
Property Value Meaning
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
row { label t "Title"; spacer; button x "Close" }

label#

Text, with values of the model in it (${expr}).

  • Keywords: label
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: label [id] ["text"] { text "…${expr}…"; size large; color c }
Property Value Meaning
text text What it says: a "string", with ${expr} for a value of the model ("Range ${bus.STATUS.range} m"); translated as the model's other texts ("…" en "…", or translations).
size small | normal | large | huge Its text size: small, normal, large, huge.
color any Its color: a palette color (amber, red, a color of the project) or "#rrggbb".
format string How a number is written: the decimals to keep (format "0.0").
icon ident An icon name, shown before its text (the target picks the glyph).
description text What it is for, in prose.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
align start | center | end | stretch How it lines up in its row or column: start, center, end, stretch.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
label mode { text "Mode ${adcu.state}" }

gauge#

A dial for a number: its value between the ends of its range.

  • Keywords: gauge
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: gauge [id] ["Title"] { value expr; range lo..hi; unit u }
Property Value Meaning
value any The number it shows.
range range The values it shows or takes, lo..hi (the bound value's declared range when not said).
unit any The unit it shows (the bound value's when not said); a value in another unit is reported (ui-binding).
format string How a number is written: the decimals to keep (format "0.0").
color any Its color: a palette color (amber, red, a color of the project) or "#rrggbb".
description text What it is for, in prose.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
align start | center | end | stretch How it lines up in its row or column: start, center, end, stretch.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
gauge speedo "Speed" { value speed; range 0..200; unit km/h }

bar#

A bar filled to its value between the ends of its range (a level, a charge).

  • Keywords: bar
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: bar [id] ["Title"] { value expr; range lo..hi }
Property Value Meaning
value any The number it shows.
range range The values it shows or takes, lo..hi (the bound value's declared range when not said).
unit any The unit it shows (the bound value's when not said); a value in another unit is reported (ui-binding).
format string How a number is written: the decimals to keep (format "0.0").
color any Its color: a palette color (amber, red, a color of the project) or "#rrggbb".
description text What it is for, in prose.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
align start | center | end | stretch How it lines up in its row or column: start, center, end, stretch.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
bar battery "Battery" { value bms.soc; range 0..100; unit % }

chart#

A value over time: the last window of it.

  • Keywords: chart
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: chart [id] ["Title"] { value expr; range lo..hi; window 10s }
Property Value Meaning
value any The number it plots.
range range The values it shows or takes, lo..hi (the bound value's declared range when not said).
unit any The unit it shows (the bound value's when not said); a value in another unit is reported (ui-binding).
color any Its color: a palette color (amber, red, a color of the project) or "#rrggbb".
window duration How much of the past it shows (10s when not said).
description text What it is for, in prose.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
align start | center | end | stretch How it lines up in its row or column: start, center, end, stretch.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
chart speed_trend "Speed" { value speed; window 30s }

telltale#

A warning light: lit while its on condition holds. Give it a text or an icon, not only a color (ui-a11y); a safety one belongs in an overlay (ui-safety).

  • Keywords: telltale
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: telltale [id] ["Text"] { on condition; color amber; icon i }
Property Value Meaning
on any What happens: on press <action> (a button), on change <action> (value is the new value), on long-press …; one line, or a { … } block of the action language — send port MSG(args), goto Screen, back, var = expr, if …, a function of the part. On a telltale, on <condition> lights it: a message (on bus.BRAKE_FAULT) or any bool expression.
color any Its color: a palette color (amber, red, a color of the project) or "#rrggbb".
icon ident An icon name, shown before its text (the target picks the glyph).
text text What it says: a "string", with ${expr} for a value of the model ("Range ${bus.STATUS.range} m"); translated as the model's other texts ("…" en "…", or translations).
description text What it is for, in prose.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
align start | center | end | stretch How it lines up in its row or column: start, center, end, stretch.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
telltale brake "Brake fault" { on bus.BRAKE_FAULT; color amber; icon brake }

image#

A picture: a file (relative to this file) or an icon.

  • Keywords: image
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: image [id] { src "file.png"; alt "…" }
Property Value Meaning
src string The picture: a file relative to this .arche file.
alt text What it shows, for who cannot see it.
icon ident An icon name, shown before its text (the target picks the glyph).
description text What it is for, in prose.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
align start | center | end | stretch How it lines up in its row or column: start, center, end, stretch.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
image logo { src "logo.png"; alt "Company logo" }

list#

A list of items: a bound array (each item's text) or fixed options.

  • Keywords: list
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: list [id] { value expr | options "a", "b"; on change … }
Property Value Meaning
value any The array it lists.
options any Fixed items, when not bound.
on any What happens: on press <action> (a button), on change <action> (value is the new value), on long-press …; one line, or a { … } block of the action language — send port MSG(args), goto Screen, back, var = expr, if …, a function of the part. On a telltale, on <condition> lights it: a message (on bus.BRAKE_FAULT) or any bool expression.
description text What it is for, in prose.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
align start | center | end | stretch How it lines up in its row or column: start, center, end, stretch.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
list modes { options "Sport", "Comfort", "Eco"; on change mode = value }

table#

Rows of a bound array of structs, a column per field (columns picks them).

  • Keywords: table
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: table [id] { value expr; columns a, b }
Property Value Meaning
value any The array of records it shows.
columns any The fields shown, in order (every field when not said).
description text What it is for, in prose.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
align start | center | end | stretch How it lines up in its row or column: start, center, end, stretch.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
table objects { value adcu.objects; columns id, x, y }

button#

A button: does its on press action.

  • Keywords: button
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: button [id] "Text" { on press <action>; enabled expr; style primary|danger|quiet }
Property Value Meaning
text text What it says: a "string", with ${expr} for a value of the model ("Range ${bus.STATUS.range} m"); translated as the model's other texts ("…" en "…", or translations).
on any What happens: on press <action> (a button), on change <action> (value is the new value), on long-press …; one line, or a { … } block of the action language — send port MSG(args), goto Screen, back, var = expr, if …, a function of the part. On a telltale, on <condition> lights it: a message (on bus.BRAKE_FAULT) or any bool expression.
enabled any It can be used only while this holds (an expression: enabled adcu.state == Ready).
style primary | danger | quiet How it stands out: primary (the main action), danger (stops or removes something), quiet (secondary).
icon ident An icon name, shown before its text (the target picks the glyph).
description text What it is for, in prose.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
align start | center | end | stretch How it lines up in its row or column: start, center, end, stretch.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
button engage "Engage" { enabled adcu.state == Ready; on press send cmd ENGAGE_REQ(true) }

toggle#

An on/off switch for a bool: shows value; a change sets it (a variable of the part) or does on change.

  • Keywords: toggle
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: toggle [id] "Text" { value var; on change <action> }
Property Value Meaning
value any The bool it shows (a variable of the part: a change sets it).
on any What happens: on press <action> (a button), on change <action> (value is the new value), on long-press …; one line, or a { … } block of the action language — send port MSG(args), goto Screen, back, var = expr, if …, a function of the part. On a telltale, on <condition> lights it: a message (on bus.BRAKE_FAULT) or any bool expression.
enabled any It can be used only while this holds (an expression: enabled adcu.state == Ready).
text text What it says: a "string", with ${expr} for a value of the model ("Range ${bus.STATUS.range} m"); translated as the model's other texts ("…" en "…", or translations).
description text What it is for, in prose.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
align start | center | end | stretch How it lines up in its row or column: start, center, end, stretch.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
toggle lights "Lights" { value lights }

slider#

A number picked along its range: shows value; a change sets it or does on change.

  • Keywords: slider
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: slider [id] "Text" { value var; range lo..hi; step s }
Property Value Meaning
value any The number it shows (a variable of the part: a change sets it).
range range The values it shows or takes, lo..hi (the bound value's declared range when not said).
unit any The unit it shows (the bound value's when not said); a value in another unit is reported (ui-binding).
step number The step it moves by.
on any What happens: on press <action> (a button), on change <action> (value is the new value), on long-press …; one line, or a { … } block of the action language — send port MSG(args), goto Screen, back, var = expr, if …, a function of the part. On a telltale, on <condition> lights it: a message (on bus.BRAKE_FAULT) or any bool expression.
enabled any It can be used only while this holds (an expression: enabled adcu.state == Ready).
text text What it says: a "string", with ${expr} for a value of the model ("Range ${bus.STATUS.range} m"); translated as the model's other texts ("…" en "…", or translations).
description text What it is for, in prose.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
align start | center | end | stretch How it lines up in its row or column: start, center, end, stretch.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
slider target "Target speed" { value target; range 0..130; step 5; unit km/h }

select#

One of options picked from a list.

  • Keywords: select
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: select [id] "Text" { options "a", "b"; value var; on change <action> }
Property Value Meaning
value any The option it shows (a variable of the part: a change sets it).
options any The choices: strings, or the values of an enum (options DriveMode).
on any What happens: on press <action> (a button), on change <action> (value is the new value), on long-press …; one line, or a { … } block of the action language — send port MSG(args), goto Screen, back, var = expr, if …, a function of the part. On a telltale, on <condition> lights it: a message (on bus.BRAKE_FAULT) or any bool expression.
enabled any It can be used only while this holds (an expression: enabled adcu.state == Ready).
text text What it says: a "string", with ${expr} for a value of the model ("Range ${bus.STATUS.range} m"); translated as the model's other texts ("…" en "…", or translations).
description text What it is for, in prose.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
align start | center | end | stretch How it lines up in its row or column: start, center, end, stretch.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
select drive "Drive mode" { options "Sport", "Comfort", "Eco"; on change send cmd MODE(value) }

input#

A text field.

  • Keywords: input
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: input [id] "Text" { value var; placeholder "…"; on change <action> }
Property Value Meaning
value any The text it shows (a variable of the part: a change sets it).
placeholder text What it says while empty.
on any What happens: on press <action> (a button), on change <action> (value is the new value), on long-press …; one line, or a { … } block of the action language — send port MSG(args), goto Screen, back, var = expr, if …, a function of the part. On a telltale, on <condition> lights it: a message (on bus.BRAKE_FAULT) or any bool expression.
enabled any It can be used only while this holds (an expression: enabled adcu.state == Ready).
text text What it says: a "string", with ${expr} for a value of the model ("Range ${bus.STATUS.range} m"); translated as the model's other texts ("…" en "…", or translations).
description text What it is for, in prose.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
align start | center | end | stretch How it lines up in its row or column: start, center, end, stretch.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
input name "Name" { value driver_name; placeholder "Driver" }

stepper#

A number changed by − and + by step, within range.

  • Keywords: stepper
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: stepper [id] "Text" { value var; range lo..hi; step s }
Property Value Meaning
value any The number it shows (a variable of the part: a change sets it).
range range The values it shows or takes, lo..hi (the bound value's declared range when not said).
unit any The unit it shows (the bound value's when not said); a value in another unit is reported (ui-binding).
step number The step of − and +.
on any What happens: on press <action> (a button), on change <action> (value is the new value), on long-press …; one line, or a { … } block of the action language — send port MSG(args), goto Screen, back, var = expr, if …, a function of the part. On a telltale, on <condition> lights it: a message (on bus.BRAKE_FAULT) or any bool expression.
enabled any It can be used only while this holds (an expression: enabled adcu.state == Ready).
text text What it says: a "string", with ${expr} for a value of the model ("Range ${bus.STATUS.range} m"); translated as the model's other texts ("…" en "…", or translations).
description text What it is for, in prose.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
align start | center | end | stretch How it lines up in its row or column: start, center, end, stretch.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
stepper volume "Volume" { value volume; range 0..10 }

custom#

An element of your own, written for each target: a ``` block per target (web, lvgl, slint, qml); value is handed to it.

  • Keywords: custom
  • Where: inside a screen, dialog or overlay, inside a row, column, grid or stack
  • Syntax: custom [id] { value expr; web ```html …```; lvgl ```c …``` }
Property Value Meaning
value any What it is handed.
on any What happens: on press <action> (a button), on change <action> (value is the new value), on long-press …; one line, or a { … } block of the action language — send port MSG(args), goto Screen, back, var = expr, if …, a function of the part. On a telltale, on <condition> lights it: a message (on bus.BRAKE_FAULT) or any bool expression.
web code Its HTML (the preview and the web target).
lvgl code Its C, for LVGL.
slint code Its Slint.
qml code Its QML.
description text What it is for, in prose.
visible any Shown only while this holds: an expression of the action language over the names the UI sees (visible adcu.state == Autonomous).
grow number Its share of the space left over in its row or column (0: its own size).
width number Its width in pixels, when not its own.
height number Its height in pixels, when not its own.
align start | center | end | stretch How it lines up in its row or column: start, center, end, stretch.
satisfies list of requirement names Requirements this screen or element satisfies: they trace to the UI (traces.yaml, and the UI model).
verifies list of requirement names Requirements this element verifies.
traces list of element names Generic trace to other elements.
custom radar {
  value adcu.objects
  web ```html
    <canvas id="radar"></canvas>
  ```
}

Functional analysis, operations & the app#

Use cases, system functions with their flows and chains, operating modes, and what the Arche app shows: stories, benchmarks, panels and apps, visuals, rules, data tables, units, property definitions, tag groups, plugins and its menu. Each is one entry of an Arche list file; what it holds beyond its properties is written with attr.

use-case#

A use case (a Capella capability): what an actor does with the system, and the actors, components, functions, chains and scenarios it involves. Written to usecases.yaml (use_cases).

  • Keywords: use-case (old spelling: usecase)
  • Set: functional analysis & scenarios
  • Where: top level
  • Syntax: use-case id "Label" { involves; extends; includes }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
involves list of element names Actors, components, functions, chains and scenarios it involves, by name (or as Arche addresses).
extends refs Use cases it extends.
includes refs Use cases it includes.
generalizes refs Use cases it generalizes.
file string The file it is written to.
use-case UC-POINT "Pointer le faisceau" en "Point the beam" {
  involves operator, kria, SF-POINT
  includes UC-STATUS
}

system-function#

A system function (functional analysis), allocated to the components that perform it. A function written inside another is one of its parts; its ports are in and out ports, with what they carry: out order "Order" sends command. Written to functional.yaml (systemFunctions).

  • Keywords: system-function
  • Set: functional analysis & scenarios
  • Where: top level, inside system-function
  • Syntax: system-function id "Label" { allocated; kind; states }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
allocated list of element names Components it is allocated to, by path (or as Arche addresses).
kind ident What kind of function it is, when not a plain one: duplicate, gather, route, select, split.
states refs The states and modes it is active in (Arche addresses).
file string The file it is written to.
system-function SF-POINT "Point the beam" {
  allocated kria.ps.app
  system-function SF-STEER "Steer the beam" {
    allocated kria.ps.app.tracking
    in target "Target" receives POINTING
  }
}

function-flow#

What flows from one system function to another (a Capella functional exchange): function-flow SF-A -> SF-B "attitude", its id in Arche after as: function-flow SF-A -> SF-B "attitude" as fl-att { name "attitude feed" }. An end may name the function's port: SF-A.out1 -> SF-B.in1; carries lists what it carries, when more than one thing. Written to functional.yaml (flows).

  • Keywords: function-flow
  • Set: functional analysis & scenarios
  • Where: top level
  • Syntax: function-flow A -> B "item"
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
name string Its name, when it is not what flows (Arche shows it on the arrow).
carries refs What it carries (messages, exchange items).
file string The file it is written to.
function-flow SF-SENSE -> SF-POINT "attitude" as fl-attitude

function-chain#

A functional chain: system functions in order, with a budget. Written to functional.yaml (chains).

  • Keywords: function-chain
  • Set: functional analysis & scenarios
  • Where: top level
  • Syntax: function-chain id "Label" { functions; budget }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
functions refs The functions, in order.
budget string Its time (or other) budget.
file string The file it is written to.
function-chain FC-TRACK "Tracking loop" {
  functions SF-SENSE, SF-ESTIMATE, SF-POINT
  budget "10 ms"
}

step#

A step of the chain: one system function (a function may take several steps), or a control node (kind and, kind or, kind iterate). Written to the steps of its funcchain.

  • Keywords: step
  • Set: functional analysis & scenarios
  • Where: inside function-chain
  • Syntax: step id { function; kind }
Property Value Meaning
function ident The system function.
kind ident A control node instead of a function: and, or, iterate.
step s1 { function SF-SENSE }

edge#

An edge between two steps of the chain, and the function flow it carries: edge s1 -> s2 : fl-1; when is the condition it is taken on. Written to the edges of its funcchain.

  • Keywords: edge
  • Set: functional analysis & scenarios
  • Where: inside function-chain
  • Syntax: edge A -> B : x
Property Value Meaning
when string The condition it is taken on (after a control node).
edge s1 -> s2 : fl-attitude

operating-mode#

An operating mode of the system (BOOT, STANDBY, TRACKING…): the components active in it (none named: all of them), the requirements that apply in it, and the modes it goes to — to STANDBY on PBIT_RESULT_OK when "every PBIT passed". Components and requirements are named as in the model (kria.ps, REQ-KAC-010) and written to Arche as its addresses. budget power 60W in a mode adds up the power of the components active in it, and the linter says when they draw more (checked by archec; Arche has no budget per mode). Written to modes.yaml (modes).

  • Keywords: operating-mode
  • Set: functional analysis & scenarios
  • Where: top level
  • Syntax: operating-mode id "Label" { initial; components; requirements }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
initial bool The mode it starts in.
components list of element names Components active in it (none: all).
requirements list of element names Requirements that apply in it.
to any A mode it goes to: to MODE on TRIGGER when "guard" (repeatable).
budget any What the components active in it may draw at most: budget power 60W (sum), budget temperature max 85°C.
operating-mode STANDBY "Standby" {
  initial
  components kria, terminal
  requirements REQ-KAC-001
  to TRACKING on TRACK [a service is offered]
  budget power 60W
}

story#

A story: a guided presentation of the model, step by step (Présentation › Récits). Written to stories.yaml (stories).

  • Keywords: story
  • Set: the arche app
  • Where: top level
  • Syntax: story id "Label" { summary; group }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
summary text What it tells.
group string Where it is listed.
story kacao-stack "La pile logicielle" en "The software stack" { summary "…"; group "Architecture" }

step#

A step of the story: its title and text, and what it shows (a view, a file, visuals, a diagram…). Written to the steps of its story.

  • Keywords: step
  • Set: the arche app
  • Where: inside story
  • Syntax: step id "Label" { text; note; view }
Property Value Meaning
text text What the step says.
note text A note beside it.
view ident The view it opens.
file string The file the view shows.
image string An image.
visuals any Visuals it shows.
hardware any Hardware it shows.
scope any What the view is narrowed to.
layout any How the page is laid out.
diagram any A diagram it shows.
diagram-notes any Notes on the diagram.
code any Code it shows.
benchmarks any Benchmarks it shows.
deliverables any Deliverables it shows.
component any The component it is about.
scenario any The scenario it plays.
nominal any The nominal case.
trace any A trace it follows.
animate refs The animations (or visuals) it plays, by id: animate v-handover — the same list as visuals, checked against the project's.
dwell duration How long it stays before the next step when the story plays by itself (archec story export, a screen in a lab): dwell 8s.
step s1 "Le PS démarre" en "The PS starts" { text "…"; view canvas; file "KRIA260.yaml" }

benchmark#

A benchmark: a measured quantity, its target, and its runs. Written to benchmarks.yaml (benchmarks).

  • Keywords: benchmark
  • Set: the arche app
  • Where: top level
  • Syntax: benchmark id "Label" { subject; unit; compare }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
subject string What is measured.
unit string Its unit.
compare string How a run compares with the target (<=, >=…).
target any The target value.
requirements refs Requirements it measures.
method text How it is measured.
benchmark BM-LOOP "Tracking loop period" { subject "cff"; unit us; compare "<="; target 1000; method "…" }

run#

A run of the benchmark: when, on which version, the value measured and the verdict. Written to the runs of its benchmark.

  • Keywords: run
  • Set: the arche app
  • Where: inside benchmark
  • Syntax: run id { at; version; value }
Property Value Meaning
at any When it ran.
version any The version measured.
value any The value measured.
result any Its verdict.
note text A note.
excluded any Left out of the trend.
subject any What was measured, when not the benchmark's subject.
run r1 { at "2026-09-12"; version "0.4.0"; value 820; result pass }

panel#

An operator panel (Simulation): a grid of widgets bound to the model. Written to panels.yaml (panels).

  • Keywords: panel
  • Set: the arche app
  • Where: top level
  • Syntax: panel id "Label" { columns; row-height; satisfies }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
columns number Columns of its grid.
row-height number Height of a grid row, in pixels.
satisfies refs Requirements it satisfies.
script text Python run with the panel.
panel operator "Opérateur" {
  columns 12
  row-height 40
  widget title "Pointage" { type text; at [0, 0, 12, 1] }
}

widget#

A widget of the panel: its type, its place on the grid (at col, row, width, height), and what it shows or does. Written to the widgets of its panel.

  • Keywords: widget
  • Set: the arche app
  • Where: inside panel
  • Syntax: widget id "Label" { type; at; bind }
Property Value Meaning
type ident text, slider, button, value, terminal, visual, chip, banner, section, segmented, dial, input, select, toggle, props, grid, led, table, log.
at any Its cell and span on the grid: [col, row, width, height].
bind string The model value it shows (app.state, cof.POINTING.azimuth).
action string What it does when used: Python run in the simulation.
min any Lowest value.
max any Highest value.
step any Step between values.
value any Its starting value.
unit string The unit shown.
port string The port it reads or writes.
message string The message it sends or shows.
visual string The visual it shows.
data any Its data.
states any The states it shows, and how.
http any The HTTP method it calls.
path string The path it calls.
api string The API it calls.
severity any Its severity (banners).
satisfies any Requirements it satisfies.
options any The choices offered.
rows any Rows (grids, tables).
cols any Columns (grids, tables).
show-values any Show the values (grids).
labels any Labels.
color any Its colour.
block any The block it shows, or its span.
widget az "Azimut" { type slider; at [0, 1, 4, 1]; min -60; max 60; step 0.5; unit °; value 20 }

app#

An application made of pages of panels. Written to panels.yaml (apps).

  • Keywords: app
  • Set: the arche app
  • Where: top level
  • Syntax: app id "Label" { nav; header; banners }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
nav string Navigation style.
header string Header text.
banners string Banners.
base-url string Base URL.
satisfies refs Requirements it satisfies.
app hmi "IHM" { nav "top"; header "KaCAO"; base-url "/hmi" }

page#

A page of the app: the panel it shows, or tabs of pages. Written to the pages of its app.

  • Keywords: page
  • Set: the arche app
  • Where: inside app
  • Syntax: page id "Label" { panel; reference; icon }
Property Value Meaning
panel ident The panel it shows.
reference string A picture of what it should look like.
icon any Its icon.
page main "Pointage" { panel hmi-pointing }

tab#

A tab of the page: a page of its own. Written to the tabs of its page.

  • Keywords: tab
  • Set: the arche app
  • Where: inside page
  • Syntax: tab id "Label" { panel; reference; icon }
Property Value Meaning
panel ident The panel it shows.
reference string A picture of what it should look like.
icon any Its icon.
tab registers "Registres" { panel hmi-registers }

visual#

An image or drawing of the project, shown in its gallery. Written to visuals.yaml (visuals).

  • Keywords: visual
  • Set: the arche app
  • Where: top level
  • Syntax: visual id "Label" { file; group; height }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
file string The image file.
group string Its group in the gallery.
height number Height on the page.
comment text What it shows, under it.
data-file string The data it is drawn from.
visual stack "Software stack" { file "visuals/stack.svg"; group "Architecture"; height 400 }

animation#

An animation for the slides of a story: one of Arche's animation templates (archec animation list), and the content it draws, written as properties — stops, states, scenes… whatever the template reads. A value may name the model: a component is written as its name, a constant or parameter as ${NAME} (the app works it out on the slide, so the picture follows the design), machine draws a state machine and scenario plays a scenario. A list of names where the template wants records (stops [kria.ps, kria.pl]) gets the rest of each record from the template's sample. Written to visuals.yaml (visuals), with the drawing in visuals/.html and its content in visuals/.yaml — what Arche's animation editor writes.

  • Keywords: animation
  • Set: the arche app
  • Where: top level
  • Syntax: animation id "Label" from template { data…; height; group; duration }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
template ident The drawing it starts from, one of Arche's animation templates (archec animation list). Usually written in the header: animation v-x "…" from flow.
code string A drawing of its own: an HTML file (relative to this file), run in the same sandboxed frame. With a template too, the template says what data the code reads.
machine ref A state machine to draw: the component that has it (or its states). Fills the template's states, edges and walk — the states in the order they are reached.
scenario ref A scenario to play: its participants become the lifelines (actors), its steps the arrows (messages). scenario boot.nominal picks one of its sequences.
data-file string Where its content is written in the project (visuals/<id>.yaml by default) — to keep the name an Arche project already had.
height number Height on the page, in pixels.
group string Its group in the gallery.
comment text What it shows, under it.
duration duration How long one cycle lasts — what an export (GIF, .pptx) records.
fps number Frames a second an export records (10 by default).
params refs Parameters (or metrics) whose values the drawing is sent as arche.params: a parameter changed in a story moves the picture.
tags refs Tags.
variants refs The variants it belongs to.
animation v-handover "From the PS to the PL" from flow {
  stops [terminal, kria.ps, kria.pl]
  speed 220
  height 160
  group "Stories"
}

rule#

A project rule, checked by Arche's Problems view and by the linter, with the same verdicts: applies says which elements (component, port, link, requirement), when narrows them, check must hold for each, and message is what a breach says ({name}, {parent.name}… read the element). when and check are written as they read — check parentKind in ["processor", "software"] — in the expression language of parameters and budgets; what each kind of element offers (kind, parentKind, ports, tracesTo.verifies, fromPort.type…) is listed in Arche's rules.md. Written to rules.yaml (rules).

  • Keywords: rule
  • Set: safety, security & design space
  • Where: top level
  • Syntax: rule id "Label" { applies; when; check }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
applies ident The elements it applies to: component, port, link or requirement.
when string Which of them it is about: a condition, written as is.
check string What must hold for each: a condition, written as is.
severity ident error, warning (the default) or info.
message string What it says when it fails; {field} reads the element.
disabled bool Kept, but not run.
rule sw-on-cpu "Software runs on a processor" {
  applies component
  when kind == "software"
  check parentKind in ["processor", "software"]
  severity error
  message "{name} is software but does not run on a processor"
}

table#

A data table (a CSV the model reads), with its key and columns. Written to tables.yaml (tables).

  • Keywords: table
  • Set: the arche app
  • Where: top level
  • Syntax: table id "Label" { data; key; complete }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
data string The data file.
key refs The columns that identify a row.
complete bool Every key combination has a row.
unique refs Columns whose values together are unique to a row (repeatable).
file string The file it is written to.
table rfic-map "RFIC mapping" { file "rfic-mapping.yaml"; data "rfic-map.csv"; key elem_row, elem_col; complete }

column#

A column of the table, and the values it may hold: a range, or a list of values. Written to the columns of its table.

  • Keywords: column
  • Set: the arche app
  • Where: inside table
  • Syntax: column id { min; max; values }
Property Value Meaning
min any Lowest value.
max any Highest value.
values any The values it may hold.
type ident Its type.
unit string Its unit.
column pol { values "H", "V" }

unit#

A unit: its quantity, and how it converts to its base unit. Written to units.yaml (units).

  • Keywords: unit
  • Set: project tooling
  • Where: top level
  • Syntax: unit id "Label" { quantity; base; factor }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
quantity any The quantity it measures: time, length, or a quoted one ("angular rate").
base ident The base unit.
factor any Value of one of it in the base unit.
offset any Offset to the base unit.
alias refs Other spellings (repeatable).
symbol string How it is shown (µs, °/s).
logarithmic bool A logarithmic unit (dB): it does not convert by a factor.
unit ms "millisecond" { quantity time; base s; factor 0.001; alias msec }

property#

A property components carry (prop x = …, mass, power, cost): its type, unit and allowed values, the kinds of component it applies to, the group it is filed under (props.group.x). Capella's property values (PVMT) as Arche checks them. Written to properties.yaml (properties).

  • Keywords: property
  • Set: project tooling
  • Where: top level
  • Syntax: property id "Label" { type; unit; values }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
type ident string, int, float, bool or enum.
unit string Its unit.
values any The values an enum may take.
kinds refs The kinds of component it applies to (none: all).
group ident The group it is filed under.
default any Its value when a component has none.
property mass "Mass" { type float; unit kg; kinds system }

tag-group#

A tag group (Arche tag type), with its color. When declared, the groups are these and only these. Written to tag-types.yaml (tagTypes).

  • Keywords: tag-group
  • Set: project tooling
  • Where: top level
  • Syntax: tag-group id "Label" { color }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
color any Its color.
tag-group status "Statut" { color "#c62828" }

plugin#

A plugin of the Arche app. Written to plugins.yaml (plugins).

  • Keywords: plugin
  • Set: the arche app
  • Where: top level
  • Syntax: plugin id "Label" { kind; script }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
kind ident Its kind.
script string Its script.
plugin bench "Bench" { kind script; script "plugins/bench.js" }

The Arche app's left menu (menu.yaml): entry items, nested for groups. Without it, archec writes one entry per page the project has.

  • Keywords: menu
  • Set: the arche app
  • Where: top level
  • Syntax: menu { entry id "Label" { icon i; view v; file "f.yaml"; entry … } }
menu {
  entry models "Models" {
    icon folder
    entry model-car "Car" { icon layers; view canvas; file "car.yaml" }
  }
}

entry#

A menu entry: a page (view, file) or a group of entries.

  • Keywords: entry
  • Set: the arche app
  • Where: inside menu, inside entry
  • Syntax: entry id "Label" { icon i; view v; file "f.yaml" }
Property Value Meaning
icon ident Its icon.
view ident The page it opens.
file string The file the page shows.
section string The section of the page it opens at (a deliverable, a chapter).
entry requirements "Exigences" en "Requirements" { icon list; view requirements; file "requirements.yaml" }

Built-in vocabulary#

Types: bool, uint8, int8, uint16, int16, uint32, int32, uint64, int64, float32, float64, char, byte, string, bytes, duration, timestamp, any, void. Arrays: T[n], T[].

Port types (no declaration needed): ethernet, spi, i2c, uart, can, usb, pcie, gpio, jtag, hdmi, rf, power, http, tcp, data, control, mil-std-1553, spacewire, lin, flexray, mipi, pwm, analog.

Trace kinds: satisfies, verifies, derives, refines, allocates, realizes, involves, deploys, traces.

Lint rules#

Code Severity What it finds
syntax error The text does not parse.
include-not-found error An include names a file that does not exist.
include-cycle warning Files include each other (each is still loaded once).
duplicate error Two declarations share an id in the same scope.
unresolved error A name does not resolve: type, message, definition, port, function, state, requirement…
unknown-property warning A property the element does not have (with a did-you-mean). It is still emitted.
property-value warning A property value of the wrong shape, or not one of the allowed values.
missing-unit / bad-unit warning A duration written without a time unit, or with a non-time unit.
out-of-range error A value does not fit its integer type, or a named type's range.
type-mismatch / array-length warning A value of the wrong kind for its type, or a list of the wrong length.
instance-cycle error A component definition contains an instance of itself.
unknown-porttype warning A port type that is neither built in nor declared.
direction warning sends on an in port, handlers on an out port.
link-direction warning A link from an input port or to an output port.
link-type-mismatch warning The two ends of a link have different port types.
carries-unsent warning A link carries a message its source port does not send.
handler-kind warning A message handler on a port type that answers HTTP (or nothing), or the reverse.
unhandled-message warning A link delivers a message the target port has no handler for.
allocation-target warning Something allocated to an element that is not a component.
no-body warning / info Python calls self.f() (or a handler names f) but f has no body, so Arche cannot run it.
missing-await warning A component function called from Python without await.
gpio-payload warning A GPIO port sending several messages or a non-bool message.
memory-overlap warning Two memory blocks of a component overlap in the address space.
memory-misaligned warning A memory block of 2-, 4- or 8-byte elements at an address that is not a multiple of its element: a bus reads or writes it in two accesses, not at once.
memory-field-width warning A field of a memory block past the bits of one element (bits "15:8" in a uint8 block), wider than its type holds, or with bits that do not read as "hi:lo".
memory-field-overlap warning Two fields of a memory block share a bit.
bus-address error Two devices with the same address on one I²C bus (a board's port, or a bus component): they would both answer.
watchdog-timeout error A watchdog with no timeout (an error: when would it run out?) or no on-timeout (a warning: nothing happens). watchdog w { timeout 50ms; on-timeout ```arche … ``` }, restarted by kick w.
unreachable-state warning A state no transition reaches from the initial state (initial X, else the first state); entering a composite state starts in its pseudo initial child (else its first), and a transition that never fires leads nowhere.
gen-stranded warning Your code in a USER CODE region of generated/ belongs to an element the model no longer has: it was renamed or removed without the rename tool, so archec gen will stop and ask where it goes (--move a=b, or --orphans ok). The editor's Rename and archec refactor rename record a rename in arche.renames.json and carry the code by themselves.
generator error A generator says what it is in more than one way (or in none: templates, script or command), names a folder or a file that does not exist, starts from a generator that does not exist (or goes round), asks for a version of the generator model this archec does not give, names in builtins or after something that is not a target, or is a hook (after) of templates. The same for an importer and an exporter (docs/plugins.md): an importer is a script or a command, without extensions it runs only by --importer (a warning), and neither has after.
generator-option warning A generator (an importer, an exporter, or a binary's or a process's options <generator> { … }) sets an option that it, or the one it starts from, does not declare (a warning); or a value of the wrong type, not among the option's values, or a default that does not fit its own type (errors).
animation-template error An animation names a template Arche does not have (archec animation list shows them), or has neither a template nor code "x.html".
animation-code error An animation's code names an HTML file that does not exist (relative to the file the animation is written in).
animation-data warning An animation gives its template data it does not read, of the wrong shape (a word where a number is wanted, a field its records do not have), a path that names nothing, or a formula over names that are not constants or parameters. Each key, its shape and its sample: archec animation show <template>.
animation-binding error / warning An animation's machine or scenario names nothing (or a component with no state machine, a scenario with no sequence) — an error; or its template draws nothing from it — a warning: states and lifecycle draw a state machine, sequence plays a scenario.
animation-param warning An animation's params names something that is not a constant or parameter, or its own drawing (code) reads a parameter params does not send — it would arrive undefined.
animation-library info This build of archec has no animation library (vendor/animations.js): templates are not checked and drawings are not written.
animation-visual warning A story step animates something that is not a visual or an animation of the project.
deadlock-state warning / hint A reachable state with no way out (nor from a state around it) that is not pseudo final: a warning when the machine has a final state (or the state is a pseudo-state), a hint when it has none (a latched fault is often meant). A state every state falls into (* -> Fault) is a safe state; a component whose code calls goto(…) is not checked.
unknown-trigger warning / hint A transition's trigger that is neither a message, nor an event, nor a port or member of its part, nor raised in any code of the model: nothing fires it, so the machine never takes it. A warning when it is close to a name that exists (a typo: on TEMPP for the message TEMP) or when the project declares its events (event dry_run); a hint otherwise. Declare it (event dry_run), or fix the name.
dead-transition warning A transition on a message no input port of the component receives, or with a guard that is false.
shadowed-transition warning A transition an earlier one from the same state, on the same trigger and with no guard, always beats.
nondeterministic hint Two transitions from the same state on the same trigger whose guards are not plainly exclusive (else, not g, x < 0 / x >= 0).
contract-unmet warning At a link, what the sending end guarantees does not imply what the receiving end assumes: a range wider than the one assumed, another value, a later deadline, another quantity.
contract-unknown hint An assumption archec cannot decide at a link: nothing guaranteed on the field, units it does not convert, a clause it cannot read.
pointer-value error A pointer (*T) initialised with something that is not an address: an integer, a constant or nil.
pointer-on-wire warning A pointer in a message payload: an address means nothing in the receiver's memory.
void-value error void used as a value type; only *void (an untyped pointer) holds something.
bad-trace-kind error A trace with an unknown relationship kind.
latex-unbalanced warning Unbalanced $ or braces in LaTeX math.
bad-color warning A color literal that is not #rgb / #rrggbb.
requirement-unverified info No test plan or case verifies the requirement.
requirement-unsatisfied info No element satisfies the requirement.
requirement-no-text / requirement-wording info / hint A requirement without text, or without "shall".
naming hint A name not in its case (archec vet): PascalCase for definitions, systems and types, snake_case for parts, ports, functions and variables, SCREAMING_CASE for messages, constants and literals; requirement ids upper-case.
unused hint A message, type or component definition never referenced.
implicit-catalog warning A kind, layer or tag used without being declared: declare it (it is added to its catalog as is; the quick fix declares it).
schema error Generated YAML that fails the Arche project schema (archec build, archec validate).
code-not-found error A code property names a .ts or .py file that does not exist.
handlers error A handlers property that names no handler language: typescript, python or arche (docs/handlers.md).
handlers-language warning Code in another language than the one Arche runs the project in (simulation.yaml behavioral.language, from the project's handlers): a python block in a TypeScript project, a .ts file in a Python one. `archec sim` runs it; Arche would read it as the project's language. Write it in that language or as arche (translated), or set handlers.
test-typescript warning Test code (a do, an expect, a setup) in a TypeScript project that archec cannot write as TypeScript: Arche runs a project's test code in its language, and archec translates the Python it is written in (and, True, abs, MSG(k=v), if c: …), but not a if c else b, in, //, a def, with, try, f-strings or lambdas. Write it so, or in a ```ts block.
code-language error A body in a block of a language that is not a handler language:ts, python or arche (a bare ``` is the project's language).
ts error / warning TypeScript that does not read (a syntax error, on its line), what has no JavaScript of its own (an enum, a namespace), an import of a module (Arche runs each body on its own: only "arche" and "./arche", the editor's), a top-level let (its value is not kept between calls), or top-level code that never runs.
ts-portable info / warning A TypeScript body outside the portable subset (docs/handlers.md, "Portable TypeScript"): the construct named (an array, a ternary, a method of a value, reply…) or what the action language's check says. The simulators run it; `archec gen --target c
convert-todo warning A statement archec convert-handlers could not translate, kept as a TODO(convert): comment with the original: write it in the new language, then remove the comment.
py-not-found error A code property names a function that no .py or .ts file in scope defines (quick fix: create it).
py-params error A function's parameters are not self and the fn's arguments, or name something Arche does not give that hook (in TypeScript, a message's hook takes self, msg).
py-duplicate error Two .py files in the same scope define the same name.
python error / warning A .py file that cannot be read (unclosed bracket or string), a top-level name changed by a function (the change is lost when the call ends), or top-level code that never runs.
py-shadowed warning A ``` block where the component's .py file also has the def of the same name: the block wins.
py-unused warning A def of a .py file the model does not use (neither named, bound by its name, nor called).
alias-keyword warning An old spelling of a keyword or a property (msg, porttype, unit "m/s"), or a word written in its other meaning (mode for a state: mode is for operating modes). The message says what to write: Write \state` (…). Read until 0.12; archec fmt` writes the standard one.
array-length warning An array value with another number of items than its type says.
asil-inherit warning A requirement that derives from one with an ASIL (a safety goal, a requirement) and has a lower one that is not a decomposition asil "B(D)", or none written (info).
dal-inherit warning A requirement that derives from one with a DO-178C DAL and has a lower one, or none written (info).
asil-decomposition warning Decomposed requirements (asil "B(D)") of one parent that do not add up to its ASIL (ISO 26262-9: D = C+A = B+B = D+QM, C = B+A = C+QM, B = A+A = B+QM), or a decomposition of one requirement alone.
asil-independence warning Two requirements that decompose the same parent and are satisfied by the same element: a decomposition needs independent elements.
asil-allocation warning An element written with a lower ASIL than a requirement it satisfies.
dal-allocation warning An element written with a lower DAL than a requirement it satisfies.
asil-too-low warning A safety goal written with a lower ASIL than its hazard needs (from severity, exposure and controllability).
bad-endpoint error A link end that is neither a port nor a component.
bad-place error A canvas line that places something other than a block.
view-empty warning A term of a view's query (include, exclude) that matches nothing in its system, or a view that shows nothing: a block renamed or moved, a kind or tag no block has.
view-query error A term of a view's query that cannot be read: *, a path (adcu, adcu.*, adcu.**), kind k, tag t, layer l, or a -> b / a <-> b with those; depth a whole number.
bad-unit warning A duration written with a unit that is not a time unit.
binary-target error A binary that runs on no processor (on …).
container-binary-on error A binary inside a container that also says on: it runs on the container's processor.
container-cpuset error A thread of a container placed on a core outside the container's core list (its cpuset).
container-can warning A container whose link goes over a CAN bus without network host: a SocketCAN interface is a network interface, not a device.
container-device warning A container whose link goes over a bus other than CAN (a serial line…) while it sees no host device (device "/dev/…").
container-empty warning A container that runs no binary of the model.
container-host error A container on a processor that is not Linux, or has no container runtime.
container-image warning A container that names no image after its id.
container-network error A link leaving a container that has network none.
container-rt warning A policy fifo / rr thread in a container without capabilities sys_nice.
board-pin warning A pin in pins { … } on a board (or a part of one) that its chip does not name so, or a role archec does not read; the nearest pin is offered as a fix.
pin-function warning A pin its chip cannot use for that role: the RP2040's fixed functions (UART TX on GPIO 0, 4, 8…; one port's pins on one peripheral), an ESP32's input-only pins (34–39) as an output, a pin wired to the module's flash.
pin-conflict warning One pin used by two ports of a board (those the system links, or whose pins a part writes), or by two roles of one port.
pin-pair warning A link whose ends' pins do not pair: a tx with no rx at the other end (SPI and I2C: the same role), or a CAN controller on a bus with only one of tx and rx.
pin-level warning A link between two ports whose pins { level … } differ (3.3V and 5V): a level shifter goes between them.
block-not-simulated hint A blocking queue: the simulator keeps the message and marks where the sender would wait, but the sender is not stopped.
budget-on-system info A budget on a system: archec checks it, Arche holds budgets on components.
budget-over warning What the parts beneath draw adds up to more than the budget.
budget-unit warning A draw in another unit than its budget: it is not counted (nothing is converted).
bus-load warning A bus loaded above 70 %: arbitration delays grow fast.
bus-unreachable error A route over a bus a processor is not linked to.
cal-too-low warning A security goal written with a lower CAL than its threats need.
canvas hint A canvas line to write differently (a block placed twice, a size without a place).
chain-gap warning A latency chain with two steps no link joins.
chain-incomplete hint A latency chain whose duration cannot be bounded (a step with no known cost).
arche-body hint A Python body that says only what the action language says (archec vet): written as a ```arche body, archec checks it and translates it to C, Rust and Go. The quick fix converts it.
code-in-model hint A long Python block in a model file (archec vet): it reads better in a .py file beside it.
comm-property warning A delivery property (pattern, buffer, depth…) where it means nothing.
core-override hint A thread placed on a core outside its process: Arche pins a process to one core.
dangling-ref warning An Arche address written as a string that names nothing of the project.
deadline warning A thread whose worst-case response time is above its deadline.
deadline-handler warning An on-deadline with no deadline (it never runs), or a transition's deadline with no on-deadline (past it, the transition is only dropped). A port or a transition with both: a trigger the part starts on later than the deadline after it was sent runs on-deadline instead.
decision-incomplete warning An accepted decision that does not say what was chosen or why.
decision-option warning A decision whose choice is not one of the options weighed.
declaration-set hint A declaration of the Arche app outside app/*.arche (archec vet).
defaults hint A property every requirement of the file gives alike: written once in defaults.
defaults-child warning A declaration inside defaults: a defaults block gives property values only.
delegate-conflict error A delegated port with another type than the port it stands for.
deployment-choice warning Several deployments and none named: the Arche project gets the first.
deployment-system error A deployment that does not say which system it places (system …).
double-allocation error A part or a function on two threads.
duplicate-trace hint The same trace written twice.
duration-math hint Arithmetic on durations that could be written as one value.
e2e-budget warning A latency chain longer than its budget.
emit warning Something the emitter could not write to Arche (an address it could not resolve).
empty-system hint A system with no parts yet.
equation error An equation not written der(x) = … or y = …, or a name in it the component does not have.
error-unreached info A hazard whose error … on … no error source reaches: nothing in the model produces it, or it is contained on the way.
extends hint A definition built on another written in the long form.
extends-cycle error A definition that extends itself, directly or not.
extends-instance error extends on a part: only a definition is built on another.
flow-mismatch warning A link carrying one quantity into a port that takes another.
physical-balance error A part with physical ports whose equations are not as many as its unknowns: one per variable without a value (and per state), per potential of each port, per out signal; a port's flow comes from its links. A var with a value and no der is a parameter.
physical-structure error A physical network that cannot be sorted: fewer equations than unknowns (under-determined: a missing equation, a port not linked), more (over-determined), or as many but not one for each — states tied by an equation (two capacitors in parallel, a voltage source across a capacitor, two masses joined rigidly), a higher-index system archec does not reduce: put a resistor, a spring or a damper between them.
physical-link error A link that joins a physical port to a port of another type, or to a port that is not physical.
physical-value error A parameter of a physical part whose value is not a number archec can work out.
fit-no-influence warning archec fit: a parameter the measured signals do not change (its column of the Jacobian is zero). It is left at its value: fit it with a signal it moves, or leave it out of --params.
fit-correlated warning archec fit: two parameters that change the signals in the same way (correlation above 0.999, or a singular JᵀJ). The data cannot tell them apart, so their values are poorly known: measure a signal that separates them, or fix one.
flow-unit warning A link between ports in different units: the value crosses unconverted.
fmea-mismatch warning A failure mode whose written causes are not the hazards its error reaches in the error model.
fmea-rpn warning A failure mode with a high RPN that nothing mitigates.
fn-placement hint A function analysed on one thread but simulated on its part's thread.
fta-mismatch warning A hazard whose fault tree as written (caused-by, gates) has other minimal cut sets than the one derived from the error model.
gate-cycle error A fault-tree gate that contains itself.
handler-blocking warning A thread that can miss its deadline because a message handler runs first.
hazard-no-goal warning A hazard with an ASIL and no safety goal answering it.
hazard-target warning A hazard whose rate from its causes is above its target.
stpa-incomplete warning / hint A control action not considered for each of the four types of unsafe control action (nor said not-applicable), one with no controller or process, a UCA with no type; a UCA with no loss scenario (hint).
stpa-no-path warning A control action no link carries from its controller to its process, or feedback no link brings back.
uca-untraced warning An unsafe control action that leads to no hazard (causes) or that no constraint prevents (constraint, a requirement); a loss scenario with no constraint (hint).
hyphen-minus error A name with a - read as one name where a subtraction was meant: write spaces around -.
implicit-interface hint An interface used and not declared.
include-twice error A part of a body included twice.
index error An index on a block that is not a repeated part, or out of its range.
interface-cycle error An interface that extends itself.
library-archec error A library that needs another archec version.
library-changed warning A library whose files changed under the version arche.lock recorded.
library-conflict error Two versions of one library asked for.
library-lock warning A library not in arche.lock, or not in the version it names.
library-trust error A package from the Arche Store that the project's trust does not accept: trust verified takes only verified publishers, trust reviewed also reviewed packages.
library-yanked warning A package from the Arche Store its publisher yanked (archec store outdated records it): archec add takes a newer version.
library-missing error A library the project uses that is in none of its libraries folders.
library-version error A version range that is not one, or that no version of the library is in.
long-form hint A long form (archec vet): archec fmt writes the short, standard one, with the same meaning.
memory-budget warning Processes that may use more memory than their processor has.
missing-operation warning A port that provides an interface whose operations its component does not implement.
missing-separator warning A word read as part of the Python before it: a ; or a new line is missing.
missing-unit warning A duration written without its unit.
missing-wcet hint A periodic thread whose cost is unknown (no wcet): the timing analysis leaves it out.
mixed-criticality warning Safety levels mixed in one address space, with no freedom from interference.
mode-initial warning Two initial operating modes.
no-reply error A request-reply server port with no handler.
no-route error A link between two processors with no route over a bus.
no-step hint A periodic thread with no step: nothing releases it in the simulation.
no-subscriber hint A published topic nothing subscribes to.
no-system hint No system declared: nothing appears on an Arche canvas.
not-a-processor warning A binary placed on a component with no cores.
operation-signature warning An operation implemented with another number of arguments than its interface says.
optional-here error optional on a variable or an argument, which always holds a value.
overload error A core loaded above 100 %.
pattern-mismatch error Two ends of a link with different interaction patterns.
position-twice warning A block placed in its own at and in a canvas.
property-group hint Properties that go together written apart (archec vet): fmt writes their group.
property-order hint Properties out of their order (archec vet): fmt puts them in it.
request-direction hint A request-reply client port that is an in.
requirement-no-text info A requirement with no text.
requirement-wording hint A requirement text with no "shall": is it a requirement or a note?
requires-in-body error requires inside a body: it belongs at the top of the file.
route-bus error A route with no bus (over …), or over a component that is not one.
route-link warning A route for a link that does not exist.
route-local hint A route for a link whose two ends run on one processor.
rtos-process hint A process on an RTOS: one address space, so its threads are tasks.
rule warning A breach of one of the project's rules, or rules that could not be run.
runs-target error A thread that runs something other than a part or a function.
same-line hint Two items on one line (archec vet): one per line, ; only inside a one-line block.
security-risk warning A threat with a high risk and no treatment.
self-link hint A link from a component to itself.
step-without-period warning A step on a thread with no period.
part-lifecycle warning A part number at its end of life, or not recommended for new designs, as the last archec parts found (.arche/parts-cache.json, with its date): find a replacement. Only when the cache exists; archec check never looks it up.
part-stock warning A part number none of which is in stock, or that the distributor does not know, as the last archec parts found.
suspect warning A link to a requirement reworded since the last baseline: check it still holds, then take a new baseline.
tara-incomplete warning An attack path whose feasibility is unknown.
text-ref warning A [name] in a text that names nothing in the model.
timeline warning A moment of a test case earlier than the one before it.
tolerance warning A tolerance on something with nothing to vary.
translation warning An entry of a translations block that names nothing, or says again what is written inline.
type-mismatch warning A value of another type than the one declared.
unallocated warning A part with behaviour that runs on no thread of the deployment.
unbounded-queue hint A queue with no size on a thread of a deployment.
union warning A union with no cases, or a case named case.
unit-mismatch warning Quantities of different kinds added or compared.
unknown-core error A thread placed on a core its processor does not have.
unknown-defaults error defaults for a declaration that takes no properties.
wire-field error A message field its wire format cannot hold: a struct, array, text or optional; bits outside 1..64; a float in other than 32 or 64 bits without scale; a checksum that is not one unsigned byte at a multiple of 8; a signed or scaled counter.
wire-overlap error Two fields of a message's wire format share a bit of the frame: move one with at.
wire-size error A field of a message's wire format past the frame's size, or a size that is not a whole number of bytes.
wire-range warning A field's range its bits do not carry once scaled (raw × scale + offset), an enum literal that does not fit its bits; as an info, a field cut to fewer bits than its type with no range to say so.
body error A part's shape or joint that does not read: shape box 0.1m, 0.1m, 0.4m at 0, 0, -0.2m (box, sphere, capsule, cylinder), joint hinge y at 0, 0, 1m rot z 90deg range -1.5..1.5 = 0.3 (hinge, slide, ball, free, fixed; rot roll, pitch, yaw or an axis and an angle).
realism-port warning How a sensor reads (noise, resolution) said where no sensor reads — on an in port, or on a part that is not kind sensor — or how an actuator acts (gain, lag, force-range) where no actuator acts: on an out port, or a part that is not kind actuator. It does nothing there.
range-reversed warning A range lo..hi (or a force-range) whose lo is above its hi: nothing is in it, and a value saturated by it is wrong.
keyframe-name error A line of a keyframe that names nothing it can set: write part.variable = value, part.joint = value (a part on a hinge or a slide) or actuator.port = value (the in port of a kind actuator part).
body-unmapped warning In a system whose parts say their shape or joint, a part archec gen --target mujoco cannot place: a mass with no shape (a 0.1 m box is assumed), a joint on a part with no mass or shape, a sensor MuJoCo has no model of, a sensor or an actuator with no hinge or slide to measure or drive, an actuator nothing commands.
wire-frame warning A message a route puts on a CAN bus is longer than the frame: 8 bytes on classic CAN, 64 on CAN FD.
unknown-unit info A unit not in the units catalog.
generic-args error A generic struct used with the wrong arguments: their number, or a type where a number is expected (N: int) or the reverse. Ring<Sample, 64> for struct Ring<T, N: int>.
edition error A project edition archec cannot read (write edition "0.12"), or newer than this archec knows: update archec.
ears error A requirement's ears sentence archec cannot read, or about a part, a state or a message the model does not have. `[while ,] [when
formal error A requirement's formal property archec verify cannot read: a word it does not know, a part with no state machine, a state the part does not have. never brakes in Fault, always …, eventually … [within 50ms], a in X leads to b in Y [within 50ms]; within goes with eventually and leads to only.
req-conflict warning Requirements no implementation can satisfy together (archec verify --conflicts): a minimal set, with the inputs that defeat every choice of states. Read over each part's states (any of them, from the initial one), the messages it receives (one per tick) and time in ticks (the deadlines' common divisor). Change one of them: a wider state, a longer deadline, a while that leaves the other out.
action error A body in the action language (```arche) that does not parse or does not type: a name not defined, a value of the wrong type, a port that does not send that message, a state the part does not have. The message says what was expected.
unpinned hint A thread or a process with no core.
unprovided-interface warning A link from a port that requires an interface to one that does not provide it.
vague-word warning A requirement that says a word that cannot be verified ("as fast as possible", "TBD").
advanced hint In a project at level simple, a declaration beyond the simple set (deployment, safety, the Arche app…): set level full in the project to use it. Completion then offers everything.
wrong-side warning A port used from the wrong side of a link (an in as a source, an out as a target).
bad-fault error A fault in a test step that names no link end, part or function it can act on.
ui-structure error / warning A ui that does not hold together: a word that is not one of a screen (guage), two screens or elements of one name, an element outside a screen, a display that is not WxH, an initial that is not a screen, a gauge or a telltale with nothing to show, a color that is not one. docs/ui.md.
ui-binding error / warning What a ui element is bound to, or what its action does, that does not hold: a name the ui does not see (its part's variables, port.MESSAGE.field, state, part.state, part.variable, constants), a value of the wrong type for the element (a gauge, bar, slider or stepper shows a number, a toggle a bool, enabled and visible take a condition), a unit other than the element's or its range's, a send of a message the port does not send or with arguments its fields do not take, a goto to no screen, a variable of another part set. The message says what was expected.
ui-dead-press warning / hint A press that reaches nothing: it sends on a port with no link, or to a part whose port does not receive that message (no receives, handler or transition on it); as a hint, a button with no on press.
ui-test error / warning A ui step of a test case that does not hold: press, long-press, release or change on a name that is no element of a ui (a part with no ui, an element the ui does not have), change on an element that is not a toggle, slider, select, input or stepper or without a value, an expectation that reads what an element does not show (hmi.engage.colour: text, label, value, display, enabled, visible, on, shown, options) or an element with nothing after it; as a warning, a press on an element with no on press. Ui steps run on the browser simulator (archec test). docs/ui.md#testing-a-ui.
ui-unreachable warning A screen no goto reaches from the one the ui starts on, or a screen (not the start) with no way out — no back, no goto from it or from an overlay.
ui-safety warning / hint A safety-relevant message — on a port a hazard's error … on names, said in a hazard's or a safety goal's text, or tagged safety — shown on some screens only, not in an overlay nor by a telltale: on the other screens nobody sees it. As a hint, one the ui's part receives and never shows.
ui-fit warning A screen whose content needs more than the display (an estimate: the elements' usual sizes, the gaps), a text wider than the display, or a touch target under 9 mm at the display's dpi.
ui-a11y warning / hint Contrast under WCAG AA — the theme's text on its backgrounds and buttons (4.5:1), a colored text (4.5:1) or a colored telltale, gauge or bar (3:1) on the background — a button with no text nor icon, a telltale that says it by its color alone; as a hint, an image with no alt.
ui-text warning A text of the ui not translated into a language the project's other texts are ("…" en "…", or a translations entry).
oneway-result error / warning A oneway operation that gives something back: a result (-> T), an out or inout argument (errors), or raises (a warning: the caller, which does not wait, hears of no exception).
raises-not-exception warning An operation that raises a struct, a type or an enum: what it raises is declared exception E { … }.
param-direction warning An out or inout argument with a default: the operation writes it.
native-type warning A type … native that names itself in no language (cpp "ns::T" include "t.h", rust "crate::T"), or a language's name on a type that is not native.
dataflow-source warning A dataflow sink linked to a port that is not a dataflow source, or to a source that streams another type of sample (vector).
dataflow-backpressure warning The two ends of a dataflow link that do not say the same backpressure.
no-service warning A port that calls a service no in port serves.
topic-wired warning A pub-sub port with a topic that is also linked: a topic is matched by its name, not by links (PYCOGEN refuses it).
topic-part warning A part of a topic ({id}) that is not a field of the messages the port carries, or ({id: T}) whose type is not one.
component-not-self-contained warning A component folder that uses a name declared outside it: copied into another project, it would miss it (requires "…").
exec-no-thread error A part placed execution active that no thread runs: an active part needs a thread (its queue and its executor).
exec-conflict error A part said passive or protected that a thread runs (it is active), or placed in another process than the thread that runs it; on a port, an execution (a warning: a port has none of its own).
runs-port error A thread that runs an out port: a thread runs the messages a port receives.
affinity-core warning A thread whose core is not among the cores of its affinity.
alloc-size warning An allocator with no block-size: what it holds, and what it overflows, are unknown.
alloc-memory error An allocator in a memory of another processor that is not shared.
alloc-local-mapped error An allocator in a local memory (not shared) that is mapped: a local memory is not mapped into other processes.
alloc-overflow error An allocator too small for what is in it: a child allocator (blocks × block-size, aligned) larger than one block of its parent, children that need more than a one-block parent has, more children or uses than it has blocks, a buffer or a working memory larger than its blocks, allocators that need more than their memory's size; or an allocator inside itself through its parents.
alloc-other-process error A part (or a port's buffering) that takes memory from an allocator of another process or binary; a binary's allocator not shared used from one of its processes (a warning).
memory-role warning A `memory saved
buffering-share-destroy error A dataflow port's buffering that shares its buffer (transfer share) and frees it once sent (destroy after-transfer): the consumers would read freed memory.
buffering-reuse error build reuse on an input, without the input it reuses, or naming one that is not an input of the part.
buffering-port warning buffering on a place of a part: it is a port's, place the port.
algo-stereotype warning A stereotype on a component that is not kind algorithm, an instance's stereotype (disable-thresholds, bypass-config-threading) on a definition or an algorithm's on a part, a splitter without one input and several outputs, a joiner without several inputs and one output.
algo-parameter warning A `parameter configuration
algo-composite warning A part of a composite algorithm that is not an algorithm.
algo-execute hint An algorithm with nothing to run: no fn execute, no input that reacts, no state machine.
algo-precedence error Parts of a composite that run after each other in a circle, or one after itself.
metric-no-producer warning An input that reads a metric on a topic filter (/chain/*/SNR) that no part publishes on.