Package geneticalgorithm
Enum SpecificationChromosome.SPEC_STATUS
- java.lang.Object
-
- java.lang.Enum<SpecificationChromosome.SPEC_STATUS>
-
- geneticalgorithm.SpecificationChromosome.SPEC_STATUS
-
- All Implemented Interfaces:
Serializable,Comparable<SpecificationChromosome.SPEC_STATUS>
- Enclosing class:
- SpecificationChromosome
public static enum SpecificationChromosome.SPEC_STATUS extends Enum<SpecificationChromosome.SPEC_STATUS>
The evaluation lattice of a candidate specification, ordered from completely broken to repaired:/ ASSUMPTIONS \ UNKNOWN -- BOTTOM -- CONTRADICTORY -- UNREALIZABLE -- REALIZABLE \ GUARANTEES /The fitness function maps this ladder to graded scores (0.0, 0.05, 0.1, 0.2, 0.5, 1.0) so that partially fixed candidates still receive gradient — see
AutomataBasedModelCountingSpecificationFitness. TheGUARANTEESrung exists to distinguish the degenerate case of a specification that is "realisable" only because its assumptions are unsatisfiable (vacuous realisability, which conveys no intent).
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ASSUMPTIONSThe assumptions are satisfiable, but the guarantees are not.BOTTOMBoth the assumptions and the guarantees are unsatisfiable.CONTRADICTORYEach side is satisfiable in isolation, but their conjunction is not.GUARANTEESThe guarantees are satisfiable, but the assumptions are not (vacuous realisability).REALIZABLEThe specification is consistent and realisable — a repair.UNKNOWNThe status of the specification has not been computed yet.UNREALIZABLEThe specification is consistent, but no controller can realise it.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanareAssumptionsSAT()booleanareGuaranteesSAT()booleancompatible(SpecificationChromosome.SPEC_STATUS other)Whether two statuses can meaningfully be combined during the search: both must be computed and not completely broken, and the pair must not consist of two individuals broken on the same side.booleanisSpecificationConsistent()StringtoString()static SpecificationChromosome.SPEC_STATUSvalueOf(String name)Returns the enum constant of this type with the specified name.static SpecificationChromosome.SPEC_STATUS[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final SpecificationChromosome.SPEC_STATUS UNKNOWN
The status of the specification has not been computed yet.
-
BOTTOM
public static final SpecificationChromosome.SPEC_STATUS BOTTOM
Both the assumptions and the guarantees are unsatisfiable.
-
ASSUMPTIONS
public static final SpecificationChromosome.SPEC_STATUS ASSUMPTIONS
The assumptions are satisfiable, but the guarantees are not.
-
GUARANTEES
public static final SpecificationChromosome.SPEC_STATUS GUARANTEES
The guarantees are satisfiable, but the assumptions are not (vacuous realisability).
-
CONTRADICTORY
public static final SpecificationChromosome.SPEC_STATUS CONTRADICTORY
Each side is satisfiable in isolation, but their conjunction is not.
-
UNREALIZABLE
public static final SpecificationChromosome.SPEC_STATUS UNREALIZABLE
The specification is consistent, but no controller can realise it.
-
REALIZABLE
public static final SpecificationChromosome.SPEC_STATUS REALIZABLE
The specification is consistent and realisable — a repair.
-
-
Method Detail
-
values
public static SpecificationChromosome.SPEC_STATUS[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SpecificationChromosome.SPEC_STATUS c : SpecificationChromosome.SPEC_STATUS.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SpecificationChromosome.SPEC_STATUS valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
compatible
public boolean compatible(SpecificationChromosome.SPEC_STATUS other)
Whether two statuses can meaningfully be combined during the search: both must be computed and not completely broken, and the pair must not consist of two individuals broken on the same side.- Parameters:
other- the status to combine with- Returns:
trueiff the combination is admissible
-
areAssumptionsSAT
public boolean areAssumptionsSAT()
- Returns:
trueiff this status implies the assumptions are satisfiable
-
areGuaranteesSAT
public boolean areGuaranteesSAT()
- Returns:
trueiff this status implies the guarantees are satisfiable
-
isSpecificationConsistent
public boolean isSpecificationConsistent()
- Returns:
trueiff the specification is consistent as a whole (assumptions and guarantees jointly satisfiable) — the precondition for computing the semantic-similarity ratios
-
toString
public String toString()
- Overrides:
toStringin classEnum<SpecificationChromosome.SPEC_STATUS>
-
-