Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Logic Programming in Space-Time: The Case of Situatedness in LPaaS

220 views

Published on

Situatedness is a fundamental requirement for today’s complex software systems, as well as for the computational models and programming languages used to build them. Spatial and temporal situatedness, in particular, are essential features for AI, enabling actors of the system to take autonomous decisions contextual to the space-time they live in. To support spatio-temporal awareness in distributed pervasive systems, we adopt the standpoint of Logic Programming (LP) by focussing on the Logic Programming as a Service (LPaaS) approach, promoting the distribution of situated intelligence. Accordingly, we provide an interpretation about what it means to make LP span across space and time, then we extend the LPaaS model and architecture towards spatio-temporal situatedness, by identifying a set of suitably-expressive spatio-temporal primitives.

Published in: Engineering
  • Login to see the comments

Logic Programming in Space-Time: The Case of Situatedness in LPaaS

  1. 1. Logic Programming in Space-Time: The Case of Situatedness in LPaaS Roberta Calegari1 Giovanni Ciatto1 Stefano Mariani2 Enrico Denti1 Andrea Omicini1 {roberta.calegari, giovanni.ciatto, enrico.denti, andrea.omicini}@unibo.it stefano.mariani@unimore.it 1Dipartimento di Informatica, Scienza e Ingegneria—Universit`a di Bologna 2Dipartimento di Scienze e Metodi dell’Ingegneria, Universit`a di Modena e Reggio Emilia Talk @ 19th Workshop From Objects to Agents (WOA 2018) Palermo, June 29, 2018 Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 1 / 20
  2. 2. Outline 1 Motivations & Context 2 Logic Programming as a Service Vision & Architecture 3 Spatio-temporal awareness in LPaaS Spatio-temporal awareness in LPaaS Interface & API 4 Example 5 Conclusion & Further Work Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 2 / 20
  3. 3. Motivations & Context Next in Line. . . 1 Motivations & Context 2 Logic Programming as a Service 3 Spatio-temporal awareness in LPaaS 4 Example 5 Conclusion & Further Work Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 3 / 20
  4. 4. Motivations & Context Motivation & Context Need for intelligence for the IoT: Not only smart, inter-connected things Internet of Intelligent Things (IoIT) [Ars´enio et al., 2014] Things need to be: Interoperable — interact with each other with no prior knowledge Context-aware — observe the environment and react accordingly Goal-oriented — understand us and our goals Understandable — explain their decision and actions Within open environments and in a distributed fashion spatial locality does matter temporal reference does matter, too ! reasoning capabilities still missing in nowadays Things Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 4 / 20
  5. 5. Motivations & Context Motivation & Context Need for intelligence for the IoT: Not only smart, inter-connected things Internet of Intelligent Things (IoIT) [Ars´enio et al., 2014] Things need to be: Interoperable — interact with each other with no prior knowledge Context-aware — observe the environment and react accordingly Goal-oriented — understand us and our goals Understandable — explain their decision and actions Within open environments and in a distributed fashion spatial locality does matter temporal reference does matter, too ! reasoning capabilities still missing in nowadays Things Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 4 / 20
  6. 6. Motivations & Context Motivation & Context Need for intelligence for the IoT: Not only smart, inter-connected things Internet of Intelligent Things (IoIT) [Ars´enio et al., 2014] Things need to be: Interoperable — interact with each other with no prior knowledge Context-aware — observe the environment and react accordingly Goal-oriented — understand us and our goals Understandable — explain their decision and actions Within open environments and in a distributed fashion spatial locality does matter temporal reference does matter, too ! reasoning capabilities still missing in nowadays Things Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 4 / 20
  7. 7. Motivations & Context Motivation & Context Logic Programming as a Service (LPaaS): [Calegari et al., 2017] our proposal endowing IoT with logic programming reasoning capabilities for IoT devices, provided as-a-Service to possibly heterogeneous clients interested in reasoning results only making sense somewhere and for a while LP re-interpreted within the service perspective: Encapsulation of theories accesses and updates Stateless interface for stateful interaction Acceptance of locality of the logic service ! APIs letting clients focus on specific regions & time intervals proposed in this work Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 5 / 20
  8. 8. Motivations & Context Motivation & Context Logic Programming as a Service (LPaaS): [Calegari et al., 2017] our proposal endowing IoT with logic programming reasoning capabilities for IoT devices, provided as-a-Service to possibly heterogeneous clients interested in reasoning results only making sense somewhere and for a while LP re-interpreted within the service perspective: Encapsulation of theories accesses and updates Stateless interface for stateful interaction Acceptance of locality of the logic service ! APIs letting clients focus on specific regions & time intervals proposed in this work Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 5 / 20
  9. 9. Motivations & Context Motivation & Context Logic Programming as a Service (LPaaS): [Calegari et al., 2017] our proposal endowing IoT with logic programming reasoning capabilities for IoT devices, provided as-a-Service to possibly heterogeneous clients interested in reasoning results only making sense somewhere and for a while LP re-interpreted within the service perspective: Encapsulation of theories accesses and updates Stateless interface for stateful interaction Acceptance of locality of the logic service ! APIs letting clients focus on specific regions & time intervals proposed in this work Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 5 / 20
  10. 10. Motivations & Context Motivation & Context Logic Programming as a Service (LPaaS): [Calegari et al., 2017] our proposal endowing IoT with logic programming reasoning capabilities for IoT devices, provided as-a-Service to possibly heterogeneous clients interested in reasoning results only making sense somewhere and for a while LP re-interpreted within the service perspective: Encapsulation of theories accesses and updates Stateless interface for stateful interaction Acceptance of locality of the logic service ! APIs letting clients focus on specific regions & time intervals proposed in this work Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 5 / 20
  11. 11. Logic Programming as a Service Next in Line. . . 1 Motivations & Context 2 Logic Programming as a Service 3 Spatio-temporal awareness in LPaaS 4 Example 5 Conclusion & Further Work Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 6 / 20
  12. 12. Logic Programming as a Service Vision & Architecture LPaaS Overview Several situated logic services may participate to the system possibly moving, possibly leaving/entering They provide an abstract view of a LP inference engine implementing the SLD resolution [Robinson, 1965] through a technology-agnostic, network-enabled interface Each service encapsulates its logic theories (or Knowledge Base, KB)—which therefore represent truth from the service p.o.v. sensors are assumed to be providing fresh & local information [Calegari et al., 2018a] Two roles for users: client — may query a particular version of the service requesting goals to be solved configurator — may arbitrarily alter the KB Implementation exists wrapping tuProlog [Denti et al., 2013] within a RESTfull Web-Service, internally organized through micro-services Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 7 / 20
  13. 13. Logic Programming as a Service Vision & Architecture LPaaS Overview Several situated logic services may participate to the system possibly moving, possibly leaving/entering They provide an abstract view of a LP inference engine implementing the SLD resolution [Robinson, 1965] through a technology-agnostic, network-enabled interface Each service encapsulates its logic theories (or Knowledge Base, KB)—which therefore represent truth from the service p.o.v. sensors are assumed to be providing fresh & local information [Calegari et al., 2018a] Two roles for users: client — may query a particular version of the service requesting goals to be solved configurator — may arbitrarily alter the KB Implementation exists wrapping tuProlog [Denti et al., 2013] within a RESTfull Web-Service, internally organized through micro-services Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 7 / 20
  14. 14. Logic Programming as a Service Vision & Architecture LPaaS Overview Several situated logic services may participate to the system possibly moving, possibly leaving/entering They provide an abstract view of a LP inference engine implementing the SLD resolution [Robinson, 1965] through a technology-agnostic, network-enabled interface Each service encapsulates its logic theories (or Knowledge Base, KB)—which therefore represent truth from the service p.o.v. sensors are assumed to be providing fresh & local information [Calegari et al., 2018a] Two roles for users: client — may query a particular version of the service requesting goals to be solved configurator — may arbitrarily alter the KB Implementation exists wrapping tuProlog [Denti et al., 2013] within a RESTfull Web-Service, internally organized through micro-services Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 7 / 20
  15. 15. Logic Programming as a Service Vision & Architecture LPaaS Overview Several situated logic services may participate to the system possibly moving, possibly leaving/entering They provide an abstract view of a LP inference engine implementing the SLD resolution [Robinson, 1965] through a technology-agnostic, network-enabled interface Each service encapsulates its logic theories (or Knowledge Base, KB)—which therefore represent truth from the service p.o.v. sensors are assumed to be providing fresh & local information [Calegari et al., 2018a] Two roles for users: client — may query a particular version of the service requesting goals to be solved configurator — may arbitrarily alter the KB Implementation exists wrapping tuProlog [Denti et al., 2013] within a RESTfull Web-Service, internally organized through micro-services Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 7 / 20
  16. 16. Logic Programming as a Service Vision & Architecture LPaaS Overview Several situated logic services may participate to the system possibly moving, possibly leaving/entering They provide an abstract view of a LP inference engine implementing the SLD resolution [Robinson, 1965] through a technology-agnostic, network-enabled interface Each service encapsulates its logic theories (or Knowledge Base, KB)—which therefore represent truth from the service p.o.v. sensors are assumed to be providing fresh & local information [Calegari et al., 2018a] Two roles for users: client — may query a particular version of the service requesting goals to be solved configurator — may arbitrarily alter the KB Implementation exists wrapping tuProlog [Denti et al., 2013] within a RESTfull Web-Service, internally organized through micro-services Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 7 / 20
  17. 17. Spatio-temporal awareness in LPaaS Next in Line. . . 1 Motivations & Context 2 Logic Programming as a Service 3 Spatio-temporal awareness in LPaaS 4 Example 5 Conclusion & Further Work Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 8 / 20
  18. 18. Spatio-temporal awareness in LPaaS Spatio-temporal awareness in LPaaS Situatedness in LPaaS Resolution process takes into account the service spatio-temporal context a goal is demonstrated against a logic theory considered true within a (possibly open) interval of time, and a region of space resolution process could span over time and space Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 9 / 20
  19. 19. Spatio-temporal awareness in LPaaS Spatio-temporal awareness in LPaaS The temporal/spatial dimensions Time in LPaaS time-dependant computations, e.g. periodic temporal validity of logic theories, individual facts and clauses requests may restrict the temporal scope of the expected solutions Space in LPaaS space-dependant computations spatial validity of logic theories, individual facts and clauses requests may restrict the spatial scope of the expected solutions High-level, situation-aware APIs must be provided to clients Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 10 / 20
  20. 20. Spatio-temporal awareness in LPaaS Spatio-temporal awareness in LPaaS The temporal/spatial dimensions Time in LPaaS time-dependant computations, e.g. periodic temporal validity of logic theories, individual facts and clauses requests may restrict the temporal scope of the expected solutions Space in LPaaS space-dependant computations spatial validity of logic theories, individual facts and clauses requests may restrict the spatial scope of the expected solutions High-level, situation-aware APIs must be provided to clients Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 10 / 20
  21. 21. Spatio-temporal awareness in LPaaS Spatio-temporal awareness in LPaaS The temporal/spatial dimensions Time in LPaaS time-dependant computations, e.g. periodic temporal validity of logic theories, individual facts and clauses requests may restrict the temporal scope of the expected solutions Space in LPaaS space-dependant computations spatial validity of logic theories, individual facts and clauses requests may restrict the spatial scope of the expected solutions High-level, situation-aware APIs must be provided to clients Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 10 / 20
  22. 22. Spatio-temporal awareness in LPaaS Interface & API API – Temporal dimension Clients choose when they want a solution Timely solutions — solve(?Goal, ..., -Results ) predicates with a within(Time ) argument constraining resolution duration Periodic solutions stream — solve predicates with a every(Time ) arg. Time aware resolution process Axiom in theories decorated with time interval, defining their validity Clients’ queries could specify a(n open?) TimeInterval of interest Only axioms valid at Instant ∈ TimeInterval affect resolution ? reason about the future? Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 11 / 20
  23. 23. Spatio-temporal awareness in LPaaS Interface & API API – Temporal dimension Clients choose when they want a solution Timely solutions — solve(?Goal, ..., -Results ) predicates with a within(Time ) argument constraining resolution duration Periodic solutions stream — solve predicates with a every(Time ) arg. Time aware resolution process Axiom in theories decorated with time interval, defining their validity Clients’ queries could specify a(n open?) TimeInterval of interest Only axioms valid at Instant ∈ TimeInterval affect resolution ? reason about the future? Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 11 / 20
  24. 24. Spatio-temporal awareness in LPaaS Interface & API Spatial dimension Clients specify where solutions should make sense Local solutions — solveNeighborhood(?Goal, -Results, ?Region ) predicate provide a solution from a neighborhood of logic services implicit interaction between service instances may occur Solutions stream across space — e.g. by widening/narrowing the region considered at consecutive resolution cycles Space aware resolution process Distribution is a premise per se to spatial situatedness Logic services are (assumed to be) aware of their positions w.r.t. some custom notion of locality (GPS lat/long, network hops, etc) They keep track of what is true in their surroundings Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 12 / 20
  25. 25. Spatio-temporal awareness in LPaaS Interface & API Spatial dimension Clients specify where solutions should make sense Local solutions — solveNeighborhood(?Goal, -Results, ?Region ) predicate provide a solution from a neighborhood of logic services implicit interaction between service instances may occur Solutions stream across space — e.g. by widening/narrowing the region considered at consecutive resolution cycles Space aware resolution process Distribution is a premise per se to spatial situatedness Logic services are (assumed to be) aware of their positions w.r.t. some custom notion of locality (GPS lat/long, network hops, etc) They keep track of what is true in their surroundings Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 12 / 20
  26. 26. Example Next in Line. . . 1 Motivations & Context 2 Logic Programming as a Service 3 Spatio-temporal awareness in LPaaS 4 Example 5 Conclusion & Further Work Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 13 / 20
  27. 27. Example Testbed Scenario User looking for a parking in proximity of a metro station in London distance = num. of stations between LPaaS server and parking place Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 14 / 20
  28. 28. Example Testbed Scenario ?- solve( station with parking(X ), S ) no. Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 14 / 20
  29. 29. Example Testbed Scenario ?- solveAllNeighborhood( ( station with parking(X ), free places(X, N ) ), S, region( , distance(1, Line ) ) ) yes. S = (X /‘LondonBridge’, N /5, Line /black) Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 14 / 20
  30. 30. Example Testbed Scenario ?- solveAllNeighborhood( ( station with parking(X ), free places(X, N ) ), S, region( , distance(1, brown) ) ) no. Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 14 / 20
  31. 31. Example Testbed Scenario ?- solveAllNeighborhood( ( station with parking(X ), free places(X, N ) ), S, region( , distance(2, Line ) ) ) yes. S = [ (X /‘LondonBridge’, N /5, Line /black), (X /‘Charing Cross’, N /1, Line /brown), (X /‘Canada Water’, N /2, Line /[black, gray]) ] Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 14 / 20
  32. 32. Conclusion & Further Work Next in Line. . . 1 Motivations & Context 2 Logic Programming as a Service 3 Spatio-temporal awareness in LPaaS 4 Example 5 Conclusion & Further Work Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 15 / 20
  33. 33. Conclusion & Further Work Conclusion Pervasive and situated IoIT scenarios may take advantage of context-aware intelligence LPaaS aims at satisfying such a challenging requirement exposing logic reasoning capabilities as-a-Service to heterogeneous clients moving around It supports spatio-temporal awareness while reasoning, thus supporting the distribution of situated intelligence through suitably-expressive set of spatio-temporal primitives Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 16 / 20
  34. 34. Conclusion & Further Work Conclusion Pervasive and situated IoIT scenarios may take advantage of context-aware intelligence LPaaS aims at satisfying such a challenging requirement exposing logic reasoning capabilities as-a-Service to heterogeneous clients moving around It supports spatio-temporal awareness while reasoning, thus supporting the distribution of situated intelligence through suitably-expressive set of spatio-temporal primitives Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 16 / 20
  35. 35. Conclusion & Further Work Conclusion Pervasive and situated IoIT scenarios may take advantage of context-aware intelligence LPaaS aims at satisfying such a challenging requirement exposing logic reasoning capabilities as-a-Service to heterogeneous clients moving around It supports spatio-temporal awareness while reasoning, thus supporting the distribution of situated intelligence through suitably-expressive set of spatio-temporal primitives Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 16 / 20
  36. 36. Conclusion & Further Work Further Work Designing & developing a specialised logic-based middleware Tests in pervasive deployment scenarios are required, mainly in the IoT landscape e.g. testing directly LPaaS over BLE or Wifi-Direct connections Integrating LPaaS with Labelled LP [Calegari et al., 2018b] for domain-specific logic-based computation Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 17 / 20
  37. 37. Conclusion & Further Work Further Work Designing & developing a specialised logic-based middleware Tests in pervasive deployment scenarios are required, mainly in the IoT landscape e.g. testing directly LPaaS over BLE or Wifi-Direct connections Integrating LPaaS with Labelled LP [Calegari et al., 2018b] for domain-specific logic-based computation Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 17 / 20
  38. 38. Conclusion & Further Work Further Work Designing & developing a specialised logic-based middleware Tests in pervasive deployment scenarios are required, mainly in the IoT landscape e.g. testing directly LPaaS over BLE or Wifi-Direct connections Integrating LPaaS with Labelled LP [Calegari et al., 2018b] for domain-specific logic-based computation Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 17 / 20
  39. 39. References References I Ars´enio, A., Serra, H., Francisco, R., Nabais, F., Andrade, J., and Serrano, E. (2014). Internet of Intelligent Things: Bringing Artificial Intelligence into Things and Communication Networks, pages 1–37. Springer Berlin Heidelberg, Berlin, Heidelberg. Calegari, R., Ciatto, G., Mariani, S., Denti, E., and Omicini, A. (2018a). Micro-intelligence for the iot: Se challenges and practice in lpaas. In 2018 IEEE International Conference on Cloud Engineering (IC2E 208), pages 292–297. IEEE Computer Society. Calegari, R., Denti, E., Dovier, A., and Omicini, A. (2018b). Extending logic programming with labelled variables: Model and semantics. Fundamenta Informaticae, 161:53–74. Special Issue CILC 2016. Calegari, R., Denti, E., Mariani, S., and Omicini, A. (2017). Logic Programming as a Service (LPaaS): Intelligence for the IoT. In Fortino, G., Zhou, M., Lukszo, Z., Vasilakos, A. V., Basile, F., Palau, C., Liotta, A., Fanti, M. P., Guerrieri, A., and Vinci, A., editors, 2017 IEEE 14th International Conference on Networking, Sensing and Control (ICNSC 2017), pages 72–77. IEEE. Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 18 / 20
  40. 40. References References II Denti, E., Omicini, A., and Calegari, R. (2013). tuProlog: Making Prolog ubiquitous. ALP Newsletter. Robinson, J. A. (1965). A machine-oriented logic based on the resolution principle. Journal of the ACM, 12(1):23–41. Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 19 / 20
  41. 41. Logic Programming in Space-Time: The Case of Situatedness in LPaaS Roberta Calegari1 Giovanni Ciatto1 Stefano Mariani2 Enrico Denti1 Andrea Omicini1 {roberta.calegari, giovanni.ciatto, enrico.denti, andrea.omicini}@unibo.it stefano.mariani@unimore.it 1Dipartimento di Informatica, Scienza e Ingegneria—Universit`a di Bologna 2Dipartimento di Scienze e Metodi dell’Ingegneria, Universit`a di Modena e Reggio Emilia Talk @ 19th Workshop From Objects to Agents (WOA 2018) Palermo, June 29, 2018 Calegari, Ciatto, Mariani, Denti, Omicini LPaaS: Logic Programming in Space-Time WOA 2018, June 29 20 / 20

×