POP-11 |
POP-11 is a powerful Reflection (computer science) programming language developed as part of the Poplog programming environment by the Universities of University of Birmingham and University of Sussex. It is an evolution of POP-2, and features an open stack model. It is procedural programming, 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_programming_language who find the syntax more familiar than that of Lisp_programming_language.
=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=
|
|
