Appendix A: System Routines — Logic
737
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
lead_disjunct_term_index
Declaration:
EStackIndex
lead_disjunct_term_index
(EStackIndex
i
)
Category(ies):
Logic
Description:
Determines the lead disjunct term of the expression indexed by
i
.
Internally-simplified disjuncts have the most main Boolean term shallowest,
with less main terms deeper. Also, the lead Boolean term of an
internally-simplified disjunct is never a disjunct.
Inputs:
i
— Index of the top tag of an internally-simplified Boolean expression.
Outputs:
If
i
indexes an OR_TAG, returns the index of the operand just below it.
Otherwise returns
i
.
Assumptions:
None
Side Effects:
None
Availability:
On AMS 2.02 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: remaining_conjuncts_index, lead_conjunct_factor_index,
remaining_disjuncts_index
Example:
If i indexes the internally-simplified expression
(b or a) or c
then
lead_disjunct_term_index
(i) returns index(a).
If i indexes the internally-simplified expression
x > 3
then
lead_disjunct_term_index
(i) returns index(x > 3).
void push_but_disjunct_term (EStackIndex i, EStackIndex j)
/* i indexes a (perhaps degenerate) disjunct and j == i or j indexes one of its
remaining terms.
Pushes onto the estack the disjunct without the lead term of j.
*/
{ if (i == j)
push_expression (remaining_disjuncts_index (i));
else
{
push_but_disjunct_term (remaining_disjuncts_index (i), j);
and_onto_top (lead_disjunct_term_index (i));
}
}