Turing is a
high-level
High-level and low-level, as technical terms, are used to classify, describe and point to specific goals of a systematic operation; and are applied in a wide range of contexts, such as, for instance, in domains as widely varied as computer scienc ...
,
general-purpose programming language developed in 1982 by
Ric Holt and
James Cordy
James Reginald Cordy (born January 2, 1950) is a Canadian computer scientist and educator who is Professor Emeritus in the School of Computing at Queen's University. As a researcher he is most recently active in the fields of source code analy ...
, at
University of Toronto in Ontario, Canada. It was designed in order to help students taking their first computer science course learn how to code. Turing is a descendant of
Pascal
Pascal, Pascal's or PASCAL may refer to:
People and fictional characters
* Pascal (given name), including a list of people with the name
* Pascal (surname), including a list of people and fictional characters with the name
** Blaise Pascal, Fren ...
,
Euclid, and
SP/k
SP/k is a programming language developed circa 1974 by R.C. Holt, D.B. Wortman, D.T. Barnard and J.R. Cordy as a subset of the PL/I programming language designed for teaching programming. It was used for about a decade at over 40 universities, ...
that features a clean syntax and precise machine-independent semantics.
Turing 4.1.0 is the latest stable version of Turing. Turing 4.1.1 and Turing 4.1.2 does not allow stand alone
.exe
.exe is a common filename extension denoting an executable file (the main execution point of a computer program) for Microsoft Windows, OS/2, and DOS.
File formats
There are numerous file formats which may be used by a file with a extensi ...
files to be created and versions before Turing 4.1.0 have outdated syntax and outdated functions.
Overview
Named after British computer scientist
Alan Turing, Turing is used primarily as a teaching language at the high school and university level. Two other versions exist,
Object-Oriented Turing
Turing is a high-level programming language, high-level, general-purpose programming language developed in 1982 by Ric Holt and James Cordy, at University of Toronto in Ontario, Canada. It was designed in order to help students taking their firs ...
and
Turing Plus, a systems programming variant. In September 2001, "Object Oriented Turing" was renamed "Turing" and the original Turing was renamed "Classic Turing". Turing is no longer supported by Holt Software Associates in
Toronto, Ontario. Currently,
Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
is the only supported platform. Turing is widely used in high schools in
Ontario as an introduction to programming.
On November 28, 2007, Turing, which was previously a commercial programming language, became freeware, available to download from the developer's website free of charge for personal, commercial, and educational use.
The makers of Turing, Holt Software Associates, have since ceased operations, and Turing has seen no further development since November 25, 2007.
Syntax
Turing is designed to have a very lightweight, readable, intuitive syntax. Here is the entire
Hello World!
''Hello'' is a salutation or greeting in the English language. It is first attested in writing from 1826. Early uses
''Hello'', with that spelling, was used in publications in the U.S. as early as the 18 October 1826 edition of the ''Norwich C ...
program in Turing with
syntax highlighting:
put
"Hello World!"
Turing avoids semicolons and braces, using explicit end markers for most language constructs instead, and allows declarations anywhere. Here is a complete program defining and using the traditional
recursive function to calculate a
factorial
In mathematics, the factorial of a non-negative denoted is the product of all positive integers less than or equal The factorial also equals the product of n with the next smaller factorial:
\begin
n! &= n \times (n-1) \times (n-2) \t ...
.
*comment*% Accepts a number and calculates its factorial
function
factorial (
n: int) : real
if
n = 0 then
result 1
else
result
n *
factorial (
n - 1)
end if
end
factorial
var
n: int
loop
put
"Please input an integer: " ..
get
n
exit when
n >= 0
put
"Input must be a non-negative integer."
end loop
put
"The factorial of ",
n,
" is ",
factorial (
n)
Open implementations
Currently, there are two open source alternative implementations of Turing: Open Turing, an open source version of the original interpreter, and TPlus, a native compiler for the concurrent systems programming language variant
Turing Plus. OpenT, a project to develop a compiler for Turing, is no longer in development.
Open Turing
Open Turing is an open-source implementation of the original Turing interpreter for Windows written by Tristan Hume. It includes speed improvements, new features such as OpenGL 3D and a new code editor. It is fully backwards compatible with the closed-source implementation.
TPlus
TPlus is an open-source implementation of original (non-Object-Oriented) Turing with systems programming extensions developed at the University of Toronto and ported to Linux, Solaris and Mac OS X at
Queen's University Queen's or Queens University may refer to:
*Queen's University at Kingston, Ontario, Canada
*Queen's University Belfast, Northern Ireland, UK
**Queen's University of Belfast (UK Parliament constituency) (1918–1950)
**Queen's University of Belfast ...
in the late 1990s. TPlus implements Turing+ (
Turing Plus), a concurrent systems programming language based on the original Turing programming language. Some, but not all, of the features of Turing Plus were eventually subsumed into the present
Object-Oriented Turing
Turing is a high-level programming language, high-level, general-purpose programming language developed in 1982 by Ric Holt and James Cordy, at University of Toronto in Ontario, Canada. It was designed in order to help students taking their firs ...
language. Turing Plus extends original Turing with
processes
A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic.
Things called a process include:
Business and management
*Business process, activities that produce a specific se ...
and
monitors
Monitor or monitor may refer to:
Places
* Monitor, Alberta
* Monitor, Indiana, town in the United States
* Monitor, Kentucky
* Monitor, Oregon, unincorporated community in the United States
* Monitor, Washington
* Monitor, Logan County, West Vir ...
(as specified by
C.A.R. Hoare
Sir Charles Antony Richard Hoare (Tony Hoare or C. A. R. Hoare) (born 11 January 1934) is a British computer scientist who has made foundational contributions to programming languages, algorithms, operating systems, formal verification, and c ...
) as well as language constructs needed for systems programming such as binary input-output, separate compilation, variables at absolute addresses, type converters and other features.
Turing+
Turing+ (Turing Plus) is a
concurrent systems programming language based on the Turing programming language designed by
James Cordy
James Reginald Cordy (born January 2, 1950) is a Canadian computer scientist and educator who is Professor Emeritus in the School of Computing at Queen's University. As a researcher he is most recently active in the fields of source code analy ...
and
Ric Holt, then at the
University of Toronto, Canada, in 1987. Some, but not all, of the features of Turing+ were eventually subsumed into
Object-Oriented Turing
Turing is a high-level programming language, high-level, general-purpose programming language developed in 1982 by Ric Holt and James Cordy, at University of Toronto in Ontario, Canada. It was designed in order to help students taking their firs ...
. Turing+ extended original Turing with processes and
monitors (as specified by
C.A.R. Hoare
Sir Charles Antony Richard Hoare (Tony Hoare or C. A. R. Hoare) (born 11 January 1934) is a British computer scientist who has made foundational contributions to programming languages, algorithms, operating systems, formal verification, and c ...
) as well as language constructs needed for systems programming such as binary input-output, separate compilation, variables at absolute addresses, type converters and other features.
Turing+ was explicitly designed to replace
Concurrent Euclid
Concurrent Euclid (ConEuc) is a concurrent descendant of the Euclid programming language designed by James Cordy and Ric Holt, then at the University of Toronto, in 1980. ConEuc was designed for concurrent, high performance, highly reliable sys ...
in systems-programming applications. The
TUNIS operating system, originally written in Concurrent Euclid, was recoded to Turing+ in its
MiniTunis implementation. Turing+ has been used to implement several production software systems, including the
TXL programming language.
Object-Oriented Turing
Object-Oriented Turing is an extension of the Turing programming language and a replacement for
Turing Plus created by
Ric Holt of the
University of Toronto, Canada, in 1991. It is
imperative,
object-oriented, and
concurrent. It has
modules
Broadly speaking, modularity is the degree to which a system's components may be separated and recombined, often with the benefit of flexibility and variety in use. The concept of modularity is used primarily to reduce complexity by breaking a sy ...
,
classes, single
inheritance,
processes
A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic.
Things called a process include:
Business and management
*Business process, activities that produce a specific se ...
,
exception handling, and optional
machine-dependent programming.
There is an
integrated development environment under the
X Window System and a demo version. Versions exist for
Sun-4,
MIPS,
RS-6000,
NeXTSTEP,
Windows 95 and others.
References
Further reading
*
*
*
*
External links
*
{{Authority control
1982 establishments in Ontario
Academic programming languages
Algol programming language family
Articles with example code
Educational programming languages
Programming languages created in 1982
Statically typed programming languages
Structured programming languages
University of Toronto
Alan Turing