Alloy is a language for describing structures and a tool for exploring them. It has been used in a wide range of applications from finding holes in security mechanisms to designing telephone switching networks. This repository contains the code for the tool.
Translates Dash state variable declarations (they will be put in the init python function). The supported declarations include set of (ex: active_players: set Player) and arrow (ex: occupied: Char set -> set Player). Other declaration types (if there are any) will be implemented in future tickets
Translates Dash state variable initializations
Translates Dash state variable constraints (ex: #active_players > 1) into assert statements at the end of the python init function
Some notes:
I moved the test files into the org.alloytools.alloy.application project to resolve a circular dependency build issue
I am no longer failing the assertNotNull in CoreDashToPythonTest.java. I have no idea why.
I haven't added test cases yet. I might make a small separate ticket for that and add it next sprint.
The initializations to a sig (ex: self.active_chairs = chair) assume there exists a set called "chair" that represents the sig. This may need to be adjusted since I am not familiar with the exact sig translation as of writing this.
Sample input (taken from the musical chairs example):
Sample output (some boilerplate code missing):
init_output.txt
This PR:
Some notes:
Sample input (taken from the musical chairs example): Sample output (some boilerplate code missing): init_output.txt