Structure Editor for Building Software Models

Mohammad Nurullah Patwary,Ana Jovanovic,Allison Sullivan
2024-06-14
Abstract:Alloy is well known a declarative modeling language. A key strength of Alloy is its scenario finding toolset, the Analyzer, which allows users to explore all valid scenarios that adhere to the model's constraints up to a user-provided scope. Despite the Analyzer, Alloy is still difficult for novice users to learn and use. A recent empirical study of over 93,000 new user models reveals that users have trouble from the very start: nearly a third of the models novices write fail to compile. We believe that the issue is that Alloy's grammar and type information is passively relayed to the user despite this information outlining a narrow path for how to compose valid formulas. In this paper, we outline a proof-of-concept for a structure editor for Alloy in which user's build their models using block based inputs, rather than free typing, which by design prevents compilation errors.
Software Engineering
What problem does this paper attempt to address?
The paper aims to address the learning and usage difficulties encountered by novice users when using the Alloy modeling language. Specifically: 1. **Novice users find it difficult to write effective models**: Although Alloy provides a toolset called Analyzer that helps users explore all valid scenarios that meet model constraints, studies show that more than one-third of models written by novices fail to compile. 2. **Compilation error reports are not clear enough**: The Alloy compiler marks syntax and type compilation errors based on syntax rules and an internal type system, but the feedback quality of these error reports is low, making it difficult for users to understand the cause of the errors and to correct them. The paper proposes a conceptual solution based on a structured editor, which constructs models using block-based input rather than free-text input, thereby avoiding compilation errors. This structured editor can actively guide users in building correct models, rather than passively providing error prompts at compile time. In this way, the authors hope to simplify the learning process of Alloy, enabling users to write effective software models more quickly and easily.