Download presentation
Presentation is loading. Please wait.
Published byAlfred Nichols Modified over 9 years ago
1
www.ontoprise.de © 2005 ontoprise GmbH Home - 1 - | Menu | Partner | End Copyright ©2005 ontoprise GmbH, Karlsruhe F-Logic Forum: Results and Open Issues left Martin Weindel, 28-10-2006 www.ontoprise.de
2
© 2005 ontoprise GmbH Home - 2 - | Menu | Partner | End Agenda New F-Logic Specification, why? Highlights of New F-Logic Parser for New F-Logic Open Issues
3
www.ontoprise.de © 2005 ontoprise GmbH Home - 3 - | Menu | Partner | End New F-Logic Specification, why? Original paper on F-logic published 1995 Various systems based on F-logic: Flora-2, Ontobroker, Florid,... Problem areas: New ideas incompatible syntax extensions Differences in Semantics Usability and syntax inconsistencies => Forum F-Logic to define new specification
4
www.ontoprise.de © 2005 ontoprise GmbH Home - 4 - | Menu | Partner | End Highlights Highlights of New F-Logic
5
www.ontoprise.de © 2005 ontoprise GmbH Home - 5 - | Menu | Partner | End Highlights I: Directives Usage of directives on a per-file basis Namespace Prefixes to simplify dealing with URIs, following the RDF construct (sQNames) :- _prefix dc="http://purl.org/dc/elements/1.1/". Modules to isolate different parts of KB, only one module per file :- _module _"http://foo.org/onto#m2". More directives: _version, _encoding,...
6
www.ontoprise.de © 2005 ontoprise GmbH Home - 6 - | Menu | Partner | End Directives Example Without directives _"http://foo.org/onto#Doc3"[ _"http://purl.org/dc/elements/1.1/creator" -> "Billy Smith", _"http://purl.org/dc/elements/1.1/subject" -> "Improved Readability"]@_"http://foo.org/onto#m2". With directives :- _module _"http://foo.org/onto#m2". :- _default prefix = "http://foo.org/onto#". :- _prefix dc="http://purl.org/dc/elements/1.1/". #Doc3[dc#creator -> "Billy Smith", dc#subject -> "Improved Readibility"]. No explicit module needed Default prefix
7
www.ontoprise.de © 2005 ontoprise GmbH Home - 7 - | Menu | Partner | End Highlights II: Variables Variables are denoted as ?Var Implicit quantification ?X[grandfather -> ?G] :- ?G = ?X.father.father. Old: forall X,G X[grandfather -> G] :- G = X.father.father. Anonymous variables ? or ?_ Explicit quantification ( forall, exist ) still supported p(?X) :- q(?X, ?_) and exist ?Y r(?X, ?Y).
8
www.ontoprise.de © 2005 ontoprise GmbH Home - 8 - | Menu | Partner | End Highlights III: If-then-else Support for if-then-else rules to improve readability of simple rules for laymen if ?X:Person.age >= 18 then ?X:Adult else if ?X.age >= 12 then ?X:Teenager else ?X:Child.
9
www.ontoprise.de © 2005 ontoprise GmbH Home - 9 - | Menu | Partner | End Highlights IV: Syntax changes Various syntax changes, most important: Set value attributes only, i.e. dropping double arrows operators ->>, =>>, *->>, *=>>,.., !! Usage of comma, or and instead of semicolon to separate parts in Flogic-molecules Hi-Log syntax for method arguments ( @ dropped) New Syntax Man[son(Woman) {0:*} => Man]. Adam:Man[son(Alibama) -> {Jaus,Jalomus,Coreus}, son(Ada) -> Aliphaz]. Old Syntax Man[son@(Woman) =>> Man]. Adam:Man[son@(Alibama) - >> {Jaus,Jalomus,Coreus}; son@(Ada) ->> Aliphaz].
10
www.ontoprise.de © 2005 ontoprise GmbH Home - 10 - | Menu | Partner | End Highlights V: Aggregate Syntax for aggregates as proposed in FLORA-2 : ?Var = Aggregate {?Var [GroupingVarList] | Query} ?- ?Z = min {?S | john[salary(?Year)->?S]}. ?- ?Z = count{?Year | john.salary(?Year) ?S], ?Y < Year}}.
11
www.ontoprise.de © 2005 ontoprise GmbH Home - 11 - | Menu | Partner | End Parser A Parser for the new F-Logic
12
www.ontoprise.de © 2005 ontoprise GmbH Home - 12 - | Menu | Partner | End From Spec To Code Parser implemented from scratch using 1. Specification web pages of Forum Flogic 2. Discussions and results in Forum Flogic mailing list 3. Some „gap filling“ with parts from FLORA-2 Ontobroker
13
www.ontoprise.de © 2005 ontoprise GmbH Home - 13 - | Menu | Partner | End Parser: Technical Details Implemented in Java using parser generator ANTLR 3.0 (see http://www.antlr.org ) http://www.antlr.org LL(*) parser => more powerful => more natural grammar Error recovery Code generation possible for other languages (needs rewrite of actions and model classes) C++ C# Python
14
www.ontoprise.de © 2005 ontoprise GmbH Home - 14 - | Menu | Partner | End Parser Workflow Lexer Parser Path Expression Expansion Flogic Text Internal Parse Tree with Path Expr. and F-Molecules Expanded Parse Tree only containing F-Atoms
15
www.ontoprise.de © 2005 ontoprise GmbH Home - 15 - | Menu | Partner | End Demo Parser demonstration at http://217.110.222.146:12080/ demoparser/ForumFlogicParser.html
16
www.ontoprise.de © 2005 ontoprise GmbH Home - 16 - | Menu | Partner | End Unsupported Syntax Features Reification Introspection Syntax for forcing evaluation of evaluable functions File loading syntax Meta unification (part of spec?) User defined equality :=: (part of spec?)
17
www.ontoprise.de © 2005 ontoprise GmbH Home - 17 - | Menu | Partner | End Open Issues
18
www.ontoprise.de © 2005 ontoprise GmbH Home - 18 - | Menu | Partner | End Open Issue: Strings, Symbols, and URIs Unification of Strings, symbols, URIs? Difference between symbol and string not easy for normal users "BMW Z4" => String (double quote) 'BMW Z4' => Symbol (single quote) _"http://bmw/z4" => URI ( = 'http://bmw/z4' ???) Inconsistent notation for symbols with prefix: String + Symbol = URI :- _prefix a = "http://foo/". a#'bar' == _"http://foo/bar"
19
www.ontoprise.de © 2005 ontoprise GmbH Home - 19 - | Menu | Partner | End Open Issue: Namespaces RDF sQNames are not sufficient: GUIs will show only local part => Heuristics needed to separate namespace Query for all objects of a given namespace ?- "http://foo/"#?X Query for namespaces for given local name ?- ?X#bar Is # an operator? If yes, then strings should be allowed before # ?- 'http://foo/bar'[att -> ?X]. ?- "http://foo/"#bar[att -> ?X].
20
www.ontoprise.de © 2005 ontoprise GmbH Home - 20 - | Menu | Partner | End Open Issue: Modules in Rule Head Spec suggests to disallow module specification in rule head to enforce encapsulation But module specs in rule head are currently used in some cases: Axioms Modelling of processes Predefined rule sets working on modules with similar structure q(?X)@?M :- p(?X)@?M.
21
www.ontoprise.de © 2005 ontoprise GmbH Home - 21 - | Menu | Partner | End Open Issue: Embedded modules Need to import concepts and attributes from upper ontology Need to make instances visible to upper ontology rules Upper Ontology Domain Ontology 1 Domain Ontology 2 Inherits concepts & attributes
22
www.ontoprise.de © 2005 ontoprise GmbH Home - 22 - | Menu | Partner | End Other Open Issues Rule & query syntax Only head :- body. Or is <- allowed alternatively? Old style rules and queries starting with forall? Ontobroker query extensions sortedby, orderedby? Documentation of rules and queries? Unicode escape sequences in strings and symbols? Syntax for rule labels? Allowed encoding specifications Readability of BooleanMethod specifications? ... => Discussion in Forum mailing list
23
www.ontoprise.de © 2005 ontoprise GmbH Home - 23 - | Menu | Partner | End Open Source Reference Parser Next Steps: Refine this parser to become the reference parser Release as Open Source
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.