Record Class AlloyGenerator.Translation
java.lang.Object
java.lang.Record
org.clafer.alloy.AlloyGenerator.Translation
- Record Components:
code- the Alloy code, with theruncommandmapping- the regions of the code that are constraints and cardinalities, for the unsat coresstrings- each string literal by its integeralloyNames- the Alloy name of each clafer whose UID is not one, by UIDassertions- the assertions, in the order of the modelmaxInt- 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 Summary
ConstructorsConstructorDescriptionTranslation(String code, List<AlloyGenerator.Mapped> mapping, Map<Integer, String> strings, Map<String, String> alloyNames, List<AlloyGenerator.Assertion> assertions, long maxInt) Creates an instance of aTranslationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealloyNamesrecord component.Returns the value of theassertionsrecord component.code()Returns the value of thecoderecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mapping()Returns the value of themappingrecord component.longmaxInt()Returns the value of themaxIntrecord component.strings()Returns the value of thestringsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Translation
public Translation(String code, List<AlloyGenerator.Mapped> mapping, Map<Integer, String> strings, Map<String, String> alloyNames, List<AlloyGenerator.Assertion> assertions, long maxInt) Creates an instance of aTranslationrecord class.- Parameters:
code- the value for thecoderecord componentmapping- the value for themappingrecord componentstrings- the value for thestringsrecord componentalloyNames- the value for thealloyNamesrecord componentassertions- the value for theassertionsrecord componentmaxInt- the value for themaxIntrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
code
-
mapping
-
strings
-
alloyNames
Returns the value of thealloyNamesrecord component.- Returns:
- the value of the
alloyNamesrecord component
-
assertions
Returns the value of theassertionsrecord component.- Returns:
- the value of the
assertionsrecord component
-
maxInt
-