spinning globe The Cope CASE Tool

What is Cope?

Using Cope, the programmer records business rules in a tabular format. An advantage of Cope's tabular format is that the business rules the program uses are clearly displayed. A rule-based approach is especially useful for embedding expert systems logic in a Cobol shell.

Each table corresponds to a Cobol procedure, but a table is more concise and much easier to understand than Cobol code. In typical use, the programmer needs to write only a third as much as when writing structured code.

Cope converts the tables into highly optimised Cobol procedures. From each table, Cope generates a procedure with an execution path for each rule. Each path checks for the required conditions, then executes its required actions. Because the program's logical structure is computer-generated, you get exactly the paths specified by the rules, and no others.

Of course, if the set of rules is incomplete or inconsistent, Cope will tell you about it. This really helps with debugging and maintenance.

It is also possible to express sequential logic, using a method based on finite-state machines. There are well known methods of deriving a state machine to analyse any given input, provided it is of the right class. However, even if you don't know the theory, the concept itself is easy to understand and totally flexible.


Examples

In reading the examples, make allowance for the fact that you are not used to seeing programs in tabular form. At first, it looks confusing. To read a table, consider it one rule at a time.

Rules are read vertically downwards. A Y indicates a condition that must be true, an N indicates one that must be false. An X indicates an action to be executed when the rule applies. If more than one rule could apply, Cope chooses only the most specific one. Numbers in a table plug parameters into model conditions or actions. See the tutorial for a full explanation.



How to Write Cope Decision Tables

This is the user's tutorial and reference manual.

  1. TUTORIAL
    1. Introduction
    2. Limited Entry Tables
    3. Sequence of Rows
    4. Checking of Rules
    5. Multi-Choice Entry
    6. Substituting Numbers
    7. Review of Decision Tables.
    8. Linking Tables into a Program.
    9. Rule Groups
    10. The Else Group
    11. Summary of Groups
    12. Converting Flow-Charts to Decision Tables
    13. Program Testing
    14. Review of Testing
  2. REFERENCE
    1. Use of Coding Forms
    2. Format of Tables
    3. Generated Rows
    4. GO TO and STOP Statements
    5. Interpretation of Tables
    6. Cope Operation
    7. Using Cope Efficiently
    8. Getting Started
    9. Error Diagnostics

Experience with the Cope Decision Table Translator

This is a reprint of an old article from the Proceedings of the 8th Australian Computer Conference, 1978, Vol. 1, pp. 302--317.

Abstract

About ten years ago, decision tables enjoyed much the same place in programming folk-lore as is now enjoyed by structured programming. Some amazing success stories were recorded. But for most people, they failed to deliver the goods. Perhaps this may be attributed to the performance of the early automatic pre-processors. It may also be argued the DP community was not yet ready for the technology. Cope is a recently developed Cobol pre-processor which is fully compatible with structured programming techniques. It combines clarity of expression with efficient object code. The paper describes some interesting applications and experiences.

Downloading Cope

Cope is written in standard Cobol. If you have a Cobol compiler, you should be able to get Cope to work. There is some documentation within the program, which explains how to set it up and test it. It also contains many examples.

Click to download Click here to download the Cope source program.
If you decide to use Cope, please send me a nice postcard of where you live.