SETL

Last updated
SETL
Paradigm multi-paradigm: imperative, procedural, structured, object-oriented
Designed by (Jack) Jacob T. Schwartz
Developer Courant Institute of Mathematical Sciences
First appeared1969;54 years ago (1969)
Stable release
1.1 / January 7, 2005;18 years ago (2005-01-07)
Typing discipline Dynamic
Website setl.org
Influenced by
ALGOL 60
Influenced
SETL2, ISETL, SETLX, Starset, ABC

SETL (SET Language) is a very high-level programming language based on the mathematical theory of sets. It was originally developed by (Jack) Jacob T. Schwartz at the New York University (NYU) Courant Institute of Mathematical Sciences in the late 1960s.

Contents

Design

SETL provides two basic aggregate data types: unordered sets, and sequences (the latter also called tuples). The elements of sets and tuples can be of any arbitrary type, including sets and tuples themselves. Maps are provided as sets of pairs (i.e., tuples of length 2) and can have arbitrary domain and range types. Primitive operations in SETL include set membership, union, intersection, and power set construction, among others.

SETL provides quantified boolean expressions constructed using the universal and existential quantifiers of first-order predicate logic.

SETL provides several iterators to produce a variety of loops over aggregate data structures.

Examples

Print all prime numbers from 2 to N:

print([n in [2..N] | forall m in {2..n - 1} | n mod m > 0]);

The notation is similar to list comprehension.

A factorial procedure definition:

procedure factorial(n); -- calculates the factorial n!   return if n = 1 then 1 else n * factorial(n - 1) end if; end factorial;

A more conventional SETL expression for factorial (n > 0):

*/[1..n]

Uses

Implementations of SETL were available on the DEC VAX, IBM/370, SUN workstation and APOLLO. [1] In the 1970s, SETL was ported to the BESM-6, ES EVM and other Russian computer systems. [2]

SETL was used for an early implementation of the programming language Ada, named the NYU Ada/ED translator. [3] This later became the first validated Ada implementation, certified on April 11, 1983. [4]

According to Guido van Rossum, "Python's predecessor, ABC, was inspired by SETL -- Lambert Meertens spent a year with the SETL group at NYU before coming up with the final ABC design!" [5]

Language variants

SET Language 2 (SETL2), a backward incompatible descendant of SETL, was created by Kirk Snyder of the Courant Institute of Mathematical Sciences at New York University in the late 1980s. Like its predecessor, it is based on the theory and notation of finite sets, but has also been influenced in syntax and style by the Ada language.

Interactive SET Language (ISETL) is a variant of SETL used in discrete mathematics.

GNU SETL is a command-line utility that extends and implements SETL.

Related Research Articles

In mathematics, the factorial of a non-negative integer , denoted by , is the product of all positive integers less than or equal to . The factorial of also equals the product of with the next smaller factorial:

In computer science, denotational semantics is an approach of formalizing the meanings of programming languages by constructing mathematical objects that describe the meanings of expressions from the languages. Other approaches providing formal semantics of programming languages include axiomatic semantics and operational semantics.

In mathematics, a tuple is a finite sequence or ordered list of numbers or, more generally, mathematical objects, which are called the elements of the tuple. An n-tuple is a tuple of n elements, where n is a non-negative integer. There is only one 0-tuple, called the empty tuple. A 1-tuple and a 2-tuple are commonly called respectively a singleton and an ordered pair.

In mathematics, an empty product, or nullary product or vacuous product, is the result of multiplying no factors. It is by convention equal to the multiplicative identity, just as the empty sum—the result of adding no numbers—is by convention zero, or the additive identity. When numbers are implied, the empty product becomes one.

In computer science, primitive data types are a set of basic data types from which all other data types are constructed. Specifically it often refers to the limited set of data representations in use by a particular processor, which all compiled programs must use. Most processors support a similar set of primitive data types, although the specific representations vary. More generally, "primitive data types" may refer to the standard data types built into a programming language. Data types which are not primitive are referred to as derived or composite.

SPITBOL is a compiled implementation of the SNOBOL4 programming language. Originally targeted for the IBM System/360 and System/370 family of computers, it has now been ported to most major microprocessors including the SPARC. It was created by Robert Dewar and Ken Belcher, who were then at the Illinois Institute of Technology.

In computing, memoization or memoisation is an optimization technique used primarily to speed up computer programs by storing the results of expensive function calls to pure functions and returning the cached result when the same inputs occur again. Memoization has also been used in other contexts, such as in simple mutually recursive descent parsing. It is a type of caching, distinct from other forms of caching such as buffering and page replacement. In the context of some logic programming languages, memoization is also known as tabling.

Set theoretic programming is a programming paradigm based on mathematical set theory. One example of a programming language based on this paradigm is SETL. The goal of set theoretic programming is to improve programmer speed and productivity significantly, and also enhance program clarity and readability.

<span class="mw-page-title-main">Courant Institute of Mathematical Sciences</span> Division of New York University, USA (founded 1935)

The Courant Institute of Mathematical Sciences is the mathematics research school of New York University (NYU), and is among the most prestigious mathematics schools and mathematical sciences research centers in the world. Founded in 1935, it is named after Richard Courant, one of the founders of the Courant Institute and also a mathematics professor at New York University from 1936 to 1972, and serves as a center for research and advanced training in computer science and mathematics. It is located on Gould Plaza next to the Stern School of Business and the economics department of the College of Arts and Science.

In computer science and logic, a dependent type is a type whose definition depends on a value. It is an overlapping feature of type theory and type systems. In intuitionistic type theory, dependent types are used to encode logic's quantifiers like "for all" and "there exists". In functional programming languages like Agda, ATS, Coq, F*, Epigram, and Idris, dependent types help reduce bugs by enabling the programmer to assign types that further restrain the set of possible implementations.

<span class="mw-page-title-main">Jacob T. Schwartz</span> American mathematician

Jacob Theodore "Jack" Schwartz was an American mathematician, computer scientist, and professor of computer science at the New York University Courant Institute of Mathematical Sciences. He was the designer of the SETL programming language and started the NYU Ultracomputer project. He founded the New York University Department of Computer Science, chairing it from 1964 to 1980.

The New York University's Ultracomputer is a significant processor design in the history of parallel computing. The system has N processors, N memories, and an N log N message-passing switch connecting them. The system supported an innovative fetch-and-add process coordination instruction, and the custom VLSI network switches could combine references from several processors into a single reference, to reduce memory contention.

In computer science, array is a data type that represents a collection of elements, each selected by one or more indices that can be computed at run time during program execution. Such a collection is usually called an array variable or array value. By analogy with the mathematical concepts vector and matrix, array types with one and two indices are often called vector type and matrix type, respectively. More generally, a multidimensional array type can be called a tensor type, by analogy with the physical concept, tensor.

This article describes the features in the programming language Haskell.

Haskell is a general-purpose, statically-typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research, and industrial applications, Haskell has pioneered a number of programming language features such as type classes, which enable type-safe operator overloading, and monadic input/output (IO). It is named after logician Haskell Curry. Haskell's main implementation is the Glasgow Haskell Compiler (GHC).

<span class="mw-page-title-main">Robert Dewar</span> Computer scientist

Robert Berriedale Keith Dewar was an American computer scientist and educator. He helped to develop programming languages and compilers and was an outspoken advocate of freely licensed open-source software. He was a cofounder, CEO, and president of the AdaCore software company. He was also an enthusiastic amateur performer and musician, especially with the Village Light Opera Group in New York City.

<span class="mw-page-title-main">Artspeak</span> Computer language

Artspeak is a computer language conceived by Jacob T. Schwartz at New York University's Courant Institute of Mathematical Sciences. Until 2011, the only known compiler/interpreter was written for the CDC 6600, a mainframe computer. In order to program in Artspeak on the CDC 6600, one had to use punch cards and utilize batch processing.

References

  1. J.T. Schwartz; R.B.K. Dewar; E. Dubinsky; E. Schonberg (1986). Programming with sets. An Introduction to SETL. Springer-Verlag New York Inc. ISBN   978-1-4613-9577-5.
  2. И.В. Поттосин, ed. (2001). Становление новосибирской школы программирования (мозаика воспоминаний) [Formation of the Novosibirsk school of programming (mosaic of memories)](PDF) (in Russian). Новосибирск: Институт систем информатики им. А. П. Ершова СО РАН. pp. 106–113.
  3. Dewar, Robert B. K.; Fisher Jr., Gerald A.; Schonberg, Edmond; Froelich, Robert; Bryant, Stephen; Goss, Clinton F.; Burke, Michael (November 1980). "The NYU Ada translator and interpreter". Proceeding of the ACM-SIGPLAN symposium on Ada programming language - SIGPLAN '80. Vol. 15. pp. 194–201. doi:10.1145/948632.948659. ISBN   0-89791-030-3. S2CID   10586359.
  4. SofTech Inc., Waltham, MA (1983-04-11). "Ada Compiler Validation Summary Report: NYU Ada/ED, Version 19.7 V-001". Archived from the original on June 7, 2017. Retrieved 2010-12-16.{{cite web}}: CS1 maint: multiple names: authors list (link)
  5. Python-Dev: SETL (was: Lukewarm about range literals)

Further reading