Predicate Interpretation
The simplest predicate depends only on input variables
Example 1:
If x1 and x2 are inputs, the predicate might be "x1 + x2 >= 7", given the values of x1 and x2, the direction taken through the decision is based on the predicate determined at input time and does not depend on processing
Example 2:
Another example, assume a predicate "x1 + y >= 0", that along a path prior to reaching this predicate we had the assignment statement "y = x2 + 7", although our predicate depends on processing, we can substitute the symbolic expression for 'y' to obtain an equivalent predicate "x1 + x2 + 7 >= 0"
The act of symbolic substitution of operations along the path in order to express the predicate solely in terms of the input vector is called predicate interpretation
Some times the interpretation may depend on the path
Example
INPUT X
O X GOTO A,B,C...
A:Z:=7@GOTO HEM
B:Z:=7@GOTO HEM
C:Z=7@GOTO HEM
-----------
HEM: DO SOMETHING
-----------------------
HEN: IF Y + Z > 0 GOTO ELL ELSE GOTO EMM
The predicate interpretation at HEN depends on the path we took through the first multiway branch it yields for the three cases respectively, if Y+7>0, Y-7>0,Y>0
The path predicates are the specific form of the predicates of the decisions along the selected path after interpretation
Example 1:
If x1 and x2 are inputs, the predicate might be "x1 + x2 >= 7", given the values of x1 and x2, the direction taken through the decision is based on the predicate determined at input time and does not depend on processing
Example 2:
Another example, assume a predicate "x1 + y >= 0", that along a path prior to reaching this predicate we had the assignment statement "y = x2 + 7", although our predicate depends on processing, we can substitute the symbolic expression for 'y' to obtain an equivalent predicate "x1 + x2 + 7 >= 0"
The act of symbolic substitution of operations along the path in order to express the predicate solely in terms of the input vector is called predicate interpretation
Some times the interpretation may depend on the path
Example
INPUT X
O X GOTO A,B,C...
A:Z:=7@GOTO HEM
B:Z:=7@GOTO HEM
C:Z=7@GOTO HEM
-----------
HEM: DO SOMETHING
-----------------------
HEN: IF Y + Z > 0 GOTO ELL ELSE GOTO EMM
The predicate interpretation at HEN depends on the path we took through the first multiway branch it yields for the three cases respectively, if Y+7>0, Y-7>0,Y>0
The path predicates are the specific form of the predicates of the decisions along the selected path after interpretation
Post a Comment
Post a Comment