npl

npl is a programming language for building expert systems. It is very simple, yet extremelly powerful. It is distributed under the GNU General Public License V3.

Like other expert system languages, npl deals with rules and facts. Various facts can make a rule applicable. An applicable rule is then asserted. As an example, a program that applies Newton’s third law of motion to interpersonal relations:

person are thing.
mike isa person.
sue isa person.
loves isa verb.
mike loves sue.
if: Person1 Verb1 Person2;
then: Person2 Verb1 Person1.

The elements are, thing, isa, verb, and if: ... then: ... are primitives of the language. And, with this, npl would conclude that sue loves mike [1].


Footnotes

[1]For clarity, in these examples I have removed a little bit of necessary syntax, that is only needed to allow for more complex developments.


comments
blog comments powered by Disqus