Skip to main content

αRby—An Embedding of Alloy in Ruby

  • Conference paper
Abstract State Machines, Alloy, B, TLA, VDM, and Z (ABZ 2014)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8477))

Abstract

We present αRby—an embedding of the Alloy language in Ruby—and demonstrate the benefits of having a declarative modeling language (backed by an automated solver) embedded in a traditional object-oriented imperative programming language. This approach aims to bring these two distinct paradigms (imperative and declarative) together in a novel way. We argue that having the other paradigm available within the same language is beneficial to both the modeling community of Alloy users and the object-oriented community of Ruby programmers. In this paper, we primarily focus on the benefits for the Alloy community, namely, how αRby provides elegant solutions to several well-known, outstanding problems: (1) mixed execution, (2) specifying partial instances, (3) staged model finding.

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 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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abrial, J., Hoare, A.: The B-Book: Assigning Programs to Meanings. Cambridge University Press (2005)

    Google Scholar 

  2. How to think about an Alloy model: 3 levels, http://alloy.mit.edu/alloy/tutorials/online/sidenote-levels-of-understanding.html

  3. aRby—An Embedding of Alloy in Ruby, https://github.com/sdg-mit/arby

  4. Online collection of aRby examples, https://github.com/sdg-mit/arby/tree/master/lib/arby_models

  5. Galeotti, J.P., Rosner, N., López Pombo, C.G., Frias, M.F.: Analysis of invariants for efficient bounded verification. In: ISSTA. ACM (2010)

    Google Scholar 

  6. Hawkins, P., Aiken, A., Fisher, K., Rinard, M., Sagiv, M.: Data representation synthesis. ACM SIGPLAN Notices 46 (2011)

    Google Scholar 

  7. Jackson, D.: Micromodels of software: Lightweight modelling and analysis with alloy (2002)

    Google Scholar 

  8. Jackson, D.: Software Abstractions: Logic, language, and analysis. MIT Press (2006)

    Google Scholar 

  9. Köksal, A.S., Kuncak, V., Suter, P.: Constraints as control. ACM SIGPLAN Notices (2012)

    Google Scholar 

  10. Milicevic, A., Rayside, D., Yessenov, K., Jackson, D.: Unifying execution of imperative and declarative code. In: ICSE (2011)

    Google Scholar 

  11. Montaghami, V., Rayside, D.: Extending alloy with partial instances. In: Derrick, J., Fitzgerald, J., Gnesi, S., Khurshid, S., Leuschel, M., Reeves, S., Riccobene, E. (eds.) ABZ 2012. LNCS, vol. 7316, pp. 122–135. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  12. Near, J.P., Jackson, D.: Rubicon: bounded verification of web applications. In: FSE. ACM (2012)

    Google Scholar 

  13. Nelson, T., Saghafi, S., Dougherty, D.J., Fisler, K., Krishnamurthi, S.: Aluminum: principled scenario exploration through minimality. In: ICSE. IEEE Press (2013)

    Google Scholar 

  14. Ruby Java Bridge, http://rjb.rubyforge.org/

  15. Samimi, H., Aung, E.D., Millstein, T.: Falling Back on Executable Specifications. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 552–576. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  16. Siskind, J.M., McAllester, D.A.: Screamer: A portable efficient implementation of nondeterministic common lisp. IRCS Technical Reports Series (1993)

    Google Scholar 

  17. Spivey, J.: Understanding Z: a specification language and its formal semantics. Cambridge tracts in theoretical computer science. Cambridge University Press (1988)

    Google Scholar 

  18. Torlak, E.: A Constraint Solver for Software Engineering: Finding Models and Cores of Large Relational Specifications. PhD thesis, MIT (2008)

    Google Scholar 

  19. Torlak, E., Bodik, R.: Growing solver-aided languages with rosette. In: Proceedings of the 2013 Onward! ACM (2013)

    Google Scholar 

  20. Yang, J., Yessenov, K., Solar-Lezama, A.: A language for automatically enforcing privacy policies. ACM SIGPLAN Notices (2012)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Milicevic, A., Efrati, I., Jackson, D. (2014). αRby—An Embedding of Alloy in Ruby. In: Ait Ameur, Y., Schewe, KD. (eds) Abstract State Machines, Alloy, B, TLA, VDM, and Z. ABZ 2014. Lecture Notes in Computer Science, vol 8477. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-43652-3_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-662-43652-3_5

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-662-43651-6

  • Online ISBN: 978-3-662-43652-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics