|
Home Up Notation Programming Rhapsodizing Unstructured List A 465 Project
| |
 | Warnier-Orr notation is one tool
that helps analysts and programmers make systems and programs that are
Correct. Structured Pseudocode is another tool that
we'll look at later. I like Warnier's notation best and find
that it helps new programmers to develop a well-structured mental
model required for work in information systems.
|
 |
Simple Lists of Output
Requirements, Data & Actions, and Input can
help get us started thinking about what is required in a
solution. Lists, when indented, can only show a simple sequence
& hierarchy of data & action requirements.
But lists are limited in describing
System Architecture. Computer Systems use logical structures
that select alternative Actions
depending on the value of the data that are being processed.
And, computer algorithms do a lot of repetitive Actions.
A notation for structured design of
systems
& programs needs to handle: Sequences, Alternative Selection, and
Repetition.
Warnier's notation, as adapted
into the B-Liner program, uses bullets, brackets, some parentheses,
and the 'exclusive or' symbol to clearly show sequences, alternative
selections, and loops that are components of well structured
algorithms.
|
 | To introduce Warnier-Orr diagrams,
here is the simple Payroll System above, using Warnier's notation
to show a structured view of the set of Actions from our black
box. It shows what the system needs to do each day, month, and
year to generate the required output keep the records accurate.
It does not show any detail for the algorithms needed in the scripts,
but we'll leave these out for the time being.

This is a 'high level' system
diagram that shows none of the Details about the sequences,
alternative selections, and loops that go into the system's
scripts.
But, it demonstrates how the system is
hierarchically organized and how each function is related logically
either by sequence, alternative selection, or repetition.
One of the strengths of Warnier's
notation is that it can be used for both high level design and for
detailed program design. We'll look more at the detailed program
design in class.
|
 | Many business processes are
calendar-driven, so the systems that handle the processes need to
be, too. So, following one-time startup activity of this payroll
system, the cycles of
the system are continuous, controlled by years, months, and days.
The First bullet at the left represents the entire
set of Actions of the system. This small system is 'broken down into' two
parts: Startup activity & Annual Operations, each of these shown
with it's own bullet.
When a Payroll System starts up, before
it can produce the first pay check, its 'code tables' need to be
loaded to describe everything about the system: earning codes, pay
cycles, deductions, what pension & insurance plans, &c, &c
about the company are defined. Employee records need to be
entered into the system, or 'taken on' from a previous system.
Payroll processing has an Annual cycle: at the
beginning of each year, before January 31, the IRS requires W-2 forms
reporting payroll data for the prior year to be provided for itself & for each
employee. And a W-3 form that accompanies
the W-2's is also sent to the IRS. So, at the beginning of each calendar
year, a Payroll Office is busy getting these forms prepared. A
payroll system needs to be sensitive to the Calendar Year (YYYY) and
repeat its annual cycles for each year that it operates.
The (YYYY) under the line Annual
Operations means that the actions in this bracket are repeated for
each year: 1999, 2000, 2001, & so on until the system is
abandoned. This is how Warnier's notation shows Loops. In
the logical construction of systems these 'controlling variables' are
quite important.
At the end of each year, tax tables are
likely to change so Year End activity includes finding & entered
all the applicable tax tables into the system so that the system will
be compliant with Payroll Regulations.
The next Cycle of operation within
Yearly is Monthly. Some activity begins each month: Preparation
of Quarterly reports is needed for the end of each quarter; Monthly
reports for each month are prepared in the first few days of the
following month.
Within each Monthly cycle of operation,
there are Daily
operations: The system's users need to be able to make additions
and changes to the 'code tables' and employees' records. As
changes occur in the Real World the computer records are maintained to
reflect the changes. Managers & employees will call with 'ad
hoc' requests for information stored in the system. YYYYMMDD, in
this diagram, refers to the Calendar Date: 20020101 is
January 1, 2002; 20021231 is December 31, 2002
Weekly Cycles have a routine where
Payroll Worksheets are printed, and Timesheet data are entered, then a
Payroll Edit Report is printed so that errors can be easily detected
before Checks are run. If there are Edit Errors (a logical
test), then the system's Users need to find the errors and correct
them. After any errors are corrected it is time to Print Checks
for: the Employees, the Bank that receives the Federal withholdings,
deductions, and payroll taxes; the State; the Insurance company; the
Pension Plans; and anybody else that gets paid, like the Court when an
employee's wages are garnished.
|
 | Here are the key points of
Warnier's notation:
Each statement in a Warnier diagram is
either an Action or a Logical Condition. They are structured into
Sequences, Alternative Selections, and Loops.
An Action, like Maintain Codes, may
have a bracket placed to its right that contains a more detailed
logical sequence that more completely shows how the action is
performed.
Unless an Alternative Selection or a
Loop alters the flow of Actions, one Action follows another in
Sequence. A sequence of actions may be listed under one bullet.
Alternatives in an alternative
selection each have a bullet of
their own, & they have a bracket to their right which contains the
Actions that will result if the Condition evaluates as True. If
there is more than one Alternative (if/then/else or case), each is separated from the prior
using an 'exclusive OR' symbol.
Loops also have a bullet and bracket of
their own, and are shown using a repetition
indicator in parenthesis (Like YYYY) under the bulleted Statement that
defines or controls the Loop. Whatever style is adapted, the
bulleted statement and statements in the bracket should show clearly
the type of loop (while, until, for/next) and what controls it.
|
 |
Later pages and classroom
demonstrations will address how Warnier's notation is applied to
program design.
|
 | Here are some web references
about Structure and Warnier's notation:
Kenneth Orr (the Orr in Warnier-Orr) has a good page about Warnier diagrams. I
haven't seen Orr's latest offerings about structure & object orientation but plan to
seek them out. Orr's earlier work, Structured Systems Development, 1977, is a
classic that I'm pleased to have discovered shortly after its introduction.
Here is a brief discussion about Warnier's brackets in
the midst of a technical website at University of Texas. Here is more from U of Tex in a Step By Step Method
which provides good insight about structure & object orientation.
Cern provides this in a dictionary page
about structure.
|
 | Varatek's B-liner is perhaps the simplest
way to draw Structured Notation. www.bliner.com
has an Educational Version that you can download for
free. Make sure to choose the Education Version, at the left
edge of the page, and not the 30-day Trial version or you'll run out
of license before the end of the semester.
Please, if you use the product in a production environment later, purchase the licensed
version for $79.95. Unless you need automation of SQL and other CASE-like functionality,
B-liner may be the only structured design tool you'll ever need. |
|
|