ArticleslgStudy

science

SETL

SETL is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand SETL rather than just read about it. In short: SETL (SET Language) is a very high-level programming language based on the mathematical theory of sets. It was originally developed at the New York University (NYU) Courant Institute of Mathematical Sciences in the late 1960s, by a group including (Jack) Jacob T.

Key takeaways

  • SETL belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect SETL to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of SETL from memory before moving on to harder problems.

Reference excerpt

SETL (SET Language) is a very high-level programming language based on the mathematical theory of sets. It was originally developed at the New York University (NYU) Courant Institute of Mathematical Sciences in the late 1960s, by a group including (Jack) Jacob T. Schwartz, Robert Dewar, and E. Schonberg. Schwartz is credited with designing the language.

Design SETL provides two basic aggregate data types: (unordered) sets, and tuples. The elements of sets and tuples can be of any arbitrary type, including sets and tuples themselves, except the undefined value om (sometimes capitalized: OM). 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 CDC 6600, CDC Cyber, DEC VAX, IBM/370, Sun workstation and Apollo. In the 1970s, SETL was ported to the BESM-6, ES EVM and other Russian computer systems. SETL was used for an early implementation of the programming language Ada, named the NYU Ada/ED translator. This later became the first validated Ada implementation, certified on April 11, 1983. 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!"

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 implements and extends SETL.

References

Further reading Schwartz, Jacob T., "Set Theory as a Language for Program Specification and Programming". Courant Institute of Mathematical Sciences, New York University, 1970. Schwartz, Jacob T., "On Programming, An Interim Report on the SETL Project", Computer Science Department, Courant Institute of Mathematical Sciences, New York University (1973). Schwartz, Jacob T., Dewar, R.B.K., Dubinsky, E., and Schonberg, E., Programming With Sets: An Introduction to SETL, 1986. ISBN 0-387-96399-5.

External links Official website SETL on GitHub Programming in SETL and other things SETL Historical Sources Archive

Worked examples

Example 1 — a first encounter with SETL

Start with the simplest possible case. Write down what SETL claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to SETL before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about SETL ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of SETL

In research
SETL appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses SETL in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
SETL is common in secondary-school and first-year university syllabi. It links to neighbouring topics Academic programming languages, Programming languages created in 1969, Set theoretic programming languages, so understanding it makes those chapters shorter.
In everyday life
Look for SETL outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “SETL” →

How to study SETL in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what SETL means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain SETL out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is SETL in simple terms?

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

Why does SETL matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study SETL?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on SETL.

Tags

  • Academic programming languages
  • Programming languages created in 1969
  • Set theoretic programming languages

Keep exploring