Huangs Theorem
Huangs Theorem
APPLICATIONS: * The purpose of the node removal algorithm is to present one very generalized
concept- the path expression and way of getting it. * Every application follows this common pattern:
1. Convert the program or graph into a path expression. 2. Identify a property of interest and derive
an appropriate set of "arithmetic" rules that characterizes the property. ||Replace the link names by
the link weights for the property of interest. The path expression has now been converted to an
expression in some algebra, such as 1. Ordinary algebra, regular expressions, or boolean algebra. This
algebraic expression summarizes the property of interest over the set of allpaths. 2. Simplify or
evaluate the resulting "algebraic" expression to answer the question you asked
EAN PROCESSING TIME OF A ROUTINE: Given the execution time of all statements or instructions for
every link in a flowgraph and the probability for each direction for all decisions are to find the mean
processing time for the routine as a whole. The model has two weights associated with every link:
the processing time for tMhat link, denoted by T, and the probability of that link P. The arithmetic
rules for calculating the mean time
EAN PROCESSING TIME OF A ROUTINE: Given the execution time of all statements or instructions for
every link in a flowgraph and the probability for each direction for all decisions are to find the mean
processing time for the routine as a whole. The model has two weights associated with every link:
the processing time for tMhat link, denoted by T, and the probability of that link P. The arithmetic
rules for calculating the mean time
EXAMPLE 1 (PUSH / POP): ß Here is the Pu
sh/Pop Arithmetic:
* A rule specifies whether a condition should or should not be met for the rule to be satisfied. "YES"
means that the condition must be met, "NO" means that the condition must not be met, and "I"
means that the condition plays no part in the rule, or it is immaterial to that rule.
The action stub names the actions the routine will take or initiate if the rule is satisfied.
*If the action entry is "YES", the action will take place; if "NO", the action will not take place.
Action 1 will take place if conditions 1 and 2 are met and if conditions 3 and 4 are not met (rule 1) or
if conditions 1, 3, and 4 are met (rule 2). **"Condition" is another word for predicate. ** Decision-
table uses "condition" and "satisfied" or "met". Let us use "predicate" and TRUE / FALSE. **Now the
above translations become: 1*. Action 1 will be taken if predicates 1 and 2 are true and if predicates
3 and 4 are false (rule 1), or if predicates 1, 3, and 4 are true (rule 2). 2.* Action 2 will be taken if the
predicates are all false, (rule 3). 3*. Action 3 will take place if predicate 1 is false and predicate 4 is
true (rule 4). ** In addition to the stated rules, we also need a Default Rule that specifies the default
action to be taken when all other rules fail.
DECISION-TABLES AS BASIS FOR TEST CASE DESIGN: 1. The specification is given as a decision table or
can be easily converted into one. 2. The order in which the predicates are evaluated does not affect
interpretation of the rules or the resulting action - i.e., an arbitrary permutation of the predicate
order will not, or should not, affect which action takes place. 3. The order in which the rules are
evaluated does not affect the resulting action - i.e., an arbitrary permutation of rules will not, or
should not, affect which action takes place. 4. Once a rule is satisfied and an action selected, no
other rule need be examined. 5. If several actions can result from satisfying a rule, the order in which
the actions are executed doesn't matter.
FLOW GARPH ARE ABSTRACT REPRESENTATION*Flow graphs are being an abstract representation of
programs.*Any question about a program can be cast into an equivalent question about an
appropriate flowgraph.*Most software development, testing and debugging tools use flow graphs
analysis techniques.