Answer Set Programming with External Sources

Σχετικά έγγραφα
The Simply Typed Lambda Calculus

TMA4115 Matematikk 3

DECO DECoration Ontology

2. THEORY OF EQUATIONS. PREVIOUS EAMCET Bits.

Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016

2 Composition. Invertible Mappings

Μαθηματική Λογική και Λογικός Προγραμματισμός

Quick algorithm f or computing core attribute

ΜΟΝΤΕΛΑ ΛΗΨΗΣ ΑΠΟΦΑΣΕΩΝ

Q1a. HeavisideTheta x. Plot f, x, Pi, Pi. Simplify, n Integers

Lifting Entry (continued)

Αλγόριθμοι και πολυπλοκότητα NP-Completeness (2)

Toward a SPARQL Query Execution Mechanism using Dynamic Mapping Adaptation -A Preliminary Report- Takuya Adachi 1 Naoki Fukuta 2.

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +


[4] 1.2 [5] Bayesian Approach min-max min-max [6] UCB(Upper Confidence Bound ) UCT [7] [1] ( ) Amazons[8] Lines of Action(LOA)[4] Winands [4] 1

Heisenberg Uniqueness pairs

Review Exercises for Chapter 7

Fractional Colorings and Zykov Products of graphs

HY118- ιακριτά Μαθηµατικά

ΔΗΜΟΤΙΚΕΣ ΕΚΛΟΓΕΣ 18/5/2014 ΑΚΥΡΑ

, Evaluation of a library against injection attacks

Τίτλος Μαθήματος. Ενότητα 3: Θεωρία λογικού προγραμματισμού. Παναγιώτης Σταματόπουλος Σχολή Θετικών Επιστημών Τμήμα Πληροφορικής και Τηλεπικοινωνιών

Paper Reference. Paper Reference(s) 1776/04 Edexcel GCSE Modern Greek Paper 4 Writing. Thursday 21 May 2009 Afternoon Time: 1 hour 15 minutes

Lecture 2. Soundness and completeness of propositional logic

Every set of first-order formulas is equivalent to an independent set

Computing the Macdonald function for complex orders

GREECE BULGARIA 6 th JOINT MONITORING

Numerical Methods for Civil Engineers. Lecture 10 Ordinary Differential Equations. Ordinary Differential Equations. d x dx.

Probability and Random Processes (Part II)

UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS General Certificate of Education Ordinary Level

1530 ( ) 2014,54(12),, E (, 1, X ) [4],,, α, T α, β,, T β, c, P(T β 1 T α,α, β,c) 1 1,,X X F, X E F X E X F X F E X E 1 [1-2] , 2 : X X 1 X 2 ;

Τίτλος Μαθήματος. Ενότητα 4: Επεκτάσεις, υλοποίηση, παραλληλία

Numerical Analysis FMN011

Optimization, PSO) DE [1, 2, 3, 4] PSO [5, 6, 7, 8, 9, 10, 11] (P)

Abstract Storage Devices

Κατ οίκον Εργασία 2 Λύσεις

Κεφάλαιο 8 Σημασιολογία λογικών προγραμμάτων

Probabilistic Approach to Robust Optimization

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

( y) Partial Differential Equations

A Hierarchy of Theta Bodies for Polynomial Systems

Βιογραφικό Σηµείωµα Αντώνη Μπικάκη 5/6/2010. Βιογραφικό Σηµείωµα. Αντώνης Μπικάκης

Models for Probabilistic Programs with an Adversary

SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM

UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS International General Certificate of Secondary Education

Cambridge International Examinations Cambridge International General Certificate of Secondary Education

Example Sheet 3 Solutions

Πρόγραμμα Μεταπτυχιακών Σπουδών «Πληροφορική και Εφαρμογές»

ΕΜΜΕΛΗΣ ΑΠΑΓΓΕΛΙΑ. Γεωργίου Ε. Χατζηχρόνογλου

ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011

Matrices and Determinants

SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM

ΗΥ Λογική. Διδάσκων: Δημήτρης Πλεξουσάκης Καθηγητής

Second Order Partial Differential Equations

Τεχνολογίες Αναπαράστασης Γνώσης και Συμπερασμού: Η Περίπτωση ενός Έξυπνου Βοηθού Προπονητή Ποδοσφαίρου

ΕΘΝΙΚΟ ΜΕΤΣΟΒΙΟ ΠΟΛΥΤΕΧΝΕΙΟ

Sequent Calculi for the Modal µ-calculus over S5. Luca Alberucci, University of Berne. Logic Colloquium Berne, July 4th 2008

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

P P Ó P. r r t r r r s 1. r r ó t t ó rr r rr r rí st s t s. Pr s t P r s rr. r t r s s s é 3 ñ

Section 8.3 Trigonometric Equations

Inverse trigonometric functions & General Solution of Trigonometric Equations

A Bonus-Malus System as a Markov Set-Chain. Małgorzata Niemiec Warsaw School of Economics Institute of Econometrics

Applying Markov Decision Processes to Role-playing Game

Maude 6. Maude [1] UIUC J. Meseguer. Maude. Maude SRI SRI. Maude. AC (Associative-Commutative) Maude. Maude Meseguer OBJ LTL SPIN

Cambridge International Examinations Cambridge International General Certificate of Secondary Education

Aquinas College. Edexcel Mathematical formulae and statistics tables DO NOT WRITE ON THIS BOOKLET

Παραμετρικές εξισώσεις καμπύλων. ΗΥ111 Απειροστικός Λογισμός ΙΙ

ΑΡΧΙΜΗ ΗΣ - ΕΝΙΣΧΥΣΗ ΕΡΕΥΝΗΤΙΚΩΝ ΟΜΑ ΩΝ ΣΤΑ ΤΕΙ. Υποέργο: «Ανάκτηση και προστασία πνευµατικών δικαιωµάτων σε δεδοµένα

ECE 308 SIGNALS AND SYSTEMS FALL 2017 Answers to selected problems on prior years examinations

European Constitutional Law

89 = = 68 89

Cambridge International Examinations Cambridge International General Certificate of Secondary Education

Ζήτηση Προσφορά Ελαστικότητα

Cambridge International Examinations Cambridge International General Certificate of Secondary Education

Επερωτήσεις σύζευξης με κατάταξη

VBA Microsoft Excel. J. Comput. Chem. Jpn., Vol. 5, No. 1, pp (2006)

Formal Semantics. 1 Type Logic

Solutions to the Schrodinger equation atomic orbitals. Ψ 1 s Ψ 2 s Ψ 2 px Ψ 2 py Ψ 2 pz

D Alembert s Solution to the Wave Equation


Cambridge International Examinations Cambridge International General Certificate of Secondary Education

Εξωτερικός Συνεργάτης στο διπλογραφικό σύστημα φορέων και οργανισμών. κατείχα: Κύριες δραστηριότητες και Ενδεικτικά αναφέρονται:

Generating Set of the Complete Semigroups of Binary Relations

* * GREEK 0543/02 Paper 2 Reading and Directed Writing May/June 2009

ΔΙΑΚΡΙΣΑ ΜΑΘΗΜΑΣΙΚΑ. Καηηγορημαηικός Λογιζμός

Διάλεξη 5: Συνέχεια συναρτήσεων και όρια στο άπειρο

Ενότητα 10: Γραμμικό Τετραγωνικό Πρόβλημα. Νίκος Καραμπετάκης Τμήμα Μαθηματικών

Β Ι Ο Γ Ρ Α Φ Ι Κ Ο Σ Η Μ Ε Ι Ω Μ Α

CONFIOUS: The Conference Nous Σύστημα Διαχείρισης Επιστημονικών & Ακαδημαϊκών Συνεδρίων. (

HY220 Pipelines and FSMs Χειμεριν Χειμερι ό Εξ άμη Εξ ν άμη ο

C.S. 430 Assignment 6, Sample Solutions

HY118-Διακριτά Μαθηματικά

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

Εγχειρίδια Μαθηµατικών και Χταποδάκι στα Κάρβουνα

ΓΡΑΜΜΙΚΟΣ & ΔΙΚΤΥΑΚΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ

The circle theorem and related theorems for Gauss-type quadrature rules

Major Concepts. Multiphase Equilibrium Stability Applications to Phase Equilibrium. Two-Phase Coexistence

Section 7.6 Double and Half Angle Formulas

Transcript:

Answer Set Programming with External Sources Christoph Redl redl@kr.tuwien.ac.at September 4, 2012 Redl C. (TU Vienna) HEX-Programs September 4, 2012 1 / 14

ASP-Programs ASP Solver Answer Sets Rules: a 1 a n b 1,..., b m, not b m+1,..., not b n, Redl C. (TU Vienna) HEX-Programs September 4, 2012 2 / 14

HEX-Programs HEX Answer Sets Solver Plugin Rules: External atom: a 1 a n b 1,..., b m, not b m+1,..., not b n, &p[q 1,..., q k ](t 1,..., t l ) &p[q 1,..., q k ](t 1,..., t l ) = true f &p (A, q 1,..., q k, t 1,..., t l ) = 1 Redl C. (TU Vienna) HEX-Programs September 4, 2012 3 / 14

HEX-Programs &rdf addr(http://... /data1.rdf). addr(http://... /data2.rdf). bel(x, Y) addr(u), &rdf [U](X, Y, Z). Redl C. (TU Vienna) HEX-Programs September 4, 2012 4 / 14

HEX-Programs &rdf &diff addr(http://... /data1.rdf). addr(http://... /data2.rdf). bel(x, Y) addr(u), &rdf [U](X, Y, Z). dom(x) #int(x). nsel(x) dom(x), &diff [dom, sel](x). sel(x) dom(x), &diff [dom, nsel](x). sel(x1), sel(x2), sel(x3), X1 X2, X1 X3, X2 X3. Redl C. (TU Vienna) HEX-Programs September 4, 2012 4 / 14

Evaluation Translation Π: ˆΠ: p(c 1 ). dom(c 1 ). dom(c 2 ). dom(c 3 ). p(x) dom(x), &empty[p](x). p(c 1 ). dom(c 1 ). dom(c 2 ). dom(c 3 ). p(x) dom(x), e &empty[p] (X). e &empty[p] (X) e &empty[p] (X) dom(x). 8 candidates, e.g.: {Tp(c 1 ), Tp(c 2 ), Tdom(c 1 ), Tdom(c 2 ), Tdom(c 3 ), Fe &empty[p] (c 1 ), Te &empty[p] (c 2 ), Fe &empty[p] (c 3 )} Redl C. (TU Vienna) HEX-Programs September 4, 2012 5 / 14

Evaluation Conflict-driven SAT/ASP Solving C = {C 1 : { a, b}, C 2 : { a, c, i}, C 3 : { b, c, d}, C 4 : { d, e, j}, C 5 : { d, e, k}, C 6 : { e, f }, C 7 : {a, g, l}, C 8 : {a, h}, C 9 : { g, h, m}} j=f (3) C4 b=t e=t a=t C1 C3 d=t C4 C6 û C2 C3 C5 C6 c=t f=t C2 C5 i=f (1) k=f (3) Redl C. (TU Vienna) HEX-Programs September 4, 2012 6 / 14

Evaluation Conflict-driven SAT/ASP Solving C = {C 1 : { a, b}, C 2 : { a, c, i}, C 3 : { b, c, d}, C 4 : { d, e, j}, C 5 : { d, e, k}, C 6 : { e, f }, C 7 : {a, g, l}, C 8 : {a, h}, C 9 : { g, h, m}} j=f (3) C4 b=t e=t a=t C1 C3 d=t C4 C6 û C2 C3 C5 C6 c=t f=t C2 C5 i=f (1) k=f (3) Redl C. (TU Vienna) HEX-Programs September 4, 2012 6 / 14

Evaluation Conflict-driven SAT/ASP Solving C = {C 1 : { a, b}, C 2 : { a, c, i}, C 3 : { b, c, d}, C 4 : { d, e, j}, C 5 : { d, e, k}, C 6 : { e, f }, C 7 : {a, g, l}, C 8 : {a, h}, C 9 : { g, h, m}} j=f (3) C4 b=t e=t a=t C1 C3 d=t C4 C6 û C2 C3 C5 C6 c=t f=t C2 C5 i=f (1) k=f (3) Redl C. (TU Vienna) HEX-Programs September 4, 2012 6 / 14

Evaluation Conflict-driven SAT/ASP Solving C = {C 1 : { a, b}, C 2 : { a, c, i}, C 3 : { b, c, d}, C 4 : { d, e, j}, C 5 : { d, e, k}, C 6 : { e, f }, C 7 : {a, g, l}, C 8 : {a, h}, C 9 : { g, h, m}, C 10 : { a, i, j, k}} j=f (3) C4 b=t e=t a=t C1 C3 d=t C4 C6 û C2 C3 C5 C6 c=t f=t C2 C5 i=f (1) k=f (3) Redl C. (TU Vienna) HEX-Programs September 4, 2012 6 / 14

Evaluation: External Behavior Learning (EBL) Input Output {Clause} Redl C. (TU Vienna) HEX-Programs September 4, 2012 7 / 14

Evaluation: External Behavior Learning (EBL) Input Output {Clause} General Case &diff [p, q](x), ext(p, A) = {a, b}, ext(q, A) = {a, c} p(a) p(b) p(c) q(a) q(b) q(c) e &diff [p,q] (b) { p(a), p(b), p(c), q(a), q(b), q(c), e &diff [p,q] (b)} Redl C. (TU Vienna) HEX-Programs September 4, 2012 7 / 14

Evaluation: External Behavior Learning (EBL) &diff monotonic Monotonicity &diff [p, q](x), ext(p, A) = {a, b}, ext(q, A) = {a, c} p(a) p(b) p(c) q(a) q(b) q(c) e &diff [p,q] (b) { p(a), p(b), p(c), q(a), q(b), q(c), e &diff [p,q] (b)} Functionality &concat[ab, c](x) { e &concat[ab,c] (abc), e &concat[ab,c] (ab)} Redl C. (TU Vienna) HEX-Programs September 4, 2012 8 / 14

Evaluation: External Behavior Learning (EBL) &diff monotonic Monotonicity &diff [p, q](x), ext(p, A) = {a, b}, ext(q, A) = {a, c} p(a) p(b) p(c) q(a) q(b) q(c) e &diff [p,q] (b) { p(a), p(b), p(c), q(a), q(b), q(c), e &diff [p,q] (b)} Functionality &concat[ab, c](x) { e &concat[ab,c] (abc), e &concat[ab,c] (ab)} Redl C. (TU Vienna) HEX-Programs September 4, 2012 8 / 14

Evaluation: External Behavior Learning (EBL) &diff monotonic Monotonicity &diff [p, q](x), ext(p, A) = {a, b}, ext(q, A) = {a, c} p(a) p(b) q(a) q(b) q(c) e &diff [p,q] (b) { p(a), p(b), q(a), q(b), q(c), e &diff [p,q] (b)} Functionality &concat[ab, c](x) { e &concat[ab,c] (abc), e &concat[ab,c] (ab)} Redl C. (TU Vienna) HEX-Programs September 4, 2012 8 / 14

Evaluation: Minimality Check Example Π: &g: dom(a).dom(b). p(a) dom(a), &g[p](a). p(b) dom(b), &g[p](b). {b}, {a} {a}, {b}, {a, b} {a, b} A = {Tdom(a), Tdom(b), Tp(a)} = Π But FLP-reduct f Π A = {r Π A = B(r)}: dom(a).dom(b). p(a) dom(a), &g[p](a). A = {Tdom(a), Tdom(b)} = f Π A Redl C. (TU Vienna) HEX-Programs September 4, 2012 9 / 14

Evaluation: Minimality Check Unfounded Sets a b b a. c b. a c. c a b b a. c b. a. c Redl C. (TU Vienna) HEX-Programs September 4, 2012 10 / 14

Benchmarks all AS first AS n 5 6 7 8 9 10 11 12 13... 20 explicit 10.9 94.3 +EBL 4.3 34.8 266.1 UFS 0.2 0.3 0.8 1.8 4.5 11.9 32.4 92.1 273.9 +EBL 0.1 0.1 0.2 0.2 0.3 0.4 0.6 0.8 1.2 11.1 explicit 0.7 4.3 26.1 163.1 +EBL 0.8 4.9 31.1 192.0 UFS 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.5 +EBL 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.3 Figure: Set Partitioning A B C D n all AS first AS explicit UFS explicit UFS 5 1.47 1.13 0.70 0.62 6 4.57 2.90 1.52 1.27 7 19.99 10.50 3.64 2.77 8 80.63 39.01 9.46 6.94 9 142.95 80.66 30.12 20.97 10 240.46 122.81 107.14 63.50 A B Figure: Argumentation Redl C. (TU Vienna) HEX-Programs September 4, 2012 11 / 14

Benchmarks ASP <XML> n explicit UFS check plain +EBL plain +EBL +UFL 3 8.61 4.68 7.31 2.44 0.50 4 86.55 48.53 80.31 25.98 1.89 5 188.05 142.61 188.10 94.45 4.62 6 209.34 155.81 207.14 152.32 14.39 7 263.98 227.99 264.00 218.94 49.42 8 293.64 209.41 286.38 189.86 124.23 9 281.98 260.01 190.56 10 274.76 247.67 219.83 n all AS first AS explicit UFS explicit UFS plain +EBL plain +EBL +UFL plain +EBL plain +EBL +UFL 3 9.08 6.11 6.29 2.77 0.85 4.01 2.53 3.41 1.31 0.57 4 89.71 36.28 80.81 12.63 5.27 53.59 16.99 49.56 6.09 1.07 5 270.10 234.98 268.90 174.23 18.87 208.62 93.29 224.01 32.85 3.90 6 236.02 203.13 235.55 179.24 65.49 201.84 200.06 201.24 166.04 28.34 7 276.94 241.27 267.82 231.08 208.47 241.09 78.72 240.72 66.56 16.41 8 286.61 153.41 282.96 116.89 69.69 201.10 108.29 210.61 103.11 30.98 9 208.92 191.46 175.26 240.75 112.08 229.14 76.56 44.73 10 289.87 289.95 125.18 75.24 27.05 Figure: MCSs Redl C. (TU Vienna) HEX-Programs September 4, 2012 12 / 14

HEX-Programs HEX Answer Sets Solver Plugin Redl C. (TU Vienna) HEX-Programs September 4, 2012 13 / 14

References Eiter, T., Ianni, G., Schindlauer, R., and Tompits, H. (2005). A uniform integration of higher-order reasoning and external evaluations in answer-set programming. In In Proceedings of the 19th International Joint Conference on Artificial Intelligence (IJCAI-05, pages 90 96. Professional Book. URL: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.128.8944. Faber, W. (2005). Unfounded sets for disjunctive logic programs with arbitrary aggregates. In In Logic Programming and Nonmonotonic Reasoning, 8th International Conference (LPNMR 05), 2005, pages 40 52. Springer Verlag. Faber, W., Leone, N., and Pfeifer, G. (2004). Recursive aggregates in disjunctive logic programs: Semantics and complexity. In In Proceedings of European Conference on Logics in Artificial Intelligence (JELIA, pages 200 212. Springer. Gelfond, M. and Lifschitz, V. (1991). Classical negation in logic programs and disjunctive databases. New Generation Computing, 9:365 385. URL: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.56.7150. Redl C. (TU Vienna) HEX-Programs September 4, 2012 14 / 14