Next / Previous / Contents / TCC Help System / NM Tech homepage

Abstract

Implementation of a utility to check a truth table for complete coverage, in support of the Cleanroom software development methodology.

This publication is available in Web form and also as a PDF document. Please forward any comments to tcc-doc@nmt.edu.

Table of Contents

1. Insuring case coverage in Cleanroom trace tables
2. Structuring truth tables
2.1. Simple truth tables
2.2. Truth table with “don't care” entries
2.3. Application example
3. Usage of the tracecase script
4. Prologue
5. Module imports
6. Constants
6.1. T
6.2. F
6.3. X
6.4. TRUTH_CODES
6.5. LINE_PAT
7. main()
8. fatal(): Fatal errors
9. class Truths
10. Truths.__init__()
11. Truths._lineCheck(): Check one input line
12. Truths.check(): Generate error messages
13. Truths._permuter(): Generate all possible input sets
14. Truths._inputCheck(): Check one input set
15. Truths._caseCheck(): Check one case
16. Truths._codeMatch
17. Truths._uncovered(): Message for an uncovered input set
18. Truths._showInputs(): Display a set of input conditions
19. Truths._overcovered(): Message for an over-covered input set
20. Truths._oneCase(): Display the codes for one case
21. Epilogue
22. Trace tables for this program
22.1. main()
22.2. Truths.__init__
22.3. Truths._lineCheck()
22.4. Truths.check()
22.5. Truths._permuter()
22.6. Truths._inputCheck()
22.7. Truths._caseCheck()
22.8. Truths._codeMatch()
22.9. Truths._uncovered()
22.10. Truths._showInputs()
22.11. Truths._overcovered()
22.12. Truths._oneCase()
23. Test diary
23.1. Logic defects
23.2. Type defects

1. Insuring case coverage in Cleanroom trace tables

This publication contains a lightweight literate program that is part of the author's practice of the Cleanroom software development methodology.

We use the term prime to mean a single module or “black box” that is the unit of design and verification in the Cleanroom methodology.

When verifying the correctness of a prime, it is often valuable to construct a trace table showing the state of various items during execution. Such a table can be used by the developer for self-verification, or as a visual aid during peer review.

For a prime that has only one route through it, one trace table suffices. However, when there are multiple routes through the code, it is necessary to construct a separate trace table for each possible route.

The purpose of the tracecase script is to insure that every possible route through the code has been covered.