Skip to content

alloy-js/sterling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sterling

Sterling is Alloy extended to include visualizations generated using the alloy-js library. A local webserver is created when Alloy is initialized and instance data is served automatically as solutions are found. The alloy-js library and supporting web pages are included to generate visualizations in the browser automatically.

The focus of this project is bringing better visualization techniques to Alloy, and so the name Sterling seemed particularly appropriate. After all, sterling silver is an alloy of silver that is generally used to make things that look nice.

Components and Directory Structure

We make use of the following tools:

  • Gradle: Build tool responsible for gathering dependencies and generating the JAR file.
  • Shadow: Gradle plugin used to create a fat JAR.
  • Spark: Small webserver framework used to communicate with the browser.
  • Alloy: Currently using Alloy 5.0.0.1

The project is laid out as follows (italicized items are not included in the repository but are generated by building the project):

  • build/
    • libs/
      • Sterling-*.jar - The Sterling JAR file
  • gradle/ - Gradle wrapper directory (more info)
  • libs/ - Directory containing regular Alloy JAR files
  • src/
    • main/
      • java/
        • gui/ - The main Alloy GUI (alloy4whole)
        • server/ - The Spark server code for communicating with the browser
        • sterling/ - Entry point and various Sterling specific classes
        • viz/ - The Alloy visualization window (alloy4viz)
      • resources/
        • public/ - Directory containing all web pages and Javascript to display visualizations
  • build.gradle - The gradle build file that contains dependencies and build instructions
  • gradlew - The gradle wrapper script (more info)
  • gradlew.bat - The gradle wrapper script for Windows (more info)
  • README.md - This file
  • settings.gradle - The gradle settings file

Building

To build the JAR:

cd /location/of/sterling
./gradlew shadowJar

To clean the build directory:

cd /location/of/sterling
./gradlew clean

Releasing

Before performing the final build before a release, increment the version field in the build.gradle file. This will update the version numbers displayed in the tool as well as the filename of the JAR.

About

Alloy with browser-based visualizations

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages