Skip to main content

StreamB: A Declarative Language for Automatically Processing Data Streams in Abstract Environments for Agent Platforms

  • Conference paper
  • First Online:
Engineering Multi-Agent Systems (EMAS 2021)

Abstract

To apply BDI agents to real-world scenarios, the reality-gap, between the low-level data (perceptions) and their high-level representation (beliefs), must be bridged. This is usually achieved by a manual mapping. There are two problems with this solution: (i) if the environment changes, the mapping has to be changed as well (by the developer); (ii) part of the mapping might end up being implemented at the agent level increasing the code complexity and reducing its generality. In this paper, we present a general approach to automate the mapping between low-level data and high-level beliefs through the use of transducers. These transducers gather information from the environment and map them to high-level beliefs according to formal temporal specifications. We present our technique and we show its applicability through a case study involving the remote inspection of a nuclear plant.

Work supported by UK Research and Innovation, and EPSRC Hubs for “Robotics and AI in Hazardous Environments”: EP/R026173 (ORCA), and EP/R026084 (RAIN).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    It computes the standard deviation over the data stream.

  2. 2.

    It is important to note that instead of a number we may have a stream.

  3. 3.

    https://www.antlr.org/.

  4. 4.

    https://github.com/autonomy-and-verification-uol/StreamB.

  5. 5.

    https://www.akka-technologies.com/.

  6. 6.

    https://github.com/mcapl/mcapl.

  7. 7.

    http://wiki.ros.org/rosbridge.

  8. 8.

    https://clearpathrobotics.com/jackal-small-unmanned-ground-vehicle/.

  9. 9.

    Or partially, in case we extend an existing abstract environment as we did for MCAPL.

References

  1. Ali, M.H., et al.: Microsoft CEP server and online behavioral targeting. Proc. VLDB Endow. 2(2), 1558–1561 (2009). https://doi.org/10.14778/1687553.1687590. http://www.vldb.org/pvldb/vol2/vldb09-1019.pdf

  2. Anicic, D., Rudolph, S., Fodor, P., Stojanovic, N.: Stream reasoning and complex event processing in ETALIS. Semant. Web 3(4), 397–407 (2012)

    Google Scholar 

  3. Arasu, A., Widom, J.: A denotational semantics for continuous queries over streams and relations. SIGMOD Rec. 33(3), 6–12 (2004)

    Google Scholar 

  4. Basin, D.A., Klaedtke, F., Marinovic, S., Zalinescu, E.: Monitoring of temporal first-order properties with aggregations. Formal Methods Syst. Des. 46(3), 262–285 (2015)

    Article  Google Scholar 

  5. Boissier, O., Bordini, R., Hubner, J., Ricci, A.: Multi-agent Oriented Programming: Programming Multi-agent Systems Using JaCaMo. Intelligent Robotics and Autonomous Agents Series. MIT Press (2020). https://books.google.com.br/books?id=GM_tDwAAQBAJ

  6. Boissier, O., Bordini, R.H., Hübner, J.F., Ricci, A., Santi, A.: Multi-agent oriented programming with JaCaMo. Sci. Comput. Program. 78(6), 747–761 (2013). https://doi.org/10.1016/j.scico.2011.10.004

    Article  Google Scholar 

  7. Bordini, R.H., Fisher, M., Visser, W., Wooldridge, M.J.: Verifying multi-agent programs by model checking. Auton. Agent. Multi-Agent Syst. 12(2), 239–256 (2006). https://doi.org/10.1007/s10458-006-5955-7

    Article  Google Scholar 

  8. Bordini, R.H., Wooldridge, M., Hübner, J.F.: Programming Multi-agent Systems in AgentSpeak Using Jason. Wiley, Hoboken (2007)

    Google Scholar 

  9. Botan, I., Derakhshan, R., Dindar, N., Haas, L.M., Miller, R.J., Tatbul, N.: SECRET: a model for analysis of the execution semantics of stream processing systems. Proc. VLDB Endow. 3(1), 232–243 (2010). https://doi.org/10.14778/1920841.1920874. http://www.vldb.org/pvldb/vldb2010/pvldb_vol3/R20.pdf

  10. Bratman, M.E.: Intentions, Plans, and Practical Reason. Harvard University Press, Cambridge (1987)

    Google Scholar 

  11. Calbimonte, J.-P., Corcho, O., Gray, A.J.G.: Enabling ontology-based access to streaming data sources. In: Patel-Schneider, P.F., et al. (eds.) ISWC 2010. LNCS, vol. 6496, pp. 96–111. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-17746-0_7

    Chapter  Google Scholar 

  12. Cardoso, R.C., Ferrando, A., Dennis, L.A., Fisher, M.: An interface for programming verifiable autonomous agents in ROS. In: Bassiliades, N., Chalkiadakis, G., de Jonge, D. (eds.) EUMAS/AT -2020. LNCS (LNAI), vol. 12520, pp. 191–205. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-66412-1_13

    Chapter  Google Scholar 

  13. Chai, H., Zhao, W.: Byzantine fault tolerant event stream processing for autonomic computing. In: IEEE 12th International Conference on Dependable, Autonomic and Secure Computing, DASC 2014, Dalian, China, 24–27 August 2014, pp. 109–114. IEEE Computer Society (2014). https://doi.org/10.1109/DASC.2014.28

  14. Chandramouli, B., Goldstein, J., Duan, S.: Temporal analytics on big data for web advertising. In: Kementsietsidis, A., Salles, M.A.V. (eds.) IEEE 28th International Conference on Data Engineering (ICDE 2012), Washington, DC, USA (Arlington, Virginia), 1–5 April 2012, pp. 90–101. IEEE Computer Society (2012). https://doi.org/10.1109/ICDE.2012.55

  15. Chen, J., DeWitt, D.J., Tian, F., Wang, Y.: NiagaraCQ: a scalable continuous query system for internet databases. In: Chen, W., Naughton, J.F., Bernstein, P.A. (eds.) Proceedings of the 2000 ACM SIGMOD International Conference on Management of Data, 16–18 May 2000, Dallas, Texas, USA, pp. 379–390. ACM (2000). https://doi.org/10.1145/342009.335432

  16. Dennis, L.A.: Gwendolen semantics: 2017. Technical report, ULCS-17-001, Department of Computer Science, University of Liverpool (2017)

    Google Scholar 

  17. Dennis, L.A.: The MCAPL framework including the agent infrastructure layer and agent Java Pathfinder. J. Open Source Softw. 3(24), 617 (2018)

    Google Scholar 

  18. Dennis, L.A., Fisher, M., Webster, M.P., Bordini, R.H.: Model checking agent programming languages. Autom. Softw. Eng. 19(1), 5–63 (2012)

    Article  Google Scholar 

  19. Deutsch, A., Fernández, M.F., Florescu, D., Levy, A.Y., Suciu, D.: A query language for XML. Comput. Netw. 31(11–16), 1155–1169 (1999)

    Google Scholar 

  20. Diao, Y., Fischer, P.M., Franklin, M.J., To, R.: YFilter: efficient and scalable filtering of XML documents. In: Agrawal, R., Dittrich, K.R. (eds.) Proceedings of the 18th International Conference on Data Engineering, San Jose, CA, USA, 26 February–1 March 2002. pp. 341–342. IEEE Computer Society (2002). https://doi.org/10.1109/ICDE.2002.994748

  21. Esposito, C., Ficco, M., Palmieri, F., Castiglione, A.: A knowledge-based platform for big data analytics based on publish/subscribe services and stream processing. Knowl. Based Syst. 79, 3–17 (2015). https://doi.org/10.1016/j.knosys.2014.05.003

    Article  Google Scholar 

  22. Franklin, S., Graesser, A.: Is It an agent, or just a program?: a taxonomy for autonomous agents. In: Müller, J.P., Wooldridge, M.J., Jennings, N.R. (eds.) ATAL 1996. LNCS, vol. 1193, pp. 21–35. Springer, Heidelberg (1997). https://doi.org/10.1007/BFb0013570

    Chapter  Google Scholar 

  23. Hindriks, K.V.: Programming rational agents in GOAL. In: El Fallah Seghrouchni, A., Dix, J., Dastani, M., Bordini, R.H. (eds.) Multi-agent Programming, Languages, Tools and Applications, pp. 119–157. Springer, Boston, MA (2009). https://doi.org/10.1007/978-0-387-89299-3_4

    Chapter  MATH  Google Scholar 

  24. Hirzel, M., Baudart, G., Bonifati, A., Valle, E.D., Sakr, S., Vlachou, A.: Stream processing languages in the big data era. SIGMOD Rec. 47(2), 29–40 (2018)

    Google Scholar 

  25. Hirzel, M., Schneider, S., Gedik, B.: SPL: an extensible language for distributed stream processing. ACM Trans. Program. Lang. Syst. 39(1), 5:1–5:39 (2017). https://doi.org/10.1145/3039207

  26. Meijer, E., Beckman, B., Bierman, G.M.: LINQ: reconciling object, relations and XML in the.net framework. In: Chaudhuri, S., Hristidis, V., Polyzotis, N. (eds.) Proceedings of the ACM SIGMOD International Conference on Management of Data, Chicago, Illinois, USA, 27–29 June 2006, p. 706. ACM (2006). https://doi.org/10.1145/1142473.1142552

  27. Quigley, M., et al.: ROS: an open-source robot operating system. In: Workshop on Open Source Software. IEEE, Japan (2009)

    Google Scholar 

  28. Rao, A.S., Georgeff, M.: BDI agents: from theory to practice. In: Proceedings of the 1st International Conference on Multi-agent Systems (ICMAS), pp. 312–319. San Francisco, USA (1995)

    Google Scholar 

  29. Ricci, A., Piunti, M., Acay, D.L., Bordini, R.H., Hübner, J.F., Dastani, M.: Integrating heterogeneous agent programming platforms within artifact-based environments. In: Padgham, L., Parkes, D.C., Müller, J.P., Parsons, S. (eds.) 7th International Joint Conference on Autonomous Agents and Multiagent Systems (AAMAS 2008), Estoril, Portugal, 12–16 May 2008, Vol. 1, pp. 225–232. IFAAMAS (2008). https://dl.acm.org/citation.cfm?id=1402419

  30. Ricci, A., Piunti, M., Viroli, M., Omicini, A.: Environment programming in CArtAgO. In: El Fallah Seghrouchni, A., Dix, J., Dastani, M., Bordini, R.H. (eds.) Multi-agent Programming, Languages, Tools and Applications, pp. 259–288. Springer, Boston, MA (2009). https://doi.org/10.1007/978-0-387-89299-3_8

    Chapter  MATH  Google Scholar 

  31. Sajjad, H.P., Danniswara, K., Al-Shishtawy, A., Vlassov, V.: SpanEdge: towards unifying stream processing over central and near-the-edge data centers. In: IEEE/ACM Symposium on Edge Computing, SEC 2016, Washington, DC, USA, 27–28 October 2016, pp. 168–178. IEEE Computer Society (2016). https://doi.org/10.1109/SEC.2016.17

  32. Schnitzler, F., Liebig, T., Marmor, S., Souto, G., Bothe, S., Stange, H.: Heterogeneous stream processing for disaster detection and alarming. In: Lin, J.J., et al. (eds.) 2014 IEEE International Conference on Big Data, Big Data 2014, Washington, DC, USA, 27–30 October 2014, pp. 914–923. IEEE Computer Society (2014). https://doi.org/10.1109/BigData.2014.7004323

  33. Seyfer, N., Tibbetts, R., Mishkin, N.: Capture fields: modularity in a stream-relational event processing language. In: Eyers, D.M., Etzion, O., Gal, A., Zdonik, S.B., Vincent, P. (eds.) Proceedings of the Fifth ACM International Conference on Distributed Event-Based Systems, DEBS 2011, New York, NY, USA, 11–15 July 2011, pp. 15–22. ACM (2011). https://doi.org/10.1145/2002259.2002263

  34. Stephens, R.: A survey of stream processing. Acta Inform. 34(7), 491–541 (1997)

    Article  MathSciNet  Google Scholar 

  35. Tommasini, R., Calvaresi, D., Calbimonte, J.: Stream reasoning agents: blue sky ideas track. In: Elkind, E., Veloso, M., Agmon, N., Taylor, M.E. (eds.) Proceedings of the 18th International Conference on Autonomous Agents and MultiAgent Systems, AAMAS 2019, Montreal, QC, Canada, 13–17 May 2019, pp. 1664–1680. International Foundation for Autonomous Agents and Multiagent Systems (2019). http://dl.acm.org/citation.cfm?id=3331894

  36. Toshniwal, A., et al.: Storm@twitter. In: Dyreson, C.E., Li, F., Özsu, M.T. (eds.) International Conference on Management of Data, SIGMOD 2014, Snowbird, UT, USA, 22–27 June 2014, pp. 147–156. ACM (2014).https://doi.org/10.1145/2588555.2595641

  37. Della Valle, E., Ceri, S., Barbieri, D.F., Braga, D., Campi, A.: A first step towards stream reasoning. In: Domingue, J., Fensel, D., Traverso, P. (eds.) FIS 2008. LNCS, vol. 5468, pp. 72–81. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-00985-3_6

    Chapter  Google Scholar 

  38. Weyns, D., Omicini, A., Odell, J.: Environment as a first class abstraction in multiagent systems. Auton. Agents Multi Agent Syst. 14(1), 5–30 (2007). https://doi.org/10.1007/s10458-006-0012-0

    Article  Google Scholar 

  39. Weyns, D., Schumacher, M., Ricci, A., Viroli, M., Holvoet, T.: Environments in multiagent systems. Knowl. Eng. Rev. 20(2), 127–141 (2005). https://doi.org/10.1017/S0269888905000457

    Article  Google Scholar 

  40. Zaharia, M., Das, T., Li, H., Hunter, T., Shenker, S., Stoica, I.: Discretized streams: fault-tolerant streaming computation at scale. In: Kaminsky, M., Dahlin, M. (eds.) ACM SIGOPS 24th Symposium on Operating Systems Principles, SOSP 2013, Farmington, PA, USA, 3–6 November 2013, pp. 423–438. ACM (2013). https://doi.org/10.1145/2517349.2522737

Download references

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Angelo Ferrando or Fabio Papacchini .

Editor information

Editors and Affiliations

A How Reviewers’ Comments Have Been Addressed

A How Reviewers’ Comments Have Been Addressed

1.1 A.1 Review 1

Comment: The hypothesis of a global clock is unsuitable in real-world applications. Modern data streaming techniques (see for example AkkaStream) overcome this limitation by implementing standard protocols (for instance see “back-pressure”).

Answer: We added more explanations on this aspect (see Sect. 4). Briefly, it is true that Akka would simplify the transducers’ implementation, but the global clock generated by the clock node in StreamB does not only guarantee the same pace over the events, but allows synchronising the events, so that the resulting discretised sequence can be uniformly quantified by the MTL properties. In any case, such a global clock is enforced by StreamB, not assumed.

1.2 A.2 Review 2

Comment: One of the main arguments for StreamB used throughout the paper is to avoid “manual mapping” (or “manual coding”) from low-level data streams to beliefs, e.g. in the abstract: “if the environment changes, the mapping has to be changed as well (by the developer)”. StreamB is a high-level DSL that allows processing data streams using concise scripts/programs, which is great, but the mapping is still manual. Transducers and pipelines are synthesized based on StreamB programs, but this only hides away the complexity, I don’t see how it removes the need to change the mapping if the environment changes. This point should be better clarified.

Answer: The reviewer is right. We fixed this aspect and updated the text in Sect. 1 accordingly. Indeed, the mapping is still manual, but achieved through a higher-level specification (the DSL), which hopefully simplifies and improve the engineering process.

Comment: It is a bit surprising that the environment abstraction creates beliefs for agents, this blurs the separation of concerns between agents and the environment abstraction. Also, why limit this contribution to BDI agents? The impact could be broader. To illustrate the point with an example, in CArtAgO (discussed in related work) this problem is solved by introducing a separation of concerns between the agent mind and the agent body. The agent body keeps track of stimuli from the environment, but how the stimuli are interpreted and used is the concern of the agent mind and depends on the agent model (BDI or other).

Answer: We added more explanations on this point in Sect. 7. It is true that the work could be more general, and considering its implementation, it is actually the case. Since no restriction is given on what the abstract environment should do with the events generated by the fourth layer of transducers. Nonetheless, from a presentation perspective, we preferred to keep it focused on BDI systems, since we believe is the area in MAS which would gain more from our approach.

Comment: It could be misleading to say StreamB is a DSL for synthesizing abstract environments. In my understanding, it is a solution to a more specific problem: processing data streams in abstract environments. The authors also point this out and open the contribution to integration with existing MAS frameworks as part of the environment dimension.

Answer: The reviewer is right. We updated the title and Sect. 1 accordingly. StreamB does not completely synthesise an abstract environment, but it automatically synthesises transducers that can be used to develop an abstract environment. The development of the abstract environment though would be extremely straightforward, since it would only need to subscribe to the corresponding high-level events.

Comment: It is not clear to me why if the environment abstraction is designed and programmed manually, then it is addressed in an ad-hoc manner: on the contrary, it becomes a central part of the design of the overall system. Not a criticism and not intended to minimize the contribution, but note that with StreamB the design of the processing pipelines is also manual, only at a higher level of abstraction: the underlying machinery just executes what is written in StreamB programs.

Answer: The reviewer is right, we updated Sect. 1 accordingly.

Comment: As a suggestion for future work, the StreamB processing pipelines are currently hidden to agents (i.e., agents are not aware of the processing pipelines), but if the pipelines themselves would become first-class abstractions in the environment (i.e., pipelines that agents are aware of and can manipulate).

Answer: The reviewer pointed out very interesting future directions. We integrated these suggestions in Sect. 7.

Comment: The paper could use another thorough reading.

Answer: We fixed all the reported typos.

1.3 A.3 Review 3

Comment: The literature (e.g., in the field of functional programming) is rich of proposals for stream processing languages, including DSLs (e.g., various papers in the PADL conference). It would be interesting to see a comparison between StreamB and these other approaches and some discussion of why StreamB was built independently instead of using one of such existing frameworkds.

Answer: We extended Sect. 6 to consider existing Stream Processing Languages. We reported some of them, and compared with StreamB.

Rights and permissions

Reprints and permissions

Copyright information

© 2022 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Ferrando, A., Papacchini, F. (2022). StreamB: A Declarative Language for Automatically Processing Data Streams in Abstract Environments for Agent Platforms. In: Alechina, N., Baldoni, M., Logan, B. (eds) Engineering Multi-Agent Systems. EMAS 2021. Lecture Notes in Computer Science(), vol 13190. Springer, Cham. https://doi.org/10.1007/978-3-030-97457-2_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-97457-2_7

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-97456-5

  • Online ISBN: 978-3-030-97457-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics