ECL programming language
   HOME

TheInfoList



OR:

The ECL programming language and system were an
extensible Extensibility is a software engineering and systems design principle that provides for future growth. Extensibility is a measure of the ability to extend a system and the level of effort required to implement the extension. Extensions can be th ...
high-level
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 ...
and
development environment In software deployment, an environment or tier is a computer system or set of systems in which a computer program or software component is deployed and executed. In simple cases, such as developing and immediately executing a program on the same m ...
developed at
Harvard University Harvard University is a Private university, private Ivy League research university in Cambridge, Massachusetts, United States. Founded in 1636 and named for its first benefactor, the History of the Puritans in North America, Puritan clergyma ...
in the 1970s. The name 'ECL' stood for 'Extensible Computer Language' or 'EClectic Language'. Some publications used the name 'ECL' for the system as a whole and EL/1 (Extensible Language) for the language. ECL was an interactive system where programs were represented within the system; there was a compatible
compiler In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
and
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 ...
. It had an
ALGOL ALGOL (; short for "Algorithmic Language") is a family of imperative computer programming languages originally developed in 1958. ALGOL heavily influenced many other languages and was the standard method for algorithm description used by the ...
-like syntax and an extensible
data type In computer science and computer programming, a data type (or simply type) is a collection or grouping of data values, usually specified by a set of possible values, a set of allowed operations on these values, and/or a representation of these ...
system, with data types as
first-class citizen In a given programming language design, a first-class citizen is an entity which supports all the operations generally available to other entities. These operations typically include being passed as an argument, returned from a function, and ass ...
s. Data objects were values, not references, and the calling conventions gave a choice between
call by value In a programming language, an evaluation strategy is a set of rules for evaluating expressions. The term is often used to refer to the more specific notion of a ''parameter-passing strategy'' that defines the kind of value that is passed to the ...
and
call by reference In a programming language, an evaluation strategy is a set of rules for evaluating expressions. The term is often used to refer to the more specific notion of a ''parameter-passing strategy'' that defines the kind of value that is passed to the ...
for each argument. ECL was primarily used for research and teaching in
programming language design Programming languages are typically created by designing a form of representation of a computer program, and writing an implementation for the developed concept, usually an interpreter or compiler. Interpreters are designed to read programs, usu ...
,
programming methodology In software engineering, a software development process or software development life cycle (SDLC) is a process of planning and managing software development. It typically involves dividing software development work into smaller, parallel, or s ...
(in particular programming by transformational refinement), and
programming environment An integrated development environment (IDE) is a software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, and a debugger. Some ...
s at Harvard, though it was said to be used at some government agencies as well. It was first implemented on the
PDP-10 Digital Equipment Corporation (DEC)'s PDP-10, later marketed as the DECsystem-10, is a mainframe computer family manufactured beginning in 1966 and discontinued in 1983. 1970s models and beyond were marketed under the DECsystem-10 name, especi ...
, with a later (interpreted-only) implementation on the
PDP-11 The PDP–11 is a series of 16-bit minicomputers originally sold by Digital Equipment Corporation (DEC) from 1970 into the late 1990s, one of a set of products in the Programmed Data Processor (PDP) series. In total, around 600,000 PDP-11s of a ...
written in
BLISS BLISS is a system programming language developed at Carnegie Mellon University (CMU) by W. A. Wulf, D. B. Russell, and A. N. Habermann around 1970. It was perhaps the best known system language until C debuted a few years later. Since then, C ...
-11 and cross-compiled on the PDP-10.


Procedures and bind-classes

An ECL procedure for computing the
greatest common divisor In mathematics, the greatest common divisor (GCD), also known as greatest common factor (GCF), of two or more integers, which are not all zero, is the largest positive integer that divides each of the integers. For two integers , , the greatest co ...
of two integers according to the
Euclidean algorithm In mathematics, the Euclidean algorithm,Some widely used textbooks, such as I. N. Herstein's ''Topics in Algebra'' and Serge Lang's ''Algebra'', use the term "Euclidean algorithm" to refer to Euclidean division or Euclid's algorithm, is a ...
could be defined as follows: gcd <- EXPR(m:INT BYVAL, n: INT BYVAL; INT) BEGIN DECL r:INT; REPEAT r <- rem(m, n); r = 0 => n; m <- n; n <- r; END; END This is an assignment of a ''procedure constant'' to the variable gcd. The line EXPR(m:INT BYVAL, n: INT BYVAL; INT) indicates that the procedure takes two parameters, of type INT, named m and n, and returns a result of type INT. (Data types are called ''modes'' in ECL.) The ''bind-class'' BYVAL in each parameter declaration indicates that that parameter is passed by value. The computational components of an ECL program are called ''forms''. Some forms resemble the expressions of other programming languages and others resemble statements. The execution of a form always yields a value. The REPEAT ... END construct is a loop form. Execution of the construct r = 0 => n when the form r = 0 evaluates to TRUE causes execution of the loop to terminate with the value n. The value of the last statement in a block (BEGIN ... END) form becomes the value of the block form. The value of the form in a procedure declaration becomes the result of the procedure call. In addition to the bind-class BYVAL, ECL has bind-classes SHARED, LIKE, UNEVAL, and LISTED. Bind-class SHARED indicates that a
parameter A parameter (), generally, is any characteristic that can help in defining or classifying a particular system (meaning an event, project, object, situation, etc.). That is, a parameter is an element of a system that is useful, or critical, when ...
is to be passed by reference. Bind-class LIKE causes a parameter to be passed by reference if possible and by value if not (e.g., if the actual parameter is a pure value, or a variable to which a type conversion must be applied). Bind-class UNEVAL specifies that an
abstract syntax tree An abstract syntax tree (AST) is a data structure used in computer science to represent the structure of a program or code snippet. It is a tree representation of the abstract syntactic structure of text (often source code) written in a formal ...
for the actual parameter is to be passed to the formal parameter; this provides extraordinary flexibility for programmers to invent their own notations, with their own evaluation semantics, for certain procedure parameters. Bind-class LISTED is similar to UNEVAL, but provides a capability similar to that of
varargs In mathematics and in computer programming, a variadic function is a function of indefinite arity, i.e., one which accepts a variable number of arguments. Support for variadic functions differs widely among programming languages. The term ''vari ...
in C: the LISTED bind-class can only appear in the last formal parameter of the procedure, and that formal parameter is bound to a list of
abstract syntax tree An abstract syntax tree (AST) is a data structure used in computer science to represent the structure of a program or code snippet. It is a tree representation of the abstract syntactic structure of text (often source code) written in a formal ...
representations, one for each remaining actual parameter. ECL has an EVAL built-in function for evaluating an
abstract syntax tree An abstract syntax tree (AST) is a data structure used in computer science to represent the structure of a program or code snippet. It is a tree representation of the abstract syntactic structure of text (often source code) written in a formal ...
; alternatively, there are functions by which programmers can explore the nodes of the
abstract syntax tree An abstract syntax tree (AST) is a data structure used in computer science to represent the structure of a program or code snippet. It is a tree representation of the abstract syntactic structure of text (often source code) written in a formal ...
and process them according to their own logic.


See also

* Fexpr


References

PISEL = ''Proceedings of the international symposium on Extensible languages'', Grenoble, France, 1971, published in ''ACM SIGPLAN Notices'' 6:12, December 1971. * Benjamin M. Brosgol, "An implementation of ECL data types", PISEL, pp. 87–95. * Thomas E. Cheatham, Jr., Glenn H. Holloway, Judy A. Townley, "Program refinement by transformation", ''Proceedings of the 5th international conference on Software engineering'', 1981, pp. 430–437. {{ISBN, 0-89791-146-6 * Glenn H. Holloway, "Interpreter/compiler integration in ECL", PISEL, pp. 129–134. * Charles J. Prenner, "The control structure facilities of ECL", PISEL, pp. 104–112. * Ben Wegbreit, "An overview of the ECL programming system", PISEL, pp. 26–28. * Ben Wegbreit, "Studies in extensible programming languages." Technical Report ESD-TR-70-297. Harvard University, Cambridge, Massachusetts, May 1970. * Glenn Holloway, Judy Townley, Jay Spitzen, Ben Wegbreit, "ECL Programmer's Manual", Report 23-74, Center for Research in Computing Technology, Harvard University, December 1974. * Larry Denenberg, "The implementation of PDP-11 ECL", Technical Report 29-77, Center for Research in Computing Technology, Harvard University, June 1977. Educational programming languages Harvard University Extensible syntax programming languages