Challenges with Natural Language:
- Designers often start by expressing specifications in their natural language, like English.
- However, natural-language specifications are often lengthy, vague, and ambiguous, making them difficult to prove correct, consistent, or complete.
Formal and Semi-Formal Languages:
- To overcome these challenges, formal and semi-formal languages are employed.
- These languages have a defined grammar and procedures to determine if a string adheres to the language.
Various Specification Methods:
- Grammars:
- Used to specify textual commands or expressions that a program should understand.
- For example, Backus-Naur form (BNF) is often used in computer programming languages.
- Menu-Selection and Dialog-Box Trees:
- Involves constructing trees that guide designers and users in making selections.
- Online tools and simple drawing tools help visualize the entire tree.
- Transition Diagram:
- Uses nodes to represent system states and links between nodes to depict possible transitions.
- Each link is labeled with the user action and possible computer responses.
- Statecharts:
- Statecharts are diagrams with nested roundtangles that group related actions and transitions.
- They are useful for specifying interfaces, offering features like concurrency and external interrupt events.