fuzzy_dl_owl2.fuzzydl.restriction.has_value_restriction
A fuzzy description logic restriction that enforces a specific individual value for a given role, represented internally as a negated existential quantification.
Description
Models a constraint within fuzzy description logics where a specific role is linked to a particular individual, qualified by a lower bound degree. By inheriting from a generic restriction base, the logic handles the unique requirement of associating a role with a concrete entity identifier rather than a broader concept. The representation of this constraint relies on a transformation into a negated existential quantification, which effectively asserts that the role must not have values other than the specified individual. This design enables the integration of crisp value restrictions into a fuzzy reasoning system by adhering to a specific string-based syntax required for further processing.
Classes
This class models a universal restriction that links a specific role to a particular individual, constrained by a lower bound degree. It is designed to represent logical constraints where a role must be associated with a specific entity, often within the context of fuzzy description logics. To use this class, instantiate it with a string representing the role name, a string for the individual name, and a Degree object that defines the lower bound. The class allows retrieval of the individual name via the get_individual method and offers a string representation of the restriction's logical structure—specifically a negated existential quantification—through the get_name_without_degree method. |
Module Contents
UML Class Diagram for HasValueRestriction
- class HasValueRestriction(role_name: str, individual: str, degree: fuzzy_dl_owl2.fuzzydl.degree.degree.Degree)[source]
Bases:
fuzzy_dl_owl2.fuzzydl.restriction.restriction.Restriction
This class models a universal restriction that links a specific role to a particular individual, constrained by a lower bound degree. It is designed to represent logical constraints where a role must be associated with a specific entity, often within the context of fuzzy description logics. To use this class, instantiate it with a string representing the role name, a string for the individual name, and a Degree object that defines the lower bound. The class allows retrieval of the individual name via the get_individual method and offers a string representation of the restriction’s logical structure—specifically a negated existential quantification—through the get_name_without_degree method.
- Parameters:
ind_name (str) – The name of the individual involved in the restriction.
- get_individual() str[source]
Returns the specific individual name associated with the restriction instance. This method acts as a getter for the internal ind_name attribute, providing access to the identifier of the entity being restricted. Since it simply returns the stored value, it does not modify the object’s state or have side effects, though the returned value depends entirely on how the instance was initialized or modified prior to this call.
- Returns:
The name of the individual.
- Return type:
str
- get_name_without_degree() str[source]
Generates a string representation of the restriction formatted as a negated existential assertion. It constructs this string using the instance’s role name and individual name to produce a logical expression equivalent to stating that the specified role does not have the specified individual as a value. The returned string follows the specific syntax ‘(not (b-some …))’, which is used to define the constraint in the underlying system.
- Returns:
Returns a string formatted as a negated ‘b-some’ expression involving the role and individual.
- Return type:
str
- ind_name: str