Turing programming language
Encyclopedia
Turing is a Pascal
Pascal (programming language)
Pascal is an influential imperative and procedural programming language, designed in 1968/9 and published in 1970 by Niklaus Wirth as a small and efficient language intended to encourage good programming practices using structured programming and data structuring.A derivative known as Object Pascal...

-like programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

 developed in 1982 by Ric Holt
Ric Holt
Richard C. "Ric" Holt is a computer science professor.Ric Holt was one of the original developers of the Turing programming language, , Euclid programming language, SP/k, and of the S/SL programming language...

 and James Cordy
James Cordy
James Reginald Cordy, born , is a Canadian computer scientist and educator who is a Professor in the School of Computing at Queen's University. As a researcher he is currently active in the fields of source code analysis and manipulation, software reverse and re-engineering, and pattern analysis...

, then of University of Toronto
University of Toronto
The University of Toronto is a public research university in Toronto, Ontario, Canada, situated on the grounds that surround Queen's Park. It was founded by royal charter in 1827 as King's College, the first institution of higher learning in Upper Canada...

, Canada
Canada
Canada is a North American country consisting of ten provinces and three territories. Located in the northern part of the continent, it extends from the Atlantic Ocean in the east to the Pacific Ocean in the west, and northward into the Arctic Ocean...

. Turing is a descendant of Euclid, Pascal and SP/k
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...

 that features a clean syntax and precise machine-independent semantics.

Named after British computer scientist Alan Turing
Alan Turing
Alan Mathison Turing, OBE, FRS , was an English mathematician, logician, cryptanalyst, and computer scientist. He was highly influential in the development of computer science, providing a formalisation of the concepts of "algorithm" and "computation" with the Turing machine, which played a...

, Turing is used primarily as a teaching language at the high school and university level. Two other versions exist, Object-Oriented Turing
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 in 1991. It is imperative, object-oriented, and concurrent...

 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
Toronto
Toronto is the provincial capital of Ontario and the largest city in Canada. It is located in Southern Ontario on the northwestern shore of Lake Ontario. A relatively modern city, Toronto's history dates back to the late-18th century, when its land was first purchased by the British monarchy from...

. Currently, Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 is the only supported platform. Turing was, at one point, widely used in high schools in Ontario
Ontario
Ontario is a province of Canada, located in east-central Canada. It is Canada's most populous province and second largest in total area. It is home to the nation's most populous city, Toronto, and the nation's capital, Ottawa....

 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. It is unclear whether Turing is still in development, but there have been no new releases since November 25, 2007.

Syntax

Turing is designed to have a very lightweight, readable, intuitive syntax. Here is the entire Hello World! program in Turing with syntax highlighting
Syntax highlighting
Syntax highlighting is a feature of some text editors that display text—especially source code—in different colors and fonts according to the category of terms. This feature eases writing in a structured language such as a programming language or a markup language as both structures and...

:

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
Recursion
Recursion is the process of repeating items in a self-similar way. For instance, when the surfaces of two mirrors are exactly parallel with each other the nested images that occur are a form of infinite recursion. The term has a variety of meanings specific to a variety of disciplines ranging from...

 function to calculate a factorial
Factorial
In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n...

.

% 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, TPlus, a native compiler for the concurrent systems programming language variant Turing Plus, and OpenT, an abandoned project to develop a compiler for Turing.

Open Turing

Open Turing is an open-source implementation of the original Turing interpreter for Windows written by Holt Software. It includes speed improvements and new features such as OpenGL 3D. It is fully backwards compatible with the non open source implementation.

TPlus

TPlus is an open-source implementation of original (non-OO) 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 University
Queen's University, , is a public research university located in Kingston, Ontario, Canada. Founded on 16 October 1841, the university pre-dates the founding of Canada by 26 years. Queen's holds more more than of land throughout Ontario as well as Herstmonceux Castle in East Sussex, England...

 in the late 1990s. TPlus implements Turing+ (Turing Plus), a concurrent systems programming language based the original Turing programming language. Some, but not all, of the features of Turing Plus were eventually subsumed into the present Object-Oriented Turing
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 in 1991. It is imperative, object-oriented, and concurrent...

 language. Turing Plus extends original Turing with processes
Process (computing)
In computing, a process is an instance of a computer program that is being executed. It contains the program code and its current activity. Depending on the operating system , a process may be made up of multiple threads of execution that execute instructions concurrently.A computer program is a...

 and monitors
Monitor (synchronization)
In concurrent programming, a monitor is an object or module intended to be used safely by more than one thread. The defining characteristic of a monitor is that its methods are executed with mutual exclusion. That is, at each point in time, at most one thread may be executing any of its methods...

 (as specified by C.A.R. Hoare) 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.

OpenT

OpenT is an abandoned open-source language, compiler, and IDE that was being developed by the members of the dTeam of Computer Science Canada. It shares many similarities with Turing, and is fully backwards compatible with it.

See also

  • Euclid (programming language)
  • Turing Plus (programming language)
    Turing Plus (programming language)
    Turing+ is a concurrent systems programming language based the Turing programming language designed by James Cordy and Ric Holt, then at the University of Toronto, in 1987. Some, but not all, of the features of Turing+ were eventually subsumed into Object-Oriented Turing. Turing+ extended...

  • Object-Oriented Turing
    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 in 1991. It is imperative, object-oriented, and concurrent...

  • TXL
    TXL (programming language)
    TXL is a special-purpose programming language originally designed by Charles Halpern-Hamu and James Cordy at the University of Toronto in 1985. The acronym "TXL" originally stood for "Turing eXtender Language" after the language's original purpose, the specification and rapid prototyping of...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK