POP-11
|
POP-11 is a powerful programming language developed as part of the Poplog programming environment by the Universities of Birmingham and Sussex. It is an evolution of POP-2, and features an open stack model. It is procedural, and is mostly used for Artificial Intelligence applications, although it has features sufficient for other classes of problems. It is often used to introduce symbolic programming techniques to programmers of more conventional languages like Pascal who find the syntax more familiar than that of lisp.
Examples
Here is an example of a simple POP-11 program:
define Double(Source) -> Result; Source*2 -> Result; enddefine;
Double(123) =>
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", [[the cat] [sat on] the mat]) => ;;; outputs [[the cat] [sat on] mat] RemoveElementsMatching([= cat], [[the cat] is a [big cat]]) => ;;; outputs [is a]
See Also
- Wikipedia: Poplog programming environment
- the Poplog website (http://www.poplog.org)
- AN OVERVIEW OF POP-11 (http://www.cs.bham.ac.uk/research/poplog/primer/START.html)
- Computers and Thought (http://www.informatics.susx.ac.uk/books/computers-and-thought/)