The Cope CASE Tool
What is Cope?
- Cope is a CASE tool that converts business rules into efficient
Cobol programs.
- Cope cuts procedure division coding by a factor of three,
and improves documentation!
- Cope is written in Cobol, so it is completely portable.
It is also free.
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.
- TUTORIAL
- Introduction
- Limited Entry Tables
- Sequence of Rows
- Checking of Rules
- Multi-Choice Entry
- Substituting Numbers
- Review of Decision Tables.
- Linking Tables into a Program.
- Rule Groups
- The Else Group
- Summary of Groups
- Converting Flow-Charts to Decision Tables
- Program Testing
- Review of Testing
- REFERENCE
- Use of Coding Forms
- Format of Tables
- Generated Rows
- GO TO and STOP Statements
- Interpretation of Tables
- Cope Operation
- Using Cope Efficiently
- Getting Started
- Error Diagnostics
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 here to download the Cope source program.
If you decide to use Cope, please send
me
a nice postcard of where you live.