[6de8ee]: examples / notany / README.txt  Maximize  Restore  History

Download this file

38 lines (31 with data), 1.0 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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 driver

    # uses fc_notany.krb
    >>> driver.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
    >>> driver.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

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks