Setl Language

A SetOrientedProgramming language based on set theory. Possibly contains the first instance of ListComprehensions. See http://www.setl.org/ .

The original version of SETL was first described in "Set Theory as a Language for Program Specification and Programming," written by J. Schwartz when he was working at IBM in the summer of 1969:

In the present paper we will outline a new programming language, designated as SETL, whose essential features are taken from the mathematical theory of sets. SETL will have a precisely defined formal syntax as well as a semantic interpretation to be described in detail; thus it will permit one to write programs for compilation and execution. It may be remarked in favor of SETL that the mathematical experience of the past half-century, and especially that gathered by mathematical logicians pursuing foundational studies, reveals the theory of sets to incorporate a very powerful language in terms of which the whole structure of mathematics can rapidly be built up from elementary foundations. By applying SETL to the specification of a number of fairly complex algorithms taken from various parts of compiler theory, we shall see that it inherits these same advantages from the general set theory upon which it is modeled. It may also be noted that, perhaps partly because of its classical familiarity, the mathematical set-notion provides a comfortable framework, that is, requiring the imposition of relatively few artificial constructions upon the basic skeleton of an analysis. We shall see that SETL inherits this advantage also, so that it will allow us to describe algorithms precisely but with relatively few of those superimposed conventions which make programs artificial, lengthy, and hard to read.


Anyone want to contrast it with RelationalLanguages and PrologLanguage?

While prolog has set-oriented predicates like set-of() and operations like union and intersection can be defined easily, the underlying structure representing the sets are lists, i.e. {a,b,c} would be [a,b,c] in prolog. SetL syntax is closer to SetTheory. Other "languages" like Maple and MathematicaLanguage have more set-theoretic features than prolog, which is more tied to logic using unification and backtracking. I would consider Mathematica etc to be the evolution of SetL. Back in those days Macsyma focused more on algebra and calculus SetL was better for playing with sets but modern mathematical computational systems combine all sorts of branches like GraphTheory, Combinatorics, Topology etc as well as SetTheory into one environment. ErlangLanguage is the evolution of prolog.


The full language specification is on-line at http://cs.nyu.edu/~bacon/setl/doc-legacy/setlprog.pdf A more recent variant, SETL2, supports ObjectOrientedProgramming, NestedScopes, and OperatorOverloading -- see http://www.setl.org/doc/ .

There is a SETL Wiki at http://www.setl-lang.org/wiki/ with links to various tutorials.


SETL was highly influential on other CollectionOrientedProgramming languages.


CategoryProgrammingLanguage


EditText of this page (last edited April 29, 2009) or FindPage with title or text search