POP-11
Encyclopedia
POP-11 is a reflective
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 cat
The 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 cat
Big cat
The 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

  • COWSEL
    COWSEL
    COWSEL 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-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...

     programming language
  • 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 environment

External links and downloads


External links

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