|
1 | | -;; SPDX-License-Identifier: PMPL-1.0-or-later |
2 | | -;; Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk> |
3 | | -;; META.a2ml — Meta-level information for alloyiser |
4 | | - |
5 | | -(meta |
6 | | - (version "0.1.0") |
7 | | - (last-updated "2026-03-21") |
8 | | - |
9 | | - (architecture-decisions |
10 | | - (adr "001-alloy-as-backend" |
11 | | - (status "accepted") |
12 | | - (context "Need a formal verification backend that can find design bugs in API specs without requiring user expertise in formal methods") |
13 | | - (decision "Use Alloy 6 (MIT, Daniel Jackson) — relational logic with SAT solving via Kodkod/SAT4J for bounded model checking") |
14 | | - (consequences "Alloy is well-established, has a Java API for headless use, and can exhaustively check small scopes. Requires JVM dependency for analyzer.")) |
15 | | - |
16 | | - (adr "002-spec-to-model-pipeline" |
17 | | - (status "accepted") |
18 | | - (context "Need to transform API specifications into Alloy models without requiring users to learn Alloy syntax") |
19 | | - (decision "Pipeline: spec file -> parser -> SpecModel IR -> Alloy codegen -> .als files. Users declare invariants in TOML, alloyiser generates all Alloy code") |
20 | | - (consequences "Users never write Alloy directly. Alloyiser maps OpenAPI concepts (schemas, required, refs) to Alloy concepts (sigs, facts, relations) automatically.")) |
21 | | - |
22 | | - (adr "003-iser-pattern" |
23 | | - (status "accepted") |
24 | | - (context "Need consistent architecture across the -iser family") |
25 | | - (decision "Use manifest-driven code generation: user describes WHAT in alloyiser.toml, tool generates HOW") |
26 | | - (consequences "Users write zero Alloy code; all complexity in alloyiser. Same pattern as chapeliser, typedqliser, etc.")) |
27 | | - |
28 | | - (adr "004-abi-ffi-standard" |
29 | | - (status "accepted") |
30 | | - (context "Need verified interop between Rust CLI, Alloy Analyzer (JVM), and user toolchain") |
31 | | - (decision "Idris2 ABI for formal proofs of model soundness, Zig FFI for C-ABI bridge") |
32 | | - (consequences "Compile-time guarantees that model extraction preserves spec semantics. JVM bridge via JNI or subprocess.")) |
33 | | - |
34 | | - (adr "005-counterexample-reports" |
35 | | - (status "accepted") |
36 | | - (context "Alloy Analyzer counterexamples are XML atoms — not useful to API designers") |
37 | | - (decision "Map counterexample atoms back to original spec entities and produce human-readable violation reports with suggested fixes") |
38 | | - (consequences "Counterexample 'Pet$0' gets reported as 'The OpenAPI spec allows creating a Pet without an owner field'. Actionable output."))) |
39 | | - |
40 | | - (development-practices |
41 | | - (language "Rust" (purpose "CLI orchestration, spec parsing, report generation")) |
42 | | - (language "Idris2" (purpose "ABI formal proofs: model extraction soundness")) |
43 | | - (language "Zig" (purpose "FFI C-ABI bridge to Alloy Analyzer (JVM)")) |
44 | | - (language "Alloy" (purpose "Generated models — .als files for SAT solving")) |
45 | | - (build-tool "cargo") |
46 | | - (ci "GitHub Actions (17 workflows)")) |
47 | | - |
48 | | - (design-rationale |
49 | | - (principle "Manifest-driven" |
50 | | - (explanation "User intent captured in alloyiser.toml; invariants are plain-English names mapped to Alloy expressions")) |
51 | | - (principle "Find bugs before code" |
52 | | - (explanation "API design bugs (orphaned resources, impossible states, race conditions) are cheaper to fix at spec time than implementation time")) |
53 | | - (principle "Formally verified extraction" |
54 | | - (explanation "Idris2 dependent types prove that the model extraction preserves specification semantics — the generated Alloy model is faithful to the source spec")) |
55 | | - (principle "Actionable counterexamples" |
56 | | - (explanation "Reports map Alloy atoms back to spec entities, explain the violation in domain terms, and suggest fixes")))) |
| 1 | +# SPDX-License-Identifier: PMPL-1.0-or-later |
| 2 | +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk> |
| 3 | +# |
| 4 | +# META.a2ml — Alloyiser meta-level information |
| 5 | +[metadata] |
| 6 | +version = "0.1.0" |
| 7 | +last-updated = "2026-03-21" |
| 8 | + |
| 9 | +[project-info] |
| 10 | +license = "PMPL-1.0-or-later" |
| 11 | +author = "Jonathan D.A. Jewell (hyperpolymath)" |
| 12 | + |
| 13 | +[architecture-decisions] |
| 14 | +decisions = [ |
| 15 | + # No ADRs recorded |
| 16 | +] |
| 17 | + |
| 18 | +[development-practices] |
| 19 | +versioning = "SemVer" |
| 20 | +documentation = "AsciiDoc" |
| 21 | +build-tool = "just" |
| 22 | + |
| 23 | +[maintenance-axes] |
| 24 | +scoping-first = true |
| 25 | +axis-1 = "must > intend > like" |
| 26 | +axis-2 = "corrective > adaptive > perfective" |
| 27 | +axis-3 = "systems > compliance > effects" |
0 commit comments