Skip to content

Commit 9f98e99

Browse files
committed
2.1.0
improved forward traceability generation
1 parent bb04a7f commit 9f98e99

File tree

13 files changed

+194
-112
lines changed

13 files changed

+194
-112
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
spexygen.tar.gz
2+
23
html/
4+
spexy/

Spexyfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ ALIASES += \
3737
#---------------------------------------------------------------------------
3838
# Spexygen: spexygen-awesome style
3939
#---------------------------------------------------------------------------
40-
HTML_HEADER = $(SPEXYGEN)/spexygen-awesome/spexy-header.html
41-
HTML_FOOTER = $(SPEXYGEN)/spexygen-awesome/spexy-footer.html
4240
HTML_EXTRA_STYLESHEET = $(SPEXYGEN)/spexygen-awesome/doxygen-awesome.css \
4341
$(SPEXYGEN)/spexygen-awesome/doxygen-awesome-sidebar-only.css \
4442
$(SPEXYGEN)/spexygen-awesome/doxygen-awesome-sidebar-only-darkmode-toggle.css \
@@ -48,10 +46,18 @@ HTML_EXTRA_FILES = $(SPEXYGEN)/spexygen-awesome/doxygen-awesome-darkmode-t
4846
$(SPEXYGEN)/spexygen-awesome/doxygen-awesome-paragraph-link.js \
4947
$(SPEXYGEN)/spexygen-awesome/image-preview.js
5048

49+
#---------------------------------------------------------------------------
50+
# Spexygen: customized HTML header/footer
51+
# (can be overridden by the including Doxyfile)
52+
#---------------------------------------------------------------------------
53+
HTML_HEADER = $(SPEXYGEN)/spexygen-awesome/spexy-header.html
54+
HTML_FOOTER = $(SPEXYGEN)/spexygen-awesome/spexy-footer.html
55+
5156
#---------------------------------------------------------------------------
5257
# Configuration options related to the LaTeX output
5358
#---------------------------------------------------------------------------
54-
# Spexygen: customized LaTeX formatting
59+
# Spexygen: customized LaTeX header/footer
60+
# (can be overridden by the including Doxyfile)
5561
#---------------------------------------------------------------------------
5662
LATEX_HEADER = $(SPEXYGEN)/spexygen-awesome/spexy-header.tex
5763
LATEX_FOOTER = $(SPEXYGEN)/spexygen-awesome/spexy-footer.tex

doc/DOC_MAN_SPX.pdf

13 KB
Binary file not shown.

doc/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Project related configuration options
77
#---------------------------------------------------------------------------
88
PROJECT_NAME = Spexygen
9-
PROJECT_NUMBER = 2.0.1
9+
PROJECT_NUMBER = 2.1.0
1010
PROJECT_BRIEF = "Reference Manual"
1111
PROJECT_LOGO = ./img/logo_spexygen.webp
1212
PROJECT_ICON =

doc/Doxyfile-PDF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Configuration options related to the LateX output
77
#---------------------------------------------------------------------------
88
PROJECT_NAME = Reference Manual
9-
PROJECT_BRIEF = For Spexygen 2.0.1
9+
PROJECT_BRIEF = For Spexygen 2.1.0
1010
PROJECT_NUMBER = Document: DOC_MAN_SPX
1111

1212
#---------------------------------------------------------------------------

example/exa.dox

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,12 @@
44
<div style="clear:both"></div>
55
@endif
66

7-
The _spexygen_ distribution contains an example for generating traceable documentation with _spexygen_. The example is located in the @webref{https://github.com/QuantumLeaps/spexygen/tree/main/example,spexygen/example} folder, with the following content:
7+
The _Spexygen_ distribution contains an example for generating traceable documentation with _Spexygen_. The example is located in the @webref{https://github.com/QuantumLeaps/Spexygen/tree/main/example,spexygen/example} folder, with the following content:
88

99
@code{c}
1010
spexygen/
11-
| LICENSE
12-
| README.md
13-
| Spexyfile
14-
| spexygen.py
1511
|
16-
+---doc/
17-
|
18-
+---example/ <-- spexygen example
12+
+---example/ <-- Spexygen example
1913
| | exa.dox <-- example description
2014
| | dev.dox <-- example traceable deviations from coding standards
2115
| | srs.dox <-- example traceable Software Requirements Specification
@@ -29,12 +23,10 @@ spexygen/
2923
| \---test
3024
| test1.c <-- example test file
3125
| test2.c <-- example test file
32-
|
33-
\---spexygen-awesome/
3426
@endcode
3527

3628
@section exa_gen Spexygen-Generated Documentation
37-
The following sections contain the _spexygen_-generated documentation of this example:
29+
The following sections contain the _Spexygen_-generated documentation of this example:
3830
- @subpage srs
3931
- @subpage dev
4032
- @ref header.h
@@ -43,7 +35,7 @@ The following sections contain the _spexygen_-generated documentation of this ex
4335
- @ref test2.c
4436

4537
@note
46-
Please note the generated @ref tr-fw "forward-traceability" and the @ref tr-bw "backward-traceability" links (augmented with the brief descriptions) in the @ref spx_use-doc-uid "work artifacts" and @ref spx_use-doc-code "code artifacts". Also, try clicking on the provided traceability links as well as __searching__ the @ref tr-uid "UIDs" in the doxygen "search" box.
38+
Please note the generated @ref tr-fw "forward-traceability" and the @ref tr-bw "backward-traceability" links (augmented with the brief descriptions) in the @ref spx_use-doc-uid "work artifacts" and @ref spx_use-doc-code "code artifacts". Also, try clicking on the provided traceability links as well as __searching__ the @ref tr-uid "UIDs" in the Doxygen "search" box.
4739

4840
<p></p>
4941
@ifnot LATEX

example/inc/header.h

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ Class Foo longer description.
3535
typedef struct Foo {
3636
/*! @code_uid{Foo::x, Attribute x of class Foo brief description}
3737
@code_litem{Details}
38-
Attribute x of class Foo longer description.
39-
38+
Attribute x of class Foo: longer description.
4039
@code_bw_trace{brief}
4140
- @tr{SRS_PRJ_Foo_01}
4241
@endcode_uid
4342
*/
4443
uint32_t x;
4544

46-
/*! @code_uid{Foo::x_dis, protection for attribute Foo::x brief description}
45+
/*! @code_uid{Foo::x_dis, Duplicate Inverse Storage for attribute Foo::x}
4746
@code_litem{Details}
48-
Duplicate Inverse Storage (DIS) for attribute Foo::x longer description.
49-
47+
Duplicate Inverse Storage (DIS) for attribute Foo::x: longer description.
5048
@code_bw_trace{brief}
5149
- @tr{SRS_PRJ_Foo_01}
50+
- @tr{Foo_verify_()}
51+
- @tr{Foo::x}
5252
@endcode_uid
5353
*/
5454
uint32_t x_dis;
@@ -58,42 +58,56 @@ typedef struct Foo {
5858
@code_uid{Foo_inst, Foo instance brief description}
5959
@code_litem{Details}
6060
Foo instance longer description.
61-
6261
@code_bw_trace{brief}
6362
- @tr{SRS_PRJ_Foo_04}
63+
- @tr{Foo}
6464
- @tr{DVP_PRJ_MC4_R11_03}
6565
@code_fw_trace
6666
@endcode_uid
6767
*/
6868
extern Foo const Foo_inst;
6969

7070
/*!
71-
@code_uid{Foo_ctor(), Constructor of class Foo brief description}
71+
@code_uid{Foo_update_(), Update operation to preserve the class invariant}
7272
@code_litem{Details}
7373
Constructor of class Foo longer description.
74+
@param[in] me - the instance pointer (OOP in C)
75+
@code_bw_trace{brief}
76+
- @tr{SRS_PRJ_Foo_02}
77+
- @tr{Foo}
78+
@code_fw_trace
79+
@endcode_uid
80+
*/
81+
static inline void Foo_update_(Foo* const me) {
82+
me->x_dis = ~(uintptr_t)me->x;
83+
}
7484

85+
/*!
86+
@code_uid{Foo_ctor(), Constructor of class Foo brief description}
87+
@code_litem{Details}
88+
Constructor of class Foo longer description.
7589
@param[in] me - the instance pointer (OOP in C)
7690
@param[in] x - the initial value for me->x
77-
7891
@code_bw_trace{brief}
7992
- @tr{SRS_PRJ_Foo_02}
93+
- @tr{Foo}
8094
@code_fw_trace
8195
@endcode_uid
8296
*/
8397
static inline void Foo_ctor(Foo * const me, uint32_t const x) {
8498
me->x = x;
85-
me->x_dis = ~(uintptr_t)me->x;
99+
Foo_update_(me);
86100
}
87101

88102
/*!
89103
@code_uid{Foo_verify_(), Operation verify_() of class Foo brief description}
90104
@code_litem{Details}
91105
Operation verify_() of class Foo longer description.
92-
93106
@param[in] me - the instance pointer (OOP in C)
94-
107+
@returns 'true' when the Foo instance verification succeeds, 'false' otherwise.
95108
@code_bw_trace{brief}
96109
- @tr{SRS_PRJ_Foo_03}
110+
- @tr{Foo}
97111
@code_fw_trace
98112
@endcode_uid
99113
*/

example/srs.dox

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
@endif
66

77
@remark
8-
This is an example Software Requirements Specification (SRS), illustrating the typical structure and the use of _spexygen_ commands to define the @ref tr "traceable" requirement work artifacts.
8+
This is an example Software Requirements Specification (SRS), illustrating the typical structure and the use of _Spexygen_ commands to define the @ref tr "traceable" requirement work artifacts.
99

1010
@section srs-def Concepts &amp; Definitions
1111
Description of concepts and definitions...
1212

1313
@section srs_req Requirements
14-
Definitions of formal requirements specifications with _spexygen_ commands...
14+
Definitions of formal requirements specifications with _Spexygen_ commands...
1515

1616
@uid{SRS_PRJ_FF_00,My project shall provide a free function foo().}
1717
@uid_litem{Description}

example/test/test1.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ void tearDown(void) {
1111
@code_uid{TUN_PRJ_free_fun_00, zero input test}
1212
@code_litem{Details}
1313
This test checks that zero input to free_fun() produces zero array.
14-
1514
@code_bw_trace{brief}
1615
- @tr{free_fun()}
1716
@endcode_uid
@@ -29,7 +28,6 @@ void TUN_PRJ_free_fun_00(void) {
2928
@code_uid{TUN_PRJ_free_fun_01, non-zero input}
3029
@code_litem{Details}
3130
This test checks that non-zero input to free_fun() produces expected array.
32-
3331
@code_bw_trace
3432
- @tr{free_fun()}
3533
@endcode_uid

example/test/test2.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ void tearDown(void) {
99

1010
/*!
1111
@code_uid{TUN_PRJ_Foo_ctor_01, constructor test}
12-
1312
@code_litem{Details}
1413
This test checks that Foo_ctor() produces valid instance.
15-
1614
@code_bw_trace{brief}
1715
- @tr{Foo_ctor()}
1816
@endcode_uid
@@ -26,10 +24,8 @@ void TUN_PRJ_Foo_ctor_01(void) {
2624

2725
/*!
2826
@code_uid{TUN_PRJ_Foo_verify_00, verify positive test}
29-
3027
@code_litem{Details}
3128
This test checks that Foo_verify_() distinguishes valid instance.
32-
3329
@code_bw_trace{brief}
3430
- @tr{Foo_verify_()}
3531
@endcode_uid
@@ -41,10 +37,8 @@ void TUN_PRJ_Foo_verify_00(void) {
4137

4238
/*!
4339
@code_uid{TUN_PRJ_Foo_verify_01, verify negative test}
44-
4540
@code_litem{Details}
4641
This test checks that Foo_verify_() distinguishes invalid instance.
47-
4842
@code_bw_trace{brief}
4943
- @tr{Foo_verify_()}
5044
@endcode_uid

0 commit comments

Comments
 (0)