Current Slide

Small screen detected. You are viewing the mobile version of SlideWiki. If you wish to edit slides you will need to use a larger device.

Logic Programming - Negation

  • Logic Programs can also contain recursion

  • Example:
    • ancestor (x,y) :- hasParent(x, y)
    • ancestor(x,z) :- ancestor(x,y), ancestor(y,z).

  • This is a problem as soon as negation is allowed since the minimal model is not uniquely defined anymore

  • It is useful to consider this using a dependency graph
    • A predicate is a node in the graph
    • There is a directed edge between predicates q and p if they occur in a rule where q occurs in the head and p in the body.
    • If the dependency graph contains a cycle then the program is recursive


Speaker notes:

Content Tools

Sources

There are currently no sources for this slide.