Stream Reasoning and Multi-Context Systems Thomas Eiter Institute of Logic and Computation Vienna University of Technology (TU Wien) joint work with M. Dao-Tran 1 , A. Falkner 3 , P . Ogris 2 , K. Schekotihin 2 , P . Schneider 1 , 3 , P . Schüller 1 , A. Weinzierl 1 ( 1 ) ( 2 ) ( 3 ) Stream Reasoning Workshop 2019, Linköping, Sweden, April 16-17, 2019 Austrian Science Fund (FWF) grant P26471 Austrian Research Promotion Agency (FFG), 588655
SR and MCS 1. Multi-Context Systems Outline 1. Multi-Context Systems 2. MCS and Data Streams 3. MCS for Smart Cyber-Physical Systems 4. DynaCon: Dynamic Configuration 5. Conclusion eiter@kr.tuwien.ac.at SRWS 2019 1/39
SR and MCS 1. Multi-Context Systems Multi-Context Systems Contextual Reasoning: model information Ghidina & Giunchiglia’s Magic Box interlinkage of knowledge bases / agents • information flow between KBs via bridge rules row ( X ) ← ( Mr . 2 : sees _ row ( X )) Mr . 1 : Mr . 2 : col ( Y ) ← ( Mr . 1 : sees _ col ( Y )) • equilibrium ensures aligned information Different early varieties • Trento School (Giunchiglia, Serafini et al.): • Heterogeneous MCS [Giunchiglia and Serafini, 1994] • Nonmonotonic bridge rules [Roelofsen and Serafini, 2005] • Extension to Contextual Default Logic [Brewka et al. , 2007] • nonmonotonic multi-context systems (MCS) [Brewka and E_, 2007] • managed MCS (mMCS) [Brewka et al. , 2011] eiter@kr.tuwien.ac.at SRWS 2019 2/39
SR and MCS 1. Multi-Context Systems Nonmonotonic Multi-Context Systems (MCS) Multi-Context System Formally, a Multi-Context System M = ( C 1 , . . . , C n ) consists of contexts C i = ( L i , kb i , br i ) , i ∈ { 1 , . . . , n } , where • each L i is a “logic,” • each kb i is a knowledge base in L i , and • each br i is a set of L i -bridge rules over M ’s logics. eiter@kr.tuwien.ac.at SRWS 2019 3/39
SR and MCS 1. Multi-Context Systems Logic A logic L is a tuple L = ( KB L , BS L , ACC L ) , where • KB L is a set of well-formed knowledge bases, each being a set (of “formulas”) • BS L is a set of possible belief sets, each being a set (of “formulas”) • ACC L : KB L → 2 BS L assigns each KB a set of acceptable belief sets Thus, logic L caters for multiple extensions of a knowledge base. Bridge Rules A L i -bridge rule over logics L 1 , . . . , L n , 1 ≤ i ≤ n , is of the form s ← ( r 1 : p 1 ) , . . . , ( r j : p j ) , not ( r j + 1 : p j + 1 ) , . . . , not ( r m : p m ) where kb ∪ { s } ∈ KB i for each kb ∈ KB i , each r k ∈ { 1 , . . . , n } , and each p k is in some belief set of L r k . Note: such rules are akin to rules of normal logic programs eiter@kr.tuwien.ac.at SRWS 2019 4/39
SR and MCS 1. Multi-Context Systems Example (Authors) Suppose a MCS M = ( C 1 , C 2 ) has contexts that express the individual views of a paper by the two authors. C 1 : • L 1 = Classical Logic • kb 1 = { unhappy ⊃ revision } • br 1 = { unhappy ← ( 2 : work ) } C 2 : • L 2 = Reiter’s Default Logic • kb 2 = { good : accepted / accepted } • br 2 = { work ← ( 1 : revision ) , good ← not ( 1 : unhappy ) } eiter@kr.tuwien.ac.at SRWS 2019 5/39
SR and MCS 1. Multi-Context Systems Equilibrium Semantics Belief State A belief state is a sequence S = ( S 1 , . . . , S n ) of belief sets S i in L i Applicable Bridge Rules For M = ( C 1 , . . . , C n ) and belief state S = ( S 1 , . . . , S n ) , the bridge rule s ← ( r 1 : p 1 ) , . . . , ( r j : p j ) , not ( r j + 1 : p j + 1 ) , . . . , not ( r m : p m ) is applicable in S if (1) p i ∈ S r i , for 1 ≤ i ≤ j , and (2) p k �∈ S r k , for j < k ≤ m . Equilibrium A belief state S = ( S 1 , . . . , S n ) of M is an equilibrium iff for all i = 1 , . . . , n , S i ∈ ACC i ( kb i ∪ { head ( r ) | r ∈ br i is applicable in S } ) . eiter@kr.tuwien.ac.at SRWS 2019 6/39
SR and MCS 1. Multi-Context Systems Equilibrium Semantics, cont’d Example, cont’d Reconsider M = ( C 1 , C 2 ) : kb 1 = { unhappy ⊃ revision } (Classical Logic) br 1 = { unhappy ← ( 2 : work ) } kb 2 = { good : accepted / accepted } (Default Logic) br 2 = { work ← ( 1 : revision ) , good ← not ( 1 : unhappy ) } M has two equilibria: E 1 = ( Th ( { unhappy , revision } ) , Th ( { work } )) and E 2 = ( Th ( { unhappy ⊃ revision } ) , Th ( { good , accepted } )) eiter@kr.tuwien.ac.at SRWS 2019 7/39
SR and MCS 1. Multi-Context Systems Managed MCS MCS: pure information alignment, fully static introduce context manager , to update/change the KB • Bridge rules: op ( f ) ← ( c 1 : p 1 ) , . . . , ( c j : p j ) , not ( c j + 1 : p j + 1 ) , . . . , not ( c m : p m ) . LS × KB LS → 2 ( KB LS ×ACC LS ) \ {∅} • management function mng : 2 F OP assigns updates commands + KB a follow-up KB + evaluation semantics managed context C i = ( LS i , kb i , br i , OP i , mng i ) with • LS i = ( BS LS i , KB LS i , ACC LS i ) a logic suite, • kb i ∈ KB LS i a knowledge base, • br i a set of bridge rules for C i , • OP i a management base (commands), and • mng i a management function over LS i and OP i . Managed Multi-Context System (mMCS) M = ( C 1 , . . . , C n ) are stateful, form the basis of other MCS (eMCs, rMCS, aMCS, sMCS, dMCS, tMCS) eiter@kr.tuwien.ac.at SRWS 2019 8/39
SR and MCS 1. Multi-Context Systems Managed MCS, cont’d Example (Diseases) C 1 : relational database on disease treatments kb 1 = { treat ( pen , str _ pneu , pneu , evd ) , treat ( azith , leg _ pneu , leg , evd ) , ineff ( pen , leg _ pneu ) } conclude likely effects using C 2 . br 1 = { treat ( X , B , I , likely ) ← ( 1 : treat ( X , B , _ , _ )) , ( 2 : B rdf : causes I ) . } . C 2 : RDF-triple store on disease causations. kb 2 = { str _ pneu rdf : causes men , leg _ pneu rdf : causes atyp _ pneu } . C 3 : bacteria ontology (DL) C 4 : generalized logic program deriving possible medication effects: br 4 = { add ( isa ( X , Y )) ← ( 3 : ( X ⊑ Y )) . add ( eff ( X , B )) ← ( 1 : eff ( X , B )) . upd ( not eff ( X , B )) ← ( 1 : ineff ( X , B )) . } , Semantics Applicable bridge rule heads: app i ( S ) = { hd ( r ) | r ∈ br i ∧ S | = body ( r ) } . Equilibrium: S = ( S 1 , . . . , S n ) iff for every 1 ≤ i ≤ n some ( kb ′ i , ACC LS i ) ∈ mng i ( app i ( S ) , kb i ) exists s.t. S i ∈ ACC LS i ( kb ′ i ) . eiter@kr.tuwien.ac.at SRWS 2019 9/39
SR and MCS 2. MCS and Data Streams 1. Multi-Context Systems 2. MCS and Data Streams 3. MCS for Smart Cyber-Physical Systems 4. DynaCon: Dynamic Configuration 5. Conclusion eiter@kr.tuwien.ac.at SRWS 2019 10/39
SR and MCS 2. MCS and Data Streams Streaming World Sensors, networks, mobile devices: • getting to a connected world... Pushing rather than pulling of data Dynamic streams of data, potentially infinite • low frequency changes (meter reading) • high frequency changes (stock trading) Continuous computation / evaluation • synchronous vs. asynchronous Reference to time Poses challenges to MCSs eiter@kr.tuwien.ac.at SRWS 2019 11/39
SR and MCS 2. MCS and Data Streams Example: Cooperative Robots 2 1 D 2 P 2 3 R A 4 4 5 6 7 D 1 P 1 9 8 R B In a mall, robots must deliver packages to destinations R A must deliver package P 1 (at 9) to destination D 1 (7) R B must deliver package P 2 (at 4) to destination D 2 (1) Minimize travel distance: agree to pick up other package and exchange (e.g. at node 5 ) Agreement may be challenging: robots already move, connections turn out unusable (too many people around), . . . Setting : dynamic monitoring of usability sensors for position, occupation etc. eiter@kr.tuwien.ac.at SRWS 2019 12/39
SR and MCS 2. MCS and Data Streams MCS Features (static) MCS, mMCS : have an equilibrium (fixpoint) semantics (dynamic) reactive MCS (rMCS) [Brewka et al., 2014,2018], evolving MCS (eMCS) [Gonçalves et al. , 2014]: • computing equilibria is timeless (dynamic) asynchronous MCS (aMCS) [Ellmauthaler and Pührer, 2015]: • physical computation time, transfer time are disregarded • no baseline mechanism to achieve equilibrium streaming MCS (sMCS) [Dao-Tran and E_, 2017]: • bridge rules with window atoms (simple LARS formulas [Beck et al. , 2018]) to access input streams • model computation time and data transfer time • internal asynchronous execution control (restart/wait on eval requests) • run-based semantics, with feedback equilibria to enforce local stability in runs (avoid infinite loops, and generalize rMCS, eMCS) additional stream reasoning inside contexts possible! eiter@kr.tuwien.ac.at SRWS 2019 13/39
Recommend
More recommend