Module Interface Documentation - Using The Trace Function Method (TFM)
David Lorge Parnas Marius Dragomiroiu Abstract The Trace Function Method (TFM) for documenting (both describing and specifying) interfaces for information hiding modules and components is
- described. We begin by explaining the motivation for the method. The concepts
- f event, event descriptor, and trace are defined. Basic functions on event
descriptors and traces are introduced. Finally, the method is illustrated on some simple examples.
Middle Road Software
David Parnas, 2010 March 30 15:14
- 1/47! !
! ! ! !
TFM slides Iowa State.pages
Outline Review of basic software documentation principles Modules and how they communicate Events and event descriptors Traces What the document looks like Completeness and consistency Examples
Middle Road Software
David Parnas, 2010 March 30 15:14
- 2/47! !
! ! ! !
TFM slides Iowa State.pages Needed: a way to describe software without Writing code.! 4 Software Reference Documentation! 5 Defining the required content of documents! 6 This Talk is Not about tabular expressions! 7 Document Roles! 8 Obligations of Those who Agree on a Specification! 9 Software Design Issues! 10 Earlier approaches to module interface documentation! 11 What’s wrong with Giving an Equivalent Program! 12 Strengths and Weaknesses of Various Approaches! 13 Readability! 14 Axiomatic vs. functional Aproaches! 15 What’s new in TFM! 16 Communication with Software Modules! 17 Events! 18 Event descriptors! 19 Traces! 20 Trace Function (TFM) Component Interface Documentation! 21 When is a trace-based document complete?! 22 When is a trace-based document consistent?! 23 What is a TFM specification?! 24 What is a TFM description?! 25 When is an implementation of a module correct?! 26 Modules that Create more than one Object! 27 Primitive Functions on Event Descriptors! 28 Primitive Functions on Traces! 29 Useful Function Generators! 30 Date Storage Module: Schematic View (optional)! 31 Date Storage Module: Variable Declarations! 32 Date Storage Module: Access Programs! 33 Date Storage Module: Auxiliary Functions! 34 Date Storage Module: Auxiliary Functions! 35 Output Functions! 36 Time storage module! 37 Output Functions! 38 stack With limited range and depth: Declarations! 40 stack With limited range and depth: Access Programs! 41 Stack: Auxiliary Functions! 42 Stack: Output variable functions! 43 Stack: Output variable functions! 44 Stack: Output variable functions! 45 What Can Be Done with TFM Documents! 46 Conclusions! 47
Middle Road Software
David Parnas, 2010 March 30 15:14
- 3/47! !
! ! ! !
TFM slides Iowa State.pages
Needed: A Way To Describe Software Without Writing Code. In 1969 my manager told me:
- We should not need to write code to tell a programmer
what the code they should write must do.
- A reviewer should be able to find out what a program is
supposed to do without studying the code.
- Someone who wants to use software should be able to
know what it does without reading the code. Later we learned that:
- If we have several interchangeable implementations, we
should be able to write down what they have in common.
Middle Road Software
David Parnas 2010 March 30 15:14
- 4 /47
- TFM slides Iowa State.pages