architecture vérifié

arche/arche-lang-model

arche-lang — how it works

The arche-lang toolchain described in its own language. Start with the

toolchaincompilerself-model

archec add main.arche arche/arche-lang-model@^0.1

▶ Essayer Ouvrir dans le Playground { } Voir le code son modèle tourne dans votre navigateur, rien à installer

Paquet

Typearchitecture
Version0.1.0
LicenceApache-2.0
Contrôle exportnone
Compatible avecarchec >=0.10
Édition0.12
Sitehttps://github.com/arche-lang/arche-lang

Modèle

SystèmesWorkstation Toolchain
ComposantsCli DevMachine VsCodeClient LanguageServer Views Runner Editor Importers Exporters Analyses Rewriters Libraries ArcheStore GenDispatch GenShared UserGenerators EmbassyGen CGen UiEmbeddedGen CppGen GoGen UiWebGen IdlGen ModelicaGen et 25 de plus
InterfacesArchecCli
Exigences27
Messages14
Scénarios5

Code fourni

Pas de code : ce paquet n’est qu’un modèle.

Ce que c’est

Architecture Toolchain · ses parties et leurs liens
Toolchain check as you type build, export problems archec <command> checked program Arche project archec pull uses, boards archec add generated code archec import archec : Cli user run VS Code extension : Editor diags project compile builds Compiler sources buffers project program diags Generators program files Exporters program files Analyses program report Rewriters program edits Libraries and boards : Libraries request found Arche Store : ArcheStore request found Importers foreign sources Arche app : ArcheApp project edited Target toolchains : ToolsOut files Source tools : ToolsIn files

arche-lang, described in arche-lang

This example is the toolchain in this repository written as a model: its parts, the data passing between them, how a build runs, what each generator makes, the editor, where each part runs, the design decisions, and the tests that verify what the language promises. Each part has a source naming the real files, written from the arche-lang folder, so the model is also a map of the code.

archec build examples/arche-lang/main.arche -o out    # then: arche --project out
archec doc   examples/arche-lang/main.arche --html -o arche-lang.html
archec gen   examples/arche-lang/main.arche --target nusmv -o smv   # the two machines, for NuSMV

In VS Code, open main.arche. The diagram shows the Toolchain system, and you open a block to see the parts inside it.

Read it in this order

| File | What it says | |---|---| | main.arche | The Toolchain system: the command line, the editor, the compiler, the generators, the exporters, the analyses, the rewriters, the libraries, the importers, the Arche app and the outside tools, and what flows between them. | | data.arche | What the stages hand each other: source text, tokens, the file AST, the Program, diagnostics, the Arche project, generated files, LSP messages, source edits. Each message names the TypeScript type that carries it. | | pipeline.arche | The compiler, stage by stage: host → lexer → parser → loader → checker → emitter → validator → writer. Its state machine is one archec build, and shows where a build stops and why. | | generators.arche | archec gen: the dispatcher, the readers the generators share, and each generator with the --target values it answers. | | exchange.arche | Importers (an Arche project, SysML v2, ReqIF, FMU), exporters (ReqIF, SysML, FMI, LaTeX, HTML), analyses (timing, model checking, studies, certification, TARA), rewriters (fmt, simplify, extract, merge) and the libraries with the board store. | | editor.arche | The VS Code extension and its language server. The server's state machine is what happens after a keystroke: a quick check, then a full build once typing pauses. | | cli.arche | Every archec command, and the function in src/cli/*.ts that runs it. | | outside.arche | The Arche app and the other tools arche-lang reads from or writes for. | | scenarios.arche | Five walk-throughs as sequence diagrams: archec build, archec gen --target embassy, typing in VS Code, dragging a block, archec board add. | | decisions.arche | Why it is built this way: one table for the language, contextual keywords, recovery at the next line, pure generators, a formatter that never moves a token, Arche's own code for Arche's verdicts, builds judged by meaning, the compiler run in the editor's process. | | requirements.arche, verification.arche | What the toolchain promises, and the test file of npm test that verifies each promise. | | qualification.arche | archec in a safety project: the use cases a team may rely on (archec qualify --use gen-c), the requirements on archec that refine each, and, in verification.arche, the tests that show them — what archec qualify writes the ISO 26262-8 and DO-330 kit from ([qualification](../../docs/qualification.md)). | | deployment.arche | The three node programs (dist/cli.js, the extension, the language server) on the developer's machine. | | canvas.arche | Where the blocks sit in the diagrams. |

It stays true

test/selfmodel.test.js fails when the model and the code part ways:

So when you add a module, a generator or a command, give it a place here.

Limits

but cannot prove that a build always ends: the generated model lets a state wait for ever, and a leads to property would need fairness.

Fichiers 18 · 107,3 Ko

Télécharger le .archepkg Le .archepkg est signé : archec add le vérifie.

Utilise

N’utilise aucun autre paquet.

Utilisé par

Aucun paquet du store ne l’utilise encore.

Versions

★ 0 étoile↓ 0 téléchargement

VersionPubliée learchecÉtatChangementsTéléchargements
0.1.012 nov. 2026>=0.10publique0

Signature

Signé par arche avec la clé e660d0a8851875b9. Fichiers : 18, empreinte sha256-ad223843dc4bfca5dd72…. archec add vérifie les deux avant d’écrire quoi que ce soit.

Discussion

Chargement…