Decision tables are a concise visual representation for specifying which actions to perform depending on given conditions. Decision table is the term used for a
Control table
Control tables are tables that control the control flow or play a major part in program control. There are no rigid rules about the structure or content of a control table—its qualifying attribute is its ability to direct control flow in some w ...
or
State-transition table
In automata theory and sequential logic, a state-transition table is a table showing what state (or states in the case of a nondeterministic finite automaton) a finite-state machine will move to, based on the current state and other inputs. It i ...
in the field of
Business process modeling
Business process modeling (BPM) is the action of capturing and representing business processes, processes of an enterprise (i.e. modeling them), so that the current business processes may be analyzed, applied securely and consistently, improved, ...
; they are usually formatted as the transpose of the way they are formatted in
Software engineering
Software engineering is a branch of both computer science and engineering focused on designing, developing, testing, and maintaining Application software, software applications. It involves applying engineering design process, engineering principl ...
.
Overview
Each decision corresponds to a variable, relation or predicate whose possible values are listed among the condition alternatives. Each action is a procedure or operation to perform, and the entries specify whether (or in what order) the action is to be performed for the set of condition alternatives the entry corresponds to.
To make them more concise, many decision tables include in their condition alternatives a
don't care
In digital logic, a don't-care term (abbreviated DC, historically also known as ''redundancies'', ''irrelevancies'', ''optional entries'', ''invalid combinations'', ''vacuous combinations'', ''forbidden combinations'', ''unused states'' or ''l ...
symbol. This can be a hyphen
or blank,
although using a blank is discouraged as it may merely indicate that the decision table has not been finished. One of the uses of decision tables is to reveal conditions under which certain input factors are irrelevant on the actions to be taken, allowing these input tests to be skipped and thereby streamlining decision-making procedures.
Aside from the basic four quadrant structure, decision tables vary widely in the way the condition alternatives and action entries are represented. Some decision tables use simple true/false values to represent the alternatives to a condition (similar to if-then-else), other tables may use numbered alternatives (similar to switch-case), and some tables even use fuzzy logic or probabilistic representations for condition alternatives.
In a similar way, action entries can simply represent whether an action is to be performed (check the actions to perform), or in more advanced decision tables, the sequencing of actions to perform (number the actions to perform).
A decision table is considered ''balanced''
or ''complete''
if it includes every possible combination of input variables. In other words, balanced decision tables prescribe an action in every situation where the input variables are provided.
Example
The limited-entry decision table is the simplest to describe. The condition alternatives are simple Boolean values, and the action entries are check-marks, representing which of the actions in a given column are to be performed.
The following balanced decision table is an example in which a technical support company writes a decision table to enable technical support employees to efficiently diagnose printer problems based upon symptoms described to them over the phone from their clients.
This is just a simple example, and it does not necessarily correspond to the reality of printer troubleshooting. Even so, it demonstrates how decision tables can scale to several conditions with many possibilities.
Software engineering benefits
Decision tables, especially when coupled with the use of a
domain-specific language
A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains. There are a wide variety of DSLs, ranging ...
, allow developers and policy experts to work from the same information, the decision tables themselves.
Tools to render nested if statements from traditional programming languages into decision tables can also be used as a debugging tool.
Decision tables have proven to be easier to understand and review than code, and have been used extensively and successfully to produce specifications for complex systems.
History
In the 1960s and 1970s a range of "decision table based" languages such as
Filetab were popular for business programming.
Program embedded decision tables
Decision tables can be, and often are, embedded within computer programs and used to "drive" the logic of the program. A simple example might be a
lookup table
In computer science, a lookup table (LUT) is an array data structure, array that replaces runtime (program lifecycle phase), runtime computation of a mathematical function (mathematics), function with a simpler array indexing operation, in a proc ...
containing a range of possible input values and a
function pointer
A function pointer, also called a subroutine pointer or procedure pointer, is a pointer referencing executable code, rather than data. Dereferencing the function pointer yields the referenced function, which can be invoked and passed arguments ...
to the section of code to process that input.
Control tables
Multiple conditions can be coded for in similar manner to encapsulate the entire program logic in the form of an "executable" decision table or
control table
Control tables are tables that control the control flow or play a major part in program control. There are no rigid rules about the structure or content of a control table—its qualifying attribute is its ability to direct control flow in some w ...
. There may be several such tables in practice, operating at different levels and often linked to each other (either by pointers or an index value).
Implementations
*
Filetab, originally from the
NCC
* DETAB/65, 1965, ACM
* FORTAB from Rand in 1962, designed to be imbedded in FORTRAN
* A
Ruby
Ruby is a pinkish-red-to-blood-red-colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapph ...
implementation exists using
MapReduce
MapReduce is a programming model and an associated implementation for processing and generating big data sets with a parallel and distributed algorithm on a cluster.
A MapReduce program is composed of a ''map'' procedure, which performs filte ...
to find the correct actions based on specific input values.
[Alexander Williams (2015)]
"Ruby decision table parser"
/ref>
See also
* Decision tree
A decision tree is a decision support system, decision support recursive partitioning structure that uses a Tree (graph theory), tree-like Causal model, model of decisions and their possible consequences, including probability, chance event ou ...
s
* Case based reasoning
* Cause–effect graph
* Dominance-based rough set approach
The dominance-based rough set approach (DRSA) is an extension of rough set theory for multi-criteria decision analysis (MCDA), introduced by Greco, Matarazzo and Słowiński.
Greco, S., Matarazzo, B., Słowiński, R.: Rough sets theory for multi- ...
* DRAKON
DRAKON () is a Free and open-source software, free and open source algorithmic visual programming language, visual programming and modeling language developed as part of the defunct Soviet Union Buran program, Buran space program in 1986 ...
* Karnaugh-Veitch diagram
* Many-valued logic
Many-valued logic (also multi- or multiple-valued logic) is a propositional calculus in which there are more than two truth values. Traditionally, in Aristotle's Term logic, logical calculus, there were only two possible values (i.e., "true" and ...
* Semantic decision table
* Decision Model and Notation
In business analysis, the Decision Model and Notation (DMN) is a standard published by the Object Management Group.OMG standard "Decision Model and Notation (DMN)"current version/ref> It is a standard approach for describing and modeling repeatable ...
* Truth table
A truth table is a mathematical table used in logic—specifically in connection with Boolean algebra, Boolean functions, and propositional calculus—which sets out the functional values of logical expressions on each of their functional arg ...
References
Further reading
* Dwyer, B. and Hutchings, K. (1977) "Flowchart Optimisation in Cope, a Multi-Choice Decision Table" Aust. Comp. J. Vol. 9 No. 3 p. 92 (Sep. 1977).
* Fisher, D.L. (1966) "Data, Documentation and Decision Tables" Comm ACM Vol. 9 No. 1 (Jan. 1966) p. 26–31.
* General Electric Company (1962) GE-225 TABSOL reference manual and GF-224 TABSOL application manual CPB-l47B (June 1962).
* Grindley, C.B.B. (1968) "The Use of Decision Tables within Systematics" Comp. J. Vol. 11 No. 2 p. 128 (Aug. 1968).
* Jackson, M.A. (1975) Principles of Program Design Academic Press
* Myers, H.J. (1972) "Compiling Optimised Code from Decision Tables" IBM J. Res. & Development (Sept. 1972) p. 489–503.
* Pollack, S.L. (1962) "DETAB-X: An improved business-oriented computer language" Rand Corp. Memo RM-3273-PR (August 1962)
* Schumacher, H. and Sevcik, K.C. (1976) "The Synthetic Approach to Decision Table Conversion" Comm. ACM Vol. 19 No. 6 (June 1976) p. 343–351
* CSA, (1970): Z243.1–1970 for Decision Tables, Canadian Standards Association
* Jorgensen, Paul C. (2009) Modeling Software Behavior: A Craftsman's Approach. Auerbach Publications, CRC Press. Chapter 5.
External links
RapidGen Software
For Windows, Unix, Linux and OpenVMS versions of decision table based programming tools and compilers
LogicGem Software
For Windows decision table processor for perfecting logic and business rules
LF-ET Software
For Windows, Unix, Linux a decision table editor, program generator and test case generator
A Decision Table Example
{{Decision theory
Software testing
Decision analysis