1 / 15

NKU CSC 685 Advanced Topics in Applied Logic 3: Herbrand Logic, Horn Logic, Semantic Web

NKU CSC 685 Advanced Topics in Applied Logic 3: Herbrand Logic, Horn Logic, Semantic Web. Example : constants: a,b predicates: arity 1: P; arity 2: Q f unction symbols: arity 1: f. Some sentences in this first-order language: Pa Qab Qbb Pf(a) Qf(f(b))f(a)

zeno
Download Presentation

NKU CSC 685 Advanced Topics in Applied Logic 3: Herbrand Logic, Horn Logic, Semantic Web

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. NKU CSC 685 Advanced Topics in Applied Logic 3: Herbrand Logic, Horn Logic, Semantic Web

  2. Example: • constants: a,b • predicates: arity 1: P; arity 2: Q • f unction symbols: arity 1: f Some sentences in this first-order language: Pa Qab Qbb Pf(a) Qf(f(b))f(a) x Qxa xy (Qxy  (Qya  Pf(x)) • Example: • A= { people} • a= Alice, b= Bob • Px = x is female, Qxy = x loves y • f(x) = mother of x • Example: • A= integers • a= 4, b= 17 • Px = x is prime, Qxy = x < y • f(x) = 2x+1 |= Pa not |= Pa Remembering First-Order Logic • A language ["vocabulary"] in First Order Logic • a set of constant symbols • a set of predicate symbols • a set of function symbols • Models for First Order Logic • a universe of individuals A • an interpretation of constant symbols as elements of A • an interpretation of predicate symbols as relations on A • an interpretation of function symbols as functions on A

  3. terms: x, y, f(x), f(f(f(y))), a, b, f(f(a)), ... atoms: Px, Qxy, Qf(x)f(a), Pa, Qf(f(b))a, ... ground atoms ground terms ground sentences • Herbrand Models for First Order Logic • Any set M of ground atoms • an interpretation of constant symbols as elements of A • an interpretation of predicate symbols as relations on A • an interpretation of function symbols as functions on A unnecessary define truth in a Herbrand model this way Base: A ground atom is true iff it is in M Terms are equal iff they are syntactically identical Recursion: |=   iff |= and |= (similarly for , , ) |= x (x) iff |=(t) for all ground terms t (similarly for ) Herbrand Models • Example: • constants: a,b • predicates: arity 1: P; arity 2: Q • f unction symbols: arity 1: f Some sentences in this first-order language: Pa Qab Qbb Pf(a) Qf(f(b))f(a) Pa Qab x Qxa xy (Qxy  (Qya  Pf(x)) • Example: • M= { Pa, Qab, Qbb, Pf(a) } • |= Pa, |= xy Qxy • not |= Pb, not |= x Pf(x)

  4. Observations on Herbrand Models • In a general model you might have |= f(f(b)) = a(e.g. if f(x)=x+1, a=5, b=3), but in a Herbrand model you will never have |= f(f(b)) = a, since f(f(b)) and aare not syntactically identical. • First order logic restricted to have Herbrand semantics is called "HerbrandLogic." It is "harder" than first-order logic: • In first-order logic, A|= is undecidable, but it is semi-decidable. (not recursive, but recursively enumerable) • In Herbrand logic, A|= is not even semi-decidable! • In a first-order language with no function symbols, Herbrand logic is "easier"than first-order logic. Why? • Herbrand logic is not compact*. Why? *Compactness: If every finite subset of a set of sentences has a model, then the entire set of sentences has a model.

  5. Remembering Logic Programming • A literal is either: • [positive literal] an atom: e.g. Qxy, Qxf(b), or • [negative literal] a negation of an atom: e.g. Qxy, Qxf(b) A Horn clause is a disjunction of literals, at most one of which is positive.  Qxy   Px  Qxf(b)  Qax Qxy  Px  Qxf(b)  Qax Qax :- Qxy, Px, Qxf(b) a "rule" Q(a,?x) :- Q(?x,?y), P(?x), Q(?x,f(b)) All variables are free. In Prolog logic programming, these variables are understood to be universally quantified: xy ( Qxy  Px  Qxf(b)  Qax )

  6. Remembering Logic Programming, 2 Special cases of Horn clauses: a "query" a "fact"  Qxy   Px  Qxf(b)    T  Qax Qxy  Px  Qxf(b)   T  Qax Qax not [ Qxy  Px  Qxf(b) ] :- Qxy, Px, Qxf(b) Qax :- Universally quantified variables appearing before  can be treated as existentially quantified, since x ((x) ) =||= x (x)  grandparent(x,y) :- parent(x,z), parent(z,y) xy (z(Pxz Pzy)  Gxy)

  7. Horn logic is first-order logic with the sentences restricted to be Horn clauses. • A formula in Horn logic is satisfiable (in the sense of first-order logic)iff it has a Herbrand model. • Horn logic still undecidable (unless you get rid of function symbols).

  8. potentiallyuseful <xml> ... <couple> <husband>Joe</husband> <wife>Mary</wife> <child>Billy</child> <child>Jane</child> </couple> ... </xml> ...but how do we tap its potential? Semantic Web useless <html> ... <p>Children of Joe and Mary: <ul> <li>Billy</li> <li>Jane</li> </ul> ... </html>

  9. graph binary relations joe mary sex Husband(couple30981,joe) Wife( couple30981,mary) Child( couple30981,jane) Sex( jane, female) Sex( mary, female) ... sex husband wife male couple30981 female child sex sex child billy jane RDF (Resource Description Framework) <xml> ... <rdf:Description rdf:about="couple30981"> <husband>Joe</husband> <wife>Mary</wife> <child>Billy</child> <child>Jane</child> </rdf:Description> <rdf:Description rdf:about="jane"> <sex>Female</sex> </rdf:Description> ... </xml> Note: XML syntax for RDF in these slides is slightly simplified. See Antoniou-Harmelen for details.

  10. RDF allows open containers: sequences, bags, options <child> <rdf:Bag> <rdf:li>Billy</rdf:li> <rdf:li>Jane</rdf:li> </rdf:Bag> </child> <xml> ... <rdf:Description rdf:about="couple30981"> <husband>Joe</husband> <wife>Mary</wife> <child>Billy</child> <child>Jane</child> </rdf:Description> <rdf:Description rdf:about="jane"> <sex>Female</sex> </rdf:Description> ... </xml>

  11. <child> <rdf:List> <rdf:first>Billy</rdf:first> <rdf:rest> <rdf:List> <rdf:first>Jane</rdf:first> <rdf:rest> <rdf:nil/> </rdf:rest> </rdf:List> </rdf:rest> </rdf:List> </child> couple30981 child rdf:rest rdf:rest rdf:list rdf:list rdf:nil rdf:first rdf:first Billy Jane RDF allows closed lists (Lisp-style)

  12. Reification Treat a relational proposition as an object of a relation. Likes( Sally, rice )  Thinks( John, Likes( Sally, rice ) ) reify <rdf:Statement rdf:about="statement310"> <rdf:subject>sally</rdf:subject> <rdf:predicate>likes</rdf:predicate> <rdf:object>rice</rdf:object> </rdf:Statement> <rdf:Description rdf:about="John"> <thinks>statement310</thinks> </rdf:Description>

  13. domain knows range subPropertyOf CulturalConstruct speaks domain range subClassOf Language Speaker RDF schema type type RDFs use of relations (arcs) and resources (nodes) needs to be part of an ontology: an inventory of a part of a world or domain of discourse. Some resources are types (course), some are instances (CSC685). Types can have subtypes (parent < ancestor) Relations can have subrelations ( friend-of < acquaintance-of ). RDFs/RDF has an axiomatic semantics in first-order logic RDF Schema is a primitive ontology language. RDF Antonia Tzotzil speaks

  14. RDFs is too limited as an ontology language. • Need: • ability to say classes are disjoint (e.g. female  male = ) • ability to do set operations (e.g.union, intersection, complement) • ability to have cardinality restrictions (e.g. #owners < 5) • ability to specify properties of relations (e.g. isTransitive, isInverseOf) OWL ("Web Ontology Language") : OWL Full (undecidable) OWL DL ("DL" = description logic) OWL Lite <owl:Class rdf:about="#professor"> <owl:disjointWith rdf:resource="#lecturer"/> <owl:disjointWith rdf:resource="#administrator"/> </owl:Class>

  15. RuleML <rule> <head> <atom> <predicate>r</predicate> <term><var>x</var></term> </atom> </head> <body> <atom> <predicate>p</predicate> <term><var>x</var></term> <term><var>y</var></term> </atom> <atom> <predicate>q</predicate> <term><var>y</var></term> </atom> </body> </rule> r(?x) :- p(?x,?y), q(?y) x ( x(Pxy  Qy)  Rx )

More Related