Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Tree [495079] default / examples / notany /
History



File Date Author Commit
README.txt 2010-03-04 Bruce Frederiksen Bruce Frederiksen [c5bb15] Moved example .tst scripts into Test/examples.
bc_notany.krb 2008-08-29 mtnyogi mtnyogi [0ee160] Finished with the documentation! (Well, almost...
family.kfb 2008-08-29 mtnyogi mtnyogi [0ee160] Finished with the documentation! (Well, almost...
fc_notany.krb 2008-08-29 mtnyogi mtnyogi [0ee160] Finished with the documentation! (Well, almost...
run.py 2010-03-04 Bruce Frederiksen Bruce Frederiksen [c5bb15] Moved example .tst scripts into Test/examples.

Read Me

This is a small example of the 'notany' clause used to verify that none of
the elements of a list meet a certain requirement.  This is done in both
forward-chaining and backward-chaining rules.

The forward-chaining and backward-chaining rules are in two different .krb
files showing examples of use of the 'notany' clause in both cases.

These rules find all people who have no aunts all people with no uncles.

    >>> import run

    # uses fc_notany.krb
    >>> run.fc_test()
    egon has no uncle
    ralf has no uncle
    anton has no uncle
    elisabeth has no uncle
    karin has no uncle
    sabine has no uncle
    anton has no aunt
    elisabeth has no aunt
    karin has no aunt
    sabine has no aunt

    # uses bc_notany.krb
    >>> run.bc_test()
    anton has no aunt
    elisabeth has no aunt
    karin has no aunt
    sabine has no aunt
    egon has no uncle
    ralf has no uncle
    anton has no uncle
    elisabeth has no uncle
    karin has no uncle
    sabine has no uncle