Every release
What changed in each version of the extension and archec, the newest first.
0.43.14 December 2026
Word documents with their figures, read as a printed specification
- Export Document as Word draws its figures: the drawings of the model a document names (sequences, structure, state machines) go in as SVG, with a PNG beside each for viewers that do not read SVG. A haloed label over a wire now reads in Word too.
- A specification reads as a printed document: a front page with the deliverable's facts, the title and reference at the top of each page and "Page N of M" at the bottom, contents with page numbers (Word asks to update the fields when it opens the file: answer Yes), requirements by chapter (the tag type each live requirement carries one tag of) on a tinted band, annexes for the constants, the long message formats, the verification matrix and the retired requirements.
- Each figure and table is shown once, later mentions say "See figure N"; a figure too wide for the page goes on a landscape page, a sequence too tall for it is cut between messages.
- Mentions are links: a requirement's id, a message, a type, a constant, "figure N" and each line of the contents lead to where the document defines it.
0.43.03 December 2026
Foldable sequence diagrams, figures that lead to the requirements
- Sequence diagrams fold their components in the SVG
archec diagramwrites and in the requirements' figures ofarchec doc --html, as the editor's sequence view does: the lifelines of one composite sit under its band▾ Name, a click on the band draws them as one lifeline▸ Name(their exchanges among themselves one⋯ N internalrow), a click on that head or row opens it again. They start as the model'sfoldsays. Shown as an image, in Word or sent to Polarion, a figure stays asfolddraws it. - A click on a part in a figure of
archec doc --htmllists its requirements: a block, a lifeline's head or a state opens a box with the part, a link to its section in Architecture and every requirement it satisfies, each a link to it. Escape or a click elsewhere closes it; a click on a figure elsewhere still opens it at full size.
0.42.030 November 2026
Resync with Polarion
- Resync with Polarion (command palette, the editor's right-click menu › arche-lang): pulls and merges what changed in Polarion in one step, and sends nothing. The merge panel opens only when both sides changed the same thing; a first pull that would replace a file asks first.
- Sync with Polarion… is always in the command palette on a computer. It was hidden until a
polarion.yamlwas there; without one it offers Import from Polarion…. - Import from Polarion… writes
out:in thepolarion.yamlit sets up, so a later pull merges into the file instead of printing.
0.41.130 November 2026
eight extensions stable
- The cad, design, hardware, kinds, population, profile, queueing and ui extensions are stable: they join the 1.0 promise, and ADR 009 says why. It also names database, generators and safety, which were already stable.
- Documentation only: nothing changes in the language, the commands or the editor.
0.41.029 November 2026
infrastructure as code (beta)
- The
infrapack describes machines, networks, firewall rules, secrets, services and budgets, and checks them with the model (guide,archec new my-server --template infra-host,examples/infra). archec applies nothing, keeps no state and holds no secret's value. - Two providers write the files, and write nothing when a check fails or cannot be said.
linux-host: a setup script that can be run again, systemd, nftables, Caddy and SSH settings, cloud-init; run on Ubuntu 24.04, not on Debian. Its firewall file replaces every nftables rule of the machine when it changes, those of Docker and fail2ban included.openstack: onemain.tf.jsonfor OpenTofu and Terraform, accepted byterraform validate; no cloud has been set up with it. archec infra plan,driftandimportread what OpenTofu or Terraform show as JSON: a plan that destroys data is refused, a drift is recorded and shown byarchec status, an OpenStack state becomes a model to start from.- Containers:
--target k8swrites a Service, an Ingress and an autoscaler, and takes a secret by reference. A container's secret written in the model is a new warning (container-secret). - Kinds: checks have
inside,overlaps,addressesandclosure; an element hasvariants, and its numbers may be a constant or a parameter. A generator plugin may sayprovides infrastructure, and reads the elements, their kinds and relations.
0.40.129 November 2026
the generic extension works offline
- The generic
.vsixhas the Arche app,arche-cli, pyodide and TypeScript again, so the Documentation view, tests and the simulation of Python and TypeScript behaviour need no network. Earlier downloads of it, 0.40.0 included, lacked them; the packages for a platform had them. The CAD engine and GHDL stay in the platform packages.
0.40.029 November 2026
requests and blocking queues run in the simulator
- Requests run in the browser simulator: with
pattern request-reply,sendwaits for the reply, sends again aftertimeout,retriestimes, then goes on;async truedoes not wait,deferred truewaits for a message sent back. A request with notimeoutthat nothing answers waits for ever, and the run's end says so. Before, the sender never waited: a model with such a port runs differently. overflow blockmakes the sender wait for room in the queue. The hintblock-not-simulatedis gone.archec testruns the cases of a system with a request or a blocking queue on the browser simulator: Arche's does not wait insend.- A topic or service port keeps its own queue and
latencyin the browser simulator; they were ignored, so a model that sets them there runs differently. What does not run yet is listed in the guide. - A generator script in TypeScript with an
enumworks on a Node that only strips types (26.13): esbuild or typescript writes it out when the project has one, else the error says what to do. - C and C++: a signal port (an fpga part's
out fl: bool) is a member.archec gen --target c-teststakes one system, the one a run takes, and skips a plan on another. The SysML import reads a timer's distribution of durations back.
0.39.027 November 2026
namespaces and count ranges, several state machines, kinds that behave, every extension at least beta
- Every extension is at least beta: guide pages for communication, components, functional analysis, catalogs, state machines and test cases, and the
examples/in-houseexample (a store package taken withtrust verified, a project block that bounds what leaves the machine).docs/surface.mdshows no extension as experimental. - Packages are namespaces: two packages may declare the same name (two messages
SPEED, two componentsSensor).front::Sensornames one with its package (front.Sensortoo);import rear::Sensororimport rear::*brings names in, bare, for the file or the package it is written in. A bare name is read from its own package, then the imports, then outside any package; else it is an error (ambiguous). Each of the two has its package in its id (Front_Sensor,FRONT_SPEED) in the checks, the simulator, the Arche project and the generated code, so no generated name clashes; a model with no name twice keeps its ids. Go to definition, hover and completion know the package.archec sysmlwrites the packages, the qualified names and the imports, andarchec importof a SysML v2 model keeps them (nested packages too) instead of dropping them. - A part's count range:
part wheels: Wheel[2..4],Trailer[0..*],[1..*]. The bounds are kept and shown (diagrams,archec doc,archec sysml, the SysML import); a run and the generated code use the most, the least when there is no most, or whatarchec sim --count wheels=3picks (count-range). - Several state machines in one component:
states Power { … }andstates Link { … }, each in a state of its own. An event is offered to each in turn, in the order written; a guard or a body reads another's state ([Power.state == On], or[state == On]by the state's name), a test lineradio.Link.state. The checker, both simulators,archec why, the diagrams (one per machine), completion, NuSMV and UPPAAL (a process per machine), and the C, C++, C tests and Go generators take them;--target embassyandvhdlrefuse a component with several. A component had one machine before (examples/two-machines). - Kinds that behave:
behaves as Tank(area, level0 = level)in a kind makes each of its elements a part of that component, in the systemNetworkthatarchec buildwrites andarchec physics,archec simandarchec testrun;via outlet -> inleton a relation joins the parts' ports. A test plan reads a part by its element's name:expect T-102.level > 0.4. A link may carry properties (feeds T-102 { length 20m }, declared withpropin the relation's block), be checked (check length <= 100min the relation), and behave as a part between the two (a pipe). A property may be an interval (prop operating: interval float64 unit m, written0.5...2.5m, read bylevel in operating), or let each element choose its unit (prop rating: float64 quantity pressure); a check converts two units of one quantity. New pack:hydraulics(tanks, pumps, valves and pipes that simulate), with the templatetank-transfer. archec capella: a round trip keeps every Capella id. The import also remembers the elements the export builds again (chain involvements and sequence links, data type literals and cardinalities, exchange item elements, units, state machine regions, scenario lifelines, events, guards) by their parent, type, name and links, in the origin file'sothers; the export gives each its old id back, in the .capella and the .aird. The demo drone keeps 212 of 212 ids (172 before), the car 305 of 305 (206 before).- GPU: reductions, shared memory, streams, records, a Swift host (docs/gpu.md).
reduce sum into total(sum, min, max) adds every index to one value of the part, combined as a tree over the indexes in their order: the same bits on the simulator, in C, on OpenCL, CUDA and Metal (the test rungs compare it bit for bit).shared tile: float32[64]andbarrier()share an array in a group; the checker refuses a barrier an index may miss and a race between two barriers (gpu-barrier,gpu-race).stream copyon a kernel makes its launches return at once,fn copy() { stream }waits for them,after otherorders two streams on the device; the order of the host's reads, writes and launches is checked (gpu-stream). A record of numbers and an enum go to the device, laid out as the C target's.metal/<part>_gpu.swiftis the Metal host in Swift (archec test --target metal --host swift).archec importreads__shared__/__localarrays and barriers;archec conform --gpucompares the shared arrays. Example:examples/gpu-signal. - CAD: several bodies in one file, and a part of another material. A shape file can name its bodies (
part = {"base": tray, "lid": lid});material lid PMMAgives one its own material.archec cadmeasures each body, a limit or a clearance can name one (limit Case.lid.mass <= 3g,clearance box.lid, box.base >= 0.5mm), the mass budget counts each, and MuJoCo gets one geom per body. A part can change only its material:part spare: Case { material PLA }keepsCase's shape, built once. - FPGA: Gowin and Xilinx 7-series in
archec synth, and the pins from the model. A Gowin part (chip "GW1NR-LV9QN88PC6/I5") is synthesised, placed by nextpnr-himbaechel and packed by gowin_pack (.fs). A Xilinx 7-series (chip "xc7a35tcsg324-1") is synthesised withsynth_xilinx: its cells and its share of the die, no fmax, no bitstream. Thepinsof thekind fpgapart (pins { clk 35; rst_n 10; blink_led 11; level 3.3V }) are written as the device's.pcf,.lpf,.cstor.xdcand the design is placed on them; on a Gowin, the ports the model gives no pin get free pins of the package. - Databases, run for real: every provider's schema, migrations and access code now run on PostgreSQL 17, ClickHouse 24.8, MongoDB 7, DuckDB and SQLite in
test/database-engines.test.js(opt-in: podman and the drivers). What failed there is fixed: PostgreSQL structs and enum lists from Python; DuckDB's TypeScript (it calledgetRowObjectsJs, and could not bind a list, a struct, a time or bytes); DuckDB migrations on a table another points at; ClickHouse optional structs, defaults and bytes; MongoDB autoincrement keys, whole numbers inlonganddoublefields, and data steps the validator refused. The Python of ClickHouse and MongoDB follows relations both ways, as the others do. renamed-fromon a database field or table:mail: string unique renamed-from email.archec database migraterenames the column or the table, in every provider, instead of dropping one and adding another.- C for PostgreSQL:
archec gen --target postgreswrites<db>_db.hand.con libpq, the same functions as SQLite's. archec import x.pytranslates lists that grow, dicts, slices,math.logand any recursion. A list made[]and appended to, popped or extended (or a comprehension) is an array of a fixed size and its length:# max Non its line, else counted from its loops, else--option max. A function that returns a new list writes it into an array parameterres_outand returns its length. A dict of numbers is two arrays, a lookup a search,KeyErroras Python. A recursion that is not a loop already (fib(n - 1) + fib(n - 2), quicksort's two calls) keeps a stack of its own,--option depth(64) calls deep, and stops as Python'sRecursionErrorpast it. Past a size, a function logs why and returns its zero.--checkcompares them with CPython in the simulator, C and Rust: TheAlgorithms'two_sum,quick_sort_3partitionandrec_insertion_sortagree. A doctest that sets its list first and shows it after (>>> col) is a test now.--check's Rust build had stopped working (heaplessmissing); it runs again.- Go:
while trueisfor {, so a function that returns only from inside it vets.
0.38.027 November 2026
fixes from a review — GPU guarded writes, 64-bit arithmetic, region-tagged languages, Polarion links
- A
function-chainbudget that is not a duration is an error (chain-budget):budget 2,budget "fast", a constant's name. Write a duration,budget 2sorbudget "500 ms". A model with such a budget passedarchec checkbefore; it no longer does. - Timers that are not a whole number of nanoseconds compile:
on "after T / 3"withT = 1sisafter 333333333ns, and the C, C++, Rust and Go timers are integers. C printed333333333.333ULLand RustDuration::from_nanos(333333333.333), neither of which compiles. - Start values from constants:
var big: uint8 = BIGwithconst BIG: uint32 = 300is an error (out-of-range), as= 300written is; Rust no longer prints a value its type does not hold. Integer constants divide cutting toward zero, as in a body:var third: uint32 = TEN / 3starts at 3 in the checker, C, C++, Rust and the simulator (C and C++ printed3.3333333333333335, Rust started at 0). - Zephyr: an isr's enqueue never waits —
k_msgq_putwithK_NO_WAIT, andarche_rt_posix.c's queue is ak_msgqunder Zephyr. It took a pthread mutex, which an interrupt must not. register-w-fields(hint): two fields of a write-only (w) register set one after the other leave only the last one's bits (CMD.chan = 5thenCMD.start = true): write the register once.- Simulator: an array of more than 2^20 elements is an error that says so; a huge declared buffer froze the browser page.
archec cert --standard constructor(any name every object has) lists the standards instead of crashing.- GPU: a kernel that writes an element only under a condition (
if x[i] > 0.0 { y[i] = x[i] }, or after an earlyreturn) keeps the other elements: the array is copied to the device first. Only an array written at its own index on every path is copied back without being uploaded. It came back with the device's memory in the elements not written, on OpenCL, CUDA and Metal. - GPU: an array a test case sets (
at 0ms do k.g[0] = 3.0) stays in the device's global memory instead of being written into the code as a constant. A kernel's last index is axis x (the fastest), so neighbouring threads read neighbouring elements;archec importreads a CUDA 2-D kernel (out[row * w + col]) in that order, acceptsout[col + row * w], renames a parameter named like a word of the language (in→in_), and records in gpu-map.json the typedefs clang found, soarchec conform --gpugives the same answer on a machine without clang (clang-missing, a warning). New:gpu-range, a range past the end of an array it indexes; OpenCL (this machine's) in Run Tests on a GPU; a run on the machine's own OpenCL is the rungopencl-system, apart from the PoCL one. - 64-bit integers:
+,-and*of int64 and uint64 wrap as in C and Rust, the same in Arche's TypeScript and the browser simulator (2^62 * 4is 0, uint640 - 1is its largest value). An integer division by zero is "division by zero" in both, not a BigInt error. --variant: a bare--variantis an error;variants "cargo"and a variant or a parameter inside a package are found; a variant chosen in one command no longer stays for the next in the same process. An operating mode'son "after 5 parsecs"is an error, as on a transition.- why / why-not finds calls and gotos from the code, not inside strings or comments, and says the line each is on. ReqIF: an
attrnamed like a built-in attribute (status) is exported asstatus (attr). archec site: a region-tagged language (languages fr-FR, orfr_FR) shows the French page and its numbers; a tag that is not a language is left out with a note. The language chosen is remembered per project. The last English words of the French page are translated, and a requirement's status agrees in French (réussie, non testée).- Polarion: a polarion.yaml
urlmust be http(s); a work item's hover escapes its id. The Arche project's requirement figures: an image is copied intoimages/, a plantuml block and a part's state machine are given, andfiguresis in the project schema. The document panel keeps the last good model while the model has errors. Atrace illustratesinside a component draws its part's states. A tag group's whole dotted name is checked. - Neutral names (
PROJ-231,CONTROLEUR) in the Polarion examples, the docs and the tests.
0.37.026 November 2026
the drawings and the structure in the documents
- VS Code documents: the document panel draws the figures that are drawings of the model — a requirement's sequences and state machines, and the block diagram around each structure element — with archec, in their place; before, it printed their text. A document is written in the project's own language (its
languages, the first), not the editor's. - Documentation (the Arche app in the platform packages,
arche-cli doc): each requirement lists the structure elements that carry it — what satisfies it and the element it is written in, with where each sits; the numbered table and figure captions are in the document's language.
0.36.026 November 2026
test plans by variant in Arche, exact integer products, certification tables as data
- Arche's simulator computes as the code does: a 32-bit product (
h *= 0x5BD1E995) is wrapped exactly (Math.imul), and a 64-bit one through BigInt, in the TypeScript archec writes for Arche. A product past 2^53 lost its low bits:examples/gateway-tarapassed 3 of its 9 cases underarchec test, now 9 of 9. The evidence of a built project whose bodies multiply changes. - Test plans by variant, in Arche too: the app keeps
variantson test plans and cases, narrows the model to the variant picked, and its Test plans page shows a verdict per variant.arche-cli test --variant Vruns one variant; without it, each case runs in each variant it names.archec testpasses--variantto arche-cli when it takes the flag. - C: a record's array field of more than 16 elements given an array is copied with
memcpyinto a temporary, not written as a list of every element (examples/5g-cell-searchhad a line of 9377 characters). - Rust: a call to the part's own function written in a
log(or beside a read of the part's fields in one expression) compiles: it is worked out first. It failed to borrowself(E0502). - Timers with a constant are shown as written:
after WARNING_TIME (3s)in the diagrams, documents and site;triggerWrittenin model.json and the generator model; the SysML export has the state machines' timers. A constant also works insideafter uniform(T1, T2)and in an operating mode'safter …. archec cert --standard en50128 | iec61508: the techniques and measures and the independence rules are data (lib/cert/en50128.yaml, EN 50128:2011+A2:2020, five columns;lib/cert/iec61508.yaml, IEC 61508-3:2010 and IEC 61508-1 Table 5), a summary from public sources, not verified against the standards. A project overrides them incert/en50128.yaml(or--tables), and--write-tablescopies them there to check. Rows were corrected (interface testing in EN 50128 A.5; the mandatory rows of A.4; IEC 61508 structural coverage in B.2 7a–7d). A highly recommended technique the model shows nothing of is listed to justify, a gap with--strict-hr; a mandatory one is a gap — unless its rating is not confirmed, then it is to justify until the project's table saysstatus: verified.
0.35.026 November 2026
figures and data in the documents, written in the project's language
- Requirement figures: a requirement's
figureproperties and thetrace illustratesthat name it reach the Arche app (requirements.yamlfigures): a scenario's sequence, a component definition's state machine, an image, a mermaid block, each with its caption. - Documentation (the Arche app in the platform packages,
arche-cli doc): a specification has a section per requirement after its summary table — its statement, rationale, origin, parents, what satisfies and verifies it, its verification means and procedure, its figures drawn (sequences, state machines; in the Word and PowerPoint exports too), and the messages, data types and constants its text names, with their fields, literals and values. - Document language: a document is written in the project's source language (the first of
languages), whatever the interface language; a picker beside the export buttons writes it in one of the project's translations, andarche-cli doc --langdoes the same.
0.34.026 November 2026
product lines, registers by field, unfenced bodies everywhere
- Product lines: test cases run in each variant they name, a deployment takes variants, and
archec arch-diff main.arche --variant A --against Bcompares two variants (parts, ports, links, parameters, budgets, BOM and cost). - Registers: a body reads and writes a register's fields by name, a part's register starts at its reset value, and a test line sets a field with an operator.
- Bodies: unfenced bodies for every body property (
on-enter { … },on-receive,on-timeout,on-deadline,on-init, a transition's/ { … }); a state machine's timer takes a constant (after WARNING_TIME,after 2 * T); a parameter can be a variable's or a constant's start value. - Simulation: an array is as long as it is declared and an index outside it is a runtime error in every simulator; bit operators in test lines; a simulation's stimuli read the action language; story steps show a product UI's screen.
- Code generation: an on-receive sees its message's fields, arrays included, in every target; a record's array field given an array compiles everywhere; an isr is event-driven; embassy drops a send on an unlinked port.
- Analysis: a function chain's budget is a duration, checked by analyze and the simulator;
archec whyfollows a state a goto entered back to its root;archec certcovers EN 50128 and IEC 61508; the Arche app panels' bind, action and port are checked against the model.
0.33.326 November 2026
the 5G example's text
examples/5g-cell-search: the GPU kernel's commands (--target opencl,--target metal) are listed with the example's other commands, not in its text.
0.33.226 November 2026
generic names in the docs and messages
- The examples of the requirement checks, of the names in text and of the exported page use a generic system name (
CONTROLEUR).
0.33.125 November 2026
Rust variables initialised by a constant
- Rust (embassy): a variable whose initial value names a constant (
var last: uint8 = IBIT_NONE,= A + 2 * B) starts at that value, as in the simulator. It started atDefault::default()(0);--unit-testsreported every function of the part as disagreeing with the simulator.
0.33.025 November 2026
seven new examples, product-line variants, hex constants right in Rust
- Hexadecimal constants: one whose digits hold an E (
0x1FFE,0xC0DE) is an integer everywhere. It was read as an exponent and became a float (8190.0in Rust, which did not compile). Test lines and the browser simulator read hex, binary and octal integers too; a 32-bitx *= kmultiplies exactly. --variant V: the model read as one variant of a product line; test plans and cases take variants, a budget is each variant's.- Functional analysis: a system function and a function chain satisfy requirements;
archec diagramdraws a function's parts and flows and a function chain in order;archec statusandarchec certcount them. - Simulation:
archec simplays a simulation block's stimuli; transition actions send records;sim --testruns ui cases. - Generated code holds the memory blocks a body uses; a C on-receive that reads its message's fields is given the message.
- ReqIF: attr lines are string attributes and
refinesa relation, both read back. Checks: an EARS sentence is the text of a requirement that has none; a project's skip reaches a security goal; parameter formulas keep their parentheses; why-not explains a state only a goto enters. - Seven new examples: steering-safety (ISO 26262, STPA), gateway-tara (ISO/SAE 21434), functional-chain (Arcadia, Capella export), mcu-firmware, srs-showcase, operator-console, product-line.
0.32.025 November 2026
an exported page that reads at a glance, diagrams as figures of requirements
- Export Project as HTML (
archec site) is redesigned. The overview leads with a verification bar (pass, partial, fail, untested, each a link to those requirements) and how far each document is verified, then a card per section saying what is there. The menu has icons, statuses are filled chips, each page opens with a sentence on what it shows, and the Requirements page has a key for its words (links, derives, also under). Light and dark, and on a phone. trace illustrates <drawing> -> REQ ["caption"]gives a requirement a figure: a sequence (uc-boot.nominal), a whole scenario, a state machine (Kettle.states), a component or a system. It is written where both are seen, so a requirement declared below the scenarios that show it (the include layers) gets its diagrams without its own file failing a check alone.archec doc --html, the ReqIF export, the Polarion push and the hover show it; an unknown sequence or requirement is an error with the name it probably means.- Simulator: a record literal with an array field (
t = T { f: f, n: 3 }) keeps the array. It was read as one number and becamenull(a Taylor taper's weights were NaN, its gains 0). The generated C and Rust are unchanged.
0.31.025 November 2026
a requirement's checks skipped, an EARS policy, its text's names followed
requirements#
skipa requirement's checks, with a reason:skip unverified, unsatisfied "verified at system level by the customer", orskip all. The names areunverified,unsatisfied,wording(no text, no shall) andears. The project block skips them for tags or files:skip unverified for tags system,skip all in "spec/legacy/**",skip unsatisfied for tags sw in "spec/sw.arche".archec statuscounts a requirement nothing proves and whoseunverifiedis skipped apart, and no longer fails on it;archec docshows a "Not checked" row with the reason.- An EARS policy in the project block:
ears wording(every requirement),ears wording for tags sw, software,ears formal for tags safety,ears wording, formal in "safety/*.arche".wording: the requirement's text follows an EARS template, in English or French: ubiquitous ("The X shall …", « X doit … »), state-driven (While, During, « Tant que », « Pendant », « En STANDBY, … »), event-driven (When, Upon, « Quand », « Lorsque », « Dès que », « À la réception de … »), unwanted (If … then, « Si … alors », « En cas de … »), optional (Where, « Dans la configuration … »). Whatever follows the verb is free, so a trigger there (« … dès que … ») is read. The warningears-wordingshows what it read and what is missing.formal: a requirement in scope has anearsproperty (ears-missing).- A library's requirements are not in scope.
editor and site#
- The names in a requirement's text are followed, written bare:
TRACKING,CONTROLEUR,PL_FAULTS_MAX,ControleurMode.TRACKING, a memory's fieldCTRL.enable. Cmd+click goes to its declaration; a name several elements have (a state of two machines and an enum literal) lists them all, nearest first; hover says what each is. The text is not changed: no brackets needed. The same works in descriptions, procedures and///comments. A word is a name when it is one exactly (case kept); lower-case words, one-letter words and URLs are never read as names. archec siteshows those names as links in a requirement's text.
gpu (beta)#
- GPU kernels (the
gpuextension, docs/gpu.md). Afnwithkernel i in 0..<nruns once for each index of the range (up to three:kernel r in 0..<h, c in 0..<w),group 16its work-group size. There is no new keyword. The simulator runs it one index after the other; the C, C++, Rust and Go targets write the loops. archec gen --target opencl | cuda | metalwrites the kernels and the code that launches them: OpenCL C with a C host, one.cu, a.metalfile with an Objective-C host. Each gives C the same function for a kernel. The copies between the processor and the device follow from what the kernel reads and writes. Integers wrap andint()saturates as on the simulator; no fused multiply-add, no fast math.- The checker says what a GPU cannot run, where it is written: a write to anything but the element at the kernel's own index (
gpu-race), awhileloop, a function that calls itself, a string,send,log, a call of another part (gpu-kernel).float64is a warning (gpu-float64): Metal has none. archec test --target opencl | metal | cudaruns the test cases on the generated code: on PoCL (--opencl system: the machine's own OpenCL), on the Mac's GPU, with nvcc on an NVIDIA GPU. Every launch is compared with the C target's loop. Each case is evidence at the placeopencl,metalorcuda, three new rungs ofarchec test --ladder. Nothing is downloaded: where the tool is missing, the message says what to install. Without nvcc, aclang++checks the.cu.archec import x.cl | x.cureads the kernels of OpenCL C and CUDA files into a component: the index, the range (from the guard), the group (from the launch), the body in the action language. A kernel it cannot translate (a barrier, an atomic, shared memory, a template, pointer arithmetic) is kept opaque, with why:archec checkwarns (gpu-opaque) andarchec statussays what it satisfies is not proved. tree-sitter reads the files and ships in the extension.archec conform --gpucompares the model's kernels with the code they were read from, and the generated files with what the model says now:kernel-only-in-code,kernel-gone,signature-changed,launch-changed,body-changed,generated-edited.archec ciruns it as the gateconform-gpu.- Run Tests on a GPU in the command palette, for a model with a kernel: it asks which of OpenCL, Metal and CUDA.
- Examples:
examples/gpu-fir, a FIR filter; the receiver's FFT ofexamples/5g-cell-searchis a kernel, checked alone bygpufft-bench.arche. - The C unit tests (
--target c-tests) read an element of a part's array in an expectation (fir.y[3] == 0.25).
0.30.025 November 2026
tag groups are references
- A tag's
groupnames itstag-group. Intag wip "À confirmer" { group status },statusgoes totag-group status "Statut"(go to definition, hover, references), as a tag intagsgoes to its tag. unknown-tag-group(warning): once a project declares tag groups, a tag naming another group is reported, with the nearest name. A project that declares none keeps its groups as plain names.
0.29.125 November 2026
generic names in examples
- The examples in the reference, the hover help and the animation samples use generic component names.
0.29.025 November 2026
edition 1.2 is the current edition
- Edition 1.2 is the current edition.
archec new, the importers and the store writeedition "1.2", and every example, template, library, data app and plugin of arche-lang is written in it: ranges with..<or..., conditions with&&||!. A project written on 1.0 keeps building as before;archec fmt --edition 1.2 --writemoves one.archec fmt --editionon a project written on one line now puts the edition beside the version instead of splitting the block. The examples' screens say when a value goes stale (stale, twice the message's period).
0.28.024 November 2026
file uploads, the Generated Code view, routed diagrams
upload, a ui element: a file the reader picks or drops (upload pic "Creative" { value picture; accept "image/*"; max 10MB }). The page reads it and sets it invalue: astringgets it as adata:URL,bytesits bytes;on changesees it. A file overmaxis refused and the upload says why. A test sets it as an input (do change web.pic "data:image/png;base64,…"). archec reports an upload bound to a number, and one with novalueand noon change. LVGL, Slint and Qt Quick put a placeholder in its place, with a note;archec recover --uireads a repo's<input type="file">as an upload, and the frontend generator writes one back.- Components in the Model view is the tree of composition: at the top, the components no other component uses as a part; each opens on its parts, then theirs. A component reached only through a loop of uses stays at the top.
- A Generated Code view: what
archec genwrote, wherever it went, read from each folder's.archec/genmap.json: its files as a tree, and under each file the model elements it holds (click for the code, the inline button for the model line). It follows eachgen, from the editor or a terminal. Show Generated Code is also on an element's context menu in the Model view, and finds a file reached through a symlink. - A diagram drawn at its
canvaspositions routes its wires as the Arche app does: at right angles round every box, crossing and sharing as little as they can, wires sharing a corridor spread onto tracks of their own, and each name plate clear of the boxes and of the other plates (media/orthorouter.js, the app's router). A wire that cannot go round is drawn dashed across, and the diagram says how many. Ports on a box's bottom edge leave downwards. - A port is drawn on the side its author chose (
side left|right|bottom, as the Arche app writes it), on the diagram's own layout and at the authored positions. - Polarion push, said in full in
polarion.yaml'spush:section: the tag (or--tag), the type, the links' roles, the document per deliverable, fields and values, all checked before anything is sent. Requirements are created in batches, each batch recorded inpolarion.lockfirst; a create whose answer was lost is found again by its draft id.derivesandrefinesare sent as links and read back by a pull.archec polarion new --doc SRS "Title"gives the next free draft id. - Embassy: the generated Rust is split by concern and by part (
src/arche/types, channels, parts, tasks, monitor;src/app/a file per part, USER CODE regions kept). A crate with the oldsrc/arche.rsandsrc/app.rsis split, the old files removed only when archec wrote them. - embassy:
hal zynqmp-r5for the ZynqMP's Cortex-R5 (ano_stdcrate onzynqmp-r5-rt). A bus that is not CAN (rpmsg, serial, ethernet) gets no CAN driver. - A part made from a definition keeps the definition's links and delegated ports in the generator model.
- Arche app YAML: a struct built in a body is a plain object; a benchmark's subject is the part's address.
0.27.024 November 2026
&& || ! for conditions, & | ^ for bits
conditions#
&&,||and!are the standard spelling of a condition in the action language: fn bodies, handlers, on-enter/on-exit, transition guards and actions, test lines, ui expressions, parameter defaults.archec fmtno longer rewrites them intoand,or,not, andarchec vetno longer hints that it should.and,or,notare still read, and stay reserved. From edition 1.2 they are errors (word-operator), each with its quick fix. Below 1.2,archec fix --only word-operator --writerewrites them without changing the edition;archec fmt --edition 1.2 --writerewrites them and sets the edition. Each edit is kept only when the line, read again, gives the same tree. Python bodies, Python test lines, sentences (formal properties, sentence guards), strings and comments are never touched; a kind's or a requirement'scheckreads both spellings, as before.- A test line with
&&,||or!is the action language: it is translated for each simulator (it was handed to Python as written and came back inconclusive). A line in words only that is valid Python still runs as written. - Messages name the right operator:
!on an integer says to write~,~on a bool says!,&or|of two bools says&&or||. - The tools that write action-language text (
archec convert, the Python and TypeScript importers, thearche-bodyfix, the ui generators) write&&,||,!. arche-lang's own examples, libraries and docs are written with them.
bits#
&=,|=,^=,<<=,>>=and%=are exactlyx = x op e: the same checks, the same code in every target. They also open an unfenced body.- The simulator computes a shift as the code does. A count computed at run time is taken mod 32 (mod 64 for a 64-bit type), as Rust's
wrapping_shl:u << 33of auint32isu << 1in Python, JavaScript, C, C++, Rust and Go (the simulator gave 0, Go gave 0 or panicked, C's>>was undefined past the width). A signed<<keeps its sign in the simulator;& | ^of a signed and an unsigned side compute in the joined type, the unsigned side's top bit its sign.not k < okis(not k) < okin Python too, as in C and Rust. - A count written outside the width is an error:
b << 8of auint8is always 0, widen first. uint8(x)…uint64(x),int8(x)…int64(x)convert an integer, wrapping as a stored value does (int8(u)of auint8255 is -1). A float is made an integer byint(x).- The generated Rust does not change. C and C++ mask a computed
>>count; Go masks a computed count. - A differential test runs every bit operator over every integer type at its edge values in the simulator, the browser simulator, C, C++, Go and Rust, and compares them.
fixes#
- fpga: a compound assignment
x <<= nwas translated with<. - embassy: a guard written with
&&or||lost them in its Rust method name (guard_not_battery_low_has_rtk); it now gets the name the same guard in words gets (guard_not_battery_low_and_has_rtk). - uppaal and nusmv exports read a guard written with
&&and||(it was left out as "not translated").
0.26.024 November 2026
a fn's body without a fence
arche bodies#
- A fn's body is written in its block, with no fence: after its properties, the first statement (
if,return,var,send,log,goto…, or a name followed by=,+=,(,.or[) opens the body, which runs to the block's}. It is the same body a```archeblock gives: checked, simulated, translated to Python, Rust, C and Go, and an error in it is reported at its line and column. Its comments are part of it. A handler's block reads the same way. - A
```archefence is still read, so every model keeps working; a Python body keeps its```pythonfence. A fn with both a fenced and an unfenced body is an error. archec fix --only fenced-body --writeremoves the fences: a fence in the block goes,fn f() ```arche … ```becomesfn f() { … }. A fence stays where the fn would not read back with the same body and properties (a property written after it, a body whose first line is not a statement). The finding is computed only when asked for: a fenced model stays clean undercheckandvet.archec fmtputs an unfenced body one level under its fn and keeps its own indentation; nothing in it is aligned as ports and fields are.- The editor colours the statement words of an unfenced body (
if,else if,return,goto State,send,log…); its names, parameters and locals keep their semantic colours.
tests#
- The test suite writes a fn's
wcet,satisfies,sourceand description in its doc comment.
0.25.024 November 2026
a unit test of every function, and the simulator computing as the code does
unit tests#
archec gen --target embassy --unit-tests [--unit-timeout 2s]writessrc/arche/unit.rs: a test of every function of each part, run bycargo test. Each function runs alone on the part as it starts, on zero, the low and high ends of its parameters' types and three seeded draws (a string: empty, one letter, a word). What it must give — its result, the part's variables after it, an array it writes, what it sent or asked through a port, in order — is what the simulator gives. In a test a send or a call is logged, not delivered, a call gives its type's zero, andnow()is the time the test sets. An input the simulator does not finish in--unit-timeoutis dropped, said in the file.
the simulator and the code agree#
- A float32's
+ - * %and/are rounded to a float32 each time, as the code computes in f32; a float's division by 0 is ±inf or NaN. - A float made an integer (
int(x)) is held at the type's ends (NaN is 0), as Rust'sasdoes. - A uint64 below 0 wraps to the top.
- In Rust, a duration's
+and-wrap (u64 ns):now() - sentwithsentahead no longer panics in a debug build. var ready: bool = trueistruein the generated Rust (it wasfalse).
0.24.124 November 2026
the exported project on a phone, simulation blocks that stay tidy
- Export Project as HTML on a phone (or a window under 760 px): one column, ☰ opens the left column over the page, a link or Escape closes it; nothing scrolls sideways.
- Simulation blocks keep their texts inside them, in the exported page,
archec sim --htmland the playground: a long value (an array) is cut with "…" and whole under the pointer, a fraction has 6 significant digits, a value not set yet is "–" (it said "undefined"), and a block's name and its type no longer overlap. - The requirements' Documents filter only shows when there are several documents, and those in none are under No document (it said "—").
- Two state machines with the same name in the Diagrams menu (two parts called
probes) each say whose they are. - The simulator's frame takes the page's colours while it starts, instead of a white flash.
0.24.024 November 2026
every declaration's doc comment holds its description and its traces
doc comments#
- Every declaration takes a doc comment, as a fn does since 0.23.0: a component, port, var, const, message and its fields, link, state, scenario, interface, struct, thread… Its text is the element's description (a participant's
role). - Its tags are the kind's own properties, the prose and traceability ones its kind has:
@satisfies,@verifies,@refines,@derives,@unit,@wcet,@tbc,@source,@purpose,@rationale,@origin,@owner,@notes,@objective,@preconditions. A doc comment never gives a kind a property it does not have. - Text tags go on over lines:
@rationale,@purpose… take raw text, continued on the next lines indented past the@; a blank line or the next tag ends them. One-line tags (@satisfies REQ-1 as t1,@wcet 200us,@unit m/s,@tbc) are read by the property parser, as in the block. - Requirements, deliverables, verifications and test cases keep their text in the block: a requirement's description is what it requires. Their
///stays a plain doc. - New diagnostics:
doc-tag-misplaced(a property this kind does not have:@wceton a var),doc-tag-empty,doc-tag-siblings(a tag on a line declaring several elements).doc-description-twiceanddoc-tag-twicenow apply to every kind. archec fix --doc-comments[=kind,…]moves the descriptions and their tags from the blocks to doc comments, wrapped at 100 columns; a block left empty is dropped. A declaration it cannot move unchanged (an escape in its text, a comment beside it, a doc comment already) is left as it is (--verbosesays why). Refused if it would add an error.- A
///on a kind other than a fn stays its doc too, so the views, stubs and generators that read the doc see it as before; the YAML and LaTeX say it once. The merge driver keeps a doc comment's tags with their declaration.
0.23.024 November 2026
a fn's doc comment holds its description and its traces
doc comments#
- A fn's doc comment is its description:
///lines, or a/** … */block at the start of a line, directly above afn. Plain//and/* */comments are never docs. - Tags in it are the fn's properties:
@satisfies REQ-1 as t1(repeatable),@source path#L12(quotes optional),@wcet 200us. They are read by the property parser where they are written: the same properties as in the block, so traceability, ReqIF/Polarion, docs and generators see them unchanged, and a wrong requirement is reported at its column in the comment. @param name …describes a parameter,@returns …what the fn gives back.- New diagnostics:
doc-tag-unknown(with the nearest tag),doc-text-after-tag,doc-description-twice,doc-tag-twice,doc-param,doc-returns. has(f, doc)in a requirement'scheckcounts a description written as a doc comment.
0.22.024 November 2026
the project as one page, a clearer diagram viewer, a specification page to sign
the diagram viewer#
- Block names are never cut, in the viewer and in exported diagrams.
- A real Back and Forward, the view kept for each sequence.
- A properties pane you can resize, its texts shown whole.
- The picker lists the top level, with a search and All diagrams… for the rest.
the project as one HTML file#
archec site main.arche -o project.html, and in VS Code Export Project as HTML… (the Model view's title bar, the editor's right-click menu): the whole project as one page that works offline, for someone with no Arche (the exported project). A left bar (Overview, Requirements, Model, Diagrams, Code, Tests, Simulation, Generated code, Screens) and a search; every name in the code a link to its declaration; each requirement with what satisfies and verifies it and its last run; the diagrams, a box opening its code; the generated code, each element back to its model line; the simulator's player, and the test cases run in the page by the archec it carries. Nothing is fetched (no Pyodide: the action language only).- Trees you can filter for the generated code (by component or by folder), the tests (by test plan or by the component each case exercises), the model's code (by file or by component) and the requirements (parents › children, a child of several parents under each; or by component).
- A requirement's graph: around it (parents, children, what satisfies it, the cases that verify it) or the whole tree, coloured by verified, failing, not verified and not allocated.
- The simulation on one screen at 1080p: the diagram, and beside it a panel of tabs (Screens, Trace, Messages, Timeline); the run kept when you change tab.
- Diagrams by level: Architecture, Behaviour and Scenarios at the top, a block opening its inside, crumbs back up; a scenario stepped through message by message (▶, ← →, Home, End).
- Back and Forward give each page back with its scroll, a diagram with its pan and zoom. The Screens page is now Product screens, each with its title and component.
the specification page (archec doc --html)#
- A cover with the revision and the status, a nested table of contents, labelled cards, what proves each requirement always said, traces linked both ways, a sign-off block, and layouts for print and for a phone.
- Math in a requirement's text is typeset when the page is written: no script, only the fonts it uses.
- UI previews with believable sample values (from ranges, comparisons, units and names), and a note when the data is a guess.
archec baseline --assays who took a baseline (else git'suser.name), and a wording's changes are shown word by word.
something in 3D in a requirement's text#
shows a part or an assembly asarchec cadbuilt it, as a still from the front left (#front,#side,#topfor another view);scene:RobotDrawa system's bodies at their start;run:TC-DRAW-SHAPEa test case's last recorded run, three frames with its verdict;tries:TC-DRAW-SHAPEthe tuner's tries, the passing one last. These are names, not keywords.archec polarion pushputs the still in its place, its caption saying what was measured against the requirement's limits or the run's verdict and date, and attaches the.glb(and the.stepof a part), the run's GIF or the reel, and an offline 3D page. It is drawn again only when what it is drawn from changed; a pull reads it back as the same reference, and one redrawn or deleted in Polarion is asked as a drawing is.- A push never builds the CAD or runs the simulation: a requirement whose part is not built, was built before its file changed, or whose case has no recorded run is held back and the push says why (
--dry-runlists it); the others go.archec checkwarns the same (figure-3d); a name that names nothing isfigure-ref, with the name meant. - In VS Code,
](completes thecad:,scene:,run:andtries:names, Ctrl+click goes to the part or the test case, a rename follows, and the hover shows the still when Chrome can draw it.archec doc --htmlputs the still in its place.
0.21.023 November 2026
hobby boards, a bench to wire them, missions
hobby boards and parts in the store#
- Five boards: Arduino UNO R3, Nano and Mega 2560, NodeMCU (ESP8266) and the STM32 Blue Pill. Each has a port per header pin (
uno.d13,uno.a0), its pinout with PWM, ADC, interrupt and bus pins, its logic level, its rails with their current, the most a pin gives (pin-current 20mA), and a picture with the header pins where they are. - Seven parts: DHT11, LDR module, potentiometer module, L298N motor driver, TT gear motor, 4 × AA battery holder and a 4-channel level shifter, with their supply and current. The sensors and the motor run in the simulator.
- 3D boards: every board of the store has a 3D model built from its data, with its parts numbered, four cameras, and pins that say their name and role under the pointer (
archec board picture <board> -o board.htmlor.glb; Show in 3D in VS Code's board details). Nine boards have their parts placed from their datasheets.
checks a beginner needs#
pin-current: a part that draws more than its pin gives. A motor or a relay on a bare pin gets the quick fix "Put a driver between them"; an LED with no resistor is a warning.- Pins the board uses itself: the UNO's D0/D1 (the USB serial), the ESP8266 and ESP32 boot pins, the Blue Pill's SWD pins. A part on one is a
pin-conflictwarning that says what breaks. board-ground: two parts on different supplies with no ground between them; a servo or a motor on a board's 5 V pin.pin-levelthrough a level shifter: quiet when the shifter joins 5 V and 3.3 V the right way round, a warning when its sides are swapped.- Wire it for me (
board-unwired, a hint): adds the ground, the supply from the rail that fits, and each signal on a free pin that can do it.
firmware for the AVR boards#
hal avr:archec gen --target cwrites bare-metal C for the ATmega328P and ATmega2560 (UNO, Nano, Mega): GPIO, PWM, servo pulses, ADC, UART, I²C and a millisecond clock, a Makefile for avr-gcc andmake flashwith avrdude (avr.md). Not yet run on a board. The ESP8266 is modelled, checked and simulated only.
missions#
- Eleven guided builds (missions.md), from a blinking LED to a two-wheeled robot driven by a Raspberry Pi through an Arduino Mega. Each starts unwired, says each step, and is done when its requirement's test case passes.
on the site#
- The Bench in the playground: put boards and parts on it, click a pin then another to wire them (each wire is a link in the model), see each wire coloured by its checks, press Run to see LEDs, servos and motors move and read each board's serial lines. The missions open there.
- A page per board with its specs, its pins by role, what to watch out for, a first model with its generated code, and a find-the-part quiz; every board side by side in one table that sorts and filters.
0.20.023 November 2026
drawings in a requirement's text, safer expressions, an editor made for newcomers
one typo, one clear error#
- The parser reads past the common slips and says each once, with its quick fix: a
{left out afterstatesorcomponent X("Expected '{' afterstatesto open its block"),part water Waterwith no colon,port in cmd: Cmd, two declarations on one line, a}that closes nothing. What a syntax error probably caused is marked (cascadeon the diagnostic): the editor shows it as a hint ("Probably caused by the syntax error on line N"),archec checkfolds it under its error ("+ N more after it"), and it offers no fix. - Plainer messages: "Did not expect the text "Heating" here: a line of a block starts with a declaration or a property"; type errors as sentences ("
temperatureis a number (float32);"two"is text:+=takes numbers"); at most the 5 closest names, closest first.
the VS Code extension, for newcomers#
- A walkthrough of the loop, in 7 steps on the template
archec newmakes: read the requirement, see its states, run its test and watch it turn proven, break it and fix it with a quick fix, generate C. - Requirements & Proof, a new view: each requirement ✓, ✗ or ○ with what proves it, "N of M requirements proven" in its title and the status bar. Show Requirement Status opens it; the text report is Show Status Report.
- About 20 commands in the palette, all under "arche-lang", where there were 74: an extension's commands show when the model uses it (FPGA, databases, CAD, Polarion…), the views' own commands stay in their views. Simulate is the one way to simulate. Build has its own icon; the editor's right-click entries are in one submenu and show where they apply.
- One output, "arche-lang", with topics (
[build],[proof],[sim],[store],[cad]) and an Open Output button where a message points to it; no pop-up for what the canvas already shows; progress for build and generate. - New Project in one flow with Back: kind, folder and name, then Create, or Customise the board, language and parts.
- The diagram gets room and follows the theme: the palette starts as its icon rail in a narrow panel, the simulator's controls are a drawer, the view fits on open and on run; colours from the VS Code theme by default (
arche.diagram.theme:auto,light,darkkeep Arche's canvas), high contrast included; blocks, ports and links can be reached with the keyboard, with Link from this port…. - Views: Model (was Navigation), Requirements & Proof, Files, Store (the shelves, then the packages), Environment, Documentation, Live, Animations. Settings in groups.
- In the browser (code.arche-lang.xyz): What the Desktop Adds…; a terminal says it needs the desktop extension.
- The listing has pictures and a quick start.
the store, for newcomers#
- A "Start here" shelf of templates first; internal packages last; the verified badge only when it tells packages apart; descriptions with their code; one Filters button on a phone; the package page's buttons say what each does.
under the hood#
- Extensions register with the core (src/extension.ts) instead of the core importing them, FPGA first;
tools/layercheck.mjsholds the core to it in the tests. - Every word and command has an owner (the core or an extension), with its counts and maturity on a generated page, the language by owner; the 1.0 promise covers the core and the stable extensions (ADR 008).
- Generated references for the VS Code extension and for every archec command; decision records in docs/adr/.
safer expressions in the action language#
- Optional fields are read safely. A field written
optional Tis read withif let p = fix.position { … }(the arm runs when it is there,else if lettoo),guard let p = fix.position else { return }(p from there on) orfix.position ?? 0.0. A bare read is an error (optional-read, its quick fix writes?? 0.0), as an absent field would have been a silent zero;??on a field that is always there is one too (optional-not). Every target: Python'sNone, JavaScript'snull, C'shas_flag, C++'sstd::optional, Rust'sOption, and Go's pointer (an optional field of the Go structs is now*T,omitempty). A record that leaves an optional field out has it absent, in the simulators too (it was 0). - Texts with values in them, in a body:
log "speed ${v} km/h", a string variable, a field of a message. The same${…}as a ui's texts: each value is an expression of the body, checked where it is written (a number, a bool or a text:interp-type), written as the simulator writes it in every target (an integer whole, a float in its shortest form);${v:0.00}with two decimals (interp-formatfor the ui's other formats). Python gets an f-string, TypeScript and JavaScript a template literal, Rustformat_args!into the crate's 64-byte string, C and C++snprintfinto a buffer sized by the checker, Gostrconv. In anfpgacomponent onlylogtakes one. A Python body'sf"…{v:.2f}"translates to it. - Arguments by label, and defaults:
fn ramp(to: float32, rate: float32 = 1.0), calledramp(to: 50.0)orramp(50.0, rate: 2.0); calls by position keep working, and an interface's operations take them too (motor.spin(speed: 1.0)). Errors:arg-label,arg-missing,arg-twice,arg-order, andarg-defaultfor a default that is not a constant value of its type. Every target gets the arguments in order with the defaults filled in at the call. The editor offers the labels inside a call's brackets, and a label's hover is its parameter's. - Derived values on a component:
let power: float32 unit W = voltage * current, read as a variable everywhere (bodies, test lines, ui bindings,archec sim's trace), always up to date, never assigned (derived-assign); its expression reads only the part's variables, constants and builtins (derived-pure), its units are checked (derived-unit), a cycle is refused (derived-cycle). Bodies get its expression in place in every target; C haspanel_power(const panel_t *self), Rustpower(&self), GoPower().letat component level was an old spelling ofvar(refused since 0.12); it now means this. - Functions of an enum or a struct:
enum Mode { Idle; Run fn label() -> string ```arche … ``` }, calledmode.label()orMode.Run.label();selfis the value,self.xa struct's field. Python, TypeScript and the browser simulator define it in each body that calls it, C and C++ write a plain function taking the value (mode_label(self)), Rust a method in the type'simpl, Go a method of the type. Thefpgaextension refuses one.
new statements#
match x { case a { … } case b, c { … } else { … } }in a```archebody, over an enum, a union (case move(m)names the value the case carries) or the part's state (match state). A case left out with noelseis an error (match-missing) whose quick fix adds the missing cases; a case written twice, a name that is not a case, and a case's value assigned are errors too. Python, TypeScript, the browser simulator, C, C++, Rust and Go test the cases in order; a union is matched in Python, TypeScript, Rust, C++ and C (a struct's field), not in Go yet. On an FPGA a match over an enum is a VHDLcase.let d = speed * 2.0: a local of a body that is never assigned again. Assigning it (or a field or an element of it, or giving it to anoutparameter or to a function that writes the array) is an error (let-assigned). Avarnothing assigns again gets a hint,could-be-let(archec vetand the editor, notarchec check), whose fix writeslet(archec fix --vet).guard c else { … }: an early exit. Its block leaves —return,break,continueorgotolast, or anifor amatchevery branch of which does — or it is an error (guard-must-leave). Every target writesif not c; an FPGA's VHDL too.defer { … }: cleanup written once, run as the body ends — at eachreturnafter it (once the value is worked out) and at its end, the last defer first. At the top of a body only: in a loop, an if, a match, after a return, inside a defer, or with areturn/gotoin its block, it is an error (defer-place). Every target writes the block before each return; an FPGA refuses it.for x in list where c { … },for i in a..<b where c { … }: the turns where c holds; c is a bool that reads the counter or the element. Every target writes the body in anif, VHDL too.- Ranges that say whether their end is in:
for i in 0..<n(n left out),for i in 1...n(n counted),range 0...100, andrange 0..<100(=0...99, for a whole number written; any other end is an error,range-end). Edition 1.1 makes the old..an error (old-range): it left its end out in aforand kept it in arange.archec fmt --edition 1.1 --writeandarchec fixwrite each one in the form that keeps its meaning. Before 1.1 and with no edition,..means what it meant.
new ui words#
badge unread,busy,date,feedback beep|buzz(docs/ui.md "Badges, busy, dates and feedback"): a count on a button or a tab, an indeterminate spinner, a day as a textYYYY-MM-DD, a beep or a buzz on press (the web's tone or vibration, LVGL's weakui_<id>_feedbackhook).on swipe left goto Next,on drag { … value.x … },on pinch { … value … }(docs/ui.md "Gestures") on screens, layouts and elements: the runtime'sgesture(), the web's pointer events,do swipe/do drag/do pinchin tests; LVGL makes swipes and drags, Qt Quick pointer handlers; Slint and LVGL's pinch say they leave it out.var units = "Metric" persist(docs/ui.md "Settings that survive a restart"): kept across a restart — the runtime's store, a page's localStorage, LVGL's weakui_<id>_persist_load/_savehooks;do restart hmiin a test.let total = price * qtyin a ui (docs/ui.md "Derived values"): worked out each time it is read, written into each binding that reads it (every target makes it); setting it is an error. A ui'sletis no longer reported as the old spelling ofvar.valid name != "" else "Required"andon submit(docs/ui.md "Forms: valid and submit"): a form's button is enabled only while every field of its screen is valid — folded into itsenabled, so every target disables it; the web shows the message under a changed field; a test that submits while a field is not valid fails saying which.archec recover --uimaps a web form'srequired.confirm "Stop the motor?"on a button (docs/ui.md "Confirm a dangerous press"): its press runs only on yes. A danger button that sends a safety message without one is reported (ui-confirm). Tests answer it (do confirm hmi.stop,do cancel hmi.stop,expect hmi.stop.confirming). LVGL asks with an lv_msgbox, Slint with a question over the window, Qt Quick with a Dialog.every 1s { … }andon idle 30s goto Home(docs/ui.md "Timers and idle"), in the ui or a screen: the runtime runs them on the run's clock (a test case stops at each time one is due: virtual time), a goto in them is checked; LVGL makes lv_timers and reads the display's inactive time, Slint slint::Timers and the last callback, Qt Quick Timers and a press anywhere on the window.stale 500ms "—",loading "…",empty "…"(docs/ui.md "Stale, loading and empty"): what an element shows when the message it reads has not come for that long, until the first one comes, and what a list, a table or aforsays with no item. A value of a message with aperiodand nostaleis reported (ui-stale), a list with noemptygets a hint (ui-empty). The runtime knows when each message came from the simulator link; a test case stops a message and expects the stale text on virtual time. LVGL keeps the time each message came (the C target'sarche_ui_at_<port>_<msg>); Slint and Qt Quick draw afor's empty text and say they leave stale out.
drawings in a requirement's text#
on a line of its own in a requirement'stext """…"""shows a drawing in its place, between the paragraphs around it. The name is a drawing asarchec diagram --listnames it:Kettle.states,Kitchen,Kitchen.kettle.states, a scenario as a sequence diagram (Boil) or one of its sequences (Boil.reading), a viewpoint,deploy:Car,states:Kettle; or an image file of the project (a name with a/or an image extension, relative to the file). No new keyword, no new command;figurelines keep meaning "after the text", and a one-linetext "…"is read as before.archec check:figure-reffor a name that is no drawing and no file, with the name it probably means (archec fixwrites it); an image is checked as a figure's (figure-file,figure-format,figure-size). The name is a reference of the model: renaming the component, the system, the scenario, its sequence or the viewpoint (archec refactor rename, F2) renames it.Scenario.sequencewith a sequence the scenario does not have is no drawing any more (archec diagramdrew the first one).archec polarion pushputs each picture where it is written (<img src="attachment:kettle-states.svg">with the caption under it, as a figure). Each drawing is drawn once per push, with the layout file applied, and attached to every work item that shows it;polarion.lockrecords which reference each attachment is (inline:) and its hash. An unchanged one is not uploaded; a changed one (a guard edited) is replaced, alone.--dry-runlists eachnew,changedorunchanged.archec polarion pullgives it back as the same reference: moved in Polarion, the reference moves; deleted or redrawn by hand there, it is asked (ID.drawing:<attachment>:modelputs it back;imagesaves theirs underfigures/polarion/and the text shows that file;droptakes it out of the text;skip); a new picture put between paragraphs in Polarion is saved and referenced by its file. A paragraph wrapped over several lines in the model and one line in Polarion is the same paragraph: no change is taken for it.archec doc --html, its Markdown, and the ReqIF export show each picture at the same place (a drawing as SVG or Mermaid, an embedded object in ReqIF).- VS Code: after
 besides thefigureline.
0.19.023 November 2026
data apps at scale, Polarion both ways
a date filter on every dataset#
- A filter bar's
datethat names no field (filters { date last 30d }) filters every dataset of the screen, each by its owntime, where it was silently dropped when the datasets named their time differently (time at,time ts). A dataset of the screen with no time is not filtered, andarchec checkwarns, naming it and the screen.date at last 30dfilters only the datasets with a fieldat, as before. The DuckDB queries get the same filters.
data apps in Qt Quick#
archec gen --target ui-qmldraws a data app's kpi, line, bar, xmr and table, as LVGL and Slint do, where it had a placeholder. A kpi is its number and unit, its change against the comparison and its target (a number, or the requirement's limit); a line and an XmR chart are drawn on aCanvas, a point per set, the last 60 kept, the target dashed, an XmR's mean and natural process limits (mean ± 2.66 × the mean moving range) worked out as values come; bars on aCanvas, a colour per metric, at most 12; a table as rows of labels under its columns, at most its page. Plain Qt Quick: no Qt.labs, no other module.- The data hook is
UiModel'sdata.<element>key, a map set withsetValueor over the WebSocket bridge ({value, compare},{y: […]},{bars: [{label, values}]},{rows: [[…]]}); a chart's key takes a point at each set, even one equal to the last. Afrom livedataset's metrics (count,sum,mean,min,maxof one variable) are worked out by the UI from the part's variables, a key each: set them, then callUiModel.live()or send{"type":"live"}, one row. The README anduimodel.hlist each key and its map. - Every other data element (an area, a pie, a heatmap, a pivot, the filter bar, a piece) is still a label in its place, with the same note as on LVGL and Slint.
large datasets in DuckDB#
- A data app's large dataset is queried in DuckDB, in node: a
csvorjsonfile from 32 MB, or 200,000 rows of another source. The same results as the query engine: each query becomes SQL, and one DuckDB could answer otherwise (a column of numbers and texts mixed, a text against a date-like text) stays the engine's.ARCHE_DUCKDB=off|on|<size>chooses.@duckdb/node-apiis an optional dependency, loaded only when needed. Without it, the engine answers. - The page holds no rows of it.
archec ui previewruns what each data screen first shows, and the page carries those results. A served page (--serve,POST /query) and the VS Code UI Preview ask node for the rest. A table of rows shows the first 1,000, and a histogram comes binned. The extension ships no DuckDB, so there the engine answers. - 2,000,000 rows: loaded in ~1.5 s, a screen's nine queries in ~0.1 s (the engine: 20 s).
a requirement renamed everywhere#
archec refactor renameof a requirement reaches everything that names it. The model and[id]in its texts, and the comments and marks of your code (// REQ-X,@req REQ-X,ARCHE_TEST("REQ-X")). Evidence, approvals and baselines are history and stay as written: they are read througharche.renames.json, soarchec statusgives the same verdicts under the new id andarchec changessays renamed, not removed and added.--dry-runlists every file. The editor's Rename records a requirement's rename in the journal too. For scripts:renameRequirement(projectDir, program, from, to, { dryRun }).
Polarion both ways#
archec polarion push: a pull and a merge first, then only the requirements taggedpolarion(--tag,push.tag) are sent. New ones are created, changed ones updated, links made once every id is known, a new one placed inpush.document. Nothing is deleted in Polarion. A draft id (NEW-FAN-START) is renamed to Polarion's id after the create, everywhere (push.ids: localkeeps it, mapped by the lock). Each created item carries its draft id, so a run that broke half-way never makes it twice. It asks before sending (--yes), and--dry-runprints the requests.- A pull merges instead of rewriting
out::polarion.lock(committed) keeps what both sides had at the last sync, and each field is compared three ways. Polarion's changes come in, yours stay, only the properties that changed are rewritten. Conflicts are asked in the terminal, answered with--here,--thereor--decisions, or written to.arche/polarion-merge.jsonin CI, with nothing changed. archec polarion status: the delta, field by field, with nothing sent or written.archec statuslists the drafts not yet pushed (push.draft-prefix).- Text and figures both ways. A pull writes Polarion's description as formatted text (the Markdown subset) and each picture as a
figureline, downloaded tofigures/polarion/<work item>/; a picture with its Mermaid or PlantUML source attached comes back as its block. The lock keeps each attachment's hash, so an unchanged one is not downloaded again, and the HTML of a description the subset cannot hold, which is then never sent back unless you edit the text (the push warns first). A push uploads only the pictures that changed, draws the figures of the model as SVG (and PNG) marked generated, and replaces them when the model changes. Pictures are compared by hash: changed on both sides, the terminal shows each version's name, size and hash, and[o]penopens the three. A drawing edited in Polarion asksmodelorimage. Texts conflict paragraph by paragraph.push.max-imageis checked bypolarion.yaml,archec checkand the push alike.archec reqif in.reqif(or.reqifz) reads the XHTML as the subset and its objects as figures. .archeenv: your token (POLARION_TOKEN,POLARION_URL) besidemain.archeor in~, after the environment.archec newignores it in git,archec checkwarns when git tracks it or others can read it, the egress gateway never sends it and masks the token,archec config showsays where it came from, and the Claude Code plugin's guard refuses an agent reading it.- VS Code: Arche: Sync with Polarion… (the command palette, the Documentation view's title bar): the tags to push picked from the requirements' tags,
archec polarion push --dry-run(it reads Polarion and its attachments, changes and sends nothing) shown as counts (taken, to push, not pushed, conflicts, new, deleted), then a merge panel, one requirement at a time. Base, here and Polarion side by side with the changes highlighted, formatted text drawn and pictures shown; a question per paragraph (ID.text.N) or figure, a picture changed on both sides shown three ways (the base from.arche/polarion/pictures/, Polarion's downloaded on Show Polarion's picture), a drawing edited in Polarion answered model or image; Keep here, Take Polarion, Edit…, Skip (keep, recreate or drop for a deletion), Next conflict, and keys for each. Apply writes.arche/polarion-merge.jsonand pulls with--decisions; the list to send follows, and Push runspush --decisions … --yes. With no token, it offers to write.archeenv(a password box, mode 600, added to.gitignore); when the egress gateway refuses, it runsarchec config allow polariononce you confirm. - VS Code: pictures in a requirement. An image pasted inside a requirement is saved as
figures/<id>.pngbeside the file with afigureline (VS Code 1.97 and later); Arche: Insert Figure… does it from a file; the hover shows the pictures, sized to fit, on Windows paths too; Arche: Preview Requirement shows the text and figures beside the editor.
a requirement's formatted text and figures#
- Formatted text. A requirement's
textmay be a"""…"""block in a small Markdown subset: paragraphs, bold, italic, headings, lists, tables, links and inline code. A one-linetext "…"reads as before.archec checkwarns about a malformed table or a mark never closed;archec fmtlines up a table's columns. figure, written once per picture: an image file and its caption (figure "figures/pump.png" "Pump and valves"), an element archec draws (a scenario as a sequence diagram, a system, a component or a state machine), or amermaid orplantuml block.archec checkreports a missing file, an unknown element, another format, and an image overpush: max-image:in polarion.yaml (5 MB).- Where requirements show.
archec doc --htmlshows the formatted text and the figures (images in the page, drawings of the model and mermaid blocks drawn as SVG); the Markdown has them as Markdown and Mermaid.archec reqifwrites XHTML with each figure an embedded object, and-o x.reqifzputs the files beside it. The hover shows the text and lists the figures; completion offers the images beside the file, the scenarios and systems, and the diagram blocks. - Drawn offline. A mermaid block is drawn in headless Chrome by a Mermaid already on the machine (
$ARCHE_MERMAID, or the Arche app's); a plantuml block by aplantumlcommand or$ARCHE_PLANTUMLwith Java. Without one, the text is kept and a note says why: nothing is sent to an online renderer. - For Polarion both ways: Polarion's description HTML read as the subset and its pictures (formatting it cannot hold flagged), the subset written back as HTML, and a three-way merge paragraph by paragraph and table row by table row (src/polarionrich.ts, src/polarionfigures.ts).
strings in the Rust a body becomes; a ui press sets the part in the browser simulator#
- Embassy Rust: strings compile. A text written in a body is the crate's string (
arche_str("OK"), aheapless::String<64>cut at a character), wherever it goes: a variable, a field, an argument, a return, a comparison. A string or a record of the part stored, given or returned is a copy (.clone()), the part keeping its own; a string parameter kept in a variable too, since the body may use it again. Numbers, bools and enums are read as they are. - Browser simulator: a ui press that sets a variable of the part sets it in the run (
beams = 3, a stepper bound to it), as a test'sdo part.v = xdoes: the part's code and a test line see what the user set, not only the page.
float32 maths as no_std Rust and C compute it#
- The maths of a float32 is float32's.
sin,cos,sqrt,pow,atan2of float32s are float32s, generated aslibm::sinfin Rust andsinfin C (float64's as before): a body written from Rust or C that computes in f32 gives the same bits once generated, where it used to go through f64. - New builtins:
log10,acosh,round(halves away from 0, as Rust and C round),to_radiansandto_degrees(Rust's own,x.to_radians()),is_nan, in every target and both simulators. %of floats is the remainder towards 0 (fmod), with the dividend's sign; it used to be refused.- Rust:
floor_mod(x, 360)by a positive number written isx.rem_euclid(360); a struct of numbers, bools, enums and fixed arrays isCopy, so a function can take it by value and its caller go on using it; a float constant written with an exponent (3.40282347e38) is a valid literal.
0.18.020 November 2026
user interfaces, checked
Thirteen additions to the ui language (ui.md), each checked by archec:
- Navigation as a structure:
navigation { sidebar Home, Tickets, Team },tabs …,Main -> Details. The targets draw the bar; archec proves every screen is reachable (ui-unreachable) and every pushed screen has a way back (ui-no-back, with a quick fix); tests readhmi.pathanddo back. - Focus order for keys and encoders:
focus order speed, mode, start,focusable; every control reachable by focus (ui-focus); an LVGL group per screen, Qt Quick's KeyNavigation, a focus ring on the web;do focus next,expect hmi.focused == mode. - Named slots:
slot header,slot body required, filled asCard("x") { header { … } body { … } }(ui-slot). - Two-way bindings: an element's
bindparameter writes back, checked for type, unit and range. - Environment values:
environment density: Density = regular,provide density compact,env.density(ui-env). - Control styles:
style button { … }and variants (style button quiet { … }), under a control's own look. - On appear, on disappear, on change, with loops warned (
ui-loop). - Lists with identity:
id,section,selection(one or several), rowaction "Close" { … },on refresh;do select,do action,do refreshin tests. - Transitions and animation:
transition fade 200ms,animate 150ms;shownturns true when it has faded in. - Several displays:
displays { phone: 390x844, desktop: 1280x800 }, each built and checked (ui-fitsays which),archec gen --display, goldens per display. - Preview matrices:
across locale en fr,across display …,across theme …,across scale 1 1.3: a grid, every cell checked for fit and contrast. - Accessibility:
a11y "…",describe "…",heading, a supported textscale; an icon-only button without a name is warned. - Charts of a list:
chart power { value …; item s; line x s.at y s.kw; rule y REQ-POWER }, units checked per axis, drawn by the data apps' chart engine, LVGL's lv_chart and a Qt Quick canvas.
examples/web-app uses them (a phone and a desktop, its navigation, a selectable list), and examples/wheat-drones' ground station charts the station's power and the field's moisture.
0.17.520 November 2026
constants in equations and bodies; messages named like HTTP verbs
- A component's constants reach its equations and its
ts andpython bodies:component Pack { const CELLS = 14; equation der(soc) = -i / CAPACITY }, `fn main ```ts self.n = CELLS ```` — in the checker, both simulators, the physical network (Modelica, FMI), the Arche project (written as their values, which Arche knows) and the generators. - A message named like an HTTP verb is a message.
in p: data receives PUT { handler PUT -> f }runs its handler; a route is a verb with a path (handler GET "/status" -> f), or a verb that names no message. - A part's variables are its own. A body that reads a part's variable (
pads[1].drone,one.drone) is told so: the part says it on a port (a copy with its number), its owner keeps it; a test line reads it, and a copy's number or variable that does not exist is now an error there, before the run. - examples/wheat-drones: the pack's physics constants are the pack's, the planner's and the recorder's theirs.
0.17.420 November 2026
a run from the Testing view proves its requirements
- Run Tests updates what proves each requirement. A run from the Testing view or a Run Tests lens is recorded as
archec testrecords it (.arche/evidence/test.jsonl), on the desktop (arche-cli) and in the browser (the browser simulator): the lens above a requirement turns from "nothing proves it: … never ran" to "proved" as soon as the run ends, andarchec statuscounts the run.
0.17.320 November 2026
repeated parts, self., constants in a component, hectares, expected failures
- Repeated parts run as themselves.
part pads: Pad[4]ispads[0]…pads[3]inarchec simandarchec test: each copy has its own variables, state machine and mailbox (and its number invar index).a.out -> pads.cmdreaches every copy,pads[2].cmdone,pads[slot].cmdthe copy a message's field names;pads.done -> a.incomes from any copy; tests readpads[2].state. The Arche project gets one component a copy with its links (a copy picked by a field reaches every copy there: warned). A generator building a repeated part warns (repeated-deployed). (populations.md) self.xin an ```arche body: the part's variable, when a handler's parameter has its name (fn on_battery(low: bool) { self.low = low }), in every target; a parameter that hides a variable gets a hint.- Constants inside a component:
component Station { const PADS = 4; part pads: Pad[PADS] }, seen in its bodies, guards, sizes and copies, not outside; written as their values where Arche and the generated code do not know them. - Hectares:
ha,L/ha,L,L/min,m2in the units;rate × width × speedchecks as a flow, andunit-scalesays the factor a number needs (× 0.006 for L/min). - A requirement expected to fail:
requirement REQ-X { expect fails; limit … }keeps a what-if in the model: shown✓ expectedbycheck,test,profile,queueingandpopulation, counted apart byarchec status, warned when it holds after all. - A
sendthat leaves fields out fills them with zero (0, false, "", the first enum value) in every simulator and the ui, as the generated code already did. - examples/wheat-drones uses all of it: the charging rack is 28
SlotChargercopies with their packs, the station 4Padcopies; the what-ifs are expected failures. - Fixed: a component constant as a copy count; constants written as expressions read null in bodies on the browser simulator;
do x.a[2] = 1.5in a test; a case whose links pick a copy runs on the browser simulator; a long case past 100 000 events is no longer cut silently (2 000 000, then an error).
0.17.220 November 2026
drones watering a wheat field
- A new example,
examples/wheat-drones: a whole operation, from what it must do to how it is wired, in about 60 files. A fleet of 4 to 12 spray drones (apopulation) keeps 5 m apart by its plan and by drone-to-drone messages; the drone as built (flight controller, RTK navigation, a spray rate that follows ground speed) is deployed on its boards; a field station swaps batteries and charges them (14 cells and their BMS as equations, a CC/CV charger that cools, balances and refuses worn packs, 28 slots sharing 45 kW); a ground station plans the passes, keeps everything in a database (12 tables, SQLite and PostgreSQL, a migration) and shows it all on an Overview screen; the hardware has its pins, CAN bus, harness, mass, power and cost. Its README tells what the model found and what changed: 12 packs and 9 kW could not keep up, 85.9 % of flights landed with their reserve before packs were retired at 85 % health, and the fleet came within 0 m at 8 drones before the planner spread the strips. In the playground it opens on the whole operation; Run shows the Overview. - Fixed:
state != Sin an ```arche body ran as its opposite in Arche's simulator and in the browser (!self.state === "S"); a preview's times in the Run view are counted from itsenv.now, and the Run view opens an example on its first preview when it asks to.
0.17.119 November 2026
web apps in the ui
- A web app's look, to the pixel. A
uiwithinput pointerdraws a web app as it looks: boxes (backgroundwith gradients and dotted patterns,borderandsides,radius,shadow,margin,opacity,clip,scroll,backdrop,scale), text (size,weight,tracking,leading,case,font,digits tabular,wrap,lines 3,underline,italic), grids (columns 260, 1fr,fill 200),row { inline }for words and pills flowing as one text,align baseline, the ui's own colors, icons, shadows, font andsmoothing antialiased. Looks on a condition (if on { background tint }) and from the data (background b.tint,width a.share * 100%,grow,opacity, an icon named by the data). - A large app.
include "pages/home.arche"inside a ui (one file a page),slotin an element of your own (a frame every page shares), anifon what is known when the ui is built (one menu, the right line open on each page), a use that takes look properties (Tile(…) { color alarm }). - Tables whose cells are drawn.
table t { value api.X.rows; item r; head { … }; rules top; column "Title" { … } }, with a control in a heading (row head { toggle all { style check } }),valign,rawcolumns,empty. - Formats and previews.
${n:# ##0},${x:0.##},${n:compact},${d:day},${d:date},${s:duration},${at:ago}(from the preview'senv.now),${xs:join ", "};translateon a value of the data; a previewload "data/monday.json"s the server's answer as it comes;env.locale = "fr". - Fields drawn as the page's own: an
inputorselectwith a look,type search/date/number,lines 3(a text area),hint, a checkbox (toggle { style check }). - A new example,
examples/web-app: a help desk in five files — a shared frame, three pages, previews from a file, French, and a test case (docs/ui.md). - In the browser. The extension is a web extension too: on vscode.dev, github.dev and arche-lang.xyz/code the language server, the Arche side bar, the diagram and its simulation, the UI preview, data apps, the 3D scene, animations, the test plans (Python bodies on Pyodide), Build Project and Generate Code… run in the page, with nothing installed. What needs a program on your computer (the terminal, CAD, GHDL, containers, the Arche app, the Store) says "Desktop only" there (docs/editor.md).
0.17.019 November 2026
kinds of your own, checks, packs, uncertainty, profiles, queueing and populations; data apps; databases
- Kinds of your own.
kind pump "Pump" { prop flow: float64 unit m³/h; relation feeds -> pump | tank [1..*]; children valve; check flow > 0 "a pump must move something"; draw circle }, thenpump P1 { flow 12m³/h; feeds T1 }: a domain's kinds of thing, their properties (typed, unit-checked, required or optional), children, relations with counts at both ends, checks and drawing, without recompiling archec.kind booster extends pump. Kinds from a package keep their short name while it is unambiguous,process-plant.valvewhen two packages have one. Elements go toelements.yaml, the model JSON, the diagram (archec diagram main.arche elements) and the Model tree (docs/kinds.md). archec query.archec query main.arche "pump feeds T2","P1 feeds ?","pump feeds+ T2","* owns P1","pump where flow > 10m³/h": the model as a graph of elements and relations, the language's own traces too.- Checkable requirements.
requirement "Budget never negative" { check budget >= 0 }inside avar,fnorstates: a condition on the model (count(fns(self)) <= 15,exists v in vars(self): tagged(v, key),count(incoming(feeds)) >= 1) proved byarchec check; an invariant, a precondition or a postcondition withold(x)checked by the simulator on every step and call, and as asserts in C with--defensive;not reachable(A -> B)on a state machine, sent to NuSMV byarchec verify. One condition language for requirements and kinds; each result is evidence inarchec status(docs/checks.md).limitstays for a number a tool measures;checkis a condition. - Packs. A pack is a library of kinds, relations, units, checks, requirements and a template for one domain, on a seventh store shelf:
archec shelf add main.arche process-plant. Ten ship with the language and work offline: process-plant (P&ID: tanks, pumps, valves, instruments with ISA tags), services (APIs, endpoints, SLOs, scaling, brokers), networks (switches, VLANs, subnets, TSN slots), ml (datasets, models, training runs, evaluations, drift monitors), organisation (teams, roles, RACI on workflow tasks, SLAs), manufacturing (lines, steps, test stations, maintenance, spares, obsolescence), cost (one-off, unit and yearly costs against a target), harness (connectors, cavities, wires, AWG tables, voltage drop), sites (buildings, rooms, zones, coverage) and compliance (clause catalogues of ISO 26262-6, DO-178C, IEC 62304, UN R155 and the EU CRA, with claims per clause inarchec status; the clause numbers are to be checked against the standards before an audit). docs/packs.md is the recipe to write one. archec import table.archec import table equipment.csv --as pump --map "Tag=name,Feeds=feeds"turns a CSV, JSON or YAML list into elements of a kind, typed and unit-checked; a row that does not fit is told by its number and left out; a second import updates the same file and keeps what was written by hand.- Uncertainty. A value written as the spread it is drawn from:
normal(10kΩ, 1%),uniform,triangular,lognormal,exponential,choice. A single run reads the mean, so nothing else changes.study yield { monte-carlo 1000; run }simulates the test cases over draws: "REQ-GAIN holds in 99.5 % of runs, 98.8 % … 99.8 % with 95 % confidence", the failing draws replayable witharchec sim --draw yield:137.holds 98%on a requirement is the share it needs (docs/uncertainty.md). - Profiles over time.
profile day { repeat 15; phase sunlit 50min { mode IMAGING }; phase eclipse 35min { mode ECLIPSE }; stock battery { capacity 40Wh; start 100%; flow solar * 0.9 - power } }andlimit day.battery >= 30%: power, data or cost phase by phase, stocks that add it up, a table and an SVG chart witharchec profile(docs/profiles.md). - Queueing models.
queueing packing { source orders every exponential(2min); queue waiting max 50; server packer count 3 takes normal(4min, 1min); sink shipped; orders -> waiting -> packer -> shipped }andlimit packing.waiting.wait.p95 < 10min: discrete-event simulation of factories, clinics or networks witharchec queueing— waits, lengths, utilisation and throughput over seeded runs, shifts from a profile, checked against queueing theory (docs/discrete-event.md). - Populations.
population robots: Robot count 40..80 { spawn every exponential(15s); retire in Delivered }: as many instances as the run decides, each with its own state machine, messages to all of them, a random one or the one a field names, and limits on aggregates (limit p95(orders.waited) <= 90s,limit share(robots.Charging) <= 33% after 10min).archec populationruns it; a few thousand instances over a simulated hour take seconds (docs/populations.md). - Data apps, the templates' rough edges. A date filter's own preset is worded:
date last 60doffers "Last 60 days" ("60 derniers jours"), and weeks, months (mo) and years too. Abarorstacked-baron a time writes it at its grain, in time order, as a line does. A bar withcompare previous perioddraws the period before beside each bar, lighter (a dashed tick on a stacked bar), and the legend names it. An XmR chart's range holds its target, so a requirement's limit far off the process is drawn inside the plot, and a line's label near the top goes under it.metric vout = mean(vout)is warned (data-field, with a name to use:vout_mean); a table ofrows, a histogram and awhereread the field, a chart or a kpi the metric.floorplan state by bench, x, y, w, hcolours the boxes by a word: status colours for ok/pass/running, warning, fail/error/down, a colour each for the others, and a legend. A data app's first run sayschecked, wrote the web page …, built the preview …, not "simulated 0 ms", and its next step isarchec ui preview --serve. A datasetfrom budgetsreads the model's own budgets, a row per part, with its words (prop maturity = "quote"): the budgets-sheet template now reads its drone's parts, not a CSV. A requirement that says "within 100 ms" is a most. The templates name their metrics apart from their fields; process-chart putsREQ-VOUTback on its XmR chart, bench-map colours a plan by state, signal-explorer compares its bars by site. - Data apps a reader moves, and the last ten templates. A slider, an input or a stepper with
param NAMEmoves aparameterthat metrics name, and the screen is worked out again;scenariosputs the metrics at the written values beside the scenario and saves scenarios. A table of rows takesreview approve, reject by chainwith a Sign off.replay { date last 7d }plays a screen back in time.askreads a question in words with no AI.canvasdrawsblocksthe reader adds,dice,linkslit by a status, or awalkwith the arrow keys. A story step'sscreenis drawn with its numbers byarchec story export. New checksdata-param,data-review,data-story. Templates: what-if-parameters, build-planner, log-reconciliation, fleet-ops-centre, chart-canvas, ask-the-data, chart-dice, trace-field, model-walk and data-story. - Data apps say what they mean. A target knows which side of it is good:
target <= 80is a most, and so is a requirement whoselimitsays<=or whose text says "below 80 °C" — a peak of 79.3 °C now shows✓ Target ≤ 80 °C met, not "not met" (ChartSpec.target.better). A table's total line adds up only counts and sums; amaxcolumn shows the highest, aminthe lowest, a mean or a rate nothing (DColumn.total). A baseline comparison is named ("Compare with the baseline firmware == "1.3.0"", in French too). Hour and minute axes say the day where it changes. Chrome for--pngandarchec ui snapshotthat ends before its picture fails at once, not after a minute;runChromeAsyncruns it without blocking. - Data-app templates.
archec new my-app --kind data-app --template <id>starts a data app that opens on sample rows made from a fixed seed, and its first run writes the page (--target ui-web) and draws it once;archec new --kind data-app --listshows the templates. Fifteen are there: product-overview, fleet-cohorts, verification-funnel (fromarchec status --json), resource-budget (fromarchec analyze --json), telemetry-anomalies, signal-explorer, release-sheet, trace-sheet (fromarchec sim --json), process-chart, signal-in-depth, metric-catalog, store-usage, stepped-pivot, bench-map and budgets-sheet (the gallery). Also:funnel written, tested, provedtakes its steps from its metrics; a table grouped by several fields shows each of them;from jsonreadsarchec status --jsona row per requirement; an analysis thread has itsload. - Databases (an extension:
database). Adatabaseblock says how a system keeps its data: tables written as structs, withkey,unique,index, relations to other tables (customer: Customer on-delete cascade,orders: Order[], many-to-manyviaa join table),checks and ranges. The checker resolves every relation from both sides, with quick fixes (add a key, addvia, make a fieldoptional). The simulator keeps the database in memory: a test case writes rows and reads them (do Store.Customer.insert({ … }),expect Store.refused("unique") == 1), a handler does too, and a rule that sayssatisfiesis recorded as evidence with who enforces it. Providers are plugins —sqlite,postgres,clickhouse,duckdbandmongodbship in the extension, and one of your own is found the same way — and write the schema, the migrations (what loses data left as comments) and typed access code; what a provider does not enforce is reported. Show Database Layout draws the tables and their relations, Generate Database Schema… runs a provider, Write Database Migration… writes the migration from a baseline, a git revision or a file; hover and go to definition follow a relation to its table andviato its field (database.md). - Data apps on a device, through MCP, and in the plugin.
--target ui-lvgland--target ui-slintdraw a data app'skpi,line,bar,xmrandtablefrom a data hook the device fills (ui_<id>_data.c, written once; the Slint glue's<Id>Data); afrom livedataset's metrics are worked out from the part's variables of the same name, one row per update. Every other data element (a heatmap, a pie, the filter bar…) is a label and a generator note, never silent output;--target ui-qmlsays so for each.archec mcphasdataset_list,metric_query(the result a chart draws, with each column's lineage) anddata_app_check; the Claude Code plugin has abuild-data-appskill. - Data apps in the language.
dataset(rows from evidence,archec sim --json, the tries,archec analyze --json, CSV, JSON,archec live, OTLP traces) andmetric(count(status == pass) / count() unit % in Runs,p95(duration), atargetthat is a number or a requirement'slimit) are declared in the model; auishows them withdisplay web,kpi, the chart kinds (line pass_rate by at week; split board,heatmap,xmr,histogram…),filters { date last 30d; select board }, tables withrows,group,pivot,sort,page,export csv, andon select filter|drill Case(case). archec checks every field, unit and target (data-*,archec explain data);archec uilists each element's query; completion and hover know the metrics, fields, grains and screens. The query engine (src/dataapp/) is the same in node and the page, each number with its lineage. Example: examples/bench-console; docs/data-apps.md. - Data apps run where the screens are shown.
archec ui preview, the VS Code UI Preview, the simulator's page andarchec gen --target ui-webrun a data app on its rows: filters, cross-filters, drills into the ui's screens (itsbackcomes back), View rows, Export CSV and Inspect. In VS Code, Inspect'smain.arche:37opens the model there, Export CSV asks where to save, the colours follow the editor's theme, and the charts are drawn again when a data file changes.archec ui preview --theme light|dark,--pngafter the charts are drawn, and--serve, whose page follows its data files (archec liverewriting .arche/live.json).archec doc --htmldraws each data screen as a figure. Also:--pngandarchec ui snapshotno longer fail when Chrome exits with an error, or hangs, after writing the picture (data-apps.md). - Data app charts and their page.
src/dataappdraws every chart kind of a data app as inline SVG, with no library and no network: kpi tiles, line, area, bars, pie, scatter, heatmap, funnel, XmR, histogram, sparkline, map, floor plan, tables and pivots. The page runtime lays them out in a grid. It adds the filters bar, cross-filter, drill with a breadcrumb, compare, View rows, CSV export and Inspect, which shows the query, metric, dataset, model line and requirement behind a number. Light and dark, English and French.node tools/dataapp-gallery.mjs <dir>writes a gallery of every kind. - The grammar's words are the language's. Its keyword and property lists are written from the spec by
tools/grammar.tswhen the extension is built: every word that opens a declaration is coloured as a keyword, indented or after{too (58 never were); the old spellings (msg,block,variable…) are not; a hyphenated property (stale-after,on-deadline) is one word; in a ```arche body,2minand0o17are not coloured as numbers, as the action language does not read them. archec checkand the editor word a message alike. Both take the beginner's plain wording from the same rule:--beginner/ARCHE_LEVELorarche.levelwhen set, otherwise the project'slevel(simple, or no level and only the simple set used). Andlamp.cdmnow suggests the port,Did you mean 'cmd'?, not the partlamp.- ui binding completion follows the parts down.
${motor.la.}offers the variables of the partlainmotor, as the binding reads it; before, completion stopped at the first part. - Hover and go to definition in a test plan's lines.
panel.speed.textgoes to the part, then to the element of itsui;physics.load_wto the variablewof the partload— the names the test reads. - Hover and go to definition in a ```python body.
self.speed(the part's variable, port or function, inherited too), a message (GO(True)), a state in a string (goto("Run")) and a constant, as signature help already resolved them. - More signature help. A call of one of the part's functions in a body (
scale(n, …),self.scale(…)in Python), inherited ones too; the action language's builtins (clamp(x, lo, hi)); and a part's parameters after its definition (part m: DcMotor(r = 2Ω, …). - Completion inside bodies. In a
arche body: the action language's words and builtins, the component's variables, ports, functions and states (inherited ones too), its parameters, the function's parameters and locals; after `goto`, the states; after `send`, the ports, then what the port carries. In apython body:self.'s members, the messages, and the states in a string. Before, both offered the model's declaration words. - Hover on a keyword, in its context. An old spelling (
msg,block…) says it is one, an error thatarchec fmtrewrites, instead of documenting it as valid; a property of a one-line block (component H { kind sensor },project "T" { edition "1.0" }) is that block's; a name in a path (c.state) no longer gets a keyword's card. include "std/physics"in the editor. Go to definition opens the file the compiler reads — the standard library's, a library's — not a path beside the model that does not exist; hover on an include says where it is and what it declares; completion insideinclude "lists the standard library and the libraries' files too.- Completion after
->offers the inherited states. Incomponent Pump extends Base, a transition's target may be one ofBase's states; completion now offers them, as the checker accepts them. - Completion offers
part,in,outandinout. At the start of a line, every word that opens a declaration there, not only the first spelling of each; the old spellings (msg,block,variable…) are still never offered. - Generate Code… offers every target of
archec gen. The list comes from the CLI's own table, each target with what it writes: C++, the C tests, ROS 2, the protocols, the build systems, the UIs and the rest, not only the 12 it had. component Pump extends Basekeeps its name. At the top level it is a definition (PascalCase); the naming hint, and its preferred quick fix, no longer rename it topumpas if it were a part.arche.format.indentis used. Set, it is the indentation Format Document and format-on-save write, whatever the editor's tab size; unset (now the default), the tab size. Before, the setting had no effect.- A file not saved yet works. An Untitled arche-lang document is checked in memory: its diagnostics, completion, hover and the rest. Before, every request on it failed.
- Wording that matches the language. Move … to a file names the declaration by its word as written now (
Move message 'GO', notMove msg 'GO'); the docs say Arche: Show Cheat Sheet and the Navigation view, as the editor does. - The Claude Code plugin, more of it. A skill per page of the command docs (
start,write-and-check,requirements,build-and-test,generate,refactor,store…), each short and pointing at its page; atest-fix-loopskill and the/arche-lang:test-fixcommand, which runarchec checkandarchec test, fix the model and repeat until the requirements pass (5 rounds at most, and it stops when a fix is a person's decision: a link, an approval, a requirement's text); its scripts in Node (bin/archec.js,bin/arche-hook.js) instead of POSIX shell, so it works on Windows too; and an icon (provenance.md). - The timeline in VS Code, with zoom and many messages. The diagram panel's ▶ Run shows the simulation page's timeline under the diagram, in the editor's colours: the same lanes, cursor, values where you point, click to go back, and lanes added and removed; ⏱ hides it. In both, the wheel (or a pinch, + and −) zooms on the time under the pointer, a drag or Shift+wheel pans, and Whole run shows it all again; the axis follows. Messages too close to draw apart become one counted mark (
AIR ×1200) that names them when you point at it, and split again as you zoom in (sim.md). - A
parameteris read in behaviour code. A body reads aparameterby name as it reads a constant, in the simulator and in the generated C, C++, Go, Rust, Python and TypeScript: itsvalue, or itsexprworked out to a number. Before, only aconstcould be read (spec.md). - The cube scene grasps again after a slip. In
robot-cube, when the face slips out of the fingers (the pad no longer feels it, or a camera over the cube sees it behind the wrist), the arm lets go, squares its fingers to the face, grasps again firmer and turns on from there, at most 3 times. A new requirement (REQ-CUBE-REGRASP, with its monitor) and a test case that makes the grip fail mid-turn (robot prototyping). archec fit --pass: a requirement triggered in one case only (when planner enters Regrasping …) is decided in that case; the cases where it never triggers no longer make every try inconclusive.- A plant's sensors in the traces. Against a plant (
--plant, MuJoCo'splant_bridge.py), eachinputsays which sensor sent it,archec sim --jsonlists every reading (sensors), and the tries ofarchec fit --passkeep them as signals (source: "plant").archec sim --plant … --htmlwrites a page that replays the run, each sensor a lane of the timeline (sim.md). archec test --allow: an allowed case is not a failure. A case the allow list names (a known failure) no longer marks the requirement it verifies as failing, is not recorded as failed evidence, and the first run ofarchec newsays1/1 tests pass (2 allowed to fail)instead of1/3.- Negative constants in every generator.
const GRASP = -0.082is now written in the generated Go and C++ (it was left out) and Rust (it was 0), as it already was in C. - Servos and a gripper in the hardware store. The SG90 micro servo, the MG996R servo and a two-finger servo gripper (
ServoGripper, a newGripperinterface:open(),grip(force),width()), each with its Rust driver for Embassy and its simulated version. The PCA9685 has its 16 channels as ports: a servo linked topwm.ch3is driven through the chip, whicharchec gen --target embassywrites every 20 ms. The Rust driver ofHobbyServonow takes the model's radians (it took degrees, somove(1.5)turned it 1°). - The robot scenes on a bench. robot-draw, robot-cap and robot-cube each have an
arm.arche: the same planner on a Raspberry Pi Pico, the joints on MG996R and SG90 servos and the fingers on a servo gripper, all on a PCA9685, and a servo drive between them.archec gen arm.arche --target embassygives firmware that builds for the Pico;archec sim arm.archeruns the bench with the servos simulated (robot-prototyping.md). Nothing has run on an arm yet. - Robots in 3D in VS Code. Arche: Show in 3D opens the model's bodies beside the editor, with the tries of its newest tuning run (
archec fit … --pass) to replay, scrub and play as a reel; a new try appears asarchec fitwrites it. It needs no network (tuning.md). - A run in the 3D view can be kept as a try (the playground's 3D tab): run the model on MuJoCo, keep the run, change a value, run again, then compare the tries or play them as a reel.
- Embassy code generation fixes, found on the robot scenes: a negative constant (
const PEN_UP = -0.06) was written as 0;int(stamp)of a 64-bit stamp was cut to 32 bits; a port'shandler MSG -> fnwas not called (a TODO stood in its place);f(g())where both are the part's functions did not build (two borrows); a device callservo.move(…)was namedcall_servo_r#move; a function namedon_<port>clashed with that port's input method; the quantityAngleand a messageANGLEwere bothAngle; a local passed to a function wasmutfor nothing.
0.16.319 November 2026
the development environment in VS Code, aligned edits and field properties, fmt-clean new projects
- A timeline in the simulation page (
archec sim --html, the playground's Run it, the store's Try it): every signal on one time axis, as a logic analyser draws a chronogram — state machines as named bands, messages as ticks, bools high/low, numbers as curves — with the clock as the cursor. Pointing reads each lane's value at that time; a click goes back to it; lanes are added from a list and removed with × (sim.md). - The development environment in VS Code. An Environment view in the Arche side bar lists the tools the project needs (from its kind, code, boards and handlers): found, missing, or at another version than its pin, with why and how to install each. The status bar says
env ✓orenv: 2 missing. Arche: Set Up Development Environment… writesmise.toml, aMakefile, a dev container or the package lists, each file shown in the diff editor first, and offers Reopen in Container. Install Tool… types the fix in a terminal only after you say yes (environment.md). - arche-lang as a Claude Code plugin. The repository is a plugin marketplace with one plugin,
arche-lang(claude-plugin/): the language server on.archefiles, the compiler's MCP tools, the guard and provenance hooks set up at install (only in a project with amain.arche), and anarche-langskill./plugin marketplace add <the repository>, then/plugin install arche-lang@arche-lang(provenance.md). archec lsp --stdio: the extension's language server on stdio, for any editor or agent that speaks LSP; the npm package ships it beside the CLI.- The model checked before an assistant's turn ends.
archec guard hookalso answers Claude Code'sStopevent: when the turn changed.archefiles, their models are checked and the errors sent back once, so they are fixed before the turn ends. - Added parts and ports line up. Adding a part or a port (the diagram, the quick fixes,
archec board add,device add,archec new --does) keeps a formatted file formatted: the newpart x: Tis aligned with its neighbours, which are re-padded when its name is longer. A file that was not formatted keeps the edit as made. - The examples of the language reference (docs/reference/) are aligned too.
- A new project is formatted from the start. Every template is as
archec fmtwrites it, andarchec newputs the lines it adds (handlers,level,uses, parts) where fmt puts them, soarchec fmt --checkand the format gate ofarchec cipass on a fresh project. archec fmtno longer writes adefaultsblock in a project at level simple:defaultsis beyond that level.- A field's properties in a column, as Go's struct tags. After the types, what follows a field's type (
= 0,"Label",unit m/s,range 0..10,{ … }) lines up across the fields next to each other, and the trailing comments after it, as gofmt lays out a struct's tags; a field with nothing after its type ends the column.archec fmtand format on save both do it; the examples are formatted this way (spec.md).
0.16.217 November 2026
format on save, types aligned as gofmt does
- Types in one column, as gofmt does. Consecutive
name: Typelines of one block (ports, parts, vars, a message's fields) get their types aligned, and the trailing//comments of neighbouring lines too. A blank line or another kind of line starts a new group. Only spaces inside a line change;archec fmtand format on save both do it, and the examples and docs are formatted this way. - Format on save, by default. A
.archefile is re-indented and its trailing spaces trimmed when you save it. Turn it off with"[arche]": { "editor.formatOnSave": false }.
0.16.117 November 2026
a 5G NR cell search example, FFT, LFSR and complex numbers on the shelf
- A 5G NR cell search, end to end (
examples/5g-cell-search,docs/5g-cell-search.md). A base station sends its synchronisation signal block, a channel adds noise and a carrier offset, and a receiver finds the block, its timing, the offset and the cell ID. It is a teaching model of one procedure, written from the formulas of 3GPP TS 38.211: not a 5G stack, and never run on a radio.- One part is hardware: the PSS correlator has a clock, runs on every sample in the simulator, passes the same cases on its VHDL in GHDL, and is synthesised for an ECP5-25F (9315 LUTs, 19.5 MHz for a 7.68 MHz sample clock).
- Requirements with numbers: the PSS found at 0 dB within one period, the cell ID decoded at 3 dB with ±10 kHz of carrier offset, each proved by test cases; the correlator's speed and size by synthesis.
- Three new algorithms on the shelf, which the example uses:
Lfsr(noise that repeats),Fft(2 to 256 points, on integers) andComplexwith the typeCplx.
- Models with a clock run about 5 times faster in the simulator. Storing an integer that already fits its type costs almost nothing now.
x & 0xFFno longer warns of lost bits in an FPGA component: it is what thefpga-widthwarning says to write.
0.16.017 November 2026
FPGA synthesis, several clocks, nested states, backpressure
- FPGA: several clocks. Parts of one system may have different clocks (
clock clk_uart 2MHz,clock clk 50MHz). A link between two clocks is made safe in the VHDL: aboolsignal goes through two flip-flops, a message through a handshake (arche_cdc.vhd). The checker refuses a signal of several bits between two clocks, and warns of a pulse into a slower clock (fpga-cdc). The simulator and the GHDL testbench run each clock with its own period, and a trace has one time line. - FPGA: states inside states. A state machine with states inside states, an initial child and a
pseudo choiceis flattened for the VHDL: each on-exit from the inside out, the action, each on-enter from the outside in; anaftercounts from when its own state was entered. The simulator and GHDL run it the same. A region and a history state are still refused, with what to write. - FPGA: backpressure. A receiver takes a message in the states that have a transition on it, or while its port has room (
depth 3); elsewhere the sender holds it. Asendon a full port is dropped and the test run says so (note: 2 TICK dropped…, anddropped(MSG)in a case); at the top offn mainit waits for room. The simulator does the same, edge for edge. - FPGA: picoseconds. Durations take
ps(wait 800ps,at 6.4ns,on "after 12800ps"). A 156.25 MHz clock runs at 6.4 ns on the simulator and in GHDL, and the traces keep the picoseconds. archec testwith FPGA parts runs the cases on the browser simulator, which steps the clocks: no--sim webto remember.- A new example,
examples/fpga-uart: a UART receiver on a 2 MHz clock sets the duty cycle of a PWM on a 50 MHz clock, with a handshake between them and bytes that wait their turn. - Arche: Synthesise FPGA Design. An FPGA design is now synthesised, placed and routed for a real device, with open-source tools (
archec synth). The device is thechipof the model'skind fpgapart: an iCE40 (chip "iCE40UP5K-SG48") or an ECP5 (chip "LFE5U-25F-6BG381"). The report in Arche Status says the LUTs, flip-flops, block RAMs and DSP blocks the design takes, and the highest frequency each clock can run at (fmax) against the one the model gives it.- A requirement bounds them:
limit Pwm.luts <= 500,limit Pwm.fmax >= 100MHz. A limit not kept is an error at its line. - Evidence, a rung above GHDL: each limit measured and each component placed and routed is recorded, and the lens above a requirement says
up to synth. - A clock too fast for the device is said at the component's
clock. A synthesis error in your own VHDL (aUSER CODEregion) names the model element it is in. - A top with more pins than the package has is placed with virtual pins: a register at each pin, as a bus master inside the FPGA is.
archec synth --bitstream --constraints pins.pcfwrites the file to load when the pins fit. Loading it on a board is yours (iceprog). - The tools are not in the extension (500 MB).
archec synth --install-toolssays where the pinned OSS CAD Suite is; you download it, and archec checks it against its sha256 and unpacks it in~/.arche/fpga. Tools on yourPATHwork too. - The example
examples/fpga-pwmnames its device and bounds its size: 257 LUTs and 163 flip-flops of an ECP5-25F, 123 MHz for a 100 MHz clock. Nothing was run on hardware.
- A requirement bounds them:
- FPGA components are tested in a real VS Code window (the
fpgasuite): Generate Code with thevhdltarget, Run FPGA Tests in GHDL and its evidence, what cannot be synthesised said in the editor, and synthesis.
0.15.017 November 2026
FPGA, coloured code, screens in the examples
FPGA components (an extension:
fpga). A component with a clock is hardware:clock clk 100MHz,reset rst_n active low async,step tick. Its ports typed with data (in duty: uint8,out pwm: bool, atype Adc12 = uint16 { bits 12 }) are signals, its variables registers, itsmemoryblocks the registers of an AXI4-Lite bank. Its functions and its state machine are the action language, as everywhere. The guide is FPGA components, andexamples/fpga-pwmis a PWM generator written this way.- The simulator runs it cycle by cycle. On each rising edge: the transitions with a guard and no trigger, the
stepfunction, messages one cycle after they are sent. - The editor says what cannot be synthesised, where it is written: floats, strings, loops with no constant bound, recursion, calls to another part, Python bodies. An assignment that loses bits is a warning.
- Arche: Generate Code →
vhdlwrites VHDL-2008: an entity per component, the model's data as a package, the system's top, and a GHDL testbench per test case.USER CODEregions are kept. - Arche: Run FPGA Tests in GHDL runs the test cases on that VHDL (
archec test --target vhdl). A case passes on the simulator and in GHDL on the same cycles. Each run is evidence for Arche: Status on theghdlrung, and leaves a trace thatarchec why,why-notandtimingread. - GHDL comes with the extension's build for your machine (
arche-lang-darwin-arm64.vsix,-darwin-x64,-linux-x64,-win32-x64): nothing to install, no network. GHDL publishes no build for Linux on arm64: there, and with the genericarche-lang.vsix, the GHDL of yourPATHis used.
- The simulator runs it cycle by cycle. On each rising edge: the transitions with a guard and no trigger, the
arche-lang is coloured wherever it is shown as text: the store's package pages and their files, the shelves' code, the shelf and board pages in VS Code, and
archec doc --html. One highlighter, with the editor's own words and its Light and Dark Modern colours.Screens beside three examples: a front panel for the kettle (
examples/kettle/panel.arche), the brake-by-wire bench's diagnostic panel, and the greenhouse's status screen (examples/greenhouse/screen.arche), each with its ui tests. The examples' own models are unchanged, so the kettle and greenhouse stay inside the 1.0 core.Arche addresses reach every instance: a definition used at any depth (a part of a part's definition) gives its element's address, and a benchmark's
requirementscan be named as in the model (REQ-SW-034) or by their address.
0.14.116 November 2026
no stub files beside your code
- No more stub files beside your code. A model's code files (
code "ctrl.py",code "sensor.ts") use names Arche gives them:wait,send,goto, the model's messages and constants. So that Pylance and TypeScript know them, the extension wrote anarche.pyin every folder of .py files, and anarche.d.tswith atsconfig.jsonin every folder of .ts files. It now writes them in one place per project,.arche/typingsin the main file's folder, and nothing beside the code (editor.md):- Python: a typed package.
.arche/typings/arche/__init__.pyiholds Arche's helpers, the same for every model;arche/_model.pyiholds the model's messages and constants. Pylance finds it with no setting of yours: the extension givespython.analysis.extraPathsa default. In a workspace folder that is not one project's folder (a project in a sub-folder, several projects), a package at the folder's root,.arche/typings/_workspace, holds the names of every model. - TypeScript:
.arche/typings/arche.d.ts, and a TypeScript server plugin in the extension."arche","./arche"and the global names resolve to it, with noarche.d.tsand notsconfig.jsonin your folders. - Once per workspace, the stubs written by earlier versions are removed, and a message says how many. Only a file archec generated is removed: an
arche.pyorarche.d.tsthat starts with its "Generated by archec" line, atsconfig.jsonthat is exactly the one it wrote. A file you edited stays. arche.editorStubs:project(the default),beside(as before), oroff.arche.python.stubsis deprecated;falsestill meansoff.archec stubs main.archewrites the same files in.arche/typings;--besidekeeps the old layout,--out <dir>names the folder. For pyright on the command line:extraPaths = [".arche/typings"]; for mypy:mypy_path. The folder ignores itself for git.- A new .ts code file imports the model's types
from "arche";"./arche"still works in the editor.
- Python: a typed package.
0.14.016 November 2026
move a definition, include what you use
The NUCLEO-F446RE's mounting holes: the store's board now says its three holes, from ST's MB1136 drill file, and its picture draws them.
fits board, boxcan check them against an enclosure.Generator plugins see more: a part written inline, with no definition of its own, is a component of its own in the generator model (
inlineComponents, named as written); a port says itsdelegate; a struct written where it is used gives its fields.kicad-cliis also found in~/Applications(KiCad copied without admin rights) and in KiCad 10 on Windows.Library kinds:
generatorandpluginare kinds the checker accepts, as the Arche Store does.The playground (arche-lang.xyz/playground) opens on a guided first model, has four tabs with words (See it, Run it, Check it, Build it), says which requirements are met, runs the model as soon as you open it, and builds CAD shapes in your browser.
Move Definition to a File… Right-click a definition in a
.archefile — a component, a message, a struct, an enum, a type, an interface, a const, a requirement, a system: any top-level declaration — or a use of it (part a: Pump), or a block of the diagram; it is also under Refactor… and the light bulb, named for what the cursor is on (Move component 'Pump' to a file…). A list asks where to: New file… (a name is proposed beside the current file, written as the project writes its file names) or one of the project's files, the libraries' apart. The declaration is cut with its///lines and written at the end of the file;include "…"is added when the main file does not reach the file yet, without an include cycle; a definition of apackagestays in it (package x { … }in the target). The project is compiled as it is and as it would be: the same declarations, errors and warnings, the same project built — or nothing is done and the message says what would change. One undo takes it all back. From the command line:archec refactor move-definition main.arche Pump --to parts/pump.arche [--dry-run](commands/refactor.md).A name from a file you did not include.
part h: Heater, withHeaterdeclared in another file of the project that the model does not include, says where:Unknown component definition 'Heater'. 'Heater' is declared in lib.arche, which this model doesn't include.The preferred quick fix is Include "lib.arche" (after the file's includes;archec fixapplies it when only one file has the name). A name the store has (Pid,Bme280) gets Use Pid from arche-algorithms, which adds theusesand theinclude. The same works for types, interfaces, messages, requirements and the other definitions. Completion afterpart x:, a type or a port type also offers the names of the files not included yet and the store's algorithms, each with where it comes from (lib.arche — adds include); choosing one adds the include (editor.md).
0.13.015 November 2026
one language, CAD as code
The hardware loop: which build the board runs, how far up a proof holds, and whether a test catches its bug (status.md). Three checks, from the palette and from the CLI, all offline (Renode and probe-rs stay tools you install: a rung whose tool is missing is reported skipped, not failed).
- The commit at boot. Firmware generated with
--trace(Embassy and C) says which build it is in its first trace line,arche-trace 0 build <fingerprint> <commit>: the model's build fingerprint and the git commit.archec replay,timingandlive --replayread it: a trace of another build is said first,the board runs an older build: rebuild and flash, before any verdict, and nothing is recorded from it; a trace of this build keeps it in the evidence, so--firmwareis no longer needed to know what ran. Arche: Check Board's Build from Trace… asks it of a trace file (archec status --build <trace>); examples/greenhouse/board.sh checks it first, in Renode and two seconds after the board's reset. - The test ladder. Arche: Run Test Ladder… (
archec test --ladder) runs the cases on the simulator, then the firmware in Renode, then on the board — only when you choose it, since it flashes — and stops at the first rung that fails, with one line per rung in the Arche Status output. The two upper rungs run the project's hook (aboard.shbeside the model). The evidence says which rung each verdict came from;archec statusshows the highest one per requirement (highest rung renode (sim ✓, renode ✓, board –)), and the lens above a requirement ends with· up to renode. - A fix proven on both builds. Arche: Prove a Fix Against a Git Ref… (
archec test --against <git-ref>) runs a case on a checkout of the ref and on the working tree, on the simulator. Fails there and passes here: it proves the fix, afixline in the status and· proves a fixin the lens. Passes on both:this test does not catch the bug.
- The commit at boot. Firmware generated with
Physics from the CAD, and the board meets the box (cad.md), in the
cadextension:- The simulation uses what was measured. A part with a built
cadis a body with its real mesh and the mass, centre of mass and inertiaarchec cadmeasured:archec gen --target mujocowritesmujoco/meshes/<Name>.objand an<inertial>for it, in place of a writtenshapeandmass, and the 3D view runs the same model. A part with acadis never drawn as an assumed box. A writtenmassorshapethat differs from the measured one is a warning that gives both values (cad-mass-differs,cad-shape-differs). The 3D view also shows a system in which no part says ashapeor ajoint, each part wherearchec cadplaced it. fits board, box. A board says its outline and its mounting holes withpcb "hw/board.kicad_pcb"(read from the KiCad file: the Edge.Cuts layer and the MountingHole footprints; no KiCad needed), or withoutline 70mm, 82.5mmandhole 3.2mm at 5mm, 5mmlines. The box's shape file says where its screws go (mounts = {"board": [(x, y, z), …]}).fits board, boxchecks that each standoff is under a hole, within 0.2 mm (fits board, box <= 0.5mmfor another tolerance): a check ofarchec cadin a system, evidence in a requirement, andarchec why-notnames the standoff that is off. Show CAD in 3D lists each board's outline and holes.- KiCad's ERC and DRC as evidence. For a component that names a
pcb,archec cadrunskicad-cli sch ercandkicad-cli pcb drcand records the results for the requirements the component satisfies. KiCad is not shipped and never downloaded: withoutkicad-cli(KICAD_CLI, thePATH, KiCad's own folder) the two checks are reported skipped, not failed. sourced Assembly. In a requirement: every bought part of the system has apart-number.archec checkalso gives a hint at a bought part with none.- The store's NUCLEO-F446RE now says its outline (70 × 82.5 mm). Its mounting holes are not in the store yet.
- Shapes built before this version are measured again the next time
archec cadruns.
- The simulation uses what was measured. A part with a built
CAD as code (cad.md), an extension of the language (
cad): a part's shape is a Python file of its own (build123d, OpenCascade), named on its component —cad "cad/enclosure.py" { material PETG }.archec cad main.archeruns each file that changed, writes STEP, STL and GLB tobuild/cad/, and measures the size, the volume, the mass (by itsmaterial, or adensity), the centre of mass, the inertia and the anchors. In a system,part relay: Relay { at box.relay }places a part at an anchor of another, andclearance board, relay >= 2mmchecks the least distance between two of them (parts that run into each other fail). A requirement bounds what is measured —limit Enclosure.size <= 120mm, 95mm, 40mm,limit Enclosure.mass <= 80g— and each bound is recorded as evidence:archec statussays proved, failing, or out of date when the.pyor the material changed;archec why-not main.arche REQ-BOXsays by how much a bound is missed. The mass budget adds up the measured masses. A file that fails, or does not give one valid solid, is an error at its line and at itscad. Show CAD in 3D builds the model's geometry and shows it beside the editor, with its measures and checks;archec cad --htmlwrites the same page.examples/greenhouse/mechanical.archeis the enclosure of the greenhouse's board, sensor and relay.The CAD engine ships in the extension's platform builds, and works offline:
arche-lang-darwin-arm64.vsix,-darwin-x64,-linux-x64,-linux-arm64and-win32-x64carry a portable Python and the wheels of build123d and OpenCascade (about 270 MB). On first use the engine is set up from them in~/.arche/cad, with no network, in about a minute;archecin a terminal uses the same one. The genericarche-lang.vsixhas no engine: everything else works, and CAD says the platform build is needed. Nothing is ever downloaded at run time. The platform builds are made bynode tools/cad/package.mjs <target>, which fetches the Python and the wheels, each checked against a pinned hash.A small core, written down (core.md): the language a beginner needs — the project and its libraries, data, messages and units, requirements, components with their ports and interfaces, functions, variables and state machines with
```archebodies, systems and links, test plans, and a deployment of threads with a timing chain — in one page you can read in an evening, with an example of every construct. The rest is extensions (physics, safety, UI, exchange, containers…): the same tools, no stability promise yet; each section of the spec that is one says so.archec check --corenames each construct of a model outside the core and the extension it belongs to (not-core). The tutorials and examples/greenhouse use only the core, and a test pins how many core concepts the tutorial needs (62), a number to lower.Test cases in the action language: a case's lines are written as a body is, with the system's parts for names —
at 0ms do send probe.water WATER { temperature: 20.0 },at 5ms do send hmi.bus ENGAGE_REQ(true),at 0ms do ctl.target = 90.0,within 100ms expect ctl.state == Idle,at 1s expect sent(HEAT) >= 1 and not relay.closed(sent,received,now();within …:,never:,always:as before). archec checks them: an unknown part, variable, port, message, field or state is an error where it is written (test-line), and Ctrl+click goes from a line to what it names. A line that parses and checks as the action language is the action language; one with a form only it has (send p M { … },true,x.state == Idle) is too, with its errors; anything else stays Python, as before, and a line that reads the same in both means the same and runs as written. Arche's simulator gets them as Python (TypeScript in ahandlers typescriptproject), and the browser simulator, the C tests and Renode read that translation:archec testgives the same verdicts.archec check --corenames a Python test line as thecodegenextension, and the hintarche-test-line— with its quick fix andarchec fix— writes the common Python lines over (send(p.out, M(a=1))→send p.out M { a: 1 },True→true,"Idle"→Idle,sent("M")→sent(M)). docs/core.md, the tutorial and examples/greenhouse write their cases so (spec.md, "Test lines").Edition 1.0, and renames that do not break a model:
edition "1.0"reads a model as 0.13 does and starts the stability promise (editions.md): the core keeps its meaning in every 1.x edition, and a renamed name is read for one more edition, with a warning and an automatic fix, before it is an error. A library says its renames in its library.arche —renamed "1.0", { Led: GpioLed, … }— and a model that writes an old name builds as if it wrote the new one, with a warning (renamed) thatarchec fixand the quick fix resolve. The store's eight renamed devices (Led,Button,Relay,Buzzer,RgbLed,Servo,Stepper,TemperatureSensor) work that way again:part led: Ledbuilds, with a warning, instead of an error. Every example, template and kind of projectarchec newmakes is checked in edition 1.0 by the tests.level simpleis the core: a beginner's editor (project { level simple }, orarche.levelbeginner) offers exactly the 1.0 core of core.md — its declarations and their properties, now with a deployment, its binaries, threads and chains — and a hint on any other declaration, with the way to use it (level full).levelandhandler MSG -> fn(a message's fields given to a function) are in the core; an HTTP route stays in thecommunicationextension. The templates no longer declare the built-in kindssensor,actuatorandplant, andarchec newkeepslevel simplewhen the deployment it adds is all core. In the reference, the set every model is written with is now called the model, so that "core" means the 1.0 core only.Renamed names inside code: an old name a library renamed is read as the new one in ```arche bodies (
LampState { on: true },var s: LampState,Colour.Red,send cmd LAMP_ON { … }) and in a test case's lines (at 0ms do send(b.press, LAMP_ON(on=True)),expect …), with the samerenamedwarning (an error from the next edition), quick fix andarchec fix. Whole names only: not a field, a local, a parameter, a part's member, a string or a comment.Why did it do that?
archec why main.arche --test TC-HOTprints a run's timeline: its messages, each state change with its transition, model line and the values its guard read, the variables, the test's expectations and the requirements checked on it.archec why … "fan Running"follows an event back to its root — the transition and its guard's values, the message and where in the model it is sent, the thread that sent it, the test that set the value — with the time between links, how long it took from the reading, and whether a requirement'swithinholds.archec why-not … "Cooling -> Idle"says why a transition never happened: its state never active, its trigger never sent (and who should have sent it), or its guard never true ("the lowest celsius was 26.3 °C"). It works on a test case run on archec's simulator, which now records each event's cause, the values a guard read and each variable's change, and on a trace of the board:--tracein the generated C and Rust now writes avaluerecord for each field of a received message that a guard reads. In VS Code: Why? in the simulation debugger's toolbar and call stack, Arche: Why Did This Happen? and Arche: Why Did This Not Happen? (the transition under the cursor), each a list whose lines open the model (why.md).What proves each requirement, today:
archec test,verify,timing,replayandlive --replayrecord each result in.arche/evidence/beside the model (JSON lines, one per subject and place, sorted: commit them, or ignore the folder) — the verdict, where it ran (web sim,NuSMV,board nucleo-f446rewith--board,renodewith--place), when, the command, and fingerprints of what it depended on: the requirement's wording, the case, each piece of the parts on the path (a function, a state, a transition apart), and for a run on a board the generated code and the firmware (--firmware).archec statusshows each requirement with what satisfies it, where it is built (the genmaps' files and lines), every piece of evidence with its age, out of date when a fingerprint no longer matches ("Thermostat: Idle -> Cooling on READING changed", "fw.bin changed"), or nothing proves it; exit 1 when one fails, is out of date or unproved (--lenient: only when one fails),--json,--req. In the editor, a line above eachrequirementsays the same in short — "proved by 3 tests · timing on board nucleo-f446re ✓ · 2 h ago" — and a click shows its status in the Arche Status output (Show Requirement Status for all).archec docadds a chip and a "Proved by" line to each requirement when there is evidence.--no-record(orARCHE_NO_RECORD=1) records nothing (docs/status.md).Offline by default (breaking): nothing leaves the machine unless you say so. Every call out — to Claude, a store, Polarion, a parts distributor, an issue tracker, a library's git host, Sigstore, GitHub — goes through one gateway (src/egress.ts), and is refused with the one line that allows it:
archec config ai onlineforreview,live-fixandnew --describe;archec config allow store https://store.arche-lang.xyzforadd,search,publish…;archec config allow polarion,parts,issues,libraries,sigstore,githubfor the others.archec config ai local-aiuses a model on this machine (Ollama, llama.cpp) instead of Claude. The organisation (ARCHE_POLICY,/etc/arche/policy) and the project (ai,allow,deny,private "glob"in itsprojectblock) can only restrict; CI does not read your own config (use--ai,--alloworARCHE_AI,ARCHE_ALLOW). Each call is logged in.arche/egress.log;--show-sentprints it,--offlinerefuses everything (ai-engineering.md).See a piece's arche code: every piece on the shelves shows its arche code, as its library writes it — under its card in
archec shelf(or whole with--code), in--json, on the store's Shelves page (Its arche code under each card, to copy) and in VS Code's card panel (Copy the Code).
0.12.113 November 2026
- Python functions into the action language:
archec import x.py(or a folder) translates Python functions to the action language — arrays and lists, tuples,forover a list,enumerate,sum/any/allover a range,round(x, n)— and checks each one against the Python it comes from, in the simulator, C and Rust. What does not translate stays Python, in a component of its own;--checked-onlykeeps only what passed the check (importing.md). - TheAlgorithms, on the algorithms shelf: 269 functions of TheAlgorithms/Python (MIT) in 18
algorithms-*libraries — maths, sorts, searches, strings, hashes, conversions, geometry, physics… — each compared with the Python it comes from (each library's REPORT.md says how). - Action language: 64-bit bit operations are exact in the simulator and in TypeScript, and a 64-bit shift left in C and C++ shifts a 64-bit value; a signed integer beside a wider one is cast to it, as Rust needs.
- The C trace at exit: a program that ended while a thread was writing out its trace could close the trace file under that thread. The end now waits for that write, then writes the rest.
0.12.013 November 2026
ready-made pieces
Renamed, so they don't hide what they do: eight store devices took a name of their own —
Led→GpioLed,Button→GpioButton,Relay→GpioRelay,Buzzer→GpioBuzzer,RgbLed→GpioRgbLed,Servo→HobbyServo,Stepper→GpioStepper,TemperatureSensor→Thermistor— because those names are now what parts do (interfaces). Their folders keep their ids (archec device add ledstill works); a model that writespart led: Ledis told the new name.Tests clean up after themselves: each
npm testrun writes in a temporary folder of its own (test/tmp.cjs), removed when it ends.The Store Shelves view: the Boards view is now Store Shelves — its id is still
arche.boards, so its place in the side bar, its commands, keybindings and thearche.boardCollectionssetting stay as they were. Its top level is the store's six shelves with how many pieces each has (types, units, boards, peripheral drivers, sensors and actuators, algorithms), under "In this project" when the model uses a board. Boards are by collection and vendor as before; sensors by what they do, each interface first; a piece shows its one-line summary, its card as a tooltip, and on a click the card in a panel — the seven lines, what it writes, an algorithm's response chart — with Add to This Project (whatarchec shelf adddoes; a board goes to Add Board to Model…, a device to Add Device to Model…, which ask where), Open Definition and Copy the Lines. A board's details panel starts with its card. Filter Shelves… (was Filter Boards…) narrows every shelf by a word:temperature,esp32,i2c. The Devices section under a collection is gone: its devices are on the sensors shelf (the ones that do none of the interfaces, by bus). The view reads the shelves through the bundled compiler (src/shelf.ts), not by running archec."What will it do?" in archec new: after the board, an optional question with plain choices — measure temperature, sense motion, measure a distance or light, find north, notice someone moving, read a button, switch an LED or a relay, drive a motor, turn a servo, show text, control to a setpoint, keep a temperature, smooth a signal — or
--does temperature,motor. Each adds the store's device that does it and fits the board (an I²C one only on a board with I²C, linked to its bus), and the algorithms that go with it (Pid,Thermostat,Debounce,Ramp,LowPass,ComplementaryFilter); each is a step that is left out, with a note, if the project would no longer check. New Project… asks it as a list to tick.archec device addtakes a device by its id before its part number (ssd1306is the I²C one).Sensors and actuators by what they do:
lib/arche-hw-store/sensors.archehas an interface for each thing a part does —TemperatureSensor,HumiditySensor,PressureSensor,Accelerometer,Gyroscope,Imu,Magnetometer,DistanceSensor,LightSensor,AirQualitySensor,CurrentSensor,GpsReceiver,Encoder,Button,MotionSensor;Led,RgbLed,Buzzer,Relay,Servo,DcMotor,Stepper,Display— its operations typed with arche-types' quantities (temperature() -> Temperature). 55 of the store's 87 devices provide them, each by a port named after the interface (in temperature_sensor: provides TemperatureSensor { noise 1°C; resolution 0.01°C }), with their accuracy from the datasheet where it is clear, and the supply of 10 more (in pwr: power { voltage 1.65V..3.6V }: the BMP388, MPL115A2, SHT2x, CCS811, TSL2561, LIDAR-Lite, MMA7660, L3GD20H, HMC6352, INA3221); the others (ADCs, port expanders…) stay by their bus. A controller saysout air: requires TemperatureSensorand callsair.temperature(): changing a BME280 for a DS18B20 is one line. Gobot's generic devices are renamed so they are not the interfaces:GpioLed,GpioButton,GpioRelay,GpioBuzzer,GpioRgbLed,HobbyServo,GpioStepper,Thermistor(their folders keep their names). Written by tools/gobot-catalog from its tables (sensors.go, the supply inknown.go).The devices in the simulator: a device with no code of its own does what its interface does in
archec sim, its page and the diagram's ▶ — a temperature drifting about 21 °C with the device's noise, a distance within its range, a servo turning at 60° in 0.1 s, a motor's speed with its lag, a relay or a display saying each change in the trace — written once per interface.archec sim --testnow runs the test plans with no plant:at 2s do door.pressed = Truepresses a button,at 4s do air.temperature = 30warms the air (lib/arche-hw-store/tests/greenhouse.arche).Completion by what it does: after
part x:, the store's sensors and actuators grouped by what they do, in order — "Temperature: BME280 (I²C, ±1 °C)", "Temperature: DS18B20 (1-Wire, ±0.5 °C)"… — and choosing one also writes itsincludeand the project'suses.archec shelf sensorsis grouped the same, each group's interface first; a device's card says what it does, its readings with their accuracy, its supply, "simulator" among where it runs and its tests there. A port that provides an interface may saynoiseandresolution; a client that requiresAccelerometerlinks to anImuwith no type warning.Algorithms, ready to take:
arche-algorithmscomes with archec and is the store's algorithms shelf — PID with anti-windup, on/off with hysteresis, ramp, moving average, low-pass, median, debounce, complementary filter, 1-D Kalman, 2-point calibration, lookup table, differential-drive odometry, waypoint follower, trapezoidal motion profile, watchdog, retry with backoff, 2-out-of-3 vote and CRC-8/16/32. Each is a component with its parameters and an interface, written in the action language: it runs in the simulator and is generated to C, C++, Rust, Go, Python and TypeScript. Each has a test plan run on the simulator (the PID settles and does not wind up, a 5 ms glitch does not pass the debounce, CRC-16 of "123456789" is 0x29B1) and a chart of its response (response.svg). See docs/algorithms.md.The action language has bits and arrays:
& | ^ << >>on integers,0x1Fand0b101, and arrays:var buf: float32[8],buf[i],len(buf)— kept to the type's width and bracketed right in every target.archec suggestand quiet hints: what the shelves already have for what a model writes by hand — a function that looks like a PID, a debounce, a moving average or a CRC; a message whose fields are aVec3, aGeoPointor anRgbColor; a component named as a store device — with where, why and the lines to add (--json). In the editor the same are hints (shelf-suggest), on at the beginner level (arche.suggestions:auto,on,off); the quick fix adds theusesand theinclude, and replaces a message or a struct whose fields are the very same.Generated start values: C, C++, Go and Rust wrote a duration's start value in its unit instead of ns (
10msbecame 10) and dropped a negative one (-1.0became 0); they now start where the simulator does.What a board has, and checks against it: each of the store's 24 boards now lists everything a project can use on it — its flash (
compute { flash 512KiB }), how many of each peripheral (peripherals { i2c [I2C1, I2C2]; adc { ADC1 { channels 16; bits 12 } }; pwm { TIM1 4 } }), what each pin can be (pinout { PA9 [USART1_TX, TIM1_CH2] }), the level of its pins (io-level 3.3V), its rails (out v3v3: power { voltage 3.3V; current 300mA }), its LEDs and buttons, and buses ready to link (ctl.i2c1 -> env.i2c). Written bytools/board-resourcesfrom Zephyr's devicetree and hal_stm32's pin tables (Apache-2.0) and the chips' datasheets; a value that is not sure is left out. archec checks a system against it: a pin that cannot do what it is used for (pin-function, now on every store board), a pin used twice or one pin linked to two parts (pin-conflict), two ports on one peripheral or more than the board has — two servos on one PWM channel, a 2nd I²C on an ESP32-C3 (board-peripheral), a part on a rail of the wrong voltage, with a quick fix to the rail that fits (board-supply), the parts on a rail drawing more than it gives (board-current), a 5 V echo on a 3.3 V pin (pin-level). Some store devices say their supply (BME280, MPU-6050, DS18B20, HC-SR04…).archec board showprints the peripherals, the rails and each pin; the Boards view's tooltip and details show them (docs/boards.md, "What a board has").Device drivers on microcontrollers: 15 devices of the hardware store (BME280, BMP280, MPU-6050, ADXL345, BH1750, SHT3x, INA3221, ADS1115, SSD1306, PCA9685, HC-SR04, servo, LED, button, relay) now also have a Rust driver, built on embedded-hal 1.0 crates of crates.io (
rust-driver "bme280 0.5.1"; rust-license "MIT OR Apache-2.0"in theirproduct, shown byarchec device showwith where they run).archec gen --target embassyputs a board's devices in the crate'ssrc/hw/— the board's I²C shared between them, their pins (from the board's port they are linked to, the part'spins, or the board's default I²C, LED and button), aHardwarestruct behind an async mutex, andhw::start!in main.rs — on STM32 (embassy-stm32 0.1 and 0.2), nRF52840, RP2040 and ESP32 (esp-hal).std/peripheralsdeclares an interface per peripheral (DigitalOut,DigitalIn,Uart,I2cBus,SpiBus,Adc,Pwm,CanBus,Timer), and a port of a built-in type provides its own:requires I2cBuslinks to any board'si2cport. Checked withcargo checkfor the NUCLEO-G474RE, NUCLEO-F446RE, nRF52840 DK, Pico and ESP32-C3; not tried on a board or in Renode. UART, SPI, ADC and timer PWM are not generated yet (PWM is a software one, for servos). Seedocs/drivers.mdin the arche-lang repository.Shelves: take it, don't rewrite it: the store has six shelves of ready-made pieces — types, units, boards, peripheral drivers, sensors and actuators, algorithms — and every piece has the same card of seven lines, in the same order: Does, Gives (Measures, for a unit), Plugs into (Inputs and outputs, for an algorithm), Add it, Runs on, Tested, From. The cards are read from the files themselves (the
///comment, fields and units, ports and addresses,product { … }, the library's license), and say plainly that nothing has run on real hardware yet.archec shelf,archec shelf <shelf>,archec shelf <shelf> <piece>(--jsonfor each) andarchec shelf add main.arche Voltage; a library joins a shelf withshelf algorithmsin its library.arche. The store's site has a Shelves page (docs/shelves.md).Common types, shipped:
arche-typescomes with archec and works offline —Vec3,Quaternion,Pose2D,Pose3D,Twist,Timestamp,GeoPoint,ImuSample,GpsFix,BatteryState,RangeReading,RgbColor,Health, and quantity types such asVoltage(V),Temperature(°C),Pressure(Pa),AngularVelocity(rad/s), sovar vbat: Voltagereads like the datasheet. Each field says its unit and range. Where a type goes, completion offers them, and choosing one writesuses arche-types "^0.1"and itsinclude. A library's types a project does not use are no longer "never used".More units: illuminance (
lx,lux), magnetic field (T,mT,µT,G/gauss), torque (N·m,Nm), angular acceleration (rad/s²), concentration (µg/m³,ppb), relative humidity (%RH), charge (mAh,Ah,C) and signal power (dBm), in archec's table and instd/units. Afterunit, completion lists the units grouped by quantity with their name; hovering one says its quantity and an everyday example ("a phone battery: 4000 mAh"). Nothing is converted:2N·m + 3Jis a warning, while a force times a length goes where a torque does.The Arche app, in the editor and on .arche sources: Arche: Open Arche App (and
archec appin a terminal) serves the Arche app — canvas, specification pages, scenarios, stories, the Code page — on the workspace's model, with no YAML on disk: what the app reads is built from the.archefiles, and what it saves is written back into them as the smallest edit (a label or value replaced in place, a declaration added or deleted,attrfor what the language has no word for), each save checked by building the sources again before anything is written. Its text panes show and edit the.archedeclaration behind what is on screen instead of YAML. The app's Go server is rewritten in TypeScript (src/app/): the same routes, so the app runs unchanged; it listens on 127.0.0.1 with a token, reads unsaved editor text, and applies its saves as one undoable edit. Seedocs/app.mdin the arche-lang repository.A sequence drawn from the code:
a -> b : init expanddraws the call tree ofinitafter the step, read from each function'scalls— a child's call a step to its lifeline, aparallelfunction's calls the branches of apar;expand 2stops two calls down, a recursion is not followed, and the Arche project gets the steps written out. The other way round,seqstep-not-calledwarns when a step from a component to one inside it is not in any of its functions'calls(checked only where a component writescalls): the sequence and the code disagree.Refresh the diagram: ⟳ in the diagram's toolbar (or R) reads the model again from its files and the open editors, and redraws — for a change made outside VS Code, or a drawing that looks stale.
Long sequences, readable:
ref other "label"in a sequence plays another one there (UML's interaction use;ref scenario.sequencefor another scenario's): the editor draws a box over the lifelines it covers and opens it on a click, the exports draw it as a box (SVG) or a note (Mermaid, D2), and the Arche project, which has no such step, gets its steps written in its place. Checked: a sequence that is not there, a ref that comes back to its own sequence (seqref-cycle), another scenario's lifelines that are not participants here (seqref-participant). The editor shows a scenario's sequences all together or one alone with only its lifelines;fold Sys.compon a sequence or a scenario folds composites from the start;foldedin analt/par/… starts it shut, and a click on any fragment's tab folds or opens it. A constant that lists what each row needs (SERVICES = [{id, needs: […]}]) shows as a matrix on hover (dependencyMatrix,matrixMarkdownin the API). Fixed on the way:archec diagram --format svgdrew no fragment frames.
0.11.012 November 2026
a complete language
- The extension, tested in VS Code:
npm run test:vscodeopens a VS Code window per example (the car, the TypeScript handlers, the living model, the board bench, a beginner's first model), with its own settings and no other extension, and runs every contributed command, the views, the diagram's webview and its ▶ run, Live on a replayed trace, a board dragged into a file, the regeneration round trip, completion and hover. Fixed on the way: Open TypeScript Block as File typesselfandmsgfrom arche.d.ts (they wereany, so nothing completed); the hover of a TypeScript handler shows TypeScript, not Python; Reveal in Source with nothing to reveal no longer throws; the diagram's script errors go to the Arche output. Start Live takes{ deployment, replay }and Filter Boards… a text, for keybindings; Open TypeScript Block as File is in the editor's menu. - ```arche bodies you can read and follow: a body was raw text in one colour, and Ctrl+click did nothing in it. The body checker now links every name to what it is — a variable, a function, a port, an operation through a port, a message and its fields, a constant, an enum value, a state, a watchdog; a parameter and a local to where they are declared — so Ctrl+click, hover, Find References and Rename work in bodies, and rename follows the links instead of the text (a message field in a record follows; a parameter of the same name does not). The grammar colours bodies as the action language and the semantic tokens by meaning;
arche.bodies.highlightadds a faint background. Models written in JavaScript and TypeScript asarcheSrc`…`(the tests' helper) are coloured as arche with Ctrl+click and hover on their names;arche.embedded.problemsshows their errors. - archec in a terminal: Arche: Open archec Terminal (also archec in the terminal's + menu) opens a terminal in the model's folder where
archecruns the compiler the extension uses —arche.paths.compiler, else its bundled copy on VS Code's own Node: no install, no PATH to set. - A rename keeps your code: the code of a USER CODE region follows its element when it is renamed. The editor's Rename and the new
archec refactor renamerecord the rename (arche.renames.json, committed), andarchec genapplies it once per output folder, into the new file when a component is renamed. A clear rename by hand is recognised (one region gone, one new, the same stub). Anything else stopsarchec gen(nothing written, exit 1) until--move a=bor--orphans ok. Preview Generated Changes asks where the code goes, andarchec checkwarns first (gen-stranded). - Regenerating code: generated C, Rust and Go mark where your code goes —
USER CODE BEGIN <id>/END <id>around a function the model gives no body, the init, the includes, an on-receive, a send — andarchec genputs it back each time it writes the file again, by an id made of model paths; a region the model no longer gives goes to<file>.orphans, not away. Each function or type from a model element carries@arche <path> <file>:<line>, mapped ingenerated/.archec/genmap.json:archec whereputs a gcc, clang, rustc or go error back on its .arche line, Go to Model Element (a lens above each tag, Go to Definition) does it in a generated file, Show Generated Code the other way.archec gen --diffand Arche: Preview Generated Changes… (VS Code's diff editor, then a question) show a write before it happens. Templates write{{#region "id"}}, scriptsctx.region()(docs/regeneration.md). - Integration targets:
archec gen --target canopen(a CiA 306 EDS per node on a CAN bus: its PDOs from the routes, the messages as objects)--target j1939(the parameter groups of the 29-bit routes, their PGN read from the id, an SPN per signal)--target mavlink(the catalog as a MAVLink 2 dialect, checked by mavgen),--target someip(the services of the interfaces provided, their methods, events and instances, as JSON),--target openapi(OpenAPI 3.1 from the HTTP handlers)--target asyncapi(AsyncAPI 3.0 from the links that carry messages, at their topics); build systems around the generated C —--target cmake(a project per binary, toolchain files from the cores, everything built on the host),--target west(a Zephyr application with its pinned manifest per binary on a Zephyr board),--target platformio—--target ci(GitHub Actions and GitLab CI: check, ci, gen --check, the builds); and for the lab,--target flash(per microcontroller binary, a flash script with its chip's tools — probe-rs, OpenOCD, nrfjprog, picotool, espflash — and a monitor that reads its trace off the board intoarchec timingandarchec live --replay) and--target bench(the test rack as YAML — buses, nodes, frames, devices under test, power — and per CAN bus a SocketCAN setup and a python-can script that checks the frames against their periods or stands in for a missing node); what the model has no word for comes fromattrand is otherwise noted, not made up (docs/integration-targets.md). - The editor for a newcomer:
arche.levelisautoby default — beginner (plain-words diagnostics, the core of the language in completion) until the project sayslevel fullor uses declarations beyond the simple set;archec new's templates say their level (level simple,level fullfor those with a deployment, and a deployment added by--targetsets it). The empty Navigation view has New Project…, Get Started and Open Example… buttons. Lenses: ▶ Simulate | Open Diagram above a system, ▶ Run Test above a test plan and a case. Signature help in bodies forMSG(field=…)andsend(port, message), and in ```arche bodies forMSG { field: … }andsend port MSG: the fields with their types, units and ranges. The Documentation, Live and Animations views show when the model has a deliverable, a deployment, an animation (always for an expert); Boards and Store start collapsed. A beginner's status bar says the next step (3 requirements unverified · no test plan), a click lists where and offers the quick action. Settings by purpose:arche.paths.app,arche.paths.appCli,arche.paths.compiler(the old names still read). Command titles shortened, in Title Case (Generate Code…, Run Tests, Simulate in Diagram). - Learning it:
docs/concepts.md(the model before the syntax, five ideas, a picture and a model that compiles for each) anddocs/cheatsheet.md(the core declarations on one page); the walkthrough starts with them, and arche-lang: Show Cheat Sheet opens the sheet. The README, the tutorial, the examples' simple bodies and the reference teacharche bodies first. A simplepython body is a hint (arche-body,archec vet) whose quick fix, Convert to arche body, rewrites it — alsoarchec fix --only arche-body, and the MCPfixtool. The README is short now: each area's notes are a page ofdocs/(verification, safety, deployment, code generation, robots, physics, importing, Python, design notes, the editor). - Generators of your own:
generator rte "…" { templates "folder" | script "gen.js" | command "python3 gen.py" }, run asarchec gen --target rtebeside the built-in targets. They read the generator model — the project as JSON, version 1 (schemas/generator-model.v1.json): names resolved, values worked out, each message's layout on the wire, a bus's CAN frames, each element's file and line — and return files. Templates fill{{ }}(loops withwhere,#if, a#fileper element, partials, filters such assnakeandctype,keep); a script runs in a sandbox (no require, no file system but its folder); a command in any language reads the model on stdin and writes the files on stdout.fromanother generator with otheroptions;--option; a generator's problems at the elements' lines.archec generator new|model|test|approve. A library's or Store package's script or command runs only once approved in arche.lock, at its fingerprint. In VS Code a ▶ Generate lens, Generate code… lists them, completion and hover in template files.examples/generatorswrites a C header, a DBC (the built-in one byte for byte, from the model alone) and an ICD in Python (docs/generators.md). - More for generators of your own: a script calls
ctx.builtin("c")for a built-in target's files ({ path: text }), and a template or a command reads them in the model'sbuiltins(builtins c, dbc). A hook —generator license { script "license.js"; after c }— changes a target's files before they are written:archec gen --target cruns the project's hooks on it in the order written, each returning only what it changes (nulltakes a file away; akeepfile stays one);--no-hooksleaves them out. Each body in the generator model hasc,rustandgobeside itspython, through the built-in translators. Options are declared with their type, default and values (option prefix "…" { type string; default "kc_" }):archec checkholds what a generatorfromit sets and--optionto them,archec gen --listlists them, and inoptions { }completion offers their names and values and hover says what each is.script "gen.ts": TypeScript, its types stripped (node's own, else esbuild or typescript);archec generator new --script --tsandarchec generator typeswritegenerator-model.v1.d.tsfor it. - Animations:
animation v-x "…" from <template> { … }— one of Arche's 72 animation templates (flows, timelines, state machines, signals, hardware, mission, comms…), its content written in the model and bound to it: a component is written as its name, a constant or a formula as${…}the app works out on the slide,machine kria.ps.appdraws a state machine's states, transitions and a walk through them,scenario bootplays a scenario's lifelines and arrows; a list of names where the template wants records gets the rest from its sample. Checked against what each template reads (unknown data, wrong shapes, paths that name nothing). Written as Arche's animation editor writes it. A story stepanimates one and stays itsdwell.archec animation list|show|new|preview|render(a GIF, recorded in headless Chrome as the .pptx export records one),archec story export(a story as one HTML file, its animations running, played by itself); in VS Code an Animations view, a preview beside the editor that follows the model, completion of the templates and of their data (docs/animations.md). - Views as queries, diagrams anywhere: a
viewpointwithinclude/excludelines (include * -> adcu,exclude kind sensor,depth 2) is a diagram of its own in the Model view, the blocks it picks at any depth with the links between them, laid out by ELK; a term that matches nothing is a warning (view-empty), its names follow a rename. The places dragged in a view go tomain.layout.json, out of the model (arche.diagram.positions: filedoes the same for every diagram); a rename renames their keys.archec diagramwrites any diagram as Mermaid (GitHub draws it), D2 or SVG, and--playa scenario as an SVG that plays it step by step on its system's blocks. - The simulator, live:
archec sim --htmlruns the model in the page as MuJoCo's viewer runs a scene — Play/Pause, Step (the next event) and Step by (a fixed time), a speed from 0.1× to 10×, a time scrubber back over what has run (the run replayed, with what was sent), Reset; a form per input port that sends one of its messages now, its fields with their type, range, unit and enum values; a physical network integrated in the page with a push (a step or a pulse) on its sources; live plots (inline SVG) of states, variables, message fields and physical quantities; keys listed on the page (docs/sim.md). The diagram panel's ▶ does the same in VS Code: the run is live in the extension, driven from the panel's bar (pause, step, step by, reset, speed, scrubber, the same keys) and its ☰ controls (send, push, plots). - See the model work, nothing installed: the browser simulator runs a model's state machines (on a message, on
"after 500ms"), ```arche bodies and simple Python, links and a deployment's periodic threads on a virtual clock. The diagram panel's ▶ (Arche: Run the Model in the Diagram) plays it on the diagram — dots along the links, each block's state, Pause/Step/Stop;archec simprints the trace,--htmlwrites one page that runs it in any browser; the store's package pages get a Try it link. What it does not simulate is said (docs/sim.md). - Errors that fix themselves: the common diagnostics carry their fixes — the closest name, property, value or unit, a link's ends swapped, a port's direction, a duplicate renamed, the file an
includenames created — as quick fixes, the best one preferred;archec fix <main.arche>applies them and checks again (--dry-runshows the diff); the MCP server'sfixtool gives them to an assistant. Every diagnostic has Explain [code], the explanation beside the editor. A beginner level: the settingarche.level(beginner) orarchec check --beginnersays the messages in plain words with what exists, and a project'slevel simplekeeps completion to the core of the language (fixes (docs/fixes.md)). - Draw instead of type: a palette beside the diagram — the core elements, the board store, the Arche Store, searched — whose items drop onto the canvas as source edits (a board with its
includeanduses, a store package after the question about its code, then placed); property forms generated from the language's description (dropdowns, checkboxes, number + unit, the documentation as help, checked before writing); and a Get started with arche-lang walkthrough whose steps complete as the model grows. Generate code… offers C and Go. - The living model: Arche: Start Live runs
archec liveon a deployment (running, or replaying trace files): a Live view of its requirements, chains, threads and containers passing, failing or pending, a status bar count (Live: 2 ✗ 14 ✓), a dot in the gutter of each one's line with a hover (why, the last evidence) and the measured p99 against its budget after a chain or thread, and the deployment diagram's threads tinted. Explain & Fix with Claude on a failing one runsarchec live-fix— Claude's explanation, its edits to the model previewed as a refactoring, live restarted once they are applied. archec is bundled (arche.archecPathfor another). - Boards: a store of known boards ships with archec (
arche-hw-store: ESP32-C3/S3/DevKitC, NUCLEO-G474RE/F446RE/H743ZI2, Raspberry Pi Pico/Pico W/4/5, nRF52840 DK, Jetson Orin Nano, Kria KR260), and your own go in collections (arche.boardCollections,ARCHE_BOARDS, a project'slibraries).archec board list|show|add|new|check|extract; a Boards view in the side bar (add to the model, details, duplicate, new board, check). A board iskind boardwithproduct { vendor; part-number; url }, its processors and its connectors'pins { tx PA12; rx PA11 };binary … on <board>runs on its processor, a route over a bus on its connector reaches it, and the Embassy CAN drivers (TWAI, bxCAN, FDCAN, MCP2515) use its pins. A record also reads{ key value; … }. Checked withcargo checkon the nRF52840 DK, NUCLEO-G474RE and ESP32-C3 boards. - Boards in the editor: completion after
part x:offers the boards of the store and of your collections, with vendor and part number (one not included yet brings itsincludeanduses); inpins { … }the roles, then the board's pins and what each is wired to; in a part of a board, its connectors with their pins. Hover on a board shows its product, URL, processors, memory and pins; on a pin, what the board wires to it. A pin the board's chip does not name so, or a role archec does not read, is a warning (board-pin) with the nearest as a quick fix. A board dragged from the Boards view into an editor becomes apartwhere it is dropped (in a new hardware system outside any block), with itsincludeanduses. - The action language: a body written in a
arche block instead ofpython is typed and checked by archec (names, types, ports and what they send, states) and translated: to the Python Arche runs, to Rust in the Embassy crates (no TODO left in app.rs), to C.var,if/else if,while,for i in a..b,send port MSG { … },goto,wait 10ms,return,log;state == S,now(),min/max/clamp/abs/sqrt,int/float. - C++:
archec gen --target cpp— C++17:enum class,std::variantunions,std::optionalfields, messages as structs withencode/decodeon the C's bytes (checked byte for byte against the C), a class per component with its state machine as anenum classand a switch (on-exit/on-enter, guards, actions,aftertimers, watchdogs, deadlines; door.arche runs as the C runs it), ```arche bodies and the Python the action language can say translated, sends asstd::functionmembers; with a deployment a program perlanguage cppbinary, astd::threadper thread of the model, and a CMakeLists.txt. Built with -Wall -Wextra -Werror on examples/autonomous-car (docs/cpp.md). The C target's union fields now compile. - Register maps:
archec gen --target regmap— each part's addressedmemoryblocks as one map for every side: a C header (offsets, field shifts and masks, access macros on a base, static asserts that a struct of the map puts each block at its offset), an AXI4-Lite register bank in VHDL-93 and SystemVerilog (byte strobes, reset values,rblocks as inputs, a write strobe per element, large blocks as RAM ports, SLVERR elsewhere), IP-XACT 2014, SystemRDL 2.0 and a Markdown memory map;countand whole-byte record fields read as the block lays them out.archec checkwarns of a block off its alignment (memory-misaligned), a field past its element or wider than its type (memory-field-width) and fields sharing bits (memory-field-overlap) (docs/regmap.md). - The quality of the generated code:
archec gen --target c|embassy --build --lintbuilds what it writes (-Wall -Wextra -Werror -pedantic; cargo) and runs cppcheck's MISRA C:2012 addon, clang-tidy and cargo clippy when installed, each finding said at the model element its line comes from (main.arche:57 error [cc-unused-variable] … — c/controller_ports.c:6 in controller_send_cmd (port cmd of Controller)),--sariffor code scanning;--target c-teststurns the test plans into C unit tests of the generated C (make test,--run, gcov coverage read back as states, transitions and functions);--defensivechecks ranges, stale inputs and E2E checksums and counters on receive;--target trace-matrixwrites requirement → element → generated function → test case → last result (docs/codegen-quality.md). - C code generation:
archec gen --target c— C99, no heap: messages, structs and enums with little-endian encode/decode on the model's wire layout (the bytes the DBC and the Rust codecs use); a module per component with its variables and state, its functions (a ```arche body translated, Python left as a TODO),gotowith on-exit/on-enter,firetaking its transitions innermost state first, guards in the action language translated; the send functions written once for you to wire; a POSIX runtime; with a deployment, a FreeRTOS task per thread (priority, stack, period). Compiled with -Wall -Wextra -Werror -pedantic and run in the tests. - Generic structs:
struct Ring<T, N: int> { items: T[N] }, used asRing<Sample, 64>— each use is a struct of its own (Ring_Sample_64, the fields made concrete), for Arche, the codecs, Rust and C; nested uses too. Wrong arguments (their count, a type for a number) are errors where they are written. archec verify: a requirement'sformalproperty —never brakes in Fault,always …,eventually …,adcu in Ready leads to adcu in Autonomous— checked by NuSMV (or nuXmv) on the state machines, with each state's reachability; a property that fails comes back with its counterexample as a Mermaid sequence diagram. Aformaltext archec cannot read is an error in the editor.archec cihas averifygate.- EARS requirements:
ears "when brakes receives BRAKE_CMD, brakes shall be in Braking within 50ms"— ubiquitous, state-driven (while), event-driven (when), unwanted (if … then), complex — checked against the parts, states and messages; the sentence is the text when there is none, it gives theformalproperty archec verify proves, andarchec gen --target ears-testswrites a test case per requirement. - Generated tests:
archec gen --target tests— a case per transition a message triggers (the shortest way to its source state by messages, sent by the part wired to send them, then its trigger and the state after) and a case per received message at its fields' limits (a writtenrange, else the type's) and at zero; the cases with a TODO (a guard, an event no message brings) go intests/generated.allow, whicharchec test --allowpasses on as known failures. - Interface definitions for other toolchains:
archec gen --target proto | ros2 | dds— the model's messages, structs, enums and unions for protobuf (proto3: enums with their zero value, a union as aoneof, a service per interface; checked with protoc in the tests), ROS 2 (a.msgper message, an enum as constants, a.srvper operation) and DDS (OMG IDL 4:@value, unions on their case byte,@optional,sequence<T>). - Certification:
asil(ISO 26262) anddal(DO-178C) on requirements and components; a requirement keeps the level of the safety goal or requirement it derives from (derives SG-01now resolves, traced to safety.yaml), or decomposes it —asil "B(D)", the decomposed requirements adding up to the parent (D = C+A = B+B = D+QM …) on independent elements — and an element is at the level of what it satisfies.archec cert --standard iso26262|do178cwrites the trace matrix and its gaps. A requirement's level and what proves it may be written as groups:integrity { asil D; dal A },proof { ears "…"; formal "…" }. - SBOM:
archec gen --target sbomwrites a CycloneDX 1.5 bill of materials — the hardware of the BOM with its vendor, part number and quantity, the libraries at the version arche.lock names (with their fingerprint), a firmware per binary depending on its processor; the same model gives the same file (valid against the CycloneDX 1.5 schema). - Merging by declaration:
archec mergeis a git merge driver for .arche (archec merge --install): what one branch changed is taken, a declaration both changed is merged inside, and only an item both changed differently is a conflict, named (<<<<<<< ours: Brake.pressure) — two branches that touch neighbouring lines of one component no longer conflict. - Libraries from git:
uses can-parts "^1.2" from "https://…/can-parts.git"—archec lib <main> fetchchecks out the version its tags give (the locked one, else the newest in range) into.arche/libs, which the build reads; arche.lock records the repository and the commit, and a tag that moved is reported. - Language editions:
edition "0.12"on the project, as go.mod names a Go version — in edition 0.12 an old keyword spelling is an error, without an edition the project is read as before;archec fmt --edition 0.12 --writemigrates a project (the standard spellings, and the edition); an edition newer than archec knows is an error. - The parser and formatter under stress: the tests run
archec fmttwice on every example (a second pass changes nothing) and check the project built is the same (archec diff); 400 seeded random damages to real files (spans cut, tokens inserted, lines doubled, files cut short) never make the parser, the formatter or the checker throw or hang. - C that runs: with a deployment,
archec gen --target cwires each binary (c/<binary>/wiring.c): its parts, a queue per thread that receives, each send routed to the thread of the part the link goes to or, over aroute, to a bus hook per port type (arche_can_send,arche_can_fd_send… indrivers.c, yours), a message that arrives fires the machine and the port'son-receive, a function per thread (periodic or waiting on its queue) and<binary>_start.arche_rt.hadds queues and threads (POSIX inarche_rt_posix.c, FreeRTOS inarche_rt_freertos.c);main.cand aMakefilebuild it on a host, where./<binary> 1000runs it a second. The car's three binaries build with-Wall -Wextra -Werror -pedantic. - The model's Python, translated: a Python body that is the action language in other words (
self.x = …,if/elif/else,while True,for i in range(…),await wait(ms(2)),await goto("Run"),send(self.p, MSG(k=v)),x ** 2,log(…)) is translated for C and Rust instead of left under a TODO — when it type-checks and has no integer division. Every body of the car now is. - The extension under test:
test/lsp.test.jsdrives the language server as VS Code does (stdio, JSON-RPC): diagnostics on their line and gone once fixed, hover, go to definition, rename, inlay hints, formatting and the declare-it quick fix; a diagram drag writes the block'satand nothing else.npm run test:vscoderunstest/vscode/suite.jsin a real VS Code on a copy of the car: activation, the Model and Boards views, Problems, F2, inlay hints, formatting and the diagram. - Shipping:
archecis a package now (no longer private):npm packgives one bundleddist/cli.jswithdist/index.js,dist/arche.js, the standard library and the board store — install the tarball and runnpx archec, no build.npm run packagegives the.vsix.test/dist.test.jschecks what the package holds. - Translations for every text: an entry of
translations en { … }may name a text by what it says,"initialisation du BEAMCALC" "BEAMCALC initialisation", for the texts no path reaches (sequence steps, branches, procedures); an entry whose text is no longer in the model is pointed out.archec translations --extract enmoves them too, grouped by file: on Antenna 3908 texts move (2595 before) and 43 stay, and the model's files read in French only. In the editor, inline translations are dimmed (Arche: Dim Translations,arche.translations.dim), and hovering a text shows the translation its translations file gives.archec fmtlines a translation up under its text only when that text starts within 40 columns; otherwise it goes two levels in. - examples/arche-lang: arche-lang itself as a model — the compiler stages, generators, editor, commands, decisions, and the test behind each promise;
test/selfmodel.test.jskeeps it in step with the code. - Edition 0.12 in the examples: the car, the patterns and Antenna say
edition "0.12"(archec fmt --edition 0.12; each builds the same project); completion no longer offers the old spellings.
0.10.0Not released yet
as readable as Go
- One spelling: an old spelling of a keyword is a warning (read until 0.12);
archec fmtwrites the short, standard forms by default (--no-simplifyfor the layout only), likegofmt -s. - One layout: properties in one order in every file (what it is, how it is classified, its type, the rest, its traces, its place on the canvas); one item per line,
;only inside a one-line block. - A small core: the 100 declarations come in sets — the core (35), deployment, functional analysis & scenarios, safety/security/design space, the Arche app (in app/*.arche), project tooling; the reference says each one's set.
- Property groups:
timing { … },delivery { … },compute { … },physical { … }, the same as the lines;fmtwrites a group for three or more. - One guard spelling:
[…]on transitions and operating modes (when "…"stays for a sentence an apostrophe or an accent would break). - Nothing silent, nothing hidden: an undeclared kind, layer or tag is a warning whose quick fix declares it (the kinds archec interprets — processor, device, bus… — are built in); the editor shows what a link carries when its ports say it, and what a
defaultsblock gives. archec vet: style apart from errors, asgo vet— long forms, property order and groups, declarations out of their set, names in their case (PascalCase defined, snake_case inside, SCREAMING_CASE messages and constants), long Python in a model file;archec checkleaves style out,archec cihas a vet gate.- Packages as in Go:
package chassison its own line puts the file in it;chassis.BRAKE_CMD. - Documents: docs/spec.md (the specification, with the grammar in EBNF), docs/style.md (Effective Arche);
archec explain <code>, every diagnostic code described; long messages cut after their first sentence in the terminal (--long). - The size tracked: ceilings on keywords, the core, property names and properties per declaration (test/surface.test.js).
0.10.0Not released yet
Arche fields as syntax
- Interfaces from port types:
archec importwrites a port type with operations, a base or sources as aninterface(fn op(arg: "T") -> "R" "comment",extends,source); an interface also takeshandlingand timing.missing-operationis one warning per port, listing every operation it lacks. - Structures in place:
var TRACKING: struct { gain: float32; phase: float32 }[0], for a variable, a field or a message; a field may hold a message (records: RFIC_CONFIG);message PING: structis a structure with no field; a memory record's field may say only its size (field phase { size 1 }). - Entries of records as declarations: a panel's
widget az "Azimut" { type slider; at [0, 1, 4, 1] }andcolumns 12; row-height 52; an app'spageandtab; a story'sstep; a benchmark'srun; a function chain'sstep s1 function SF-Aandedge s1 -> s2 : fl-1; a table'scolumn a { min 0; max 15 }andunique b, c. - Smaller fields:
var mode initial "BOOT"(Arche's value as text), porthandler MSGwith no function,note-at x, y, statedo/entry-activity/exit-activityas text, kindcolor, menu entrysection, deliverablecoversby address, unitsymbol/logarithmic, visualcomment/data-file, projectpptx-template,file "x.yaml" { version nil }, simulationhorizon/seedand stimulusat, operating modes'components/requirementsby address, ports and variables namedout,on… - Embassy CAN on nRF and RP2040: they have no CAN controller, so
src/can.rsdrives an MCP2515 on SPI (its INT on a pin): the bit timing for an 8 or 16 MHz crystal, standard and extended ids, frames over 8 bytes counted inDROPPED; up to 1 Mbit/s. RP2040 projects now build: norp2040feature on embassy-rp 0.2, its critical section rather than cortex-m's single-core one, portable-atomic for the Cortex-M0+. Both checked withcargo check. data "file.yaml" = { … }: a file Arche does not define, written from a value instead of verbatim text.- The last escapes: a link's
icd m1 "Pointing" { Azimuth: float64 }; a component'shardware { … }sheet andimplementation { language: "rust", … };port p: Twith no direction (Arche writes none); an Arche id that is not a name,tag-group lot "Lot" as "Lot Projet", which a tag'sgroup lotfollows; a template's catalogsummary(no longer a copy of its description); a message field'ssize 0(out of band). - antenna: 347
attrlines to none, and no file written verbatim. Data fixes on both sides: the missingmodemcomponent, a requirement id used twice, three undeclared units, three requirements that said TBD, an expectation YAML read as an object.
0.10.0Not released yet
main features
Simpler to write — traces where they start:
verifies REQ-1 as t-7(a trace property keeps its id),trace satisfies A -> R1 as s-1, R2(several targets),verifieson a scenario, and the traces of a requirement written inside a component.archec move-tracesmoves each trace written apart to where it starts, writing out positional ids and address strings as paths, only if the same traces come out — antenna: 721 traces moved.archec diffcompares traces.yaml by id.Simpler to write — attr escapes as syntax:
function-flow A -> B "item" as fl-1 { name "…" }, port-typelatency/jitter/bitrateandmemory-mapped, linkbus; a part that shows another model (ref) is walked into by paths, so a scenario'sattr participants/attr sequencesbecomeparticipant/sequence(fmt --simplify) — antenna: 72 escapes gone, scenarios.arche 5,748 → 2,650 lines.Simpler to write — readable names:
component flash_memory "FLASH_MEMORY" as c-1793752253957: paths say the name, Arche keeps the id.archec name-componentsnames imported ids from their labels — antenna: 11 components, 527 → 39 ids left (theasids and Arche address strings).Simpler to write — translations apart:
translations en { REQ-1 "Start"; REQ-1.text "…" }, the same asen "…"after each text;archec translations --extract enmoves the inline ones into one file, only if the project builds the same.Simpler to write — cases as a table:
cases "Speed {v}" { body; rows { id | v; TC-1 | 10 } }, a case per row (-leaves out the lines that use a cell) — antenna's PBIT decision table: 32 cases, 512 → 52 lines.Simpler to write — quick fixes that declare: an unknown message, type, port type, requirement, component… is declared at the end of the file; a link to a missing port adds it (direction from the end, type from the other end).
Documentation: a tutorial (docs/tutorial.md) that builds a water pump from model to firmware, and is compiled by the tests; every command in docs/commands.md; an index, docs/README.md.
archec ci: lint (with the project's rules and suspect links), format, timing, TARA, build, tests and coverage (--coverage-min) in one command, one line per gate, a JUnit report (--junit), exit 1 when a gate fails.Versioned libraries: a library is a folder with a
library.arche(library kria-parts { version "1.4.0"; archec ">=0.10" }), side by side as<name>@<version>/;uses kria-parts "^1.4"takes the newest in range andinclude "kria-parts/…"reads that version;archec liblists,archec lib lockwrites arche.lock. Missing, out-of-range, too-new-for-archec, conflicting, unlocked and changed-under-lock libraries are pointed out.Embassy state machines: a part's state machine in Rust (states, events, the transitions innermost first,
* -> X, guards as methods to implement,goto_name), fired by its task when a trigger message arrives, withon_transitionfor the action; a new app.rs has the part's variables at their initial values and the model's Python under each TODO.Works without ../arche: the Arche code archec runs (RTOS generator, rule engine, study evaluation) is one minified bundle committed as vendor/arche.js (1.4 MB, for 6.9 MB before).
One version:
archec --version, package.json and the extension all say 0.10.0.Inside: checker.ts and emit.ts split by topic (src/checker/, src/emit/), the compiler tests by area; the same diagnostics and byte-for-byte the same builds.
Debugger variable values: arche-cli
--tracealso writes the trace records (PLAN__CASE.trace.json), so a debug session over a run shows each component's variables. An older arche-cli still works, without values.ARXML system description: ECU instances (one per processor, with CAN connectors and frame, PDU and signal ports), PDU and signal triggerings, the SYSTEM with its root composition, the SWC-to-ECU mapping, and the data-element-to-signal mapping (signal groups, field by field).
Embassy CAN FD on STM32: a chip with FDCAN (stm32g4, h7, h5, l5, u5, g0b…) gets an FDCAN driver in
src/can.rs: CAN FD frames up to 64 bytes with bit-rate switching, so the car's 15-byteBRAKE_CMDgoes out (padded to 16); these chips build with embassy-stm32 0.2, executor 0.7, time 0.4. On a bxCAN chip, the note names each message longer than 8 bytes, andcan::DROPPEDcounts the frames not sent, instead of losing them silently.Embassy CAN on ESP32:
hal esp32gets a TWAI driver insrc/can.rs(TWAI0, the nearest preset rate). nRF and RP2040 get a note that they have no CAN controller.Guards in UPPAAL and NuSMV: a guard on the component's own variables is translated. A variable that the machine's transitions set to written values becomes a small integer. Of one state's transitions on one trigger, the first that can fire wins. NuSMV uses a
TRANSrelation.Cybersecurity (TARA, ISO/SAE 21434):
asset,damage-scenario,threat,attack-path,security-goal; feasibility, risk and CAL derived; checks;archec tara; a LaTeX section; goals as Arche requirements of categorysecurity.Error propagation (the idea of AADL's error model): a port says the errors its part makes there (
produces omission, value), stops (contains late) or changes (turns value into omission), and which inputs feed an output (from,from-allfor redundancy);hazard … { error omission on Car.brakes.cmd }. archec derives each hazard's fault tree, its minimal cut sets and rate, and an FMEA row per error source, checks them against the written ones (fta-mismatch,fmea-mismatch) and shows them, marked derived, inarchec safety, the LaTeX and HTML specification and the Safety group of the model tree.STPA:
control-action CA-… { from Car.adcu; to Car.brakes; feedback …; uca UCA-… { type not-provided; causes HZ-…; constraint REQ-…; loss-scenario LS-… { … } } }— the architecture is the control structure. Checked: each control action considered for the four types or saidnot-applicable(stpa-incomplete), each UCA traced to a hazard and a constraint (uca-untraced), a link that carries the action and its feedback (stpa-no-path); the tables inarchec safety, the LaTeX and HTML specification, and the model tree (Control actions (STPA), a UCA under its type).FMUs in the simulation:
archec import plant.fmu, a component'sfmu "plant.fmu", copied into the project and co-simulated by arche-cli (FMI 2.0 CS, Real, Integer, Enumeration and Boolean variables, a native host; sources built with cc when no binary).Test coverage:
archec test --coverage, Run with Coverage in the Test Explorer — states, transitions, messages per link, functions and requirements the runs exercised, marked at their lines (arche-cli test --coverage).Fault injection in tests:
at 20ms fault drop a.p/delay/stuck a.p f=0/freeze part/thaw/clear, or a failure mode's id (its newinject), run by Arche's simulation (new engine fault helpers).Timing analysis:
handler-blocking— a message handler on a periodic thread that can hold the step past its deadline (counted as blocking in the response time, shown in the thread's hover).Exporters for the tools around the model (
archec gen --target …):aadl, an AADL v2 package of the deployment for OSATE (processors with a virtual processor per core, the bus, processes and threads with Dispatch_Protocol, Period, Deadline, Compute_Execution_Time, Priority and Stack_Size, ports typed by Data_Model data, connections bound to the bus and processes bound to their core);arxml, AUTOSAR Classic R4 (implementation data types, a sender-receiver interface per message, a software component per part with runnables on timing, data-received and init events, the composition, and per routed message on a CAN bus the I-signals, I-PDU, frame and CAN id);bom, a bill of materials as CSV and Markdown, grouped by definition with quantity, mass, power, cost, ram and every budgeted number, with totals and a roll-up per subsystem;icd, an interface control document per port type, interface and bus: the messages with their fields, units, ranges and byte layout, the links that provide and consume them, their timing and CAN ids, and the requirements traced to them.One way to write each thing. Each declaration has one standard keyword, and multi-word ones take a hyphen:
port-type,test-plan,use-case, joiningfailure-modeandsafety-goal. The other spellings are still read and build the same project. Each gets analias-keywordhint with a quick fix, andfmt --simplifyrewrites it. That coversmsg,req,let,regs,ivv,adr,contract,namespace,record,block,connect,statemachine,function,task,interrupt,firmware,paramand the rest. A word now means one thing:bus Xdeclared a port type, but a route's bus is a component withkind bus: writeport-type X.processis an OS process in a deployment; a workflow is aworkflow.modeis anoperating-mode, not a state;viewandmodelare properties, not keywords.- A pseudo-state is
pseudo choice, sincekindnames a catalog kind. - A requirement's provenance is
origin, sincesourceis where code lives. - A
processor/devicewith akindis acomponent: the kind makes it hardware.
Same thing, one form.
attr key = value, likeprop key = value(the=may still be left out).private fn finstead ofvisibility private.struct D extends Baseandinterface I extends Jin the header.lanes "a.*", "b.*"without brackets.complexity mediumin lower case (Arche still getsMedium). A parameter takesrange 1..8for itsmin/max, and a safety goal'sfttiis checked as a time. The importer writes the standard forms. The four examples are converted, and they build byte-identical projects.unit m/s²,unit °C,unit km/h: a unit is written as it is, to the next space, and reaches Arche unchanged. The quoted form is still read; it's needed only for a unit with a space, andfmt --simplifydrops the quotes. The examples are converted and build the same projects.processoranddeviceare justcomponent. The keyword alone no longer makes a block hardware for the deployment checks: itskind(processor,device,sensor…),coresornature hardwaredoes.fmt --simplifywritescomponent Soc { kind processor; … }, adding the kind the keyword implied. This is the one rewrite that changes the generated project, which gains thatkind:. Adevice x: Lidarinstance becomespart x: Lidar.component LidarFront extends Lidar { … }builds a definition on another. It has the base's kind, ports, functions, variables, parameters and state machine; what it writes adds to them or replaces them by id, and itsstates { … }adds states and transitions to the base's (the base's initial state stays unless it names one). Arche has no inheritance, so templates.yaml and every part carry the whole of it.extendson a part, and a definition that extends itself, are errors.component A : Bat top level used to drop B's members silently; it now means the same and gets a hint with a quick fix to writeextends.The project's rules are checked in the editor.
rule sw-on-cpu "…" { applies component; when kind == "software"; check parentKind in ["processor", "software"]; severity error; message "…" }was already written to rules.yaml for Arche's Problems view. Now archec runs it with Arche's own rule engine (bundled from the app, so the verdicts are the same) and reports each breach on the element where it is written, with the rule's severity. A breach doesn't stop the build. A condition that doesn't parse is an error on the rule.whenandcheckare written without quotes,appliesis a name, andseverityanddisabledare properties, soattr severityis no longer needed. The quoted form is still read, andfmt --simplifyunquotes it. antenna's rules report 240 infos, mostly requirements with no test.fix: optional GpsFixis a field that may be absent: it is written to Arche asmultiplicity: 0..1, andarchec gen embassymakes it anOption<GpsFix>.fmt --simplifyrewrites{ multiplicity 0..1 }to this form.optionalon a variable or an argument is an error.union Command { stop; move: MoveArgs; speed: float32 }holds one of its cases. A bare name is a case with no payload;name: Typeis a case that carries a value. Arche has no union type, so it gets the enumCommandCaseof the cases and a structCommandwith acasefield plus one0..1field per payload. Messages built from it show and simulate as usual.archec gen embassywrites a Rustenum Command { Stop, Move(MoveArgs), Speed(f32) }, whose default is its first case. On a bus, an optional field is a presence byte plus its value, and a union a case byte plus room for its largest case, so the Embassy codec encodes and decodes them and the DBC frame multiplexes on the case.System operating modes, written as the model names things. An
operating-modenow names its components and requirements as the rest of the model does:components kria.ps, imu(from the top of the one system that has them, orAntenna.terminal) andrequirements REQ-ANT-010. Arche gets the same addresses as before. Transitions areto STANDBY on PBIT_RESULT_OK when "every PBIT passed", replacingattr transitions [...]. An unknown target mode is an error, and a secondinitialmode is a warning.budget power 60Win a mode adds up the components active in it (all of them when it names none) and says when they draw more; archec checks this, since Arche has no per-mode budget.fmt --simplifyrewrites the quoted addresses andattr transitions; antenna's 7 modes now read this way, with the same built project.Tolerances.
parameter VBUS { value 12; unit V; tolerance 5% }(alsotolerance 0.5,tolerance 20us,tolerance -2%, +10%) is written to Arche as the parameter'smin/max, so its slider and sweeps keep to the band.distribution normalmakes the tolerance 3σ (the default is uniform). A study withworst-casesweeps both ends of every toleranced parameter its outputs read (or those it names), and Arche evaluates each corner.archec study main.arche <id>runs a study with Arche's own evaluator, bundled from the app: a worst-case study gives each output's lowest and highest value and the corner where it occurs;monte-carlo 2000(withseed) gives the mean, σ, the 5/50/95 % percentiles and the range of 2000 random designs. Arche has no random-sampling study, so it shows a Monte Carlo study at the nominal values. Studies now write theirseedto Arche.ReqIF, both ways.
archec reqif main.arche -o reqs.reqifwrites the requirements as ReqIF 1.2, the format DOORS, Polarion, Jama and codebeamer exchange. Each requirement carries ReqIF.ForeignID, ReqIF.Name and ReqIF.Text (as XHTML), plus status, priority, verification method, rationale, source, owner, tags and TBC, with translations asName (en)/Text (en). There is one specification perdocument, andderiveslinks become relations;--document SRSexports one document.archec reqif reqs.reqif -o reqs.archereads one back: attributes are matched by name (a tool's "Object Text" or "Description" is the statement, "Object Heading" the title, enumerations by value name). The documents becomedeliverabledeclarations, and what has no place in the language is kept as a comment. antenna's 513 requirements go out and come back in with no errors.SysML v2.
archec sysml main.arche -o model.sysmlwrites the architecture in SysML v2 textual notation:- definitions as
part def(extendsas:>) and parts aspart; - ports typed by a
port defper port type, with~Tforinports; - links as
connect, variables asattribute, state machines asexhibit state; - structs and unions as
attribute def, enums asenum def, messages asitem def; - requirements as
requirement <'R-1'>with their text asdoc, andsatisfiesassatisfy … by part.
Deployment, the canvas and Python behaviour are left out.
- definitions as
SysML v2, in.
archec import model.sysml -o model.archereads a SysML v2 textual model into arche-lang, then builds the result and reports its errors. Part defs and parts (with[4]and:>), ports with~and the items of their port defs, item, attribute and enum defs, attributes with= 1200 [kg], interface defs, connect, connection and flow, state machines (with the shortaccept … thenform and entry/exit/do), actions asfns, and requirements with<'id'>,doc,satisfyandverifyare all mapped. The rest stays in the file as// sysml: …comments, with a note for each. The car, exported to SysML and imported back, gives back the same SysML text.FMI 2.0.
archec fmi main.arche Plant -o plant --buildmakes a co-simulation FMU of a system's (or a definition's)equations, for Simulink, Dymola, OpenModelica or any FMI 2.0 tool:- each part's variables and ports go in, with links summed into the input they feed, and constants and parameters inlined;
- an unlinked
inport is an FMU input,outports and integrated variables are outputs, and a variable no equation gives is a tunable parameter; - the solver is RK4 at the
solverstep; --buildcompiles it withccand zipsPlant.fmu.
The C source declares the FMI types itself, so it needs no SDK. The two-tank example's FMU passes fmpy's validation, and its simulation matches the example's own test (0.7225 m at 600 ms). Python behaviour does not go in.
Baselines and suspect links.
archec baseline main.arche --name v1.0freezes the requirements intobaselines/v1.0.jsonbeside the model, to commit with it. The baseline holds what each requirement says (title, statement, translations, metric, limit) and the traces pointing at it. Once a project has one, the linter compares against the newest. When a requirement's wording has changed, each test plan, case or element that verified or satisfied it gets asuspectwarning where it is written, until it is re-checked and a new baseline is taken. A change of status, priority or owner is listed, not flagged.archec changes main.arche [--since v1.0]lists the requirements added, removed and changed (showing the part of a long text that differs) and the suspect links.The specification as a web page or Markdown.
archec doc main.arche -o spec.html(or--html) writes the specification as one self-contained page, and-o spec.md(or--md) as Markdown. The chapters are the LaTeX export's, plus operating modes:- requirements as cards grouped by document, with status and priority, rationale, and what satisfies and verifies each one (marked when nothing does);
- data types and messages, and the architecture part by part (ports, variables, state machine, links);
- scenarios and test plans;
- a traceability matrix that counts the gaps, and the changes since the last baseline with their suspect links.
Requirement ids and
[REQ-1]references are links. The page has a table of contents, light and dark themes, and prints cleanly. LaTeX math is typeset by KaTeX when the page can load it.Inlay hints. After the value or declaration they are about, they show what archec computed:
- a sum of quantities as one value (
2 * TICK + 500us= 2.5ms), a rate as its period (2.5kHz= 400us period), a constant's value where it is used; - the ports a definition inherits (
extends Lidarinherits ports cloud, power); - a budget's roll-up against its limit (
= 8.5W of 10W,⚠ 12W of 10W), the same sum the checker makes; - a deployment thread's worst-case response time and deadline (
R=200us/D=1ms), from the timing analysis; - the copies of a part array whose size is a constant (
= 4 parts).
A plain quantity gets none.
arche.inlayHints.enabledturns them off.- a sum of quantities as one value (
Semantic highlighting. The language server colours each name by what it resolves to. A definition is a class, a part a read-only variable, a port a property, a message a type, a requirement a
requirement, a state an enum member, a function a function, a constant a read-only variable, a deployment a namespace, a thread an event. A quantity's unit is aunittoken. The TextMate grammar still colours keywords, strings and numbers.A simulation debugger. A test case runs in simulation with arche-cli (
test --case … --trace), and you step through its run event by event. Start it with"type": "arche"in launch.json (program,case), F5 on an .arche file, or Debug Test on a case in the Testing view.- The stack frame is the event, at its line in the model: a message at the function it ran on arrival (or the transition it fires, or the case line that sent it), a state change at the state, an expectation at its
expectline. - Variables shows the time, the event, each component's state, the expectations checked so far and the messages sent. Watches and hovers read
time,adcu.stateandsent("X"). - Breakpoints go on .arche lines, and a failed expectation or an error stops the run.
- Step over goes to the next event and step out to the next instant. Step back and reverse continue work too.
arche-cli's trace has no variable values;
"trace"replays one exported from the Arche app, which has them. arche-cli keeps the run of a failing case only, so the debugger builds a copy of the project and adds a last step that fails on purpose. That step is hidden, and the case's verdict is reported as it is.- The stack frame is the event, at its line in the model: a message at the function it ran on arrival (or the transition it fires, or the case line that sent it), a state change at the state, an expectation at its
0.9.0Not released yet
readability, round 3
- A translation on its own line.
description "…"followed byen "…"on the next line, indented deeper, is the same as both on one line.fmtlines the translation up under the text, andfmt --simplifysplits a line over 100 characters when both texts are long. The grammar colours the language code. defaults requirement { status draft; method test; document SRS }, anddefaults verify { … }, set what the requirements of a file share, once. At the top of a file a block covers the file; inside a component or system, that block in this file. The nearest block wins, an element's own value always does, and the generated project is unchanged.fmt --simplifywrites these blocks for a value every requirement of the file sets, when most of them share it. Completion and hover inside a block offer the target's properties.out tx: requires panel-devicegives the type and says that the port requires it (orprovides), replacingout tx: panel-device { requires panel-device }, with the same port emitted.fmt --simplifyand a quick fix rewrite the long form; antenna has 74 such ports. A title that repeats the type stays, because it is the port's name in Arche.- References in text:
[REQ-ANT-037],[kria.ps.app.tracking],[Antenna.modem]. A name in brackets in a description, a requirement's text, a procedure or the like refers to something in the model. The linter checks it and suggests the right name; in VS Code it is a link, a hover and part of rename. Arche gets it written the way it writes references itself: an id as itself, a block asKRIA260.yaml#kria.ps.app.tracking. The LaTeX spec links to the requirement. Other brackets ([1],[devices.host]in a TOML snippet) stay ordinary text, and code is never touched.fmt --simplifyturns antenna'sFile.yaml#pathand bare requirement ids into references, with the same built project.fmt --simplifynow reads every file of a project in that project, not just body files. fmt --simplifymoves the parts'at/sizeinto acanvasblock at the end of the file (one per system or definition with two or more placed blocks), so a component's body says what it is, not where it sits. The project is unchanged. Files that hold part of a body (anincludeinside a system) keep theirs, sincecanvasis a top-level declaration.- Fewer
attrlines from imports.var armed = 0is a variable of any type, the same asvar armed: any = 0 { attr type nil }.A -> B as t-tx on egives a transition its Arche id, replacing{ attr id "t-tx" }.fmt --simplifyand quick fixes write both forms; antenna loses 135attrlines with the same built project.attr value "…"stays, because it writes the value without quotes. means bench "Banc d'intégration" en "Integration bench"names a verification means once.verify { means bench }, anddefaults verify { means bench }, then say it by name, and Arche gets the text and its translations as before. An unknown name is an error.fmt --simplifyreplaces a written-out means with the name of a declared one that has the same text and translations.
0.8.0Not released yet
model any system
- A faster language server. An edit rebuilds only the projects that hold the edited file: checked at once, fully compiled (emit, schema, cross-file references) when typing pauses or on save. Only diagnostics that changed are sent, and the workspace is rescanned only when files come and go. An error in a small project now shows in about 0.2 s, whatever else the workspace holds.
- Simulated timing. A thread's
wcetnow takes CPU time on its core in the simulator (shared by priority), so the response times and deadline missesarchec analyzepredicts show in a run.overflow blockis simulated: a full queue keeps the message and the trace marks where the sender would wait (the sender itself goes on, assendis not awaited). Astepwith no body is the thread's wcet only. - Deployments, seen. A deployment opens as a diagram: its processors and the buses its routes take, each processor opening on its threads (priority, period, C/T/D/R from the timing analysis, red when a deadline can be missed) and the links between them. Hovering a thread, a processor, a bus or a chain shows what the analysis says of it.
- Tests, closer to the model. A case alone runs only that case (
archec test --case PLAN/CASE, arche-cli--case). After a run, each requirement verified by a failing case gets a warning naming the case, andarchec testprints the requirements' status and writes.archec/test-results.json. A failed case links to Show the run as a sequence diagram: the simulation trace (arche-cli--trace), drawn in the Diagram panel with the model's folding. - Code generation (
archec gen, Arche: Generate code…): Rust / Embassy crates from a deployment (channels per link, a task per thread, CAN codec and frames per route,hal/chipon the processor, RP2040 dual-core, thread priorities enforced with one executor per level — anInterruptExecutoron a spare interrupt on a chip, an OS thread at that priority on a host, esp32 too), a CAN driver (src/can.rs: SocketCAN on a host, bxCAN on stm32), optional and union fields on a bus (presence and case bytes, DBC multiplexing), CAN DBC per bus, and the Arche app's FreeRTOS / Zephyr / POSIX skeletons. Your files are written once and kept. - Parity with the Arche app's checks: quoted references (
"KRIA260.yaml#kria.ps.app",{file, component}) are resolved as Arche does (dangling-ref), requirements with unverifiable words getvague-word, and alias ports that contradict the port they stand for getdelegate-conflict. A test compares archec witharche-cli checkon every example. - Test plans in the Testing view. Every
testplanandcaseof the workspace's projects is listed, read from the sources as you type (no build needed). Run a case, a plan or a whole project from the Testing view or the editor gutter: the project is built, arche-cli runs the plans, and each case is marked passed or failed. Each failed expectation is shown at itsexpectline. Cancelling stops arche-cli. package chassis { … }groups declarations. A name can be written qualified (chassis.BrakeEcu) or bare. Arche ids are global, so a name is still declared once per project: two packages declaring the same name is an error that names both.interface BrakeApi { messages A, B; extends Device; fn apply(force: float32) -> bool }is written to types.yaml the way Arche holds interfaces: a port type withmessages,operationsandextends. The linter reports a link where one endrequireswhat the other does notprovides, and a provider that has no function for an operation. Interfaces that are named but not declared (antenna's) are only a hint.- Repeated parts and parameters.
part wheels: Wheel[4]giveswheels_0…wheels_3;wheels[2].canandwheels[*].can -> ecu.canlink one copy or all of them.component Adc(channels: uint8 = 8)withpart adc: Adc(channels = 16)gives each instance its values: they size arrays and repeated parts, and Python reads them asself.channels. An out-of-range index or an unknown parameter is an error. - Design space, as Arche reads it:
parameter,variant(withvariants a, bon components and links),study(sweep P = 1, 2, 4; across a, b; output x = expr) andviewpoint(by kind, layer, tag), written to parameters.yaml, variants.yaml, studies.yaml and viewpoints.yaml. The built menu gets Parameters and Studies pages. - Budgets.
budget power 150W(orbudget temperature max 85°C) on a component sums the same-named numbers of everything beneath it, copies counted. A block beneath that has its own budget counts as its allowance. The budget is written as Arche rollup variables, and archec reports an overrun with who draws what, or a draw in another unit (nothing is converted). - Units. A unit's quantity comes from
unitdeclarations or a built-in table. The linter reports adding unlike quantities (5ms + 2m), a value that contradicts its declared unit, a property given the wrong quantity (power 2kg), and a unit missing from the project's catalog. - Safety.
hazard(S/E/C ratings, with the ASIL derived) andsafety-goalare written to safety.yaml, which is Arche's own safety model, and the menu gets a Safety page.failure-mode(FMEA: RPN from severity × occurrence × detection) andgate(all/any) make fault trees: a hazard's probability is computed from them and checked against itstarget. All of it is typeset in the LaTeX specification. decision ADR-7 "…" { status; context; option; chosen; because; answers; affects; supersedes }is written as an Arche requirement of categorydecision, with its traces. An accepted decision that doesn't say what it chose or why is reported.process onboarding "…" in Shop { lanes sales, ops; sales: qualify "…"; sales -> ops : provision; alt { when "…" { … } } }is a workflow, written as an Arche scenario.lane: activityis a step within one lane, in any sequence.- Continuous behaviour (simulated).
equation der(level) = (inlet - drain) / AREAandequation drain = K * sqrt(level)on a component, withsolver 1ms. Arche's simulator integrates them with RK4 between events. An out port's flow arrives at the in ports it is linked to, and flows into one port add up. Python reads and sets the same variables. The linter checks the names in equations, keywords used as names,log(useln), and links whose ends measure different quantities.examples/physicshas two tanks, a valve and a timeline test. - Standard library:
include "std/units","std/buses","std/interfaces","std/parts"(SI units, CAN FD / LIN / automotive Ethernet / RS-485 / QSPI / I3C with their wires, Device / Sampler / PowerSupply, parametrised Mcu / Adc / Regulator).project { libraries "../shared" }adds folders whereincludealso looks. - Formal checks of behaviour.
- State machines are walked as graphs, bases included.
unreachable-statenow follows composite entry and ignores transitions that never fire. New checks:deadlock-state(a state with no way out that is notpseudo final),dead-transition(a message no input port receives, afalseguard),shadowed-transition(beaten by an earlier unguarded one on the same trigger), andnondeterministic(a hint for two guards that may both hold). contract { assume cmd.force in 0..1000N; guarantee status.applied within 20ms after cmd }on a component, an interface or a port type. At each link the sender's guarantees must imply the receiver's assumptions: ranges and equalities on the same field, and deadlines. The checks reportcontract-unmetandcontract-unknown. Contracts stay in the model (Arche has no place for them), andarchec sysmlwrites them asassume/require constraints.archec gen --target uppaalwrites UPPAAL timed automata and queries (no deadlock, each state reachable, eachwithinkept).--target nusmvwrites untimed SMV modules.
- State machines are walked as graphs, bases included.
- Readability, round 2.
- Message fields take their
defaultwhen a message is built without them, and a struct field is built from its fields' defaults (BRAKE_CMD(force=1.0)carries a whole header). - Test cases can be a timeline (
at 5ms do …,at 10ms expect …,within 40ms expect …). Each moment starts at its time from the start of the case. fmt --simplifyputskind,layer,tagsandcoloron one line.duplicate-tracereports the same link written twice.duration-mathsuggeststo_s(X)forX / sec(1).- Test-step linting finds a block by its id at any depth, as Arche does.
- Message fields take their
- Deleting a component from the diagram asks first. This covers the Delete button and the Del key, with several selected items too. It uses the same modal dialog the side bar already had.
- Model view and diagram. The Model view puts each package's declarations under Packages, in the same sections, with sub-packages nested. It gains sections for Interfaces, Decisions, Design space (variants, parameters, studies), Safety (hazards, safety goals, failure modes, fault trees) and Processes (with their sequence diagram), and in Catalogs for Units, Viewpoints and Canvases. A repeated part is drawn as one stacked box marked
×4; its links fan out from it, and its properties show the copieswheels_0 … wheels_3. - Changes in Arche's simulator (arche/frontend/src/sim) for the above:
MessageField.defaultis filled into payloads, a test step'satstarts it at that time, andphysics.tsis the equation solver. Each has its own tests.
0.7.0Not released yet
any Arche project in the language, several projects at once
archec import <arche-project> -o <dir>rewrites an Arche project in arche-lang. It builds the result, compares it with the project (archec diff, as data), and fixes every difference on the declaration that made it, until the build gives the project back exactly. It then rewrites the long forms (--simplify), keeping them only if the project is still the same, and copies the files the project refers to (assets).examples/antennais the Antenna project imported this way: 7 model files, 211 components, 206 requirements, 54 scenarios, 1280 traces, French with English translations, exact.archec diff <a> <b>: two projects (folders, or a .arche entry) compared as data — key order, quoting and empty values do not count; list order does.- Translations:
"Libellé" en "Label"after any text gives Arche'sname.en/description.en;project { languages fr, en }. attr key valueon any declaration writes an Arche field the language has no word for (attr key nildrops one archec would write);file "x.yaml" { attr … }for a file's own fields;project { omit "x.yaml"; auto-catalogs false; infer-links false; assets "code", "visuals"; logo; source-root }.- New declarations:
verify { level means procedure tests }(IVV) on requirements, components and links;usecase,system-function,function-flow A -> B "item",function-chain,operating-mode,story,benchmark,panel,app,visual,rule,table,unit,tag-group,plugin,menu { entry … }; sequence fragmentsalt/loop/opt/par { when "…" { steps } }. - More of Arche said directly: requirement
source,owner,tbcand requirements inside links;as <id>for traces, variables, constants and memory; trace and link ends given as Arche addresses ("tile.yaml#tile"); foreign types (fn read -> "Result<Vec<u8>>");system { file "KRIA260.yaml"; listed false }; test plans in other files; casesetup; transitionson "free text"; portsprovides/requires/side; memorysize/count/reset;source "path"on functions and components;ref Sys.comp; scenario steps write the names Arche shows (name,funcName). - Several projects in one workspace: the Model and Files views show one root per project (an .arche file with a
projectdeclaration that no other file includes), each built when it is expanded; using an item of another project makes it the active one; each builds into its ownarche-out/<folder>. - Enums as code imports write them:
literal-form object(every literal as{name: …}), values that are names (DIFF = "REG_SD_DIFF"); arguments take a description (fn f(dev: "struct dev *" "The device.")); components theirnature. requirement-wordingaccepts the modal verb in French, German, Spanish… (doit,muss,debe), and in a requirement's translations.
0.6.0Not released yet
readability
- Test steps take Python as it is.
do send(hmi.bus, ENGAGE_REQ(True)),expect within 200ms: adcu.state == "Manual": no quotes, no\"escapes, one assertion perexpect. The same goes for stimuli (do …), a test plan'ssetupand a transition's/ action. The Python runs to the end of the line, with brackets balanced, sof({'a': 1})is whole; a;or the block's}ends it. It is highlighted as Python. The linter now reads these lines: an unknown message (GOO(True),sent("BRAKE_CMDS")) or state (adcu.state == "Autonomus") is reported with a did-you-mean, anddo f() wait 5mswithout a;gets a quick fix. purposereplacesmain.purpose "Fuses the sensors"says what a component is for, so it can no longer be read asfn main.mainis still read.- The type comes right after the name.
out cloud: auto-eth "Ethernet" sends POINT_CLOUD, and the same forpart cam: Camera "Front"andmessage M: T "Name". canvas System { part at x, y; … }holds canvas positions apart from the structure. Dragging a block in the diagram, or adding a part, writes there when the system has one. A block placed in both places is flagged, and the canvas line wins.- One spelling. Every long form
archec fmt --simplifyrewrites is now along-formhint with a quick fix, and two properties on one line without;give asame-linehint. Old files still parse and build the same project. MAX-1is caught. When a hyphenated name names nothing but its pieces are constants and numbers,hyphen-minusis reported with the fixMAX - 1.- Code bodies are nested. The formatter indents the body of a
block opened at the end of a header (`fn fpython`) one level under that header. The code itself is the same: a block's common indentation is removed when it is read. - Diagnostics can carry their own quick fix (
Diagnostic.fix), andrewrites()is exported next tosimplify().
0.5.2
- The built project has a menu.
Buildwritesmenu.yaml— Models (one canvas per system), Specification, Architecture, Verification and Documents, each entry only when the project has its file — and alayout.yamlwhose left pane shows it. Until now the Arche app opened a built project on an empty menu. Alayoutin the model, or araw "menu.yaml", still wins. - Edits made in Arche are kept. Once
menu.yamlorlayout.yamlis changed in the app ("+ Page", a renamed entry, the content languages) — or was written by hand — the build leaves it alone; it replaces only what it wrote itself (kept in.archec/). - Open in Arche opens the document. From the Documentation view, a document's menu or its panel's title bar, Arche opens on that document's page (
/view/documentation?tab=SRS), not on its start page.
0.5.1
- Code edited in the Arche app comes back. When the Arche app saves the generated project, the extension offers to pull the code changed there into the
.pydef or the ``` block it came from, as one undoable edit (arche.pullOnChange: ask, always, never; or Arche: Pull code changes from the Arche project). Changes on both sides are reported as conflicts. A build no longer silently overwrites code edited in Arche: it offers to pull first.archec pulldoes the same from the command line. - Simulator errors at their source line. Builds write
.archec/sourcemap.json. Arche: Run test plans / Run the simulation run arche-cli and put each Python error on its line of the.pyor.archefile (Problems view), instead of "line 4" of Arche's copy; Arche: Go to a simulator error… takes an error pasted from the Arche app.archec test,archec runandarchec wheredo it on the command line.
0.5.0
- Documentation view. The Arche side bar lists the project's documents, as the Arche app's Documentation page does: grouped, with their status and progress, and how many requirements each one holds. Click one to read it beside the editor: its fields, the requirements written in it, what it covers, its coverage. Export as Word writes the same document as a .docx. The documents follow the model as you edit it.
deliverablein the language:deliverable SRS "Software Requirements" { group "Software" kind specification status draft version "0.3" covers REQ-1 }, emitted todeliverables.yaml. A requirement names the document it is written in withdocument SRS(an unknown name is an error, with a suggestion). Deliverables have their own section in the Model tree.- The extension ships the Arche command line (
dist/arche-cli.mjs), which assembles the documents with the app's own code.arche.cliPathpoints at another one.
0.4.0
- Python in .py files.
code "ctrl.py"on a component, a system or the project. Afnwith no ``` block takes the def of the same name; every code property (on-enter,on-exit,on-receive,on-write,body, a transition's action) takes the def it names;on_enter_<State>,on_exit_<State>,on_receive_<port>,on_write_<MEMORY>bind by themselves. Bodies are copied into the Arche project, with the imports, constants and helpers they use; a docstring becomes the description. - Checks: missing file or def (with a quick fix that creates it), parameters that are not what Arche passes, the same def in two files, unused defs, a block that hides a def, top-level state changed by a function (lost between calls).
- Editor: go to definition / hover / references / rename between the model and the .py file (renaming
fn mainor stateOnrenamesdef main/def on_enter_On); completion of def names and .py files;arche.pystubs written beside the .py files (arche.python.stubs) so Pylance knows Arche's helpers and the model's messages and constants. - Diagram and tree: the Inside card tags each function with
ctrl.py:12(click to open it), and the Model tree lists a component's .py files. archec fmt --extract-code[=file.py] --writemoves ```python blocks into .py files without changing the generated project;archec stubswritesarche.py.- The patterns example keeps
ctrl's Python inctrl.py.
0.3.1
- Double-click opens a component, as on the Arche canvas. Double-clicks on blocks were lost (the canvas held the pointer for dragging) and only fitted the view.
- The diagram could open off-screen when the panel was created at another size (e.g. beside the editor): a fitted view now refits whenever the panel is resized. A view you panned or zoomed is kept.
- Narrow panels: a slimmer properties panel, and a toolbar that no longer wraps.
- Every component can be opened, not only those with parts. Inside a component without parts, a card lists its functions, variables and registers (click one to go to its source) and links to its state machine.
0.3.0
- Arche theme: the diagram is drawn as the Arche canvas draws it — dotted canvas, white (or dark) rounded cards with soft shadows, kind icons, ports as coloured dots with their names inside, grey links with pill labels, Arche's selection (blue halo, unrelated elements fade), the palette resolved per theme from colors.yaml.
arche.diagram.theme: auto, light, dark. - Arche actions: click to select and edit in a properties panel (rename everywhere, name, description, kind, layer, colour, tags; port direction, type, sends, receives; link messages, flip); drag a block to move it (
at); drag from port to port to link; drag from state to state to add a transition; double-click to go inside or name a link; Del to delete; + to add a part or a state. Side-bar context menu: add part / port / function / state, rename, set name, set kind, delete. Every action is a source edit, undoable in the editor. - Simpler language (the long forms still work): direction-first ports (
out tx: can sends A, B), a code fence right afterfnis its body, lists without brackets, the first state is the initial one, links take their type and messages from their ports.archec fmt --simplifyrewrites a file in the short forms without changing the generated project. - Pointers:
*T,T*,**T,*void,*T[4]in every type position;pointer-sizeproject property;pointer-value,pointer-on-wire,void-valuechecks; emitted asptr_Taddress entries in data-types.yaml. - Delegated boundary ports are drawn as dashed lines to the part that implements them.
0.2.0
- Diagram beside the editor (Arche: Open diagram to the side, ⌘K V, or the editor-title button): block diagrams of systems and components (ports, links coloured by port type, carried messages), state machines and scenario sequence diagrams. Uses the
atcanvas positions when every part has one, else an automatic layout (toggle). Click selects and reveals the source; double-click or open › drills into a composite; the diagram follows the editor cursor; live as you type; export to SVG. - Arche side bar (activity-bar icon): a Model tree laid out like the Arche app — systems and their component hierarchy (ports, functions, variables, memory, state machines, requirements), component definitions, messages, data types, constants, requirements, actors, missions, scenarios, test plans, traces and catalogs — and a Files tree of the include graph. Click to jump to the source; the diagram button opens the element in the diagram.
0.1.0
- First release: grammar, language server (diagnostics, completion, hover, navigation, rename, formatting, quick fixes), build / LaTeX export / open-in-Arche commands.