Skip to content

Commit af9ab6c

Browse files
Define abstract state transitions for Phase C5 formal model
1 parent 5f29f35 commit af9ab6c

File tree

1 file changed

+129
-0
lines changed

1 file changed

+129
-0
lines changed

formal/TRANSITIONS.md

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# XSTRP Phase C5 — Abstract State Transitions
2+
3+
## Purpose
4+
5+
This document defines the abstract state transitions for the Phase C5
6+
formal verification model of XSTRP.
7+
8+
These transitions correspond exactly to the frozen protocol behavior
9+
defined in Phases C1–C4.
10+
11+
---
12+
13+
## Transition Rules
14+
15+
All transitions are evaluated atomically.
16+
Exactly one transition may occur at a time.
17+
18+
---
19+
20+
## Non-Terminal State Transitions
21+
22+
### Created → Committed
23+
24+
Permitted if and only if:
25+
- authorization_valid = TRUE
26+
- proof_present = TRUE
27+
- is_expired = FALSE
28+
29+
Result:
30+
- intent_state := Committed
31+
32+
---
33+
34+
### Created → Invalid
35+
36+
Permitted if:
37+
- proof_present = TRUE
38+
- authorization_valid = FALSE
39+
40+
Result:
41+
- intent_state := Invalid
42+
43+
---
44+
45+
### Created → Expired
46+
47+
Permitted if:
48+
- is_expired = TRUE
49+
50+
Result:
51+
- intent_state := Expired
52+
53+
---
54+
55+
## Committed State Transitions
56+
57+
### Committed → Completed
58+
59+
Permitted if and only if:
60+
- authorization_valid = TRUE
61+
- proof_present = TRUE
62+
- is_expired = FALSE
63+
64+
Result:
65+
- intent_state := Completed
66+
67+
---
68+
69+
### Committed → Invalid
70+
71+
Permitted if:
72+
- proof_present = TRUE
73+
- authorization_valid = FALSE
74+
75+
Result:
76+
- intent_state := Invalid
77+
78+
---
79+
80+
### Committed → Expired
81+
82+
Permitted if:
83+
- is_expired = TRUE
84+
85+
Result:
86+
- intent_state := Expired
87+
88+
---
89+
90+
## Expired State Transitions
91+
92+
### Expired → Refunded
93+
94+
Permitted unconditionally.
95+
96+
Result:
97+
- intent_state := Refunded
98+
99+
---
100+
101+
## Terminal States
102+
103+
The following states are terminal and immutable:
104+
105+
- Completed
106+
- Refunded
107+
- Invalid
108+
109+
No transitions are permitted from these states.
110+
111+
---
112+
113+
## Forbidden Transitions
114+
115+
Any transition not explicitly listed above is forbidden.
116+
117+
This includes but is not limited to:
118+
- Skipping states
119+
- Leaving terminal states
120+
- Completing without authorization
121+
- Completing after expiry
122+
- Refunding from non-expired states
123+
124+
---
125+
126+
## Status
127+
128+
Abstract transition relation defined.
129+
No formal specification written yet.

0 commit comments

Comments
 (0)