testplans

University of South Australia
Software Engineering Project – COMP 4003
Test Plans Draft
Limits of Computing Tools
Aim: To test if the elements are drawn to the screen
Input: drag each element on to the drawing canvas
Expected output: the elements will be display in the drawing canvas
Aim: To test the elements on the drawing canvas can be edited
Input: deleting and moving of elements
Expected output: the elements can be deleted or moved
Generation of State Diagrams from Transition Tables
Aim: To produce a state diagram from a transition table
Input: input values into a transition table
Expected output: state diagram drawn from the transition table
Test output:
0
Q2
Q1
Q1
Q3
Q1
Q2
Q3
Q4
1
Q3
Q4
Q4
Q1
Accept
No
No
Yes
No
0
Q2
Q1
1
1
1
Q4
0
1
Q3
0
Implementation of Conversion Algorithms
Aim: To convert a DFA to a NFA
Input: The DFA values into a transition table
Expected output: A NFA table
Aim: To convert a NFA to a DFA
Input: The NFA values into a transition table
Expected output: A DFA table
Nodes
Q1
Q2
Q3
Q4
a
Q2
b
Q4
Q1
Q3
DFA States
1
Set of NFA States
Q1
Q3
e
Q4
Q3
a
b
Q2,Q4,Q3 Q4,Q3
Accept State
No
No
Yes
No
accept
no
2
3
4
5
6
Q2,Q4,Q3
Q4, Q3
Q3
Q1,Q3
Ø
Q3
Q3
Ø
Q2,Q4,Q3
Ø
Q1,Q3
Q3
Q3
Q4,Q3
Ø
Yes
Yes
Yes
Yes
No
a,b
b
a
2
a
1
b
a
b
3
a
4
6
5
b
a,b
Minimising DFAs
Aim: To convert DFA transition table into it’s minimized DFA diagram
Input: The DFA transition table
Expected output: Minimized DFA diagram
Q1
Q2
Q3
Q4
Q5
Q6
Q7
0
Q2
Q4
Q6
Q4
Q6
Q4
Q6
1
Q3
Q5
Q7
Q5
Q7
Q5
Q7
Accept Node
No
No
No
No
No
Yes
No
Q1
Q2
Q3
Q4
Q5
Q6
Q7
0
Q2
Q4
Q6
Q4
Q6
Q4
Q6
1
Q3
Q5
Q7
Q5
Q7
Q5
Q7
Class
A
A
A
A
A
B
A
Q1
Q2
Q3
Q4
Q5
Q6
Q7
0
A
A
B
A
B
A
B
1
A
A
A
A
A
A
A
Class
C
C
D
C
D
A
D
Q1
Q2
Q3
Q4
Q5
Q6
Q7
0
C
C
A
C
A
C
A
1
D
D
D
D
D
D
D
Class
E
E
F
E
F
A
F
b
a
F
b
E
a
b
a
A
Regular Expressions
Aim: To find the minimum string of a Regular Expression
Input: Regular Expression
Expected output: A minimum string of the regular expression
Test input: (1 U 01)*1
Output: 11
Aim: To find the strings of the regular expression less than a certain length
Input: regular expression and the maximum length of strings
Expected output: The strings of the regular expression up to the certain length
Test input: (1 U 01)*1
Maximum length string 3: 111, 11, 011,
Chomsky Normal Form
Aim: To the get the Chomsky Normal Form from the CFG
Input: CFG
Expected output: The Normal Form of the CFG
Test input:
S -> ASA | 0B
A -> B|S
B -> 1|e
Output
Step 1
S1 -> S
S -> ASA | 0B
A -> B | S
B -> 1 | e
Step 2
S1 -> S
S-> ASA | 0B | 0
A -> B | S | e
B -> 1
Step 3
S1 -> S
S -> ASA | 0B | 0 | AS | SA | S
A -> B | S
B -> 1
Step 4
S1 ->S
S -> ASA | 0B | 0 | AS | SA
A -> B | S
B -> 1
Step 5
S1 -> ASA | 0b | 0 | AS |SA
S -> ASA | 0B | 0 | AS | SA
A -> B | S
B -> 1
Step 6
S1 -> ASA | 0B | 0 | AS | SA
S -> ASA | 0B | 0 | AS | SA
A -> S | 1
B -> 1
Step 7
S1 -> ASA | 0B | 0 | AS | SA
S -> ASA | 0B | 0 | AS | SA
A -> 1 | ASA | 0B | 0 | AS | SA
B -> 1
Step 8
S1 -> AA1 | UB | 0 | AS | SA
S -> AA1 | UB | 0 | AS | SA
A -> 1 | ASA | UB | 0 | AS | SA
A1 -> SA
U -> 0
B -> 1
Simulation Tools
Aim: To run through the nodes of a DFA by following a certain string
Input: A string
Expected output: The highlighting of the path to complete the string
Test input: 0110
0
Q1
Q2
0
1
1
1
Q4
0
Q3
1
0
Path: q1 - > q2 -> q4 -> q1 -> q2, not accept
Program Output
Aim: To save the diagram or table to a file or copied pasteable
Input: diagram or table
Expected output: a file is created or copied pasteable