ASketch: a sketching framework for Alloy

Alloy is a declarative modeling language that supports first-order logic with transitive closure. Alloy has been used in a variety of domains to model software systems and find design deficiencies. However, it is often challenging to make an Alloy model correct or to debug a faulty Alloy model. ASketch is a sketching/synthesis technique that can help users write correct Alloy models. ASketch allows users to provide a partial Alloy model with holes, a generator that specifies candidate fragments to be considered for each hole, and a set of tests that capture the desired model properties. Then, the tool completes the holes such that all tests for the completed model pass. ASketch uses tests written for the recently introduced AUnit framework, which provides a foundation of testing (unit tests, test execution, and model coverage) for Alloy models in the spirit of traditional unit testing. This paper describes our Java implementation of ASketch, which is a command-line tool, released as an open-source project on GitHub. Our experimental results show that ASketch can handle partial Alloy models with multiple holes and a large search space. The demo video for ASketch can be found at https://youtu.be/T5NIVsV329E.

[1]  J. Michael Spivey,et al.  Understanding Z : A specification language and its formal semantics , 1985, Cambridge tracts in theoretical computer science.

[2]  Sarfraz Khurshid,et al.  Fault Localization for Declarative Models in Alloy , 2018, 2020 IEEE 31st International Symposium on Software Reliability Engineering (ISSRE).

[3]  Sarfraz Khurshid,et al.  Automated Test Generation and Mutation Testing for Alloy , 2017, 2017 IEEE International Conference on Software Testing, Verification and Validation (ICST).

[4]  Daniel Jackson,et al.  Alloy: a lightweight object modelling notation , 2002, TSEM.

[5]  Daniel J. Dougherty,et al.  The power of "why" and "why not": enriching scenario exploration with provenance , 2017, ESEC/SIGSOFT FSE.

[6]  Jean-Raymond Abrial,et al.  The B-book - assigning programs to meanings , 1996 .

[7]  Sarfraz Khurshid,et al.  Systematic Generation of Non-equivalent Expressions for Relational Algebra , 2018, ABZ.

[8]  Sarfraz Khurshid,et al.  Solver-Based Sketching of Alloy Models Using Test Valuations , 2018, ABZ.

[9]  Sarfraz Khurshid,et al.  MuAlloy: A Mutation Testing Framework for Alloy , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering: Companion (ICSE-Companion).

[10]  Daniel J. Dougherty,et al.  Exploring Theories with a Model-Finding Assistant , 2015, CADE.

[11]  Sarfraz Khurshid,et al.  Automated Model Repair for Alloy , 2018, 2018 33rd IEEE/ACM International Conference on Automated Software Engineering (ASE).

[12]  Sarfraz Khurshid,et al.  Evaluating State Modeling Techniques in Alloy , 2017, SQAMIA.

[13]  Armando Solar-Lezama,et al.  Program synthesis by sketching , 2008 .

[14]  Terence Parr,et al.  The Definitive ANTLR 4 Reference , 2013 .

[15]  Sarfraz Khurshid,et al.  AUnit: A Test Automation Tool for Alloy , 2018, 2018 IEEE 11th International Conference on Software Testing, Verification and Validation (ICST).

[16]  Sarfraz Khurshid,et al.  Towards a test automation framework for alloy , 2014, SPIN.

[17]  Emina Torlak,et al.  Kodkod: A Relational Model Finder , 2007, TACAS.