Skip to content

Commit ff6b09f

Browse files
Update ***plain docs to reflect new syntax
1 parent cc06d60 commit ff6b09f

1 file changed

Lines changed: 30 additions & 67 deletions

File tree

docs/plain_language_specification.md

Lines changed: 30 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -13,68 +13,31 @@
1313
Here's an example of a "hello, world" program in ***plain.
1414

1515
```plain
16-
***Non-Functional Requirements:***
16+
***implementation reqs***
1717
1818
- :Implementation: should be in Python.
1919
20-
***Functional Requirements:***
20+
***functional specs***
2121
2222
- Display "hello, world"
2323
```
2424

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-
6225
### Specifications
6326

6427
There are four types of specifications:
6528

66-
- `***Definitions:***`
67-
- `***Non-Functional Requirements:***`
68-
- `***Functional Requirements:***`
69-
- `***Test Requirements:***`
29+
- `***definitions***`
30+
- `***implementation reqs***`
31+
- `***functional specs***`
32+
- `***test reqs***`
7033

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.
7235

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.
7437

7538
## Definitions
7639

77-
The `***Definitions:***` specification is a list of definitions of new concepts.
40+
The `***definitions***` specification is a list of definitions of new concepts.
7841

7942
Here's an example of a simple definiton.
8043

@@ -89,9 +52,9 @@ While providing definitions, you should adhere to the following 4 rules:
8952
- Every definition must start with the name of the concept you are defining.
9053
- Each concept name must be enclosed in colons (`:`) at both the beginning and end.
9154
- Valid characters for concept name include: Plus sign (`+`), Minus sign (`-`), Dot sign (`.`), Digits (`0`-`9`), Uppercase letters (`A`-`Z`), Underscore (`_`), Lowercase letters (`a`-`z`)
92-
- Examples: `:App:`, `:Tasks:`, `:ListOfUsers:`, `:CLI:`.
55+
- Examples: `:App:`, `:Tasks:`, `:ListOfUsers:`, `:CLI:`.
9356
- 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.
9558

9659
Furthermore, there are special concepts that are already defined and are ready to use. They should not be redefined:
9760

@@ -111,9 +74,9 @@ Definitions are the mechanism for definining data structures in ***plain. Here's
11174
- Due Date - optional date by which :User: is supposed to complete :Task:.
11275
```
11376

114-
## Non-Functional Requirements
77+
## Implementation Reqs
11578

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.
11780

11881
Here's an example of a simple instruction specifying only that the ***plain specification should be rendered to Python software code.
11982

@@ -133,17 +96,17 @@ Here's an example of more complex instructions.
13396
- The main executable file of :App: should be called hello_world.py
13497
```
13598

136-
## Functional Requirements
99+
## Functional Specs
137100

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.
139102

140103
Here's an example of a simple description of the functionality of the "hello, world" application.
141104

142105
```plain
143106
- Display "hello, world"
144107
```
145108

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
147110

148111
```plain
149112
- :App: should implement a task manager application.
@@ -152,10 +115,10 @@ Each functional requirement must be limited in complexity. For example, for the
152115
the renderer of ***plain source to software code should respond with
153116

154117
```
155-
Functional requirement too complex!
118+
Functional spec too complex!
156119
```
157120

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.
159122

160123
Here's an example how to do such a break down in the case of a task manager application.
161124

@@ -173,38 +136,38 @@ Here's an example how to do such a break down in the case of a task manager appl
173136
- :User: should be able to mark :Task: as completed.
174137
```
175138

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.
177140

178141
### Acceptance Tests
179142

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.
181144

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.
183146

184147
Here's an example of a "Hello, World" application with one acceptance test.
185148

186149
```plain
187-
***Functional Requirements:***
150+
***functional specs***
188151
189152
- Display "hello, world"
190153
191-
***Acceptance Tests:***
192-
154+
***acceptance tests***
155+
193156
- :App: shouldn't show logging output in the console output (neither in stdout nor stderr).
194157
```
195158

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).
197160

198-
## Test Requirements
161+
## Test Reqs
199162

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.
201164

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.
203166

204-
Here's an example specification of test requirements.
167+
Here's an example specification of test reqs.
205168

206169
```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.
208171
```
209172

210173
# Extended Syntax

0 commit comments

Comments
 (0)