Opentopia Directory Encyclopedia Tools

POP-11

Encyclopedia : P : PO : POP : POP-11



 

POP-11 is a powerful reflective 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

External links

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.


Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: