1 / 30

Naive Evaluation

q(f(a), a), q(a,c), q(f(c),c), r(a, c), r(c, d), r(e,f) p(X, Y)  q(f(X), X)  r(X, Y)  p(X, c). Naive Evaluation. X. f(X). X. Y. X. Y. a. c. f(a). a. a. c. c. d. f(c). c. c. d. a. c. e. f. Given an interpretation I µ B P . T is defined by:. Immediate Consequence.

jaunie
Download Presentation

Naive Evaluation

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. q(f(a), a), q(a,c), q(f(c),c), r(a, c), r(c, d), r(e,f)p(X, Y)  q(f(X), X)  r(X, Y)  p(X, c) Naive Evaluation X f(X) X Y X Y a c f(a) a a c c d f(c) c c d a c e f

  2. Given an interpretation IµBP. T is defined by: Immediate Consequence T(I) = {H σ | H <- B1 Λ.. Λ Bn. and Biσ  I} , σis a variable substitution. T1(I) = T(T(T(….(I)….)))

  3. If a n exists: Tn(I) = Tn+1(I) then G = Tn(I) = I1 Is the set of concluded facts (without negation) Semantics without Negation

  4. p(a). p(b). q(a). r(X)  q(X). t(X)  p(X) and r(X). Example I = {p(a), p(b), q(a)} T(I) = {r(a)} {p(a), p(b), q(a)} T(T(I)) = {r(a), t(a), p(a), p(b), q(a)} = T(T(T(I))) = T(T(T(….(I)….)))

  5. p(a). p(b). q(a). r(X)  q(X). Level 1 t(X)  p(X) and not r(X). Level 2 Stratification: Example I0 = {p(a), p(b), q(a)} T(I0) = {r(a)} {p(a), p(b), q(a)} = I1 T(I1) = {t(b), r(a), p(a), p(b), q(a)} = I2

  6. What about the following? person(somebody). woman(X) <- person(X) and not man(X). man(X) <- person(X) and not woman(X).

  7. Van Gelder et al., JACM 1991, http://citeseer.nj.nec.com/gelder91wellfounded.html If there exists some n: Tn+1(I) = Tn-1(I) and Tn+2(I) = Tn(I) Then the true facts are defined by the smaller sets of Tn-1(I) and Tn(I) Unknown facts are given by set difference. Alternating Fixed Point (Well-Founded Semantics)

  8. person(sb). woman(X) <- person(X) and not man(X). man(X) <- person(X) and not woman(X). Alternating Fixed Point: Example T(I={person{sb}}) = {woman(sb), man(sb), person(sb)} T(T(I)) = {person(sb)} T(T(T(I))) = {woman(sb), man(sb), person(sb)} T(T(T(T(I)))) = {person(sb)} True Facts = {person(sb)} Unknown Facts = {woman(sb), man(sb)}

  9. F-LogicThanks to Jürgen Angele

  10. F-Logic (Syntax) Kifer, Lausen, Wu, Journal of the ACM, 42:741–843, 1995.

  11. F - Logic • Object Oriented (Frame Based) Logic • Well-Defined Semantics (Well-Founded Semantics) • Efficient Evaluation Strategy • Turing-Complete

  12. Concepts and Subconcept Relationship Objects are identified using unique Ids Person::OBJECT. Man:: Person. Woman::Person. Employee::Person. Professor::Employee. Student::Person. PhDStudent::Student. AcademicInstitution::Object. University::AcademicInstitution. http://www.projecthalo.com/ -> downloads -> Halo pilot downloads -> Ontoprise Halo Improved download(Format: EXE/78 MB)

  13. Conceptual Modeling Define Range of Attributes: Person[hasName=>>STRING; hasBirthdate=>DATE; hasWeight=>NUMBER; ......]. AcademicInstitution[hasName=>>STRING; hasAddress=>>STRING; …]. Student[studiesAt=>AcademicInstitution; …].

  14. Instances and Attributes Assign values to Attributes : Schmidt:Student. Schmidt[hasName->>“Stefan Schmidt"; studiesAt->>UKoLd; hasBirthdate->1985-0707; hasWeight->75.0]. UKoLd:University. UKoLd[hasName->>“Universität Koblenz-Landau"; hasAddress->>“Isaac-Fulda-Allee 3, Mainz"; …].

  15. Rules & Queries // All students at UKoLd FORALL S <- S:Student[studiesAt->>UKoLd]. // Student at Academic Institutions of some state are students educated at the costs of this state Rule PaysFor: FORALL C,S,A,L C[paysEducationCostsOf->>S] <- S:Student[studiesAt->>A:AcademicInstitution] AND A[hasAddress->L] AND partOf(L,C) AND C:State.

  16. Quantifier Quantifiers can range over concepts and attributes • FORALL X,Y <- X::Y. • FORALL X,R <- X[hasName=>>R]. • FORALL A,R <- University[A=>R].

  17. F-Molecule • An F-Molecule Schmidt:Student[hasName->>“Stefan Schmidt"; studiesAt->>UKoLd; hasBirthdate->1985-07-07; hasWeight->75.0]. • …can be split into multiple F-Atoms: Schmidt:Student. Schmidt[hasName->>“Stefan Schmidt"]. Schmidt[studiesAt->>UKoLd]. Schmidt[hasBirthdate->1985-07-07]. Schmidt[hasWeight->75.0].

  18. Parametrised Attributes Schmidt:Student[ studiesAt(UKoLd)->>”Computer Science”; studiesAt(FernUHagen)->>”Philosophy” ].

  19. Predicates Instead of Schmidt:Student[ studies(UKoLd)->>”Computer Science”; studies(FernUHagen)->>”Philosophy” ]. We can also write studies(Schmidt,UKoLd,”Computer Science”). studies(Schmidt,FernUHagen,”Philosophy”).

  20. Builtins isString(<arg>) concat(<string 1 > , <string 2 > , <string 3 >) cut(<string>,<n>,<variable>) tokenize(<string>,<delimiters>,<variable>) tokenizen(<string>,<n>,<delimiters>,<variable>) tolower(<string>,<variable>) toupper(<string>,<variable>) regexp(<regular expression>,<string1>,<string2>) constant2string(<function>,<string>) string2number(<string>,<number>) sin,cos,tan,asin,acos,ceil,floor,exp, rint,sqrt,round,max,min,pow

  21. Builtin Examples • tolower: FORALL X <- tolower(“I Love Ontologies!”,X). • is, equals: FORALL B,C,A <- (B is A+1) AND (C is A+2) AND equals(A,1). • dbaccessuser2, concat: FORALL X, PROJECTID, PROJECTNAME X:Project[name->> PROJECTNAME] <- dbaccessuser2(“table_projects", F(“projectID",PROJECTID, “project_name",PROJECTNAME), "mssqlserver2000",“database_projects", “computer_xyz:1433", "zope","zope") AND concat(“project", PROJECTID,X).

  22. Lists [a, b, c, d, e] [Head | Tail] [a, b, c, d | Tail]

  23. Negation FORALL S S:NonTechnicalStudent <- S:Student[studiesAt->>UKoLd] AND NOT S[studies(UKoLd)->>”Computer Science”].

  24. Namespaces To distinguish objects in different ontologies: <ns ontons:cars="www.cars-r-us.tv" ontons:finance="www.financeWorld.tv" ontons="www.myDomain.tv/private"> cars#Car[cars#driver => cars#Person; cars#passenger =>> cars#Person; cars#seats => NUMBER]. cars#Person[cars#name => STRING]. </ns>

  25. Namespaces <ns ontons:cars="www.cars-r-us.tv" ontons:finance="www.financeWorld.tv" ontons="www.myDomain.tv/private"> cars#Car[cars#driver => cars#Person; cars#passenger =>> cars#Person; cars#seats => NUMBER]. cars#Person[cars#name => STRING]. </ns> Translated into obj(„www.cars-r-us.tv“,car)[obj(„www.cars-r-us.tv“,driver)=> obj(„www.cars-r-us.tv“,Person), ….] To distinguish objects in different ontologies:

  26. Metamodelling InstitutionType[hasInstantiations->Number]. University:InstitutionType. Fachhochschule:InstitutionType. University[hasInstations->2]. Fachhochschule[hasInstantiations->1] Institution[hasName=>>String]. University::Institution. UKoLd:University[hasName->>”Universitaet Koblenz- Landau”]. UMainz:University[hasName->>”Universitaet Mainz”]. FHKoblenz:Fachhochschule[ hasName->>”Fachhochschule Koblenz”] .

  27. Complex Rules Arbitrary First Order Formula p(1). p(2). p(3). FORALL X maximum(X) <- p(X) AND FORALL Y (p(Y) -> lessorequal(Y,X)).

  28. Lloyd-Topor Transformation FORALL X,Y maximum(X) <- p(X) AND (NOT p(Y) OR lessorequal(Y,X)). FORALL X maximum(X) <- p(X) AND NOT q(X). FORALL X,Y q(X) <- p(Y) AND NOT lessorequal(Y,X). FORALL X maximum(X) <- p(X) AND FORALL Y (p(Y) -> lessorequal(Y,X)).

  29. Transformation from F-Logic to Horn-Logic isa_(a,C) sub_(A,B) atttype_(A,B,C) setatttype_(A,B,C) att_(a,B,c) setatt_(a,B,c) a:C A::B A[B=>C] A[B=>>C] a[B->c] a[B->>c]

  30. Transformation from F-Logic to Horn-Logic FORALL X,Y,Z setatt_(X,ancestor,Y) <- setatt_(X,father,Z) AND setatt_(Z,ancestor,Y). FORALL X,Y,Z X[ancestor->>Y] <- X[father->Z] AND Z[ancestor->>Y].

More Related