AlloyTools / org.alloytools.alloy

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.
Other
694 stars 123 forks source link

Fixes file out and show latest #276

Closed pkriens closed 1 month ago

pkriens commented 1 month ago

The doVisualize(s) method took a string that had a type and a parameter, like "XML: /foo/bar..". There was a public method setLatestInstance(s) that sets the parameter part. However, that meant that we could not remember the latest if it wasn't XML. The doVisualize(s) was the central dispatcher for visualization and called from many places.

The doVisualize(s) now takes an optionally typed argument. If it is not typed, we assume XML. So now can we set a typed string via setLatestInstance(s).

When we create an output file as is now supported by the solver architecture, we safe it as "CNF: /...". So when we hit show latest instance, we get the file.

Ugly as hell ...

Fixes #273