Turing (programming Language)
   HOME

TheInfoList



OR:

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 A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
developed in 1982 by Ric Holt and James Cordy, at
University of Toronto The University of Toronto (UToronto or U of T) is a public university, public research university whose main campus is located on the grounds that surround Queen's Park (Toronto), Queen's Park in Toronto, Ontario, Canada. It was founded by ...
in Ontario, Canada. It was designed to help students taking their first
computer science Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
course learn how to code. Turing is a descendant of Pascal,
Euclid Euclid (; ; BC) was an ancient Greek mathematician active as a geometer and logician. Considered the "father of geometry", he is chiefly known for the '' Elements'' treatise, which established the foundations of geometry that largely domina ...
, and SP/k that features a clean
syntax In linguistics, syntax ( ) is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure (constituenc ...
and precise machine-independent
semantics Semantics is the study of linguistic Meaning (philosophy), meaning. It examines what meaning is, how words get their meaning, and how the meaning of a complex expression depends on its parts. Part of this process involves the distinction betwee ...
. Turing 4.1.0 is the latest stable version. Versions 4.1.1 and 4.1.2 do not emit stand alone .exe files. Versions pre-4.1.0 have outdated syntax and functions.


Overview

Named after British computer scientist
Alan Turing Alan Mathison Turing (; 23 June 1912 – 7 June 1954) was an English mathematician, computer scientist, logician, cryptanalyst, philosopher and theoretical biologist. He was highly influential in the development of theoretical computer ...
, Turing is used mainly as a teaching language at the high school and university level. Two other versions exist, Object-Oriented Turing and Turing+, a systems programming variant. In September 2001, "Object Oriented Turing" was renamed "Turing" and the original Turing was renamed "Classic Turing". Turing is now unsupported by Holt Software Associates in
Toronto, Ontario Toronto ( , locally pronounced or ) is the List of the largest municipalities in Canada by population, most populous city in Canada. It is the capital city of the Provinces and territories of Canada, Canadian province of Ontario. With a p ...
. Turing was widely used in high schools in
Ontario Ontario is the southernmost Provinces and territories of Canada, province of Canada. Located in Central Canada, Ontario is the Population of Canada by province and territory, country's most populous province. As of the 2021 Canadian census, it ...
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 In linguistics, syntax ( ) is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure (constituenc ...
. Here is the entire
"Hello, World!" program A "Hello, World!" program is usually a simple computer program that emits (or displays) to the screen (often the Console application, console) a message similar to "Hello, World!". A small piece of code in most general-purpose programming languag ...
in Turing with
syntax highlighting Syntax highlighting is a feature of text editors that is used for programming language, programming, scripting language, scripting, or markup language, markup languages, such as HTML. The feature displays text, especially source code, in differe ...
: put "Hello World!" Turing avoids
semicolon The semicolon (or semi-colon) is a symbol commonly used as orthographic punctuation. In the English language, a semicolon is most commonly used to link (in a single sentence) two independent clauses that are closely related in thought, such as ...
s 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 occurs when the definition of a concept or process depends on a simpler or previous version of itself. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in m ...
function to calculate a
factorial In mathematics, the factorial of a non-negative denoted is the Product (mathematics), 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 ...
. % 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 Interpreting is translation from a spoken or signed language into another language, usually in real time to facilitate live communication. It is distinguished from the translation of a written text, which can be more deliberative and make use o ...
, and TPlus, a native compiler for the concurrent system programming language variant Turing+. OpenT, a project to develop a Turing compiler, was discontinued.


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 Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
,
Solaris Solaris is the Latin word for sun. It may refer to: Arts and entertainment Literature, television and film * ''Solaris'' (novel), a 1961 science fiction novel by Stanisław Lem ** ''Solaris'' (1968 film), directed by Boris Nirenburg ** ''Sol ...
, and
Mac OS X macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
at Queen's University 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 language. Turing Plus extends original Turing with processes,
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 ...
(as specified by C.A.R. Hoare), and language constructs needed for system programming such as binary input-output, separate compiling, variables at absolute addresses, type converters and other features.


Turing+

Turing+ (Turing Plus) is a
concurrent system Concurrency refers to the ability of a system to execute multiple tasks through simultaneous execution or time-sharing (context switching), sharing resources and managing interactions. Concurrency improves responsiveness, throughput, and scalabi ...
s programming language based on the Turing programming language designed by James Cordy and Ric Holt, then at the
University of Toronto The University of Toronto (UToronto or U of T) is a public university, public research university whose main campus is located on the grounds that surround Queen's Park (Toronto), Queen's Park in Toronto, Ontario, Canada. It was founded by ...
, Canada, in 1987. Some, but not all, of the features of Turing+ were eventually subsumed into Object-Oriented Turing. Turing+ extended original Turing with processes and
monitor 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, Wes ...
s (as specified by C.A.R. Hoare) as well as language constructs needed for systems programming such as binary input-output, separate compiling, variables at absolute addresses, type converters, and other features. Turing+ was explicitly designed to replace Concurrent Euclid in systems-programming applications. The
TUNIS Tunis (, ') is the capital city, capital and largest city of Tunisia. The greater metropolitan area of Tunis, often referred to as "Grand Tunis", has about 2,700,000 inhabitants. , it is the third-largest city in the Maghreb region (after Casabl ...
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 language TXL.


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 The University of Toronto (UToronto or U of T) is a public university, public research university whose main campus is located on the grounds that surround Queen's Park (Toronto), Queen's Park in Toronto, Ontario, Canada. It was founded by ...
, Canada, in 1991. It is imperative,
object-oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impleme ...
, and concurrent. It has modules, classes, single
inheritance Inheritance is the practice of receiving private property, titles, debts, entitlements, privileges, rights, and obligations upon the death of an individual. The rules of inheritance differ among societies and have changed over time. Offi ...
, processes,
exception handling In computing and computer programming, exception handling is the process of responding to the occurrence of ''exceptions'' – anomalous or exceptional conditions requiring special processing – during the execution of a program. In general, an ...
, and optional
machine-dependent Machine-dependent software is software that runs only on a specific computer. Applications that run on multiple computer architectures are called machine-independent, or cross-platform. Many organisations opt for such software because they believe ...
programming. There is an
integrated development environment An integrated development environment (IDE) is a Application software, software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, an ...
under the
X Window System The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been at ...
and a demo version. Versions exist for
Sun-4 Sun-4 is a series of Unix workstations and servers produced by Sun Microsystems, first appearing in July 1987, with the launch of the Sun 4/260. The original Sun-4 series were VMEbus-based systems similar to the earlier Sun-3 series, but employi ...
, MIPS, RS-6000,
NeXTSTEP NeXTSTEP is a discontinued object-oriented, multitasking operating system based on the Mach kernel and the UNIX-derived BSD. It was developed by NeXT, founded by Steve Jobs, in the late 1980s and early 1990s and was initially used for its ...
,
Windows 95 Windows 95 is a consumer-oriented operating system developed by Microsoft and the first of its Windows 9x family of operating systems, released to manufacturing on July 14, 1995, and generally to retail on August 24, 1995. Windows 95 merged ...
, 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