Interface RuleSetProperty
- All Known Implementing Classes:
AGRDProperty, BTSProperty, DisconnectedProperty, DomainRestrictedProperty, FESProperty, FrontierGuardedProperty, FrontierOneProperty, FUSProperty, GBTSProperty, GuardedProperty, JointlyFrontierGuardedSetProperty, LinearProperty, MFAProperty, MSAProperty, RangeRestrictedProperty, RuleSetProperty.Default, RuleSetProperty.Local, StickyProperty, WeaklyAcyclicProperty, WeaklyFrontierGuardedSetProperty, WeaklyGuardedSetProperty, WeaklyStickyProperty
public interface RuleSetProperty
Basic interface for rule set properties.
To implement your own property, you should first check whether it
is a local property (meaning that the union of two rule sets
satisfying the property, satisfies the property), or not.
If it is, you should extend RuleSetProperty.Local, and override
the
int check(Rule) method.
Otherwise you should extend RuleSetProperty.Default and override
the int check(AnalyserRuleSet) method.
An instance of AnalyserRuleSet provides various data
structures used by others rule properties.
Then, you should also override the
getSpecialisations() and getGeneralisations
methods.
These allow the analyser to not check all rule properties if a
more specific one is already satisfied,
and to know if some abstract (i.e., unrecognizable) properties
are satisfied (usefull for the 'combine' step).
Also, the rule property hierarchy is only computed on the
selected properties. Therefore, you should specify all
generalisations (even the ones that can be deduced by the
transitive closure).
The various check methods must return 1 if the property is
satisfied, -1 if it is not, and 0 if you cannot tell.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classConvenience base implementation for non-local rule-set properties.static classAbstract class usefull for implementing local rule set properties. -
Method Summary
Modifier and TypeMethodDescriptionintcheck(AnalyserRuleSet ruleset) Check whether the given rule set satisfies the property or does not.Returns a human-readable description of this property.Returns the full human-readable name of this property.Returns the direct generalisations of this property.getLabel()This method must return a label not used by any other rule property or undefined behaviour is to be expected.Returns the direct specialisations of this property.
-
Method Details
-
check
Check whether the given rule set satisfies the property or does not.- Parameters:
ruleset- the rule set to evaluate- Returns:
- A negative value if the ruleset does not satisfy the property, a positive value if it does, and 0 if unknown.
-
getLabel
String getLabel()This method must return a label not used by any other rule property or undefined behaviour is to be expected.- Returns:
- the short property label
-
getFullName
String getFullName()Returns the full human-readable name of this property.- Returns:
- the full property name
-
getDescription
String getDescription()Returns a human-readable description of this property.- Returns:
- the property description
-
getSpecialisations
Iterable<RuleSetProperty> getSpecialisations()Returns the direct specialisations of this property.- Returns:
- the direct specialisations
-
getGeneralisations
Iterable<RuleSetProperty> getGeneralisations()Returns the direct generalisations of this property.- Returns:
- the direct generalisations
-