Écrire et vérifier un modèle › Parcourir les exemples

Écrire et vérifier un modèle

Cette page n’est pas encore traduite : voici la version anglaise.

Examples

Each folder of examples/ is a whole model that checks clean, and most simulate their tests and generate code. Each has a README.md saying what it shows and the commands to run.

Example What it shows
kettle The smallest whole model: a requirement, two components, a state machine and the test that proves it — the playground's first steps
two-machines A radio with two state machines in one component (states Power, states Link): each in its own state, an event offered to both in order, a guard reading the other's state; simulated, explained by archec why, and generated in C, C++ and Go
program A word counter as a program (program extension, beta): three modules, each one TypeScript file, with body files checked against the model's signatures; archec gen --target typescript writes them and tsc --strict accepts them
autonomous-car A multi-file L4 driving stack: sensors, ADCU, brake/steering ECUs, requirements with math, scenarios, test plans; the brake path's hazards, FMEA and STPA (archec safety), the backup battery over a minimal-risk stop (archec profile), a fleet of robotaxis over a day (archec population); the nearest lidar return in the corridor as a GPU kernel (perception.arche)
patterns Every construct of the language in one file, with ctrl's Python in ctrl.py
car-bench The car's brake and steering firmware on two NUCLEO-H743ZI2 boards of the store, the Bench deployment: --target embassy then --target renode runs it in Renode; the firmware changes queued for the bench (archec queueing) and the database of its results, tested on the simulator; an FPGA that makes the wheel-speed signals (wheels.arche), the bench's equipment as kinds (kit.arche)
mcu-firmware Bare-metal firmware of a sensor node on an nRF52840 DK: an ADC's register map (memory) driven from the action language with the bit operators, its end-of-conversion isr, a watchdog, a 4-state machine, a CRC-8 frame packed into words over a UART, stimuli in the simulation, @wcet budgets for archec analyze / timing; --target regmap, c, embassy, devicetree
cart-pole-mpc The cart-pole balanced by a model predictive controller in TypeScript, its model from archec physics --linearize --lqr, its test plan run against MuJoCo; the cart's shape as code (cad/cart.py), weighed against the 1 kg the controller predicts with
physics Two tanks: continuous behaviour (equation der(level) = …) beside an arche body, checked by a timeline test
steering-safety An electric power steering ECU, ISO 26262 and STPA: hazards, ASIL, safety goals and the requirements derived from them, an FMEA, fault trees (gates, and one derived from the error model), unsafe control actions and loss scenarios, and the tests that verify each safety requirement (archec safety, archec cert)
operator-console A pumping station's operator console: the station's state machines, a touch ui (tabs, gauge, trends, settings, an alarm overlay, a confirmed Stop) pressed by UI test cases, the Arche app's panels, widgets, pages and tabs, a mimic visual, a story of a shift, and a scenario whose sequences ref each other
gateway-tara A connected vehicle gateway between a telematics unit and the CAN domains, with its ISO/SAE 21434 TARA (assets, damage scenarios, threats, attack paths, security goals; archec tara), the firewall's state machine and the test plan that proves its cybersecurity requirements
infra A shop's cloud: its network, a machine behind a load balancer, a bucket and its copies, what it may cost, staging and production as variants; OpenTofu or Terraform files, and a plan read against the model
product-line One e-bike drive unit in three variants (city, cargo, sport): parts and links per variant, parameters with tolerances set per variant, a study across the variants, a rental fleet as a population, the BOM and the budget per variant, test plans per variant (--variant)
srs-showcase A level-crossing controller written requirements first: an EARS policy (ears wording, ears formal), skipped checks with their reasons, cases tables, tag groups, properties, verification means, and the requirements commands — status, baseline, approve, doc, reqif, polarion, cert (ISO 26262, and EN 50128 with each requirement's SIL), qualify — all offline
arche-lang arche-lang itself as a model: the compiler stages, generators, editor, commands, decisions and the tests behind each promise; test/selfmodel.test.js keeps it in step with the code; a generator of its own writes the commands as Markdown
packages Two suppliers' sensors in two packages with the same names (front::SPEED, rear::SPEED, two Sensors): qualified names, import rear::*, a part with a count range (Sensor[1..3]), and the test that both speeds arrive
functional-chain A Capella/Arcadia-style analysis of a baggage line: actors and use cases, system functions and their flows, function chains with budgets, the logical components that perform them (simulated), the physical PLCs, requirements traced to functions and chains, tests per chain; archec capella, sysml, diagram chain:…, analyze
in-house A conveyor's motor guard taken from a package of the company's own store: the package ready to publish (archec store check), a project that trusts verified publishers only (trust verified), and a project block that bounds what leaves the machine (ai local-ai, allow store, deny issues, private); test/in-house.test.js publishes, adds and checks it