Correct By Design
1 Correct By Design
- Correct By Design i.e., "Correct By Intention/Effort" is a core
idea of this course.
- How do we judge if a design is "correct"?
- Particularly, in the absence of specs? [Cannot]
- Is it a judge/jury system? [Yes]
- A design D satisfies/ meets a spec S
- This can be precisely stated, S \(\models\) D
- A spec S is consistent with a requirements document R
- This will remain in the judge/jury system.
2 Design D satisfies Spec S, S \(\models\) D
- Def: D "satisfies" S, notationally S \(\models\) D. Every property of specs
S can be observed in D. Not necessarily vice versa.
- S is written in a spec language, SL
- D is written in a design language, DL
- SL and DL: Plenty in research literature, but not in wide use
- S \(\models\) D1, S \(\models\) D2, …, S \(\models\) Dn, … [Multiple designs meet a
spec S]
- We will use: Discrete math and Logic.
2.1 Satisfies v Models
- We use this symbol \(\models\) and call it "models".
- We can read the above as: S models D.
- Models suggests abstraction.
- Satisfies suggests adding concrete details.
3 Design Space Hierarchy
- Design D satisfies Spec S, S \(\models\) D
- D2 refines D1 versus D2 is an alternate design cf D1
- refines: provides more detail
- refines: gets closer to the implementation language
- alternate: explores a different design idea
- alternate: better in some spec axes, worse in others
- Design Levels S \(\models\) D1 \(\models\) D2 | … \(\models\) Dn \(\models\) I
- In general, this is a tree with many leaves
- Siblings are alternates.
- One path from the root to an implementation: S \(\models\) D1 \(\models\) D2 |
… \(\models\) Dn \(\models\) I
- Implementation I: Source Code in a PL
- Can/Should we have levels in Specs? Yes! S \(\models\) S1 \(\models\) S2 … \(\models\) Sk
Copyright © 2018 •
www.wright.edu/~pmateti 2018-09-24