POP-11
Encyclopedia
POP-11 is a reflective
, incrementally compiled
programming language
with many of the features of an interpreted language
. It is the core language of the Poplog
programming
environment developed originally by the University of Sussex
, and recently in the
School of Computer Science at the
University of Birmingham
which hosts
the Poplog website.
POP-11 is an evolution of the language POP-2
, developed in Edinburgh University and features an open stack
model (like Forth). It is mainly procedural
, but supports declarative language constructs, including a pattern matcher and is mostly used for research and teaching in Artificial Intelligence
, although it has features sufficient for many other classes of problems. It is often used to introduce symbolic programming techniques to programmers of more conventional languages like Pascal, who find POP syntax more familiar than that of Lisp
. One of POP-11's features is that it supports first-class function
s.
Pop-11 is the core language of the Poplog
system. The fact that the compiler and compiler subroutines are available at run-time (a requirement for incremental compilation) gives it the ability to support a far wider range of extensions than would be possible using only a macro facility. This made it possible for incremental compilers to be added for Prolog
, Common Lisp
and Standard ML
, which could be added as required to support either mixed language development or development in the second language without using any Pop-11 constructs. This made it possible for Poplog to be used by teachers, researchers, or developers who were interested in only one of the languages. The most successful product developed in Pop-11 was the Clementine data-mining system, developed by ISL, as described in the entry on Poplog
. After SPSS bought ISL they decided to port Clementine to C++ and Java, and eventually succeeded with great effort (and perhaps some loss of the flexibility provided by the use of an AI language!).
As explained in the entries for Poplog
and POP-2
, Pop-11 was for a time available only as part of an expensive commercial package (Poplog), but since about 1999 it has been freely available as part of the Open Source version of Poplog, including various additional packages and teaching libraries. An online version of ELIZA
using Pop-11 is available at Birmingham.
At the University of Sussex David Young used Pop-11 in combination with C and Fortran to develop a suite of teaching and interactive development tools for image processing and vision, and has made them available in the Popvision extension to Poplog.
define Double(Source) -> Result;
Source*2 -> Result;
enddefine;
Double(123) =>
That prints out:
** 246
This one includes some list processing:
Examples using the Pop-11 pattern matcher, which makes it relatively easy for students to learn to develop sophisticated list-processing programs without having to treat patterns as tree structures accessed by 'head' and 'tail' functions (CAR and CDR in Lisp), can be found in the online introductory tutorial. The matcher is at the heart of
the SimAgent (sim_agent) toolkit. Some of the powerful features of the toolkit, e.g. linking pattern variables to inline code variables, would have been very difficult to implement without the incremental compiler facilities.
Reflection (computer science)
In computer science, reflection is the process by which a computer program can observe and modify its own structure and behavior at runtime....
, incrementally compiled
Dynamic compilation
Dynamic compilation is a process used by some programming language implementations to gain performance during program execution. Although the technique originated in the Self programming language, the best-known language that uses this technique is Java...
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....
with many of the features of an interpreted language
Interpreted language
Interpreted language is a programming language in which programs are 'indirectly' executed by an interpreter program. This can be contrasted with a compiled language which is converted into machine code and then 'directly' executed by the host CPU...
. It is the core language of the Poplog
Poplog
Poplog is a powerful multi-language, multiparadigm, reflective, incrementally compiled software development environment, originally created in the UK for teaching and research in Artificial Intelligence at the University of Sussex.-History:...
programming
Computer programming
Computer programming is the process of designing, writing, testing, debugging, and maintaining the source code of computer programs. This source code is written in one or more programming languages. The purpose of programming is to create a program that performs specific operations or exhibits a...
environment developed originally by the University of Sussex
University of Sussex
The University of Sussex is an English public research university situated next to the East Sussex village of Falmer, within the city of Brighton and Hove. The University received its Royal Charter in August 1961....
, and recently in the
School of Computer Science at the
University of Birmingham
University of Birmingham
The University of Birmingham is a British Redbrick university located in the city of Birmingham, England. It received its royal charter in 1900 as a successor to Birmingham Medical School and Mason Science College . Birmingham was the first Redbrick university to gain a charter and thus...
which hosts
the Poplog website.
POP-11 is an evolution of the language POP-2
POP-2
POP-2, often referred to as POP2 was a programming language developed around 1970 from the earlier language POP-1 by Robin Popplestone and Rod Burstall at the University of Edinburgh. It drew roots from many sources: the languages LISP and ALGOL 60, and theoretical ideas from Landin...
, developed in Edinburgh University and features an open stack
Stack (data structure)
In computer science, a stack is a last in, first out abstract data type and linear data structure. A stack can have any abstract data type as an element, but is characterized by only three fundamental operations: push, pop and stack top. The push operation adds a new item to the top of the stack,...
model (like Forth). It is mainly procedural
Procedural programming
Procedural programming can sometimes be used as a synonym for imperative programming , but can also refer to a programming paradigm, derived from structured programming, based upon the concept of the procedure call...
, but supports declarative language constructs, including a pattern matcher and is mostly used for research and teaching in Artificial Intelligence
Artificial intelligence
Artificial intelligence is the intelligence of machines and the branch of computer science that aims to create it. AI textbooks define the field as "the study and design of intelligent agents" where an intelligent agent is a system that perceives its environment and takes actions that maximize its...
, although it has features sufficient for many other classes of problems. It is often used to introduce symbolic programming techniques to programmers of more conventional languages like Pascal, who find POP syntax more familiar than that of Lisp
Lisp programming language
Lisp is a family of computer programming languages with a long history and a distinctive, fully parenthesized syntax. Originally specified in 1958, Lisp is the second-oldest high-level programming language in widespread use today; only Fortran is older...
. One of POP-11's features is that it supports first-class function
First-class function
In computer science, a programming language is said to have first-class functions if it treats functions as first-class objects. Specifically, this means that the language supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning...
s.
Pop-11 is the core language of the Poplog
Poplog
Poplog is a powerful multi-language, multiparadigm, reflective, incrementally compiled software development environment, originally created in the UK for teaching and research in Artificial Intelligence at the University of Sussex.-History:...
system. The fact that the compiler and compiler subroutines are available at run-time (a requirement for incremental compilation) gives it the ability to support a far wider range of extensions than would be possible using only a macro facility. This made it possible for incremental compilers to be added for Prolog
Prolog
Prolog is a general purpose logic programming language associated with artificial intelligence and computational linguistics.Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is declarative: the program logic is expressed in terms of...
, Common Lisp
Common Lisp
Common Lisp, commonly abbreviated CL, is a dialect of the Lisp programming language, published in ANSI standard document ANSI INCITS 226-1994 , . From the ANSI Common Lisp standard the Common Lisp HyperSpec has been derived for use with web browsers...
and Standard ML
Standard ML
Standard ML is a general-purpose, modular, functional programming language with compile-time type checking and type inference. It is popular among compiler writers and programming language researchers, as well as in the development of theorem provers.SML is a modern descendant of the ML...
, which could be added as required to support either mixed language development or development in the second language without using any Pop-11 constructs. This made it possible for Poplog to be used by teachers, researchers, or developers who were interested in only one of the languages. The most successful product developed in Pop-11 was the Clementine data-mining system, developed by ISL, as described in the entry on Poplog
Poplog
Poplog is a powerful multi-language, multiparadigm, reflective, incrementally compiled software development environment, originally created in the UK for teaching and research in Artificial Intelligence at the University of Sussex.-History:...
. After SPSS bought ISL they decided to port Clementine to C++ and Java, and eventually succeeded with great effort (and perhaps some loss of the flexibility provided by the use of an AI language!).
As explained in the entries for Poplog
Poplog
Poplog is a powerful multi-language, multiparadigm, reflective, incrementally compiled software development environment, originally created in the UK for teaching and research in Artificial Intelligence at the University of Sussex.-History:...
and POP-2
POP-2
POP-2, often referred to as POP2 was a programming language developed around 1970 from the earlier language POP-1 by Robin Popplestone and Rod Burstall at the University of Edinburgh. It drew roots from many sources: the languages LISP and ALGOL 60, and theoretical ideas from Landin...
, Pop-11 was for a time available only as part of an expensive commercial package (Poplog), but since about 1999 it has been freely available as part of the Open Source version of Poplog, including various additional packages and teaching libraries. An online version of ELIZA
ELIZA
ELIZA is a computer program and an early example of primitive natural language processing. ELIZA operated by processing users' responses to scripts, the most famous of which was DOCTOR, a simulation of a Rogerian psychotherapist. Using almost no information about human thought or emotion, DOCTOR...
using Pop-11 is available at Birmingham.
At the University of Sussex David Young used Pop-11 in combination with C and Fortran to develop a suite of teaching and interactive development tools for image processing and vision, and has made them available in the Popvision extension to Poplog.
Simple code examples
Here is an example of a simple POP-11 program:define Double(Source) -> Result;
Source*2 -> Result;
enddefine;
Double(123) =>
That prints out:
** 246
This one includes some list processing:
define RemoveElementsMatching(Element, Source) -> Result;
lvars Index;
%
for Index in Source do
unless Index = Element or Index matches Element then
Index;
endunless;
endfor;
% -> Result;
enddefine;
RemoveElementsMatching("the", the cat sat on the mat) => ;;; outputs cat sat on mat
RemoveElementsMatching("the", he cat] [sat on] the mat]) => ;;; outputs he cat] [sat on] mat]
RemoveElementsMatching(= cat, the catThe Cat- People :"The Cat" the nickname of several people, including:* Peter Bonetti , British footballer for Chelsea, the St. Louis Stars, Dundee United and England* Greg Cattrano , American lacrosse player...
is a big catBig catThe term big cat – which is not a biological classification – is used informally to distinguish the larger felid species from smaller ones. One definition of "big cat" includes the four members of the genus Panthera: the tiger, lion, jaguar, and leopard. Members of this genus are the only cats able...
) => ;;; outputs is a
Examples using the Pop-11 pattern matcher, which makes it relatively easy for students to learn to develop sophisticated list-processing programs without having to treat patterns as tree structures accessed by 'head' and 'tail' functions (CAR and CDR in Lisp), can be found in the online introductory tutorial. The matcher is at the heart of
the SimAgent (sim_agent) toolkit. Some of the powerful features of the toolkit, e.g. linking pattern variables to inline code variables, would have been very difficult to implement without the incremental compiler facilities.
See also
- COWSELCOWSELCOWSEL is a programming language designed between 1964 and 1966 by Robin Popplestone. It was based on a RPN form of Lisp combined with some ideas from CPL....
(aka POP-1) programming language - POP-2POP-2POP-2, often referred to as POP2 was a programming language developed around 1970 from the earlier language POP-1 by Robin Popplestone and Rod Burstall at the University of Edinburgh. It drew roots from many sources: the languages LISP and ALGOL 60, and theoretical ideas from Landin...
programming language - PoplogPoplogPoplog is a powerful multi-language, multiparadigm, reflective, incrementally compiled software development environment, originally created in the UK for teaching and research in Artificial Intelligence at the University of Sussex.-History:...
programming environment
External links and downloads
- Free Poplog Portal
- Information about POP-11 teaching materials
- The Poplog.org website (including partial mirror of Free poplog web site) (currently defunct: see its more recent copy (Jun 17, 2008) @ Internet Archive Wayback MachineWayback MachineThe Wayback Machine is a digital time capsule created by the Internet Archive non-profit organization, based in San Francisco, California. It is maintained with content from Alexa Internet. The service enables users to see archived versions of web pages across time, which the Archive calls a "three...
) - An Overview Of POP-11 (Primer for experienced programmers)
- Waldek Hebisch produced a small collection of programming examples in Pop-11, showing how it can be used for symbol manipulation, numerical calculation, logic and mathematics.
- Computers and Thought: A practical Introduction to Artificial Intelligence on-line book introducing Cognitive ScienceCognitive scienceCognitive science is the interdisciplinary scientific study of mind and its processes. It examines what cognition is, what it does and how it works. It includes research on how information is processed , represented, and transformed in behaviour, nervous system or machine...
through Pop-11. - The OpenPoplog sourceforge project.
- The SimAgent (sim_agent) Toolkit
- Pop-11 Eliza in the poplogPoplogPoplog is a powerful multi-language, multiparadigm, reflective, incrementally compiled software development environment, originally created in the UK for teaching and research in Artificial Intelligence at the University of Sussex.-History:...
system. Tutorial on Eliza - History of AI teaching in Pop-11 since about 1976.
- 2-D (X) graphics in Pop-11
- Objectclass the object oriented programming extension to Pop-11 (modelled partly on CLOSCLOSThe Common Lisp Object System is the facility for object-oriented programming which is part of ANSI Common Lisp. CLOS is a powerful dynamic object system which differs radically from the OOP facilities found in more static languages such as C++ or Java. CLOS was inspired by earlier Lisp object...
and supporting multiple inheritanceMultiple inheritanceMultiple inheritance is a feature of some object-oriented computer programming languages in which a class can inherit behaviors and features from more than one superclass....
). - Tutorial introduction to object oriented programming in Pop-11.