Skip to content

Commit

Permalink
refactor: introduce some requirements hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
wucke13 committed Jul 3, 2024
1 parent 9508e02 commit 59ed48e
Showing 1 changed file with 61 additions and 46 deletions.
107 changes: 61 additions & 46 deletions requirements/requirements.sdoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
TITLE: Wasm Safety Interpreter requirements

[SECTION]
TITLE: High-level requirements
TITLE: Functional Requirements

[REQUIREMENT]
UID: REQ-1
Expand All @@ -15,6 +15,42 @@ Operation with fuel or other implementations of bounded run-time requires that t
Conversely, later on the interpreter may be resumed, as if it was not halted in the first place.
<<<

[REQUIREMENT]
UID: REQ-3
TITLE: Baremetal
STATEMENT: >>>
The interpreter shall be executable on bare-metal environments
<<<
RATIONALE: >>>
No reliance on any specific functionality from the provided execution environment is acceptable, as the interpreter shall be ready for embedding to any environment that Rust can compile for.
<<<

[REQUIREMENT]
UID: REQ-5
TITLE: Bounded execution
STATEMENT: >>>
The interpreter shall yield back control flow eventually
<<<
RATIONALE: >>>
A user shall be able to call the interpreter with a bound, expecting a result in a finite amount of time or bytecode operations. Even if the bytecode itself does never finish execution (i.e. due to a infinite loop), the interpreter shall yield eventually, by pausing the bytecode execution.
<<<
COMMENT: >>>
It is not acceptable to constraint the interpreter to only those bytecode instances for which the halting-problem is solvable.
<<<

[REQUIREMENT]
UID: REQ-12
TITLE: Migrateable
STATEMENT: >>>
The interpreter state shall be able to halt on one computer and continue execution on another
<<<
RATIONALE: >>>
This enables various workflows in deployments of multiple computers. For load-balancing or redundancy purposes, running applications can be migrated to other computers without disruption.
<<<

[SECTION]
TITLE: Low-Level Functional Requirements

[REQUIREMENT]
UID: REQ-2
TITLE: Stackless
Expand All @@ -30,16 +66,6 @@ RELATIONS:
- TYPE: Parent
VALUE: REQ-1

[REQUIREMENT]
UID: REQ-3
TITLE: Baremetal
STATEMENT: >>>
The interpreter shall be executable on bare-metal environments
<<<
RATIONALE: >>>
No reliance on any specific functionality from the provided execution environment is acceptable, as the interpreter shall be ready for embedding to any environment that Rust can compile for.
<<<

[REQUIREMENT]
UID: REQ-4
TITLE: no_std
Expand All @@ -56,19 +82,6 @@ RELATIONS:
- TYPE: Parent
VALUE: REQ-3

[REQUIREMENT]
UID: REQ-5
TITLE: Bounded execution
STATEMENT: >>>
The interpreter shall support to execute bytecode for a finite amount of time before yielding back control flow
<<<
RATIONALE: >>>
A user shall be able to call the interpreter with a bound, expecting a result in a finite amount of time or bytecode operations. Even if the bytecode itself does never finish execution (i.e. due to a infinite loop), the interpreter shall yield eventually.
<<<
COMMENT: >>>
It is not acceptable to constraint the interpreter to only those bytecode instances for which the halting-problem is solvable.
<<<

[REQUIREMENT]
UID: REQ-6
TITLE: Fuel
Expand All @@ -84,6 +97,26 @@ RELATIONS:
- TYPE: Parent
VALUE: REQ-5

[REQUIREMENT]
UID: REQ-13
TITLE: De-/Serializable
STATEMENT: >>>
The interpreter state shall be de-/serializable
<<<
RATIONALE: >>>
If the interpreter state can be serialized to and deserialized from a canonical representation, migration to other computers as well as check-point/lock-step like execution become simple to implement.
<<<
RELATIONS:
- TYPE: Parent
VALUE: REQ-12

[/SECTION]

[/SECTION]

[SECTION]
TITLE: Observability Requirements

[REQUIREMENT]
UID: REQ-7
TITLE: Instrumentation
Expand All @@ -94,6 +127,9 @@ RATIONALE: >>>
Instrumentation is needed to generate evidence for certification. Instrumentation eases debugging. Instrumentation enables elaborate run-time monitoring.
<<<

[SECTION]
TITLE: Low-Level Observability Requirements

[REQUIREMENT]
UID: REQ-8
TITLE: Statement Coverage
Expand Down Expand Up @@ -146,27 +182,6 @@ STATEMENT: >>>
The interpreter shall support the generation of certification evidence
<<<

[REQUIREMENT]
UID: REQ-12
TITLE: Migrateable
STATEMENT: >>>
The interpreter state shall be able to halt on one computer and continue execution on another
<<<
RATIONALE: >>>
This enables various workflows in deployments of multiple computers. For load-balancing or redundancy purposes, running applications can be migrated to other computers without disruption.
<<<

[REQUIREMENT]
UID: REQ-13
TITLE: De-/Serializable
STATEMENT: >>>
The interpreter state shall be de-/serializable
<<<
RATIONALE: >>>
If the interpreter state can be serialized to and deserialized from a canonical representation, migration to other computers as well as check-point/lock-step like execution become simple to implement.
<<<
RELATIONS:
- TYPE: Parent
VALUE: REQ-12
[/SECTION]

[/SECTION]

0 comments on commit 59ed48e

Please sign in to comment.