Portus: Linking Alloy with SMT-based Finite Model Finding

Ryan Dancy,Nancy A. Day,Owen Zila,Khadija Tariq,Joseph Poremba
2024-11-25
Abstract:Alloy is a well-known, formal, declarative language for modelling systems early in the software development process. Currently, it uses the Kodkod library as a back-end for finite model finding. Kodkod translates the model to a SAT problem; however, this method can often handle only problems of fairly low-size sets and is inherently finite. We present Portus, a method for translating Alloy into an equivalent many-sorted first-order logic problem (MSFOL). Once in MSFOL, the problem can be evaluated by an SMT-based finite model finding method implemented in the Fortress library, creating an alternative back-end for the Alloy Analyzer. Fortress converts the MSFOL finite model finding problem into the logic of uninterpreted functions with equality (EUF), a decidable fragment of first-order logic that is well-supported in many SMT solvers. We compare the performance of Portus with Kodkod on a corpus of 49 expert Alloy models. Our method is fully integrated into the Alloy Analyzer.
Software Engineering,Logic in Computer Science
What problem does this paper attempt to address?
### What problems does this paper attempt to solve? This paper aims to solve the performance and scalability problems encountered by the Alloy modeling language in Finite Model Finding (FMF). Specifically: 1. **Limitations of existing methods**: - Currently, Alloy uses the KODKOD library as a backend for finite model finding. KODKOD converts models into SAT problems and solves them through SAT solvers such as MiniSat. - This method has capacity limitations when dealing with larger - scale sets and can only handle completely finite problems. 2. **Proposed new method**: - The paper proposes a method named PORTUS, which translates Alloy models into Many - Sorted First - Order Logic (MSFOL) problems. - Then, the MSFOL problems can be used for finite model finding through SMT (Satisfiability Modulo Theories) solvers, thus providing an alternative Alloy Analyzer backend. 3. **Improvement goals**: - **Performance improvement**: By leveraging the capabilities of SMT solvers, especially EUF (Equality and Uninterpreted Functions) logic, to increase the solving speed and efficiency. - **Enhanced scalability**: SMT solvers can handle larger - scale sets and more complex problems, breaking through the capacity limitations of existing methods. - **Increased flexibility**: SMT solvers can handle not only finite problems but also unbounded problems, providing more flexibility. 4. **Experimental verification**: - The paper evaluates the performance of PORTUS and KODKOD through comparative experiments on 49 expert - level Alloy models. The results show that PORTUS exhibits better scalability on some models and is competitive in overall performance. In summary, the main goal of this paper is to improve the performance and scalability of Alloy in finite model finding by introducing new translation methods and solvers, thereby better supporting system modeling and error detection in the early software development process.