Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Efficient Method of Rewriting Abbreviated Condition Expression Trees

IP.com Disclosure Number: IPCOM000116760D
Original Publication Date: 1995-Nov-01
Included in the Prior Art Database: 2005-Mar-31
Document File: 2 page(s) / 64K

Publishing Venue

IBM

Related People

Kleon, GC: AUTHOR [+2]

Abstract

The Cobol language supports constructs known as "Abbreviated Combined Relation Conditions". When simple or negated simple relation conditions are combined with logical connectives in a consecutive sequence such that a succeeding relation condition contains a subject or subject and relational operator that is common with the preceding relation condition, and no parentheses are used within such a consecutive sequence, any relation condition except the first may be abbreviated by: 1. The omission of the subject of the relation condition or 2. The omission of the subject and relational operator of the relation condition.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 53% of the total text.

Efficient Method of Rewriting Abbreviated Condition Expression Trees

      The Cobol language supports constructs known as "Abbreviated
Combined Relation Conditions".  When simple or negated simple
relation conditions are combined with logical connectives in a
consecutive sequence such that a succeeding relation condition
contains a subject or subject and relational operator that is common
with the preceding relation condition, and no parentheses are used
within such a consecutive sequence, any relation condition except the
first may be abbreviated by:
  1.  The omission of the subject of the relation condition or
  2.  The omission of the subject and relational operator of the
       relation condition.

Abbreviations formed in this manner are "Abbreviated Combined
Relation Conditions".

      The effect of using such abbreviations is as if the last
preceding stated subject were inserted in place of the omitted
subject, and the last stated relational operator were inserted in
place of the omitted relational operator.  This insertion of an
omitted subject and/or relational operator terminates once a complete
simple condition is encountered within a complex condition.

      The problem we solve here is efficiently transforming the
parser generated abbreviated condition tree to a form appropriate for
code generation.

      The solution consists of recursively performing the following
steps at relation condition, class condition, switch-status
condition, condition-name condition, sign condition and parenthesized
condition condition-expression subtrees as well as leaves
representing simple identifiers while traversing the parse tree in a
depth-first/left-right order:
  1.  If current subtree is not a relation condition, delete any
       inherited...