Examples: Atlas walk controls
Overview
Example appsDecision tables
Rule 30 cellStrike dieWise deferralCurrent supportHeader workPlant attunementCapability routePublish gateProposal admissionCompression admissionQuorum commitAddress admissionDataflow policyDraft admissionCoded matmul admissionUTQC row honestyCalculator protocolRequantization clampJCS NFC admissionTwo-seed barDocs sync// example · State machines
Atlas walk controls
Find the next state of the Atlas Explorer view from the button pressed. Then each walk through the E8 orbit can be replayed step by step.
Inspired by afflom/atlas-explorer (live). An interactive explorer of the UOR Atlas inside E8: 120 root classes, the 48-class Atlas instances and their reflection orbit.
Pattern: State machine, OMG UML 2.5.1 behavioral state machine. To write one of your own, follow How to build a state machine app.
The data in this figure
| From | Link | To |
|---|---|---|
| home | 3 rules | home |
| home | REQ-009 | away |
| home | REQ-006 | walking |
| away | 2 rules | home |
| away | 2 rules | away |
| away | REQ-006 | walking |
| away | REQ-010 | returning |
| walking | REQ-003 | walking |
| walking | REQ-001 | home |
| walking | REQ-002 | away |
| returning | REQ-005 | returning |
| returning | REQ-004 | home |
- Fingerprint
5cfff7a15213b61f2a400fbae06c4dd667f2ce39ae5edeeb7cf2abe3940056b6- Acceptance vectors
- 41
- Claims
- 8
Verified by prismpm verify in the pinned SDK when this site was built.
The prompt
This is the whole input. Raw JSON · Open it in the builder · Download the app (.zip)
The prompt 480 lines
{
"schema": "prism/prompt/1",
"goal": "Find the next state of the Atlas Explorer view from the button pressed. Then each walk through the E8 orbit can be replayed step by step.",
"pattern": "stateMachine",
"machine": {
"state": "state",
"initial": "home",
"final": []
},
"repository": "afflom/atlas-explorer",
"app": {
"name": "atlas-explorer-walk",
"title": "Atlas walk controls",
"purpose": "Decide where the Atlas instance stands after a Dynamics control event: at A0, away from it, in a random walk, or walking home.",
"fields": [
{
"name": "state",
"kind": "choice",
"values": [
"home",
"away",
"walking",
"returning"
],
"means": "where the instance stands now: A0, another instance, a running random walk, or a running walk home"
},
{
"name": "event",
"kind": "choice",
"values": [
"reflect",
"walk",
"walk-home",
"reset",
"finish"
],
"means": "the control used, or the end of a running word"
},
{
"name": "orbit",
"kind": "choice",
"values": [
"mapping",
"mapped"
],
"means": "whether the census of all 75,600 instances has finished"
},
{
"name": "lands",
"kind": "choice",
"values": [
"a0",
"other"
],
"means": "whether the instance the event ends on is A0"
}
],
"outcomes": [
"home",
"away",
"walking",
"returning"
],
"meanings": {
"home": "the instance is A0, the canonical 48 classes",
"away": "the instance is another of the 75,600 in the orbit",
"walking": "a random word of 12 simple reflections is running and the controls are disabled",
"returning": "the path back to A0 from the orbit map is running and the controls are disabled"
},
"rules": [
{
"when": [
{
"field": "state",
"op": "is",
"value": "walking"
},
{
"field": "event",
"op": "is",
"value": "finish"
},
{
"field": "lands",
"op": "is",
"value": "a0"
}
],
"then": "home",
"why": "index.html runWord done: the walk ends at A0 when live.isA0"
},
{
"when": [
{
"field": "state",
"op": "is",
"value": "walking"
},
{
"field": "event",
"op": "is",
"value": "finish"
}
],
"then": "away",
"why": "index.html runWord done: the walk ends at another instance"
},
{
"when": [
{
"field": "state",
"op": "is",
"value": "walking"
}
],
"then": "walking",
"why": "index.html setBusy: walk, reset and the simple reflection buttons are disabled while busy"
},
{
"when": [
{
"field": "state",
"op": "is",
"value": "returning"
},
{
"field": "event",
"op": "is",
"value": "finish"
}
],
"then": "home",
"why": "index.html homeBtn: the pathToRoot word ends with the 48 classes A0 again"
},
{
"when": [
{
"field": "state",
"op": "is",
"value": "returning"
}
],
"then": "returning",
"why": "index.html setBusy: the controls stay disabled while the walk home runs"
},
{
"when": [
{
"field": "event",
"op": "is",
"value": "walk"
}
],
"then": "walking",
"why": "index.html walkBtn: runWord with 12 random simple reflections"
},
{
"when": [
{
"field": "event",
"op": "is",
"value": "reset"
}
],
"then": "home",
"why": "index.html resetBtn: loc is restored to the identity, which is A0"
},
{
"when": [
{
"field": "event",
"op": "is",
"value": "reflect"
},
{
"field": "lands",
"op": "is",
"value": "a0"
}
],
"then": "home",
"why": "index.html applyReflection: a reflection can carry the 48 classes back onto A0"
},
{
"when": [
{
"field": "event",
"op": "is",
"value": "reflect"
}
],
"then": "away",
"why": "index.html applyReflection: a simple reflection carries the Atlas to another instance"
},
{
"when": [
{
"field": "state",
"op": "is",
"value": "away"
},
{
"field": "event",
"op": "is",
"value": "walk-home"
},
{
"field": "orbit",
"op": "is",
"value": "mapped"
}
],
"then": "returning",
"why": "index.html: homeBtn is enabled only when orbit.done and the instance is not A0"
},
{
"when": [
{
"field": "state",
"op": "is",
"value": "away"
}
],
"then": "away",
"why": "index.html: walk home is disabled until the orbit is mapped, and finish does nothing when no word runs"
}
],
"otherwise": "home",
"otherwiseWhy": "at A0, walk home is disabled and finish does nothing, so the instance stays home",
"properties": [
{
"kind": "never",
"when": [
{
"field": "state",
"op": "is",
"value": "home"
}
],
"then": "returning",
"why": "index.html: homeBtn is disabled when live.isA0"
},
{
"kind": "never",
"when": [
{
"field": "state",
"op": "is",
"value": "away"
},
{
"field": "orbit",
"op": "is",
"value": "mapping"
}
],
"then": "returning",
"why": "index.html: walk home needs the orbit map to find the path to A0"
},
{
"kind": "always",
"when": [
{
"field": "state",
"op": "is",
"value": "walking"
},
{
"field": "event",
"op": "is",
"value": "reflect"
}
],
"then": "walking",
"why": "index.html setBusy: reflections are disabled during a walk"
},
{
"kind": "always",
"when": [
{
"field": "event",
"op": "is",
"value": "reset"
},
{
"field": "state",
"op": "is not",
"value": "walking"
},
{
"field": "state",
"op": "is not",
"value": "returning"
}
],
"then": "home",
"why": "reset always restores A0 when it is enabled"
},
{
"kind": "never",
"when": [
{
"field": "state",
"op": "is",
"value": "returning"
},
{
"field": "event",
"op": "is",
"value": "finish"
}
],
"then": "away",
"why": "the walk home always ends at A0"
}
],
"examples": [
{
"request": "home walk mapping other",
"response": "walking"
},
{
"request": "walking finish mapped other",
"response": "away"
},
{
"request": "away walk-home mapped a0",
"response": "returning"
},
{
"request": "returning finish mapped a0",
"response": "home"
},
{
"request": "away walk-home mapping other",
"response": "away"
},
{
"request": "walking reset mapped a0",
"response": "walking"
},
{
"request": "home reflect mapping other",
"response": "away"
}
]
},
"stakeholders": [
{
"name": "Visitor",
"text": "Explores the E8 reflection orbit of the Atlas and needs every control to do what it says, and nothing while a walk runs.",
"concerns": [
"Correct answers"
]
},
{
"name": "Mathematician",
"text": "Checks that the walk home always returns the 48 classes to A0 and that block reorderings are gauge transformations.",
"concerns": [
"Proved guarantees"
]
}
],
"components": [
{
"name": "UOR Atlas Explorer page",
"text": "The single-page explorer on GitHub Pages that draws the 120 classes and runs the reflection walks.",
"kind": "staticSite"
}
],
"threats": [
{
"name": "Walk home without a map",
"text": "Walk home is pressed before the orbit census finishes, so there is no path to A0.",
"stride": "denialOfService",
"asset": "answer",
"likelihood": "low",
"impact": "minor",
"control": {
"name": "Map before home",
"text": "Walk home leaves away only once the orbit is mapped.",
"evidence": [
{
"kind": "proof",
"reference": "AtlasExplorerWalkProofs::inv002Holds"
},
{
"kind": "review",
"reference": "index.html setBusy"
}
]
}
},
{
"name": "Overlapping words",
"text": "A control starts a second reflection word while one runs, so the instance shown is not the one the word reaches.",
"stride": "tampering",
"asset": "answer",
"likelihood": "medium",
"impact": "minor",
"control": {
"name": "Busy lock",
"text": "While a word runs, every control leaves the state as it is.",
"evidence": [
{
"kind": "proof",
"reference": "AtlasExplorerWalkProofs::inv003Holds"
},
{
"kind": "review",
"reference": "index.html runWord"
}
]
}
},
{
"name": "Plane click during a walk",
"text": "A click on the plane in Dynamics mode applies a reflection without checking busy.",
"stride": "tampering",
"asset": "answer",
"likelihood": "low",
"impact": "minor",
"accepted": "The machine models the Dynamics buttons that setBusy disables; the plane click handler in index.html is not gated by busy and is outside this model."
}
],
"quality": [
{
"characteristic": "Interaction capability",
"subcharacteristic": "User error protection",
"requirement": "Disabled controls stay disabled",
"text": "No button press changes the state while a walk or a walk home runs.",
"measure": "Button transitions during a word",
"measureText": "Requests in walking or returning, other than finish, that answer a different state.",
"threshold": 0
},
{
"characteristic": "Functional suitability",
"subcharacteristic": "Functional completeness",
"requirement": "Every state reachable",
"text": "Each of the four states is reachable from home.",
"measure": "Unreachable states",
"measureText": "States no sequence of events reaches from the initial state.",
"threshold": 0
}
],
"journeys": [
{
"stakeholder": "Visitor",
"steps": [
"REQ-006",
"REQ-003",
"REQ-002",
"REQ-007"
]
},
{
"stakeholder": "Mathematician",
"steps": [
"REQ-009",
"REQ-010",
"REQ-004",
"INV-005"
]
}
],
"axioms": {
"inv003Holds": [
"Classical.choice",
"Quot.sound",
"propext"
],
"inv004Holds": [
"Classical.choice",
"Quot.sound",
"propext"
]
},
"concerns": [],
"license": "MIT OR Apache-2.0"
}What the app claims
Each claim is a row in model/ids.toml, a scenario and a test, and a theorem the Lean kernel checks. The claims are quoted as the model states them.
What the app claims 8 items
AE-01The app never answers returning when state is homeAE-02The app never answers returning when state is away and orbit is mappingAE-03The app always answers walking when state is walking and event is reflectAE-04The app always answers home when event is reset and state is not walking and state is not returningAE-05The app never answers away when state is returning and event is finishAE-06The architecture description declares every stakeholder, concern, component, edge, viewpoint and view it referencesAE-07The ISO/IEC 25010 quality model numbers every characteristic, subcharacteristic, requirement and measure, and every parent it names is declaredAE-08Every compliance obligation is numbered in order and names its evidence
Pattern
State machine: OMG UML 2.5.1 behavioral state machine. The answer is the next state, given the current state and an event. This is a UML state machine written as one pure function. The state travels in the request, so the app keeps nothing between requests. The builder proves what holds over every run.
| Pattern | Standard | Answers |
|---|---|---|
| State machine | OMG UML 2.5.1 behavioral state machine | home, away, walking, returning |
Behavior
A request is state, event, orbit, lands, separated by spaces. The first rule that matches decides. If none matches, the answer is home. A request over 112 bytes, or in any other form, is answered invalid.
Behavior 12 rows
| Rule | When | Answer | Why |
|---|---|---|---|
| REQ-001 | state is walking and event is finish and lands is a0 | home | index.html runWord done: the walk ends at A0 when live.isA0 |
| REQ-002 | state is walking and event is finish | away | index.html runWord done: the walk ends at another instance |
| REQ-003 | state is walking | walking | index.html setBusy: walk, reset and the simple reflection buttons are disabled while busy |
| REQ-004 | state is returning and event is finish | home | index.html homeBtn: the pathToRoot word ends with the 48 classes A0 again |
| REQ-005 | state is returning | returning | index.html setBusy: the controls stay disabled while the walk home runs |
| REQ-006 | event is walk | walking | index.html walkBtn: runWord with 12 random simple reflections |
| REQ-007 | event is reset | home | index.html resetBtn: loc is restored to the identity, which is A0 |
| REQ-008 | event is reflect and lands is a0 | home | index.html applyReflection: a reflection can carry the 48 classes back onto A0 |
| REQ-009 | event is reflect | away | index.html applyReflection: a simple reflection carries the Atlas to another instance |
| REQ-010 | state is away and event is walk-home and orbit is mapped | returning | index.html: homeBtn is enabled only when orbit.done and the instance is not A0 |
| REQ-011 | state is away | away | index.html: walk home is disabled until the orbit is mapped, and finish does nothing when no word runs |
| otherwise | no rule matches | home | at A0, walk home is disabled and finish does nothing, so the instance stays home |
State machine
The state is state, and the answer is the next state. A run feeds each answer back in as the next state, starting from home (OMG UML 2.5.1, clause 14). All 80 requests of the spec's sample were stepped to find the states a run can reach. Every state can be reached and none is final, so every state is allowed in a run.
| State | Kind | Meaning |
|---|---|---|
| home | initial, reachable | the instance is A0, the canonical 48 classes |
| away | reachable | the instance is another of the 75,600 in the orbit |
| walking | reachable | a random word of 12 simple reflections is running and the controls are disabled |
| returning | reachable | the path back to A0 from the orbit map is running and the controls are disabled |
Transitions
Every step a reachable state can take, and the rule that takes it.
| From | To | By |
|---|---|---|
| home | home | REQ-007 |
| home | home | REQ-008 |
| home | home | otherwise |
| home | away | REQ-009 |
| home | walking | REQ-006 |
| away | home | REQ-007 |
| away | home | REQ-008 |
| away | away | REQ-009 |
| away | away | REQ-011 |
| away | walking | REQ-006 |
| away | returning | REQ-010 |
| walking | walking | REQ-003 |
| walking | home | REQ-001 |
| walking | away | REQ-002 |
| returning | returning | REQ-005 |
| returning | home | REQ-004 |
Properties Lean proves
Each property is a theorem about the same definitions the app is built from. It is proved for every request, not only the tested ones.
Properties Lean proves 5 rows
| Property | Statement | Theorem | Why |
|---|---|---|---|
| INV-001 | It never answers returning when state is home. | AtlasExplorerWalkProofs::inv001Holds | index.html: homeBtn is disabled when live.isA0 |
| INV-002 | It never answers returning when state is away and orbit is mapping. | AtlasExplorerWalkProofs::inv002Holds | index.html: walk home needs the orbit map to find the path to A0 |
| INV-003 | It always answers walking when state is walking and event is reflect. | AtlasExplorerWalkProofs::inv003Holds | index.html setBusy: reflections are disabled during a walk |
| INV-004 | It always answers home when event is reset and state is not walking and state is not returning. | AtlasExplorerWalkProofs::inv004Holds | reset always restores A0 when it is enabled |
| INV-005 | It never answers away when state is returning and event is finish. | AtlasExplorerWalkProofs::inv005Holds | the walk home always ends at A0 |
Architecture
Stakeholders and the concerns each one views the app through (ISO/IEC/IEEE 42010).
| Stakeholder | Who they are | Concerns |
|---|---|---|
| Mathematician | Checks that the walk home always returns the 48 classes to A0 and that block reorderings are gauge transformations. | Proved guarantees |
| Verifier | Anyone who loads the holo, checks its fingerprint and replays its acceptance vectors before trusting an answer. | Integrity of the published app, Refused malformed requests, Proved guarantees |
| Visitor | Explores the E8 reflection orbit of the Atlas and needs every control to do what it says, and nothing while a walk runs. | Correct answers |
Concerns
What the stakeholders care about, and the model each is viewed in.
| Concern | What it means | Model |
|---|---|---|
| Correct answers | Every well-formed request is answered by the first rule that matches it, or home when none does, as the spec states. | quality |
| Integrity of the published app | What a visitor runs is the holo the build verified, with its fingerprint and signed provenance beside it. | security |
| Proved guarantees | Each of the 5 properties of the spec holds for every request, proved by the Lean kernel. | quality |
| Refused malformed requests | A request that is not the 4 fields in order, or is longer than 112 bytes, is answered invalid and never guessed. | security |
Components
7 components and 9 edges between them.
| Component | Kind | What it is |
|---|---|---|
| Atlas walk controls guest | service | The Core-Wasm guest built from the model: it answers one request of at most 112 bytes with one answer of at most 64. |
| Atlas walk controls page | staticSite | The page the template publishes: the holo, its fingerprint, its provenance and its acceptance vectors. |
| Browser | externalSystem | The visitor's web browser, which loads the page and runs the Atlas walk controls guest. |
| GitHub Pages | externalSystem | Serves the page and the holo from the repository Pages workflow. |
| Prism build | cliAdapter | prismpm verify in the SDK image prismpm.lock pins: it checks every theorem, builds the guest and replays every vector. |
| Source repository | externalSystem | The repository that holds the prompt, the model and its gate. |
| UOR Atlas Explorer page | staticSite | The single-page explorer on GitHub Pages that draws the 120 classes and runs the reflection walks. |
Design views
The SDK checks each view against the system model and draws it as OPL and PlantUML.
| View | Diagram | Viewpoint |
|---|---|---|
| Deciding a Atlas walk controls request | opmObjectProcess | Visitor: Correct answers |
| Components of Atlas walk controls | umlComponent | Verifier: Integrity of the published app |
| Answering a Atlas walk controls request | umlSequence | Visitor: Correct answers |
| States of the Atlas walk controls guest | umlStateMachine | Verifier: Refused malformed requests |
| The Atlas walk controls state machine | umlStateMachine | Visitor: Correct answers |
Features and journeys
18 features. Each names the definitions that do the work and the tests that accept it. Each stakeholder has one journey.
Features and journeys 18 rows
| Feature | Calls | Accepted by |
|---|---|---|
| When state is walking and event is finish and lands is a0, the answer is home. | AtlasExplorerWalk::rule1, AtlasExplorerWalk::judge | AtlasExplorerWalk::application |
| When state is walking and event is finish, the answer is away. | AtlasExplorerWalk::rule2, AtlasExplorerWalk::judge | AtlasExplorerWalk::application |
| When state is walking, the answer is walking. | AtlasExplorerWalk::rule3, AtlasExplorerWalk::judge | AtlasExplorerWalk::application |
| When state is returning and event is finish, the answer is home. | AtlasExplorerWalk::rule4, AtlasExplorerWalk::judge | AtlasExplorerWalk::application |
| When state is returning, the answer is returning. | AtlasExplorerWalk::rule5, AtlasExplorerWalk::judge | AtlasExplorerWalk::application |
| When event is walk, the answer is walking. | AtlasExplorerWalk::rule6, AtlasExplorerWalk::judge | AtlasExplorerWalk::application |
| When event is reset, the answer is home. | AtlasExplorerWalk::rule7, AtlasExplorerWalk::judge | AtlasExplorerWalk::application |
| When event is reflect and lands is a0, the answer is home. | AtlasExplorerWalk::rule8, AtlasExplorerWalk::judge | AtlasExplorerWalk::application |
| When event is reflect, the answer is away. | AtlasExplorerWalk::rule9, AtlasExplorerWalk::judge | AtlasExplorerWalk::application |
| When state is away and event is walk-home and orbit is mapped, the answer is returning. | AtlasExplorerWalk::rule10, AtlasExplorerWalk::judge | AtlasExplorerWalk::application |
| When state is away, the answer is away. | AtlasExplorerWalk::rule11, AtlasExplorerWalk::judge | AtlasExplorerWalk::application |
| When no rule matches, the answer is home. | AtlasExplorerWalk::judge | AtlasExplorerWalk::application |
| A request that is not state, event, orbit, lands in order, separated by single spaces, or is over 112 bytes, is answered invalid. | AtlasExplorerWalk::dispatch, AtlasExplorerWalk::decodeField1 | AtlasExplorerWalk::application |
| It never answers returning when state is home. | AtlasExplorerWalk::judge | AtlasExplorerWalkProofs::inv001Holds |
| It never answers returning when state is away and orbit is mapping. | AtlasExplorerWalk::judge | AtlasExplorerWalkProofs::inv002Holds |
| It always answers walking when state is walking and event is reflect. | AtlasExplorerWalk::judge | AtlasExplorerWalkProofs::inv003Holds |
| It always answers home when event is reset and state is not walking and state is not returning. | AtlasExplorerWalk::judge | AtlasExplorerWalkProofs::inv004Holds |
| It never answers away when state is returning and event is finish. | AtlasExplorerWalk::judge | AtlasExplorerWalkProofs::inv005Holds |
Journeys
The ordered features each stakeholder takes.
| Stakeholder | Steps |
|---|---|
| Mathematician | REQ-009 → REQ-010 → REQ-004 → INV-005 |
| Verifier | refuse → INV-001 → INV-002 → INV-003 → INV-004 → INV-005 |
| Visitor | REQ-006 → REQ-003 → REQ-002 → REQ-007 |
Security and threat model
14 threats against 4 assets. Each has a STRIDE category, and either a control with evidence or a risk that is accepted on purpose.
Security and threat model 14 rows
| Threat | STRIDE | Asset | Risk | Answered by |
|---|---|---|---|---|
| Answer that breaks INV-001 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-001: proof AtlasExplorerWalkProofs::inv001Holds |
| Answer that breaks INV-002 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-002: proof AtlasExplorerWalkProofs::inv002Holds |
| Answer that breaks INV-003 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-003: proof AtlasExplorerWalkProofs::inv003Holds |
| Answer that breaks INV-004 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-004: proof AtlasExplorerWalkProofs::inv004Holds |
| Answer that breaks INV-005 | repudiation | Answer | medium likelihood, critical impact | Proof of INV-005: proof AtlasExplorerWalkProofs::inv005Holds |
| Granted capability | informationDisclosure | Answer | low likelihood, major impact | No capability granted: gate prism-code check refuses an ungranted guest import |
| Malformed request | tampering | Request bytes | high likelihood, major impact | Strict decoder: gate malformed-request acceptance vectors, replayed in the compiled guest by prismpm verify |
| Overlapping words | tampering | Answer | medium likelihood, minor impact | Busy lock: proof AtlasExplorerWalkProofs::inv003Holds; review index.html runWord |
| Oversized request | denialOfService | Request bytes | medium likelihood, minor impact | Bounded request: gate acceptance vectors at the request bound, one byte over it, and at the guest allocation bound, replayed by prismpm verify |
| Plane click during a walk | tampering | Answer | low likelihood, minor impact | accepted: The machine models the Dynamics buttons that setBusy disables; the plane click handler in index.html is not gated by busy and is outside this model. |
| Substituted holo | spoofing | Published holo | low likelihood, critical impact | Fingerprint and provenance: gate actions/attest-build-provenance in the pages workflow; gate prism-code check of the holo identities in the page |
| Substituted host | spoofing | Published holo | low likelihood, critical impact | accepted: A page cannot defend against its own host. The holo carries signed build provenance a visitor can check, and the app can be rebuilt from its prompt. |
| Tampered model | tampering | Model source | low likelihood, major impact | Regenerated from the prompt: gate prismpm verify in the SDK image prismpm.lock pins; review app/prompt.json |
| Walk home without a map | denialOfService | Answer | low likelihood, minor impact | Map before home: proof AtlasExplorerWalkProofs::inv002Holds; review index.html setBusy |
Quality
ISO/IEC 25010:2023 requirements. Each has a measure and a threshold that a theorem pins.
Quality 8 rows
| Requirement | Characteristic | Measure | Threshold |
|---|---|---|---|
| Bounded allocation: The guest allocates at most 224 bytes for one request. | Performance efficiency: Resource utilization | Guest allocation bytes | 224 |
| Bounded request: A request over 112 bytes is refused before any field is read. | Performance efficiency: Time behaviour | Request bytes read | 112 |
| Disabled controls stay disabled: No button press changes the state while a walk or a walk home runs. | Interaction capability: User error protection | Button transitions during a word | 0 |
| Every property proved: All 5 properties are theorems the Lean kernel checks. | Security: Integrity | Unproved properties | 0 |
| Every request answered: Every request gets an answer: a rule, home otherwise, or invalid. | Functional suitability: Functional completeness | Unanswered requests | 0 |
| Every state reachable: Each of the four states is reachable from home. | Functional suitability: Functional completeness | Unreachable states | 0 |
| Every vector replays: All 41 acceptance vectors replay in the compiled guest, the shortest 0 bytes long. | Reliability: Faultlessness | Failed vectors | 0 |
| Examples answered as stated: Every one of the 7 examples of the spec is answered as it states. | Functional suitability: Functional correctness | Example mismatches | 0 |
Compliance
One obligation per standard, each naming its evidence.
| Standard | Subject | Evidence |
|---|---|---|
| ISO/IEC/IEEE 42010:2022 | Architecture description | Architecture::architectureDescriptionHolds |
| ISO/PAS 19450:2015 and OMG UML 2.5.1 | Design views | Design::viewOpmDecide, Design::viewUmlComponents, Design::viewUmlRequest, Design::viewUmlStates, Design::viewUmlMachine |
| ISO/IEC 25010:2023 | Product quality | Quality::qualityModelHolds |
| ISO/IEC 27034-1:2011 and ISO/IEC 27005:2022 | Application security and risk | Security::controlSet |
| OMG UML 2.5.1 behavioral state machine | State machine | AtlasExplorerWalk::judge |
| OpenSpec | Requirements | AtlasExplorerWalk::application |
| SPDX MIT OR Apache-2.0 | Licensing | AtlasExplorerWalk::application |
Rendered design views
Written by the SDK from the design records when it verified the app.
design/Design.viewOpmDecide.opl
View: Design::viewOpmDecide
Title: Deciding a Atlas walk controls request
Viewpoint: Architecture::viewpointVisitorCorrectAnswers
Notation: ISO/PAS 19450:2015 OPM, Prism OPL profile
componentAtlasWalkControlsGuest is an object.
componentAtlasWalkControlsGuest can be stateDeciding or stateIdle.
componentBrowser is an object.
processDecide is a process.
processEncodeAnswer is a process.
processJudge is a process.
processParseRequest is a process.
componentAtlasWalkControlsGuest handles processDecide.
processParseRequest requires componentBrowser.
processEncodeAnswer affects componentBrowser.
processJudge invokes processEncodeAnswer.
processParseRequest invokes processJudge.
processDecide zooms into processParseRequest, processJudge, and processEncodeAnswer, in that sequence.
design/Design.viewUmlComponents.puml
@startuml
' UML 2.5.1 component diagram
' view: Design::viewUmlComponents
' viewpoint: Architecture::viewpointVerifierIntegrityOfThePublishedApp
title Components of Atlas walk controls
component "componentAtlasWalkControlsGuest" as c0
component "componentAtlasWalkControlsPage" as c1
component "componentBrowser" as c2
component "componentGitHubPages" as c3
component "componentPrismBuild" as c4
component "componentSourceRepository" as c5
component "componentUORAtlasExplorerPage" as c6
c0 --> c2 : edgeAtlasWalkControlsGuestToBrowser
c0 --> c6 : edgeAtlasWalkControlsGuestToUORAtlasExplorerPage
c1 --> c3 : edgeAtlasWalkControlsPageToGitHubPages
c2 --> c0 : edgeBrowserToAtlasWalkControlsGuest
c3 --> c2 : edgeGitHubPagesToBrowser
c4 --> c0 : edgePrismBuildToAtlasWalkControlsGuest
c4 --> c1 : edgePrismBuildToAtlasWalkControlsPage
c5 --> c4 : edgeSourceRepositoryToPrismBuild
c6 --> c0 : edgeUORAtlasExplorerPageToAtlasWalkControlsGuest
@enduml
design/Design.viewUmlMachine.puml
@startuml
' UML 2.5.1 state machine diagram
' view: Design::viewUmlMachine
' viewpoint: Architecture::viewpointVisitorCorrectAnswers
title The Atlas walk controls state machine
state "stateMachineAway" as s0
state "stateMachineHome" as s1
state "stateMachineReturning" as s2
state "stateMachineWalking" as s3
[*] --> s1
s1 --> s1 : processRule7
s1 --> s1 : processRule8
s1 --> s1 : processOtherwise
s1 --> s0 : processRule9
s1 --> s3 : processRule6
s0 --> s1 : processRule7
s0 --> s1 : processRule8
s0 --> s0 : processRule9
s0 --> s0 : processRule11
s0 --> s3 : processRule6
s0 --> s2 : processRule10
s3 --> s3 : processRule3
s3 --> s1 : processRule1
s3 --> s0 : processRule2
s2 --> s2 : processRule5
s2 --> s1 : processRule4
@enduml
design/Design.viewUmlRequest.puml
@startuml
' UML 2.5.1 sequence diagram
' view: Design::viewUmlRequest
' viewpoint: Architecture::viewpointVisitorCorrectAnswers
title Answering a Atlas walk controls request
participant "componentBrowser" as p0
participant "componentAtlasWalkControlsGuest" as p1
p0 -> p1 : processDecide
p1 --> p0 : processDecide
@enduml
design/Design.viewUmlStates.puml
@startuml
' UML 2.5.1 state machine diagram
' view: Design::viewUmlStates
' viewpoint: Architecture::viewpointVerifierRefusedMalformedRequests
title States of the Atlas walk controls guest
state "stateAnsweredAway" as s0
state "stateAnsweredHome" as s1
state "stateAnsweredReturning" as s2
state "stateAnsweredWalking" as s3
state "stateDeciding" as s4
state "stateIdle" as s5
state "stateRefused" as s6
[*] --> s5
s5 --> s4 : processParseRequest
s5 --> s6 : processParseRequest
s4 --> s1 : processRule1
s4 --> s0 : processRule2
s4 --> s3 : processRule3
s4 --> s1 : processRule4
s4 --> s2 : processRule5
s4 --> s3 : processRule6
s4 --> s1 : processRule7
s4 --> s1 : processRule8
s4 --> s0 : processRule9
s4 --> s2 : processRule10
s4 --> s0 : processRule11
s4 --> s1 : processOtherwise
s1 --> s5 : processEncodeAnswer
s0 --> s5 : processEncodeAnswer
s3 --> s5 : processEncodeAnswer
s2 --> s5 : processEncodeAnswer
s6 --> s5 : processEncodeAnswer
@enduml
Prism source
Every file the builder wrote, laid out as a repository created from UOR-Foundation/template. The language packages and Foundation modules every app shares are in the download.
app/src/Architecture.lex.tex 357 lines
\begin{lexlean}{Architecture}
\useglossary{lexlean.std.bool@1.2.0}
\useglossary{lexlean.std.nat@1.2.0}
\useglossary{prism.arch@1.0.0}
\importmodule{Foundation.Arch}
\title{architectural component}
\begin{semanticmodule}
definition{
name: standardIso25010,
parameters: [],
result: Foundation.Arch::StandardReference,
body: (record Foundation.Arch::StandardReference {standardIndex := 0, editionIndex := 0, standardId := "ISO-25010-2023", edition := "2023"})
}
definition{
name: standardIso27005,
parameters: [],
result: Foundation.Arch::StandardReference,
body: (record Foundation.Arch::StandardReference {standardIndex := 1, editionIndex := 0, standardId := "ISO-27005-2022", edition := "2022"})
}
definition{
name: standardIso27034,
parameters: [],
result: Foundation.Arch::StandardReference,
body: (record Foundation.Arch::StandardReference {standardIndex := 2, editionIndex := 0, standardId := "ISO-27034-1-2011", edition := "2011"})
}
definition{
name: standardIso42010,
parameters: [],
result: Foundation.Arch::StandardReference,
body: (record Foundation.Arch::StandardReference {standardIndex := 4, editionIndex := 0, standardId := "ISO-42010-2022", edition := "2022"})
}
definition{
name: stakeholderMathematician,
parameters: [],
result: Foundation.Arch::Stakeholder,
body: (record Foundation.Arch::Stakeholder {index := 0, name := "Mathematician", text := "Checks that the walk home always returns the 48 classes to A0 and that block reorderings are gauge transformations."})
}
definition{
name: stakeholderVerifier,
parameters: [],
result: Foundation.Arch::Stakeholder,
body: (record Foundation.Arch::Stakeholder {index := 1, name := "Verifier", text := "Anyone who loads the holo, checks its fingerprint and replays its acceptance vectors before trusting an answer."})
}
definition{
name: stakeholderVisitor,
parameters: [],
result: Foundation.Arch::Stakeholder,
body: (record Foundation.Arch::Stakeholder {index := 2, name := "Visitor", text := "Explores the E8 reflection orbit of the Atlas and needs every control to do what it says, and nothing while a walk runs."})
}
definition{
name: concernCorrectAnswers,
parameters: [],
result: Foundation.Arch::Concern,
body: (record Foundation.Arch::Concern {index := 0, name := "Correct answers", text := "Every well-formed request is answered by the first rule that matches it, or home when none does, as the spec states."})
}
definition{
name: concernIntegrityOfThePublishedApp,
parameters: [],
result: Foundation.Arch::Concern,
body: (record Foundation.Arch::Concern {index := 1, name := "Integrity of the published app", text := "What a visitor runs is the holo the build verified, with its fingerprint and signed provenance beside it."})
}
definition{
name: concernProvedGuarantees,
parameters: [],
result: Foundation.Arch::Concern,
body: (record Foundation.Arch::Concern {index := 2, name := "Proved guarantees", text := "Each of the 5 properties of the spec holds for every request, proved by the Lean kernel."})
}
definition{
name: concernRefusedMalformedRequests,
parameters: [],
result: Foundation.Arch::Concern,
body: (record Foundation.Arch::Concern {index := 3, name := "Refused malformed requests", text := "A request that is not the 4 fields in order, or is longer than 112 bytes, is answered invalid and never guessed."})
}
definition{
name: componentAtlasWalkControlsGuest,
parameters: [],
result: Foundation.Arch::Component,
body: (record Foundation.Arch::Component {index := 0, kind := (ctor Foundation.Arch::ComponentKind.service), name := "Atlas walk controls guest", text := "The Core-Wasm guest built from the model: it answers one request of at most 112 bytes with one answer of at most 64."})
}
definition{
name: componentAtlasWalkControlsPage,
parameters: [],
result: Foundation.Arch::Component,
body: (record Foundation.Arch::Component {index := 1, kind := (ctor Foundation.Arch::ComponentKind.staticSite), name := "Atlas walk controls page", text := "The page the template publishes: the holo, its fingerprint, its provenance and its acceptance vectors."})
}
definition{
name: componentBrowser,
parameters: [],
result: Foundation.Arch::Component,
body: (record Foundation.Arch::Component {index := 2, kind := (ctor Foundation.Arch::ComponentKind.externalSystem), name := "Browser", text := "The visitor's web browser, which loads the page and runs the Atlas walk controls guest."})
}
definition{
name: componentGitHubPages,
parameters: [],
result: Foundation.Arch::Component,
body: (record Foundation.Arch::Component {index := 3, kind := (ctor Foundation.Arch::ComponentKind.externalSystem), name := "GitHub Pages", text := "Serves the page and the holo from the repository Pages workflow."})
}
definition{
name: componentPrismBuild,
parameters: [],
result: Foundation.Arch::Component,
body: (record Foundation.Arch::Component {index := 4, kind := (ctor Foundation.Arch::ComponentKind.cliAdapter), name := "Prism build", text := "prismpm verify in the SDK image prismpm.lock pins: it checks every theorem, builds the guest and replays every vector."})
}
definition{
name: componentSourceRepository,
parameters: [],
result: Foundation.Arch::Component,
body: (record Foundation.Arch::Component {index := 5, kind := (ctor Foundation.Arch::ComponentKind.externalSystem), name := "Source repository", text := "The repository that holds the prompt, the model and its gate."})
}
definition{
name: componentUORAtlasExplorerPage,
parameters: [],
result: Foundation.Arch::Component,
body: (record Foundation.Arch::Component {index := 6, kind := (ctor Foundation.Arch::ComponentKind.staticSite), name := "UOR Atlas Explorer page", text := "The single-page explorer on GitHub Pages that draws the 120 classes and runs the reflection walks."})
}
definition{
name: edgeAtlasWalkControlsGuestToBrowser,
parameters: [],
result: Foundation.Arch::Edge,
body: (record Foundation.Arch::Edge {index := 0, fromIndex := 0, toIndex := 2, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)})
}
definition{
name: edgeAtlasWalkControlsGuestToUORAtlasExplorerPage,
parameters: [],
result: Foundation.Arch::Edge,
body: (record Foundation.Arch::Edge {index := 1, fromIndex := 0, toIndex := 6, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)})
}
definition{
name: edgeAtlasWalkControlsPageToGitHubPages,
parameters: [],
result: Foundation.Arch::Edge,
body: (record Foundation.Arch::Edge {index := 2, fromIndex := 1, toIndex := 3, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)})
}
definition{
name: edgeBrowserToAtlasWalkControlsGuest,
parameters: [],
result: Foundation.Arch::Edge,
body: (record Foundation.Arch::Edge {index := 3, fromIndex := 2, toIndex := 0, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)})
}
definition{
name: edgeGitHubPagesToBrowser,
parameters: [],
result: Foundation.Arch::Edge,
body: (record Foundation.Arch::Edge {index := 4, fromIndex := 3, toIndex := 2, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)})
}
definition{
name: edgePrismBuildToAtlasWalkControlsGuest,
parameters: [],
result: Foundation.Arch::Edge,
body: (record Foundation.Arch::Edge {index := 5, fromIndex := 4, toIndex := 0, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)})
}
definition{
name: edgePrismBuildToAtlasWalkControlsPage,
parameters: [],
result: Foundation.Arch::Edge,
body: (record Foundation.Arch::Edge {index := 6, fromIndex := 4, toIndex := 1, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)})
}
definition{
name: edgeSourceRepositoryToPrismBuild,
parameters: [],
result: Foundation.Arch::Edge,
body: (record Foundation.Arch::Edge {index := 7, fromIndex := 5, toIndex := 4, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)})
}
definition{
name: edgeUORAtlasExplorerPageToAtlasWalkControlsGuest,
parameters: [],
result: Foundation.Arch::Edge,
body: (record Foundation.Arch::Edge {index := 8, fromIndex := 6, toIndex := 0, kind := (ctor Foundation.Arch::EdgeKind.dataFlow)})
}
definition{
name: viewpointMathematicianProvedGuarantees,
parameters: [],
result: Foundation.Arch::Viewpoint,
body: (record Foundation.Arch::Viewpoint {index := 0, stakeholderIndex := 0, concernIndex := 2, modelKindIndex := 1})
}
definition{
name: viewpointVerifierIntegrityOfThePublishedApp,
parameters: [],
result: Foundation.Arch::Viewpoint,
body: (record Foundation.Arch::Viewpoint {index := 1, stakeholderIndex := 1, concernIndex := 1, modelKindIndex := 2})
}
definition{
name: viewpointVerifierProvedGuarantees,
parameters: [],
result: Foundation.Arch::Viewpoint,
body: (record Foundation.Arch::Viewpoint {index := 2, stakeholderIndex := 1, concernIndex := 2, modelKindIndex := 1})
}
definition{
name: viewpointVerifierRefusedMalformedRequests,
parameters: [],
result: Foundation.Arch::Viewpoint,
body: (record Foundation.Arch::Viewpoint {index := 3, stakeholderIndex := 1, concernIndex := 3, modelKindIndex := 2})
}
definition{
name: viewpointVisitorCorrectAnswers,
parameters: [],
result: Foundation.Arch::Viewpoint,
body: (record Foundation.Arch::Viewpoint {index := 4, stakeholderIndex := 2, concernIndex := 0, modelKindIndex := 1})
}
definition{
name: viewMathematicianProvedGuarantees,
parameters: [],
result: Foundation.Arch::View,
body: (record Foundation.Arch::View {index := 0, viewpointIndex := 0, modelKindIndex := 1})
}
definition{
name: viewVerifierIntegrityOfThePublishedApp,
parameters: [],
result: Foundation.Arch::View,
body: (record Foundation.Arch::View {index := 1, viewpointIndex := 1, modelKindIndex := 2})
}
definition{
name: viewVerifierProvedGuarantees,
parameters: [],
result: Foundation.Arch::View,
body: (record Foundation.Arch::View {index := 2, viewpointIndex := 2, modelKindIndex := 1})
}
definition{
name: viewVerifierRefusedMalformedRequests,
parameters: [],
result: Foundation.Arch::View,
body: (record Foundation.Arch::View {index := 3, viewpointIndex := 3, modelKindIndex := 2})
}
definition{
name: viewVisitorCorrectAnswers,
parameters: [],
result: Foundation.Arch::View,
body: (record Foundation.Arch::View {index := 4, viewpointIndex := 4, modelKindIndex := 1})
}
definition{
name: componentRecords,
parameters: [],
result: (List Foundation.Arch::Component),
body: (cons (componentAtlasWalkControlsGuest) (cons (componentAtlasWalkControlsPage) (cons (componentBrowser) (cons (componentGitHubPages) (cons (componentPrismBuild) (cons (componentSourceRepository) (cons (componentUORAtlasExplorerPage) (nil Foundation.Arch::Component))))))))
}
definition{
name: edgeRecords,
parameters: [],
result: (List Foundation.Arch::Edge),
body: (cons (edgeAtlasWalkControlsGuestToBrowser) (cons (edgeAtlasWalkControlsGuestToUORAtlasExplorerPage) (cons (edgeAtlasWalkControlsPageToGitHubPages) (cons (edgeBrowserToAtlasWalkControlsGuest) (cons (edgeGitHubPagesToBrowser) (cons (edgePrismBuildToAtlasWalkControlsGuest) (cons (edgePrismBuildToAtlasWalkControlsPage) (cons (edgeSourceRepositoryToPrismBuild) (cons (edgeUORAtlasExplorerPageToAtlasWalkControlsGuest) (nil Foundation.Arch::Edge))))))))))
}
definition{
name: viewpointRecords,
parameters: [],
result: (List Foundation.Arch::Viewpoint),
body: (cons (viewpointMathematicianProvedGuarantees) (cons (viewpointVerifierIntegrityOfThePublishedApp) (cons (viewpointVerifierProvedGuarantees) (cons (viewpointVerifierRefusedMalformedRequests) (cons (viewpointVisitorCorrectAnswers) (nil Foundation.Arch::Viewpoint))))))
}
definition{
name: viewRecords,
parameters: [],
result: (List Foundation.Arch::View),
body: (cons (viewMathematicianProvedGuarantees) (cons (viewVerifierIntegrityOfThePublishedApp) (cons (viewVerifierProvedGuarantees) (cons (viewVerifierRefusedMalformedRequests) (cons (viewVisitorCorrectAnswers) (nil Foundation.Arch::View))))))
}
definition{
name: edgesKnown,
parameters: [count : Nat, records : (List Foundation.Arch::Edge)],
result: Bool,
body: (match records
| List.nil => true
| List.cons edge rest => (((project edge fromIndex) <? count) && (((project edge toIndex) <? count) && (edgesKnown count rest)))),
recursive_argument: records
}
definition{
name: viewpointsKnown,
parameters: [
stakeholderCount : Nat,
concernCount : Nat,
records : (List Foundation.Arch::Viewpoint)
],
result: Bool,
body: (match records
| List.nil => true
| List.cons viewpoint rest => (((project viewpoint stakeholderIndex) <? stakeholderCount) && (((project viewpoint concernIndex) <? concernCount) && (((project viewpoint modelKindIndex) <? 3) && (viewpointsKnown stakeholderCount concernCount rest))))),
recursive_argument: records
}
definition{
name: viewMatches,
parameters: [view : Foundation.Arch::View, viewpoints : (List Foundation.Arch::Viewpoint)],
result: Bool,
body: (match viewpoints
| List.nil => false
| List.cons viewpoint rest => ((((project viewpoint index) =? (project view viewpointIndex)) && ((project viewpoint modelKindIndex) =? (project view modelKindIndex))) || (viewMatches view rest))),
recursive_argument: viewpoints
}
definition{
name: viewsConform,
parameters: [
viewpoints : (List Foundation.Arch::Viewpoint),
records : (List Foundation.Arch::View)
],
result: Bool,
body: (match records
| List.nil => true
| List.cons view rest => ((viewMatches view viewpoints) && (viewsConform viewpoints rest))),
recursive_argument: records
}
definition{
name: architectureValid,
parameters: [],
result: Bool,
body: ((edgesKnown 7 (edgeRecords)) && ((viewpointsKnown 3 4 (viewpointRecords)) && (viewsConform (viewpointRecords) (viewRecords))))
}
theorem{
name: architectureDescriptionHolds,
parameters: [],
statement: ((architectureValid) = true),
proof: decide{}
}
\end{semanticmodule}
\end{lexlean}
app/src/Compliance.lex.tex 56 lines
\begin{lexlean}{Compliance}
\useglossary{lexlean.std.bool@1.2.0}
\useglossary{lexlean.std.nat@1.2.0}
\useglossary{prism.arch@1.0.0}
\importmodule{Architecture}
\importmodule{Design}
\importmodule{Quality}
\importmodule{Security}
\importmodule{AtlasExplorerWalk}
\title{standards reference}
\begin{semanticmodule}
structure{
name: Obligation,
type_parameters: [],
parameters: [],
fields: [
{name: index, type: Nat},
{name: standard, type: String},
{name: subject, type: String},
{name: text, type: String},
{name: evidence, type: (List String)}
]
}
definition{
name: obligations,
parameters: [],
result: (List Obligation),
body: (cons (record Obligation {index := 0, standard := "ISO/IEC/IEEE 42010:2022", subject := "Architecture description", text := "Stakeholders, concerns, viewpoints and views are declared and their references resolve.", evidence := (cons "Architecture::architectureDescriptionHolds" (nil String))}) (cons (record Obligation {index := 1, standard := "ISO/PAS 19450:2015 and OMG UML 2.5.1", subject := "Design views", text := "Every design view is checked by the SDK against the system model before it is rendered.", evidence := (cons "Design::viewOpmDecide" (cons "Design::viewUmlComponents" (cons "Design::viewUmlRequest" (cons "Design::viewUmlStates" (cons "Design::viewUmlMachine" (nil String))))))}) (cons (record Obligation {index := 2, standard := "ISO/IEC 25010:2023", subject := "Product quality", text := "Characteristics, subcharacteristics, requirements and measures are numbered and their parents resolve.", evidence := (cons "Quality::qualityModelHolds" (nil String))}) (cons (record Obligation {index := 3, standard := "ISO/IEC 27034-1:2011 and ISO/IEC 27005:2022", subject := "Application security and risk", text := "Every threat has a STRIDE category and a mapped control with evidence, or an accepted risk with its rationale.", evidence := (cons "Security::controlSet" (nil String))}) (cons (record Obligation {index := 4, standard := "OMG UML 2.5.1 behavioral state machine", subject := "State machine", text := "The answer to a state and an event is the next state, one of home, away, walking, returning; every run starts in home.", evidence := (cons "AtlasExplorerWalk::judge" (nil String))}) (cons (record Obligation {index := 5, standard := "OpenSpec", subject := "Requirements", text := "Every rule and property of the spec is a requirement with a scenario in openspec/specs.", evidence := (cons "AtlasExplorerWalk::application" (nil String))}) (cons (record Obligation {index := 6, standard := "SPDX MIT OR Apache-2.0", subject := "Licensing", text := "The application and its model are offered under MIT OR Apache-2.0.", evidence := (cons "AtlasExplorerWalk::application" (nil String))}) (nil Obligation))))))))
}
definition{
name: obligationsEvidenced,
parameters: [position : Nat, items : (List Obligation)],
result: Bool,
body: (match items
| List.nil => true
| List.cons item rest => (((project item index) =? position) && (match{
branches: [
{body: false, binders: [], constructor: List.nil},
{body: true, binders: [first, others], constructor: List.cons}
],
scrutinee: (project item evidence)
} && (obligationsEvidenced (position + 1) rest)))),
recursive_argument: items
}
theorem{
name: everyObligationEvidenced,
parameters: [],
statement: ((obligationsEvidenced 0 (obligations)) = true),
proof: decide{}
}
\end{semanticmodule}
\end{lexlean}
app/src/Design.lex.tex 822 lines
\begin{lexlean}{Design}
\useglossary{lexlean.std.bool@1.2.0}
\useglossary{lexlean.std.nat@1.2.0}
\useglossary{prism.arch@1.0.0}
\importmodule{Architecture}
\importmodule{Foundation.Arch}
\title{design view}
\begin{semanticmodule}
definition{
name: processSendRequest,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentBrowser"})
}
definition{
name: processDecide,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: processParseRequest,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: processJudge,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: processEncodeAnswer,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: processBuildAndVerify,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentPrismBuild"})
}
definition{
name: processRule1,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: processRule2,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: processRule3,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: processRule4,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: processRule5,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: processRule6,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: processRule7,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: processRule8,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: processRule9,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: processRule10,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: processRule11,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: processOtherwise,
parameters: [],
result: Foundation.Arch::SystemProcess,
body: (record Foundation.Arch::SystemProcess {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: stateIdle,
parameters: [],
result: Foundation.Arch::SystemState,
body: (record Foundation.Arch::SystemState {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: stateDeciding,
parameters: [],
result: Foundation.Arch::SystemState,
body: (record Foundation.Arch::SystemState {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: stateRefused,
parameters: [],
result: Foundation.Arch::SystemState,
body: (record Foundation.Arch::SystemState {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: stateAnsweredHome,
parameters: [],
result: Foundation.Arch::SystemState,
body: (record Foundation.Arch::SystemState {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: stateAnsweredAway,
parameters: [],
result: Foundation.Arch::SystemState,
body: (record Foundation.Arch::SystemState {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: stateAnsweredWalking,
parameters: [],
result: Foundation.Arch::SystemState,
body: (record Foundation.Arch::SystemState {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: stateAnsweredReturning,
parameters: [],
result: Foundation.Arch::SystemState,
body: (record Foundation.Arch::SystemState {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: stateMachineHome,
parameters: [],
result: Foundation.Arch::SystemState,
body: (record Foundation.Arch::SystemState {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: stateMachineAway,
parameters: [],
result: Foundation.Arch::SystemState,
body: (record Foundation.Arch::SystemState {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: stateMachineWalking,
parameters: [],
result: Foundation.Arch::SystemState,
body: (record Foundation.Arch::SystemState {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: stateMachineReturning,
parameters: [],
result: Foundation.Arch::SystemState,
body: (record Foundation.Arch::SystemState {owner := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: viewOpmDecide,
parameters: [],
result: Foundation.Arch::DesignView,
body: (record Foundation.Arch::DesignView {title := "Deciding a Atlas walk controls request", viewpoint := "Architecture::viewpointVisitorCorrectAnswers", diagram := (ctor Foundation.Arch::DesignDiagram.opmObjectProcess)})
}
definition{
name: viewUmlComponents,
parameters: [],
result: Foundation.Arch::DesignView,
body: (record Foundation.Arch::DesignView {title := "Components of Atlas walk controls", viewpoint := "Architecture::viewpointVerifierIntegrityOfThePublishedApp", diagram := (ctor Foundation.Arch::DesignDiagram.umlComponent)})
}
definition{
name: viewUmlRequest,
parameters: [],
result: Foundation.Arch::DesignView,
body: (record Foundation.Arch::DesignView {title := "Answering a Atlas walk controls request", viewpoint := "Architecture::viewpointVisitorCorrectAnswers", diagram := (ctor Foundation.Arch::DesignDiagram.umlSequence)})
}
definition{
name: viewUmlStates,
parameters: [],
result: Foundation.Arch::DesignView,
body: (record Foundation.Arch::DesignView {title := "States of the Atlas walk controls guest", viewpoint := "Architecture::viewpointVerifierRefusedMalformedRequests", diagram := (ctor Foundation.Arch::DesignDiagram.umlStateMachine)})
}
definition{
name: viewUmlMachine,
parameters: [],
result: Foundation.Arch::DesignView,
body: (record Foundation.Arch::DesignView {title := "The Atlas walk controls state machine", viewpoint := "Architecture::viewpointVisitorCorrectAnswers", diagram := (ctor Foundation.Arch::DesignDiagram.umlStateMachine)})
}
definition{
name: opmBrowser,
parameters: [],
result: Foundation.Arch::OpmThing,
body: (record Foundation.Arch::OpmThing {view := "Design::viewOpmDecide", kind := (ctor Foundation.Arch::OpmThingKind.object), subject := "Architecture::componentBrowser"})
}
definition{
name: opmGuest,
parameters: [],
result: Foundation.Arch::OpmThing,
body: (record Foundation.Arch::OpmThing {view := "Design::viewOpmDecide", kind := (ctor Foundation.Arch::OpmThingKind.object), subject := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: opmDecide,
parameters: [],
result: Foundation.Arch::OpmThing,
body: (record Foundation.Arch::OpmThing {view := "Design::viewOpmDecide", kind := (ctor Foundation.Arch::OpmThingKind.process), subject := "Design::processDecide"})
}
definition{
name: opmParseRequest,
parameters: [],
result: Foundation.Arch::OpmThing,
body: (record Foundation.Arch::OpmThing {view := "Design::viewOpmDecide", kind := (ctor Foundation.Arch::OpmThingKind.process), subject := "Design::processParseRequest"})
}
definition{
name: opmJudge,
parameters: [],
result: Foundation.Arch::OpmThing,
body: (record Foundation.Arch::OpmThing {view := "Design::viewOpmDecide", kind := (ctor Foundation.Arch::OpmThingKind.process), subject := "Design::processJudge"})
}
definition{
name: opmEncodeAnswer,
parameters: [],
result: Foundation.Arch::OpmThing,
body: (record Foundation.Arch::OpmThing {view := "Design::viewOpmDecide", kind := (ctor Foundation.Arch::OpmThingKind.process), subject := "Design::processEncodeAnswer"})
}
definition{
name: opmGuestIdle,
parameters: [],
result: Foundation.Arch::OpmState,
body: (record Foundation.Arch::OpmState {view := "Design::viewOpmDecide", thing := "Architecture::componentAtlasWalkControlsGuest", state := "Design::stateIdle"})
}
definition{
name: opmGuestDeciding,
parameters: [],
result: Foundation.Arch::OpmState,
body: (record Foundation.Arch::OpmState {view := "Design::viewOpmDecide", thing := "Architecture::componentAtlasWalkControlsGuest", state := "Design::stateDeciding"})
}
definition{
name: opmGuestAgent,
parameters: [],
result: Foundation.Arch::OpmLink,
body: (record Foundation.Arch::OpmLink {view := "Design::viewOpmDecide", kind := (ctor Foundation.Arch::OpmLinkKind.agent), source := "Architecture::componentAtlasWalkControlsGuest", target := "Design::processDecide"})
}
definition{
name: opmBrowserInstrument,
parameters: [],
result: Foundation.Arch::OpmLink,
body: (record Foundation.Arch::OpmLink {view := "Design::viewOpmDecide", kind := (ctor Foundation.Arch::OpmLinkKind.instrument), source := "Architecture::componentBrowser", target := "Design::processParseRequest"})
}
definition{
name: opmParseInvokesJudge,
parameters: [],
result: Foundation.Arch::OpmLink,
body: (record Foundation.Arch::OpmLink {view := "Design::viewOpmDecide", kind := (ctor Foundation.Arch::OpmLinkKind.invocation), source := "Design::processParseRequest", target := "Design::processJudge"})
}
definition{
name: opmJudgeInvokesEncode,
parameters: [],
result: Foundation.Arch::OpmLink,
body: (record Foundation.Arch::OpmLink {view := "Design::viewOpmDecide", kind := (ctor Foundation.Arch::OpmLinkKind.invocation), source := "Design::processJudge", target := "Design::processEncodeAnswer"})
}
definition{
name: opmEncodeAffectsBrowser,
parameters: [],
result: Foundation.Arch::OpmLink,
body: (record Foundation.Arch::OpmLink {view := "Design::viewOpmDecide", kind := (ctor Foundation.Arch::OpmLinkKind.effect), source := "Architecture::componentBrowser", target := "Design::processEncodeAnswer"})
}
definition{
name: opmZoomParseRequest,
parameters: [],
result: Foundation.Arch::OpmZoom,
body: (record Foundation.Arch::OpmZoom {view := "Design::viewOpmDecide", process := "Design::processDecide", subprocess := "Design::processParseRequest", order := 0})
}
definition{
name: opmZoomJudge,
parameters: [],
result: Foundation.Arch::OpmZoom,
body: (record Foundation.Arch::OpmZoom {view := "Design::viewOpmDecide", process := "Design::processDecide", subprocess := "Design::processJudge", order := 1})
}
definition{
name: opmZoomEncodeAnswer,
parameters: [],
result: Foundation.Arch::OpmZoom,
body: (record Foundation.Arch::OpmZoom {view := "Design::viewOpmDecide", process := "Design::processDecide", subprocess := "Design::processEncodeAnswer", order := 2})
}
definition{
name: umlAtlasWalkControlsGuest,
parameters: [],
result: Foundation.Arch::UmlComponent,
body: (record Foundation.Arch::UmlComponent {view := "Design::viewUmlComponents", component := "Architecture::componentAtlasWalkControlsGuest"})
}
definition{
name: umlAtlasWalkControlsPage,
parameters: [],
result: Foundation.Arch::UmlComponent,
body: (record Foundation.Arch::UmlComponent {view := "Design::viewUmlComponents", component := "Architecture::componentAtlasWalkControlsPage"})
}
definition{
name: umlBrowser,
parameters: [],
result: Foundation.Arch::UmlComponent,
body: (record Foundation.Arch::UmlComponent {view := "Design::viewUmlComponents", component := "Architecture::componentBrowser"})
}
definition{
name: umlGitHubPages,
parameters: [],
result: Foundation.Arch::UmlComponent,
body: (record Foundation.Arch::UmlComponent {view := "Design::viewUmlComponents", component := "Architecture::componentGitHubPages"})
}
definition{
name: umlPrismBuild,
parameters: [],
result: Foundation.Arch::UmlComponent,
body: (record Foundation.Arch::UmlComponent {view := "Design::viewUmlComponents", component := "Architecture::componentPrismBuild"})
}
definition{
name: umlSourceRepository,
parameters: [],
result: Foundation.Arch::UmlComponent,
body: (record Foundation.Arch::UmlComponent {view := "Design::viewUmlComponents", component := "Architecture::componentSourceRepository"})
}
definition{
name: umlUORAtlasExplorerPage,
parameters: [],
result: Foundation.Arch::UmlComponent,
body: (record Foundation.Arch::UmlComponent {view := "Design::viewUmlComponents", component := "Architecture::componentUORAtlasExplorerPage"})
}
definition{
name: umlAtlasWalkControlsGuestToBrowser,
parameters: [],
result: Foundation.Arch::UmlConnector,
body: (record Foundation.Arch::UmlConnector {view := "Design::viewUmlComponents", edge := "Architecture::edgeAtlasWalkControlsGuestToBrowser"})
}
definition{
name: umlAtlasWalkControlsGuestToUORAtlasExplorerPage,
parameters: [],
result: Foundation.Arch::UmlConnector,
body: (record Foundation.Arch::UmlConnector {view := "Design::viewUmlComponents", edge := "Architecture::edgeAtlasWalkControlsGuestToUORAtlasExplorerPage"})
}
definition{
name: umlAtlasWalkControlsPageToGitHubPages,
parameters: [],
result: Foundation.Arch::UmlConnector,
body: (record Foundation.Arch::UmlConnector {view := "Design::viewUmlComponents", edge := "Architecture::edgeAtlasWalkControlsPageToGitHubPages"})
}
definition{
name: umlBrowserToAtlasWalkControlsGuest,
parameters: [],
result: Foundation.Arch::UmlConnector,
body: (record Foundation.Arch::UmlConnector {view := "Design::viewUmlComponents", edge := "Architecture::edgeBrowserToAtlasWalkControlsGuest"})
}
definition{
name: umlGitHubPagesToBrowser,
parameters: [],
result: Foundation.Arch::UmlConnector,
body: (record Foundation.Arch::UmlConnector {view := "Design::viewUmlComponents", edge := "Architecture::edgeGitHubPagesToBrowser"})
}
definition{
name: umlPrismBuildToAtlasWalkControlsGuest,
parameters: [],
result: Foundation.Arch::UmlConnector,
body: (record Foundation.Arch::UmlConnector {view := "Design::viewUmlComponents", edge := "Architecture::edgePrismBuildToAtlasWalkControlsGuest"})
}
definition{
name: umlPrismBuildToAtlasWalkControlsPage,
parameters: [],
result: Foundation.Arch::UmlConnector,
body: (record Foundation.Arch::UmlConnector {view := "Design::viewUmlComponents", edge := "Architecture::edgePrismBuildToAtlasWalkControlsPage"})
}
definition{
name: umlSourceRepositoryToPrismBuild,
parameters: [],
result: Foundation.Arch::UmlConnector,
body: (record Foundation.Arch::UmlConnector {view := "Design::viewUmlComponents", edge := "Architecture::edgeSourceRepositoryToPrismBuild"})
}
definition{
name: umlUORAtlasExplorerPageToAtlasWalkControlsGuest,
parameters: [],
result: Foundation.Arch::UmlConnector,
body: (record Foundation.Arch::UmlConnector {view := "Design::viewUmlComponents", edge := "Architecture::edgeUORAtlasExplorerPageToAtlasWalkControlsGuest"})
}
definition{
name: seqBrowser,
parameters: [],
result: Foundation.Arch::UmlLifeline,
body: (record Foundation.Arch::UmlLifeline {view := "Design::viewUmlRequest", component := "Architecture::componentBrowser", order := 0})
}
definition{
name: seqAtlasWalkControlsGuest,
parameters: [],
result: Foundation.Arch::UmlLifeline,
body: (record Foundation.Arch::UmlLifeline {view := "Design::viewUmlRequest", component := "Architecture::componentAtlasWalkControlsGuest", order := 1})
}
definition{
name: seqRequest,
parameters: [],
result: Foundation.Arch::UmlMessage,
body: (record Foundation.Arch::UmlMessage {view := "Design::viewUmlRequest", kind := (ctor Foundation.Arch::UmlMessageKind.synchronous), order := 0, source := "Architecture::componentBrowser", target := "Architecture::componentAtlasWalkControlsGuest", process := "Design::processDecide"})
}
definition{
name: seqReply,
parameters: [],
result: Foundation.Arch::UmlMessage,
body: (record Foundation.Arch::UmlMessage {view := "Design::viewUmlRequest", kind := (ctor Foundation.Arch::UmlMessageKind.reply), order := 1, source := "Architecture::componentAtlasWalkControlsGuest", target := "Architecture::componentBrowser", process := "Design::processDecide"})
}
definition{
name: stIdle,
parameters: [],
result: Foundation.Arch::UmlState,
body: (record Foundation.Arch::UmlState {view := "Design::viewUmlStates", state := "Design::stateIdle", initial := true})
}
definition{
name: stDeciding,
parameters: [],
result: Foundation.Arch::UmlState,
body: (record Foundation.Arch::UmlState {view := "Design::viewUmlStates", state := "Design::stateDeciding", initial := false})
}
definition{
name: stRefused,
parameters: [],
result: Foundation.Arch::UmlState,
body: (record Foundation.Arch::UmlState {view := "Design::viewUmlStates", state := "Design::stateRefused", initial := false})
}
definition{
name: stAnsweredHome,
parameters: [],
result: Foundation.Arch::UmlState,
body: (record Foundation.Arch::UmlState {view := "Design::viewUmlStates", state := "Design::stateAnsweredHome", initial := false})
}
definition{
name: stAnsweredAway,
parameters: [],
result: Foundation.Arch::UmlState,
body: (record Foundation.Arch::UmlState {view := "Design::viewUmlStates", state := "Design::stateAnsweredAway", initial := false})
}
definition{
name: stAnsweredWalking,
parameters: [],
result: Foundation.Arch::UmlState,
body: (record Foundation.Arch::UmlState {view := "Design::viewUmlStates", state := "Design::stateAnsweredWalking", initial := false})
}
definition{
name: stAnsweredReturning,
parameters: [],
result: Foundation.Arch::UmlState,
body: (record Foundation.Arch::UmlState {view := "Design::viewUmlStates", state := "Design::stateAnsweredReturning", initial := false})
}
definition{
name: stMachineHome,
parameters: [],
result: Foundation.Arch::UmlState,
body: (record Foundation.Arch::UmlState {view := "Design::viewUmlMachine", state := "Design::stateMachineHome", initial := true})
}
definition{
name: stMachineAway,
parameters: [],
result: Foundation.Arch::UmlState,
body: (record Foundation.Arch::UmlState {view := "Design::viewUmlMachine", state := "Design::stateMachineAway", initial := false})
}
definition{
name: stMachineWalking,
parameters: [],
result: Foundation.Arch::UmlState,
body: (record Foundation.Arch::UmlState {view := "Design::viewUmlMachine", state := "Design::stateMachineWalking", initial := false})
}
definition{
name: stMachineReturning,
parameters: [],
result: Foundation.Arch::UmlState,
body: (record Foundation.Arch::UmlState {view := "Design::viewUmlMachine", state := "Design::stateMachineReturning", initial := false})
}
definition{
name: trAccept,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 0, source := "Design::stateIdle", target := "Design::stateDeciding", trigger := "Design::processParseRequest"})
}
definition{
name: trRefuse,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 1, source := "Design::stateIdle", target := "Design::stateRefused", trigger := "Design::processParseRequest"})
}
definition{
name: trRule1,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 2, source := "Design::stateDeciding", target := "Design::stateAnsweredHome", trigger := "Design::processRule1"})
}
definition{
name: trRule2,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 3, source := "Design::stateDeciding", target := "Design::stateAnsweredAway", trigger := "Design::processRule2"})
}
definition{
name: trRule3,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 4, source := "Design::stateDeciding", target := "Design::stateAnsweredWalking", trigger := "Design::processRule3"})
}
definition{
name: trRule4,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 5, source := "Design::stateDeciding", target := "Design::stateAnsweredHome", trigger := "Design::processRule4"})
}
definition{
name: trRule5,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 6, source := "Design::stateDeciding", target := "Design::stateAnsweredReturning", trigger := "Design::processRule5"})
}
definition{
name: trRule6,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 7, source := "Design::stateDeciding", target := "Design::stateAnsweredWalking", trigger := "Design::processRule6"})
}
definition{
name: trRule7,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 8, source := "Design::stateDeciding", target := "Design::stateAnsweredHome", trigger := "Design::processRule7"})
}
definition{
name: trRule8,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 9, source := "Design::stateDeciding", target := "Design::stateAnsweredHome", trigger := "Design::processRule8"})
}
definition{
name: trRule9,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 10, source := "Design::stateDeciding", target := "Design::stateAnsweredAway", trigger := "Design::processRule9"})
}
definition{
name: trRule10,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 11, source := "Design::stateDeciding", target := "Design::stateAnsweredReturning", trigger := "Design::processRule10"})
}
definition{
name: trRule11,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 12, source := "Design::stateDeciding", target := "Design::stateAnsweredAway", trigger := "Design::processRule11"})
}
definition{
name: trOtherwise,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 13, source := "Design::stateDeciding", target := "Design::stateAnsweredHome", trigger := "Design::processOtherwise"})
}
definition{
name: trResetHome,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 14, source := "Design::stateAnsweredHome", target := "Design::stateIdle", trigger := "Design::processEncodeAnswer"})
}
definition{
name: trResetAway,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 15, source := "Design::stateAnsweredAway", target := "Design::stateIdle", trigger := "Design::processEncodeAnswer"})
}
definition{
name: trResetWalking,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 16, source := "Design::stateAnsweredWalking", target := "Design::stateIdle", trigger := "Design::processEncodeAnswer"})
}
definition{
name: trResetReturning,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 17, source := "Design::stateAnsweredReturning", target := "Design::stateIdle", trigger := "Design::processEncodeAnswer"})
}
definition{
name: trResetRefused,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlStates", order := 18, source := "Design::stateRefused", target := "Design::stateIdle", trigger := "Design::processEncodeAnswer"})
}
definition{
name: trMachineHomeToHomeByREQ007,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlMachine", order := 0, source := "Design::stateMachineHome", target := "Design::stateMachineHome", trigger := "Design::processRule7"})
}
definition{
name: trMachineHomeToHomeByREQ008,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlMachine", order := 1, source := "Design::stateMachineHome", target := "Design::stateMachineHome", trigger := "Design::processRule8"})
}
definition{
name: trMachineHomeToHomeByOtherwise,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlMachine", order := 2, source := "Design::stateMachineHome", target := "Design::stateMachineHome", trigger := "Design::processOtherwise"})
}
definition{
name: trMachineHomeToAwayByREQ009,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlMachine", order := 3, source := "Design::stateMachineHome", target := "Design::stateMachineAway", trigger := "Design::processRule9"})
}
definition{
name: trMachineHomeToWalkingByREQ006,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlMachine", order := 4, source := "Design::stateMachineHome", target := "Design::stateMachineWalking", trigger := "Design::processRule6"})
}
definition{
name: trMachineAwayToHomeByREQ007,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlMachine", order := 5, source := "Design::stateMachineAway", target := "Design::stateMachineHome", trigger := "Design::processRule7"})
}
definition{
name: trMachineAwayToHomeByREQ008,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlMachine", order := 6, source := "Design::stateMachineAway", target := "Design::stateMachineHome", trigger := "Design::processRule8"})
}
definition{
name: trMachineAwayToAwayByREQ009,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlMachine", order := 7, source := "Design::stateMachineAway", target := "Design::stateMachineAway", trigger := "Design::processRule9"})
}
definition{
name: trMachineAwayToAwayByREQ011,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlMachine", order := 8, source := "Design::stateMachineAway", target := "Design::stateMachineAway", trigger := "Design::processRule11"})
}
definition{
name: trMachineAwayToWalkingByREQ006,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlMachine", order := 9, source := "Design::stateMachineAway", target := "Design::stateMachineWalking", trigger := "Design::processRule6"})
}
definition{
name: trMachineAwayToReturningByREQ010,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlMachine", order := 10, source := "Design::stateMachineAway", target := "Design::stateMachineReturning", trigger := "Design::processRule10"})
}
definition{
name: trMachineWalkingToWalkingByREQ003,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlMachine", order := 11, source := "Design::stateMachineWalking", target := "Design::stateMachineWalking", trigger := "Design::processRule3"})
}
definition{
name: trMachineWalkingToHomeByREQ001,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlMachine", order := 12, source := "Design::stateMachineWalking", target := "Design::stateMachineHome", trigger := "Design::processRule1"})
}
definition{
name: trMachineWalkingToAwayByREQ002,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlMachine", order := 13, source := "Design::stateMachineWalking", target := "Design::stateMachineAway", trigger := "Design::processRule2"})
}
definition{
name: trMachineReturningToReturningByREQ005,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlMachine", order := 14, source := "Design::stateMachineReturning", target := "Design::stateMachineReturning", trigger := "Design::processRule5"})
}
definition{
name: trMachineReturningToHomeByREQ004,
parameters: [],
result: Foundation.Arch::UmlTransition,
body: (record Foundation.Arch::UmlTransition {view := "Design::viewUmlMachine", order := 15, source := "Design::stateMachineReturning", target := "Design::stateMachineHome", trigger := "Design::processRule4"})
}
\end{semanticmodule}
\end{lexlean}
app/src/Features.lex.tex 193 lines
\begin{lexlean}{Features}
\useglossary{lexlean.std.bool@1.2.0}
\useglossary{lexlean.std.nat@1.2.0}
\useglossary{prism.arch@1.0.0}
\importmodule{AtlasExplorerWalk}
\importmodule{Architecture}
\importmodule{Foundation.Arch}
\title{feature}
\begin{semanticmodule}
definition{
name: acceptINV001,
parameters: [],
result: String,
body: "AtlasExplorerWalkProofs::inv001Holds"
}
definition{
name: acceptINV002,
parameters: [],
result: String,
body: "AtlasExplorerWalkProofs::inv002Holds"
}
definition{
name: acceptINV003,
parameters: [],
result: String,
body: "AtlasExplorerWalkProofs::inv003Holds"
}
definition{
name: acceptINV004,
parameters: [],
result: String,
body: "AtlasExplorerWalkProofs::inv004Holds"
}
definition{
name: acceptINV005,
parameters: [],
result: String,
body: "AtlasExplorerWalkProofs::inv005Holds"
}
definition{
name: featureRule1,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "When state is walking and event is finish and lands is a0, the answer is home.", calls := (cons "AtlasExplorerWalk::rule1" (cons "AtlasExplorerWalk::judge" (nil String))), acceptance := (cons "AtlasExplorerWalk::application" (nil String))})
}
definition{
name: featureRule2,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "When state is walking and event is finish, the answer is away.", calls := (cons "AtlasExplorerWalk::rule2" (cons "AtlasExplorerWalk::judge" (nil String))), acceptance := (cons "AtlasExplorerWalk::application" (nil String))})
}
definition{
name: featureRule3,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "When state is walking, the answer is walking.", calls := (cons "AtlasExplorerWalk::rule3" (cons "AtlasExplorerWalk::judge" (nil String))), acceptance := (cons "AtlasExplorerWalk::application" (nil String))})
}
definition{
name: featureRule4,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "When state is returning and event is finish, the answer is home.", calls := (cons "AtlasExplorerWalk::rule4" (cons "AtlasExplorerWalk::judge" (nil String))), acceptance := (cons "AtlasExplorerWalk::application" (nil String))})
}
definition{
name: featureRule5,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "When state is returning, the answer is returning.", calls := (cons "AtlasExplorerWalk::rule5" (cons "AtlasExplorerWalk::judge" (nil String))), acceptance := (cons "AtlasExplorerWalk::application" (nil String))})
}
definition{
name: featureRule6,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "When event is walk, the answer is walking.", calls := (cons "AtlasExplorerWalk::rule6" (cons "AtlasExplorerWalk::judge" (nil String))), acceptance := (cons "AtlasExplorerWalk::application" (nil String))})
}
definition{
name: featureRule7,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "When event is reset, the answer is home.", calls := (cons "AtlasExplorerWalk::rule7" (cons "AtlasExplorerWalk::judge" (nil String))), acceptance := (cons "AtlasExplorerWalk::application" (nil String))})
}
definition{
name: featureRule8,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "When event is reflect and lands is a0, the answer is home.", calls := (cons "AtlasExplorerWalk::rule8" (cons "AtlasExplorerWalk::judge" (nil String))), acceptance := (cons "AtlasExplorerWalk::application" (nil String))})
}
definition{
name: featureRule9,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "When event is reflect, the answer is away.", calls := (cons "AtlasExplorerWalk::rule9" (cons "AtlasExplorerWalk::judge" (nil String))), acceptance := (cons "AtlasExplorerWalk::application" (nil String))})
}
definition{
name: featureRule10,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "When state is away and event is walk-home and orbit is mapped, the answer is returning.", calls := (cons "AtlasExplorerWalk::rule10" (cons "AtlasExplorerWalk::judge" (nil String))), acceptance := (cons "AtlasExplorerWalk::application" (nil String))})
}
definition{
name: featureRule11,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "When state is away, the answer is away.", calls := (cons "AtlasExplorerWalk::rule11" (cons "AtlasExplorerWalk::judge" (nil String))), acceptance := (cons "AtlasExplorerWalk::application" (nil String))})
}
definition{
name: featureOtherwise,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "When no rule matches, the answer is home.", calls := (cons "AtlasExplorerWalk::judge" (nil String)), acceptance := (cons "AtlasExplorerWalk::application" (nil String))})
}
definition{
name: featureRefuseMalformed,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "A request that is not state, event, orbit, lands in order, separated by single spaces, or is over 112 bytes, is answered invalid.", calls := (cons "AtlasExplorerWalk::dispatch" (cons "AtlasExplorerWalk::decodeField1" (nil String))), acceptance := (cons "AtlasExplorerWalk::application" (nil String))})
}
definition{
name: featureINV001,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "It never answers returning when state is home.", calls := (cons "AtlasExplorerWalk::judge" (nil String)), acceptance := (cons "Features::acceptINV001" (nil String))})
}
definition{
name: featureINV002,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "It never answers returning when state is away and orbit is mapping.", calls := (cons "AtlasExplorerWalk::judge" (nil String)), acceptance := (cons "Features::acceptINV002" (nil String))})
}
definition{
name: featureINV003,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "It always answers walking when state is walking and event is reflect.", calls := (cons "AtlasExplorerWalk::judge" (nil String)), acceptance := (cons "Features::acceptINV003" (nil String))})
}
definition{
name: featureINV004,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "It always answers home when event is reset and state is not walking and state is not returning.", calls := (cons "AtlasExplorerWalk::judge" (nil String)), acceptance := (cons "Features::acceptINV004" (nil String))})
}
definition{
name: featureINV005,
parameters: [],
result: Foundation.Arch::Feature,
body: (record Foundation.Arch::Feature {statement := "It never answers away when state is returning and event is finish.", calls := (cons "AtlasExplorerWalk::judge" (nil String)), acceptance := (cons "Features::acceptINV005" (nil String))})
}
definition{
name: journeyMathematician,
parameters: [],
result: Foundation.Arch::Journey,
body: (record Foundation.Arch::Journey {actor := "Architecture::stakeholderMathematician", steps := (cons "Features::featureRule9" (cons "Features::featureRule10" (cons "Features::featureRule4" (cons "Features::featureINV005" (nil String)))))})
}
definition{
name: journeyVerifier,
parameters: [],
result: Foundation.Arch::Journey,
body: (record Foundation.Arch::Journey {actor := "Architecture::stakeholderVerifier", steps := (cons "Features::featureRefuseMalformed" (cons "Features::featureINV001" (cons "Features::featureINV002" (cons "Features::featureINV003" (cons "Features::featureINV004" (cons "Features::featureINV005" (nil String)))))))})
}
definition{
name: journeyVisitor,
parameters: [],
result: Foundation.Arch::Journey,
body: (record Foundation.Arch::Journey {actor := "Architecture::stakeholderVisitor", steps := (cons "Features::featureRule6" (cons "Features::featureRule3" (cons "Features::featureRule2" (cons "Features::featureRule7" (nil String)))))})
}
\end{semanticmodule}
\end{lexlean}
app/src/Quality.lex.tex 382 lines
\begin{lexlean}{Quality}
\useglossary{lexlean.std.bool@1.2.0}
\useglossary{lexlean.std.nat@1.2.0}
\useglossary{prism.arch@1.0.0}
\useglossary{prism.qual@1.0.0}
\importmodule{Foundation.Qual}
\title{quality measure}
\begin{semanticmodule}
structure{
name: Named,
type_parameters: [],
parameters: [],
fields: [{name: index, type: Nat}, {name: name, type: String}, {name: text, type: String}]
}
definition{
name: characteristicFunctionalSuitability,
parameters: [],
result: Foundation.Qual::ProductQualityCharacteristic,
body: (record Foundation.Qual::ProductQualityCharacteristic {index := 0})
}
definition{
name: characteristicInteractionCapability,
parameters: [],
result: Foundation.Qual::ProductQualityCharacteristic,
body: (record Foundation.Qual::ProductQualityCharacteristic {index := 1})
}
definition{
name: characteristicPerformanceEfficiency,
parameters: [],
result: Foundation.Qual::ProductQualityCharacteristic,
body: (record Foundation.Qual::ProductQualityCharacteristic {index := 2})
}
definition{
name: characteristicReliability,
parameters: [],
result: Foundation.Qual::ProductQualityCharacteristic,
body: (record Foundation.Qual::ProductQualityCharacteristic {index := 3})
}
definition{
name: characteristicSecurity,
parameters: [],
result: Foundation.Qual::ProductQualityCharacteristic,
body: (record Foundation.Qual::ProductQualityCharacteristic {index := 4})
}
definition{
name: subcharacteristicFaultlessness,
parameters: [],
result: Foundation.Qual::QualitySubcharacteristic,
body: (record Foundation.Qual::QualitySubcharacteristic {index := 0, characteristicIndex := 3})
}
definition{
name: subcharacteristicFunctionalCompleteness,
parameters: [],
result: Foundation.Qual::QualitySubcharacteristic,
body: (record Foundation.Qual::QualitySubcharacteristic {index := 1, characteristicIndex := 0})
}
definition{
name: subcharacteristicFunctionalCorrectness,
parameters: [],
result: Foundation.Qual::QualitySubcharacteristic,
body: (record Foundation.Qual::QualitySubcharacteristic {index := 2, characteristicIndex := 0})
}
definition{
name: subcharacteristicIntegrity,
parameters: [],
result: Foundation.Qual::QualitySubcharacteristic,
body: (record Foundation.Qual::QualitySubcharacteristic {index := 3, characteristicIndex := 4})
}
definition{
name: subcharacteristicResourceUtilization,
parameters: [],
result: Foundation.Qual::QualitySubcharacteristic,
body: (record Foundation.Qual::QualitySubcharacteristic {index := 4, characteristicIndex := 2})
}
definition{
name: subcharacteristicTimeBehaviour,
parameters: [],
result: Foundation.Qual::QualitySubcharacteristic,
body: (record Foundation.Qual::QualitySubcharacteristic {index := 5, characteristicIndex := 2})
}
definition{
name: subcharacteristicUserErrorProtection,
parameters: [],
result: Foundation.Qual::QualitySubcharacteristic,
body: (record Foundation.Qual::QualitySubcharacteristic {index := 6, characteristicIndex := 1})
}
definition{
name: requirementBoundedAllocation,
parameters: [],
result: Foundation.Qual::QualityRequirement,
body: (record Foundation.Qual::QualityRequirement {index := 0, subcharacteristicIndex := 4})
}
definition{
name: requirementBoundedRequest,
parameters: [],
result: Foundation.Qual::QualityRequirement,
body: (record Foundation.Qual::QualityRequirement {index := 1, subcharacteristicIndex := 5})
}
definition{
name: requirementDisabledControlsStayDisabled,
parameters: [],
result: Foundation.Qual::QualityRequirement,
body: (record Foundation.Qual::QualityRequirement {index := 2, subcharacteristicIndex := 6})
}
definition{
name: requirementEveryPropertyProved,
parameters: [],
result: Foundation.Qual::QualityRequirement,
body: (record Foundation.Qual::QualityRequirement {index := 3, subcharacteristicIndex := 3})
}
definition{
name: requirementEveryRequestAnswered,
parameters: [],
result: Foundation.Qual::QualityRequirement,
body: (record Foundation.Qual::QualityRequirement {index := 4, subcharacteristicIndex := 1})
}
definition{
name: requirementEveryStateReachable,
parameters: [],
result: Foundation.Qual::QualityRequirement,
body: (record Foundation.Qual::QualityRequirement {index := 5, subcharacteristicIndex := 1})
}
definition{
name: requirementEveryVectorReplays,
parameters: [],
result: Foundation.Qual::QualityRequirement,
body: (record Foundation.Qual::QualityRequirement {index := 6, subcharacteristicIndex := 0})
}
definition{
name: requirementExamplesAnsweredAsStated,
parameters: [],
result: Foundation.Qual::QualityRequirement,
body: (record Foundation.Qual::QualityRequirement {index := 7, subcharacteristicIndex := 2})
}
definition{
name: measureButtonTransitionsDuringAWord,
parameters: [],
result: Foundation.Qual::QualityMeasure,
body: (record Foundation.Qual::QualityMeasure {index := 0, requirementIndex := 2, threshold := 0})
}
definition{
name: measureExampleMismatches,
parameters: [],
result: Foundation.Qual::QualityMeasure,
body: (record Foundation.Qual::QualityMeasure {index := 1, requirementIndex := 7, threshold := 0})
}
definition{
name: measureFailedVectors,
parameters: [],
result: Foundation.Qual::QualityMeasure,
body: (record Foundation.Qual::QualityMeasure {index := 2, requirementIndex := 6, threshold := 0})
}
definition{
name: measureGuestAllocationBytes,
parameters: [],
result: Foundation.Qual::QualityMeasure,
body: (record Foundation.Qual::QualityMeasure {index := 3, requirementIndex := 0, threshold := 224})
}
definition{
name: measureRequestBytesRead,
parameters: [],
result: Foundation.Qual::QualityMeasure,
body: (record Foundation.Qual::QualityMeasure {index := 4, requirementIndex := 1, threshold := 112})
}
definition{
name: measureUnansweredRequests,
parameters: [],
result: Foundation.Qual::QualityMeasure,
body: (record Foundation.Qual::QualityMeasure {index := 5, requirementIndex := 4, threshold := 0})
}
definition{
name: measureUnprovedProperties,
parameters: [],
result: Foundation.Qual::QualityMeasure,
body: (record Foundation.Qual::QualityMeasure {index := 6, requirementIndex := 3, threshold := 0})
}
definition{
name: measureUnreachableStates,
parameters: [],
result: Foundation.Qual::QualityMeasure,
body: (record Foundation.Qual::QualityMeasure {index := 7, requirementIndex := 5, threshold := 0})
}
definition{
name: characteristicNames,
parameters: [],
result: (List Named),
body: (cons (record Named {index := 0, name := "Functional suitability", text := "Functional suitability, as ISO/IEC 25010:2023 defines it, for Atlas walk controls."}) (cons (record Named {index := 1, name := "Interaction capability", text := "Interaction capability, as ISO/IEC 25010:2023 defines it, for Atlas walk controls."}) (cons (record Named {index := 2, name := "Performance efficiency", text := "Performance efficiency, as ISO/IEC 25010:2023 defines it, for Atlas walk controls."}) (cons (record Named {index := 3, name := "Reliability", text := "Reliability, as ISO/IEC 25010:2023 defines it, for Atlas walk controls."}) (cons (record Named {index := 4, name := "Security", text := "Security, as ISO/IEC 25010:2023 defines it, for Atlas walk controls."}) (nil Named))))))
}
definition{
name: subcharacteristicNames,
parameters: [],
result: (List Named),
body: (cons (record Named {index := 0, name := "Faultlessness", text := "Reliability: Faultlessness."}) (cons (record Named {index := 1, name := "Functional completeness", text := "Functional suitability: Functional completeness."}) (cons (record Named {index := 2, name := "Functional correctness", text := "Functional suitability: Functional correctness."}) (cons (record Named {index := 3, name := "Integrity", text := "Security: Integrity."}) (cons (record Named {index := 4, name := "Resource utilization", text := "Performance efficiency: Resource utilization."}) (cons (record Named {index := 5, name := "Time behaviour", text := "Performance efficiency: Time behaviour."}) (cons (record Named {index := 6, name := "User error protection", text := "Interaction capability: User error protection."}) (nil Named))))))))
}
definition{
name: requirementNames,
parameters: [],
result: (List Named),
body: (cons (record Named {index := 0, name := "Bounded allocation", text := "The guest allocates at most 224 bytes for one request."}) (cons (record Named {index := 1, name := "Bounded request", text := "A request over 112 bytes is refused before any field is read."}) (cons (record Named {index := 2, name := "Disabled controls stay disabled", text := "No button press changes the state while a walk or a walk home runs."}) (cons (record Named {index := 3, name := "Every property proved", text := "All 5 properties are theorems the Lean kernel checks."}) (cons (record Named {index := 4, name := "Every request answered", text := "Every request gets an answer: a rule, home otherwise, or invalid."}) (cons (record Named {index := 5, name := "Every state reachable", text := "Each of the four states is reachable from home."}) (cons (record Named {index := 6, name := "Every vector replays", text := "All 41 acceptance vectors replay in the compiled guest, the shortest 0 bytes long."}) (cons (record Named {index := 7, name := "Examples answered as stated", text := "Every one of the 7 examples of the spec is answered as it states."}) (nil Named)))))))))
}
definition{
name: measureNames,
parameters: [],
result: (List Named),
body: (cons (record Named {index := 0, name := "Button transitions during a word", text := "Requests in walking or returning, other than finish, that answer a different state."}) (cons (record Named {index := 1, name := "Example mismatches", text := "Examples the guest answers otherwise than they state."}) (cons (record Named {index := 2, name := "Failed vectors", text := "Acceptance vectors whose replay differs from the model."}) (cons (record Named {index := 3, name := "Guest allocation bytes", text := "Most bytes the guest allocates for one request."}) (cons (record Named {index := 4, name := "Request bytes read", text := "Longest request the guest decodes, in bytes."}) (cons (record Named {index := 5, name := "Unanswered requests", text := "Acceptance vectors the guest does not answer."}) (cons (record Named {index := 6, name := "Unproved properties", text := "Properties of the spec without a checked theorem."}) (cons (record Named {index := 7, name := "Unreachable states", text := "States no sequence of events reaches from the initial state."}) (nil Named)))))))))
}
definition{
name: subcharacteristicRecords,
parameters: [],
result: (List Foundation.Qual::QualitySubcharacteristic),
body: (cons (subcharacteristicFaultlessness) (cons (subcharacteristicFunctionalCompleteness) (cons (subcharacteristicFunctionalCorrectness) (cons (subcharacteristicIntegrity) (cons (subcharacteristicResourceUtilization) (cons (subcharacteristicTimeBehaviour) (cons (subcharacteristicUserErrorProtection) (nil Foundation.Qual::QualitySubcharacteristic))))))))
}
definition{
name: requirementRecords,
parameters: [],
result: (List Foundation.Qual::QualityRequirement),
body: (cons (requirementBoundedAllocation) (cons (requirementBoundedRequest) (cons (requirementDisabledControlsStayDisabled) (cons (requirementEveryPropertyProved) (cons (requirementEveryRequestAnswered) (cons (requirementEveryStateReachable) (cons (requirementEveryVectorReplays) (cons (requirementExamplesAnsweredAsStated) (nil Foundation.Qual::QualityRequirement)))))))))
}
definition{
name: measureRecords,
parameters: [],
result: (List Foundation.Qual::QualityMeasure),
body: (cons (measureButtonTransitionsDuringAWord) (cons (measureExampleMismatches) (cons (measureFailedVectors) (cons (measureGuestAllocationBytes) (cons (measureRequestBytesRead) (cons (measureUnansweredRequests) (cons (measureUnprovedProperties) (cons (measureUnreachableStates) (nil Foundation.Qual::QualityMeasure)))))))))
}
definition{
name: namesNumbered,
parameters: [position : Nat, names : (List Named)],
result: Bool,
body: (match names
| List.nil => true
| List.cons item rest => (((project item index) =? position) && (namesNumbered (position + 1) rest))),
recursive_argument: names
}
definition{
name: parentsKnown,
parameters: [count : Nat, records : (List Foundation.Qual::QualitySubcharacteristic)],
result: Bool,
body: (match records
| List.nil => true
| List.cons item rest => (((project item characteristicIndex) <? count) && (parentsKnown count rest))),
recursive_argument: records
}
definition{
name: requirementsKnown,
parameters: [count : Nat, records : (List Foundation.Qual::QualityRequirement)],
result: Bool,
body: (match records
| List.nil => true
| List.cons item rest => (((project item subcharacteristicIndex) <? count) && (requirementsKnown count rest))),
recursive_argument: records
}
definition{
name: measuresKnown,
parameters: [count : Nat, records : (List Foundation.Qual::QualityMeasure)],
result: Bool,
body: (match records
| List.nil => true
| List.cons item rest => (((project item requirementIndex) <? count) && (measuresKnown count rest))),
recursive_argument: records
}
definition{
name: thresholdOf,
parameters: [wanted : Nat, records : (List Foundation.Qual::QualityMeasure)],
result: Nat,
body: (match records
| List.nil => 0
| List.cons head rest => (if ((project head index) =? wanted) then (project head threshold) else (thresholdOf wanted rest))),
recursive_argument: records
}
definition{
name: qualityValid,
parameters: [],
result: Bool,
body: ((namesNumbered 0 (characteristicNames)) && ((namesNumbered 0 (subcharacteristicNames)) && ((namesNumbered 0 (requirementNames)) && ((namesNumbered 0 (measureNames)) && ((parentsKnown 5 (subcharacteristicRecords)) && ((requirementsKnown 7 (requirementRecords)) && (measuresKnown 8 (measureRecords))))))))
}
theorem{
name: qualityModelHolds,
parameters: [],
statement: ((qualityValid) = true),
proof: decide{}
}
theorem{
name: measureButtonTransitionsDuringAWordThreshold,
parameters: [],
statement: ((thresholdOf 0 (measureRecords)) = 0),
proof: decide{}
}
theorem{
name: measureExampleMismatchesThreshold,
parameters: [],
statement: ((thresholdOf 1 (measureRecords)) = 0),
proof: decide{}
}
theorem{
name: measureFailedVectorsThreshold,
parameters: [],
statement: ((thresholdOf 2 (measureRecords)) = 0),
proof: decide{}
}
theorem{
name: measureGuestAllocationBytesThreshold,
parameters: [],
statement: ((thresholdOf 3 (measureRecords)) = 224),
proof: decide{}
}
theorem{
name: measureRequestBytesReadThreshold,
parameters: [],
statement: ((thresholdOf 4 (measureRecords)) = 112),
proof: decide{}
}
theorem{
name: measureUnansweredRequestsThreshold,
parameters: [],
statement: ((thresholdOf 5 (measureRecords)) = 0),
proof: decide{}
}
theorem{
name: measureUnprovedPropertiesThreshold,
parameters: [],
statement: ((thresholdOf 6 (measureRecords)) = 0),
proof: decide{}
}
theorem{
name: measureUnreachableStatesThreshold,
parameters: [],
statement: ((thresholdOf 7 (measureRecords)) = 0),
proof: decide{}
}
\end{semanticmodule}
\end{lexlean}
app/src/Security.lex.tex 635 lines
\begin{lexlean}{Security}
\useglossary{lexlean.std.bool@1.2.0}
\useglossary{lexlean.std.nat@1.2.0}
\useglossary{prism.arch@1.0.0}
\useglossary{prism.sec@1.0.0}
\importmodule{Foundation.Sec}
\importmodule{Production.ThreatModel}
\importmodule{Architecture}
\title{security threat}
\begin{semanticmodule}
definition{
name: assetAnswer,
parameters: [],
result: Foundation.Sec::Asset,
body: (record Foundation.Sec::Asset {index := 0, componentIndex := 0})
}
definition{
name: assetModelSource,
parameters: [],
result: Foundation.Sec::Asset,
body: (record Foundation.Sec::Asset {index := 1, componentIndex := 5})
}
definition{
name: assetPublishedHolo,
parameters: [],
result: Foundation.Sec::Asset,
body: (record Foundation.Sec::Asset {index := 2, componentIndex := 1})
}
definition{
name: assetRequestBytes,
parameters: [],
result: Foundation.Sec::Asset,
body: (record Foundation.Sec::Asset {index := 3, componentIndex := 0})
}
definition{
name: threatAnswerThatBreaksINV001,
parameters: [],
result: Foundation.Sec::Threat,
body: (record Foundation.Sec::Threat {index := 0})
}
definition{
name: threatAnswerThatBreaksINV002,
parameters: [],
result: Foundation.Sec::Threat,
body: (record Foundation.Sec::Threat {index := 1})
}
definition{
name: threatAnswerThatBreaksINV003,
parameters: [],
result: Foundation.Sec::Threat,
body: (record Foundation.Sec::Threat {index := 2})
}
definition{
name: threatAnswerThatBreaksINV004,
parameters: [],
result: Foundation.Sec::Threat,
body: (record Foundation.Sec::Threat {index := 3})
}
definition{
name: threatAnswerThatBreaksINV005,
parameters: [],
result: Foundation.Sec::Threat,
body: (record Foundation.Sec::Threat {index := 4})
}
definition{
name: threatGrantedCapability,
parameters: [],
result: Foundation.Sec::Threat,
body: (record Foundation.Sec::Threat {index := 5})
}
definition{
name: threatMalformedRequest,
parameters: [],
result: Foundation.Sec::Threat,
body: (record Foundation.Sec::Threat {index := 6})
}
definition{
name: threatOverlappingWords,
parameters: [],
result: Foundation.Sec::Threat,
body: (record Foundation.Sec::Threat {index := 7})
}
definition{
name: threatOversizedRequest,
parameters: [],
result: Foundation.Sec::Threat,
body: (record Foundation.Sec::Threat {index := 8})
}
definition{
name: threatPlaneClickDuringAWalk,
parameters: [],
result: Foundation.Sec::Threat,
body: (record Foundation.Sec::Threat {index := 9})
}
definition{
name: threatSubstitutedHolo,
parameters: [],
result: Foundation.Sec::Threat,
body: (record Foundation.Sec::Threat {index := 10})
}
definition{
name: threatSubstitutedHost,
parameters: [],
result: Foundation.Sec::Threat,
body: (record Foundation.Sec::Threat {index := 11})
}
definition{
name: threatTamperedModel,
parameters: [],
result: Foundation.Sec::Threat,
body: (record Foundation.Sec::Threat {index := 12})
}
definition{
name: threatWalkHomeWithoutAMap,
parameters: [],
result: Foundation.Sec::Threat,
body: (record Foundation.Sec::Threat {index := 13})
}
definition{
name: riskAnswerThatBreaksINV001,
parameters: [],
result: Foundation.Sec::Risk,
body: (record Foundation.Sec::Risk {index := 0, assetIndex := 0, threatIndex := 0, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.critical)})
}
definition{
name: riskAnswerThatBreaksINV002,
parameters: [],
result: Foundation.Sec::Risk,
body: (record Foundation.Sec::Risk {index := 1, assetIndex := 0, threatIndex := 1, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.critical)})
}
definition{
name: riskAnswerThatBreaksINV003,
parameters: [],
result: Foundation.Sec::Risk,
body: (record Foundation.Sec::Risk {index := 2, assetIndex := 0, threatIndex := 2, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.critical)})
}
definition{
name: riskAnswerThatBreaksINV004,
parameters: [],
result: Foundation.Sec::Risk,
body: (record Foundation.Sec::Risk {index := 3, assetIndex := 0, threatIndex := 3, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.critical)})
}
definition{
name: riskAnswerThatBreaksINV005,
parameters: [],
result: Foundation.Sec::Risk,
body: (record Foundation.Sec::Risk {index := 4, assetIndex := 0, threatIndex := 4, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.critical)})
}
definition{
name: riskGrantedCapability,
parameters: [],
result: Foundation.Sec::Risk,
body: (record Foundation.Sec::Risk {index := 5, assetIndex := 0, threatIndex := 5, likelihood := (ctor Foundation.Sec::Likelihood.low), impact := (ctor Foundation.Sec::Impact.major)})
}
definition{
name: riskMalformedRequest,
parameters: [],
result: Foundation.Sec::Risk,
body: (record Foundation.Sec::Risk {index := 6, assetIndex := 3, threatIndex := 6, likelihood := (ctor Foundation.Sec::Likelihood.high), impact := (ctor Foundation.Sec::Impact.major)})
}
definition{
name: riskOverlappingWords,
parameters: [],
result: Foundation.Sec::Risk,
body: (record Foundation.Sec::Risk {index := 7, assetIndex := 0, threatIndex := 7, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.minor)})
}
definition{
name: riskOversizedRequest,
parameters: [],
result: Foundation.Sec::Risk,
body: (record Foundation.Sec::Risk {index := 8, assetIndex := 3, threatIndex := 8, likelihood := (ctor Foundation.Sec::Likelihood.medium), impact := (ctor Foundation.Sec::Impact.minor)})
}
definition{
name: riskPlaneClickDuringAWalk,
parameters: [],
result: Foundation.Sec::Risk,
body: (record Foundation.Sec::Risk {index := 9, assetIndex := 0, threatIndex := 9, likelihood := (ctor Foundation.Sec::Likelihood.low), impact := (ctor Foundation.Sec::Impact.minor)})
}
definition{
name: riskSubstitutedHolo,
parameters: [],
result: Foundation.Sec::Risk,
body: (record Foundation.Sec::Risk {index := 10, assetIndex := 2, threatIndex := 10, likelihood := (ctor Foundation.Sec::Likelihood.low), impact := (ctor Foundation.Sec::Impact.critical)})
}
definition{
name: riskSubstitutedHost,
parameters: [],
result: Foundation.Sec::Risk,
body: (record Foundation.Sec::Risk {index := 11, assetIndex := 2, threatIndex := 11, likelihood := (ctor Foundation.Sec::Likelihood.low), impact := (ctor Foundation.Sec::Impact.critical)})
}
definition{
name: riskTamperedModel,
parameters: [],
result: Foundation.Sec::Risk,
body: (record Foundation.Sec::Risk {index := 12, assetIndex := 1, threatIndex := 12, likelihood := (ctor Foundation.Sec::Likelihood.low), impact := (ctor Foundation.Sec::Impact.major)})
}
definition{
name: riskWalkHomeWithoutAMap,
parameters: [],
result: Foundation.Sec::Risk,
body: (record Foundation.Sec::Risk {index := 13, assetIndex := 0, threatIndex := 13, likelihood := (ctor Foundation.Sec::Likelihood.low), impact := (ctor Foundation.Sec::Impact.minor)})
}
definition{
name: controlBoundedRequest,
parameters: [],
result: Foundation.Sec::ApplicationSecurityControl,
body: (record Foundation.Sec::ApplicationSecurityControl {index := 0, riskIndex := 8})
}
definition{
name: controlBusyLock,
parameters: [],
result: Foundation.Sec::ApplicationSecurityControl,
body: (record Foundation.Sec::ApplicationSecurityControl {index := 1, riskIndex := 7})
}
definition{
name: controlFingerprintAndProvenance,
parameters: [],
result: Foundation.Sec::ApplicationSecurityControl,
body: (record Foundation.Sec::ApplicationSecurityControl {index := 2, riskIndex := 10})
}
definition{
name: controlMapBeforeHome,
parameters: [],
result: Foundation.Sec::ApplicationSecurityControl,
body: (record Foundation.Sec::ApplicationSecurityControl {index := 3, riskIndex := 13})
}
definition{
name: controlNoCapabilityGranted,
parameters: [],
result: Foundation.Sec::ApplicationSecurityControl,
body: (record Foundation.Sec::ApplicationSecurityControl {index := 4, riskIndex := 5})
}
definition{
name: controlProofOfINV001,
parameters: [],
result: Foundation.Sec::ApplicationSecurityControl,
body: (record Foundation.Sec::ApplicationSecurityControl {index := 5, riskIndex := 0})
}
definition{
name: controlProofOfINV002,
parameters: [],
result: Foundation.Sec::ApplicationSecurityControl,
body: (record Foundation.Sec::ApplicationSecurityControl {index := 6, riskIndex := 1})
}
definition{
name: controlProofOfINV003,
parameters: [],
result: Foundation.Sec::ApplicationSecurityControl,
body: (record Foundation.Sec::ApplicationSecurityControl {index := 7, riskIndex := 2})
}
definition{
name: controlProofOfINV004,
parameters: [],
result: Foundation.Sec::ApplicationSecurityControl,
body: (record Foundation.Sec::ApplicationSecurityControl {index := 8, riskIndex := 3})
}
definition{
name: controlProofOfINV005,
parameters: [],
result: Foundation.Sec::ApplicationSecurityControl,
body: (record Foundation.Sec::ApplicationSecurityControl {index := 9, riskIndex := 4})
}
definition{
name: controlRegeneratedFromThePrompt,
parameters: [],
result: Foundation.Sec::ApplicationSecurityControl,
body: (record Foundation.Sec::ApplicationSecurityControl {index := 10, riskIndex := 12})
}
definition{
name: controlStrictDecoder,
parameters: [],
result: Foundation.Sec::ApplicationSecurityControl,
body: (record Foundation.Sec::ApplicationSecurityControl {index := 11, riskIndex := 6})
}
definition{
name: controlSet,
parameters: [],
result: Production.ThreatModel::ControlSet,
body: (record Production.ThreatModel::ControlSet {title := "Atlas walk controls security controls", text := "Atlas walk controls answers one request with one answer in a Core-Wasm guest granted no capability. Decide where the Atlas instance stands after a Dynamics control event: at A0, away from it, in a random walk, or walking home.", version := "0.1.0", lastModified := "2026-11-12T18:44:38Z"})
}
definition{
name: modeledAssetAnswer,
parameters: [],
result: Production.ThreatModel::ModeledAsset,
body: (record Production.ThreatModel::ModeledAsset {asset := "Security::assetAnswer", name := "Answer", text := "The answer the guest returns: one of home, away, walking, returning, or invalid."})
}
definition{
name: modeledAssetModelSource,
parameters: [],
result: Production.ThreatModel::ModeledAsset,
body: (record Production.ThreatModel::ModeledAsset {asset := "Security::assetModelSource", name := "Model source", text := "The prompt, the spec and the LexLean model in the repository, from which the holo is built."})
}
definition{
name: modeledAssetPublishedHolo,
parameters: [],
result: Production.ThreatModel::ModeledAsset,
body: (record Production.ThreatModel::ModeledAsset {asset := "Security::assetPublishedHolo", name := "Published holo", text := "The holo and page the Pages workflow publishes, with its fingerprint and signed provenance."})
}
definition{
name: modeledAssetRequestBytes,
parameters: [],
result: Production.ThreatModel::ModeledAsset,
body: (record Production.ThreatModel::ModeledAsset {asset := "Security::assetRequestBytes", name := "Request bytes", text := "The bytes a caller sends, at most 112 of them."})
}
definition{
name: modeledThreatAnswerThatBreaksINV001,
parameters: [],
result: Production.ThreatModel::ModeledThreat,
body: (record Production.ThreatModel::ModeledThreat {threat := "Security::threatAnswerThatBreaksINV001", name := "Answer that breaks INV-001", text := "The guest answers returning although state is home, which matters because index.html: homeBtn is disabled when live.isA0.", category := (ctor Production.ThreatModel::Stride.repudiation)})
}
definition{
name: modeledThreatAnswerThatBreaksINV002,
parameters: [],
result: Production.ThreatModel::ModeledThreat,
body: (record Production.ThreatModel::ModeledThreat {threat := "Security::threatAnswerThatBreaksINV002", name := "Answer that breaks INV-002", text := "The guest answers returning although state is away and orbit is mapping, which matters because index.html: walk home needs the orbit map to find the path to A0.", category := (ctor Production.ThreatModel::Stride.repudiation)})
}
definition{
name: modeledThreatAnswerThatBreaksINV003,
parameters: [],
result: Production.ThreatModel::ModeledThreat,
body: (record Production.ThreatModel::ModeledThreat {threat := "Security::threatAnswerThatBreaksINV003", name := "Answer that breaks INV-003", text := "The guest answers walking not when state is walking and event is reflect, which matters because index.html setBusy: reflections are disabled during a walk.", category := (ctor Production.ThreatModel::Stride.repudiation)})
}
definition{
name: modeledThreatAnswerThatBreaksINV004,
parameters: [],
result: Production.ThreatModel::ModeledThreat,
body: (record Production.ThreatModel::ModeledThreat {threat := "Security::threatAnswerThatBreaksINV004", name := "Answer that breaks INV-004", text := "The guest answers home not when event is reset and state is not walking and state is not returning, which matters because reset always restores A0 when it is enabled.", category := (ctor Production.ThreatModel::Stride.repudiation)})
}
definition{
name: modeledThreatAnswerThatBreaksINV005,
parameters: [],
result: Production.ThreatModel::ModeledThreat,
body: (record Production.ThreatModel::ModeledThreat {threat := "Security::threatAnswerThatBreaksINV005", name := "Answer that breaks INV-005", text := "The guest answers away although state is returning and event is finish, which matters because the walk home always ends at A0.", category := (ctor Production.ThreatModel::Stride.repudiation)})
}
definition{
name: modeledThreatGrantedCapability,
parameters: [],
result: Production.ThreatModel::ModeledThreat,
body: (record Production.ThreatModel::ModeledThreat {threat := "Security::threatGrantedCapability", name := "Granted capability", text := "The guest reads, stores or sends data beyond the request it answers.", category := (ctor Production.ThreatModel::Stride.informationDisclosure)})
}
definition{
name: modeledThreatMalformedRequest,
parameters: [],
result: Production.ThreatModel::ModeledThreat,
body: (record Production.ThreatModel::ModeledThreat {threat := "Security::threatMalformedRequest", name := "Malformed request", text := "A request with a missing, extra, unknown or badly written field is answered as if it were well formed.", category := (ctor Production.ThreatModel::Stride.tampering)})
}
definition{
name: modeledThreatOverlappingWords,
parameters: [],
result: Production.ThreatModel::ModeledThreat,
body: (record Production.ThreatModel::ModeledThreat {threat := "Security::threatOverlappingWords", name := "Overlapping words", text := "A control starts a second reflection word while one runs, so the instance shown is not the one the word reaches.", category := (ctor Production.ThreatModel::Stride.tampering)})
}
definition{
name: modeledThreatOversizedRequest,
parameters: [],
result: Production.ThreatModel::ModeledThreat,
body: (record Production.ThreatModel::ModeledThreat {threat := "Security::threatOversizedRequest", name := "Oversized request", text := "A request longer than 112 bytes makes the guest parse or allocate without bound.", category := (ctor Production.ThreatModel::Stride.denialOfService)})
}
definition{
name: modeledThreatPlaneClickDuringAWalk,
parameters: [],
result: Production.ThreatModel::ModeledThreat,
body: (record Production.ThreatModel::ModeledThreat {threat := "Security::threatPlaneClickDuringAWalk", name := "Plane click during a walk", text := "A click on the plane in Dynamics mode applies a reflection without checking busy.", category := (ctor Production.ThreatModel::Stride.tampering)})
}
definition{
name: modeledThreatSubstitutedHolo,
parameters: [],
result: Production.ThreatModel::ModeledThreat,
body: (record Production.ThreatModel::ModeledThreat {threat := "Security::threatSubstitutedHolo", name := "Substituted holo", text := "A holo other than the one the build verified is served under the app address.", category := (ctor Production.ThreatModel::Stride.spoofing)})
}
definition{
name: modeledThreatSubstitutedHost,
parameters: [],
result: Production.ThreatModel::ModeledThreat,
body: (record Production.ThreatModel::ModeledThreat {threat := "Security::threatSubstitutedHost", name := "Substituted host", text := "Something other than the repository Pages workflow serves pages under its address.", category := (ctor Production.ThreatModel::Stride.spoofing)})
}
definition{
name: modeledThreatTamperedModel,
parameters: [],
result: Production.ThreatModel::ModeledThreat,
body: (record Production.ThreatModel::ModeledThreat {threat := "Security::threatTamperedModel", name := "Tampered model", text := "The model the holo is built from differs from the reviewed prompt and spec.", category := (ctor Production.ThreatModel::Stride.tampering)})
}
definition{
name: modeledThreatWalkHomeWithoutAMap,
parameters: [],
result: Production.ThreatModel::ModeledThreat,
body: (record Production.ThreatModel::ModeledThreat {threat := "Security::threatWalkHomeWithoutAMap", name := "Walk home without a map", text := "Walk home is pressed before the orbit census finishes, so there is no path to A0.", category := (ctor Production.ThreatModel::Stride.denialOfService)})
}
definition{
name: modeledControlBoundedRequest,
parameters: [],
result: Production.ThreatModel::ModeledControl,
body: (record Production.ThreatModel::ModeledControl {control := "Security::controlBoundedRequest", name := "Bounded request", text := "dispatch answers invalid for a request over 112 bytes before reading a field, and the guest allocates at most 224.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "acceptance vectors at the request bound, one byte over it, and at the guest allocation bound, replayed by prismpm verify"}) (nil Production.ThreatModel::Evidence))})
}
definition{
name: modeledControlBusyLock,
parameters: [],
result: Production.ThreatModel::ModeledControl,
body: (record Production.ThreatModel::ModeledControl {control := "Security::controlBusyLock", name := "Busy lock", text := "While a word runs, every control leaves the state as it is.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "AtlasExplorerWalkProofs::inv003Holds"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "index.html runWord"}) (nil Production.ThreatModel::Evidence)))})
}
definition{
name: modeledControlFingerprintAndProvenance,
parameters: [],
result: Production.ThreatModel::ModeledControl,
body: (record Production.ThreatModel::ModeledControl {control := "Security::controlFingerprintAndProvenance", name := "Fingerprint and provenance", text := "The page verifies the holo digests before it runs, and the build signs its provenance as the repository workflow.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "actions/attest-build-provenance in the pages workflow"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "prism-code check of the holo identities in the page"}) (nil Production.ThreatModel::Evidence)))})
}
definition{
name: modeledControlMapBeforeHome,
parameters: [],
result: Production.ThreatModel::ModeledControl,
body: (record Production.ThreatModel::ModeledControl {control := "Security::controlMapBeforeHome", name := "Map before home", text := "Walk home leaves away only once the orbit is mapped.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "AtlasExplorerWalkProofs::inv002Holds"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "index.html setBusy"}) (nil Production.ThreatModel::Evidence)))})
}
definition{
name: modeledControlNoCapabilityGranted,
parameters: [],
result: Production.ThreatModel::ModeledControl,
body: (record Production.ThreatModel::ModeledControl {control := "Security::controlNoCapabilityGranted", name := "No capability granted", text := "prism.toml grants the holo nothing and the model declares capabilitiesEmpty, so a guest import of any host capability is refused.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "prism-code check refuses an ungranted guest import"}) (nil Production.ThreatModel::Evidence))})
}
definition{
name: modeledControlProofOfINV001,
parameters: [],
result: Production.ThreatModel::ModeledControl,
body: (record Production.ThreatModel::ModeledControl {control := "Security::controlProofOfINV001", name := "Proof of INV-001", text := "It never answers returning when state is home. The Lean kernel proves it for every request.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "AtlasExplorerWalkProofs::inv001Holds"}) (nil Production.ThreatModel::Evidence))})
}
definition{
name: modeledControlProofOfINV002,
parameters: [],
result: Production.ThreatModel::ModeledControl,
body: (record Production.ThreatModel::ModeledControl {control := "Security::controlProofOfINV002", name := "Proof of INV-002", text := "It never answers returning when state is away and orbit is mapping. The Lean kernel proves it for every request.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "AtlasExplorerWalkProofs::inv002Holds"}) (nil Production.ThreatModel::Evidence))})
}
definition{
name: modeledControlProofOfINV003,
parameters: [],
result: Production.ThreatModel::ModeledControl,
body: (record Production.ThreatModel::ModeledControl {control := "Security::controlProofOfINV003", name := "Proof of INV-003", text := "It always answers walking when state is walking and event is reflect. The Lean kernel proves it for every request.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "AtlasExplorerWalkProofs::inv003Holds"}) (nil Production.ThreatModel::Evidence))})
}
definition{
name: modeledControlProofOfINV004,
parameters: [],
result: Production.ThreatModel::ModeledControl,
body: (record Production.ThreatModel::ModeledControl {control := "Security::controlProofOfINV004", name := "Proof of INV-004", text := "It always answers home when event is reset and state is not walking and state is not returning. The Lean kernel proves it for every request.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "AtlasExplorerWalkProofs::inv004Holds"}) (nil Production.ThreatModel::Evidence))})
}
definition{
name: modeledControlProofOfINV005,
parameters: [],
result: Production.ThreatModel::ModeledControl,
body: (record Production.ThreatModel::ModeledControl {control := "Security::controlProofOfINV005", name := "Proof of INV-005", text := "It never answers away when state is returning and event is finish. The Lean kernel proves it for every request.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.proof), reference := "AtlasExplorerWalkProofs::inv005Holds"}) (nil Production.ThreatModel::Evidence))})
}
definition{
name: modeledControlRegeneratedFromThePrompt,
parameters: [],
result: Production.ThreatModel::ModeledControl,
body: (record Production.ThreatModel::ModeledControl {control := "Security::controlRegeneratedFromThePrompt", name := "Regenerated from the prompt", text := "The model is written from the prompt by the builder, and the build checks every theorem and replays every vector in the pinned SDK.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "prismpm verify in the SDK image prismpm.lock pins"}) (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.review), reference := "app/prompt.json"}) (nil Production.ThreatModel::Evidence)))})
}
definition{
name: modeledControlStrictDecoder,
parameters: [],
result: Production.ThreatModel::ModeledControl,
body: (record Production.ThreatModel::ModeledControl {control := "Security::controlStrictDecoder", name := "Strict decoder", text := "Every field is decoded exactly: choices from their list, numbers as plain decimal digits within their bounds, single spaces between fields; anything else is invalid.", evidence := (cons (record Production.ThreatModel::Evidence {kind := (ctor Production.ThreatModel::EvidenceKind.gate), reference := "malformed-request acceptance vectors, replayed in the compiled guest by prismpm verify"}) (nil Production.ThreatModel::Evidence))})
}
definition{
name: mappingOversizedRequest,
parameters: [],
result: Production.ThreatModel::ThreatMapping,
body: (record Production.ThreatModel::ThreatMapping {threat := "Security::threatOversizedRequest", controls := (cons "Security::controlBoundedRequest" (nil String))})
}
definition{
name: mappingOverlappingWords,
parameters: [],
result: Production.ThreatModel::ThreatMapping,
body: (record Production.ThreatModel::ThreatMapping {threat := "Security::threatOverlappingWords", controls := (cons "Security::controlBusyLock" (nil String))})
}
definition{
name: mappingSubstitutedHolo,
parameters: [],
result: Production.ThreatModel::ThreatMapping,
body: (record Production.ThreatModel::ThreatMapping {threat := "Security::threatSubstitutedHolo", controls := (cons "Security::controlFingerprintAndProvenance" (nil String))})
}
definition{
name: mappingWalkHomeWithoutAMap,
parameters: [],
result: Production.ThreatModel::ThreatMapping,
body: (record Production.ThreatModel::ThreatMapping {threat := "Security::threatWalkHomeWithoutAMap", controls := (cons "Security::controlMapBeforeHome" (nil String))})
}
definition{
name: mappingGrantedCapability,
parameters: [],
result: Production.ThreatModel::ThreatMapping,
body: (record Production.ThreatModel::ThreatMapping {threat := "Security::threatGrantedCapability", controls := (cons "Security::controlNoCapabilityGranted" (nil String))})
}
definition{
name: mappingAnswerThatBreaksINV001,
parameters: [],
result: Production.ThreatModel::ThreatMapping,
body: (record Production.ThreatModel::ThreatMapping {threat := "Security::threatAnswerThatBreaksINV001", controls := (cons "Security::controlProofOfINV001" (nil String))})
}
definition{
name: mappingAnswerThatBreaksINV002,
parameters: [],
result: Production.ThreatModel::ThreatMapping,
body: (record Production.ThreatModel::ThreatMapping {threat := "Security::threatAnswerThatBreaksINV002", controls := (cons "Security::controlProofOfINV002" (nil String))})
}
definition{
name: mappingAnswerThatBreaksINV003,
parameters: [],
result: Production.ThreatModel::ThreatMapping,
body: (record Production.ThreatModel::ThreatMapping {threat := "Security::threatAnswerThatBreaksINV003", controls := (cons "Security::controlProofOfINV003" (nil String))})
}
definition{
name: mappingAnswerThatBreaksINV004,
parameters: [],
result: Production.ThreatModel::ThreatMapping,
body: (record Production.ThreatModel::ThreatMapping {threat := "Security::threatAnswerThatBreaksINV004", controls := (cons "Security::controlProofOfINV004" (nil String))})
}
definition{
name: mappingAnswerThatBreaksINV005,
parameters: [],
result: Production.ThreatModel::ThreatMapping,
body: (record Production.ThreatModel::ThreatMapping {threat := "Security::threatAnswerThatBreaksINV005", controls := (cons "Security::controlProofOfINV005" (nil String))})
}
definition{
name: mappingTamperedModel,
parameters: [],
result: Production.ThreatModel::ThreatMapping,
body: (record Production.ThreatModel::ThreatMapping {threat := "Security::threatTamperedModel", controls := (cons "Security::controlRegeneratedFromThePrompt" (nil String))})
}
definition{
name: mappingMalformedRequest,
parameters: [],
result: Production.ThreatModel::ThreatMapping,
body: (record Production.ThreatModel::ThreatMapping {threat := "Security::threatMalformedRequest", controls := (cons "Security::controlStrictDecoder" (nil String))})
}
definition{
name: acceptedPlaneClickDuringAWalk,
parameters: [],
result: Production.ThreatModel::AcceptedRisk,
body: (record Production.ThreatModel::AcceptedRisk {threat := "Security::threatPlaneClickDuringAWalk", rationale := "The machine models the Dynamics buttons that setBusy disables; the plane click handler in index.html is not gated by busy and is outside this model."})
}
definition{
name: acceptedSubstitutedHost,
parameters: [],
result: Production.ThreatModel::AcceptedRisk,
body: (record Production.ThreatModel::AcceptedRisk {threat := "Security::threatSubstitutedHost", rationale := "A page cannot defend against its own host. The holo carries signed build provenance a visitor can check, and the app can be rebuilt from its prompt."})
}
\end{semanticmodule}
\end{lexlean}
app/src/AtlasExplorerWalk.lex.tex 323 lines
\begin{lexlean}{AtlasExplorerWalk}
\useglossary{lexlean.std.bool@1.2.0}
\useglossary{lexlean.std.nat@1.2.0}
\useglossary{prism.arch@1.0.0}
\importmodule{Foundation.Bytes}
\importmodule{Foundation.View.Text.V1.Model}
\title{Text application model}
\begin{semanticmodule}
definition{name: stateHome, parameters: [], result: Nat, body: 0}
definition{name: stateAway, parameters: [], result: Nat, body: 1}
definition{name: stateWalking, parameters: [], result: Nat, body: 2}
definition{name: stateReturning, parameters: [], result: Nat, body: 3}
definition{name: eventReflect, parameters: [], result: Nat, body: 0}
definition{name: eventWalk, parameters: [], result: Nat, body: 1}
definition{name: eventWalkHome, parameters: [], result: Nat, body: 2}
definition{name: eventReset, parameters: [], result: Nat, body: 3}
definition{name: eventFinish, parameters: [], result: Nat, body: 4}
definition{name: orbitMapping, parameters: [], result: Nat, body: 0}
definition{name: orbitMapped, parameters: [], result: Nat, body: 1}
definition{name: landsA0, parameters: [], result: Nat, body: 0}
definition{name: landsOther, parameters: [], result: Nat, body: 1}
definition{name: answerHome, parameters: [], result: Nat, body: 0}
definition{name: answerAway, parameters: [], result: Nat, body: 1}
definition{name: answerWalking, parameters: [], result: Nat, body: 2}
definition{name: answerReturning, parameters: [], result: Nat, body: 3}
structure{
name: Request,
type_parameters: [],
parameters: [],
fields: [
{name: state, type: Nat},
{name: event, type: Nat},
{name: orbit, type: Nat},
{name: lands, type: Nat}
]
}
definition{
name: byteAt,
parameters: [s : Bytes, i : Nat],
result: (Option Nat),
body: (match (prim index s i : (Option UInt8))
| Option.none => (ctor Option.none [Nat])
| Option.some b => (ctor Option.some [Nat] (prim to_nat b : Nat))),
axioms: [Quot.sound, propext]
}
definition{
name: digitsValue,
parameters: [s : Bytes, i : Nat, acc : Nat, fuel : Nat],
result: (Option Nat),
body: (match fuel
| Nat.zero => (ctor Option.some [Nat] acc)
| Nat.succ rest => (match (byteAt s i)
| Option.none => (ctor Option.none [Nat])
| Option.some d => (if ((d <? 48) || (57 <? d)) then (ctor Option.none [Nat]) else (digitsValue s (i + 1) ((prim multiply acc 10 : Nat) + (prim subtract d 48 : Nat)) rest)))),
axioms: [Quot.sound, propext],
recursive_argument: fuel
}
definition{
name: parseDigits,
parameters: [s : Bytes],
result: (Option Nat),
body: (if ((Foundation.Bytes::byteLength s) =? 0) then (ctor Option.none [Nat]) else (if (18 <? (Foundation.Bytes::byteLength s)) then (ctor Option.none [Nat]) else (match (byteAt s 0)
| Option.none => (ctor Option.none [Nat])
| Option.some lead => (if ((lead =? 48) && (1 <? (Foundation.Bytes::byteLength s))) then (ctor Option.none [Nat]) else (digitsValue s 0 0 (Foundation.Bytes::byteLength s)))))),
axioms: [Quot.sound, propext]
}
definition{
name: parseNumber,
parameters: [value : Bytes],
result: (Option Nat),
body: (parseDigits value),
axioms: [Quot.sound, propext]
}
definition{
name: parseState,
parameters: [value : Bytes],
result: (Option Nat),
body: (if (prim equal value 0x686f6d65 : Bool) then (ctor Option.some [Nat] (stateHome)) else (if (prim equal value 0x61776179 : Bool) then (ctor Option.some [Nat] (stateAway)) else (if (prim equal value 0x77616c6b696e67 : Bool) then (ctor Option.some [Nat] (stateWalking)) else (if (prim equal value 0x72657475726e696e67 : Bool) then (ctor Option.some [Nat] (stateReturning)) else (ctor Option.none [Nat])))))
}
definition{
name: parseEvent,
parameters: [value : Bytes],
result: (Option Nat),
body: (if (prim equal value 0x7265666c656374 : Bool) then (ctor Option.some [Nat] (eventReflect)) else (if (prim equal value 0x77616c6b : Bool) then (ctor Option.some [Nat] (eventWalk)) else (if (prim equal value 0x77616c6b2d686f6d65 : Bool) then (ctor Option.some [Nat] (eventWalkHome)) else (if (prim equal value 0x7265736574 : Bool) then (ctor Option.some [Nat] (eventReset)) else (if (prim equal value 0x66696e697368 : Bool) then (ctor Option.some [Nat] (eventFinish)) else (ctor Option.none [Nat]))))))
}
definition{
name: parseOrbit,
parameters: [value : Bytes],
result: (Option Nat),
body: (if (prim equal value 0x6d617070696e67 : Bool) then (ctor Option.some [Nat] (orbitMapping)) else (if (prim equal value 0x6d6170706564 : Bool) then (ctor Option.some [Nat] (orbitMapped)) else (ctor Option.none [Nat])))
}
definition{
name: parseLands,
parameters: [value : Bytes],
result: (Option Nat),
body: (if (prim equal value 0x6130 : Bool) then (ctor Option.some [Nat] (landsA0)) else (if (prim equal value 0x6f74686572 : Bool) then (ctor Option.some [Nat] (landsOther)) else (ctor Option.none [Nat])))
}
definition{
name: sliceOf,
parameters: [s : Bytes, start : Nat, count : Nat],
result: Bytes,
body: (match (prim slice s start count : (Option Bytes))
| Option.none => 0x
| Option.some part => part)
}
definition{
name: fieldEnd,
parameters: [s : Bytes, i : Nat, fuel : Nat],
result: Nat,
body: (match fuel
| Nat.zero => i
| Nat.succ rest => (match (byteAt s i)
| Option.none => i
| Option.some d => (if (d =? 32) then i else (fieldEnd s (i + 1) rest)))),
axioms: [Quot.sound, propext],
recursive_argument: fuel
}
definition{
name: decodeField4,
parameters: [s : Bytes, start : Nat, v1 : Nat, v2 : Nat, v3 : Nat],
result: (Option Request),
body: (let e : Nat := (fieldEnd s start (Foundation.Bytes::byteLength s)); (match (parseLands (sliceOf s start (prim subtract e start : Nat)))
| Option.none => (ctor Option.none [Request])
| Option.some v4 => (if (e =? (Foundation.Bytes::byteLength s)) then (ctor Option.some [Request] (record Request {state := v1, event := v2, orbit := v3, lands := v4})) else (ctor Option.none [Request])))),
axioms: [Quot.sound, propext]
}
definition{
name: decodeField3,
parameters: [s : Bytes, start : Nat, v1 : Nat, v2 : Nat],
result: (Option Request),
body: (let e : Nat := (fieldEnd s start (Foundation.Bytes::byteLength s)); (match (parseOrbit (sliceOf s start (prim subtract e start : Nat)))
| Option.none => (ctor Option.none [Request])
| Option.some v3 => (if (e <? (Foundation.Bytes::byteLength s)) then (decodeField4 s (e + 1) v1 v2 v3) else (ctor Option.none [Request])))),
axioms: [Quot.sound, propext]
}
definition{
name: decodeField2,
parameters: [s : Bytes, start : Nat, v1 : Nat],
result: (Option Request),
body: (let e : Nat := (fieldEnd s start (Foundation.Bytes::byteLength s)); (match (parseEvent (sliceOf s start (prim subtract e start : Nat)))
| Option.none => (ctor Option.none [Request])
| Option.some v2 => (if (e <? (Foundation.Bytes::byteLength s)) then (decodeField3 s (e + 1) v1 v2) else (ctor Option.none [Request])))),
axioms: [Quot.sound, propext]
}
definition{
name: decodeField1,
parameters: [s : Bytes, start : Nat],
result: (Option Request),
body: (let e : Nat := (fieldEnd s start (Foundation.Bytes::byteLength s)); (match (parseState (sliceOf s start (prim subtract e start : Nat)))
| Option.none => (ctor Option.none [Request])
| Option.some v1 => (if (e <? (Foundation.Bytes::byteLength s)) then (decodeField2 s (e + 1) v1) else (ctor Option.none [Request])))),
axioms: [Quot.sound, propext]
}
definition{
name: rule1,
parameters: [request : Request],
result: Bool,
body: ((((project request state) =? (stateWalking)) && ((project request event) =? (eventFinish))) && ((project request lands) =? (landsA0)))
}
definition{
name: rule2,
parameters: [request : Request],
result: Bool,
body: (((project request state) =? (stateWalking)) && ((project request event) =? (eventFinish)))
}
definition{
name: rule3,
parameters: [request : Request],
result: Bool,
body: ((project request state) =? (stateWalking))
}
definition{
name: rule4,
parameters: [request : Request],
result: Bool,
body: (((project request state) =? (stateReturning)) && ((project request event) =? (eventFinish)))
}
definition{
name: rule5,
parameters: [request : Request],
result: Bool,
body: ((project request state) =? (stateReturning))
}
definition{
name: rule6,
parameters: [request : Request],
result: Bool,
body: ((project request event) =? (eventWalk))
}
definition{
name: rule7,
parameters: [request : Request],
result: Bool,
body: ((project request event) =? (eventReset))
}
definition{
name: rule8,
parameters: [request : Request],
result: Bool,
body: (((project request event) =? (eventReflect)) && ((project request lands) =? (landsA0)))
}
definition{
name: rule9,
parameters: [request : Request],
result: Bool,
body: ((project request event) =? (eventReflect))
}
definition{
name: rule10,
parameters: [request : Request],
result: Bool,
body: ((((project request state) =? (stateAway)) && ((project request event) =? (eventWalkHome))) && ((project request orbit) =? (orbitMapped)))
}
definition{
name: rule11,
parameters: [request : Request],
result: Bool,
body: ((project request state) =? (stateAway))
}
definition{
name: stepHome,
parameters: [request : Request],
result: Nat,
body: (if (rule6 request) then (answerWalking) else (if (rule7 request) then (answerHome) else (if (rule8 request) then (answerHome) else (if (rule9 request) then (answerAway) else (answerHome)))))
}
definition{
name: stepAway,
parameters: [request : Request],
result: Nat,
body: (if (rule6 request) then (answerWalking) else (if (rule7 request) then (answerHome) else (if (rule8 request) then (answerHome) else (if (rule9 request) then (answerAway) else (if (rule10 request) then (answerReturning) else (if (rule11 request) then (answerAway) else (answerHome)))))))
}
definition{
name: stepWalking,
parameters: [request : Request],
result: Nat,
body: (if (rule1 request) then (answerHome) else (if (rule2 request) then (answerAway) else (if (rule3 request) then (answerWalking) else (if (rule6 request) then (answerWalking) else (if (rule7 request) then (answerHome) else (if (rule8 request) then (answerHome) else (if (rule9 request) then (answerAway) else (answerHome))))))))
}
definition{
name: stepReturning,
parameters: [request : Request],
result: Nat,
body: (if (rule4 request) then (answerHome) else (if (rule5 request) then (answerReturning) else (if (rule6 request) then (answerWalking) else (if (rule7 request) then (answerHome) else (if (rule8 request) then (answerHome) else (if (rule9 request) then (answerAway) else (answerHome)))))))
}
definition{
name: judge,
parameters: [request : Request],
result: Nat,
body: (if ((project request state) =? (stateHome)) then (stepHome request) else (if ((project request state) =? (stateAway)) then (stepAway request) else (if ((project request state) =? (stateWalking)) then (stepWalking request) else (if ((project request state) =? (stateReturning)) then (stepReturning request) else (if (rule6 request) then (answerWalking) else (if (rule7 request) then (answerHome) else (if (rule8 request) then (answerHome) else (if (rule9 request) then (answerAway) else (answerHome)))))))))
}
definition{
name: encodeAnswer,
parameters: [code : Nat],
result: Bytes,
body: (if (code =? (answerHome)) then 0x686f6d65 else (if (code =? (answerAway)) then 0x61776179 else (if (code =? (answerWalking)) then 0x77616c6b696e67 else (if (code =? (answerReturning)) then 0x72657475726e696e67 else 0x696e76616c6964))))
}
definition{
name: dispatch,
parameters: [value : Bytes],
result: Bytes,
body: (if (112 <? (Foundation.Bytes::byteLength value)) then 0x696e76616c6964 else (match (decodeField1 value 0)
| Option.none => 0x696e76616c6964
| Option.some request => (encodeAnswer (judge request)))),
axioms: [Quot.sound, propext]
}
definition{
name: application,
parameters: [],
result: Foundation.View.Text.V1.Model::TextApplication,
body: (record Foundation.View.Text.V1.Model::TextApplication {profile := "prismpm/text-application/1", name := "Atlas walk controls", cargoName := "prism-atlas-explorer-walk", cargoVersion := "0.1.0", cargoDescription := "Decide where the Atlas instance stands after a Dynamics control event: at A0, away from it, in a random walk, or walking home.", cargoRepository := "https://github.com/UOR-Foundation/PrismPM", cargoHomepage := "https://github.com/UOR-Foundation/PrismPM", libraryRoots := (cons "PrismAtlasExplorerWalk.AtlasExplorerWalk.dispatch" (nil String)), acceptanceVectors := (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d652077616c6b206d617070696e67206f74686572, response := 0x77616c6b696e67}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x77616c6b696e672066696e697368206d6170706564206f74686572, response := 0x61776179}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x617761792077616c6b2d686f6d65206d6170706564206130, response := 0x72657475726e696e67}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x72657475726e696e672066696e697368206d6170706564206130, response := 0x686f6d65}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x617761792077616c6b2d686f6d65206d617070696e67206f74686572, response := 0x61776179}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x77616c6b696e67207265736574206d6170706564206130, response := 0x77616c6b696e67}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d65207265666c656374206d617070696e67206f74686572, response := 0x61776179}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d65207265666c656374206d617070696e67206130, response := 0x686f6d65}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d65207265666c656374206d6170706564206130, response := 0x686f6d65}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d65207265666c656374206d6170706564206f74686572, response := 0x61776179}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d652077616c6b206d617070696e67206130, response := 0x77616c6b696e67}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d652077616c6b206d6170706564206130, response := 0x77616c6b696e67}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d652077616c6b206d6170706564206f74686572, response := 0x77616c6b696e67}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d652077616c6b2d686f6d65206d617070696e67206130, response := 0x686f6d65}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d652077616c6b2d686f6d65206d617070696e67206f74686572, response := 0x686f6d65}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d652077616c6b2d686f6d65206d6170706564206130, response := 0x686f6d65}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d652077616c6b2d686f6d65206d6170706564206f74686572, response := 0x686f6d65}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d65207265736574206d617070696e67206130, response := 0x686f6d65}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d65207265736574206d617070696e67206f74686572, response := 0x686f6d65}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d65207265736574206d6170706564206130, response := 0x686f6d65}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d65207265736574206d6170706564206f74686572, response := 0x686f6d65}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d652066696e697368206d617070696e67206130, response := 0x686f6d65}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d652066696e697368206d617070696e67206f74686572, response := 0x686f6d65}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d652066696e697368206d6170706564206130, response := 0x686f6d65}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d652066696e697368206d6170706564206f74686572, response := 0x686f6d65}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x61776179207265666c656374206d617070696e67206130, response := 0x686f6d65}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x61776179207265666c656374206d617070696e67206f74686572, response := 0x61776179}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x61776179207265666c656374206d6170706564206130, response := 0x686f6d65}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x61776179207265666c656374206d6170706564206f74686572, response := 0x61776179}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x, response := 0x696e76616c6964}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0xff, response := 0x696e76616c6964}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d65207265666c656374206d617070696e67, response := 0x696e76616c6964}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d65207265666c656374206d617070696e67206130206130, response := 0x696e76616c6964}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d6520207265666c65637420206d617070696e6720206130, response := 0x696e76616c6964}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x756e6b6e6f776e207265666c656374206d617070696e67206130, response := 0x696e76616c6964}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d6520756e6b6e6f776e206d617070696e67206130, response := 0x696e76616c6964}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d65207265666c65637420756e6b6e6f776e206130, response := 0x696e76616c6964}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x686f6d65207265666c656374206d617070696e6720756e6b6e6f776e, response := 0x696e76616c6964}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878, response := 0x696e76616c6964}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x7878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878, response := 0x696e76616c6964}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x7878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878, response := 0x696e76616c6964}) (nil Foundation.View.Text.V1.Model::AcceptanceVector)))))))))))))))))))))))))))))))))))))))))), entryRoot := "PrismAtlasExplorerWalk.AtlasExplorerWalk.dispatch", coreContract := "hologram:guest/core-wasm@1", requestMaximum := (112 : UInt32), responseMaximum := (64 : UInt32), guestAllocationMaximum := (224 : UInt32), capabilitiesEmpty := true, fatArchive := true, primaryLayer := (0 : UInt8), viewLayer := (1 : UInt8), view := (record Foundation.View.Text.V1.Model::TextView {title := "Atlas walk controls", heading := "Atlas walk controls", inputLabel := "Request: state event orbit lands", submitLabel := "Decide", outputLabel := "Answer", inputError := "Invalid request", responseError := "Invalid response"})})
}
\end{semanticmodule}
\end{lexlean}
app/src/AtlasExplorerWalkProofs.lex.tex 269 lines
\begin{lexlean}{AtlasExplorerWalkProofs}
\useglossary{lexlean.std.bool@1.2.0}
\useglossary{lexlean.std.nat@1.2.0}
\useglossary{prism.arch@1.0.0}
\importmodule{AtlasExplorerWalk}
\title{Text application model}
\begin{semanticmodule}
definition{
name: breaksInv001,
parameters: [request : AtlasExplorerWalk::Request],
result: Bool,
body: (((((((project request state) <? 4) && ((project request event) <? 5)) && ((project request orbit) <? 2)) && ((project request lands) <? 2)) && ((project request state) =? (AtlasExplorerWalk::stateHome))) && ((AtlasExplorerWalk::judge request) =? (AtlasExplorerWalk::answerReturning)))
}
theorem{
name: inv001Holds,
parameters: [request : AtlasExplorerWalk::Request],
statement: ((breaksInv001 request) = false),
proof: linear_arithmetic{
definitions: [
AtlasExplorerWalk::answerAway,
AtlasExplorerWalk::answerHome,
AtlasExplorerWalk::answerReturning,
AtlasExplorerWalk::answerWalking,
AtlasExplorerWalk::eventFinish,
AtlasExplorerWalk::eventReflect,
AtlasExplorerWalk::eventReset,
AtlasExplorerWalk::eventWalk,
AtlasExplorerWalk::eventWalkHome,
AtlasExplorerWalk::judge,
AtlasExplorerWalk::landsA0,
AtlasExplorerWalk::landsOther,
AtlasExplorerWalk::orbitMapped,
AtlasExplorerWalk::orbitMapping,
AtlasExplorerWalk::rule1,
AtlasExplorerWalk::rule10,
AtlasExplorerWalk::rule11,
AtlasExplorerWalk::rule2,
AtlasExplorerWalk::rule3,
AtlasExplorerWalk::rule4,
AtlasExplorerWalk::rule5,
AtlasExplorerWalk::rule6,
AtlasExplorerWalk::rule7,
AtlasExplorerWalk::rule8,
AtlasExplorerWalk::rule9,
AtlasExplorerWalk::stateAway,
AtlasExplorerWalk::stateHome,
AtlasExplorerWalk::stateReturning,
AtlasExplorerWalk::stateWalking,
AtlasExplorerWalk::stepAway,
AtlasExplorerWalk::stepHome,
AtlasExplorerWalk::stepReturning,
AtlasExplorerWalk::stepWalking,
breaksInv001
]
},
axioms: [Quot.sound, propext]
}
definition{
name: breaksInv002,
parameters: [request : AtlasExplorerWalk::Request],
result: Bool,
body: ((((((((project request state) <? 4) && ((project request event) <? 5)) && ((project request orbit) <? 2)) && ((project request lands) <? 2)) && ((project request state) =? (AtlasExplorerWalk::stateAway))) && ((project request orbit) =? (AtlasExplorerWalk::orbitMapping))) && ((AtlasExplorerWalk::judge request) =? (AtlasExplorerWalk::answerReturning)))
}
theorem{
name: inv002Holds,
parameters: [request : AtlasExplorerWalk::Request],
statement: ((breaksInv002 request) = false),
proof: linear_arithmetic{
definitions: [
AtlasExplorerWalk::answerAway,
AtlasExplorerWalk::answerHome,
AtlasExplorerWalk::answerReturning,
AtlasExplorerWalk::answerWalking,
AtlasExplorerWalk::eventFinish,
AtlasExplorerWalk::eventReflect,
AtlasExplorerWalk::eventReset,
AtlasExplorerWalk::eventWalk,
AtlasExplorerWalk::eventWalkHome,
AtlasExplorerWalk::judge,
AtlasExplorerWalk::landsA0,
AtlasExplorerWalk::landsOther,
AtlasExplorerWalk::orbitMapped,
AtlasExplorerWalk::orbitMapping,
AtlasExplorerWalk::rule1,
AtlasExplorerWalk::rule10,
AtlasExplorerWalk::rule11,
AtlasExplorerWalk::rule2,
AtlasExplorerWalk::rule3,
AtlasExplorerWalk::rule4,
AtlasExplorerWalk::rule5,
AtlasExplorerWalk::rule6,
AtlasExplorerWalk::rule7,
AtlasExplorerWalk::rule8,
AtlasExplorerWalk::rule9,
AtlasExplorerWalk::stateAway,
AtlasExplorerWalk::stateHome,
AtlasExplorerWalk::stateReturning,
AtlasExplorerWalk::stateWalking,
AtlasExplorerWalk::stepAway,
AtlasExplorerWalk::stepHome,
AtlasExplorerWalk::stepReturning,
AtlasExplorerWalk::stepWalking,
breaksInv002
]
},
axioms: [Quot.sound, propext]
}
definition{
name: breaksInv003,
parameters: [request : AtlasExplorerWalk::Request],
result: Bool,
body: ((((((((project request state) <? 4) && ((project request event) <? 5)) && ((project request orbit) <? 2)) && ((project request lands) <? 2)) && ((project request state) =? (AtlasExplorerWalk::stateWalking))) && ((project request event) =? (AtlasExplorerWalk::eventReflect))) && (not ((AtlasExplorerWalk::judge request) =? (AtlasExplorerWalk::answerWalking))))
}
theorem{
name: inv003Holds,
parameters: [request : AtlasExplorerWalk::Request],
statement: ((breaksInv003 request) = false),
proof: linear_arithmetic{
definitions: [
AtlasExplorerWalk::answerAway,
AtlasExplorerWalk::answerHome,
AtlasExplorerWalk::answerReturning,
AtlasExplorerWalk::answerWalking,
AtlasExplorerWalk::eventFinish,
AtlasExplorerWalk::eventReflect,
AtlasExplorerWalk::eventReset,
AtlasExplorerWalk::eventWalk,
AtlasExplorerWalk::eventWalkHome,
AtlasExplorerWalk::judge,
AtlasExplorerWalk::landsA0,
AtlasExplorerWalk::landsOther,
AtlasExplorerWalk::orbitMapped,
AtlasExplorerWalk::orbitMapping,
AtlasExplorerWalk::rule1,
AtlasExplorerWalk::rule10,
AtlasExplorerWalk::rule11,
AtlasExplorerWalk::rule2,
AtlasExplorerWalk::rule3,
AtlasExplorerWalk::rule4,
AtlasExplorerWalk::rule5,
AtlasExplorerWalk::rule6,
AtlasExplorerWalk::rule7,
AtlasExplorerWalk::rule8,
AtlasExplorerWalk::rule9,
AtlasExplorerWalk::stateAway,
AtlasExplorerWalk::stateHome,
AtlasExplorerWalk::stateReturning,
AtlasExplorerWalk::stateWalking,
AtlasExplorerWalk::stepAway,
AtlasExplorerWalk::stepHome,
AtlasExplorerWalk::stepReturning,
AtlasExplorerWalk::stepWalking,
breaksInv003
]
},
axioms: [Classical.choice, Quot.sound, propext]
}
definition{
name: breaksInv004,
parameters: [request : AtlasExplorerWalk::Request],
result: Bool,
body: (((((((((project request state) <? 4) && ((project request event) <? 5)) && ((project request orbit) <? 2)) && ((project request lands) <? 2)) && ((project request event) =? (AtlasExplorerWalk::eventReset))) && (not ((project request state) =? (AtlasExplorerWalk::stateWalking)))) && (not ((project request state) =? (AtlasExplorerWalk::stateReturning)))) && (not ((AtlasExplorerWalk::judge request) =? (AtlasExplorerWalk::answerHome))))
}
theorem{
name: inv004Holds,
parameters: [request : AtlasExplorerWalk::Request],
statement: ((breaksInv004 request) = false),
proof: linear_arithmetic{
definitions: [
AtlasExplorerWalk::answerAway,
AtlasExplorerWalk::answerHome,
AtlasExplorerWalk::answerReturning,
AtlasExplorerWalk::answerWalking,
AtlasExplorerWalk::eventFinish,
AtlasExplorerWalk::eventReflect,
AtlasExplorerWalk::eventReset,
AtlasExplorerWalk::eventWalk,
AtlasExplorerWalk::eventWalkHome,
AtlasExplorerWalk::judge,
AtlasExplorerWalk::landsA0,
AtlasExplorerWalk::landsOther,
AtlasExplorerWalk::orbitMapped,
AtlasExplorerWalk::orbitMapping,
AtlasExplorerWalk::rule1,
AtlasExplorerWalk::rule10,
AtlasExplorerWalk::rule11,
AtlasExplorerWalk::rule2,
AtlasExplorerWalk::rule3,
AtlasExplorerWalk::rule4,
AtlasExplorerWalk::rule5,
AtlasExplorerWalk::rule6,
AtlasExplorerWalk::rule7,
AtlasExplorerWalk::rule8,
AtlasExplorerWalk::rule9,
AtlasExplorerWalk::stateAway,
AtlasExplorerWalk::stateHome,
AtlasExplorerWalk::stateReturning,
AtlasExplorerWalk::stateWalking,
AtlasExplorerWalk::stepAway,
AtlasExplorerWalk::stepHome,
AtlasExplorerWalk::stepReturning,
AtlasExplorerWalk::stepWalking,
breaksInv004
]
},
axioms: [Classical.choice, Quot.sound, propext]
}
definition{
name: breaksInv005,
parameters: [request : AtlasExplorerWalk::Request],
result: Bool,
body: ((((((((project request state) <? 4) && ((project request event) <? 5)) && ((project request orbit) <? 2)) && ((project request lands) <? 2)) && ((project request state) =? (AtlasExplorerWalk::stateReturning))) && ((project request event) =? (AtlasExplorerWalk::eventFinish))) && ((AtlasExplorerWalk::judge request) =? (AtlasExplorerWalk::answerAway)))
}
theorem{
name: inv005Holds,
parameters: [request : AtlasExplorerWalk::Request],
statement: ((breaksInv005 request) = false),
proof: linear_arithmetic{
definitions: [
AtlasExplorerWalk::answerAway,
AtlasExplorerWalk::answerHome,
AtlasExplorerWalk::answerReturning,
AtlasExplorerWalk::answerWalking,
AtlasExplorerWalk::eventFinish,
AtlasExplorerWalk::eventReflect,
AtlasExplorerWalk::eventReset,
AtlasExplorerWalk::eventWalk,
AtlasExplorerWalk::eventWalkHome,
AtlasExplorerWalk::judge,
AtlasExplorerWalk::landsA0,
AtlasExplorerWalk::landsOther,
AtlasExplorerWalk::orbitMapped,
AtlasExplorerWalk::orbitMapping,
AtlasExplorerWalk::rule1,
AtlasExplorerWalk::rule10,
AtlasExplorerWalk::rule11,
AtlasExplorerWalk::rule2,
AtlasExplorerWalk::rule3,
AtlasExplorerWalk::rule4,
AtlasExplorerWalk::rule5,
AtlasExplorerWalk::rule6,
AtlasExplorerWalk::rule7,
AtlasExplorerWalk::rule8,
AtlasExplorerWalk::rule9,
AtlasExplorerWalk::stateAway,
AtlasExplorerWalk::stateHome,
AtlasExplorerWalk::stateReturning,
AtlasExplorerWalk::stateWalking,
AtlasExplorerWalk::stepAway,
AtlasExplorerWalk::stepHome,
AtlasExplorerWalk::stepReturning,
AtlasExplorerWalk::stepWalking,
breaksInv005
]
},
axioms: [Quot.sound, propext]
}
\end{semanticmodule}
\end{lexlean}
app/lexlean.toml 43 lines
spec = "lexlean/project/1"
name = "prism-atlas-explorer-walk"
language = "1.2"
module_prefix = "PrismAtlasExplorerWalk"
source_roots = ["src"]
entrypoints = ["src/Architecture.lex.tex", "src/AtlasExplorerWalk.lex.tex", "src/AtlasExplorerWalkProofs.lex.tex", "src/Compliance.lex.tex", "src/Design.lex.tex", "src/Features.lex.tex", "src/Quality.lex.tex", "src/Security.lex.tex"]
build_root = ".lexlean"
lockfile = "lexlean.lock"
lean_workspace = "."
lean_toolchain = "leanprover/lean4:v4.32.1"
[[lexicon_source]]
package = "lexlean.std.nat"
kind = "builtin"
[[lexicon_source]]
package = "prism.arch"
kind = "path"
path = "language/prism.arch"
[[lexicon_source]]
package = "prism.qual"
kind = "path"
path = "language/prism.qual"
[[lexicon_source]]
package = "prism.sec"
kind = "path"
path = "language/prism.sec"
[limits]
max_file_bytes = 4194304
max_total_source_bytes = 67108864
max_primitive_atoms = 2000000
max_token_lattice_edges = 4000000
max_parse_states = 4000000
max_ir_nodes = 2000000
max_scope_depth = 1024
max_import_depth = 128
max_diagnostics = 256
max_child_output_bytes = 16777216
child_timeout_ms = 300000
app/prompt.json 481 lines
{
"schema": "prism/prompt/1",
"goal": "Find the next state of the Atlas Explorer view from the button pressed. Then each walk through the E8 orbit can be replayed step by step.",
"pattern": "stateMachine",
"machine": {
"state": "state",
"initial": "home",
"final": []
},
"repository": "afflom/atlas-explorer",
"app": {
"name": "atlas-explorer-walk",
"title": "Atlas walk controls",
"purpose": "Decide where the Atlas instance stands after a Dynamics control event: at A0, away from it, in a random walk, or walking home.",
"fields": [
{
"name": "state",
"kind": "choice",
"values": [
"home",
"away",
"walking",
"returning"
],
"means": "where the instance stands now: A0, another instance, a running random walk, or a running walk home"
},
{
"name": "event",
"kind": "choice",
"values": [
"reflect",
"walk",
"walk-home",
"reset",
"finish"
],
"means": "the control used, or the end of a running word"
},
{
"name": "orbit",
"kind": "choice",
"values": [
"mapping",
"mapped"
],
"means": "whether the census of all 75,600 instances has finished"
},
{
"name": "lands",
"kind": "choice",
"values": [
"a0",
"other"
],
"means": "whether the instance the event ends on is A0"
}
],
"outcomes": [
"home",
"away",
"walking",
"returning"
],
"meanings": {
"home": "the instance is A0, the canonical 48 classes",
"away": "the instance is another of the 75,600 in the orbit",
"walking": "a random word of 12 simple reflections is running and the controls are disabled",
"returning": "the path back to A0 from the orbit map is running and the controls are disabled"
},
"rules": [
{
"when": [
{
"field": "state",
"op": "is",
"value": "walking"
},
{
"field": "event",
"op": "is",
"value": "finish"
},
{
"field": "lands",
"op": "is",
"value": "a0"
}
],
"then": "home",
"why": "index.html runWord done: the walk ends at A0 when live.isA0"
},
{
"when": [
{
"field": "state",
"op": "is",
"value": "walking"
},
{
"field": "event",
"op": "is",
"value": "finish"
}
],
"then": "away",
"why": "index.html runWord done: the walk ends at another instance"
},
{
"when": [
{
"field": "state",
"op": "is",
"value": "walking"
}
],
"then": "walking",
"why": "index.html setBusy: walk, reset and the simple reflection buttons are disabled while busy"
},
{
"when": [
{
"field": "state",
"op": "is",
"value": "returning"
},
{
"field": "event",
"op": "is",
"value": "finish"
}
],
"then": "home",
"why": "index.html homeBtn: the pathToRoot word ends with the 48 classes A0 again"
},
{
"when": [
{
"field": "state",
"op": "is",
"value": "returning"
}
],
"then": "returning",
"why": "index.html setBusy: the controls stay disabled while the walk home runs"
},
{
"when": [
{
"field": "event",
"op": "is",
"value": "walk"
}
],
"then": "walking",
"why": "index.html walkBtn: runWord with 12 random simple reflections"
},
{
"when": [
{
"field": "event",
"op": "is",
"value": "reset"
}
],
"then": "home",
"why": "index.html resetBtn: loc is restored to the identity, which is A0"
},
{
"when": [
{
"field": "event",
"op": "is",
"value": "reflect"
},
{
"field": "lands",
"op": "is",
"value": "a0"
}
],
"then": "home",
"why": "index.html applyReflection: a reflection can carry the 48 classes back onto A0"
},
{
"when": [
{
"field": "event",
"op": "is",
"value": "reflect"
}
],
"then": "away",
"why": "index.html applyReflection: a simple reflection carries the Atlas to another instance"
},
{
"when": [
{
"field": "state",
"op": "is",
"value": "away"
},
{
"field": "event",
"op": "is",
"value": "walk-home"
},
{
"field": "orbit",
"op": "is",
"value": "mapped"
}
],
"then": "returning",
"why": "index.html: homeBtn is enabled only when orbit.done and the instance is not A0"
},
{
"when": [
{
"field": "state",
"op": "is",
"value": "away"
}
],
"then": "away",
"why": "index.html: walk home is disabled until the orbit is mapped, and finish does nothing when no word runs"
}
],
"otherwise": "home",
"otherwiseWhy": "at A0, walk home is disabled and finish does nothing, so the instance stays home",
"properties": [
{
"kind": "never",
"when": [
{
"field": "state",
"op": "is",
"value": "home"
}
],
"then": "returning",
"why": "index.html: homeBtn is disabled when live.isA0"
},
{
"kind": "never",
"when": [
{
"field": "state",
"op": "is",
"value": "away"
},
{
"field": "orbit",
"op": "is",
"value": "mapping"
}
],
"then": "returning",
"why": "index.html: walk home needs the orbit map to find the path to A0"
},
{
"kind": "always",
"when": [
{
"field": "state",
"op": "is",
"value": "walking"
},
{
"field": "event",
"op": "is",
"value": "reflect"
}
],
"then": "walking",
"why": "index.html setBusy: reflections are disabled during a walk"
},
{
"kind": "always",
"when": [
{
"field": "event",
"op": "is",
"value": "reset"
},
{
"field": "state",
"op": "is not",
"value": "walking"
},
{
"field": "state",
"op": "is not",
"value": "returning"
}
],
"then": "home",
"why": "reset always restores A0 when it is enabled"
},
{
"kind": "never",
"when": [
{
"field": "state",
"op": "is",
"value": "returning"
},
{
"field": "event",
"op": "is",
"value": "finish"
}
],
"then": "away",
"why": "the walk home always ends at A0"
}
],
"examples": [
{
"request": "home walk mapping other",
"response": "walking"
},
{
"request": "walking finish mapped other",
"response": "away"
},
{
"request": "away walk-home mapped a0",
"response": "returning"
},
{
"request": "returning finish mapped a0",
"response": "home"
},
{
"request": "away walk-home mapping other",
"response": "away"
},
{
"request": "walking reset mapped a0",
"response": "walking"
},
{
"request": "home reflect mapping other",
"response": "away"
}
]
},
"stakeholders": [
{
"name": "Visitor",
"text": "Explores the E8 reflection orbit of the Atlas and needs every control to do what it says, and nothing while a walk runs.",
"concerns": [
"Correct answers"
]
},
{
"name": "Mathematician",
"text": "Checks that the walk home always returns the 48 classes to A0 and that block reorderings are gauge transformations.",
"concerns": [
"Proved guarantees"
]
}
],
"components": [
{
"name": "UOR Atlas Explorer page",
"text": "The single-page explorer on GitHub Pages that draws the 120 classes and runs the reflection walks.",
"kind": "staticSite"
}
],
"threats": [
{
"name": "Walk home without a map",
"text": "Walk home is pressed before the orbit census finishes, so there is no path to A0.",
"stride": "denialOfService",
"asset": "answer",
"likelihood": "low",
"impact": "minor",
"control": {
"name": "Map before home",
"text": "Walk home leaves away only once the orbit is mapped.",
"evidence": [
{
"kind": "proof",
"reference": "AtlasExplorerWalkProofs::inv002Holds"
},
{
"kind": "review",
"reference": "index.html setBusy"
}
]
}
},
{
"name": "Overlapping words",
"text": "A control starts a second reflection word while one runs, so the instance shown is not the one the word reaches.",
"stride": "tampering",
"asset": "answer",
"likelihood": "medium",
"impact": "minor",
"control": {
"name": "Busy lock",
"text": "While a word runs, every control leaves the state as it is.",
"evidence": [
{
"kind": "proof",
"reference": "AtlasExplorerWalkProofs::inv003Holds"
},
{
"kind": "review",
"reference": "index.html runWord"
}
]
}
},
{
"name": "Plane click during a walk",
"text": "A click on the plane in Dynamics mode applies a reflection without checking busy.",
"stride": "tampering",
"asset": "answer",
"likelihood": "low",
"impact": "minor",
"accepted": "The machine models the Dynamics buttons that setBusy disables; the plane click handler in index.html is not gated by busy and is outside this model."
}
],
"quality": [
{
"characteristic": "Interaction capability",
"subcharacteristic": "User error protection",
"requirement": "Disabled controls stay disabled",
"text": "No button press changes the state while a walk or a walk home runs.",
"measure": "Button transitions during a word",
"measureText": "Requests in walking or returning, other than finish, that answer a different state.",
"threshold": 0
},
{
"characteristic": "Functional suitability",
"subcharacteristic": "Functional completeness",
"requirement": "Every state reachable",
"text": "Each of the four states is reachable from home.",
"measure": "Unreachable states",
"measureText": "States no sequence of events reaches from the initial state.",
"threshold": 0
}
],
"journeys": [
{
"stakeholder": "Visitor",
"steps": [
"REQ-006",
"REQ-003",
"REQ-002",
"REQ-007"
]
},
{
"stakeholder": "Mathematician",
"steps": [
"REQ-009",
"REQ-010",
"REQ-004",
"INV-005"
]
}
],
"axioms": {
"inv003Holds": [
"Classical.choice",
"Quot.sound",
"propext"
],
"inv004Holds": [
"Classical.choice",
"Quot.sound",
"propext"
]
},
"concerns": [],
"license": "MIT OR Apache-2.0"
}
model/ids.toml 71 lines
# model/ids.toml --- the conformance ID register.
#
# Every ID this repository claims, in one place, so that nothing is referenced
# without being defined. `CONFORMANCE.md` is generated from this file. A test
# whose name ends in an ID not listed here fails `check-model`, and an ID listed
# here with no scenario and no test fails it too (CM-02).
#
# `level` is the honesty level (R2):
# some-true a fact reproduced from an authority; not established here
# build constructed here and validated against its oracle
# open measured and reported, never asserted
#
# Every row here has a scenario in `features/suites/` and a test whose name ends
# in the ID, lowercased with underscores (R3, CM-02). There is no "pending"
# state: a capability that is not built does not get a row, and every row in this
# file is built.
#
# The first row is the template's own Prism application in `app/` (TC-01).
# A capability starts with a row here; `just new-capability` writes the row,
# its scenario and its failing test in the order `AGENTS.md` sets out.
spec = "template/1"
[[id]]
id = "AE-01"
level = "build"
suite = "atlas_explorer_walk"
statement = "The app never answers returning when state is home"
[[id]]
id = "AE-02"
level = "build"
suite = "atlas_explorer_walk"
statement = "The app never answers returning when state is away and orbit is mapping"
[[id]]
id = "AE-03"
level = "build"
suite = "atlas_explorer_walk"
statement = "The app always answers walking when state is walking and event is reflect"
[[id]]
id = "AE-04"
level = "build"
suite = "atlas_explorer_walk"
statement = "The app always answers home when event is reset and state is not walking and state is not returning"
[[id]]
id = "AE-05"
level = "build"
suite = "atlas_explorer_walk"
statement = "The app never answers away when state is returning and event is finish"
[[id]]
id = "AE-06"
level = "build"
suite = "atlas_explorer_walk"
statement = "The architecture description declares every stakeholder, concern, component, edge, viewpoint and view it references"
[[id]]
id = "AE-07"
level = "build"
suite = "atlas_explorer_walk"
statement = "The ISO/IEC 25010 quality model numbers every characteristic, subcharacteristic, requirement and measure, and every parent it names is declared"
[[id]]
id = "AE-08"
level = "build"
suite = "atlas_explorer_walk"
statement = "Every compliance obligation is numbered in order and names its evidence"
features/suites/atlas_explorer_walk.feature 50 lines
Feature: atlas_explorer_walk
This repository's Prism application, in app/, generated by prism-code from its
spec: Decide where the Atlas instance stands after a Dynamics control event: at A0, away from it, in a random walk, or walking home.
@AE-01 @build
Scenario: The app never answers returning when state is home
Given the model in app/src/AtlasExplorerWalk.lex.tex
When the Lean kernel checks inv001Holds during prismpm verify
Then no request meets breaksInv001
@AE-02 @build
Scenario: The app never answers returning when state is away and orbit is mapping
Given the model in app/src/AtlasExplorerWalk.lex.tex
When the Lean kernel checks inv002Holds during prismpm verify
Then no request meets breaksInv002
@AE-03 @build
Scenario: The app always answers walking when state is walking and event is reflect
Given the model in app/src/AtlasExplorerWalk.lex.tex
When the Lean kernel checks inv003Holds during prismpm verify
Then no request meets breaksInv003
@AE-04 @build
Scenario: The app always answers home when event is reset and state is not walking and state is not returning
Given the model in app/src/AtlasExplorerWalk.lex.tex
When the Lean kernel checks inv004Holds during prismpm verify
Then no request meets breaksInv004
@AE-05 @build
Scenario: The app never answers away when state is returning and event is finish
Given the model in app/src/AtlasExplorerWalk.lex.tex
When the Lean kernel checks inv005Holds during prismpm verify
Then no request meets breaksInv005
@AE-06 @build
Scenario: The architecture description declares every stakeholder, concern, component, edge, viewpoint and view it references
Given the model in app/src/Architecture.lex.tex
When the Lean kernel checks architectureDescriptionHolds during prismpm verify
Then the architecture description declares every stakeholder, concern, component, edge, viewpoint and view it references
@AE-07 @build
Scenario: The ISO/IEC 25010 quality model numbers every characteristic, subcharacteristic, requirement and measure, and every parent it names is declared
Given the model in app/src/Quality.lex.tex
When the Lean kernel checks qualityModelHolds during prismpm verify
Then the ISO/IEC 25010 quality model numbers every characteristic, subcharacteristic, requirement and measure, and every parent it names is declared
@AE-08 @build
Scenario: Every compliance obligation is numbered in order and names its evidence
Given the model in app/src/Compliance.lex.tex
When the Lean kernel checks everyObligationEvidenced during prismpm verify
Then every compliance obligation is numbered in order and names its evidence
crates/conformance/tests/atlas_explorer_walk.rs 142 lines
//! The `atlas_explorer_walk` suite: one test per scenario in `features/suites/atlas_explorer_walk.feature`.
//!
//! Written by the Prism-DevRel builder from the app's prompt. The theorems are
//! checked by the Lean kernel when `just vv` runs `prismpm verify` on `app/`.
//! What these tests hold fixed is what each theorem is about, so a weakened
//! statement that still verifies fails the gate.
use std::path::PathBuf;
fn root() -> PathBuf {
PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.ancestors()
.nth(2)
.expect("crates/conformance is two below the root")
.to_path_buf()
}
/// The body of the top-level declaration named `name`, up to its closing brace.
fn declaration<'a>(model: &'a str, name: &str) -> &'a str {
let start = model
.find(&format!("\n name: {name},\n"))
.unwrap_or_else(|| panic!("{name} is not declared"));
let end = model[start..]
.find("\n}\n")
.unwrap_or_else(|| panic!("{name} is not closed"));
&model[start..start + end]
}
fn module(path: &str) -> String {
std::fs::read_to_string(root().join(path)).expect("the module")
}
/// The condition no request may meet, and the theorem that says none does.
fn pinned(breaks: &str, condition: &str, theorem: &str) {
let model = module("app/src/AtlasExplorerWalkProofs.lex.tex");
let found = declaration(&model, breaks);
assert!(
found.contains(condition),
"the condition of {breaks} changed:\n{found}"
);
let holds = declaration(&model, theorem);
let statement = format!("statement: (({breaks} request) = false),");
assert!(
holds.contains(&statement),
"{theorem} must state that no request meets {breaks}:\n{holds}"
);
}
/// A facet theorem: proved by `decide`, about exactly this predicate.
fn holds(path: &str, theorem: &str, statement: &str) {
let model = module(path);
let found = declaration(&model, theorem);
assert!(
found.contains(&format!("statement: {statement},")),
"{theorem} must state {statement}:\n{found}"
);
assert!(
found.contains("proof: decide{}"),
"{theorem} is proved by decide"
);
}
/// `AE-01`: The app never answers returning when state is home
#[test]
fn atlas_explorer_walk_ae_01() {
pinned(
"breaksInv001",
"body: (((((((project request state) <? 4) && ((project request event) <? 5)) && ((project request orbit) <? 2)) && ((project request lands) <? 2)) && ((project request state) =? (AtlasExplorerWalk::stateHome))) && ((AtlasExplorerWalk::judge request) =? (AtlasExplorerWalk::answerReturning)))",
"inv001Holds",
);
}
/// `AE-02`: The app never answers returning when state is away and orbit is mapping
#[test]
fn atlas_explorer_walk_ae_02() {
pinned(
"breaksInv002",
"body: ((((((((project request state) <? 4) && ((project request event) <? 5)) && ((project request orbit) <? 2)) && ((project request lands) <? 2)) && ((project request state) =? (AtlasExplorerWalk::stateAway))) && ((project request orbit) =? (AtlasExplorerWalk::orbitMapping))) && ((AtlasExplorerWalk::judge request) =? (AtlasExplorerWalk::answerReturning)))",
"inv002Holds",
);
}
/// `AE-03`: The app always answers walking when state is walking and event is reflect
#[test]
fn atlas_explorer_walk_ae_03() {
pinned(
"breaksInv003",
"body: ((((((((project request state) <? 4) && ((project request event) <? 5)) && ((project request orbit) <? 2)) && ((project request lands) <? 2)) && ((project request state) =? (AtlasExplorerWalk::stateWalking))) && ((project request event) =? (AtlasExplorerWalk::eventReflect))) && (not ((AtlasExplorerWalk::judge request) =? (AtlasExplorerWalk::answerWalking))))",
"inv003Holds",
);
}
/// `AE-04`: The app always answers home when event is reset and state is not walking and state is not returning
#[test]
fn atlas_explorer_walk_ae_04() {
pinned(
"breaksInv004",
"body: (((((((((project request state) <? 4) && ((project request event) <? 5)) && ((project request orbit) <? 2)) && ((project request lands) <? 2)) && ((project request event) =? (AtlasExplorerWalk::eventReset))) && (not ((project request state) =? (AtlasExplorerWalk::stateWalking)))) && (not ((project request state) =? (AtlasExplorerWalk::stateReturning)))) && (not ((AtlasExplorerWalk::judge request) =? (AtlasExplorerWalk::answerHome))))",
"inv004Holds",
);
}
/// `AE-05`: The app never answers away when state is returning and event is finish
#[test]
fn atlas_explorer_walk_ae_05() {
pinned(
"breaksInv005",
"body: ((((((((project request state) <? 4) && ((project request event) <? 5)) && ((project request orbit) <? 2)) && ((project request lands) <? 2)) && ((project request state) =? (AtlasExplorerWalk::stateReturning))) && ((project request event) =? (AtlasExplorerWalk::eventFinish))) && ((AtlasExplorerWalk::judge request) =? (AtlasExplorerWalk::answerAway)))",
"inv005Holds",
);
}
/// `AE-06`: The architecture description declares every stakeholder, concern, component, edge, viewpoint and view it references
#[test]
fn atlas_explorer_walk_ae_06() {
holds(
"app/src/Architecture.lex.tex",
"architectureDescriptionHolds",
"((architectureValid) = true)",
);
}
/// `AE-07`: The ISO/IEC 25010 quality model numbers every characteristic, subcharacteristic, requirement and measure, and every parent it names is declared
#[test]
fn atlas_explorer_walk_ae_07() {
holds(
"app/src/Quality.lex.tex",
"qualityModelHolds",
"((qualityValid) = true)",
);
}
/// `AE-08`: Every compliance obligation is numbered in order and names its evidence
#[test]
fn atlas_explorer_walk_ae_08() {
holds(
"app/src/Compliance.lex.tex",
"everyObligationEvidenced",
"((obligationsEvidenced 0 (obligations)) = true)",
);
}
site/app.json 125 lines
{
"name": "Atlas walk controls",
"shortName": "Atlas",
"live": "https://afflom.github.io/atlas-explorer/",
"purpose": "Decide where the Atlas instance stands after a Dynamics control event: at A0, away from it, in a random walk, or walking home. Send state, event, orbit or lands, separated by spaces; it answers home, away, walking or returning, and invalid request for anything else.",
"inputLabel": "Request: state event orbit lands",
"placeholder": "home walk mapping other",
"submitLabel": "Decide",
"outputLabel": "Answer",
"answers": {
"positive": [
"home"
],
"negative": [
"away",
"walking",
"returning"
],
"refusal": "invalid request"
},
"promise": {
"headline": "Says conformant exactly when every policy file matches its lock.",
"detail": "Each of the six universal policy files is compared with the digest the lock records, and any file that drifted is named."
},
"claim": "AE-01: the app never answers returning when state is home. AE-02: the app never answers returning when state is away and orbit is mapping. AE-03: the app always answers walking when state is walking and event is reflect. AE-04: the app always answers home when event is reset and state is not walking and state is not returning. AE-05: the app never answers away when state is returning and event is finish.",
"proposition": {
"name": "judge",
"text": "judge request :=\n state is walking and event is finish and lands is a0 → home\n state is walking and event is finish → away\n state is walking → walking\n state is returning and event is finish → home\n state is returning → returning\n event is walk → walking\n event is reset → home\n event is reflect and lands is a0 → home\n event is reflect → away\n state is away and event is walk-home and orbit is mapped → returning\n state is away → away\n otherwise → home",
"plain": "Decide where the Atlas instance stands after a Dynamics control event: at A0, away from it, in a random walk, or walking home."
},
"theorems": [
{
"name": "inv001Holds",
"statement": "no request meets breaksInv001: the app never answers returning when state is home",
"how": "Proved by linear arithmetic, checked by the Lean kernel on the UOR MCP server and again by prismpm verify in CI",
"where": "app/src/AtlasExplorerWalkProofs.lex.tex"
},
{
"name": "inv002Holds",
"statement": "no request meets breaksInv002: the app never answers returning when state is away and orbit is mapping",
"how": "Proved by linear arithmetic, checked by the Lean kernel on the UOR MCP server and again by prismpm verify in CI",
"where": "app/src/AtlasExplorerWalkProofs.lex.tex"
},
{
"name": "inv003Holds",
"statement": "no request meets breaksInv003: the app always answers walking when state is walking and event is reflect",
"how": "Proved by linear arithmetic, checked by the Lean kernel on the UOR MCP server and again by prismpm verify in CI",
"where": "app/src/AtlasExplorerWalkProofs.lex.tex"
},
{
"name": "inv004Holds",
"statement": "no request meets breaksInv004: the app always answers home when event is reset and state is not walking and state is not returning",
"how": "Proved by linear arithmetic, checked by the Lean kernel on the UOR MCP server and again by prismpm verify in CI",
"where": "app/src/AtlasExplorerWalkProofs.lex.tex"
},
{
"name": "inv005Holds",
"statement": "no request meets breaksInv005: the app never answers away when state is returning and event is finish",
"how": "Proved by linear arithmetic, checked by the Lean kernel on the UOR MCP server and again by prismpm verify in CI",
"where": "app/src/AtlasExplorerWalkProofs.lex.tex"
}
],
"pinned": [
{
"name": "atlas_explorer_walk_ae_01",
"what": "AE-01's condition and the theorem that no request meets it. A string-matching test, not a theorem: a planted defect fails it.",
"where": "crates/conformance/tests/atlas_explorer_walk.rs"
},
{
"name": "atlas_explorer_walk_ae_02",
"what": "AE-02's condition and the theorem that no request meets it. A string-matching test, not a theorem: a planted defect fails it.",
"where": "crates/conformance/tests/atlas_explorer_walk.rs"
},
{
"name": "atlas_explorer_walk_ae_03",
"what": "AE-03's condition and the theorem that no request meets it. A string-matching test, not a theorem: a planted defect fails it.",
"where": "crates/conformance/tests/atlas_explorer_walk.rs"
},
{
"name": "atlas_explorer_walk_ae_04",
"what": "AE-04's condition and the theorem that no request meets it. A string-matching test, not a theorem: a planted defect fails it.",
"where": "crates/conformance/tests/atlas_explorer_walk.rs"
},
{
"name": "atlas_explorer_walk_ae_05",
"what": "AE-05's condition and the theorem that no request meets it. A string-matching test, not a theorem: a planted defect fails it.",
"where": "crates/conformance/tests/atlas_explorer_walk.rs"
}
],
"trusted": [
{
"name": "SDK image",
"value": "the digest prismpm.lock pins; see the bootstrap workflow's log"
},
{
"name": "Lean toolchain",
"value": "leanprover/lean4:v4.32.1"
},
{
"name": "LexLean compiler semantics",
"value": "5262e5b4c8b5668ae7066ad686757a6bb7f80c941d515fb9d586894fbc7de69a"
},
{
"name": "prism-code runtime, vendored",
"value": "0.2.0, see try/vendor/prism-code/VENDOR.md"
},
{
"name": "Your browser",
"value": "runs the WebAssembly guest and this page"
}
],
"attestations": {
"proof": {
"id": "not recorded: the proof ran in the SDK image, not on the UOR MCP server",
"url": "https://github.com/afflom/atlas-explorer/actions/workflows/bootstrap.yml"
},
"build": {
"id": "printed by prismpm verify in every pages run",
"url": "https://github.com/afflom/atlas-explorer/actions/workflows/pages.yml"
}
},
"repository": "https://github.com/afflom/atlas-explorer",
"report": "https://github.com/afflom/atlas-explorer/blob/main/TEMPLATE-VERIFICATION.md"
}
openspec/specs/atlas-explorer-walk/spec.md 262 lines
# atlas-explorer-walk Specification
<!-- Generated by Prism from prism/spec.json. Change the app through your agent with /prism, not by editing this file. -->
## Purpose
Atlas walk controls: Decide where the Atlas instance stands after a Dynamics control event: at A0, away from it, in a random walk, or walking home.
## Requirements
### Requirement: Never returning when state is home
The app SHALL NOT answer `returning` when state is home, because index.html: homeBtn is disabled when live.isA0.
Verified: to be proved by Lean for every request (INV-001, theorem `inv001Holds`).
#### Scenario: INV-001 holds
- **WHEN** the request is `home walk mapping other` (an acceptance example)
- **THEN** the answer SHALL NOT be `returning`
- **AND** the app answers `walking`, decided by REQ-006
### Requirement: Never returning when state is away and orbit is mapping
The app SHALL NOT answer `returning` when state is away and orbit is mapping, because index.html: walk home needs the orbit map to find the path to A0.
Verified: to be proved by Lean for every request (INV-002, theorem `inv002Holds`).
#### Scenario: INV-002 holds
- **WHEN** the request is `away walk-home mapping other` (an acceptance example)
- **THEN** the answer SHALL NOT be `returning`
- **AND** the app answers `away`, decided by REQ-011
### Requirement: Always walking when state is walking and event is reflect
The app SHALL answer `walking` when state is walking and event is reflect, because index.html setBusy: reflections are disabled during a walk.
Verified: to be proved by Lean for every request (INV-003, theorem `inv003Holds`).
#### Scenario: INV-003 holds
- **WHEN** the request is `walking reflect mapping a0`
- **THEN** the answer SHALL be `walking`
- **AND** the app answers `walking`, decided by REQ-003
### Requirement: Always home when event is reset and state is not walking and state is not returning
The app SHALL answer `home` when event is reset and state is not walking and state is not returning, because reset always restores A0 when it is enabled.
Verified: to be proved by Lean for every request (INV-004, theorem `inv004Holds`).
#### Scenario: INV-004 holds
- **WHEN** the request is `home reset mapping a0`
- **THEN** the answer SHALL be `home`
- **AND** the app answers `home`, decided by REQ-007
### Requirement: Never away when state is returning and event is finish
The app SHALL NOT answer `away` when state is returning and event is finish, because the walk home always ends at A0.
Verified: to be proved by Lean for every request (INV-005, theorem `inv005Holds`).
#### Scenario: INV-005 holds
- **WHEN** the request is `returning finish mapped a0` (an acceptance example)
- **THEN** the answer SHALL NOT be `away`
- **AND** the app answers `home`, decided by REQ-004
### Requirement: REQ-001 home when state is walking and event is finish and lands is a0
The app SHALL answer `home` when state is walking and event is finish and lands is a0, because index.html runWord done: the walk ends at A0 when live.isA0.
Verified: tested by the acceptance vectors (`rule1`).
#### Scenario: REQ-001 decides
- **WHEN** the request is `walking finish mapping a0`
- **THEN** the answer SHALL be `home`, decided by REQ-001
### Requirement: REQ-002 away when state is walking and event is finish
The app SHALL answer `away` when state is walking and event is finish and no earlier rule matches, because index.html runWord done: the walk ends at another instance.
Verified: tested by the acceptance vectors (`rule2`).
#### Scenario: REQ-002 decides
- **WHEN** the request is `walking finish mapped other` (an acceptance example)
- **THEN** the answer SHALL be `away`, decided by REQ-002
### Requirement: REQ-003 walking when state is walking
The app SHALL answer `walking` when state is walking and no earlier rule matches, because index.html setBusy: walk, reset and the simple reflection buttons are disabled while busy.
Verified: tested by the acceptance vectors (`rule3`).
#### Scenario: REQ-003 decides
- **WHEN** the request is `walking reset mapped a0` (an acceptance example)
- **THEN** the answer SHALL be `walking`, decided by REQ-003
### Requirement: REQ-004 home when state is returning and event is finish
The app SHALL answer `home` when state is returning and event is finish and no earlier rule matches, because index.html homeBtn: the pathToRoot word ends with the 48 classes A0 again.
Verified: tested by the acceptance vectors (`rule4`).
#### Scenario: REQ-004 decides
- **WHEN** the request is `returning finish mapped a0` (an acceptance example)
- **THEN** the answer SHALL be `home`, decided by REQ-004
### Requirement: REQ-005 returning when state is returning
The app SHALL answer `returning` when state is returning and no earlier rule matches, because index.html setBusy: the controls stay disabled while the walk home runs.
Verified: tested by the acceptance vectors (`rule5`).
#### Scenario: REQ-005 decides
- **WHEN** the request is `returning reflect mapping a0`
- **THEN** the answer SHALL be `returning`, decided by REQ-005
### Requirement: REQ-006 walking when event is walk
The app SHALL answer `walking` when event is walk and no earlier rule matches, because index.html walkBtn: runWord with 12 random simple reflections.
Verified: tested by the acceptance vectors (`rule6`).
#### Scenario: REQ-006 decides
- **WHEN** the request is `home walk mapping other` (an acceptance example)
- **THEN** the answer SHALL be `walking`, decided by REQ-006
### Requirement: REQ-007 home when event is reset
The app SHALL answer `home` when event is reset and no earlier rule matches, because index.html resetBtn: loc is restored to the identity, which is A0.
Verified: tested by the acceptance vectors (`rule7`).
#### Scenario: REQ-007 decides
- **WHEN** the request is `home reset mapping a0`
- **THEN** the answer SHALL be `home`, decided by REQ-007
### Requirement: REQ-008 home when event is reflect and lands is a0
The app SHALL answer `home` when event is reflect and lands is a0 and no earlier rule matches, because index.html applyReflection: a reflection can carry the 48 classes back onto A0.
Verified: tested by the acceptance vectors (`rule8`).
#### Scenario: REQ-008 decides
- **WHEN** the request is `home reflect mapping a0`
- **THEN** the answer SHALL be `home`, decided by REQ-008
### Requirement: REQ-009 away when event is reflect
The app SHALL answer `away` when event is reflect and no earlier rule matches, because index.html applyReflection: a simple reflection carries the Atlas to another instance.
Verified: tested by the acceptance vectors (`rule9`).
#### Scenario: REQ-009 decides
- **WHEN** the request is `home reflect mapping other` (an acceptance example)
- **THEN** the answer SHALL be `away`, decided by REQ-009
### Requirement: REQ-010 returning when state is away and event is walk-home and orbit is mapped
The app SHALL answer `returning` when state is away and event is walk-home and orbit is mapped and no earlier rule matches, because index.html: homeBtn is enabled only when orbit.done and the instance is not A0.
Verified: tested by the acceptance vectors (`rule10`).
#### Scenario: REQ-010 decides
- **WHEN** the request is `away walk-home mapped a0` (an acceptance example)
- **THEN** the answer SHALL be `returning`, decided by REQ-010
### Requirement: REQ-011 away when state is away
The app SHALL answer `away` when state is away and no earlier rule matches, because index.html: walk home is disabled until the orbit is mapped, and finish does nothing when no word runs.
Verified: tested by the acceptance vectors (`rule11`).
#### Scenario: REQ-011 decides
- **WHEN** the request is `away walk-home mapping other` (an acceptance example)
- **THEN** the answer SHALL be `away`, decided by REQ-011
### Requirement: Otherwise home
The app SHALL answer `home` when no rule matches, because at A0, walk home is disabled and finish does nothing, so the instance stays home.
Verified: tested by the acceptance vectors.
#### Scenario: No rule matches
- **WHEN** the request is `home walk-home mapping a0`
- **THEN** the answer SHALL be `home`
### Requirement: The first matching rule decides
The app SHALL try REQ-001, REQ-002, REQ-003, REQ-004, REQ-005, REQ-006, REQ-007, REQ-008, REQ-009, REQ-010, REQ-011 in that order, and the first rule that matches SHALL decide.
Verified: tested by the acceptance vectors.
#### Scenario: Two rules match
- **WHEN** the request is `walking finish mapped other` (an acceptance example)
- **THEN** the answer SHALL be `away`, decided by REQ-002, the earlier rule
### Requirement: Request and answers
The app SHALL read one request as one line of 4 fields separated by single spaces, in this order, and SHALL answer exactly one of `home`, `away`, `walking`, `returning`, or `invalid` for anything else.
| Field | Accepts | Means |
| --- | --- | --- |
| `state` | `home`, `away`, `walking`, `returning` | where the instance stands now: A0, another instance, a running random walk, or a running walk home |
| `event` | `reflect`, `walk`, `walk-home`, `reset`, `finish` | the control used, or the end of a running word |
| `orbit` | `mapping`, `mapped` | whether the census of all 75,600 instances has finished |
| `lands` | `a0`, `other` | whether the instance the event ends on is A0 |
| Answer | Means |
| --- | --- |
| `home` | the instance is A0, the canonical 48 classes |
| `away` | the instance is another of the 75,600 in the orbit |
| `walking` | a random word of 12 simple reflections is running and the controls are disabled |
| `returning` | the path back to A0 from the orbit map is running and the controls are disabled |
| `invalid` | the request is malformed |
Verified: reading a request is tested, not proved.
#### Scenario: A malformed request is invalid
- **WHEN** the request is not 4 fields in this order
- **THEN** the answer SHALL be `invalid`
## Examples
- `home walk mapping other` gives `walking`
- `walking finish mapped other` gives `away`
- `away walk-home mapped a0` gives `returning`
- `returning finish mapped a0` gives `home`
- `away walk-home mapping other` gives `away`
- `walking reset mapped a0` gives `walking`
- `home reflect mapping other` gives `away`
## What is proved and what is tested
Lean proves each property marked proved above, for every request that decodes, with no exceptions and no sampling. The proof is about `judge`, the function the WebAssembly guest runs, because both come from the same model.
The parsing of requests is tested, not proved: the acceptance vectors in the app replay through the built guest, including malformed and oversized requests.
Nothing here says the rules are the right rules. That is the part only you can judge.
## Files
- `prism/spec.json` is this spec as data.
- `src/AtlasExplorerWalk.lex.tex` is the LexLean model generated from it. It is the single source of the app.
Words on this page 7
- record
- One entry in a facet: a component, a threat, a measure or a journey step, with the place in the source it came from.
- Lean kernel
- The small checker at the heart of the Lean prover. It accepts a proof only if every step follows the rules.
- theorem
- A statement about the model that the Lean kernel has checked, so it holds for every input, not only the ones tested.
- SDK
- Software development kit. Here, the PrismPM container image that builds, checks and verifies Prism models.
- stakeholder
- A person or group with an interest in the system, as ISO/IEC/IEEE 42010 defines it.
- UOR
- Universal Object Reference: the UOR Foundation's framework for naming any object by its content.
- state machine
- A model of something that is always in one state and moves between states on events, as in UML 2.5.1.