You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/plain_language_specification.md
+30-67Lines changed: 30 additions & 67 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,68 +13,31 @@
13
13
Here's an example of a "hello, world" program in ***plain.
14
14
15
15
```plain
16
-
***Non-Functional Requirements:***
16
+
***implementation reqs***
17
17
18
18
- :Implementation: should be in Python.
19
19
20
-
***Functional Requirements:***
20
+
***functional specs***
21
21
22
22
- Display "hello, world"
23
23
```
24
24
25
-
# Source structure
26
-
27
-
## Source organization
28
-
29
-
***plain source can be organized in sections and subsection using markdown headers.
30
-
31
-
```plain
32
-
# Section 1
33
-
34
-
# Section 2
35
-
36
-
***Non-Functional Requirements:***
37
-
38
-
- First simple non-functional requirement
39
-
40
-
***Functional Requirements:***
41
-
42
-
- First simple functional requirement
43
-
44
-
## Section 2.1
45
-
46
-
***Non-Functional Requirements:***
47
-
48
-
- Second simple non-functional requirement
49
-
50
-
***Functional Requirements:***
51
-
52
-
- Second simple functional requirement
53
-
```
54
-
55
-
This enables hierarchical organization of the specification.
56
-
57
-
In example above:
58
-
59
-
- While rendering the "First simple functional requirement", the renderer will not have access to the "Second simple non-functional requirement".
60
-
- While rendering the "Second simple functional requirement", the renderer will not have access to the "First simple non-functional requirement".
61
-
62
25
### Specifications
63
26
64
27
There are four types of specifications:
65
28
66
-
-`***Definitions:***`
67
-
-`***Non-Functional Requirements:***`
68
-
-`***Functional Requirements:***`
69
-
-`***Test Requirements:***`
29
+
-`***definitions***`
30
+
-`***implementation reqs***`
31
+
-`***functional specs***`
32
+
-`***test reqs***`
70
33
71
-
Every plain source file requires at least one functional requirement and an associated non-functional requirement.
34
+
Every plain source file requires at least one functional spec and an associated implementation req.
72
35
73
-
Functional requirements must reside in leaf sections while other specifications can be placed also in non-leaf sections. Specifications in non-leaf sections apply not just to the section itself but to all of its subsections.
36
+
Functional specs must reside in leaf sections while other specifications can be placed also in non-leaf sections. Specifications in non-leaf sections apply not just to the section itself but to all of its subsections.
74
37
75
38
## Definitions
76
39
77
-
The `***Definitions:***` specification is a list of definitions of new concepts.
40
+
The `***definitions***` specification is a list of definitions of new concepts.
78
41
79
42
Here's an example of a simple definiton.
80
43
@@ -89,9 +52,9 @@ While providing definitions, you should adhere to the following 4 rules:
89
52
- Every definition must start with the name of the concept you are defining.
90
53
- Each concept name must be enclosed in colons (`:`) at both the beginning and end.
91
54
- Valid characters for concept name include: Plus sign (`+`), Minus sign (`-`), Dot sign (`.`), Digits (`0`-`9`), Uppercase letters (`A`-`Z`), Underscore (`_`), Lowercase letters (`a`-`z`)
- Concept names must be globally unique (meaning, you cannot provide two definitions with the same concept name).
94
-
- When referencing concepts in ***Test Requirements:***, ***Functional Requirements:***, ***Non-Functional Requirements:*** and ***Acceptance Tests:***, the concept name must exist in the ***Definitions:*** section.
57
+
- When referencing concepts in ***test reqs***, ***functional specs***, ***implementation reqs*** and ***acceptance tests***, the concept name must exist in the ***definitions*** section.
95
58
96
59
Furthermore, there are special concepts that are already defined and are ready to use. They should not be redefined:
97
60
@@ -111,9 +74,9 @@ Definitions are the mechanism for definining data structures in ***plain. Here's
111
74
- Due Date - optional date by which :User: is supposed to complete :Task:.
112
75
```
113
76
114
-
## Non-Functional Requirements
77
+
## Implementation Reqs
115
78
116
-
The `***Non-Functional Requirements:***` specification is a list of instructions that steer software code implementation and provide details of execution environment.
79
+
The `***implementation reqs***` specification is a list of instructions that steer software code implementation and provide details of execution environment.
117
80
118
81
Here's an example of a simple instruction specifying only that the ***plain specification should be rendered to Python software code.
119
82
@@ -133,17 +96,17 @@ Here's an example of more complex instructions.
133
96
- The main executable file of :App: should be called hello_world.py
134
97
```
135
98
136
-
## Functional Requirements
99
+
## Functional Specs
137
100
138
-
The `***Functional Requirements:***` specification provides a description of functionality that should be rendered to software code. The descriptions should be provided in natural language as a markdown list.
101
+
The `***functional specs***` specification provides a description of functionality that should be rendered to software code. The descriptions should be provided in natural language as a markdown list.
139
102
140
103
Here's an example of a simple description of the functionality of the "hello, world" application.
141
104
142
105
```plain
143
106
- Display "hello, world"
144
107
```
145
108
146
-
Each functional requirement must be limited in complexity. For example, for the functional requirement
109
+
Each functional spec must be limited in complexity. For example, for the functional spec
147
110
148
111
```plain
149
112
- :App: should implement a task manager application.
@@ -152,10 +115,10 @@ Each functional requirement must be limited in complexity. For example, for the
152
115
the renderer of ***plain source to software code should respond with
153
116
154
117
```
155
-
Functional requirement too complex!
118
+
Functional spec too complex!
156
119
```
157
120
158
-
In such case you need to break down the functioanlity into smaller, less-complex functional requirements.
121
+
In such case you need to break down the functioanlity into smaller, less-complex functional specs.
159
122
160
123
Here's an example how to do such a break down in the case of a task manager application.
161
124
@@ -173,38 +136,38 @@ Here's an example how to do such a break down in the case of a task manager appl
173
136
- :User: should be able to mark :Task: as completed.
174
137
```
175
138
176
-
Functional requirements are rendered incrementally one by one. Consequently earlier functional requirements cannot reference later functional requirements.
139
+
Functional specs are rendered incrementally one by one. Consequently earlier functional specs cannot reference later functional specs.
177
140
178
141
### Acceptance Tests
179
142
180
-
Acceptance tests can be used to further refine the functional requirement and especially to incorporate constraints on the implementation.
143
+
Acceptance tests can be used to further refine the functional spec and especially to incorporate constraints on the implementation.
181
144
182
-
Acceptance tests are specified with a keyword `***Acceptance Tests:***` as a subsection within `***Functional Requirements:***` section. Each acceptance tests must be an item in a list.
145
+
Acceptance tests are specified with a keyword `***acceptance tests***` as a subsection within `***functional specs***` section. Each acceptance tests must be an item in a list.
183
146
184
147
Here's an example of a "Hello, World" application with one acceptance test.
185
148
186
149
```plain
187
-
***Functional Requirements:***
150
+
***functional specs***
188
151
189
152
- Display "hello, world"
190
153
191
-
***Acceptance Tests:***
192
-
154
+
***acceptance tests***
155
+
193
156
- :App: shouldn't show logging output in the console output (neither in stdout nor stderr).
194
157
```
195
158
196
-
Acceptance tests extend **conformance tests**. The acceptance tests are implemented according to the ***Test Requirements:*** specification (see next section).
159
+
Acceptance tests extend **conformance tests**. The acceptance tests are implemented according to the ***test reqs*** specification (see below).
197
160
198
-
## Test Requirements
161
+
## Test Reqs
199
162
200
-
The `***Test Requirements:***` specification is a list of instructions that steer implementation of conformance tests and provide details of testing environment.
163
+
The `***test reqs***` specification is a list of instructions that steer implementation of conformance tests and provide details of testing environment.
201
164
202
-
**Conformance tests** is the generated code used to verify that the functional requirement is implemented according to the specification.
165
+
**Conformance tests** is the generated code used to verify that the functional spec is implemented according to the specification.
203
166
204
-
Here's an example specification of test requirements.
167
+
Here's an example specification of test reqs.
205
168
206
169
```plain
207
-
- :ConformanceTests: of :App: should be implemented in Python using Unittest framework.
170
+
- :ConformanceTests: of :App: should be implemented in Python using Unittest framework.
0 commit comments