Skip to main content

FScaFi : A Core Calculus for Collective Adaptive Systems Programming

  • Conference paper
  • First Online:
Leveraging Applications of Formal Methods, Verification and Validation: Engineering Principles (ISoLA 2020)

Abstract

A recently proposed approach to the rigorous engineering of collective adaptive systems is the aggregate computing paradigm, which operationalises the idea of expressing collective adaptive behaviour by a global perspective as a functional composition of dynamic computational fields (i.e., structures mapping a collection of individual devices of a collective to computational values over time). In this paper, we present FScaFi, a core language that captures the essence of exploiting field computations in mainstream functional languages, and which is based on a semantic model for field computations leveraging the novel notion of “computation against a neighbour”. Such a construct models expressions whose evaluation depends on the same evaluation that occurred on a neighbour, thus abstracting communication actions and, crucially, enabling deep and straightforward integration in the Scala programming language, by the ScaFi incarnation. We cover syntax and informal semantics of FScaFi, provide examples of collective adaptive behaviour development in ScaFi, and delineate future work.

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 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

Similar content being viewed by others

Notes

  1. 1.

    https://scafi.github.io.

  2. 2.

    https://kafka.apache.org.

  3. 3.

    https://akka.io.

  4. 4.

    This is where FScaFi differs from classical field calculus, where instead neighbouring fields are explicitly manipulated.

  5. 5.

    The “Plus” suffix is to mimic the mathematical syntax \(R^+\) of the transitive closure of a (neighbouring) relation R.

References

  1. Anderson, S., Bredeche, N., Eiben, A., Kampis, G., van Steen, M.: Adaptive collective systems: herding black sheep (2013)

    Google Scholar 

  2. Beal, J., Pianini, D., Viroli, M.: Aggregate programming for the Internet of Things. IEEE Comput. 48(9), 22–30 (2015)

    Article  Google Scholar 

  3. Viroli, M., Beal, J., Damiani, F., Audrito, G., Casadei, R., Pianini, D.: From distributed coordination to field calculus and aggregate computing. J. Logical Algebraic Methods Program. 109, 100486 (2019). https://doi.org/10.1016/j.jlamp.2019.100486

    Article  MathSciNet  MATH  Google Scholar 

  4. Beal, J., Dulman, S., Usbeck, K., Viroli, M., Correll, N.: Organizing the aggregate: languages for spatial computing. In: Mernik, M. (ed.) Formal and Practical Aspects of Domain-Specific Languages: Recent Developments, chap. 16, pp. 436–501. IGI Global (2013). https://doi.org/10.4018/978-1-4666-2092-6.ch016

  5. Audrito, G., Viroli, M., Damiani, F., Pianini, D., Beal, J.: A higher-order calculus of computational fields. ACM Trans. Comput. Logic 20(1), 5:1–5:55 (2019). https://doi.org/10.1145/3285956

    Article  MathSciNet  MATH  Google Scholar 

  6. Beal, J., Bachrach, J.: Infrastructure for engineered emergence in sensor/actuator networks. IEEE Intell. Syst. 21, 10–19 (2006)

    Article  Google Scholar 

  7. Mamei, M., Zambonelli, F.: Programming pervasive and mobile computing applications: the TOTA approach. ACM Trans. Softw. Eng. Methodol. 18(4), 1–56 (2009). https://doi.org/10.1145/1538942.1538945

    Article  Google Scholar 

  8. Casadei, R., Pianini, D., Viroli, M.: Simulating large-scale aggregate MASs with alchemist and scala. In: 2016 Federated Conference on Computer Science and Information Systems (FedCSIS), pp. 1495–1504. IEEE (2016)

    Google Scholar 

  9. Pianini, D., Viroli, M., Beal, J.: Protelis: practical aggregate programming. In: 2015 ACM Symposium on Applied Computing, pp. 1846–1853 (2015)

    Google Scholar 

  10. Beal, J., Viroli, M., Pianini, D., Damiani, F.: Self-adaptation to device distribution in the Internet of Things. ACM Trans. Auton. Adapt. Syst. 12(3), 12:1–12:29 (2017). https://doi.org/10.1145/3105758

    Article  Google Scholar 

  11. Viroli, M., Audrito, G., Beal, J., Damiani, F., Pianini, D.: Engineering resilient collective adaptive systems by self-stabilisation. ACM Trans. Model. Comput. Simul. 28(2), 16:1–16:28 (2018). https://doi.org/10.1145/3177774

    Article  MathSciNet  Google Scholar 

  12. Voelter, M.: DSL Engineering: Designing, Implementing and Using Domain-Specific Languages. CreateSpace Independent Publishing Platform, Scotts Valley (2013)

    Google Scholar 

  13. Viroli, M., Casadei, R., Pianini, D.: On execution platforms for large-scale aggregate computing. In: Proceedings of the 2016 ACM International Joint Conference on Pervasive and Ubiquitous Computing: Adjunct, pp. 1321–1326. ACM (2016)

    Google Scholar 

  14. Casadei, R., Viroli, M.: Programming actor-based collective adaptive systems. In: Ricci, A., Haller, P. (eds.) Programming with Actors. LNCS, vol. 10789, pp. 94–122. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-00302-9_4

    Chapter  Google Scholar 

  15. Bettini, L.: Implementing Domain-Specific Languages with Xtext and Xtend. Packt, Birmingham (2016)

    Google Scholar 

  16. Efftinge, S., et al.: Xbase: implementing domain-specific languages for Java. In: ACM SIGPLAN Notices, vol. 48, pp. 112–121. ACM (2012)

    Google Scholar 

  17. Vlissides, J.M.: Pattern Hatching: Design Patterns Applied. Addison-Wesley, Reading (1998)

    Google Scholar 

  18. Ghosh, D.: DSL for the uninitiated. Commun. ACM 54(7), 44–50 (2011). https://doi.org/10.1145/1965724.1965740

    Article  Google Scholar 

  19. Hennicker, R., Klarl, A.: Foundations for ensemble modeling – the Helena approach. In: Iida, S., Meseguer, J., Ogata, K. (eds.) Specification, Algebra, and Software. LNCS, vol. 8373, pp. 359–381. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-642-54624-2_18

    Chapter  Google Scholar 

  20. Bures, T., Gerostathopoulos, I., Hnetynka, P., Keznikl, J., Kit, M., Plasil, F.: DEECO: an ensemble-based component system. In: Proceedings of the 16th International ACM Sigsoft symposium on Component-Based software engineering, pp. 81–90. ACM (2013). https://doi.org/10.1145/2465449.2465462

  21. Baude, F., Henrio, L., Ruz, C.: Programming distributed and adaptable autonomous components-the GCM/ProActive framework. Softw.: Pract. Exp. 45(9), 1189–1227 (2015). https://doi.org/10.1002/spe.2270

    Article  Google Scholar 

  22. De Nicola, R., Loreti, M., Pugliese, R., Tiezzi, F.: A formal approach to autonomic systems programming: the SCEL language. ACM Trans. Auton. Adapt. Syst. (TAAS) 9(2), 7:1–7:29 (2014). https://doi.org/10.1145/2619998

    Article  Google Scholar 

  23. Alrahman, Y.A., De Nicola, R., Loreti, M., Tiezzi, F., Vigo, R.: A calculus for attribute-based communication. In: Proceedings of the 30th Annual ACM Symposium on Applied Computing, pp. 1840–1845 (2015)

    Google Scholar 

  24. De Nicola, R., Duong, T., Inverso, O., Trubiani, C.: AErlang: empowering erlang with attribute-based communication. Sci. Comput. Program. 168, 71–93 (2018)

    Article  Google Scholar 

  25. Casadei, R., Viroli, M., Audrito, G., Pianini, D., Damiani, F.: Aggregate processes in field calculus. In: Riis Nielson, H., Tuosto, E. (eds.) COORDINATION 2019. LNCS, vol. 11533, pp. 200–217. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-22397-7_12

    Chapter  MATH  Google Scholar 

  26. Coore, D.: Botanical computing: a developmental approach to generating interconnect topologies on an amorphous computer. Ph.D. thesis, MIT (1999)

    Google Scholar 

  27. Nagpal, R.: Programmable pattern-formation and scale-independence. In: Minai, A.A., Bar-Yam, Y. (eds.) Unifying Themes in Complex Systems IV, pp. 275–282. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-73849-7_31

    Chapter  Google Scholar 

  28. Viroli, M., Pianini, D., Beal, J.: Linda in space-time: an adaptive coordination model for mobile ad-hoc environments. In: Sirjani, M. (ed.) COORDINATION 2012. LNCS, vol. 7274, pp. 212–229. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-30829-1_15

    Chapter  Google Scholar 

  29. Mottola, L., Picco, G.P.: Logical neighborhoods: a programming abstraction for wireless sensor networks. In: Gibbons, P.B., Abdelzaher, T., Aspnes, J., Rao, R. (eds.) DCOSS 2006. LNCS, vol. 4026, pp. 150–168. Springer, Heidelberg (2006). https://doi.org/10.1007/11776178_10

    Chapter  Google Scholar 

  30. Ni, Y., Kremer, U., Stere, A., Iftode, L.: Programming ad-hoc networks of mobile and resource-constrained devices. ACM SIGPLAN Not. 40(6), 249–260 (2005)

    Article  Google Scholar 

  31. Wada, H., Boonma, P., Suzuki, J.: A spacetime oriented macroprogramming paradigm for push-pull hybrid sensor networking. In: 2007 16th International Conference on Computer Communications and Networks, pp. 868–875. IEEE (2007)

    Google Scholar 

  32. Newton, R., Welsh, M.: Region streams: functional macroprogramming for sensor networks. In: Workshop on Data Management for Sensor Networks, pp. 78–87 (2004)

    Google Scholar 

  33. Engstrom, B.R., Cappello, P.R.: The SDEF programming system. J. Parallel Distrib. Comput. 7(2), 201–231 (1989)

    Article  Google Scholar 

  34. Giavitto, J.-L., Michel, O., Cohen, J., Spicher, A.: Computations in space and space in computations. In: Banâtre, J.-P., Fradet, P., Giavitto, J.-L., Michel, O. (eds.) UPP 2004. LNCS, vol. 3566, pp. 137–152. Springer, Heidelberg (2005). https://doi.org/10.1007/11527800_11

    Chapter  Google Scholar 

  35. Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. Program. Lang. Syst. 23(3), 396–450 (2001)

    Article  Google Scholar 

  36. Audrito, G., Damiani, F., Viroli, M., Casadei, R.: Run-time management of computation domains in field calculus. In: IEEE International Workshops on Foundations and Applications of Self* Systems, pp. 192–197. IEEE (2016). https://doi.org/10.1109/FAS-W.2016.50

  37. Lin, F.C.H., Keller, R.M.: The gradient model load balancing method. IEEE Trans. Softw. Eng. 13(1), 32–38 (1987). https://doi.org/10.1109/TSE.1987.232563

    Article  Google Scholar 

  38. Beal, J., Bachrach, J., Vickery, D., Tobenkin, M.: Fast self-healing gradients. In: 2008 Proceedings of ACM SAC, pp. 1969–1975. ACM (2008)

    Google Scholar 

  39. Audrito, G., Casadei, R., Damiani, F., Viroli, M.: Compositional blocks for optimal self-healing gradients. In: 11th IEEE International Conference on Self-Adaptive and Self-Organizing Systems, SASO, pp. 91–100. IEEE Computer Society (2017). https://doi.org/10.1109/SASO.2017.18

  40. Viroli, M., Beal, J., Damiani, F., Pianini, D.: Efficient engineering of complex self-organising systems by self-stabilising fields. In: 2015 IEEE 9th International Conference on Self-Adaptive and Self-Organizing Systems (SASO), pp. 81–90. IEEE, September 2015. https://doi.org/10.1109/SASO.2015.16

  41. Damiani, F., Viroli, M.: Type-based self-stabilisation for computational fields. Logical Methods Comput. Sci. 11(4) (2015). https://doi.org/10.2168/LMCS-11(4:21)2015

  42. Audrito, G., Beal, J., Damiani, F., Viroli, M.: Space-time universality of field calculus. In: Di Marzo Serugendo, G., Loreti, M. (eds.) COORDINATION 2018. LNCS, vol. 10852, pp. 1–20. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-92408-3_1

    Chapter  Google Scholar 

  43. Montagna, S., Viroli, M., Fernandez-Marquez, J.L., Di Marzo Serugendo, G., Zambonelli, F.: Injecting self-organisation into pervasive service ecosystems. Mobile Netw. Appl. 18(3), 398–412 (2013). https://doi.org/10.1007/s11036-012-0411-1

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mirko Viroli .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Casadei, R., Viroli, M., Audrito, G., Damiani, F. (2020). FScaFi : A Core Calculus for Collective Adaptive Systems Programming. In: Margaria, T., Steffen, B. (eds) Leveraging Applications of Formal Methods, Verification and Validation: Engineering Principles. ISoLA 2020. Lecture Notes in Computer Science(), vol 12477. Springer, Cham. https://doi.org/10.1007/978-3-030-61470-6_21

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-61470-6_21

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-61469-0

  • Online ISBN: 978-3-030-61470-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics