18
From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley University of New Brunswick, Fredericton, NB 21 November 2011 1 Team 1 Daniel Latimer Hanin Almutairi Chaudhry Usman Ali

From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

Embed Size (px)

Citation preview

Page 1: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

1

From POSL to d-POSL: Making the Positional-Slotted Language

Defeasible

Advisors: Nick Bassiliades, Efstratios Kontopoulos

Instructor: Dr. Harold Boley

University of New Brunswick, Fredericton, NB

21 November 2011

Team 1 Daniel LatimerHanin AlmutairiChaudhry Usman Ali

Page 2: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

2

PROJECT DEVELOPMENT MODEL

Page 3: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

3

POSL POSL integrates positional and slotted

knowledge for humans e.g. Prolog’s positional and F-logic’s slotted knowledge.Positional Notation:shipment(PC,47.5,BostonMos,LondonSciM).(Prolog Inspired)Slotted Notation:shipment(cargo->PC;price->47.5,source->BostonMos;dest->LondonSciM).(F-Logic Inspired)Positional-slotted Notation:shipment(PC,47.5;source->BostonMos;dest->LondonSciM).

POSL

: -> ^^

URI ->IRI

POSL 1.0

Boley, Harold. "Integrating Positional and Slotted Knowledge on the Semantic Web". Journal of Emerging Technologies in Web Intelligence (Nov 2010). 343-353.

Page 4: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

4

POSL FLOWChanges implemented in original ANTLR2

grammar POSL.g

POSL ANTLR

POSL 1.0

separator between a variable and its type changed from ":" to "^^"

Page 5: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

5

Defeasible Logic “Defeasible logic, originally created by Donald

Nute with a particular concern about efficiency and implementation, is a simple and efficient rule based non-monotonic formalism. Over the years the logic has been developed and extended, and several variants have been proposed”.

“The main intuition of the logic is to be able to derive “plausible” conclusions from partial and sometimes conflicting information”. 

defeasible.org

Page 6: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

6

Kinds of Rules There are three kinds of rules in defeasible

logic, each represented by a different arrow:

Kontopoulos, Efstratios and Bassiliades, Nick and Antoniou, Grigoris: Visualizing Semantic Web proofs of defeasible logic in the DR-DEVICE system (April, 2011) http://dl.acm.org/citation.cfm?id=1942399

Page 7: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

7

Features of d-POSLRule Label: This is needed in defeasible logics for expressing the superiority relations among rules.

Rule Type: There are three kinds of rules in defeasible logic (previous slide).

Negation and Negation-As-Failure (NAF): Both types of negation are needed in defeasible logics.

Superiority Relation

Given two rules r1 and r2, if r1 > r2, then r1 is considered superior to r2 and r2 is inferior to r1. The superiority relation is used in resolving conflicts among competing rules.

Kontopoulos, Efstratios and Bassiliades, Nick and Antoniou, Grigoris: Visualizing Semantic Web proofs of defeasible logic in the DR-DEVICE system (April, 2011) http://dl.acm.org/citation.cfm?id=1942399

Page 8: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

8

ANTLR “ANTLR, ANother Tool for Language

Recognition, is a language tool that provides a framework for constructing recognizers, interpreters, compilers, and translators from grammatical descriptions containing actions in a variety of target languages”.http://

www.antlr.org

EBNF Grammar ANTLR

Lexer

Parser

Page 9: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

9

How it works

Stream of Characters

LEXER

PARSER

Interpretation of tokens according to ANTLR rules

Tokens

Page 10: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

10

Interpretationr1: acceptable(apartment->?x^^ACCOMMODATION) :- carlo:apartment(apt845^carlo:age->12).

Page 11: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

11

Test Rig

Page 12: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

12

OO jDREW modifications Update the Converter application

Current features:

Convert RuleML 0.88/0.91 to POSL 0.91

Convert POSL 0.91 to RuleML 0.88 or 0.91

Page 13: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

13

OO jDREW modifications Upgraded Functionality

1. Now parses POSL 1.0 instead of 0.91 2. Convert RuleML 0.88/ 0.91/1.0 to POSL 1.0 3. Functionality to upgrade POSL 0.91 to 1.0 4. Convert POSL 1.0 to RuleML 0.88 or 0.91/1.0

Page 14: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

14

OO jDREW modifications Demonstration

Page 15: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

15

OO jDREW modifications To accomplish this:

Update the POSL input field - Generate LEXER and PARSER of modified

grammar using ANTLR 2.7.5

Added support for legacy code - POSL 0.91 - Created a “POSL 0.91 to 1.0 button”

Convert RuleML to POSL 1.0 instead of 0.91

Page 16: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

16

Conclusions Changes implemented in POSL to 1.0. Functionality updated in OO jDREW. Current d-POSL grammar based on EBNF presented

in: Kontopoulos, Efstratios and Bassiliades, Nick and

Antoniou, Grigoris: Visualizing Semantic Web proofs of defeasible logic in the DR-DEVICE system (April, 2011) http://dl.acm.org/citation.cfm?id=1942399

A test rig to label input according to specification in the grammar has been implemented.

http://d-posl.wikispaces.com/file/view/demoDpos_fat.jar

Page 17: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

17

Future Work Further work can be done in d-POSL to refine

the grammar according to new requirements. d-POSL grammar can be implemented into a

stand alone application.

Page 18: From POSL to d-POSL: Making the Positional-Slotted Language Defeasible Advisors: Nick Bassiliades, Efstratios Kontopoulos Instructor: Dr. Harold Boley

18

References Boley, Harold. "Integrating Positional and Slotted

Knowledge on the Semantic Web". Journal of Emerging Technologies in Web Intelligence (Nov 2010). 343-353.

Kontopoulos, Efstratios and Bassiliades, Nick and Antoniou, Grigoris: "Visualizing Semantic Web proofs of defeasible logic in the DR-DEVICE system". Knowledge-Based Systems (April 2011). 406-419.

Parr, Terrence. The Definitive ANTLR Reference: Building Domain-Specific Languages. 2007.