Record Class AlloyGenerator.Translation

java.lang.Object
java.lang.Record
org.clafer.alloy.AlloyGenerator.Translation
Record Components:
code - the Alloy code, with the run command
mapping - the regions of the code that are constraints and cardinalities, for the unsat cores
strings - each string literal by its integer
alloyNames - the Alloy name of each clafer whose UID is not one, by UID
assertions - the assertions, in the order of the model
maxInt - the largest integer of the model, for the bitwidth
Enclosing class:
AlloyGenerator

public static record AlloyGenerator.Translation(String code, List<AlloyGenerator.Mapped> mapping, Map<Integer,String> strings, Map<String,String> alloyNames, List<AlloyGenerator.Assertion> assertions, long maxInt) extends Record
The Alloy code of a model for solving it, as claferIG has the compiler write it, and what claferIG reads from the compiler with it.
  • Constructor Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • code

      public String code()
      Returns the value of the code record component.
      Returns:
      the value of the code record component
    • mapping

      Returns the value of the mapping record component.
      Returns:
      the value of the mapping record component
    • strings

      Returns the value of the strings record component.
      Returns:
      the value of the strings record component
    • alloyNames

      Returns the value of the alloyNames record component.
      Returns:
      the value of the alloyNames record component
    • assertions

      Returns the value of the assertions record component.
      Returns:
      the value of the assertions record component
    • maxInt

      public long maxInt()
      Returns the value of the maxInt record component.
      Returns:
      the value of the maxInt record component