SETL
Encyclopedia
SETL is a very-high level 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....

 based on the mathematical theory of sets. It was originally developed by Jack Schwartz
Jack Schwartz
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 the NYU Ultracomputer...

 at the NYU
New York University
New York University is a private, nonsectarian research university based in New York City. NYU's main campus is situated in the Greenwich Village section of Manhattan...

 Courant Institute of Mathematical Sciences
Courant Institute of Mathematical Sciences
The Courant Institute of Mathematical Sciences is an independent division of New York University under the Faculty of Arts & Science that serves as a center for research and advanced training in computer science and mathematics...

 in the late 1960s.

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 iterator
Iterator
In computer programming, an iterator is an object that enables a programmer to traverse a container. Various types of iterators are often provided via a container's interface...

s to produce a variety of loops over aggregate data structures.

In the 1970s, SETL was ported to the BESM-6, ES EVM
ES EVM
ES EVM was a series of clones of IBM's System/360 and System/370 mainframes, released in the Comecon countries under the initiative of the Soviet Union since the 1960s. Production continued until 1998...

 and other Russian computer systems.

SETL was used for an early implementation of the Ada programming language
Ada (programming language)
Ada is a structured, statically typed, imperative, wide-spectrum, and object-oriented high-level computer programming language, extended from Pascal and other languages...

, known as the NYU Ada/ED translator. This later became the first validated Ada implementation, certified on April 11, 1983.

David Bacon, who was previously a PhD student in NYU
New York University
New York University is a private, nonsectarian research university based in New York City. NYU's main campus is situated in the Greenwich Village section of Manhattan...

 with Jack Schwartz
Jack Schwartz
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 the NYU Ultracomputer...

 still actively maintains the compiler for SETL and its website.

Sample code

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]

History

See also

  • ISETL (programming language)
  • ISETLW (programming language)
  • ProSet
    ProSet
    ProSet is a set theoretic programming language that is being developed at the University of Essen as a successor to SETL. It is a very-high level language that supports prototyping....

  • Rapira
    Rapira
    Rapira is an educational procedural programming language developed in the USSR and implemented on Agat computer, PDP-11 clones and Intel-8080/Z80 clones . It was an interpreted language with dynamic type system and high level constructions. The language originally had a Russian-based set of...

  • SETL2
    SETL2
    SETL2 is a descendant of the SETL programming language.-See also:* Set theoretic programming* ProSet* ISETLW * ISETL...


External links

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