Transcript spc

EuroMPM
DECISION TABLES
1
Decision Tables
History
Describing decision rules
and decision procedures in a
tabular form goes back at
least to ancient Babylon,
where the rules for
EuroMPM
performing multiplication of
cuneiform numerals
were baked in clay tablets
for students.
Cuneiform script
2
Decision Tables
History
An abacus is a counting
frame, is a calculating tool
for performing arithmetical
processes, often constructed
as a wooden frame with
EuroMPM
beads sliding on wires.
The Babylonians used the
abacus as early as 2400 BC.
Abacus
3
Decision Tables
History
EuroMPM
Napier's bones
are an abacus
invented by John
Napier for
calculation of
products and
quotients of
numbers.
Napier´s bones
4
Decision Tables
History
Tabular forms for computer programming date back to the late
1950's and 1960’s when
• General Electric,
• the United States Air Force,
• Siemens
EuroMPM
and others worked on complex projects.
Decision tables were first used for program specifications,
leaving it to the programmers to translate the tables into
code by hand.
5
Decision Tables
EuroMPM
GE-200
1959-1966
Software included
• a compiler of GECOM language (a COBOL dialect with
many ALGOL features),
• TABSOL (a language based on decision tables),
• WIZ (an Algebraic compiler),
• FORTRAN II,
• GAP a translator for IBM 650 and LGP30
• a Report Generator.
http://www.feb-patrimoine.com/projet/ge200/ge200.htm
6
Decision Tables
COLUMBUS85
COLUMBUS85 supports program design and generative program
creation
in line with the principles of 'structured programming', including
decision tables.
In 'structured programming' a program is constructed as a hierarchy of procedures
EuroMPM
with only one entry and one exit, which in turn consist of 'structure blocks'. In
terms of their internal flow of control they can exist in one of only three forms
(sequence, selection, repetition). Decision tables are a special form of the
selection structure block. Structure blocks can be sequenced and nested in one
another. Structure lists are the best way of representing these forms.
http://solutions.fujitsu-siemens.com/software-catalog/product.php?id=200006412&lang=en&platform=all
7
http://manuals.fujitsu-siemens.com/fgm/fgm_us/sysfgm.col85.010.e.pdf
Decision Tables
Pioneering Software in the 1960s
Decision tables, past and present
Maurice Verhelst (Leuven)
The origin
of the decision table technique
dates back to November 1957 when General Electric
EuroMPM
initiated a research effort called the “Integrated Systems
Project”. They also developed a software tool, called
TABSOL, to convert the produced tables to a computer
program.
http://www.cwi.nl/events/2006/pioneer/abstracts.doc
8
Decision Tables
History
In the 1960’s and 1970’s decision table software was written for the
analysis of decision tables and for code generation from decision
tables.
EuroMPM
Dr. Reinhold Thurner, of the University of Zurich and Sodecon AG,
Zurich, work on DETAB – a DEcision TABle GeneraTor.
At mbp in Dortmund they created VORELLE. Dr. Horst Strunz
made contributions to this project and wrote the first textbook
on decision tables in Germany.
In the 1970’s and 1980’s such systems were used in all major
companies. The early decision table programs were written in
either mainframe assembly languages or COBOL or PL/1.
9
Decision Tables
History
EuroMPM
Horst Strunz 1977
10
Decision Tables
History
EuroMPM
The Canadian Standards Association issued a formal standard for
decision tables in 1970 (DECISION TABLES, CSA Standard
Z243.1-1970), which can be obtained through the American
National Standards Institute (ANSI) in the United States.
In Germany decision tables were introduced as national standard
DIN 66241 in 1978.
11
Decision Tables
History
EuroMPM
DIN 66241
12
Decision Tables
EuroMPM
History ???
http://www.informatik.uni-bremen.de/uniform/gdpa/methods/m-dtab.htm
13
Decision Tables
EuroMPM
History ???
http://www.qfdcapture.com/CPPDpaper/CPPDPaper.htm
14
Decision Tables
History
During the 1990’th decision tables disappeared in many
places.
The decision table software was not available on personal
computers. And some companies that were pioneers in decision
EuroMPM
table technology no longer exist – like mbp in Dortmund.
In the new century we have new initiatives for the application
of decision tables and new decision table software is available
like
PROLOGA or LT-ET
15
EuroMPM
Decision Tables
http://www.econ.kuleuven.be/prologa/
16
EuroMPM
Decision Tables
http://www.lohrfink.de/
17
Decision Tables
Other Approaches
IBM WebSphere
EuroMPM
DELTA Software Scout
18
Decision Tables
EuroMPM
WebSphere
http://publib.boulder.ibm.com/infocenter/dmndhelp/v6rxmx/index.jsp?topic=/com.ibm.wsps.adm.doc/doc/tbre_busiru_deletingbusirulerecord.html
19
Decision Tables
EuroMPM
WebSphere
http://publib.boulder.ibm.com/infocenter/dmndhelp/v6rxmx/index.jsp?topic=/com.ibm.wbit.help.br.ui.doc/topics/cdtable.html
20
EuroMPM
Decision Tables
http://www.d-s-t-g.com/neu/media/pdf/Facts_d/MT11026.pdf
21
Decision Tables
EuroMPM
Basics
Decision table - Wikipedia 22
Decision Tables
EuroMPM
Check Encashment 1
R1 R2 R3 R4 R5 R6
R7
R8
C1 Stick to Credit limit
Y
Y
Y
Y
N
N
N
N
C2 Good Payment Practice
Y
Y
N
N
Y
Y
N
N
C3 Promise of payment
Y
N
Y
N
Y
N
Y
N
A1 Encash check
X
X
X
X
X
X
X
-
A2 Not encash check
-
-
-
-
-
-
-
X
Decision Table of Check Encashment 1
23
Decision Tables
EuroMPM
Check Encashment 2
R1 R2 R3 R4
C1 Stick to Credit limit
Y
-
N
N
C2 Good Payment Practice
-
Y
N
N
C3 Promise of payment
-
-
Y
N
A1 Encash check
X
X
X
-
A2 Not encash check
-
-
-
X
Decision Table of Check Encashment 2
24
Decision Tables
IF….
Conditions
EuroMPM
THEN…
Actions
CONDITIONS BASES
CONDITION INDICATORS
ACTION BASES
ACTION INDICATORS
Text
Rules/Indicators
Basic Elements of a Decision Table
Decision table - Wikipedia 25
Decision Tables
Regelbezeichner
Rule Identifiers
BedingungsConditions
bezeichner
EuroMPM
AktionsActions
bezeichner
Name of Table
Tabellenbezeichnung
B1
B2
B3
B4
R1
R2
R3
R4
R5
A1
A2
A3
A4
Supplementary Elements of a Decision Table
26
Decision Tables
Limited Entry Decision Tables:
If in the columns of rules, only an element of the set
{Y, N, -, #; x, -}
is allowed, the table is called as Limited Entry Decision Table.
Y, N, - and # are the indicators for conditions.
X and – are the indicators for actions.
= DO NOT CARE
Y : YES
EuroMPM
N: NO
#
= UNDEFINED
X = ACTION TO BE TAKEN
= ACTION NOT TO BE TAKEN
27
Decision Tables
Limited Entry Decision Tables:
If in the columns of rules, only an element of the set
{Y, N, -, #; x, -}
is allowed, the table is called as Limited Entry decision Table.
!!!!! In a limited entry Decision Table,
EuroMPM
Max. Number of rules : 2n
(n: number of conditions)
28
Decision Tables
EuroMPM
Range of drive in the R1 R2 R3 R4 R5
construction of a crane
Lifting capacity <10
Y
Y
N
N
N
Lifting capacity 10-20
N
N
Y
Y
N
Lifting capacity >20
N
N
N
N
Y
Medium driving speed
Y
N
Y
N
-
High driving speed
N
Y
N
Y
-
Motor type A
X
-
-
-
-
Motor type B
-
X
-
-
-
Motor type C
-
-
X
-
-
Motor type D
-
-
-
X
-
-
X
Motor typeCrane
E example – limited entry- decision
- table
-
29
Decision Tables
EuroMPM
Range of drive in the R1 R2 R3 R4 R5
construction of a crane
Lifting capacity <10
Y
Y
N
N
N
Lifting capacity 10-20
N
N
Y
Y
N
Lifting capacity >20
N
N
N
N
Y
Medium driving speed
Y
N
Y
N
-
High driving speed
N
Y
N
Y
-
Motor type
A
B
C
D
E
Mixed Decision Table
30
Decision Tables
Range of drive in the
construction of a
crane
R1
R2
R3
R4
R5
Lifting Capacity
<10
<10
10-20
10-20
>20
medium
high
medium
high
-
A
B
C
D
E
Driving speed
EuroMPM
Motor type
Extended Decision Table
31
Decision Tables
Extended entry : Amount ? (<X, =>X and <Y, =>Y)
EuroMPM
Limited entry : 1. Amount <X ?
(Yes, No)
2. Amount =>X and <Y ? (Yes, No)
32
Decision Tables
Two Rules
Overlapping
Conditions
EuroMPM
Y
Y
Y
R1
R2
Y
-
Y
-
X
-
X
-
Y
Y
Y
Same Actions
Ambiguous Decision Tables
33
Decision Tables
Two Rules
Overlapping
Conditions
EuroMPM
Y
Y
Y
R1
R2
Y
-
Y
-
X
X
-
Y
Y
Y
Same
Actions
Different
Actions
Ambiguous Decision Tables with Contradictory rules
34
Decision Tables
EuroMPM
OUR TARGET
The aim of a decision table by analyzing and
documenting decisions is to build a complete and
confliction free Tables.
Our Target
35
Decision Tables
LOGIC OF DECISION TABLES
AND – Combination of Conditions
R1
C1
Y
AND
C2
R1:
If
Y
AND
C3
Y
EuroMPM
AND
C4
Y
C1 is
fulfilled
and
C2 is
fulfilled
and
C3 is
fulfilled
And
C4 is
fulfilled
Then
Combination of Conditions
36
Decision Tables
LOGIC OF DECISION TABLES
AND- Combination of Actions
R1
A1
X
AND
A2
X
AND
A3
R1:
X
EuroMPM
AND
A4
X
Combination of Actions
If
…………
Then A1 will
be and
A2 and
A3 and
A4 will
be
achieved
37
Decision Tables
OF DECISION TABELS
LOGIK LOGIC
DER ENTSCHEIDUNGSTABELLEN
Exklusiv-ODER-Verknüpfung
Regeln
Exclusive OR Connectionder
of Rules
bei Eintreffer-Tabellen
EuroMPM
Either
OR
OR
OR
Either
Either
Either
OR - Combination of Rules
38
Decision Tables
Else
R1
R2
C1
Y
Y
C2
Y
N
ELSE-rule covers the missing
condition combinations
C1
C3
Y
N
A1
X
-
C2
A2
X
X
C3
-
-
EuroMPM
A3
X
Y
Y
N
N
N
N
Y
N
Y
Y
N
N
N
Y
Y
N
Y
N
An example of Else-rule’s application
39
EuroMPM
Decision Tables
Orders 1
R1
R2
R3
R4
R5
R6
R7
R8
C1
Quantity ordered is
smaller than or equal to
maximum limit
Y
Y
Y
Y
N
N
N
N
C2
Customer is creditworthy
Y
Y
N
N
Y
Y
N
N
C3
Inventory is larger than
or equal to quantity
ordered.
Y
N
Y
N
Y
N
Y
N
A1
Ordered goods are
delivered.
X
-
-
-
-
-
-
-
A2
Development of a decision
2
Order is rejected
-table X
X
X
X
X
X
A3
Order is deferred
-
-
-
-
-
-
X
-
40
Decision Tables
EuroMPM
Orders 2
R1
R2
R3
R4 R5/ R7/
6
8
C1
Quantity ordered is smaller
than or equal to maximum
limit
Y
Y
Y
Y
N
N
C2
Customer is credit-worthy
Y
Y
N
N
Y
N
C3
Inventory is larger than or
equal to quantity ordered.
Y
N
Y
N
-
-
A1
Ordered goods are delivered.
X
-
-
-
-
-
A2
Order is rejected
-
-
X
X
X
X
A3
Order is deferred
-
X
-
-
-
-
Development of a decision table 3
41
Decision Tables
EuroMPM
Orders 3
R1 R2 R3 R4 R5R8
C1 Quantity ordered is smaller
than or equal to maximum
limit
Y
Y
Y
Y
N
C2 Customer is credit-worthy
Y
Y
N
N
-
C3 Inventory is larger than or
equal to quantity ordered.
Y
N
Y
N
-
A1 Ordered goods are
delivered.
X
-
-
-
-
A2 Order is rejected
Development of a decision table 4
X
X
X
A3 Order is deferred
-
-
-
-
X
42
EuroMPM
Decision Tables
1
2
3
4
C1
Quantity ordered is smaller
than or equal to maximum limit
Y
Y
Y
N
C2
Customer is credit-worthy
Y
Y
N
-
C3
Inventory is larger than or equal
to quantity ordered.
Y
N
-
-
A1
Ordered goods are delivered.
X
-
-
-
A2
Order is rejected
-
-
X
X
A3
Order is deferred
-
X
-
-
Development of a decision table 5
43
Decision Tables
EuroMPM
Shipment Processing
R1
R2
R3
R4
C1
Quantity ordered =< Maximum limit
Y
Y
Y
Y
C2
Customer is credit-worthy
Y
Y
N
-
C3
Quantity ordered =< Inventory
Y
N
A1
Ordered goods are delivered.
X
A2
Order is rejected
X
X
A3
Order is deferred
X
Decision table
44
Decision Tables
EuroMPM
STEPS OF DERIVING A DECISION TABLE FROM A TEXT
1. Check and analyze the text (The aim is to understand what
are the decision situations)
2. Mark the conditions
3. Mark the actions
4. List the conditions
5. List the actions
6. Check opportunities
 to group according to similar conditions and actions
 build classes
7. Order list of the conditions according to the cluster
8. Enter rules according to the clusters
9. Check
 Completeness
 Contradictions…
45
Decision Tables
EXAMPLE :
EuroMPM
Develop a complete limited entry decision table for the
following decision situation:
46
Decision Tables
Airfare
An airline offers only flights in Germany and Europe. Under special
conditions a discount is offered – a discount with respect to the
normal airfare.
Passengers older than 18 with destinations in Germany are offered a
discount at 20%, if the departure is not on a Monday or Friday. If
the passengers stay at least 6 days at the destination, an
additional discount of 10% is offered.
EuroMPM
For destinations outside of Germany passengers are offered a
discount of 25%, if the departure is not on a Monday or Friday.
Passengers older than 2 but younger than 18 years are offered a
discount of 40% for all destinations.
Children under 2 travel for free.
47
Decision Tables
EuroMPM
CONDITIONS
AGE: <2
2-18
DESTINATION: In Germany
DAY OF THE WEEK: Monday or Friday
STAY AT THE DESTINATION: More than six days
ACTIONS
100% Discount,
40% Discount
25% Discount
20% Discount
10% Discount
0% Discount
48
Decision Tables
R R R R R R
1 2 3 4 5 6
C1 Is the Passenger <2?
Y N N N N N
C2 Is the Passenger between 2 and 18?
-
Y N N N N
C3 Is the flight on Monday or Friday?
-
-
Y N N N
C4 Is the flight inside Germany?
-
-
-
N Y Y
C5 Will the passenger stay more than 6
-
-
-
-
Y N
A1 100 % Discount
X
-
-
-
-
-
A2 40 % Discount
-
X
-
-
-
-
A3 25 % Discount
-
-
-
X
-
-
A4 20 % Discount
-
-
-
-
X X
A5 10 % Discount
-
-
-
-
X
-
A6 0 % Discount
-
-
X
-
-
-
EuroMPM
days?
Decision Table of airlines example
49
Decision Tables
EuroMPM
Decision Table in PROLOGA
50
Decision Tables
Decision Table as XML
General information of program (title,
author, company, description)
EuroMPM
The program is consisted of 5 conditions,
6 actions, 6 rules and 6 columns.
Lists of conditions, actions and rules
51
Decision Tables
EuroMPM
Conditions as XML
52
Decision Tables
EuroMPM
Actions as XML
Rules as XML
53