Skip to main content

Modeling Rover Communication Using Hierarchical State Machines with Scala

  • Conference paper
  • First Online:
Computer Safety, Reliability, and Security (SAFECOMP 2017)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 10489))

Included in the following conference series:

Abstract

We demonstrate the application of a new domain-specific language (DSL) for modeling Hierarchical State Machines (HSMs) to the software that manages communications for the Curiosity Mars rover.

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

Notes

  1. 1.

    Due to JPL restrictions on sharing of flight artifacts, neither the full case study in C, nor its complete formalization in Scala, can be made publicly available.

  2. 2.

    A priority-preemptive scheduler schedules for execution the highest priority task that is ready to run.

  3. 3.

    If a message queue is full, an attempt to send a message to that queue results in either the message being dropped (for noncritical messages), or causes a system exception (for critical messages).

  4. 4.

    In the interests of readability, the simplified HSM shown here does not handle the case where a timer expires right when a CANCEL message is sent; the full HSM handles this condition gracefully.

  5. 5.

    In our somewhat simplified execution model, we currently assume that entering and exiting states does not take any time; thus several such related events have the same timestamp.

References

  1. Akka FSMs. http://doc.akka.io/docs/akka/current/scala/fsm.html

  2. Unified Modeling Language. http://www.uml.org. Accessed 06 Aug 2017

  3. Barringer, H., Falcone, Y., Havelund, K., Reger, G., Rydeheard, D.: Quantified event automata: towards expressive and efficient runtime monitors. In: Giannakopoulou, D., Méry, D. (eds.) FM 2012. LNCS, vol. 7436, pp. 68–84. Springer, Heidelberg (2012). doi:10.1007/978-3-642-32759-9_9

    Chapter  Google Scholar 

  4. Barringer, H., Havelund, K.: TraceContract: a scala DSL for trace analysis. In: Butler, M., Schulte, W. (eds.) FM 2011. LNCS, vol. 6664, pp. 57–72. Springer, Heidelberg (2011). doi:10.1007/978-3-642-21437-0_7

    Chapter  Google Scholar 

  5. Basin, D., Klaedtke, F., Marinovic, S., Zălinescu, E.: Monitoring of temporal first-order properties with aggregations. In: Legay, A., Bensalem, S. (eds.) RV 2013. LNCS, vol. 8174, pp. 40–58. Springer, Heidelberg (2013). doi:10.1007/978-3-642-40787-1_3

    Chapter  Google Scholar 

  6. Broy, M., Havelund, K., Kumar, R.: Towards a unified view of modeling and programming. In: Margaria, T., Steffen, B. (eds.) ISoLA 2016. LNCS, vol. 9953, pp. 238–257. Springer, Cham (2016). doi:10.1007/978-3-319-47169-3_17

    Chapter  Google Scholar 

  7. Deligiannis, P., Donaldson, A.F., Ketema, J., Lal, A., Thomson, P.: Asynchronous programming, analysis and testing with state machines. In: Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2015, NY, USA, pp. 154–164 (2015). http://doi.acm.org/10.1145/2737924.2737996

  8. Desai, A., Gupta, V., Jackson, E., Qadeer, S., Rajamani, S., Zufferey, D.: P: Safe asynchronous event-driven programming. In: Proceedings of PLDI 2013, pp. 321–332 (2013). http://doi.acm.org/10.1145/2491956.2462184

  9. Drusinsky, D.: Modeling and Verification using UML Statecharts. Elsevier, ISBN-13: 978-0-7506-7949-7, 400 p (2006)

    Google Scholar 

  10. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-oriented Software. Addison-Wesley, Boston (1995)

    MATH  Google Scholar 

  11. Hassard, J.: Closing. In: Dias, M., Eick, C.J., Brantley-Dias, L. (eds.) Science Teacher Educators as K-12 Teachers. ASSE, vol. 1, pp. 287–302. Springer, Dordrecht (2014). doi:10.1007/978-94-007-6763-8_20

    Chapter  Google Scholar 

  12. Havelund, K.: Data automata in Scala. In: Proceedings of the 8th International Symposium on Theoretical Aspects of Software Engineering, TASE 2014 (2014)

    Google Scholar 

  13. Havelund, K.: Rule-based runtime verification revisited. Int. J. Softw. Tools Technol. Transf. 17(2), 143–170 (2015)

    Article  Google Scholar 

  14. Havelund, K., Joshi, R.: Modeling and monitoring of hierarchical state machines in Scala. In preparation

    Google Scholar 

  15. Havelund, K., Visser, W.: Program model checking as a new trend. STTT 4(1), 8–20 (2002)

    Article  Google Scholar 

  16. Kauffman, S., Havelund, K., Joshi, R.: nfer – a notation and system for inferring event stream abstractions. In: Falcone, Y., Sánchez, C. (eds.) RV 2016. LNCS, vol. 10012, pp. 235–250. Springer, Cham (2016). doi:10.1007/978-3-319-46982-9_15

    Chapter  Google Scholar 

  17. Meredith, P., Jin, D., Griffith, D., Chen, F., Roşu, G.: An overview of the MOP runtime verification framework. J. Softw. Tools Technol. Transf. pp. 1–41 (2011). http://dx.doi.org/10.1007/s10009-011-0198-6

  18. Müller, P., Schwerhoff, M., Summers, A.J.: Viper: a verification infrastructure for permission-based reasoning. In: Jobstmann, B., Leino, K.R.M. (eds.) VMCAI 2016. LNCS, vol. 9583, pp. 41–62. Springer, Heidelberg (2016). doi:10.1007/978-3-662-49122-5_2

    Chapter  Google Scholar 

  19. Samek, M.: Practical UML Statecharts in C/C++, Event-Driven Programming for Embedded Systems, 2nd edn. Newnes, MA, USA (2009)

    Google Scholar 

Download references

Acknowledgments

The research performed was carried out at Jet Propulsion Laboratory, California Institute of Technology, under a contract with the National Aeronautics and Space Administration.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Rajeev Joshi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Havelund, K., Joshi, R. (2017). Modeling Rover Communication Using Hierarchical State Machines with Scala. In: Tonetta, S., Schoitsch, E., Bitsch, F. (eds) Computer Safety, Reliability, and Security . SAFECOMP 2017. Lecture Notes in Computer Science(), vol 10489. Springer, Cham. https://doi.org/10.1007/978-3-319-66284-8_38

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-66284-8_38

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-66283-1

  • Online ISBN: 978-3-319-66284-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics