lawyer::person. person[hasChild => person, marriedTo => person]. john:lawyer. john[hasChild -> mary]. // simple rule ?x:parent :- ?x:person, ?x[hasChild -> ?y]. // simple rule with non-monotonic negation // from this follows: john:singleParent ?x:marriedParent :- ?x:parent, ?x[marriedTo -> ?y]. ?x:singleParent :- ?x:parent, not ?x:marriedParent. // uncomment this fact to marry john and make him not single anymore // john[marriedTo -> jill]. // (inferring) semantics of attribute signature // uncomment to get the additional inference mary:person. // ?y:?z :- ?x:?v[?w -> ?y], ?v[?w => ?z].