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.
Access provided by Autonomous University of Puebla. Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Abrial, J., Hoare, A.: The B-Book: Assigning Programs to Meanings. Cambridge University Press (2005)
How to think about an Alloy model: 3 levels, http://alloy.mit.edu/alloy/tutorials/online/sidenote-levels-of-understanding.html
aRby—An Embedding of Alloy in Ruby, https://github.com/sdg-mit/arby
Online collection of aRby examples, https://github.com/sdg-mit/arby/tree/master/lib/arby_models
Galeotti, J.P., Rosner, N., López Pombo, C.G., Frias, M.F.: Analysis of invariants for efficient bounded verification. In: ISSTA. ACM (2010)
Hawkins, P., Aiken, A., Fisher, K., Rinard, M., Sagiv, M.: Data representation synthesis. ACM SIGPLAN Notices 46 (2011)
Jackson, D.: Micromodels of software: Lightweight modelling and analysis with alloy (2002)
Jackson, D.: Software Abstractions: Logic, language, and analysis. MIT Press (2006)
Köksal, A.S., Kuncak, V., Suter, P.: Constraints as control. ACM SIGPLAN Notices (2012)
Milicevic, A., Rayside, D., Yessenov, K., Jackson, D.: Unifying execution of imperative and declarative code. In: ICSE (2011)
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)
Near, J.P., Jackson, D.: Rubicon: bounded verification of web applications. In: FSE. ACM (2012)
Nelson, T., Saghafi, S., Dougherty, D.J., Fisler, K., Krishnamurthi, S.: Aluminum: principled scenario exploration through minimality. In: ICSE. IEEE Press (2013)
Ruby Java Bridge, http://rjb.rubyforge.org/
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)
Siskind, J.M., McAllester, D.A.: Screamer: A portable efficient implementation of nondeterministic common lisp. IRCS Technical Reports Series (1993)
Spivey, J.: Understanding Z: a specification language and its formal semantics. Cambridge tracts in theoretical computer science. Cambridge University Press (1988)
Torlak, E.: A Constraint Solver for Software Engineering: Finding Models and Cores of Large Relational Specifications. PhD thesis, MIT (2008)
Torlak, E., Bodik, R.: Growing solver-aided languages with rosette. In: Proceedings of the 2013 Onward! ACM (2013)
Yang, J., Yessenov, K., Solar-Lezama, A.: A language for automatically enforcing privacy policies. ACM SIGPLAN Notices (2012)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)