PrismDevRelOpen the app
Case studies: How UORust was modeled

Overview

Case studies

UORust

How UORust was modeledArchitecture walkthroughDesign views in OPM and UMLFeatures and journeysSecurity and threat modelQuality model (ISO/IEC 25010)Behavior and proofsSystem and releaseExtension facetsCommand referenceSlides and video scriptRecord explorerllms.txt and Markdown twins

Prism-DevRel

How Prism-DevRel was modeledArchitecture walkthroughDesign views in OPM and UMLFeatures and journeysSecurity and threat modelQuality model (ISO/IEC 25010)Behavior and proofsExtension facetsSlides and video scriptRecord explorerllms.txt and Markdown twins

Rule 30

How Rule 30 was modeledArchitecture walkthroughSecurity and threat modelQuality model (ISO/IEC 25010)Behavior and proofsSlides and video scriptRecord explorerllms.txt and Markdown twins

Verdant Resonance

How Verdant Resonance was modeledBehavior and proofsExtension facetsSlides and video scriptRecord explorerllms.txt and Markdown twins

Foundry

How Foundry was modeledBehavior and proofsSlides and video scriptRecord explorerllms.txt and Markdown twins

// case study · UORust

How UORust was modeled

Who the UORust model is for and what they care about. Then how those concerns became facets.

The records of UORust by facetArchitecture: 61 records; Design views: 73 records; Features and journeys: 15 records; Security and threat model: 108 records; Quality: 40 records; Behavior and proofs: 29 records; System and release: 2 records; Extension facets: 2 records; Application: 1 recordsArchitecture61Design views73Features and journeys15Security and threat model108Quality40Behavior and proofs29System and release2Extension facets2Application1
The records of UORust by facet. Every record of the UORust model, counted by facet. Each one is taught by at least one page of this case study.
The data in this figure
records
Architecture61
Design views73
Features and journeys15
Security and threat model108
Quality40
Behavior and proofs29
System and release2
Extension facets2
Application1

UORust says what it is in its own model:

Routes each kind of Rust fact UORust reads from a Cargo workspace to the one Prism record kind it emits, or refuses it.

Subject: UORust at commit afd5cea950a8, 331 facet records, source digest f3f743b6834adaff.

This case study reads every facet record of UORust. Each record is taught by at least one page here, and no page teaches a record UORust does not declare.

Records
331
Covered
331
Pages
14
Facets
9

People, concerns and the application

These are the records of UORust that say who the model is for, what they care about, and what its holo is built from. Each viewpoint of the architecture pairs one stakeholder with one concern.

Security reviewer

Architecture::stakeholderSecurityReviewer Stakeholder #46 source

Reviews the threat model uorust derives from unsafe code, effects and the supply chain, and the controls that answer it.

index
4

Taught by How UORust was modeled, Architecture walkthrough

UORust

Routes::application TextApplication #207 source

UORust 22 entries
profile
prismpm/text-application/3
cargoName
uorust-routes
cargoVersion
0.1.1
cargoDescription
Routes each kind of Rust fact UORust reads from a Cargo workspace to the one Prism record kind it emits, or refuses it.
cargoRepository
https://github.com/afflom/uorust
cargoHomepage
https://afflom.github.io/UORust/
libraryRoots
  • Uorust.Routes.dispatch
acceptanceVectors
(acceptanceVectors)
entryRoot
Uorust.Routes.dispatch
coreContract
hologram:guest/core-wasm@1
requestMaximum
(318 : UInt32)
responseMaximum
(8192 : UInt32)
guestAllocationMaximum
(319 : UInt32)
coreMemoryPages
(ctor Option.some [UInt32] (32 : UInt32))
coreStackBytes
(ctor Option.some [UInt32] (65536 : UInt32))
capabilitiesEmpty
true
fatArchive
true
primaryLayer
(0 : UInt8)
viewLayer
(1 : UInt8)
view
TextView
title
UORust route table
heading
UORust route table
inputLabel
Rust fact kinds, one per line
submitLabel
Route
outputLabel
Route or refusal
inputError
Enter UTF-8 text of at most 512 bytes.
responseError
The answer could not be displayed.
cli
TextCli
command
route
description
UORust reads a Cargo workspace and writes a complete Prism model of it. This page runs UORust's route table, the verified function that decides which Prism record each kind of Rust fact becomes, or refuses the fact.
usageCode
(64 : UInt8)
ioCode
(74 : UInt8)
limitCode
(ctor Option.none [UInt8])
outcomes
  • TextCliOutcome
    name
    routed
    prefix
    route
    exitCode
    (0 : UInt8)
  • TextCliOutcome
    name
    refused
    prefix
    refused
    exitCode
    (1 : UInt8)
  • TextCliOutcome
    name
    error
    prefix
    error
    exitCode
    (2 : UInt8)
sections
  • TextCliSection
    title
    REQUEST
    body
    One kind of Rust fact per line, such as pub-fn, error-enum or unsafe-block. Every line must name the same route.
  • TextCliSection
    title
    ANSWER
    body
    route ID, fact KIND, record PRISM-RECORD, facet FACET the one route every kind names refused unknown-fact, fact KIND no route names the kind refused ambiguous, fact KIND, fact KIND two kinds name different routes error REASON the request is empty, too large, not UTF-8 or has a blank line
examples
  • TextCliExample
    name
    routed
    text
    error-enum
  • TextCliExample
    name
    ambiguous
    text
    error-enum state-enum
workbench
(ctor Option.some [Foundation.View.Text.V3.Model::WorkbenchView] (Guide::view))

Taught by Turn a Rust project into a Prism model, How UORust was modeled, Slides and video script

How the facets answer each concern

For each concern, the records of UORust that name it or name a viewpoint that frames it, counted by facet. Each count links to the first such record.

ConcernNamed by
Completeness of the modelArchitecture: 2, Design views: 1
Deterministic outputArchitecture: 2
DiscoverabilityArchitecture: 2
Fidelity to the sourceArchitecture: 2, Design views: 2
No silent defaultsArchitecture: 2, Design views: 1
Read-only ingestionArchitecture: 2
Supply-chain integrityArchitecture: 2

How far the lift reaches

How far UORust lifts itselfresidue: 443 functions; foreign: 34 functions; effect: 55 functions; lifted: 230 functionsresidue443foreign34effect55lifted230
How far UORust lifts itself. Every function of its product code, by row of its lift register. The rows that are not lifted are the distance still to go.
The data in this figure
functions
residue443
foreign34
effect55
lifted230

UORust lifts its own functions too. It keeps the result in frontier.toml, the register its gate passes to --register. Every function of its product code has one row. The rows not lifted are the distance to the goal that every function lifts. That goal is an open claim, measured at each commit:

RowRowsMeaning
residue443A pure function outside the lift so far, with the construct that stopped it.
foreign34Its parameter or result is a type of a dependency with no LexLean model yet.
effect55The I/O shell. It reads files, the environment, a process or the network, and is recorded as a capability in the security facet.
lifted230The function became a LexLean definition the kernel checks.

Here is the residue by the construct that stopped the lift. It is the work list for the next lifts:

ReasonFunctions
mir348
type59
form17
collision8
call7
arithmetic3
statements1

The tutorial shows what one lifted row looks like.

Learning paths

The pages of this case study, by the stage of the developer journey each one serves:

Pages of this case study

Pages of this case study 14 rows
PageModalityRecordsWhat you get
Turn a Rust project into a Prism modelWalkthrough6Run UORust on a sample workspace and check what it writes. Then read a Rust function beside the LexLean it became.
How UORust was modeledWalkthrough13Who the UORust model is for and what they care about. Then how those concerns became facets.
Architecture walkthroughWalkthrough61Who UORust is for, what they care about, its parts and how they connect.
Design views in OPM and UMLDiagrams73Every design view of UORust, drawn. It shows things, steps, parts, messages and states.
Features and journeysWalkthrough15What UORust does, the calls that do it, the rows that accept it, and the paths people take.
Security and threat modelWalkthrough108The assets of UORust, its threats, risks and controls, and the risks it accepts on purpose.
Quality model (ISO/IEC 25010)Reference40What good quality means for UORust, and the numbers that measure it.
Behavior and proofsReference29Every theorem of UORust, and how it is proved. The Lean kernel checks each one.
System and releaseWalkthrough2What UORust ships, its release manifest, and how its holo goes live.
Extension facetsReference2The records UORust adds of its own. They sit beside the standard facets.
Command referenceReference0Every command and option of the UORust tool, read from its source. Also the commands its gate runs.
Slides and video scriptSlides and script9One slide for each facet of UORust, with a script to read over it.
Record explorerInteractive0Search every record of UORust by name, facet or text. Each result links to the pages that teach it.
llms.txt and Markdown twinsAgent twin0The UORust case study as plain text for agents. It has llms.txt, a twin of each page and a feed.

Facets of UORust

Each facet links to the page that explains it for every Prism model, beside the count for this one:

explanationEvaluatecase studyMarkdown

Words on this page 8
Prism model
A description of an app, written in LexLean, that covers every facet of it and that the Lean kernel checks before the app is built.
facet
One view of a model, such as its architecture, its security or its quality. Each facet holds records.
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.
holo
The app Prism builds: one signed, verified file that a browser or a device runs.
lift
To translate a Rust function into a LexLean definition with its proofs, so the model says what the code does.
residue
The part of a subject not lifted yet. It is listed by name and may only shrink.
stakeholder
A person or group with an interest in the system, as ISO/IEC/IEEE 42010 defines it.
developer journey
The stages a developer goes through with a product: discover, evaluate, learn, build and scale (Lewko and Parton).