ICS 121: Other design and specification techniques
 Overview
 
 
  - Why use other techniques?
 
  - Structured English
 
  - Prototypes and Mockups
 
  - First-order predicate logic
 
  - Decision tables and trees
 
  - Algebraic specifications
 
 
  
 Why use other techniques?
 
 
  - UML is a union of many notations, so it supports many techniques,
   but not all.
 
  - Not all problems and pojects are the same.  
   
    - Not all techniques are
   applicable to all problems.
 
    - Some techniques take more work
   than others.  
 
    - Some techniques require special skills
 
   
   
  - You need to choose the right
   notation for the problem at hand.  
  
 
    
 
  
  
 Structure English
 
 
  - You can specify any idea in plain English.
 
  - It is hard to start with a blank page: what should you write?
  what are the important questions to ask? how can you specify things
  precisely?
 
  
  - Structure English approaches use templates that ask the right
questions.  They reduce some writing tasks to just multiple-choice
filling in blanks.
 
  
  - Structured English templates can be reused and enhanced across
  projects
 
  - They require little training.  Many stakeholders can author and
  review.
 
  - Example: ReadySET templates
 
  
 
  
  
 Prototypes and Mockups
 
 
  - Show me how it will look.
 
  - Evolutionary or throw-away prototypes
 
  
  - User interface mockups.
 
  
  
  - Must be skilled to build mockup or prototypes.  Must keep
  purpose in mind.  Many stakeholders can review.
 
  - Example: HTML mockup
  methodology
 
  
 
  
  
 First-order Predicate Logic
 
 
  - First-order predicate logic is just conditional expressions:
   
    - Boolean variables
 
    - AND, OR, NOT, EQUALS
 
    - IMPLIES
 
   
   
  - Example: (standing = senior) OR (honors) IMPLIES priority-enrollment
 
  
  - Conditions are very precise.  Simple conditions are concise, but
  complex conditions can be very hard to understand.
 
  - Given a list of conditions, it is hard to tell if something is
  missing
 
  
  - They require training and practice to read and write.  
 
  
 
  
  
 Decision tables and trees
 
 
  - Start with a logical condition in mind.
 
  - Select one variable
   
    - Write down all important values or ranges
 
    - Now, consider the condition, assuming that variable is bound
    to that value
 
    - If the remaining condition is simple, write it down now
 
    - Else repeat whole loop  with another variable
 
   
   
  
  - At each step, you can make a new node in a tree, or choose rows
  and columns in a table.
 
  
  - Decision trees can be just as precise as first-order predicate
  logic, but they are easier for more people to read and write.
 
  - It is easier to catch missing cases, because they appear as a
  blank cell in the table
 
  - Example: priority
  enrollment
 
  
 
  
  
 Algebraic specifications
 
 
  - Specify the precise operations on a data structure using
  mathematical equations.
 
  - Each equation says that two expressions are equal.  Usually the
  left-hand-side has the operation you are trying to define, and the
  right-hand-side breaks it down into simpler parts.
 
  
  - Algebraic specifications can be very precise and concise.
 
  - They can be used for a wide range of problems, but they don't
  scale up well.
 
  - They require a lot of training to author and review.
 
  - Example: 
   
    - Consider the following operations on a String datatype:
 
    - New() -> String
 
    - Append(String, String) -> String
 
    - Add(String, Char) -> String
 
    - Append(String, String) -> String
 
    - Length(String) -> Integer
 
    - Equal(String, String) -> Boolean
 
    - Append(New(), s) = s
 
    - Append(s, New()) = s
 
    - Append(s1, Append(s2, s3)) = Append(Append(s1, s2), s3)
 
    - Append(s1, Add(s2, c)) = Add(Append(s1,s2), c)
 
    - Length(New()) = 0
 
    - Length(Add(s, c)) = Length(s) + 1
 
    - Length(Append(s1, s2)) = Length(s1) + Length(s2)
 
    - Equal(New(), New()) = True
 
    - Equal(New(), Add(s, c)) = False
 
    - Equal(New(), Append(s1, s2)) = False
 
    - Equal(Add(s1, c), Add(s2, c)) = Equal(s1, s2)
 
   
   
  
 
  
  
  
 
example use case templatesample test plan templateProject plan template