From 1e354aea7deb3a835138e85c160ae9ff31987422 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Thu, 28 Nov 2024 17:32:23 +0100 Subject: [PATCH 01/29] [Ontology] First version of ontology parser --- src/pycram/object_descriptors/urdf.py | 5 ++++- src/pycram/world_concepts/world_object.py | 1 - src/pycrap/__init__.py | 10 +++++----- src/pycrap/base.py | 6 +++++- src/pycrap/objects.py | 23 ++++++++++++++++++++++- src/pycrap/ontology.py | 14 ++++++++++++-- 6 files changed, 48 insertions(+), 11 deletions(-) diff --git a/src/pycram/object_descriptors/urdf.py b/src/pycram/object_descriptors/urdf.py index 694d421be..1dd741b84 100644 --- a/src/pycram/object_descriptors/urdf.py +++ b/src/pycram/object_descriptors/urdf.py @@ -21,15 +21,18 @@ SphereVisualShape, MeshVisualShape from ..failures import MultiplePossibleTipLinks from ..utils import suppress_stdout_stderr +from ..datastructures.mixins import HasConcept -class LinkDescription(AbstractLinkDescription): +class LinkDescription(AbstractLinkDescription, HasConcept): """ A class that represents a link description of an object. """ def __init__(self, urdf_description: urdf.Link): super().__init__(urdf_description) + # match the name of the link to the class in the ontology that this may be + @property def geometry(self) -> Union[VisualShape, None]: diff --git a/src/pycram/world_concepts/world_object.py b/src/pycram/world_concepts/world_object.py index 6be44c825..6a055cdec 100644 --- a/src/pycram/world_concepts/world_object.py +++ b/src/pycram/world_concepts/world_object.py @@ -104,7 +104,6 @@ def __init__(self, name: str, concept: Type[PhysicalObject], path: Optional[str] self.path = self.world.preprocess_object_file_and_get_its_cache_path(path, ignore_cached_files, self.description, self.name, scale_mesh=scale_mesh) - self.description.update_description_from_file(self.path) # if the object is an agent in the belief state diff --git a/src/pycrap/__init__.py b/src/pycrap/__init__.py index 3ced88bbf..5076344d3 100644 --- a/src/pycrap/__init__.py +++ b/src/pycrap/__init__.py @@ -1,5 +1,5 @@ -from .base import * -from .objects import * -from .agent import * -from .location import * -from .ontology import * \ No newline at end of file +# from .base import * +# from .objects import * +# from .agent import * +# from .location import * +# from .ontology import * \ No newline at end of file diff --git a/src/pycrap/base.py b/src/pycrap/base.py index 0c263f15d..134bccfa1 100644 --- a/src/pycrap/base.py +++ b/src/pycrap/base.py @@ -1,7 +1,7 @@ import tempfile import owlready2 -from owlready2 import Thing +from owlready2 import Thing, ObjectProperty default_pycrap_ontology_file = tempfile.NamedTemporaryFile() default_pycrap_ontology = owlready2.get_ontology("file://" + default_pycrap_ontology_file.name).load() @@ -15,6 +15,10 @@ def set_comment_to_docstring(cls): cls.comment = cls.__doc__ +class BaseProperty(ObjectProperty): + namespace = default_pycrap_ontology + + class PhysicalObject(Base): """ Any Object that has a proper space region. The prototypical physical object has also an associated mass, but the nature of its mass can greatly vary based on the epistemological status of the object (scientifically measured, subjectively possible, imaginary). diff --git a/src/pycrap/objects.py b/src/pycrap/objects.py index 614e525f5..f694c92f5 100644 --- a/src/pycrap/objects.py +++ b/src/pycrap/objects.py @@ -1,4 +1,5 @@ -from .base import PhysicalObject +from . import default_pycrap_ontology +from .base import PhysicalObject, Base, BaseProperty class Container(PhysicalObject): @@ -82,7 +83,27 @@ class Cereal(Food): A traditional breakfast dish made from processed cereal grains. """ + class Floor(PhysicalObject): """ The lower surface of a room. + """ + + +class Table(PhysicalObject): + """ + A table is an item of furniture with a flat top, used as a surface for working at, + eating from or on which to place things. + """ + + +class Board(PhysicalObject): + """ + A flat, thin, rectangular supporting piece. + """ + + +class has_part(BaseProperty, PhysicalObject >> PhysicalObject): + """ + A property that relates an object to a part of it. """ \ No newline at end of file diff --git a/src/pycrap/ontology.py b/src/pycrap/ontology.py index 2f3fcc05a..c75be7b91 100644 --- a/src/pycrap/ontology.py +++ b/src/pycrap/ontology.py @@ -1,7 +1,9 @@ import tempfile import owlready2 -from .base import default_pycrap_ontology +from typing_extensions import Dict, Any, Type + +from .base import default_pycrap_ontology, Base class Ontology: @@ -22,11 +24,16 @@ class Ontology: The file that the ontology is stored in. """ + python_objects: Dict[Base, Any] + """ + A dictionary that maps ontology individuals to python objects. + """ def __init__(self): self.file = tempfile.NamedTemporaryFile(delete=True) self.ontology = owlready2.get_ontology("file://" + self.path).load() self.ontology.name = "PyCRAP" + self.python_objects = {} @property def path(self) -> str: @@ -65,4 +72,7 @@ def reason(self): """ Reason over the ontology. This may take a long time. """ - owlready2.sync_reasoner([self.ontology, default_pycrap_ontology]) \ No newline at end of file + owlready2.sync_reasoner([self.ontology, default_pycrap_ontology]) + + def add_individual(self, individual :Base, python_object: Any): + self.python_objects[individual] = python_object From c7f850b67c82109197e509c5d00d5f6d8d672cc5 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Thu, 28 Nov 2024 17:35:14 +0100 Subject: [PATCH 02/29] [Ontology] First version of ontology parser --- src/pycrap/parser.py | 196 ++++++++++++++++++++++++++++ src/pycrap/urdf.py | 19 +++ test/test_pycrap/test_annotation.py | 28 ++++ test/test_pycrap/test_parser.py | 37 ++++++ 4 files changed, 280 insertions(+) create mode 100644 src/pycrap/parser.py create mode 100644 src/pycrap/urdf.py create mode 100644 test/test_pycrap/test_annotation.py create mode 100644 test/test_pycrap/test_parser.py diff --git a/src/pycrap/parser.py b/src/pycrap/parser.py new file mode 100644 index 000000000..245a5bd1f --- /dev/null +++ b/src/pycrap/parser.py @@ -0,0 +1,196 @@ +import collections + +import owlready2 +from owlready2.base import * +from owlready2.class_construct import Restriction, SOME, ONLY, VALUE, HAS_SELF, _restriction_type_2_label +import tqdm +from typing_extensions import List + + +class Parser: + """ + A class that parses all definitions from an ontology into python files that are owlready2 compatible. + + Not parsed are: + - Restrictions + - Inverse properties + - Functional properties + and perhaps something more. + """ + + ontology: owlready2.Ontology + """ + The ontology to parse. + """ + + file_name: str + """ + The file name to write the parsed ontology to. + """ + + indentation = 4 + """ + The indentation to use for the python file. + """ + + def __init__(self, ontology: owlready2.Ontology, file_name: str): + self.ontology = ontology + self.file_name = file_name + self.file = None + render_func_without_namespace = lambda entity: entity.name + owlready2.set_render_func(render_func_without_namespace) + + + def parse(self): + """ + Parses the ontology into a python file. + """ + self.file = open(self.file_name, "w") + self.create_imports() + self.create_namespace() + self.create_base_class() + self.create_base_property() + self.parse_classes() + self.parse_properties() + self.file.close() + + def create_imports(self): + self.file.write("from owlready2 import *\n\n") + + def create_namespace(self): + self.file.write(f"default_namespace = get_ontology('{self.ontology.base_iri}').load()\n\n") + + def create_base_class(self): + self.file.write("class Base(Thing):\n") + self.file.write(" namespace = default_namespace\n\n") + + def create_base_property(self): + self.file.write("class BaseProperty(ObjectProperty):\n") + self.file.write(" namespace = default_namespace\n\n") + + def classes_in_bfs(self): + visited = [] + all_classes = collections.deque(owlready2.Thing.subclasses()) + while all_classes: + cls = all_classes.popleft() + if cls in visited: + continue + all_classes.extend(cls.subclasses()) + yield cls + visited.append(cls) + + def properties_in_bfs(self): + visited = [] + all_properties = collections.deque(owlready2.ObjectProperty.subclasses()) + while all_properties: + prop = all_properties.popleft() + + if prop in visited: + continue + + all_properties.extend(prop.subclasses()) + yield prop + visited.append(prop) + + def apply_indent_to(self, string): + return " " * self.indentation + string.replace('\n', '\n' + ' ' * self.indentation) + + def get_docstring(self, cls): + """ + Get the docstring for a class. + """ + docstring = cls.comment + docstring = f"\n".join(docstring) + return (f'"""\n' + f'{docstring}\n' + f'"""\n') + + def parse_element(self, element): + """ + Parse an element from the `is_a` field of a class. + """ + return repr(element) + + def parse_elements(self, elements: List) -> str: + """ + Parse a list of elements from the `is_a` field of a class. + + :param elements: A list of elements to parse. + :return: A string representation of the elements. + """ + return ", ".join(self.parse_element(element) for element in elements) + + def write_docstring(self, cls): + # apply indent to docstring + docstring = self.get_docstring(cls) + docstring = self.apply_indent_to(docstring) + self.file.write(docstring) + + def write_equivalent_to(self, cls): + equivalent_to = self.parse_elements(cls.equivalent_to) + if equivalent_to: + equivalent_to = self.apply_indent_to("equivalent_to = [{equivalent_to}]") + self.file.write(equivalent_to) + self.file.write("\n") + + def write_is_a(self, cls): + is_a = self.parse_elements(cls.is_a) + is_a = self.apply_indent_to(f"is_a = [{is_a}]") + self.file.write(is_a) + self.file.write("\n") + + def parse_class(self, cls): + inherited_classes_sting = "Base" # , ".join(self.parse_element(parent) for parent in cls.is_a) + self.file.write(f"class {cls.name}({inherited_classes_sting}):\n") + self.write_docstring(cls) + self.file.write("\n") + is_a = self.parse_elements(cls.is_a) + is_a = f" is_a = [{is_a}] \n" + self.file.write(is_a) + self.write_equivalent_to(cls) + + def parse_classes(self): + """ + Parses all classes from the ontology. + """ + for cls in self.classes_in_bfs(): + self.parse_class(cls) + self.file.write("\n\n") + + def parse_property(self, prop): + self.file.write(f"class {prop.name}(Base):\n") + self.write_docstring(prop) + self.file.write("\n") + + domain_string = self.parse_elements(prop.domain) + if domain_string: + domain_string = self.apply_indent_to(f"domain = [{domain_string}]") + self.file.write(domain_string) + self.file.write("\n") + + range_string = self.parse_elements(prop.range) + if range_string: + range_string = self.apply_indent_to(f"range = [{range_string}]") + self.file.write(range_string) + self.file.write("\n") + + self.write_equivalent_to(prop) + self.write_is_a(prop) + + # check if an inverse property exists + if prop.inverse_property: + inverse_property = self.apply_indent_to(f"inverse_property = {self.parse_element(prop.inverse_property)}") + self.file.write(inverse_property) + self.file.write("\n") + + + def parse_properties(self): + """ + Parses all properties from the ontology. + + ..Note:: This does not check for transitively, etc. + + """ + for prop in self.properties_in_bfs(): + self.parse_property(prop) + self.file.write("\n") diff --git a/src/pycrap/urdf.py b/src/pycrap/urdf.py new file mode 100644 index 000000000..6dd977dbe --- /dev/null +++ b/src/pycrap/urdf.py @@ -0,0 +1,19 @@ +from .base import Base + + +class Link(Base): + """ + A link is a basic element of the URDF. + """ + + +class Joint(Base): + """ + A joint is an element of a URDF that connects two links. + """ + + +class FixedJoint(Joint): + """ + A fixed joint is a joint that does not allow any movement. + """ \ No newline at end of file diff --git a/test/test_pycrap/test_annotation.py b/test/test_pycrap/test_annotation.py new file mode 100644 index 000000000..01d3aa3ba --- /dev/null +++ b/test/test_pycrap/test_annotation.py @@ -0,0 +1,28 @@ +import unittest + +from pycram.testing import EmptyBulletWorldTestCase +from pycram.world_concepts.world_object import Object +from pycrap import Table, Ontology, Board, PhysicalObject, has_part + + +class TableConceptTestCase(unittest.TestCase): + + def setUp(self): + self.ontology = Ontology() + + def test_table_creation(self): + table_without_parts = Table() + table_with_parts = Table() + table_top = Board() + table_with_parts.has_part = [table_top] + result = list(self.ontology.search(is_a=Table, has_part=self.ontology.search(is_a=Board))) + self.assertEqual(len(result), 1) + + + + +class AnnotationTestCase(EmptyBulletWorldTestCase): + + def test_tagging_of_tables(self): + table = Object("table", Table, "table" + self.extension) + print(type(table.description)) diff --git a/test/test_pycrap/test_parser.py b/test/test_pycrap/test_parser.py new file mode 100644 index 000000000..e4a4c77fb --- /dev/null +++ b/test/test_pycrap/test_parser.py @@ -0,0 +1,37 @@ +import tempfile +import unittest + +from owlready2 import get_ontology +from pycrap.parser import Parser + + +class ParserTestCase(unittest.TestCase): + + @classmethod + def setUpClass(cls): + cls.onto = get_ontology("http://protege.stanford.edu/ontologies/pizza/pizza.owl").load() + # cls.onto = get_ontology("http://www.ease-crc.org/ont/SOMA.owl").load() + cls.namespace = cls.onto.get_namespace("http://www.co-ode.org/ontologies/pizza/pizza.owl#") + # cls.namespace.Pizza.comment = ["A pizza"] + # cls.namespace.hasTopping.comment = ["Swaggy topping"] + cls.file = tempfile.NamedTemporaryFile() + cls.parser = Parser(cls.onto, cls.file.name) + + + def test_parse_restriction(self): + concept = self.namespace.Pizza + + + def test_parsing(self): + self.parser.parse() + + with open(self.file.name, "r") as f: + print(f.read()) + + source = open(self.file.name).read() + "\n" + compile(source, tempfile.NamedTemporaryFile().name, 'exec') + + + +if __name__ == '__main__': + unittest.main() From 2a1a713d0321876d915d6254b4806fe12788e606 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Fri, 29 Nov 2024 12:32:27 +0100 Subject: [PATCH 03/29] [Ontology] Pre commit before different way of parsing --- src/pycrap/parser.py | 151 +++++++++++++++++++++----------- test/test_pycrap/test_parser.py | 17 ++-- 2 files changed, 112 insertions(+), 56 deletions(-) diff --git a/src/pycrap/parser.py b/src/pycrap/parser.py index 245a5bd1f..d320be994 100644 --- a/src/pycrap/parser.py +++ b/src/pycrap/parser.py @@ -1,6 +1,10 @@ import collections +import networkx +import networkx as nx import owlready2 +from graph_tool.topology import topological_sort +from owlready2 import ThingClass, Thing, ObjectProperty from owlready2.base import * from owlready2.class_construct import Restriction, SOME, ONLY, VALUE, HAS_SELF, _restriction_type_2_label import tqdm @@ -12,10 +16,8 @@ class Parser: A class that parses all definitions from an ontology into python files that are owlready2 compatible. Not parsed are: - - Restrictions - - Inverse properties - - Functional properties - and perhaps something more. + - Circular dependencies + """ ontology: owlready2.Ontology @@ -23,16 +25,32 @@ class Parser: The ontology to parse. """ - file_name: str + path: str + """ + The path to write the files of the parsed ontology into. + """ + + classes_file_name: str = "classes.py" + """ + The file name where all elements from ontology.classes() are written to. + """ + + properties_file_name: str = "properties.py" """ - The file name to write the parsed ontology to. + The file name where all elements from ontology.properties() are written to. """ + restrictions_file_name: str = "restrictions.py" + + individuals_file_name: str = "individuals.py" + indentation = 4 """ The indentation to use for the python file. """ + dependency_graph: nx.DiGraph + def __init__(self, ontology: owlready2.Ontology, file_name: str): self.ontology = ontology self.file_name = file_name @@ -40,18 +58,79 @@ def __init__(self, ontology: owlready2.Ontology, file_name: str): render_func_without_namespace = lambda entity: entity.name owlready2.set_render_func(render_func_without_namespace) + def create_dependency_graph(self): + """ + Create the dependency graph of the ontology. + """ + self.dependency_graph = nx.DiGraph() + for cls in self.ontology.classes(): + print(cls) + self.dependency_graph.add_node(cls) + for other in self.get_concepts_of_elements(cls.is_a): + self.dependency_graph.add_edge(other, cls) + for other in self.get_concepts_of_elements(cls.equivalent_to): + self.dependency_graph.add_edge(other, cls) + + # for prop in owlready2.ObjectProperty.subclasses(): + # self.dependency_graph.add_node(prop) + # for other in self.get_concepts_of_elements(prop.is_a): + # self.dependency_graph.add_edge(other, prop) + # for other in self.get_concepts_of_elements(prop.equivalent_to): + # self.dependency_graph.add_edge(other, prop) + # if prop.domain: + # for domain in self.get_concepts_of_elements(prop.domain): + # self.dependency_graph.add_edge(domain, prop) + # if prop.range: + # for range in self.get_concepts_of_elements(prop.range): + # self.dependency_graph.add_edge(range, prop) + # if prop.inverse_property: + # for inverse_property in self.get_concepts_of_element(prop.inverse_property): + # self.graph.add_edge(prop, inverse_property) + + def get_concepts_of_elements(self, elements: List) -> List: + return [e for element in elements for e in self.get_concepts_of_element(element)] + + def get_concepts_of_element(self, element) -> List: + if element is ThingClass: + return [] + elif isinstance(element, ThingClass): + return [element] + elif isinstance(element, Thing): + return [element] + elif element.__module__ == 'builtins': + return [element] + elif isinstance(element, owlready2.prop.DatatypeClass): + return [element] + elif isinstance(element, normstr): + return [element] + elif isinstance(element, owlready2.prop.PropertyClass) and not isinstance(element, ObjectProperty): + return [] + elif isinstance(element, owlready2.class_construct.And): + return self.get_concepts_of_elements(element.Classes) + elif isinstance(element, owlready2.class_construct.Or): + return self.get_concepts_of_elements(element.Classes) + elif isinstance(element, owlready2.class_construct.Restriction): + return self.get_concepts_of_element(element.value) + elif isinstance(element, owlready2.class_construct.Not): + return self.get_concepts_of_element(element.Class) + elif isinstance(element, owlready2.class_construct.OneOf): + return self.get_concepts_of_elements(element.instances) + elif element.__module__ == "owlready2.util": + return [] + else: + raise NotImplementedError(f"Cant get concepts of {element} with type {type(element)}") def parse(self): """ Parses the ontology into a python file. """ + self.create_dependency_graph() self.file = open(self.file_name, "w") self.create_imports() self.create_namespace() self.create_base_class() self.create_base_property() - self.parse_classes() - self.parse_properties() + self.create_nodes_and_properties() self.file.close() def create_imports(self): @@ -68,29 +147,21 @@ def create_base_property(self): self.file.write("class BaseProperty(ObjectProperty):\n") self.file.write(" namespace = default_namespace\n\n") - def classes_in_bfs(self): - visited = [] - all_classes = collections.deque(owlready2.Thing.subclasses()) - while all_classes: - cls = all_classes.popleft() - if cls in visited: - continue - all_classes.extend(cls.subclasses()) - yield cls - visited.append(cls) - def properties_in_bfs(self): - visited = [] - all_properties = collections.deque(owlready2.ObjectProperty.subclasses()) - while all_properties: - prop = all_properties.popleft() + def create_nodes_and_properties(self): - if prop in visited: + # start will all nodes that have no incoming edges + assert nx.is_directed_acyclic_graph(self.dependency_graph), "Only DAGs can be parsed for now." + for node in nx.topological_sort(self.dependency_graph): + if isinstance(node, owlready2.prop.ObjectPropertyClass): + self.parse_property(node) + elif isinstance(node, owlready2.ThingClass): + self.parse_class(node) + else: continue + raise NotImplementedError(f"Parsing of node {node} with type {type(node)} is not supported.") + self.file.write("\n\n") - all_properties.extend(prop.subclasses()) - yield prop - visited.append(prop) def apply_indent_to(self, string): return " " * self.indentation + string.replace('\n', '\n' + ' ' * self.indentation) @@ -129,7 +200,7 @@ def write_docstring(self, cls): def write_equivalent_to(self, cls): equivalent_to = self.parse_elements(cls.equivalent_to) if equivalent_to: - equivalent_to = self.apply_indent_to("equivalent_to = [{equivalent_to}]") + equivalent_to = self.apply_indent_to(f"equivalent_to = [{equivalent_to}]") self.file.write(equivalent_to) self.file.write("\n") @@ -144,19 +215,9 @@ def parse_class(self, cls): self.file.write(f"class {cls.name}({inherited_classes_sting}):\n") self.write_docstring(cls) self.file.write("\n") - is_a = self.parse_elements(cls.is_a) - is_a = f" is_a = [{is_a}] \n" - self.file.write(is_a) + self.write_is_a(cls) self.write_equivalent_to(cls) - def parse_classes(self): - """ - Parses all classes from the ontology. - """ - for cls in self.classes_in_bfs(): - self.parse_class(cls) - self.file.write("\n\n") - def parse_property(self, prop): self.file.write(f"class {prop.name}(Base):\n") self.write_docstring(prop) @@ -182,15 +243,3 @@ def parse_property(self, prop): inverse_property = self.apply_indent_to(f"inverse_property = {self.parse_element(prop.inverse_property)}") self.file.write(inverse_property) self.file.write("\n") - - - def parse_properties(self): - """ - Parses all properties from the ontology. - - ..Note:: This does not check for transitively, etc. - - """ - for prop in self.properties_in_bfs(): - self.parse_property(prop) - self.file.write("\n") diff --git a/test/test_pycrap/test_parser.py b/test/test_pycrap/test_parser.py index e4a4c77fb..d424fdb93 100644 --- a/test/test_pycrap/test_parser.py +++ b/test/test_pycrap/test_parser.py @@ -1,6 +1,9 @@ import tempfile import unittest +import networkx as nx +from matplotlib import pyplot as plt +from networkx.drawing.nx_agraph import graphviz_layout from owlready2 import get_ontology from pycrap.parser import Parser @@ -11,16 +14,20 @@ class ParserTestCase(unittest.TestCase): def setUpClass(cls): cls.onto = get_ontology("http://protege.stanford.edu/ontologies/pizza/pizza.owl").load() # cls.onto = get_ontology("http://www.ease-crc.org/ont/SOMA.owl").load() - cls.namespace = cls.onto.get_namespace("http://www.co-ode.org/ontologies/pizza/pizza.owl#") + # cls.namespace = cls.onto.get_namespace("http://www.co-ode.org/ontologies/pizza/pizza.owl#") # cls.namespace.Pizza.comment = ["A pizza"] # cls.namespace.hasTopping.comment = ["Swaggy topping"] cls.file = tempfile.NamedTemporaryFile() - cls.parser = Parser(cls.onto, cls.file.name) + cls.parser = Parser(cls.onto, "/home/tom_sch/.config/JetBrains/PyCharm2024.3/scratches/pizza.py")# cls.file.name) - def test_parse_restriction(self): - concept = self.namespace.Pizza - + def test_create_graph(self): + self.parser.create_dependency_graph() + pos = graphviz_layout(self.parser.dependency_graph) + nx.draw(self.parser.dependency_graph, with_labels=True, pos=pos) + plt.show() + print(nx.is_directed_acyclic_graph(self.parser.dependency_graph)) + print(*nx.simple_cycles(self.parser.dependency_graph)) def test_parsing(self): self.parser.parse() From 09eddc4f9c99c5adb053e70f603e8c3991b04324 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Fri, 29 Nov 2024 15:15:34 +0100 Subject: [PATCH 04/29] [Ontology] Upgraded parser to work with all things in an ontology. --- src/pycrap/parser.py | 332 ++++++++++++++++++-------------- test/test_pycrap/test_parser.py | 32 ++- 2 files changed, 203 insertions(+), 161 deletions(-) diff --git a/src/pycrap/parser.py b/src/pycrap/parser.py index d320be994..5ea6605d7 100644 --- a/src/pycrap/parser.py +++ b/src/pycrap/parser.py @@ -4,20 +4,18 @@ import networkx as nx import owlready2 from graph_tool.topology import topological_sort -from owlready2 import ThingClass, Thing, ObjectProperty +from owlready2 import ThingClass, Thing, ObjectProperty, PropertyClass from owlready2.base import * from owlready2.class_construct import Restriction, SOME, ONLY, VALUE, HAS_SELF, _restriction_type_2_label import tqdm -from typing_extensions import List +from typing_extensions import List, Any class Parser: """ A class that parses all definitions from an ontology into python files that are owlready2 compatible. - Not parsed are: - - Circular dependencies - + TODO: Labels metadata and SWRL is not parsed """ ontology: owlready2.Ontology @@ -30,138 +28,210 @@ class Parser: The path to write the files of the parsed ontology into. """ - classes_file_name: str = "classes.py" + base_file_name: str = "base" + """ + The file name where the base classes are written to. + """ + + classes_file_name: str = "classes" """ The file name where all elements from ontology.classes() are written to. """ - properties_file_name: str = "properties.py" + object_properties_file_name: str = "object_properties" """ The file name where all elements from ontology.properties() are written to. """ - restrictions_file_name: str = "restrictions.py" + data_properties_file_name: str = "data_properties" - individuals_file_name: str = "individuals.py" + restrictions_file_name: str = "restrictions" + + individuals_file_name: str = "individuals" + + file_extension: str = ".py" indentation = 4 """ The indentation to use for the python file. """ - dependency_graph: nx.DiGraph + current_file: Any - def __init__(self, ontology: owlready2.Ontology, file_name: str): + def __init__(self, ontology: owlready2.Ontology, path: str): self.ontology = ontology - self.file_name = file_name - self.file = None + self.path = path render_func_without_namespace = lambda entity: entity.name owlready2.set_render_func(render_func_without_namespace) - def create_dependency_graph(self): - """ - Create the dependency graph of the ontology. - """ - self.dependency_graph = nx.DiGraph() - for cls in self.ontology.classes(): - print(cls) - self.dependency_graph.add_node(cls) - for other in self.get_concepts_of_elements(cls.is_a): - self.dependency_graph.add_edge(other, cls) - for other in self.get_concepts_of_elements(cls.equivalent_to): - self.dependency_graph.add_edge(other, cls) - - # for prop in owlready2.ObjectProperty.subclasses(): - # self.dependency_graph.add_node(prop) - # for other in self.get_concepts_of_elements(prop.is_a): - # self.dependency_graph.add_edge(other, prop) - # for other in self.get_concepts_of_elements(prop.equivalent_to): - # self.dependency_graph.add_edge(other, prop) - # if prop.domain: - # for domain in self.get_concepts_of_elements(prop.domain): - # self.dependency_graph.add_edge(domain, prop) - # if prop.range: - # for range in self.get_concepts_of_elements(prop.range): - # self.dependency_graph.add_edge(range, prop) - # if prop.inverse_property: - # for inverse_property in self.get_concepts_of_element(prop.inverse_property): - # self.graph.add_edge(prop, inverse_property) - - def get_concepts_of_elements(self, elements: List) -> List: - return [e for element in elements for e in self.get_concepts_of_element(element)] - - def get_concepts_of_element(self, element) -> List: - if element is ThingClass: - return [] - elif isinstance(element, ThingClass): - return [element] - elif isinstance(element, Thing): - return [element] - elif element.__module__ == 'builtins': - return [element] - elif isinstance(element, owlready2.prop.DatatypeClass): - return [element] - elif isinstance(element, normstr): - return [element] - elif isinstance(element, owlready2.prop.PropertyClass) and not isinstance(element, ObjectProperty): - return [] - elif isinstance(element, owlready2.class_construct.And): - return self.get_concepts_of_elements(element.Classes) - elif isinstance(element, owlready2.class_construct.Or): - return self.get_concepts_of_elements(element.Classes) - elif isinstance(element, owlready2.class_construct.Restriction): - return self.get_concepts_of_element(element.value) - elif isinstance(element, owlready2.class_construct.Not): - return self.get_concepts_of_element(element.Class) - elif isinstance(element, owlready2.class_construct.OneOf): - return self.get_concepts_of_elements(element.instances) - elif element.__module__ == "owlready2.util": - return [] - else: - raise NotImplementedError(f"Cant get concepts of {element} with type {type(element)}") def parse(self): """ Parses the ontology into a python file. """ - self.create_dependency_graph() - self.file = open(self.file_name, "w") - self.create_imports() - self.create_namespace() + self.create_base() + self.create_classes() + self.create_object_properties() + self.create_data_properties() + self.create_individuals() + self.create_restrictions() + # create swrl rules + self.create_init() + + def create_init(self): + self.current_file = open(f"{os.path.join(self.path, '__init__')}{self.file_extension}", "w") + self.create_import_from_classes() + self.create_import_from_properties() + self.import_individuals() + self.current_file.close() + + def create_base(self): + self.current_file = open(f"{os.path.join(self.path, self.base_file_name)}{self.file_extension}", "w") + self.create_base_imports() + self.current_file.write("\n" * 2) + self.current_file.write("ontology_file = tempfile.NamedTemporaryFile()\n") + self.current_file.write('ontology = owlready2.get_ontology("file://" + ontology_file.name).load()\n') + self.current_file.write("\n" * 2) self.create_base_class() self.create_base_property() - self.create_nodes_and_properties() - self.file.close() + self.current_file.close() + + def create_classes(self): + self.current_file = open(f"{os.path.join(self.path, self.classes_file_name)}{self.file_extension}", "w") + self.create_import_from_base() + self.current_file.write("\n" * 2) + classes = list(self.ontology.classes()) + for cls in tqdm.tqdm(classes, desc="Parsing classes"): + self.parse_class(cls) + self.current_file.close() + + def create_object_properties(self): + self.current_file = open(f"{os.path.join(self.path, self.object_properties_file_name)}{self.file_extension}", "w") + self.create_import_from_base() + self.current_file.write("\n" * 2) + properties = list(self.ontology.object_properties()) + for prop in tqdm.tqdm(properties, desc="Parsing object properties"): + self.parse_property(prop) + self.current_file.close() + + def create_data_properties(self): + self.current_file = open(f"{os.path.join(self.path, self.data_properties_file_name)}{self.file_extension}", "w") + self.create_import_from_base() + self.create_import_from_classes() + self.current_file.write("\n" * 2) + properties = list(self.ontology.data_properties()) + for prop in tqdm.tqdm(properties, desc="Parsing data properties"): + self.parse_property(prop) + self.current_file.close() + + def create_restrictions(self): + self.current_file = open(f"{os.path.join(self.path, self.restrictions_file_name)}{self.file_extension}", "w") + self.create_import_from_classes() + self.import_individuals() + self.current_file.write("\n" * 2) + + elements = list(self.ontology.classes()) + list(self.ontology.properties()) + + for element in tqdm.tqdm(elements, desc="Parsing restrictions"): + self.parse_restrictions_for(element) + self.current_file.write("\n") + self.current_file.close() + + def parse_restrictions_for(self, element): + if isinstance(element, ThingClass): + self.parse_restrictions_for_class(element) + elif isinstance(element, PropertyClass): + self.parse_restrictions_for_property(element) + + def parse_restrictions_for_class(self, cls: ThingClass): + # write is_a restrictions + is_a = self.parse_elements(cls.is_a) + if is_a: + is_a = f"{repr(cls)}.is_a = [{is_a}]" + self.current_file.write(is_a) + self.current_file.write("\n") - def create_imports(self): - self.file.write("from owlready2 import *\n\n") + # write equivalent_to restrictions + self.write_equivalent_to(cls) - def create_namespace(self): - self.file.write(f"default_namespace = get_ontology('{self.ontology.base_iri}').load()\n\n") + def import_individuals(self): + self.current_file.write("from .individuals import *\n") - def create_base_class(self): - self.file.write("class Base(Thing):\n") - self.file.write(" namespace = default_namespace\n\n") + def parse_restrictions_for_property(self, prop): + #write is_a restrictions + is_a = self.parse_elements(prop.is_a) + if is_a: + is_a = f"{repr(prop)}.is_a = [{is_a}]" + self.current_file.write(is_a) + self.current_file.write("\n") - def create_base_property(self): - self.file.write("class BaseProperty(ObjectProperty):\n") - self.file.write(" namespace = default_namespace\n\n") + # write domain restrictions + domain_string = self.parse_elements(prop.domain) + if domain_string: + domain_string = f"{repr(prop)}.domain = [{domain_string}]" + self.current_file.write(domain_string) + self.current_file.write("\n") + # write range restrictions + range_string = self.parse_elements(prop.range) + if range_string: + range_string = f"{repr(prop)}.range = [{range_string}]" + self.current_file.write(range_string) + self.current_file.write("\n") + + def create_individuals(self): + self.current_file = open(f"{os.path.join(self.path, self.individuals_file_name)}{self.file_extension}", "w") + self.create_import_from_base() + self.create_import_from_classes() + self.create_import_from_properties() + self.current_file.write("\n" * 2) + + individuals = list(self.ontology.individuals()) + for individual in tqdm.tqdm(individuals, desc="Parsing individuals"): + self.parse_individual(individual) + self.current_file.write("\n") + for individual in tqdm.tqdm(individuals, desc="Parsing individuals"): + self.parse_individual_properties(individual) + if individual.get_properties(): + self.current_file.write("\n") + self.current_file.close() + + def parse_individual(self, individual: owlready2.Thing): + self.current_file.write(f"{individual.name} = {repr(individual.__class__)}(namespace = ontology)") + self.current_file.write("\n") + + def parse_individual_properties(self, individual: owlready2.Thing): + for prop in individual.get_properties(): + self.current_file.write(f"{individual.name}.{repr(prop)} = {individual.__getattr__(repr(prop))}") + self.current_file.write("\n") + + + def create_base_imports(self): + self.current_file.write("from owlready2 import *\n") + self.current_file.write("import tempfile\n") + + def create_import_from_base(self): + self.current_file.write("from .base import *\n") + + def create_import_from_classes(self): + self.current_file.write("from .classes import *\n") + + def create_import_from_properties(self): + self.current_file.write("from .object_properties import *\n") + self.current_file.write("from .data_properties import *\n") - def create_nodes_and_properties(self): + def create_namespace(self): + self.current_file.write(f"ontology = get_ontology('{self.ontology.base_iri}').load()\n\n") - # start will all nodes that have no incoming edges - assert nx.is_directed_acyclic_graph(self.dependency_graph), "Only DAGs can be parsed for now." - for node in nx.topological_sort(self.dependency_graph): - if isinstance(node, owlready2.prop.ObjectPropertyClass): - self.parse_property(node) - elif isinstance(node, owlready2.ThingClass): - self.parse_class(node) - else: - continue - raise NotImplementedError(f"Parsing of node {node} with type {type(node)} is not supported.") - self.file.write("\n\n") + def create_base_class(self): + self.current_file.write("class Base(Thing):\n") + self.current_file.write(self.apply_indent_to("namespace = ontology")) + self.current_file.write("\n" * 3) + def create_base_property(self): + self.current_file.write("class BaseProperty(ObjectProperty):\n") + self.current_file.write(self.apply_indent_to("namespace = ontology")) + self.current_file.write("\n" * 3) def apply_indent_to(self, string): return " " * self.indentation + string.replace('\n', '\n' + ' ' * self.indentation) @@ -171,10 +241,13 @@ def get_docstring(self, cls): Get the docstring for a class. """ docstring = cls.comment - docstring = f"\n".join(docstring) - return (f'"""\n' - f'{docstring}\n' - f'"""\n') + if docstring: + docstring = f"\n".join(docstring) + return (f'"""\n' + f'{docstring}\n' + f'"""\n') + else: + return "...\n" def parse_element(self, element): """ @@ -195,51 +268,28 @@ def write_docstring(self, cls): # apply indent to docstring docstring = self.get_docstring(cls) docstring = self.apply_indent_to(docstring) - self.file.write(docstring) + self.current_file.write(docstring) def write_equivalent_to(self, cls): equivalent_to = self.parse_elements(cls.equivalent_to) if equivalent_to: - equivalent_to = self.apply_indent_to(f"equivalent_to = [{equivalent_to}]") - self.file.write(equivalent_to) - self.file.write("\n") + equivalent_to = f"{repr(cls)}.equivalent_to = [{equivalent_to}]" + self.current_file.write(equivalent_to) + self.current_file.write("\n") def write_is_a(self, cls): is_a = self.parse_elements(cls.is_a) - is_a = self.apply_indent_to(f"is_a = [{is_a}]") - self.file.write(is_a) - self.file.write("\n") + is_a = f"{repr(cls)}is_a = [{is_a}]" + self.current_file.write(is_a) + self.current_file.write("\n") def parse_class(self, cls): - inherited_classes_sting = "Base" # , ".join(self.parse_element(parent) for parent in cls.is_a) - self.file.write(f"class {cls.name}({inherited_classes_sting}):\n") + inherited_classes_sting = "Base" + self.current_file.write(f"class {cls.name}({inherited_classes_sting}):\n") self.write_docstring(cls) - self.file.write("\n") - self.write_is_a(cls) - self.write_equivalent_to(cls) + self.current_file.write("\n\n") def parse_property(self, prop): - self.file.write(f"class {prop.name}(Base):\n") + self.current_file.write(f"class {prop.name}(Base):\n") self.write_docstring(prop) - self.file.write("\n") - - domain_string = self.parse_elements(prop.domain) - if domain_string: - domain_string = self.apply_indent_to(f"domain = [{domain_string}]") - self.file.write(domain_string) - self.file.write("\n") - - range_string = self.parse_elements(prop.range) - if range_string: - range_string = self.apply_indent_to(f"range = [{range_string}]") - self.file.write(range_string) - self.file.write("\n") - - self.write_equivalent_to(prop) - self.write_is_a(prop) - - # check if an inverse property exists - if prop.inverse_property: - inverse_property = self.apply_indent_to(f"inverse_property = {self.parse_element(prop.inverse_property)}") - self.file.write(inverse_property) - self.file.write("\n") + self.current_file.write("\n") diff --git a/test/test_pycrap/test_parser.py b/test/test_pycrap/test_parser.py index d424fdb93..b9ce6e3d9 100644 --- a/test/test_pycrap/test_parser.py +++ b/test/test_pycrap/test_parser.py @@ -1,9 +1,7 @@ import tempfile import unittest -import networkx as nx -from matplotlib import pyplot as plt -from networkx.drawing.nx_agraph import graphviz_layout +import os from owlready2 import get_ontology from pycrap.parser import Parser @@ -12,31 +10,25 @@ class ParserTestCase(unittest.TestCase): @classmethod def setUpClass(cls): + # cls.onto = get_ontology("https://raw.githubusercontent.com/sorinar329/CuttingFood/refs/heads/main/owl/food_cutting.owl").load() cls.onto = get_ontology("http://protege.stanford.edu/ontologies/pizza/pizza.owl").load() # cls.onto = get_ontology("http://www.ease-crc.org/ont/SOMA.owl").load() - # cls.namespace = cls.onto.get_namespace("http://www.co-ode.org/ontologies/pizza/pizza.owl#") - # cls.namespace.Pizza.comment = ["A pizza"] - # cls.namespace.hasTopping.comment = ["Swaggy topping"] - cls.file = tempfile.NamedTemporaryFile() - cls.parser = Parser(cls.onto, "/home/tom_sch/.config/JetBrains/PyCharm2024.3/scratches/pizza.py")# cls.file.name) + # + # pizza = cls.onto.get_namespace("http://www.co-ode.org/ontologies/pizza/pizza.owl#") + # my_pizza = pizza.Pizza() + # my_pizza.hasTopping = [pizza.CheeseTopping()] + cls.directory = tempfile.mkdtemp() + cls.parser = Parser(cls.onto, cls.directory) - def test_create_graph(self): - self.parser.create_dependency_graph() - pos = graphviz_layout(self.parser.dependency_graph) - nx.draw(self.parser.dependency_graph, with_labels=True, pos=pos) - plt.show() - print(nx.is_directed_acyclic_graph(self.parser.dependency_graph)) - print(*nx.simple_cycles(self.parser.dependency_graph)) def test_parsing(self): self.parser.parse() + for file in os.listdir(self.directory): + if file.endswith(".py"): + with open(os.path.join(self.parser.path, file)) as f: + compile(f.read(), os.path.join(self.parser.path, file), 'exec') - with open(self.file.name, "r") as f: - print(f.read()) - - source = open(self.file.name).read() + "\n" - compile(source, tempfile.NamedTemporaryFile().name, 'exec') From 5fc8b0c26e88a1f9d6f4c9b97bd9ff744db7671f Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Fri, 29 Nov 2024 16:19:22 +0100 Subject: [PATCH 05/29] [Ontology] Updated ontology doc --- examples/ontology.md | 7 +++++++ src/pycrap/ontologies/__init__.py | 0 2 files changed, 7 insertions(+) create mode 100644 src/pycrap/ontologies/__init__.py diff --git a/examples/ontology.md b/examples/ontology.md index a4f0c502a..85c03fb68 100644 --- a/examples/ontology.md +++ b/examples/ontology.md @@ -25,6 +25,13 @@ Furthermore, this architecture allows the users to directly see what's in the on switching to tools like [Protégé](https://protege.stanford.edu/). The linter and AI assistants like Copilot can also deal with this notation and guide the users without annoyances. +PyCRAP contains a subpackage with ontologies. +Every package in the ontologies subpackage is a separate ontology. +The classes, properties, and so on can just be included via the import statement. + +PyCRAP also comes with a parser to reflect any ontology that can be loaded with owlready2 in python files. +This is very similar to the [code generation tool of sqlalchemy](https://github.com/agronholm/sqlacodegen). + Note that this area is under construction and may frequently change. ## Usage diff --git a/src/pycrap/ontologies/__init__.py b/src/pycrap/ontologies/__init__.py new file mode 100644 index 000000000..e69de29bb From 28c39787a7a2643e581df9e242a29481923a55de Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Fri, 29 Nov 2024 16:36:17 +0100 Subject: [PATCH 06/29] [Ontology] Documented parser.py --- src/pycrap/parser.py | 150 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 128 insertions(+), 22 deletions(-) diff --git a/src/pycrap/parser.py b/src/pycrap/parser.py index 5ea6605d7..cb9156a34 100644 --- a/src/pycrap/parser.py +++ b/src/pycrap/parser.py @@ -13,7 +13,17 @@ class Parser: """ - A class that parses all definitions from an ontology into python files that are owlready2 compatible. + A class that parses all everything from an ontology into python files that are owlready2 compatible. + + It will create several files in a directory specified by the constructor: + - base: A file that contains an intermediate based class and temporary ontology definitions such that a user + can configure it at the end of the process. + - classes: A file that contains all classes from the ontology without any restrictions. + - object_properties: A file the contains all object properties from the ontology without any restrictions. + - data_properties: A file the contains all data properties from the ontology without any restrictions. + - restrictions: The restrictions for all classes and properties. + - individuals: All indivduals with the resepctive properties from the ontology. + - __init__.py: A package initialization that loads the content of all files. TODO: Labels metadata and SWRL is not parsed """ @@ -57,6 +67,9 @@ class Parser: """ current_file: Any + """ + The current file where definitions are written into. + """ def __init__(self, ontology: owlready2.Ontology, path: str): self.ontology = ontology @@ -79,13 +92,19 @@ def parse(self): self.create_init() def create_init(self): + """ + Create the __init__.py + """ self.current_file = open(f"{os.path.join(self.path, '__init__')}{self.file_extension}", "w") - self.create_import_from_classes() - self.create_import_from_properties() + self.import_from_classes() + self.import_from_properties() self.import_individuals() self.current_file.close() def create_base(self): + """ + Create the base.py + """ self.current_file = open(f"{os.path.join(self.path, self.base_file_name)}{self.file_extension}", "w") self.create_base_imports() self.current_file.write("\n" * 2) @@ -97,8 +116,11 @@ def create_base(self): self.current_file.close() def create_classes(self): + """ + Create the classes.py + """ self.current_file = open(f"{os.path.join(self.path, self.classes_file_name)}{self.file_extension}", "w") - self.create_import_from_base() + self.import_from_base() self.current_file.write("\n" * 2) classes = list(self.ontology.classes()) for cls in tqdm.tqdm(classes, desc="Parsing classes"): @@ -106,8 +128,11 @@ def create_classes(self): self.current_file.close() def create_object_properties(self): + """ + Create the object_properties.py + """ self.current_file = open(f"{os.path.join(self.path, self.object_properties_file_name)}{self.file_extension}", "w") - self.create_import_from_base() + self.import_from_base() self.current_file.write("\n" * 2) properties = list(self.ontology.object_properties()) for prop in tqdm.tqdm(properties, desc="Parsing object properties"): @@ -115,9 +140,12 @@ def create_object_properties(self): self.current_file.close() def create_data_properties(self): + """ + Create the data_properties.py + """ self.current_file = open(f"{os.path.join(self.path, self.data_properties_file_name)}{self.file_extension}", "w") - self.create_import_from_base() - self.create_import_from_classes() + self.import_from_base() + self.import_from_classes() self.current_file.write("\n" * 2) properties = list(self.ontology.data_properties()) for prop in tqdm.tqdm(properties, desc="Parsing data properties"): @@ -125,8 +153,11 @@ def create_data_properties(self): self.current_file.close() def create_restrictions(self): + """ + Create the restrictions.py + """ self.current_file = open(f"{os.path.join(self.path, self.restrictions_file_name)}{self.file_extension}", "w") - self.create_import_from_classes() + self.import_from_classes() self.import_individuals() self.current_file.write("\n" * 2) @@ -138,12 +169,20 @@ def create_restrictions(self): self.current_file.close() def parse_restrictions_for(self, element): + """ + Create all restriction for any element of the ontology. + """ if isinstance(element, ThingClass): self.parse_restrictions_for_class(element) elif isinstance(element, PropertyClass): self.parse_restrictions_for_property(element) def parse_restrictions_for_class(self, cls: ThingClass): + """ + Create the restrictions for a class. + + :param cls: The class + """ # write is_a restrictions is_a = self.parse_elements(cls.is_a) if is_a: @@ -155,9 +194,16 @@ def parse_restrictions_for_class(self, cls: ThingClass): self.write_equivalent_to(cls) def import_individuals(self): + """ + Write the import statement that imports individuals. + """ self.current_file.write("from .individuals import *\n") def parse_restrictions_for_property(self, prop): + """ + Write all restrictions for a property. + :param prop: The property + """ #write is_a restrictions is_a = self.parse_elements(prop.is_a) if is_a: @@ -180,10 +226,13 @@ def parse_restrictions_for_property(self, prop): self.current_file.write("\n") def create_individuals(self): + """ + Create all individuals of the ontology. + """ self.current_file = open(f"{os.path.join(self.path, self.individuals_file_name)}{self.file_extension}", "w") - self.create_import_from_base() - self.create_import_from_classes() - self.create_import_from_properties() + self.import_from_base() + self.import_from_classes() + self.import_from_properties() self.current_file.write("\n" * 2) individuals = list(self.ontology.individuals()) @@ -197,48 +246,80 @@ def create_individuals(self): self.current_file.close() def parse_individual(self, individual: owlready2.Thing): + """ + Parse the construction of an individual. + :param individual: The individual. + """ self.current_file.write(f"{individual.name} = {repr(individual.__class__)}(namespace = ontology)") self.current_file.write("\n") def parse_individual_properties(self, individual: owlready2.Thing): + """ + Parse the properties of an individual. + :param individual: The individual. + """ for prop in individual.get_properties(): self.current_file.write(f"{individual.name}.{repr(prop)} = {individual.__getattr__(repr(prop))}") self.current_file.write("\n") def create_base_imports(self): + """ + Create the imports for the base.py + """ self.current_file.write("from owlready2 import *\n") self.current_file.write("import tempfile\n") - def create_import_from_base(self): + def import_from_base(self): + """ + Create the import statement to get everything from the base.py + """ self.current_file.write("from .base import *\n") - def create_import_from_classes(self): + def import_from_classes(self): + """ + Create the import statement to get everything from the classes.py + """ self.current_file.write("from .classes import *\n") - def create_import_from_properties(self): + def import_from_properties(self): + """ + Create the import statement to get everything from the properties + """ self.current_file.write("from .object_properties import *\n") self.current_file.write("from .data_properties import *\n") - def create_namespace(self): - self.current_file.write(f"ontology = get_ontology('{self.ontology.base_iri}').load()\n\n") - def create_base_class(self): + """ + Create the base class for concepts. + """ self.current_file.write("class Base(Thing):\n") self.current_file.write(self.apply_indent_to("namespace = ontology")) self.current_file.write("\n" * 3) def create_base_property(self): + """ + Create the base class for properties. + """ self.current_file.write("class BaseProperty(ObjectProperty):\n") self.current_file.write(self.apply_indent_to("namespace = ontology")) self.current_file.write("\n" * 3) def apply_indent_to(self, string): + """ + Indent a statement at the beginning of every new line. + + :param string: The statement. + :return: The indented string. + """ return " " * self.indentation + string.replace('\n', '\n' + ' ' * self.indentation) - def get_docstring(self, cls): + def get_docstring(self, cls) -> str: """ Get the docstring for a class. + + :param cls: The class + :return: The docstring for the class or "..." if no docstring is found. """ docstring = cls.comment if docstring: @@ -249,15 +330,19 @@ def get_docstring(self, cls): else: return "...\n" - def parse_element(self, element): + def parse_element(self, element) -> str: """ - Parse an element from the `is_a` field of a class. + Parse an element for representation the source code. + + :param element: The element to parse. + :return: A string representation that can be used in python files. """ return repr(element) def parse_elements(self, elements: List) -> str: """ - Parse a list of elements from the `is_a` field of a class. + Parse a list of elements from for the representation in the source code. + An input can be, for instance, the is_a` field of a class. :param elements: A list of elements to parse. :return: A string representation of the elements. @@ -265,12 +350,21 @@ def parse_elements(self, elements: List) -> str: return ", ".join(self.parse_element(element) for element in elements) def write_docstring(self, cls): + """ + Write the docstring of a class to the current file. + :param cls: The class. + """ # apply indent to docstring docstring = self.get_docstring(cls) docstring = self.apply_indent_to(docstring) self.current_file.write(docstring) def write_equivalent_to(self, cls): + """ + Write the `equivalent_to` field of a class + + :param cls: The class. + """ equivalent_to = self.parse_elements(cls.equivalent_to) if equivalent_to: equivalent_to = f"{repr(cls)}.equivalent_to = [{equivalent_to}]" @@ -278,18 +372,30 @@ def write_equivalent_to(self, cls): self.current_file.write("\n") def write_is_a(self, cls): + """ + Write the `is_a` field of a class + :param cls: The class. + """ is_a = self.parse_elements(cls.is_a) is_a = f"{repr(cls)}is_a = [{is_a}]" self.current_file.write(is_a) self.current_file.write("\n") def parse_class(self, cls): + """ + Parse a class without restrictions. + :param cls: The class. + """ inherited_classes_sting = "Base" self.current_file.write(f"class {cls.name}({inherited_classes_sting}):\n") self.write_docstring(cls) self.current_file.write("\n\n") def parse_property(self, prop): - self.current_file.write(f"class {prop.name}(Base):\n") + """ + Parse a property without restrictions. + :param prop: The property. + """ + self.current_file.write(f"class {prop.name}(BaseProperty):\n") self.write_docstring(prop) self.current_file.write("\n") From a3c6eb50376efa1d4f0c8922a825ec5d44f125f3 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Tue, 3 Dec 2024 11:14:29 +0100 Subject: [PATCH 07/29] [Ontology] Refactored parser.py --- src/pycrap/parser.py | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/pycrap/parser.py b/src/pycrap/parser.py index cb9156a34..30b0070ab 100644 --- a/src/pycrap/parser.py +++ b/src/pycrap/parser.py @@ -95,7 +95,7 @@ def create_init(self): """ Create the __init__.py """ - self.current_file = open(f"{os.path.join(self.path, '__init__')}{self.file_extension}", "w") + self.current_file = open(self.path_for_file("__init__"), "w") self.import_from_classes() self.import_from_properties() self.import_individuals() @@ -105,7 +105,7 @@ def create_base(self): """ Create the base.py """ - self.current_file = open(f"{os.path.join(self.path, self.base_file_name)}{self.file_extension}", "w") + self.current_file = open(self.path_for_file(self.base_file_name), "w") self.create_base_imports() self.current_file.write("\n" * 2) self.current_file.write("ontology_file = tempfile.NamedTemporaryFile()\n") @@ -115,11 +115,25 @@ def create_base(self): self.create_base_property() self.current_file.close() + def path_for_file(self, file_name): + """ + Generate the path for a file. + + Example: + >>> parser = Parser(ontology, "/tmp") + >>> parser.path_for_file("base") + "/tmp/base.py" + + :param file_name: The file name. + :return: The path to the file. + """ + return f"{os.path.join(self.path, file_name)}{self.file_extension}" + def create_classes(self): """ Create the classes.py """ - self.current_file = open(f"{os.path.join(self.path, self.classes_file_name)}{self.file_extension}", "w") + self.current_file = open(self.path_for_file(self.classes_file_name), "w") self.import_from_base() self.current_file.write("\n" * 2) classes = list(self.ontology.classes()) @@ -131,7 +145,7 @@ def create_object_properties(self): """ Create the object_properties.py """ - self.current_file = open(f"{os.path.join(self.path, self.object_properties_file_name)}{self.file_extension}", "w") + self.current_file = open(self.path_for_file(self.object_properties_file_name), "w") self.import_from_base() self.current_file.write("\n" * 2) properties = list(self.ontology.object_properties()) @@ -143,7 +157,7 @@ def create_data_properties(self): """ Create the data_properties.py """ - self.current_file = open(f"{os.path.join(self.path, self.data_properties_file_name)}{self.file_extension}", "w") + self.current_file = open(self.path_for_file(self.data_properties_file_name), "w") self.import_from_base() self.import_from_classes() self.current_file.write("\n" * 2) @@ -156,7 +170,7 @@ def create_restrictions(self): """ Create the restrictions.py """ - self.current_file = open(f"{os.path.join(self.path, self.restrictions_file_name)}{self.file_extension}", "w") + self.current_file = open(self.path_for_file(self.restrictions_file_name), "w") self.import_from_classes() self.import_individuals() self.current_file.write("\n" * 2) From d337ed70c171a94882fc53b2d51391f928687e93 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Tue, 3 Dec 2024 16:38:31 +0100 Subject: [PATCH 08/29] [Ontology] Started to work on parser for multiple ontologies. --- src/pycrap/parser.py | 107 ++++++++++++++++++++++++++++---- test/test_pycrap/test_parser.py | 31 +++++++-- 2 files changed, 120 insertions(+), 18 deletions(-) diff --git a/src/pycrap/parser.py b/src/pycrap/parser.py index 30b0070ab..cd187f73c 100644 --- a/src/pycrap/parser.py +++ b/src/pycrap/parser.py @@ -1,19 +1,35 @@ -import collections +from os import mkdir -import networkx import networkx as nx import owlready2 -from graph_tool.topology import topological_sort -from owlready2 import ThingClass, Thing, ObjectProperty, PropertyClass -from owlready2.base import * -from owlready2.class_construct import Restriction, SOME, ONLY, VALUE, HAS_SELF, _restriction_type_2_label import tqdm +from owlready2 import ThingClass, PropertyClass +from owlready2.base import * from typing_extensions import List, Any -class Parser: +def to_snake_case(string: str) -> str: + """ + Convert a string to snake case. + + :param string: The string to convert. + :return: The string in snake case. + """ + return string.replace(" ", "_").lower() + +def to_camel_case(string: str) -> str: + """ + Convert a string to camel case. + + :param string: The string to convert. + :return: The string in camel case. + """ + return ''.join(x for x in string.title() if not x.isspace()) + +class OntologyParser: """ - A class that parses all everything from an ontology into python files that are owlready2 compatible. + A class that parses everything from an owlready2 compatible ontology into python files that + represent the same ontology. It will create several files in a directory specified by the constructor: - base: A file that contains an intermediate based class and temporary ontology definitions such that a user @@ -77,7 +93,6 @@ def __init__(self, ontology: owlready2.Ontology, path: str): render_func_without_namespace = lambda entity: entity.name owlready2.set_render_func(render_func_without_namespace) - def parse(self): """ Parses the ontology into a python file. @@ -120,7 +135,7 @@ def path_for_file(self, file_name): Generate the path for a file. Example: - >>> parser = Parser(ontology, "/tmp") + >>> parser = OntologyParser(ontology, "/tmp") >>> parser.path_for_file("base") "/tmp/base.py" @@ -218,7 +233,7 @@ def parse_restrictions_for_property(self, prop): Write all restrictions for a property. :param prop: The property """ - #write is_a restrictions + # write is_a restrictions is_a = self.parse_elements(prop.is_a) if is_a: is_a = f"{repr(prop)}.is_a = [{is_a}]" @@ -276,7 +291,6 @@ def parse_individual_properties(self, individual: owlready2.Thing): self.current_file.write(f"{individual.name}.{repr(prop)} = {individual.__getattr__(repr(prop))}") self.current_file.write("\n") - def create_base_imports(self): """ Create the imports for the base.py @@ -413,3 +427,72 @@ def parse_property(self, prop): self.current_file.write(f"class {prop.name}(BaseProperty):\n") self.write_docstring(prop) self.current_file.write("\n") + + +class OntologiesParser: + """ + Class that parses multiple ontologies at once. + + The resulting python package has the following form + + + path/__init__.py + path/base.py + path/ontology1/__init__.py + path/ontology1/classes.py + path/ontology1/object_properties.py + path/ontology1/data_properties.py + path/ontology1/restrictions.py + path/ontology1/individuals.py + path/ontology2/__init__.py + path/ontology2/classes.py + ... + """ + + ontologies: List[owlready2.Ontology] + """ + The ontologies to parse. + """ + + path: str + """ + The path to write the packages of the parsed ontology into. + """ + + include_imported_ontologies = True + """ + If True, the imported ontologies are also parsed. + """ + + dependency_graph: nx.DiGraph + """ + The dependency graph of the ontologies. + """ + + def __init__(self, ontologies: List[owlready2.Ontology], path: str): + self.ontologies = ontologies + self.path = path + + if self.include_imported_ontologies: + self.ontologies += [imported for onto in self.ontologies for imported in onto.imported_ontologies] + + # make ontologies unique + self.ontologies = list(set(self.ontologies)) + + self.create_dependency_graph() + + def create_dependency_graph(self): + """ + Create the dependency graph of the ontologies. + """ + self.dependency_graph = nx.DiGraph() + for onto in self.ontologies: + self.dependency_graph.add_node(onto) + for imported in onto.imported_ontologies: + self.dependency_graph.add_edge(imported, onto) + + def create_ontologies(self): + for onto in nx.topological_sort(self.dependency_graph): + mkdir(os.path.join(self.path, to_snake_case(onto.name))) + parser = OntologyParser(onto, os.path.join(self.path, to_snake_case(onto.name))) + parser.parse() \ No newline at end of file diff --git a/test/test_pycrap/test_parser.py b/test/test_pycrap/test_parser.py index b9ce6e3d9..b0c1919c9 100644 --- a/test/test_pycrap/test_parser.py +++ b/test/test_pycrap/test_parser.py @@ -2,24 +2,28 @@ import unittest import os + +import networkx as nx +import matplotlib.pyplot as plt from owlready2 import get_ontology -from pycrap.parser import Parser +from pycrap.parser import OntologyParser, OntologiesParser -class ParserTestCase(unittest.TestCase): +class OntologyParserTestCase(unittest.TestCase): @classmethod def setUpClass(cls): # cls.onto = get_ontology("https://raw.githubusercontent.com/sorinar329/CuttingFood/refs/heads/main/owl/food_cutting.owl").load() - cls.onto = get_ontology("http://protege.stanford.edu/ontologies/pizza/pizza.owl").load() - # cls.onto = get_ontology("http://www.ease-crc.org/ont/SOMA.owl").load() + # cls.onto = get_ontology("http://protege.stanford.edu/ontologies/pizza/pizza.owl").load() + cls.onto = get_ontology("http://www.ease-crc.org/ont/SOMA.owl").load() # # pizza = cls.onto.get_namespace("http://www.co-ode.org/ontologies/pizza/pizza.owl#") # my_pizza = pizza.Pizza() # my_pizza.hasTopping = [pizza.CheeseTopping()] - cls.directory = tempfile.mkdtemp() - cls.parser = Parser(cls.onto, cls.directory) + # cls.directory = tempfile.mkdtemp() + cls.directory = "/home/tom_sch/playground/parsed_ontology" + cls.parser = OntologyParser(cls.onto, cls.directory) def test_parsing(self): @@ -31,6 +35,21 @@ def test_parsing(self): +class OntologiesParserTestCase(unittest.TestCase): + + @classmethod + def setUpClass(cls): + cls.ontologies = [get_ontology("https://raw.githubusercontent.com/sorinar329/CuttingFood/refs/heads/main/owl/food_cutting.owl").load(), + get_ontology("http://www.ease-crc.org/ont/SOMA.owl").load()] + cls.directory = "/home/tom_sch/playground/parsed_ontology" + cls.parser = OntologiesParser(cls.ontologies, cls.directory) + + + def test_parsing(self): + self.parser.create_ontologies() + # nx.draw(self.parser.dependency_graph, with_labels=True) + # plt.show() + if __name__ == '__main__': unittest.main() From b3bf307bf0ed1f5c9ba25385a1ba1a3998f743aa Mon Sep 17 00:00:00 2001 From: sorinar329 Date: Wed, 4 Dec 2024 16:05:21 +0100 Subject: [PATCH 09/29] Some fixed to Errors regarding DataTypes, Adjustments regarding imported Ontologies within the parsed Ontology --- src/pycrap/parser.py | 74 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 65 insertions(+), 9 deletions(-) diff --git a/src/pycrap/parser.py b/src/pycrap/parser.py index cd187f73c..e38c32bfb 100644 --- a/src/pycrap/parser.py +++ b/src/pycrap/parser.py @@ -93,11 +93,11 @@ def __init__(self, ontology: owlready2.Ontology, path: str): render_func_without_namespace = lambda entity: entity.name owlready2.set_render_func(render_func_without_namespace) - def parse(self): + def parse(self, additional_imports=None): """ Parses the ontology into a python file. """ - self.create_base() + self.create_base(additional_imports) self.create_classes() self.create_object_properties() self.create_data_properties() @@ -116,12 +116,12 @@ def create_init(self): self.import_individuals() self.current_file.close() - def create_base(self): + def create_base(self, additional_imports=None): """ Create the base.py """ self.current_file = open(self.path_for_file(self.base_file_name), "w") - self.create_base_imports() + self.create_base_imports(additional_imports) self.current_file.write("\n" * 2) self.current_file.write("ontology_file = tempfile.NamedTemporaryFile()\n") self.current_file.write('ontology = owlready2.get_ontology("file://" + ontology_file.name).load()\n') @@ -215,6 +215,12 @@ def parse_restrictions_for_class(self, cls: ThingClass): # write is_a restrictions is_a = self.parse_elements(cls.is_a) if is_a: + if "" in str(is_a): + is_a = str(is_a).replace("", "int") + if "" in str(is_a): + is_a = str(is_a).replace("", "str") + if "" in str(is_a): + is_a = str(is_a).replace("", "float") is_a = f"{repr(cls)}.is_a = [{is_a}]" self.current_file.write(is_a) self.current_file.write("\n") @@ -250,6 +256,10 @@ def parse_restrictions_for_property(self, prop): # write range restrictions range_string = self.parse_elements(prop.range) if range_string: + if "" in str(range_string): + range_string = str(range_string).replace("", "int") + if "" in str(range_string): + range_string = str(range_string).replace("", "str") range_string = f"{repr(prop)}.range = [{range_string}]" self.current_file.write(range_string) self.current_file.write("\n") @@ -291,13 +301,18 @@ def parse_individual_properties(self, individual: owlready2.Thing): self.current_file.write(f"{individual.name}.{repr(prop)} = {individual.__getattr__(repr(prop))}") self.current_file.write("\n") - def create_base_imports(self): + def create_base_imports(self, additional_imports=None): """ Create the imports for the base.py """ self.current_file.write("from owlready2 import *\n") self.current_file.write("import tempfile\n") + # Additional imports for other ontologies + if additional_imports: + for import_path in additional_imports: + self.current_file.write(f"from {import_path} import *\n") + def import_from_base(self): """ Create the import statement to get everything from the base.py @@ -414,8 +429,17 @@ def parse_class(self, cls): Parse a class without restrictions. :param cls: The class. """ + if cls.name[0].isdigit(): + # Prepend "I" to make the class name valid + modified_class_name = "I" + cls.name + else: + modified_class_name = cls.name + + if "-" in modified_class_name: + modified_class_name = "U" + modified_class_name.replace("-", "_") + inherited_classes_sting = "Base" - self.current_file.write(f"class {cls.name}({inherited_classes_sting}):\n") + self.current_file.write(f"class {modified_class_name}({inherited_classes_sting}):\n") self.write_docstring(cls) self.current_file.write("\n\n") @@ -491,8 +515,40 @@ def create_dependency_graph(self): for imported in onto.imported_ontologies: self.dependency_graph.add_edge(imported, onto) + + + # def create_ontologies(self): + # for onto in nx.topological_sort(self.dependency_graph): + # mkdir(os.path.join(self.path, to_snake_case(onto.name))) + # print(to_snake_case(onto.name)) + # parser = OntologyParser(onto, os.path.join(self.path, to_snake_case(onto.name))) + # # Determine which ontologies depend on this one + # dependents = [to_snake_case(dep.name) for dep in self.dependency_graph.successors(onto)] + # additional_imports = [f"..{dep}" for dep in dependents] + # + # # Parse the ontology, passing its dependents for imports + # parser.parse(additional_imports) + def create_ontologies(self): + for node, successors in self.dependency_graph.adjacency(): + print(f"{node.name}: {[succ.name for succ in successors]}") + + self.dependency_graph = nx.reverse(self.dependency_graph, copy=True) for onto in nx.topological_sort(self.dependency_graph): - mkdir(os.path.join(self.path, to_snake_case(onto.name))) - parser = OntologyParser(onto, os.path.join(self.path, to_snake_case(onto.name))) - parser.parse() \ No newline at end of file + + # Create the directory for the ontology + ontology_path = os.path.join(self.path, to_snake_case(onto.name)) + mkdir(ontology_path) + + # Parse the ontology + parser = OntologyParser(onto, ontology_path) + + # Determine which ontologies depend on this one + dependents = [to_snake_case(dep.name) for dep in self.dependency_graph.successors(onto)] + print(f"Dependents of {onto.name}: {dependents}") + + additional_imports = [f"..{dep}" for dep in dependents] + print(f"Imports added to {onto.name}: {additional_imports}") + + # Parse the ontology, passing its dependents for imports + parser.parse(additional_imports) \ No newline at end of file From 46c51eb30321dc63a25d6a6d1007bf6b866e424f Mon Sep 17 00:00:00 2001 From: sorinar329 Date: Thu, 5 Dec 2024 10:28:11 +0100 Subject: [PATCH 10/29] "-" will be replaced with "" If a class starts with a digit it will be replaced with a written number: 6DPose -> SixDPose Added this fixes for Classes and Restrictions (At this time digit_to_string is not applied to the restriction bodies (ToDo)). --- src/pycrap/parser.py | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/src/pycrap/parser.py b/src/pycrap/parser.py index e38c32bfb..05b49adb6 100644 --- a/src/pycrap/parser.py +++ b/src/pycrap/parser.py @@ -93,6 +93,19 @@ def __init__(self, ontology: owlready2.Ontology, path: str): render_func_without_namespace = lambda entity: entity.name owlready2.set_render_func(render_func_without_namespace) + + def digit_to_string(self, cls): + # Mapping of digits to words + digit_map = { + '0': 'Zero', '1': 'One', '2': 'Two', '3': 'Three', '4': 'Four', + '5': 'Five', '6': 'Six', '7': 'Seven', '8': 'Eight', '9': 'Nine' + } + + # Replace each digit with its corresponding word + converted_name = ''.join(digit_map[char] if char.isdigit() else char for char in cls) + + return converted_name + def parse(self, additional_imports=None): """ Parses the ontology into a python file. @@ -190,6 +203,19 @@ def create_restrictions(self): self.import_individuals() self.current_file.write("\n" * 2) + for cls in self.ontology.classes(): + if cls.name[0].isdigit(): + original_name = cls.name + new_name = self.digit_to_string(original_name) + if new_name != original_name: + cls.name = new_name + + if "-" in cls.name: + original_name = cls.name + new_name = cls.name.replace("-", "") + if new_name != original_name: + cls.name = new_name + elements = list(self.ontology.classes()) + list(self.ontology.properties()) for element in tqdm.tqdm(elements, desc="Parsing restrictions"): @@ -212,9 +238,12 @@ def parse_restrictions_for_class(self, cls: ThingClass): :param cls: The class """ + # TODO: requiring a digit_to_string for the restrictions body. # write is_a restrictions is_a = self.parse_elements(cls.is_a) if is_a: + if "-" in str(is_a): + is_a = str(is_a).replace("-","") if "" in str(is_a): is_a = str(is_a).replace("", "int") if "" in str(is_a): @@ -424,6 +453,9 @@ def write_is_a(self, cls): self.current_file.write(is_a) self.current_file.write("\n") + + + # TODO: Decide upon a better solution for the hyphen symbol def parse_class(self, cls): """ Parse a class without restrictions. @@ -431,12 +463,13 @@ def parse_class(self, cls): """ if cls.name[0].isdigit(): # Prepend "I" to make the class name valid - modified_class_name = "I" + cls.name + #modified_class_name = "I" + cls.name + modified_class_name = self.digit_to_string(cls.name) else: modified_class_name = cls.name if "-" in modified_class_name: - modified_class_name = "U" + modified_class_name.replace("-", "_") + modified_class_name = modified_class_name.replace("-", "") inherited_classes_sting = "Base" self.current_file.write(f"class {modified_class_name}({inherited_classes_sting}):\n") From d861a234b84c361d3e9bba507bec6f58ae39d654 Mon Sep 17 00:00:00 2001 From: sorinar329 Date: Thu, 5 Dec 2024 11:12:26 +0100 Subject: [PATCH 11/29] Added more fixes for datatypes, skipping AnnotationProperties for now. --- src/pycrap/parser.py | 57 ++++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/src/pycrap/parser.py b/src/pycrap/parser.py index 05b49adb6..b64a90579 100644 --- a/src/pycrap/parser.py +++ b/src/pycrap/parser.py @@ -239,15 +239,20 @@ def parse_restrictions_for_class(self, cls: ThingClass): :param cls: The class """ # TODO: requiring a digit_to_string for the restrictions body. + # TODO: array_double will be converted to float for now, discuss # write is_a restrictions is_a = self.parse_elements(cls.is_a) if is_a: if "-" in str(is_a): is_a = str(is_a).replace("-","") + if "array_double" in str(is_a): + is_a = str(is_a).replace("array_double","float") if "" in str(is_a): is_a = str(is_a).replace("", "int") if "" in str(is_a): is_a = str(is_a).replace("", "str") + if "" in str(is_a): + is_a = str(is_a).replace("", "normstr") if "" in str(is_a): is_a = str(is_a).replace("", "float") is_a = f"{repr(cls)}.is_a = [{is_a}]" @@ -270,28 +275,40 @@ def parse_restrictions_for_property(self, prop): """ # write is_a restrictions is_a = self.parse_elements(prop.is_a) - if is_a: - is_a = f"{repr(prop)}.is_a = [{is_a}]" - self.current_file.write(is_a) - self.current_file.write("\n") + # Skip AnnotationProperties for now + if not "AnnotationProperty" in is_a: + if is_a: + is_a = f"{repr(prop)}.is_a = [{is_a}]" + self.current_file.write(is_a) + self.current_file.write("\n") - # write domain restrictions - domain_string = self.parse_elements(prop.domain) - if domain_string: - domain_string = f"{repr(prop)}.domain = [{domain_string}]" - self.current_file.write(domain_string) - self.current_file.write("\n") + # write domain restrictions + domain_string = self.parse_elements(prop.domain) + if domain_string: + domain_string = f"{repr(prop)}.domain = [{domain_string}]" + self.current_file.write(domain_string) + self.current_file.write("\n") - # write range restrictions - range_string = self.parse_elements(prop.range) - if range_string: - if "" in str(range_string): - range_string = str(range_string).replace("", "int") - if "" in str(range_string): - range_string = str(range_string).replace("", "str") - range_string = f"{repr(prop)}.range = [{range_string}]" - self.current_file.write(range_string) - self.current_file.write("\n") + # write range restrictions + range_string = self.parse_elements(prop.range) + if range_string: + if "" in str(range_string): + range_string = str(range_string).replace("", "int") + if "" in str(range_string): + range_string = str(range_string).replace("", "str") + if "" in str(range_string): + range_string = str(range_string).replace("", "normstr") + if "" in str(range_string): + range_string = str(range_string).replace("", "float") + if "array_double" in str(range_string): + range_string = str(range_string).replace("array_double","float") + if "" in str(range_string): + range_string = str(range_string).replace("", "datetime") + + + range_string = f"{repr(prop)}.range = [{range_string}]" + self.current_file.write(range_string) + self.current_file.write("\n") def create_individuals(self): """ From 5613552ef8e57728c3c508f5df2fa84565b17bbc Mon Sep 17 00:00:00 2001 From: sorinar329 Date: Fri, 6 Dec 2024 14:50:27 +0100 Subject: [PATCH 12/29] First commit of urdfParser --- src/pycrap/urdf_parser.py | 238 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 238 insertions(+) create mode 100644 src/pycrap/urdf_parser.py diff --git a/src/pycrap/urdf_parser.py b/src/pycrap/urdf_parser.py new file mode 100644 index 000000000..c27d3ed38 --- /dev/null +++ b/src/pycrap/urdf_parser.py @@ -0,0 +1,238 @@ +import xml.etree.ElementTree as ET +import os +from typing import List, Any + + +class URDFParser: + + + base_file_name: str = "base" + + classes_file_name: str = "classes" + + properties_file_name: str = "properties" + + restrictions_file_name: str = "restrictions" + + individuals_file_name: str = "individuals" + + file_extension: str = ".py" + + indentation = 4 + + def __init__(self, urdf_file: str, output_dir: str): + """ + Initialize the URDFParser with the URDF file and output directory. + """ + self.urdf_file = urdf_file + self.output_dir = output_dir + self.links: List[str] = [] + self.joints: List[dict] = [] + self._parse_urdf() + + def _parse_urdf(self): + """ + Parse the URDF file to extract links and joints. + """ + + tree = ET.parse(self.urdf_file) + root = tree.getroot() + + for child in root: + if child.tag == 'link': + self.links.append(child.attrib['name']) + elif child.tag == 'joint': + joint_info = { + 'name': child.attrib['name'], + 'type': child.attrib.get('type'), + 'parent': child.find('parent').attrib['link'], + 'child': child.find('child').attrib['link'] + } + self.joints.append(joint_info) + + + def parse_furniture(self, link): + """ + Parse the furniture file. + Test it on a hardcoded furniture list, later use an actual ontology file for it. + + """ + # furniture = imported_ontology.classes() + furniture = ["Door", "Fridge", "Handle"] + matching_list = [] + for l in link.split("_"): + if l.capitalize() in furniture: + matched_furniture = furniture.index(l.capitalize()) + print(f"Here it is, Found: {l} from Link: {link}") + print(f"Restriction would be:{l}.is_a = [{furniture[matched_furniture]}] ") + matching_list.append(furniture[matched_furniture]) + + + return matching_list + + + def apply_indent_to(self, string: str) -> str: + """ + Indent a statement at the beginning of every new line. + """ + return " " * self.indentation + string.replace('\n', '\n' + ' ' * self.indentation) + + def path_for_file(self, file_name: str) -> str: + """ + Generate the full path for a file in the output directory. + """ + return os.path.join(self.output_dir, f"{file_name}{self.file_extension}") + + def generate_base_imports(self): + """ + Generate a Python file containing the base class. + """ + base_file_path = self.path_for_file(self.base_file_name) + with open(base_file_path, "w") as file: + # Write imports and setup + file.write("from owlready2 import Thing, ObjectProperty\n") + file.write("import tempfile\n\n") + file.write("import owlready2\n\n") + file.write("ontology_file = tempfile.NamedTemporaryFile()\n") + file.write('ontology = owlready2.get_ontology("file://" + ontology_file.name).load()\n\n') + + # Write the Base class + file.write("class Base(Thing):\n") + file.write(" \"\"\"Base class for all links and joints.\"\"\"\n") + file.write(" namespace = ontology\n\n") + + # Write the BaseProperty class + file.write("class BaseProperty(ObjectProperty):\n") + file.write(" \"\"\"Base property for object properties.\"\"\"\n") + file.write(" namespace = ontology\n\n") + + print(f"Base class written to {base_file_path}") + + + def generate_classes_file(self): + """ + Generate a Python file with classes for all links and joints. + + Classes Joints, Links and the Joint types are always defined. + + Add some Furniture classes, later import another ontology. + + """ + classes_file_path = self.path_for_file(self.classes_file_name) + with open(classes_file_path, "w") as file: + file.write("from base import *\n\n\n") + file.write("class Links(Base):\n") + file.write(" pass\n\n") + + file.write("class Joints(Base):\n") + file.write(" pass\n\n") + + file.write("class Fixed(Base):\n") + #file.write(" \"\"\"Fixed base class for all links and joints.\"\"\"\n") + file.write(" pass\n\n") + + file.write("class Revolute(Base):\n") + # file.write(" \"\"\"Fixed base class for all links and joints.\"\"\"\n") + file.write(" pass\n\n") + + file.write("class Prismatic(Base):\n") + # file.write(" \"\"\"Fixed base class for all links and joints.\"\"\"\n") + file.write(" pass\n\n") + + file.write("class Planar(Base):\n") + # file.write(" \"\"\"Fixed base class for all links and joints.\"\"\"\n") + file.write(" pass\n\n") + + file.write("class Continous(Base):\n") + # file.write(" \"\"\"Fixed base class for all links and joints.\"\"\"\n") + file.write(" pass\n\n") + + file.write("class Door(Base):\n") + # file.write(" \"\"\"Fixed base class for all links and joints.\"\"\"\n") + file.write(" pass\n\n") + + file.write("class Fridge(Base):\n") + # file.write(" \"\"\"Fixed base class for all links and joints.\"\"\"\n") + file.write(" pass\n\n") + + file.write("class Handle(Base):\n") + # file.write(" \"\"\"Fixed base class for all links and joints.\"\"\"\n") + file.write(" pass\n\n") + + print(f"Classes written to {classes_file_path}") + + + def generate_individuals_file(self): + """ + Generate a Python file with individuals. + """ + individuals_file_path = self.path_for_file(self.individuals_file_name) + with open(individuals_file_path, "w") as file: + file.write("from properties import *\n\n\n") + for link in self.links: + file.write(f"{link} = Links('{link}')\n") + + for joint in self.joints: + file.write(f"{joint['name']} = Joints('{joint['name']}')\n") + + def generate_properties_file(self): + """ + Generate a Python file with properties for joints. + """ + properties_file_path = self.path_for_file(self.properties_file_name) + with open(properties_file_path, "w") as file: + # Write imports at the top + file.write("from classes import *\n\n") + + # Write the HasParentLink class + file.write("class hasParentLink(BaseProperty):\n") + file.write(" \"\"\"Property to link a joint to its parent link.\"\"\"\n") + file.write(" pass\n\n") # Properly indented pass statement + + # Write the HasChildLink class + file.write("class hasChildLink(BaseProperty):\n") + file.write(" \"\"\"Property to link a joint to its child link.\"\"\"\n") + file.write(" pass\n\n") # Properly indented pass statement + + print(f"Properties written to {properties_file_path}") + + def generate_restrictions_file(self): + """ + Generate a Python file with restrictions for joints, including joint types and relationships. + """ + restrictions_file_path = self.path_for_file(self.restrictions_file_name) + + with open(restrictions_file_path, "w") as file: + # Write the header + file.write("from individuals import *\n\n") + # Generate the restrictions for joints + file.write("Fixed.is_a = [Joints]\n\n") + file.write("Revolute.is_a = [Joints]\n\n") + file.write("Prismatic.is_a = [Joints]\n\n") + file.write("Planar.is_a = [Joints]\n\n") + file.write("Continous.is_a = [Joints]\n\n") + + for joint in self.joints: + instance_name = joint['name'] + joint_type = joint['type'].capitalize() + file.write(f"{instance_name}.is_a = [{joint_type}]\n") + file.write(f"{instance_name}.hasChildLink.append({joint['child']})\n") + file.write(f"{instance_name}.hasParentLink = [{joint['parent']}]\n") + file.write("\n") + + for link in self.links: + matched_furnitures = self.parse_furniture(link) + if matched_furnitures: + file.write(f"{link}.is_a = [Links, {', '.join(matched_furnitures)}]\n") + + print(f"Restrictions written to {restrictions_file_path}") + + def generate_all(self): + """ + Generate all required Python files. + """ + self.generate_base_imports() + self.generate_classes_file() + self.generate_properties_file() + self.generate_restrictions_file() + self.generate_individuals_file() \ No newline at end of file From ea451659b743605eda32588da09f3c9bb2f35eb2 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Tue, 10 Dec 2024 17:06:09 +0100 Subject: [PATCH 13/29] [Ontology] Replaced pycrap with new ontologies --- scripts/parse_ontologies.py | 23 + src/pycrap/agent.py | 14 - src/pycrap/base.py | 25 - src/pycrap/location.py | 36 - src/pycrap/objects.py | 109 - src/pycrap/ontologies/__init__.py | 3 + src/pycrap/ontologies/base.py | 16 + src/pycrap/ontologies/dul/__init__.py | 4 + src/pycrap/ontologies/dul/classes.py | 551 +++ src/pycrap/ontologies/dul/data_properties.py | 43 + src/pycrap/ontologies/dul/dependencies.py | 1 + src/pycrap/ontologies/dul/individuals.py | 7 + .../ontologies/dul/object_properties.py | 645 +++ src/pycrap/ontologies/dul/restrictions.py | 625 +++ src/pycrap/ontologies/soma/__init__.py | 4 + src/pycrap/ontologies/soma/classes.py | 3644 +++++++++++++++++ src/pycrap/ontologies/soma/data_properties.py | 210 + src/pycrap/ontologies/soma/dependencies.py | 2 + src/pycrap/ontologies/soma/individuals.py | 47 + .../ontologies/soma/object_properties.py | 1418 +++++++ src/pycrap/ontologies/soma/restrictions.py | 2304 +++++++++++ src/pycrap/ontology.py | 4 +- src/pycrap/parser.py | 379 +- src/pycrap/urdf.py | 19 - test/test_pycrap/test_parser.py | 34 +- 25 files changed, 9766 insertions(+), 401 deletions(-) create mode 100644 scripts/parse_ontologies.py delete mode 100644 src/pycrap/agent.py delete mode 100644 src/pycrap/base.py delete mode 100644 src/pycrap/location.py delete mode 100644 src/pycrap/objects.py create mode 100644 src/pycrap/ontologies/base.py create mode 100644 src/pycrap/ontologies/dul/__init__.py create mode 100644 src/pycrap/ontologies/dul/classes.py create mode 100644 src/pycrap/ontologies/dul/data_properties.py create mode 100644 src/pycrap/ontologies/dul/dependencies.py create mode 100644 src/pycrap/ontologies/dul/individuals.py create mode 100644 src/pycrap/ontologies/dul/object_properties.py create mode 100644 src/pycrap/ontologies/dul/restrictions.py create mode 100644 src/pycrap/ontologies/soma/__init__.py create mode 100644 src/pycrap/ontologies/soma/classes.py create mode 100644 src/pycrap/ontologies/soma/data_properties.py create mode 100644 src/pycrap/ontologies/soma/dependencies.py create mode 100644 src/pycrap/ontologies/soma/individuals.py create mode 100644 src/pycrap/ontologies/soma/object_properties.py create mode 100644 src/pycrap/ontologies/soma/restrictions.py delete mode 100644 src/pycrap/urdf.py diff --git a/scripts/parse_ontologies.py b/scripts/parse_ontologies.py new file mode 100644 index 000000000..8bd1125af --- /dev/null +++ b/scripts/parse_ontologies.py @@ -0,0 +1,23 @@ +import os +from owlready2 import * +from pycrap.parser import OntologiesParser + +""" +This file parses all relevant ontologies and generates the corresponding Python classes in the pycrap/ontologies folder. +This script will overwrite the existing folders with the same name as the ontologies. Hence, make sure to extract +relevant changes before running this script. +""" + +def main(): + ontologies = [ + get_ontology("http://www.ease-crc.org/ont/SOMA.owl").load() + ] + + path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "src", "pycrap", "ontologies") + + parser = OntologiesParser(ontologies, path) + parser.parse() + + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/src/pycrap/agent.py b/src/pycrap/agent.py deleted file mode 100644 index 26b666689..000000000 --- a/src/pycrap/agent.py +++ /dev/null @@ -1,14 +0,0 @@ -from .base import PhysicalObject - -class Agent(PhysicalObject): - """ - An agent is an entity that acts. - """ - -class Robot(Agent): - """ - A robot is a machine that can carry out a complex series of actions automatically. - """ - -class Human(Agent): - ... \ No newline at end of file diff --git a/src/pycrap/base.py b/src/pycrap/base.py deleted file mode 100644 index 134bccfa1..000000000 --- a/src/pycrap/base.py +++ /dev/null @@ -1,25 +0,0 @@ -import tempfile - -import owlready2 -from owlready2 import Thing, ObjectProperty - -default_pycrap_ontology_file = tempfile.NamedTemporaryFile() -default_pycrap_ontology = owlready2.get_ontology("file://" + default_pycrap_ontology_file.name).load() - -class Base(Thing): - comment = __doc__ - namespace = default_pycrap_ontology - - @classmethod - def set_comment_to_docstring(cls): - cls.comment = cls.__doc__ - - -class BaseProperty(ObjectProperty): - namespace = default_pycrap_ontology - - -class PhysicalObject(Base): - """ - Any Object that has a proper space region. The prototypical physical object has also an associated mass, but the nature of its mass can greatly vary based on the epistemological status of the object (scientifically measured, subjectively possible, imaginary). - """ \ No newline at end of file diff --git a/src/pycrap/location.py b/src/pycrap/location.py deleted file mode 100644 index 0810bd94d..000000000 --- a/src/pycrap/location.py +++ /dev/null @@ -1,36 +0,0 @@ -from .base import Base - -class Location(Base): - """ - A physical region. - """ - -class Room(Location): - """ - A region in a building. - """ - -class Bedroom(Room): - """ - A room where people sleep in. - """ - -class Kitchen(Room): - """ - A room where food is prepared. - """ - -class LivingRoom(Room): - """ - A room where people relax in. - """ - -class Bathroom(Room): - """ - A room where people wash in. - """ - -class Apartment(Location): - """ - A building with multiple rooms. - """ \ No newline at end of file diff --git a/src/pycrap/objects.py b/src/pycrap/objects.py deleted file mode 100644 index f694c92f5..000000000 --- a/src/pycrap/objects.py +++ /dev/null @@ -1,109 +0,0 @@ -from . import default_pycrap_ontology -from .base import PhysicalObject, Base, BaseProperty - - -class Container(PhysicalObject): - """ - Any object that can contain other objects. - """ - - -class Cup(Container): - """ - A cup is a small open container used for drinking. - """ - - -class Mug(Container): - equivalent_to = [Cup] - - -class MetalMug(Mug): - """ - A mug made of metal. - """ - - -class Food(PhysicalObject): - """ - Any substance that can be consumed by living organisms. - """ - - -class Pringles(Food): - """ - A brand of potato snack chips. - """ - - -class Milk(Food): - """ - A white liquid produced by the mammary glands of mammals. - """ - - -class Cutlery(PhysicalObject): - """ - Any implement, tool, or container used for serving or eating food. - """ - - -class Fork(Cutlery): - """ - A fork is a tool consisting of a handle with several narrow tines on one end. - """ - - -class Spoon(Cutlery): - """ - A spoon is a utensil consisting of a small shallow bowl oval or round in shape, with a handle. - """ - - -class Knife(Cutlery): - """ - A knife is a tool with a cutting edge or blade attached to a handle. - """ - - -class Plate(PhysicalObject): - """ - A plate is a broad, concave, but mainly flat vessel on which food can be served. - """ - - -class Bowl(Container, Plate): - """ - A bowl is a round, open-top container used in many cultures to serve food. - """ - - -class Cereal(Food): - """ - A traditional breakfast dish made from processed cereal grains. - """ - - -class Floor(PhysicalObject): - """ - The lower surface of a room. - """ - - -class Table(PhysicalObject): - """ - A table is an item of furniture with a flat top, used as a surface for working at, - eating from or on which to place things. - """ - - -class Board(PhysicalObject): - """ - A flat, thin, rectangular supporting piece. - """ - - -class has_part(BaseProperty, PhysicalObject >> PhysicalObject): - """ - A property that relates an object to a part of it. - """ \ No newline at end of file diff --git a/src/pycrap/ontologies/__init__.py b/src/pycrap/ontologies/__init__.py index e69de29bb..05112cc06 100644 --- a/src/pycrap/ontologies/__init__.py +++ b/src/pycrap/ontologies/__init__.py @@ -0,0 +1,3 @@ +from .base import * +from .dul import * +from .soma import * diff --git a/src/pycrap/ontologies/base.py b/src/pycrap/ontologies/base.py new file mode 100644 index 000000000..e1788cc1c --- /dev/null +++ b/src/pycrap/ontologies/base.py @@ -0,0 +1,16 @@ +from owlready2 import * +import tempfile + + +ontology_file = tempfile.NamedTemporaryFile() +ontology = owlready2.get_ontology("file://" + ontology_file.name).load() + + +class Base(Thing): + namespace = ontology + + +class BaseProperty(ObjectProperty): + namespace = ontology + + diff --git a/src/pycrap/ontologies/dul/__init__.py b/src/pycrap/ontologies/dul/__init__.py new file mode 100644 index 000000000..322f45daf --- /dev/null +++ b/src/pycrap/ontologies/dul/__init__.py @@ -0,0 +1,4 @@ +from .classes import * +from .object_properties import * +from .data_properties import * +from .individuals import * diff --git a/src/pycrap/ontologies/dul/classes.py b/src/pycrap/ontologies/dul/classes.py new file mode 100644 index 000000000..e4505b7b3 --- /dev/null +++ b/src/pycrap/ontologies/dul/classes.py @@ -0,0 +1,551 @@ +from .dependencies import * + + +class Thing(Base): + ... + + +class Concept(Base): + """ + A Concept is a SocialObject, and isDefinedIn some Description; once defined, a Concept can be used in other Description(s). If a Concept isDefinedIn exactly one Description, see the LocalConcept class. + The classifies relation relates Concept(s) to Entity(s) at some TimeInterval + """ + + +class Task(Base): + """ + An EventType that classifies an Action to be executed. + For example, reaching a destination is a task that can be executed by performing certain actions, e.g. driving a car, buying a train ticket, etc. + The actions to execute a task can also be organized according to a Plan that is not the same as the one that defines the task (if any). + For example, reaching a destination could be defined by a plan to get on holidays, while the plan to execute the task can consist of putting some travels into a sequence. + """ + + +class Role(Base): + """ + A Concept that classifies an Object + """ + + +class Entity(Base): + """ + Anything: real, possible, or imaginary, which some modeller wants to talk about for some purpose. + """ + + +class Event(Base): + """ + Any physical, social, or mental process, event, or state. + + More theoretically, events can be classified in different ways, possibly based on 'aspect' (e.g. stative, continuous, accomplishement, achievement, etc.), on 'agentivity' (e.g. intentional, natural, etc.), or on 'typical participants' (e.g. human, physical, abstract, food, etc.). + Here no special direction is taken, and the following explains why: events are related to observable situations, and they can have different views at a same time. + If a position has to be suggested here anyway, the participant-based classification of events seems the most stable and appropriate for many modelling problems. + + (1) Alternative aspectual views + + Consider a same event 'rock erosion in the Sinni valley': it can be conceptualized as an accomplishment (what has brought a certain state to occur), as an achievement (the state resulting from a previous accomplishment), as a punctual event (if we collapse the time interval of the erosion into a time point), or as a transition (something that has changed from a state to a different one). + In the erosion case, we could therefore have good motivations to shift from one aspect to another: a) causation focus, b) effectual focus, c) historical condensation, d) transition (causality). + + The different views refer to the same event, but are still different: how to live with this seeming paradox? + A typical solution e.g. in linguistics (cf. Levin's aspectual classes) and in DOLCE Full (cf. WonderWeb D18 axiomatization) is to classify events based on aspectual differences. But this solution would create different identities for a same event, where the difference is only based on the modeller's attitude. + An alternative solution is suggested here, and exploits the notion of (observable) Situation; a Situation is a view, consistent with a Description, which can be observed of a set of entities. It can also be seen as a 'relational context' created by an observer on the basis of a 'frame'. Therefore, a Situation allows to create a context where each particular view can have a proper identity, while the Event preserves its own identity. + For example, ErosionAsAccomplishment is a Situation where rock erosion is observed as a process leading to a certain achievement: the conditions (roles, parameters) that suggest such view are stated in a Description, which acts as a 'theory of accomplishments'. Similarly, ErosionAsTransition is a Situation where rock erosion is observed as an event that has changed a state to another: the conditions for such interpretation are stated in a different Description, which acts as a 'theory of state transitions'. + Consider that in no case the actual event is changed or enriched in parts by the aspectual view. + + (2) Alternative intentionality views + + Similarly to aspectual views, several intentionality views can be provided for a same Event. For example, one can investigate if an avalanche has been caused by immediate natural forces, or if there is any hint of an intentional effort to activate those natural forces. + Also in this case, the Event as such has not different identities, while the causal analysis generates situations with different identities, according to what Description is taken for interpreting the Event. + On the other hand, if the possible actions of an Agent causing the starting of an avalanche are taken as parts of the Event, then this makes its identity change, because we are adding a part to it. + Therefore, if intentionality is a criterion to classify events or not, this depends on if an ontology designer wants to consider causality as a relevant dimension for events' identity. + + (3) Alternative participant views + + A slightly different case is when we consider the basic participants to an Event. In this case, the identity of the Event is affected by the participating objects, because it depends on them. + For example, if snow, mountain slopes, wind, waves, etc. are considered as an avalanche basic participants, or if we also want to add water, human agents, etc., that makes the identity of an avalanche change. + Anyway, this approach to event classification is based on the designer's choices, and more accurately mirrors lexical or commonsense classifications (see. e.g. WordNet 'supersenses' for verb synsets). + + Ultimately, this discussion has no end, because realists will keep defending the idea that events in reality are not changed by the way we describe them, while constructivists will keep defending the idea that, whatever 'true reality' is about, it can't be modelled without the theoretical burden of how we observe and describe it. + Both positions are in principle valid, but, if taken too radically, they focus on issues that are only partly relevant to the aim of computational ontologies, which assist domain experts in representing a certain portion of reality according to their own assumptions and requirements. + + For this reason, in this ontology version of DOLCE, both events and situations are allowed, together with descriptions (the reason for the inclusion of the D&S framewrok in DOLCE), in order to encode the modelling needs, independently from the position (if any) chosen by the model designer. + """ + + +class Transition(Base): + """ + A transition is a Situation that creates a context for three TimeInterval(s), two additional different Situation(s), one Event, one Process, and at least one Object: the Event is observed as the cause for the transition, one Situation is the state before the transition, the second Situation is the state after the transition, the Process is the invariance under some different transitions (including the one represented here), in which at least one Object is situated. Finally, the time intervals position the situations and the transitional event in time. + This class of situations partly encodes the ontology underlying typical engineering algebras for processes, e.g. Petri Nets. + A full representation of the transition ontology is outside the expressivity of OWL, because we would need qualified cardinality restrictions, coreference, property equivalence, and property composition. + """ + + +class PhysicalObject(Base): + """ + Any Object that has a proper space region. The prototypical physical object has also an associated mass, but the nature of its mass can greatly vary based on the epistemological status of the object (scientifically measured, subjectively possible, imaginary). + """ + + +class Description(Base): + """ + A Description is a SocialObject that represents a conceptualization. + It can be thought also as a 'descriptive context' that uses or defines concepts in order to create a view on a 'relational context' (cf. Situation) out of a set of data or observations. + For example, a Plan is a Description of some actions to be executed by agents in a certain way, with certain parameters; a Diagnosis is a Description that provides an interpretation for a set of observed entities, etc. + Descriptions 'define' or 'use' concepts, and can be 'satisfied' by situations. + """ + + +class EventType(Base): + """ + A Concept that classifies an Event . An event type describes how an Event should be interpreted, executed, expected, seen, etc., according to the Description that the EventType isDefinedIn (or used in) + """ + + +class Parameter(Base): + """ + A Concept that classifies a Region; the difference between a Region and a Parameter is that regions represent sets of observable values, e.g. the height of a given building, while parameters represent constraints or selections on observable values, e.g. 'VeryHigh'. Therefore, parameters can also be used to constrain regions, e.g. VeryHigh on a subset of values of the Region Height applied to buildings, or to add an external selection criterion , such as measurement units, to regions, e.g. Meter on a subset of values from the Region Length applied to the Region Length applied to roads. + """ + + +class InformationObject(Base): + """ + A piece of information, such as a musical composition, a text, a word, a picture, independently from how it is concretely realized. + """ + + +class Quality(Base): + """ + Any aspect of an Entity (but not a part of it), which cannot exist without that Entity. For example, the way the surface of a specific PhysicalObject looks like, or the specific light of a place at a certain time, are examples of Quality, while the encoding of a Quality into e.g. a PhysicalAttribute should be modeled as a Region. + From the design viewpoint, the Quality-Region distinction is useful only when individual aspects of an Entity are considered in a domain of discourse. + For example, in an automotive context, it would be irrelevant to consider the aspects of car windows for a specific car, unless the factory wants to check a specific window against design parameters (anomaly detection). + On the other hand, in an antiques context, the individual aspects for a specific piece of furniture are a major focus of attention, and may constitute the actual added value, because the design parameters for old furniture are often not fixed, and may not be viewed as 'anomalies'. + """ + + +class Collection(Base): + """ + Any container for entities that share one or more common properties. E.g. "stone objects", "the nurses", "the Louvre Aegyptian collection", all the elections for the Italian President of the Republic. + A collection is not a logical class: a collection is a first-order entity, while a class is second-order. + A collection is neither an aggregate of its member entities (see e.g. ObjectAggregate class). + """ + + +class Action(Base): + """ + An Event with at least one Agent that isParticipantIn it, and that executes a Task that typically isDefinedIn a Plan, Workflow, Project, etc. + """ + + +class Region(Base): + """ + Any region in a dimensional space (a dimensional space is a maximal Region), which can be used as a value for a quality of an Entity . For example, TimeInterval, SpaceRegion, PhysicalAttribute, Amount, SocialAttribute are all subclasses of Region. + Regions are not data values in the ordinary knowledge representation sense; in order to get patterns for modelling data, see the properties: representsDataValue and hasDataValue + """ + + +class Object(Base): + """ + Any physical, social, or mental object, or a substance. Following DOLCE Full, objects are always participating in some event (at least their own life), and are spatially located. + """ + + +class Workflow(Base): + """ + A Plan that defines Role(s), Task(s), and a specific structure for tasks to be executed, usually supporting the work of an Organization + """ + + +class Goal(Base): + """ + The Description of a Situation that is desired by an Agent, and usually associated to a Plan that describes how to actually achieve it + """ + + +class Situation(Base): + """ + A view, consistent with ('satisfying') a Description, on a set of entities. + It can also be seen as a 'relational context' created by an observer on the basis of a 'frame' (i.e. a Description). + For example, a PlanExecution is a context including some actions executed by agents according to certain parameters and expected tasks to be achieved from a Plan; a DiagnosedSituation is a context of observed entities that is interpreted on the basis of a Diagnosis, etc. + Situation is also able to represent reified n-ary relations, where isSettingFor is the top-level relation for all binary projections of the n-ary relation. + If used in a transformation pattern for n-ary relations, the designer should take care of adding (some or all) OWL2 keys, corresponding to binary projections of the n-ary, to a subclass of Situation. Otherwise the 'identification constraint' (Calvanese et al., IJCAI 2001) might be violated. + """ + + +class Process(Base): + """ + This is a placeholder for events that are considered in their evolution, or anyway not strictly dependent on agents, tasks, and plans. + See Event class for some thoughts on classifying events. See also 'Transition'. + """ + + +class Agent(Base): + """ + Additional comment: a computational agent can be considered as a PhysicalAgent that realizes a certain class of algorithms (that can be considered as instances of InformationObject) that allow to obtain some behaviors that are considered typical of agents in general. For an ontology of computational objects based on DOLCE see e.g. http://www.loa-cnr.it/COS/COS.owl, and http://www.loa-cnr.it/KCO/KCO.owl. + Any agentive Object , either physical (e.g. a whale, a robot, an oak), or social (e.g. a corporation, an institution, a community). + """ + + +class SpaceRegion(Base): + """ + Any Region in a dimensional space that is used to localize an Entity ; i.e., it is not used to represent some characteristic (e.g. it excludes time intervals, colors, size values, judgment values, etc.). Differently from a Place , a space region has a specific dimensional space. + """ + + +class Relation(Base): + """ + Relations are descriptions that can be considered as the counterpart of formal relations (that are included in the FormalEntity class). + For example, 'givingGrantToInstitution(x,y,z)' with three argument types: Provider(x),Grant(y),Recipient(z), can have a Relation counterpart: 'GivingGrantToInstitution', which defines three Concept instances: Provider,Grant,Recipient. + Since social objects are not formal entities, Relation includes here any 'relation-like' entity in common sense, including social relations. + """ + + +class PhysicalArtifact(Base): + """ + Any PhysicalObject that isDescribedBy a Plan . + This axiomatization is weak, but allows to talk of artifacts in a very general sense, i.e. including recycled objects, objects with an intentional functional change, natural objects that are given a certain function, even though they are not modified or structurally designed, etc. PhysicalArtifact(s) are not considered disjoint from PhysicalBody(s), in order to allow a dual classification when needed. E.g., + FunctionalSubstance(s) are included here as well. + Immaterial (non-physical) artifacts (e.g. texts, ideas, cultural movements, corporations, communities, etc. can be modelled as social objects (see SocialObject), which are all 'artifactual' in the weak sense assumed here. + """ + + +class PhysicalPlace(Base): + """ + A physical object that is inherently located; for example, a water area. + """ + + +class Design(Base): + """ + A Description of the Situation, in terms of structure and function, held by an Entity for some reason. + A design is usually accompanied by the rationales behind the construction of the designed Entity (i.e. of the reasons why a design is claimed to be as such). For example, the actual design (a Situation) of a car or of a law is based on both the specification (a Description) of the structure, and the rationales used to construct cars or laws. + While designs typically describe entities to be constructed, they can also be used to describe 'refunctionalized' entities, or to hypothesize unknown functions. For example, a cradle can be refunctionalized as a flowerpot based on a certain home design. + """ + + +class Plan(Base): + """ + A Description having an explicit Goal, to be achieved by executing the plan + """ + + +class InformationRealization(Base): + """ + A concrete realization of an InformationObject, e.g. the written document (object) containing the text of a law, a poetry reading (event), the dark timbre (quality) of a sound (event) in the execution (event) of a musical composition, realizing a 'misterioso' tempo indication. + + The realization of an information object also realizes information about itself. This is a special semiotic feature, which allows to avoid a traditonal paradox, by which an information is often supposed to be about itself besides other entities (e.g. the information object 'carpe diem' is about its meaning in Horace's Odes (let alone its fortune in Western culture and beyond), but also about its expression in context: 'dum loquimur, fugerit invida aetas: carpe diem, quam minimum credula postero', with the sound and emotional relations that it could activate. + This is expressed in OWL2 with a local reflexivity axiom of the dul:InformationRealization class. + """ + + +class TimeInterval(Base): + """ + Any Region in a dimensional space that aims at representing time. + """ + + +class PhysicalAttribute(Base): + """ + Physical value of a physical object, e.g. density, color, etc. + """ + + +class DesignedArtifact(Base): + """ + A PhysicalArtifact that is also described by a Design. This excludes simple recycling or refunctionalization of natural objects. Most common sense 'artifacts' can be included in this class: cars, lamps, houses, chips, etc. + """ + + +class PhysicalAgent(Base): + """ + A PhysicalObject that is capable of self-representing (conceptualizing) a Description in order to plan an Action. + A PhysicalAgent is a substrate for (actsFor) a Social Agent + """ + + +class Diagnosis(Base): + """ + A Description of the Situation of a system, usually applied in order to control a normal behaviour, or to explain a notable behavior (e.g. a functional breakdown). + """ + + +class SocialObject(Base): + """ + Any Object that exists only within some communication Event, in which at least one PhysicalObject participates in. + In other words, all objects that have been or are created in the process of social communication: for the sake of communication (InformationObject), for incorporating new individuals (SocialAgent, Place), for contextualizing or intepreting existing entities (Description, Concept), or for collecting existing entities (Collection). + Being dependent on communication, all social objects need to be expressed by some information object (information objects are self-expressing). + """ + + +class Configuration(Base): + """ + A collection whose members are 'unified', i.e. organized according to a certain schema that can be represented by a Description. + Typically, a configuration is the collection that emerges out of a composed entity: an industrial artifact, a plan, a discourse, etc. + E.g. a physical book has a configuration provided by the part-whole schema that holds together its cover, pages, ink. That schema, based on the individual relations between the book and its parts, can be represented in a reified way by means of a (structural) description, which is said to 'unify' the book configuration. + """ + + +class Substance(Base): + """ + Any PhysicalBody that has not necessarily specified (designed) boundaries, e.g. a pile of trash, some sand, etc. + In this sense, an artistic object made of trash or a dose of medicine in the form of a pill would be a FunctionalSubstance, and a DesignedArtifact, since its boundaries are specified by a Design; aleatoric objects that are outcomes of an artistic process might be still considered DesignedArtifact(s), and Substance(s). + """ + + +class PhysicalBody(Base): + """ + Physical bodies are PhysicalObject(s), for which we tend to neutralize any possible artifactual character. They can have several granularity levels: geological, chemical, physical, biological, etc. + """ + + +class Organism(Base): + """ + A physical objects with biological characteristics, typically that organisms can self-reproduce. + """ + + +class FormalEntity(Base): + """ + Entities that are formally defined and are considered independent from the social context in which they are used. They cannot be localized in space or time. Also called 'Platonic entities'. + Mathematical and logical entities are included in this class: sets, categories, tuples, costants, variables, etc. + Abstract formal entities are distinguished from information objects, which are supposed to be part of a social context, and are localized in space and time, therefore being (social) objects. + For example, the class 'Quark' is an abstract formal entity from the purely set-theoretical perspective, but it is an InformationObject from the viewpoint of ontology design, when e.g. implemented in a logical language like OWL. + Abstract formal entities are also distinguished from Concept(s), Collection(s), and Description(s), which are part of a social context, therefore being SocialObject(s) as well. + For example, the class 'Quark' is an abstract FormalEntity from the purely set-theoretical perspective, but it is a Concept within history of science and cultural dynamics. + + These distinctions allow to represent two different notions of 'semantics': the first one is abstract and formal ('formal semantics'), and formallyInterprets symbols that are about entities whatsoever; for example, the term 'Quark' isAbout the Collection of all quarks, and that Collection isFormalGroundingFor the abstract class 'Quark' (in the extensional sense). + The second notion is social, localized in space-time ('social semantics'), and can be used to interpret entities in the intensional sense. For example, the Collection of all quarks isCoveredBy the Concept 'Quark', which is also expressed by the term 'Quark'. + """ + + +class SocialRelation(Base): + """ + Any social relationship + """ + + +class SocialObjectAttribute(Base): + """ + Any Region in a dimensional space that is used to represent some characteristic of a SocialObject, e.g. judgment values, social scalars, statistical attributes over a collection of entities, etc. + """ + + +class Theory(Base): + """ + A Theory is a Description that represents a set of assumptions for describing something, usually general. Scientific, philosophical, and commonsense theories can be included here. + This class can also be used to act as 'naturalized reifications' of logical theories (of course, they will be necessarily incomplete in this case, because second-order entities are represented as first-order ones). + """ + + +class Set(Base): + ... + + +class SocialAgent(Base): + """ + Any individual whose existence is granted simply by its social communicability and capability of action (through some PhysicalAgent). + """ + + +class Abstract(Base): + """ + Any Entity that cannot be located in space-time. E.g. mathematical entities: formal semantics elements, regions within dimensional spaces, etc. + """ + + +class Amount(Base): + """ + A quantity, independently from how it is measured, computed, etc. + """ + + +class BiologicalObject(Base): + ... + + +class ChemicalObject(Base): + ... + + +class Classification(Base): + """ + A special kind of Situation that allows to include time indexing for the classifies relation in situations. For example, if a Situation s 'my old cradle is used in these days as a flower pot' isSettingFor the entity 'my old cradle' and the TimeIntervals '8June2007' and '10June2007', and we know that s satisfies a functional Description for aesthetic objects, which defines the Concepts 'flower pot' and 'flower', then we also need to know what concept classifies 'my old cradle' at what time. + In order to solve this issue, we need to create a sub-situation s' for the classification time: 'my old cradle is a flower pot in 8June2007'. Such sub-situation s' isPartOf s. + """ + + +class TimeIndexedRelation(Base): + """ + A Situation that includes a time indexing in its setting, so allowing to order any binary relation (property) with time. + """ + + +class Collective(Base): + """ + A Collection whose members are agents, e.g. "the nurses", "the Italian rockabilly fans". + Collectives, facon de parler, can act as agents, although they are not assumed here to be agents (they are even disjoint from the class SocialAgent). This is represented by admitting collectives in the range of the relations having Agent in their domain or range. + """ + + +class CollectiveAgent(Base): + """ + A SocialAgent that is actedBy agents that are (and act as) members of a Collective. A collective agent can have roles that are also roles of those agents. + For example, in sociology, a 'group action' is the situation in which a number of people (that result to be members of a collective) in a given area behave in a coordinated way in order to achieve a (often common) goal. The Agent in such a Situation is not single, but a CollectiveAgent (a Group). This can be generalized to the notion of social movement, which assumes a large Community or even the entire Society as agents. + The difference between a CollectiveAgent and an Organization is that a Description that introduces a CollectiveAgent is also one that unifies the corresponding Collective. In practice, this difference makes collective agents 'less stable' than organizations, because they have a dedicated, publicly recognizable Description that is conceived to introduce them. + """ + + +class Community(Base): + ... + + +class Contract(Base): + """ + (The content of) an agreement between at least two agents that play a Party Role, about some contract object (a Task to be executed). + """ + + +class DesignedSubstance(Base): + ... + + +class FunctionalSubstance(Base): + ... + + +class Group(Base): + """ + A CollectiveAgent whose acting agents conceptualize a same SocialRelation . + """ + + +class InformationEntity(Base): + """ + A piece of information, be it concretely realized or not. It is a catchall class, intended to bypass the ambiguities of many data or text that could denote either a an expression or a concrete realization of that expression. + In a semiotic model, there is no special reason to distinguish between them, however we may want to distinguish between a pure information content (e.g. the 3rd Gymnopedie by Satie), and its possible concrete realizations as a music sheet, a piano execution, the reproduction of the execution, its publishing as a record, etc.). + """ + + +class LocalConcept(Base): + """ + A Concept that isDefinedIn exactly 1 Description. For example, the Concept 'coffee' in a 'preparesCoffee' relation can be defined in that relation, and for all other Description(s) that use it, the isConceptUsedIn property should be applied. Notice therefore that not necessarily all Concept(s) isDefinedIn exactly 1 Description. + """ + + +class Method(Base): + """ + A method is a Description that defines or uses concepts in order to guide carrying out actions aimed at a solution with respect to a problem. + It is different from a Plan, because plans could be carried out in order to follow a method, but a method can be followed by executing alternative plans. + """ + + +class Narrative(Base): + ... + + +class NaturalPerson(Base): + """ + A person in the physical commonsense intuition: 'have you seen that person walking down the street?' + """ + + +class Person(Base): + """ + Persons in commonsense intuition, which does not apparently distinguish between either natural or social persons. + """ + + +class Norm(Base): + """ + A social norm. + """ + + +class ObjectAggregate(Base): + """ + An aggregate of distributed objects, members of a same Collection, e.g. the stars in a constellation, the parts of a car, the employees of a company, the entries from an encyclopedia, the concepts expressed in a speech, etc. + It cannot be defined by means of an equivalence axiom, because it'd require the same Collection for all members, an axiom that cannot be expressed in OWL. + """ + + +class Organization(Base): + """ + An internally structured, conventionally created SocialAgent, needing a specific Role and Agent that plays it, in order to act. + """ + + +class Parthood(Base): + """ + A special kind of Situation that allows to include time indexing for the hasPart relation in situations. + For example, if a Situation s 'finally, my bike has a luggage rack' isSettingFor the entity 'my bike' and the TimeIntervals 'now', or more specifically '29March2021', we need to have a time-index the part relation. With Parthood, we use includesWhole and includesPart properties. + This can be done similarly for other arguments of parthood, e.g. location, configuration, topology, etc. + Concerning the possible property characteristics reused from mereology (transitivity, asymmetry, reflexivity), they need to be implemented by means of rules (or, in a limited way, property chains using the binary hasPart or hasProperPart properties). + A key is also added to ensure identification constraints of time-indexed parthood. + """ + + +class Pattern(Base): + """ + Any invariance detected from a dataset, or from observation; also, any invariance proposed based on top-down considerations. + E.g. patterns detected and abstracted by an organism, by pattern recognition algorithms, by machine learning techniques, etc. + An occurrence of a pattern is an 'observable', or detected Situation + """ + + +class Personification(Base): + """ + A social entity with agentive features, but whose status is the result of a cultural transformation from e.g. a PhysicalObject, an Event, an Abstract, another SocialObject, etc. For example: the holy grail, deus ex machina, gods, magic wands, etc. + """ + + +class Place(Base): + """ + Socially or cognitively dependent locations: political geographic entities (Rome, Lesotho), and non-material locations determined by the presence of other entities ("the area close to Rome") or of pivot events or signs ("the area where the helicopter fell"), as well as identified as complements to other entities ("the area under the table"), etc. + In this generic sense, a Place is a 'dependent' location. For 'non-dependent' locations, cf. the PhysicalPlace class. For an abstract (dimensional) location, cf. the SpaceRegion class. + """ + + +class PlanExecution(Base): + """ + Plan executions are situations that proactively satisfy a plan. Subplan executions are proper parts of the whole plan execution. + """ + + +class Project(Base): + """ + A Plan that defines Role(s), Task(s), and a specific structure for tasks to be executed in relation to goals to be achieved, in order to achieve the main goal of the project. In other words, a project is a plan with a subgoal structure and multiple roles and tasks. + """ + + +class Right(Base): + """ + A legal position by which an Agent is entitled to obtain something from another Agent , under specified circumstances, through an enforcement explicited either in a Law, Contract , etc. + """ + + +class SocialPerson(Base): + """ + A SocialAgent that needs the existence of a specific NaturalPerson in order to act (but the lifetime of the NaturalPerson has only to overlap that of the SocialPerson). + """ + + +class SpatioTemporalRegion(Base): + ... + + +class TypeCollection(Base): + """ + A Collection whose members are the maximal set of individuals that share the same (named) type, e.g. "the gem stones", "the Italians". + This class is very useful to apply a variety of the so-called "ClassesAsValues" design pattern, when it is used to talk about the extensional aspect of a class. An alternative variety of the pattern applies to the intensional aspect of a class, and the class Concept should be used instead. + """ + + +class UnitOfMeasure(Base): + """ + Units of measure are conceptualized here as parameters on regions, which can be valued as datatype values. + """ + + +class WorkflowExecution(Base): + ... + + diff --git a/src/pycrap/ontologies/dul/data_properties.py b/src/pycrap/ontologies/dul/data_properties.py new file mode 100644 index 000000000..81cc9ee05 --- /dev/null +++ b/src/pycrap/ontologies/dul/data_properties.py @@ -0,0 +1,43 @@ +from .dependencies import * +from .classes import * + + +class hasRegionDataValue(BaseProperty): + """ + A datatype property that encodes values for a Region, e.g. a float for the Region Height. + """ + +class hasDataValue(BaseProperty): + """ + A datatype property that encodes values from a datatype for an Entity. + There are several ways to encode values in DOLCE (Ultralite): + + 1) Directly assert an xsd:_ value to an Entity by using hasDataValue + 2) Assert a Region for an Entity by using hasRegion, and then assert an xsd:_ value to that Region, by using hasRegionDataValue + 3) Assert a Quality for an Entity by using hasQuality, then assert a Region for that Quality, and assert an xsd:_ value to that Region, by using hasRegionDataValue + 4) When the value is required, but not directly observed, assert a Parameter for an xsd:_ value by using hasParameterDataValue, and then associate the Parameter to an Entity by using isConstraintFor + 5) When the value is required, but not directly observed, you can also assert a Parameter for a Region by using parametrizes, and then assert an xsd:_ value to that Region, by using hasRegionDataValue + + The five approaches obey different requirements. + For example, a simple value can be easily asserted by using pattern (1), but if one needs to assert an interval between two values, a Region should be introduced to materialize that interval, as pattern (2) suggests. + Furthermore, if one needs to distinguish the individual Quality of a value, e.g. the particular nature of the density of a substance, pattern (3) can be used. + Patterns (4) and (5) should be used instead when a constraint or a selection is modeled, independently from the actual observation of values in the real world. + """ + +class hasEventDate(BaseProperty): + """ + A datatype property that encodes values from xsd:dateTime for an Event; a same Event can have more than one xsd:dateTime value: begin date, end date, date at which the interval holds, etc. + """ + +class hasIntervalDate(BaseProperty): + """ + A datatype property that encodes values from xsd:dateTime for a TimeInterval; a same TimeInterval can have more than one xsd:dateTime value: begin date, end date, date at which the interval holds, etc. + """ + +class hasParameterDataValue(BaseProperty): + """ + Parametrizes values from a datatype. For example, a Parameter MinimumAgeForDriving hasParameterDataValue 18 on datatype xsd:int, in the Italian traffic code. In this example, MinimumAgeForDriving isDefinedIn the Norm ItalianTrafficCodeAgeDriving. + More complex parametrization requires workarounds. E.g. AgeRangeForDrugUsage could parametrize data value: 14 to 50 on the datatype: xsd:int. Since complex datatypes are not allowed in OWL1.0, a solution to this can only work by creating two 'sub-parameters': MinimumAgeForDrugUsage (that hasParameterDataValue 14) and MaximumAgeForDrugUsage (that hasParameterDataValue 50), which are components of (cf. hasComponent) the main Parameter AgeRangeForDrugUsage. + Ordering on subparameters can be created by using or specializing the object property 'precedes'. + """ + diff --git a/src/pycrap/ontologies/dul/dependencies.py b/src/pycrap/ontologies/dul/dependencies.py new file mode 100644 index 000000000..49c3dc277 --- /dev/null +++ b/src/pycrap/ontologies/dul/dependencies.py @@ -0,0 +1 @@ +from ..base import * diff --git a/src/pycrap/ontologies/dul/individuals.py b/src/pycrap/ontologies/dul/individuals.py new file mode 100644 index 000000000..9de858d06 --- /dev/null +++ b/src/pycrap/ontologies/dul/individuals.py @@ -0,0 +1,7 @@ +from .dependencies import * +from .classes import * +from .object_properties import * +from .data_properties import * + + + diff --git a/src/pycrap/ontologies/dul/object_properties.py b/src/pycrap/ontologies/dul/object_properties.py new file mode 100644 index 000000000..63509a461 --- /dev/null +++ b/src/pycrap/ontologies/dul/object_properties.py @@ -0,0 +1,645 @@ +from .dependencies import * + + +class precedes(BaseProperty): + """ + A relation between entities, expressing a 'sequence' schema. + E.g. 'year 1999 precedes 2000', 'deciding what coffee to use' precedes 'preparing coffee', 'World War II follows World War I', 'in the Milan to Rome autoroute, Bologna precedes Florence', etc. + It can then be used between tasks, processes, time intervals, spatially locate objects, situations, etc. + Subproperties can be defined in order to distinguish the different uses. + """ + +class defines(BaseProperty): + """ + A relation between a Description and a Concept, e.g. a Workflow for a governmental Organization defines the Role 'officer', or 'the Italian Traffic Law defines the role Vehicle'. + """ + +class definesTask(BaseProperty): + """ + A relation between a description and a task, e.g. the recipe for a cake defines the task 'boil'. + """ + +class isDescribedBy(BaseProperty): + """ + The relation between an Entity and a Description: a Description gives a unity to a Collection of parts (the components), or constituents, by assigning a Role to each of them in the context of a whole Object (the system). + A same Entity can be given different descriptions, for example, an old cradle can be given a unifying Description based on the original aesthetic design, the functionality it was built for, or a new aesthetic functionality in which it can be used as a flower pot. + """ + +class associatedWith(BaseProperty): + """ + A catch-all object property, useful for alignment and querying purposes. + It is declared as both transitive and symmetric, in order to reason an a maximal closure of associations between individuals. + """ + +class follows(BaseProperty): + """ + A relation between entities, expressing a 'sequence' schema. + E.g. 'year 2000 follows 1999', 'preparing coffee' follows 'deciding what coffee to use', 'II World War follows I World War', etc. + It can be used between tasks, processes or time intervals, and subproperties would fit best in order to distinguish the different uses. + """ + +class isEventIncludedIn(BaseProperty): + ... + +class overlaps(BaseProperty): + """ + A schematic relation between any entities, e.g. 'the chest region overlaps with the abdomen region', 'my spoken words overlap with hers', 'the time of my leave overlaps with the time of your arrival', 'fibromyalgia overlaps with other conditions'. + Subproperties and restrictions can be used to specialize overlaps for objects, events, time intervals, etc. + """ + +class isLocationOf(BaseProperty): + """ + A generic, relative localization, holding between any entities. E.g. 'Rome is the seat of the Pope', 'the liver is the location of the tumor'. + For 'absolute' locations, see SpaceRegion + """ + +class definesRole(BaseProperty): + """ + A relation between a description and a role, e.g. the recipe for a cake defines the role 'ingredient'. + """ + +class describes(BaseProperty): + """ + The relation between a Description and an Entity : a Description gives a unity to a Collection of parts (the components), or constituents, by assigning a Role to each of them in the context of a whole Object (the system). + A same Entity can be given different descriptions, for example, an old cradle can be given a unifying Description based on the original aesthetic design, the functionality it was built for, or a new aesthetic functionality in which it can be used as a flower pot. + """ + +class includesEvent(BaseProperty): + """ + A relation between situations and events, e.g. 'this morning I've prepared my coffee and had my fingers burnt' (i.e.: the preparation of my coffee this morning included a burning of my fingers). + """ + +class hasMember(BaseProperty): + """ + A relation between collections and entities, e.g. 'my collection of saxophones includes an old Adolphe Sax original alto' (i.e. my collection has member an Adolphe Sax alto). + """ + +class hasConstituent(BaseProperty): + """ + 'Constituency' depends on some layering of the world described by the ontology. For example, scientific granularities (e.g. body-organ-tissue-cell) or ontological 'strata' (e.g. social-mental-biological-physical) are typical layerings. + Intuitively, a constituent is a part belonging to a lower layer. Since layering is actually a partition of the world described by the ontology, constituents are not properly classified as parts, although this kinship can be intuitive for common sense. + A desirable advantage of this distinction is that we are able to talk e.g. of physical constituents of non-physical objects (e.g. systems), while this is not possible in terms of parts. + Example of are the persons constituting a social system, the molecules constituting a person, the atoms constituting a river, etc. + In all these examples, we notice a typical discontinuity between the constituted and the constituent object: e.g. a social system is conceptualized at a different layer from the persons that constitute it, a person is conceptualized at a different layer from the molecules that constitute them, and a river is conceptualized at a different layer from the atoms that constitute it. + """ + +class hasRegion(BaseProperty): + """ + A relation between entities and regions, e.g. 'the number of wheels of that truck is 12', 'the time of the experiment is August 9th, 2004', 'the whale has been localized at 34 degrees E, 20 degrees S'. + """ + +class hasPart(BaseProperty): + """ + A schematic relation between any entities, e.g. 'the human body has a brain as part', '20th century contains year 1923', 'World War II includes the Pearl Harbour event'. + + Parthood should assume the basic properties of mereology: transitivity, antisymmetry, and reflexivity (propert Parthood of course misses reflexivity). + However, antisymmetry is not supported in OWL2 explicitly, therefore DUL has to adopt one of two patterns: + 1) dropping asymmetry axioms, while granting reflexivity: this means that symmetry is not enforced, but permitted for the case of reflexivity. Of course, in this way we cannot prevent symmetric usages of hasPart; + 2) dropping the reflexivity axiom, and enforce asymmetry: in this case, we would prevent all symmetric usages, but we loose the possibility of enforcing reflexivity, which is commonsensical in parthood. + In DUL, we adopt pattern #1 for partOf, and pattern #2 for properPartOf, which seems a good approximation: due to the lack of inheritance of property characteristics, each asymmetric hasPropertPart assertion would also be a reflexive hasPart assertion (reflexive reduction design pattern). + + Subproperties and restrictions can be used to specialize hasPart for objects, events, etc. + """ + +class hasQuality(BaseProperty): + """ + A relation between entities and qualities, e.g. 'Dmitri's skin is yellowish'. + """ + +class hasParameter(BaseProperty): + """ + A Concept can have a Parameter that constrains the attributes that a classified Entity can have in a certain Situation, e.g. a 4WheelDriver Role definedIn the ItalianTrafficLaw has a MinimumAge parameter on the Amount 16. + """ + +class hasComponent(BaseProperty): + """ + The hasProperPart relation without transitivity, holding between an Object (the system) and another (the component), and assuming a Design that structures the Object. + """ + +class directlyPrecedes(BaseProperty): + """ + The intransitive precedes relation. For example, Monday directly precedes Tuesday. Directness of precedence depends on the designer conceptualization. + """ + +class directlyFollows(BaseProperty): + """ + The intransitive follows relation. For example, Wednesday directly precedes Thursday. Directness of precedence depends on the designer conceptualization. + """ + +class isRelatedToConcept(BaseProperty): + """ + Any relation between concepts, e.g. superordinated, conceptual parthood, having a parameter, having a task, superordination, etc. + """ + +class involvesAgent(BaseProperty): + """ + Agent participation. + """ + +class includesObject(BaseProperty): + """ + A relation between situations and objects, e.g. 'this morning I've prepared my coffee and had my fingers burnt' (i.e.: the preparation of my coffee this morning included me). + """ + +class isReferenceOf(BaseProperty): + """ + A relation between information objects and any Entity (including information objects). It can be used to talk about e.g. entities are references of proper nouns: the proper noun 'Leonardo da Vinci' isAbout the Person Leonardo da Vinci; as well as to talk about sets of entities that can be described by a common noun: the common noun 'person' isAbout the set of all persons in a domain of discourse, which can be represented in DOLCE-Ultralite as an individual of the class: Collection . + The isReferenceOf relation is irreflexive, differently from its inverse isAbout. + """ + +class isSettingFor(BaseProperty): + """ + A relation between situations and entities, e.g. 'this morning I've prepared my coffee with a new fantastic Arabica', i.e.: the preparation of my coffee this morning is the setting for (an amount of) a new fantastic Arabica. + """ + +class hasParticipant(BaseProperty): + """ + A relation between an object and a process, e.g. 'John took part in the discussion', 'a large mass of snow fell during the avalanche', or 'a cook, some sugar, flour, etc. are all present in the cooking of a cake'. + """ + +class isRegionFor(BaseProperty): + """ + A relation between entities and regions, e.g. 'the color of my car is red'. + """ + +class isParticipantIn(BaseProperty): + """ + A relation between an object and a process, e.g. 'John took part in the discussion', 'a large mass of snow fell during the avalanche', or 'a cook, some sugar, flour, etc. are all present in the cooking of a cake'. + """ + +class isRoleDefinedIn(BaseProperty): + """ + A relation between a description and a role, e.g. the role 'Ingredient' is defined in the recipe for a cake. + """ + +class isConstituentOf(BaseProperty): + """ + 'Constituency' depends on some layering of the world described by the ontology. For example, scientific granularities (e.g. body-organ-tissue-cell) or ontological 'strata' (e.g. social-mental-biological-physical) are typical layerings. + Intuitively, a constituent is a part belonging to a lower layer. Since layering is actually a partition of the world described by the ontology, constituents are not properly classified as parts, although this kinship can be intuitive for common sense. + A desirable advantage of this distinction is that we are able to talk e.g. of physical constituents of non-physical objects (e.g. systems), while this is not possible in terms of parts. + Example of are the persons constituting a social system, the molecules constituting a person, the atoms constituting a river, etc. + In all these examples, we notice a typical discontinuity between the constituted and the constituent object: e.g. a social system is conceptualized at a different layer from the persons that constitute it, a person is conceptualized at a different layer from the molecules that constitute them, and a river is conceptualized at a different layer from the atoms that constitute it. + """ + +class isQualityOf(BaseProperty): + """ + A relation between entities and qualities, e.g. 'Dmitri's skin is yellowish'. + """ + +class isObjectIncludedIn(BaseProperty): + ... + +class isDefinedIn(BaseProperty): + """ + A relation between a Description and a Concept, e.g. a Workflow for a governmental Organization defines the Role 'officer', or 'the Italian Traffic Law defines the role Vehicle'. + """ + +class isRealizedBy(BaseProperty): + """ + A relation between an information realization and an information object, e.g. the paper copy of the Italian Constitution realizes the text of the Constitution. + """ + +class hasRole(BaseProperty): + """ + A relation between an object and a role, e.g. the person 'John' has role 'student'. + """ + +class isRoleOf(BaseProperty): + """ + A relation between an object and a role, e.g. 'student' is the role of 'John'. + """ + +class realizes(BaseProperty): + """ + A relation between an information realization and an information object, e.g. the paper copy of the Italian Constitution realizes the text of the Constitution. + """ + +class isParameterFor(BaseProperty): + """ + A Concept can have a Parameter that constrains the attributes that a classified Entity can have in a certain Situation, e.g. a 4WheelDriver Role definedIn the ItalianTrafficLaw has a MinimumAge parameter on the Amount 16. + """ + +class hasTask(BaseProperty): + """ + A relation between roles and tasks, e.g. 'students have the duty of giving exams' (i.e. the Role 'student' hasTask the Task 'giving exams'). + """ + +class hasLocation(BaseProperty): + """ + A generic, relative spatial location, holding between any entities. E.g. 'the cat is on the mat', 'Omar is in Samarcanda', 'the wound is close to the femural artery'. + For 'absolute' locations, see SpaceRegion + """ + +class isComponentOf(BaseProperty): + """ + The asymmetric isProperPartOf relation without transitivity, holding between an Object (the system) and another (the component), and assuming a Design that structures the Object. + """ + +class isClassifiedBy(BaseProperty): + """ + A relation between a Concept and an Entity, e.g. 'John is considered a typical rude man'; your last concert constitutes the achievement of a lifetime; '20-year-old means she's mature enough'. + """ + +class classifies(BaseProperty): + """ + A relation between a Concept and an Entity, e.g. the Role 'student' classifies a Person 'John'. + """ + +class isAbout(BaseProperty): + """ + A relation between an information object and an Entity (including information objects). It can be used to talk about entities that are references of proper nouns: the proper noun 'Leonardo da Vinci' isAbout the Person Leonardo da Vinci; as well as to talk about sets of entities that can be described by a common noun: the common noun 'person' isAbout the set of all persons in a domain of discourse, which can be represented in DOLCE-Ultralite as an individual of the class: dul:Collection. + A specific sentence may use common nouns with either a singular or plural reference, or it can even refer to all possible references (e.g. in a lexicographic definition): all those uses are kinds of aboutness. + + The isAbout relation is sometimes considered as reflexive, however this is semiotically inaccurate, because information can be about itself ('de dicto' usage, as in 'John is four character long'), but it is typically about something else ('de re' usage, as in 'John loves Mary'). + If a reflexivity exists in general, it rather concerns its realisation, which is always associated with an event, e.g. an utterance, which makes the information denoting itself, besides its aboutness. This is implemented in DUL with the dul:realizesSelfInformation property, which is used with local reflexivity in the dul:InformationRealization class. + """ + +class hasSetting(BaseProperty): + """ + A relation between entities and situations, e.g. 'this morning I've prepared my coffee with a new fantastic Arabica', i.e.: (an amount of) a new fantastic Arabica hasSetting the preparation of my coffee this morning. + """ + +class isTaskDefinedIn(BaseProperty): + """ + A relation between a description and a task, e.g. the task 'boil' is defined in a recipe for a cake. + """ + +class hasCommonBoundary(BaseProperty): + """ + A relation to encode either formal or informal characterizations of 'boundaries' common to two different entities: an Event that ends when another begins, two abstract regions that have a common topological boundary, two objects that are said to be 'in contact' from a commonsense perspective, etc. + """ + +class isTaskOf(BaseProperty): + """ + A relation between roles and tasks, e.g. 'students have the duty of giving exams' (i.e. the Role 'student' hasTask the Task 'giving exams'). + """ + +class hasPostcondition(BaseProperty): + """ + Direct succession applied to situations. + E.g., 'A postcondition of our Plan is to have things settled'. + """ + +class hasPrecondition(BaseProperty): + """ + Direct precedence applied to situations. + E.g., 'A precondition to declare war against a foreign country is claiming to find nuclear weapons in it'. + """ + +class actsFor(BaseProperty): + """ + The relation holding between any Agent, and a SocialAgent. In principle, a SocialAgent requires at least one PhysicalAgent in order to act, but this dependency can be 'delegated'; e.g. a university can be acted for by a department, which on its turm is acted for by physical agents. + """ + +class executesTask(BaseProperty): + """ + A relation between an action and a task, e.g. 'putting some water in a pot and putting the pot on a fire until the water starts bubbling' executes the task 'boiling'. + """ + +class expresses(BaseProperty): + """ + A relation between an InformationObject and a 'meaning', generalized here as a 'SocialObject'. For example: 'A Beehive is a structure in which bees are kept, typically in the form of a dome or box.' (Oxford dictionary)'; 'the term Beehive expresses the concept Beehive in my apiculture ontology'. + The intuition for 'meaning' is intended to be very broad. A separate, large comment is included for those who want to investigate more on what kind of meaning can be represented in what form. + This is a large comment field for those who want to investigate the different uses of the 'expresses' relation for modeling different approaches to meaning characterization and modeling. + For example, in all these cases, some aspect of meaning is involved: + + - Beehive means "a structure in which bees are kept, typically in the form of a dome or box." (Oxford dictionary) + - 'Beehive' is a synonym in noun synset 09218159 "beehive|hive" (WordNet) + - 'the term Beehive can be interpreted as the fact of 'being a beehive', i.e. a relation that holds for concepts such as Bee, Honey, Hosting, etc.' + - 'the text of Italian apiculture regulation expresses a rule by which beehives should be kept at least one kilometer away from inhabited areas' + - 'the term Beehive expresses the concept Beehive' + - ''Beehive' for apiculturists does not express the same meaning as for, say, fishermen' + - 'Your meaning of 'Beautiful' does not seem to fit mine' + - ''Beehive' is formally interpreted as the set of all beehives' + - 'from the term 'Beehive', we can build a vector space of statistically significant cooccurring terms in the documents that contain it' + - the lexeme 'Belly' expresses the role 'Body_Part' in the frame 'ObservableBodyParts' (FrameNet) + + As the examples suggest, the 'meaning of meaning' is dependent on the background approach/theory that one assumes. One can hardly make a summary of the too many approaches and theories of meaning, therefore this relation is maybe the most controversial and difficult to explain; normally, in such cases it would be better to give up formalizing. + However, the usefulness of having a 'semantic abstraction' in modeling information objects is so high (e.g. for the semantic web, interoperability, reengineering, etc.), that we accept this challenging task, although without taking any particular position in the debate. + We provide here some examples, which we want to generalize upon when using the 'expresses' relation to model semantic aspects of social reality. + + In the most common approach, lexicographers that write dictionaries, glossaries, etc. assume that the meaning of a term is a paraphrase (or 'gloss', or 'definition'). + Another approach is provided by concept schemes like thesauri and lexicons, which assume that the meaning of a term is a 'concept', encoded as a 'lemma', 'synset', or 'descriptor'. + Still another approach is that of psychologists and cognitive scientists, which often assume that the meaning of an information object is a concept encoded in the mind or cognitive system of an agent. + A radically different approach is taken by social scientists and semioticians, who usually assume that meanings of an information object are spread across the communication practices in which members of a community use that object. + Another approach that tackles the distributed nature of meaning is assumed by geometrical models of semantics, which assume that the meaning of an InformationObject (e.g. a word) results from the set of informational contexts (e.g. within texts) in which that object is used similarly. + The logical approach to meaning is still different, since it assumes that the meaning of e.g. a term is equivalent to the set of individuals that the term can be applied to; for example, the meaning of 'Ali' is e.g. an individual person called Ali, the meaning of 'Airplane' is e.g. the set of airplanes, etc. + Finally, an approach taken by structuralist linguistics and frame semantics is that a meaning is the relational context in which an information object can be applied; for example, a meaning of 'Airplane' is situated e.g. in the context ('frame') of passenger airline flights. + + These different approaches are not necessarily conflicting, and they mostly talk about different aspects of so-called 'semantics'. They can be summarized and modelled within DOLCE-Ultralite as follows (notice that such list is far from exhaustive): + + (1) Informal meaning (as for linguistic or commonsense semantics: a distinction is assumed between (informal) meaning and reference; see isAbout for an alternative pattern on reference) + - Paraphrase meaning (as for lexicographic semantics). Here it is modelled as the expresses relation between instances of InformationObject and different instances of InformationObject that act as 'paraphrases' + - Conceptual meaning (as for 'concept scheme' semantics). Here it is modelled as the expresses relation between instances of InformationObject and instances of Concept + - Relational meaning (as for frame semantics). Here it is modelled as the expresses relation between instances of InformationObject and instances of Description + - Cognitive meaning (as for 'psychological' semantics). Here it is modelled as the expresses relation between any instance of InformationObject and any different instance of InformationObject that isRealizedBy a mental, cognitive or neural state (depending on which theory of mind is assumed). Such states can be considered here as instances of Process (occurring in the mind, cognitive system, or neural system of an agent) + - Cultural meaning (as for 'social science' semantics). Here it is modelled as the expresses relation between instances of InformationObject and instances of SocialObject (institutions, cultural paradigms, norms, social practices, etc.) + - Distributional meaning (as for geometrical models of meaning). Here it is modelled as the expresses relation between any instance of InformationObject and any different instance of InformationObject that isFormallyRepresentedIn some (geometrical) Region (e.g. a vector space) + + (2) Formal meaning (as for logic and formal semantics: no distinction is assumed between informal meaning and reference, therefore between 'expresses' and 'isAbout', which can be used interchangeably) + - Object-level formal meaning (as in the traditional first-order logic semantics). Here it is modelled as the expresses relation between an instance of InformationObject and an instance of Collection that isGroundingFor (in most cases) a Set; isGroundingFor is defined in the ontology: http://www.ontologydesignpatterns.org/ont/dul/IOLite.owl + - Modal formal meaning (as in possible-world semantics). Here it is modelled as the expresses relation between an instance of InformationObject and an instance of Collection that isGroundingFor a Set, and which isPartOf some different instance of Collection that isGroundingFor a PossibleWorld + + This is only a first step to provide a framework, in which one can model different aspects of meaning. A more developed ontology should approach the problem of integrating the different uses of 'expresses', so that different theories, resources, methods can interoperate. + """ + +class isExecutedIn(BaseProperty): + """ + A relation between an action and a task, e.g. 'putting some water in a pot and putting the pot on a fire until the water starts bubbling' executes the task 'boiling'. + """ + +class isExpressedBy(BaseProperty): + """ + A relation between a dul:SocialObject (the 'meaning') and a dul:InformationObject (the 'expression'). + For example: 'A Beehive is a structure in which bees are kept, typically in the form of a dome or box.' (Oxford dictionary)'; 'the term Beehive expresses the concept Beehive in my apiculture ontology'. + The intuition for 'meaning' is intended to be very broad. A separate, large comment is included in the encoding of 'expresses', for those who want to investigate more on what kind of meaning can be represented in what form. + """ + +class isPartOf(BaseProperty): + """ + A relation between any entities, e.g. 'brain is a part of the human body'. See dul:hasPart for additional documentation. + """ + +class satisfies(BaseProperty): + """ + A relation between a Situation and a Description, e.g. the execution of a Plan satisfies that plan. + """ + +class realizesSelfInformation(BaseProperty): + """ + This relation is a workaround to enable local reflexivity axioms (Self) working with non-simple properties; in this case, dul:realizesInformation About. + """ + +class actsThrough(BaseProperty): + """ + The relation holding between a PhysicalAgent and a SocialAgent. In principle, a SocialAgent requires at least one PhysicalAgent in order to act, but this dependency can be 'delegated', e.g. a university can be acted for by a department, which is acted for by physical agents. AKA isActedBy + """ + +class characterizes(BaseProperty): + """ + A relation between concepts and collections, where a Concept is said to characterize a Collection; it corresponds to a link between the (reified) intensional and extensional interpretations of a _proper subset of_ a (reified) class. This is different from covers, because it refers to an interpretation the entire reified class. + E.g. the collection of vintage saxophones is characterized by the Concept 'manufactured by hand', while it gets covered by the Concept 'Saxophone' with the Parameter 'Vintage'. + """ + +class isCharacterizedBy(BaseProperty): + ... + +class conceptualizes(BaseProperty): + """ + A relation stating that an Agent is internally representing a SocialObject: situations, descriptions, concepts, etc. E.g., 'John believes in the conspiracy theory'; 'Niels Bohr created the solar-system metaphor for the atomic theory'; 'Jacques assumes all swans are white'; 'the task force members share the attack plan'. + Conceptualizations can be distinguished into different forms, primarily based on the type of SocialObject that is conceptualized. Descriptions and concepts can be 'assumed', situations can be 'believed' or 'known', plans can be 'adopted', etc. (see ontology: http://www.ontologydesignpatterns.org/ont/dul/Conceptualization.owl. + """ + +class isConceptualizedBy(BaseProperty): + """ + A relation stating that an Agent is internally representing a Description . E.g., 'John believes in the conspiracy theory'; 'Niels Bohr created a solar-system metaphor for his atomic theory'; 'Jacques assumes all swans are white'; 'the task force shares the attack plan'. + """ + +class concretelyExpresses(BaseProperty): + """ + A relation between an InformationRealization and a Description, e.g. 'the printout of the Italian Constitution concretelyExpresses the Italian Constitution'. It should be supplied also with a rule stating that the InformationRealization realizes an InformationObject that expresses the Description + """ + +class isConcretelyExpressedBy(BaseProperty): + """ + A relation between an InformationRealization and a Description, e.g. 'the printout of the Italian Constitution concretelyExpresses the Italian Constitution'. It should be supplied also with a rule stating that the InformationRealization realizes an InformationObject that expresses the Description + """ + +class coparticipatesWith(BaseProperty): + """ + A relation between two objects participating in a same Event; e.g., 'Vitas and Jimmy are playing tennis'. + """ + +class covers(BaseProperty): + """ + A relation between concepts and collections, where a Concept is said to cover a Collection; it corresponds to a link between the (reified) intensional and extensional interpretations of a (reified) class. + E.g. the collection of vintage saxophones is covered by the Concept 'Saxophone' with the Parameter 'Vintage'. + """ + +class isCoveredBy(BaseProperty): + """ + A relation between concepts and collections, where a Concept is said to cover a Collection; it corresponds to a link between the (reified) intensional and extensional interpretations of a (reified) class. + E.g. the collection of vintage saxophones is covered by the Concept 'Saxophone' with the Parameter 'Vintage'. + """ + +class usesConcept(BaseProperty): + """ + A generic relation holding between a Description and a Concept. In order to be used, a Concept must be previously definedIn another Description. This last condition cannot be encoded for object properties in OWL. + """ + +class expands(BaseProperty): + """ + A partial order relation that holds between descriptions. It represents the proper part relation between a description and another description featuring the same properties as the former, with at least one additional one. + Descriptions can be expanded either by adding other descriptions as parts, or by refining concepts that are used by them. + An 'intention' to expand must be present (unless purely formal theories are considered, but even in this case a criterion of relevance is usually active). + """ + +class isRelatedToDescription(BaseProperty): + """ + Any relation between descriptions. + """ + +class isExpandedIn(BaseProperty): + """ + A partial order relation that holds between descriptions. It represents the proper part relation between a description and another description featuring the same properties as the former, with at least one additional one. + Descriptions can be expanded either by adding other descriptions as parts, or by refining concepts that are used by them. + An 'intention' to expand must be present (unless purely formal theories are considered, but even in this case a criterion of relevance is usually active). + """ + +class expressesConcept(BaseProperty): + """ + A relation between an InformationObject and a Concept , e.g. the term "dog" expresses the Concept "dog". For expressing a relational meaning, see the more general object property: expresses + """ + +class isConceptExpressedBy(BaseProperty): + """ + A relation between an InformationObject and a Concept , e.g. the term "dog" expresses the Concept "dog". For expressing a relational meaning, see the more general object property: expresses + """ + +class farFrom(BaseProperty): + """ + Generic distance relation between any Entity(s). E.g. Rome is far from Beijing, astronomy is far from necromancy. + """ + +class hasProperPart(BaseProperty): + """ + Asymmetric (so including irreflexive) parthood. + """ + +class hasConstraint(BaseProperty): + """ + A relation between parameters and entities. It allows to assert generic constraints (encoded as parameters), e.g. MinimumAgeForDriving isConstraintFor John (where John is a legal subject under the TrafficLaw). + The intended semantics (not expressible in OWL) is that a Parameter isParameterFor a Concept that classifies an Entity; moreover, it entails that a Parameter parametrizes a Region that isRegionFor that Entity. + """ + +class isConstraintFor(BaseProperty): + """ + A relation between parameters and entities. It allows to assert generic constraints (encoded as parameters), e.g. MinimumAgeForDriving isConstraintFor John (where John is a legal subject under the TrafficLaw). + The intended semantics (not expressible in OWL) is that a Parameter isConstraintFor and Entity if the Parameter isParameterFor a Concept that classifies that Entity; moreover, it entails that a Parameter parametrizes a Region that isRegionFor that Entity. The use in OWL is therefore a shortcut to annotate what Parameter constrains what Entity + """ + +class isMemberOf(BaseProperty): + """ + A relation between collections and entities, e.g. 'the Night Watch by Rembrandt is in the Rijksmuseum collection'; 'Davide is member of the Pen Club', 'Igor is one the subjects chosen for the experiment'. + """ + +class includesWhole(BaseProperty): + ... + +class includesPart(BaseProperty): + ... + +class isPostconditionOf(BaseProperty): + """ + Direct succession applied to situations. + E.g., 'Taking some rest is a postcondition of my search for a hotel'. + """ + +class isPreconditionOf(BaseProperty): + """ + Direct precedence applied to situations. + E.g., 'claiming to find nuclear weapons in a foreign country is a precondition to declare war against it'. + """ + +class isPropertPartOf(BaseProperty): + """ + http://www.ontologydesignpatterns.org/ont/dul/DUL.owl + """ + +class hasTimeInterval(BaseProperty): + """ + The generic relation between events and time intervals. + """ + +class isTimeIntervalOf(BaseProperty): + """ + The generic relation between time intervals and events. + """ + +class includesAction(BaseProperty): + """ + A relation between situations and actions, e.g. 'this morning I've prepared my coffee and had my fingers burnt' (i.e.: the preparation of my coffee this morning included a burning of my fingers). + """ + +class isActionIncludedIn(BaseProperty): + ... + +class includesAgent(BaseProperty): + """ + A relation between situations and persons, e.g. 'this morning I've prepared my coffee and had my fingers burnt' (i.e.: the preparation of my coffee this morning included me). + """ + +class isAgentIncludedIn(BaseProperty): + ... + +class includesTime(BaseProperty): + """ + A relation between situations and time intervals, e.g. 'this morning I've prepared my coffee and had my fingers burnt' (i.e.: preparing my coffee was held this morning). A data value attached to the time interval typically complements this modelling pattern. + """ + +class isTimeIncludedIn(BaseProperty): + ... + +class introduces(BaseProperty): + """ + A relation between a Description and a SocialAgent, e.g. a Constitutional Charter introduces the SocialAgent 'PresidentOfRepublic'. + """ + +class isIntroducedBy(BaseProperty): + """ + A relation between a Description and a SocialAgent, e.g. a Constitutional Charter introduces the SocialAgent 'PresidentOfRepublic'. + """ + +class isAgentInvolvedIn(BaseProperty): + """ + Agent participation. + """ + +class isConceptUsedIn(BaseProperty): + """ + A more generic relation holding between a Description and a Concept. In order to be used, a Concept must be previously definedIn another Description + """ + +class isObservableAt(BaseProperty): + """ + A relation to represent a (past, present or future) TimeInterval at which an Entity is observable. + In order to encode a specific time, a data value should be related to the TimeInterval. + An alternative way of representing time is the datatype property: hasIntervalDate + """ + +class isTimeOfObservationOf(BaseProperty): + """ + A relation to represent a (past, present or future) TimeInterval at which an Entity is observable. + In order to encode a specific time, a data value should be related to the TimeInterval. + An alternative way of representing time is the datatype property: hasIntervalDate + """ + +class isParametrizedBy(BaseProperty): + """ + The relation between a Parameter, e.g. 'MajorAge', and a Region, e.g. '>17 year'. + """ + +class parametrizes(BaseProperty): + """ + The relation between a Parameter, e.g. 'MajorAgeLimit', and a Region, e.g. '18_year'. + For a more data-oriented relation, see hasDataValue + """ + +class isReferenceOfInformationRealizedBy(BaseProperty): + """ + The relation between entities and information realizations, e.g. between Italy and a paper copy of the text of the Italian Constitution. + """ + +class realizesInformationAbout(BaseProperty): + """ + The relation between entities and information realizations, e.g. between Italy and a paper copy of the text of the Italian Constitution. + """ + +class isSatisfiedBy(BaseProperty): + """ + A relation between a Situation and a Description, e.g. the execution of a Plan satisfies that plan. + """ + +class isSpecializedBy(BaseProperty): + """ + A partial order relation that holds between social objects. It represents the subsumption relation between e.g. a Concept and another Concept that is broader in extensional interpretation, but narrowe in intensional interpretation. + E.g. PhDStudent Role specializes Student Role + """ + +class specializes(BaseProperty): + """ + A partial order relation that holds between social objects. + It mainly represents the subsumption relation between e.g. a Concept or Description and another Concept (resp. Description) that is broader in extensional interpretation, but narrower in intensional interpretation. For example, the role PhDStudent specializes the role Student. + Another possible use is between a Collection that isCoveredBy a Concept A, and another Collection that isCoveredBy a Concept B that on its turm specializes A. For example, the 70,000 series Selmer Mark VI saxophone Collection specializes the Selmer Mark VI saxophone Collection. + """ + +class isSubordinatedTo(BaseProperty): + """ + Direct succession applied to concepts. E.g. the role 'Officer' is subordinated to 'Director'. + """ + +class isSuperordinatedTo(BaseProperty): + """ + Direct precedence applied to concepts. E.g. the role 'Executive' is superordinated to 'DepartmentManager'. + """ + +class isUnifiedBy(BaseProperty): + """ + A Collection has a unification criterion, provided by a Description; for example, a community of practice can be unified by a shared theory or interest, e.g. the community that makes research on mirror neurons shares some core knowledge about mirror neurons, which can be represented as a Description MirrorNeuronTheory that unifies the community. There can be several unifying descriptions. + """ + +class unifies(BaseProperty): + """ + A Collection has a unification criterion, provided by a Description; for example, a community of practice can be unified by a shared theory or interest, e.g. the community that makes research on mirror neurons shares some core knowledge about mirror neurons, which can be represented as a Description MirrorNeuronTheory that unifies the community. There can be several unifying descriptions. + """ + +class nearTo(BaseProperty): + """ + Generic distance relation between any Entity(s). E.g. Rome is near to Florence, astronomy is near to physics. + """ + +class sameSettingAs(BaseProperty): + """ + A relation between two entities participating in a same Situation; e.g., 'Our company provides an antivenom service' (the situation is the service, the two entities are the company and the antivenom). + """ + diff --git a/src/pycrap/ontologies/dul/restrictions.py b/src/pycrap/ontologies/dul/restrictions.py new file mode 100644 index 000000000..1f05bc962 --- /dev/null +++ b/src/pycrap/ontologies/dul/restrictions.py @@ -0,0 +1,625 @@ +from .dependencies import * +from .classes import * +from .individuals import * + + + +Concept.is_a = [SocialObject, isDefinedIn.some(Description), hasPart.only(Concept)] + +Task.is_a = [EventType, hasPart.only(Task), isExecutedIn.only(Action), isTaskDefinedIn.only(Description), isTaskOf.only(Role)] + +Role.is_a = [Concept, classifies.only(Object), hasPart.only(Role)] + +Entity.is_a = [Thing] + +Event.is_a = [Entity, hasParticipant.some(Object), hasTimeInterval.some(TimeInterval), hasConstituent.only(Event), hasPart.only(Event)] + +Transition.is_a = [Situation, includesEvent.some(Event), includesObject.some(Object), isSettingFor.some(Process), isSettingFor.some(Situation & precedes.some(Event & precedes.some(Situation))), includesTime.min(3, TimeInterval), isSettingFor.min(2, Situation)] + +PhysicalObject.is_a = [Object, hasPart.only(PhysicalObject)] + +Description.is_a = [SocialObject] + +EventType.is_a = [Concept, classifies.only(Event)] + +Parameter.is_a = [Concept, classifies.only(Region), hasPart.only(Parameter)] + +InformationObject.is_a = [InformationEntity, SocialObject] + +Quality.is_a = [Entity, hasRegion.some(Region), isQualityOf.some(Entity), hasConstituent.only(Quality), hasPart.only(Quality)] + +Collection.is_a = [SocialObject, hasPart.only(Collection)] + +Action.is_a = [Event, hasParticipant.some(Agent), executesTask.min(1, Thing)] + +Region.is_a = [Abstract, hasConstituent.only(Region), hasPart.only(Region), overlaps.only(Region), precedes.only(Region)] + +Object.is_a = [Entity, hasLocation.some(Entity), isParticipantIn.some(Event), hasConstituent.only(Object), hasPart.only(Object), isClassifiedBy.only(Role)] + +Workflow.is_a = [Plan, definesRole.some(Role), definesTask.some(Task)] + +Goal.is_a = [Description] + +Situation.is_a = [Entity, satisfies.some(Description)] + +Process.is_a = [Event] + +Agent.is_a = [Object] + +SpaceRegion.is_a = [Region] + +Relation.is_a = [Description] + +PhysicalArtifact.is_a = [PhysicalObject, isDescribedBy.some(Plan)] + +PhysicalPlace.is_a = [PhysicalObject] + +Design.is_a = [Description] + +Plan.is_a = [Description, hasComponent.some(Goal)] + +InformationRealization.is_a = [InformationEntity, Event | PhysicalObject | Quality, realizes.some(InformationObject), realizesSelfInformation.has_self()] + +TimeInterval.is_a = [Region] + +PhysicalAttribute.is_a = [Region, isRegionFor.only(PhysicalObject)] + +DesignedArtifact.is_a = [PhysicalArtifact, isDescribedBy.some(Design)] + +PhysicalAgent.is_a = [Agent, PhysicalObject] + +Diagnosis.is_a = [Description] + +SocialObject.is_a = [Object, isExpressedBy.some(InformationObject), hasPart.only(SocialObject)] + +Configuration.is_a = [Collection] + +Substance.is_a = [PhysicalBody] + +PhysicalBody.is_a = [PhysicalObject] + +Organism.is_a = [BiologicalObject, PhysicalAgent] + +FormalEntity.is_a = [Abstract] + +SocialRelation.is_a = [Relation] + +SocialObjectAttribute.is_a = [Region, isRegionFor.only(SocialObject)] + +Theory.is_a = [Description, hasComponent.some(Relation)] + +Set.is_a = [FormalEntity] + +SocialAgent.is_a = [Agent, SocialObject, actsThrough.some(PhysicalAgent)] + +Abstract.is_a = [Entity] + +Amount.is_a = [Region] + +BiologicalObject.is_a = [PhysicalBody] + +ChemicalObject.is_a = [PhysicalBody] + +Classification.is_a = [TimeIndexedRelation, isSettingFor.some(Concept), isSettingFor.some(Entity), isSettingFor.some(TimeInterval)] + +TimeIndexedRelation.is_a = [Situation] +TimeIndexedRelation.equivalent_to = [Situation & isSettingFor.some(TimeInterval)] + +Collective.is_a = [Collection, hasMember.only(Agent)] + +CollectiveAgent.is_a = [SocialAgent, actsThrough.some(Agent), isIntroducedBy.some(Description)] + +Community.is_a = [CollectiveAgent] + +Contract.is_a = [Description] + +DesignedSubstance.is_a = [DesignedArtifact, FunctionalSubstance] + +FunctionalSubstance.is_a = [Substance] + +Group.is_a = [CollectiveAgent, isDescribedBy.some(Plan)] + +InformationEntity.is_a = [Entity] + +LocalConcept.is_a = [Concept] + +Method.is_a = [Description] + +Narrative.is_a = [Description] + +NaturalPerson.is_a = [Person, PhysicalAgent] + +Person.is_a = [Agent] + +Norm.is_a = [Description] + +ObjectAggregate.is_a = [Thing, Object & hasPart.some(Object & isMemberOf.some(Collection))] + +Organization.is_a = [SocialAgent] + +Parthood.is_a = [TimeIndexedRelation, includesPart.some(Entity), includesWhole.some(Entity)] + +Pattern.is_a = [Relation] + +Personification.is_a = [SocialAgent] + +Place.is_a = [SocialObject, isLocationOf.min(1, Thing)] + +PlanExecution.is_a = [Situation] +PlanExecution.equivalent_to = [satisfies.some(Plan)] + +Project.is_a = [Plan, definesRole.some(Role), definesTask.some(Task)] + +Right.is_a = [Description, definesRole.min(2, Thing), definesTask.min(1, Thing)] + +SocialPerson.is_a = [Person, SocialAgent, actsThrough.exactly(1, Thing)] + +SpatioTemporalRegion.is_a = [Region, hasConstituent.some(SpaceRegion), hasConstituent.some(TimeInterval)] + +TypeCollection.is_a = [Collection] + +UnitOfMeasure.is_a = [Parameter, parametrizes.some(Region)] + +WorkflowExecution.is_a = [Situation] +WorkflowExecution.equivalent_to = [satisfies.some(Workflow)] + +hasRegionDataValue.is_a = [DatatypeProperty, hasDataValue] +hasRegionDataValue.domain = [Region] + +hasDataValue.is_a = [DatatypeProperty] +hasDataValue.domain = [Entity] + +hasEventDate.is_a = [DatatypeProperty, hasDataValue] +hasEventDate.domain = [Event] +hasEventDate.range = [] + +hasIntervalDate.is_a = [DatatypeProperty, hasRegionDataValue] +hasIntervalDate.domain = [TimeInterval] +hasIntervalDate.range = [] + +hasParameterDataValue.is_a = [DatatypeProperty, hasDataValue] +hasParameterDataValue.domain = [Parameter] + +precedes.is_a = [ObjectProperty, TransitiveProperty, associatedWith] +precedes.domain = [Entity] +precedes.range = [Entity] + +defines.is_a = [ObjectProperty, usesConcept] +defines.domain = [Description] +defines.range = [Concept] + +definesTask.is_a = [ObjectProperty, defines] +definesTask.domain = [Description] +definesTask.range = [Task] + +isDescribedBy.is_a = [ObjectProperty, associatedWith] +isDescribedBy.domain = [Entity] +isDescribedBy.range = [Description] + +associatedWith.is_a = [ObjectProperty, SymmetricProperty, TransitiveProperty] +associatedWith.domain = [Entity] +associatedWith.range = [Entity] + +follows.is_a = [ObjectProperty, TransitiveProperty, associatedWith] +follows.domain = [Entity] +follows.range = [Entity] + +isEventIncludedIn.is_a = [ObjectProperty, hasSetting] +isEventIncludedIn.domain = [Event] +isEventIncludedIn.range = [Situation] + +overlaps.is_a = [ObjectProperty, SymmetricProperty, associatedWith] +overlaps.domain = [Entity] +overlaps.range = [Entity] + +isLocationOf.is_a = [ObjectProperty, associatedWith] +isLocationOf.domain = [Entity] +isLocationOf.range = [Entity] + +definesRole.is_a = [ObjectProperty, defines] +definesRole.domain = [Description] +definesRole.range = [Role] + +describes.is_a = [ObjectProperty, associatedWith] +describes.domain = [Description] +describes.range = [Entity] + +includesEvent.is_a = [ObjectProperty, isSettingFor] +includesEvent.domain = [Situation] +includesEvent.range = [Event] + +hasMember.is_a = [ObjectProperty, associatedWith] +hasMember.domain = [Collection] +hasMember.range = [Entity] + +hasConstituent.is_a = [ObjectProperty, associatedWith] +hasConstituent.domain = [Entity] +hasConstituent.range = [Entity] + +hasRegion.is_a = [ObjectProperty, associatedWith] +hasRegion.domain = [Entity] +hasRegion.range = [Region] + +hasPart.is_a = [ObjectProperty, TransitiveProperty, ReflexiveProperty, associatedWith] +hasPart.domain = [Entity] +hasPart.range = [Entity] + +hasQuality.is_a = [ObjectProperty, associatedWith] +hasQuality.domain = [Entity] +hasQuality.range = [Quality] + +hasParameter.is_a = [ObjectProperty, isRelatedToConcept] +hasParameter.domain = [Concept] +hasParameter.range = [Parameter] + +hasComponent.is_a = [ObjectProperty, AsymmetricProperty, hasProperPart] +hasComponent.domain = [Entity] +hasComponent.range = [Entity] + +directlyPrecedes.is_a = [ObjectProperty, precedes] +directlyPrecedes.domain = [Entity] +directlyPrecedes.range = [Entity] + +directlyFollows.is_a = [ObjectProperty, follows] +directlyFollows.domain = [Entity] +directlyFollows.range = [Entity] + +isRelatedToConcept.is_a = [ObjectProperty, SymmetricProperty, associatedWith] +isRelatedToConcept.domain = [Concept] +isRelatedToConcept.range = [Concept] + +involvesAgent.is_a = [ObjectProperty, hasParticipant] +involvesAgent.domain = [Event] +involvesAgent.range = [Agent] + +includesObject.is_a = [ObjectProperty, isSettingFor] +includesObject.domain = [Situation] +includesObject.range = [Object] + +isReferenceOf.is_a = [ObjectProperty, associatedWith] +isReferenceOf.domain = [Entity] +isReferenceOf.range = [InformationObject] + +isSettingFor.is_a = [ObjectProperty, associatedWith] +isSettingFor.domain = [Situation] +isSettingFor.range = [Entity] + +hasParticipant.is_a = [ObjectProperty, associatedWith] +hasParticipant.domain = [Event] +hasParticipant.range = [Object] + +isRegionFor.is_a = [ObjectProperty, associatedWith] +isRegionFor.domain = [Region] +isRegionFor.range = [Entity] + +isParticipantIn.is_a = [ObjectProperty, associatedWith] +isParticipantIn.domain = [Object] +isParticipantIn.range = [Event] + +isRoleDefinedIn.is_a = [ObjectProperty, isDefinedIn] +isRoleDefinedIn.domain = [Role] +isRoleDefinedIn.range = [Description] + +isConstituentOf.is_a = [ObjectProperty, associatedWith] +isConstituentOf.domain = [Entity] +isConstituentOf.range = [Entity] + +isQualityOf.is_a = [ObjectProperty, associatedWith] +isQualityOf.domain = [Quality] +isQualityOf.range = [Entity] + +isObjectIncludedIn.is_a = [ObjectProperty, hasSetting] +isObjectIncludedIn.domain = [Object] +isObjectIncludedIn.range = [Situation] + +isDefinedIn.is_a = [ObjectProperty, isConceptUsedIn] +isDefinedIn.domain = [Concept] +isDefinedIn.range = [Description] + +isRealizedBy.is_a = [ObjectProperty, associatedWith] +isRealizedBy.domain = [InformationObject] +isRealizedBy.range = [InformationRealization] + +hasRole.is_a = [ObjectProperty, isClassifiedBy] +hasRole.domain = [Object] +hasRole.range = [Role] + +isRoleOf.is_a = [ObjectProperty, classifies] +isRoleOf.domain = [Role] +isRoleOf.range = [Object] + +realizes.is_a = [ObjectProperty, associatedWith] +realizes.domain = [InformationRealization] +realizes.range = [InformationObject] + +isParameterFor.is_a = [ObjectProperty, isRelatedToConcept] +isParameterFor.domain = [Parameter] +isParameterFor.range = [Concept] + +hasTask.is_a = [ObjectProperty, isRelatedToConcept] +hasTask.domain = [Role] +hasTask.range = [Task] + +hasLocation.is_a = [ObjectProperty, associatedWith] +hasLocation.domain = [Entity] +hasLocation.range = [Entity] + +isComponentOf.is_a = [ObjectProperty, AsymmetricProperty, isPropertPartOf] +isComponentOf.domain = [Entity] +isComponentOf.range = [Entity] + +isClassifiedBy.is_a = [ObjectProperty, associatedWith] +isClassifiedBy.domain = [Entity] +isClassifiedBy.range = [Concept] + +classifies.is_a = [ObjectProperty, associatedWith] +classifies.domain = [Concept] +classifies.range = [Entity] + +isAbout.is_a = [ObjectProperty, associatedWith] +isAbout.domain = [InformationObject] +isAbout.range = [Entity] + +hasSetting.is_a = [ObjectProperty, associatedWith] +hasSetting.domain = [Entity] +hasSetting.range = [Situation] + +isTaskDefinedIn.is_a = [ObjectProperty, isDefinedIn] +isTaskDefinedIn.domain = [Task] +isTaskDefinedIn.range = [Description] + +hasCommonBoundary.is_a = [ObjectProperty, SymmetricProperty, associatedWith] +hasCommonBoundary.domain = [Entity] +hasCommonBoundary.range = [Entity] + +isTaskOf.is_a = [ObjectProperty, isRelatedToConcept] +isTaskOf.domain = [Task] +isTaskOf.range = [Role] + +hasPostcondition.is_a = [ObjectProperty, directlyPrecedes] +hasPostcondition.domain = [Event | Situation] +hasPostcondition.range = [Event | Situation] + +hasPrecondition.is_a = [ObjectProperty, directlyFollows] +hasPrecondition.domain = [Event | Situation] +hasPrecondition.range = [Event | Situation] + +actsFor.is_a = [ObjectProperty, associatedWith] +actsFor.domain = [Agent] +actsFor.range = [SocialAgent] + +executesTask.is_a = [ObjectProperty, isClassifiedBy] +executesTask.domain = [Action] +executesTask.range = [Task] + +expresses.is_a = [ObjectProperty, associatedWith] +expresses.domain = [InformationObject] +expresses.range = [SocialObject] + +isExecutedIn.is_a = [ObjectProperty, classifies] +isExecutedIn.domain = [Task] +isExecutedIn.range = [Action] + +isExpressedBy.is_a = [ObjectProperty, associatedWith] +isExpressedBy.domain = [SocialObject] +isExpressedBy.range = [InformationObject] + +isPartOf.is_a = [ObjectProperty, TransitiveProperty, ReflexiveProperty, associatedWith] +isPartOf.domain = [Entity] +isPartOf.range = [Entity] + +satisfies.is_a = [ObjectProperty, associatedWith] +satisfies.domain = [Situation] +satisfies.range = [Description] + +realizesSelfInformation.is_a = [ObjectProperty, realizesInformationAbout] + +actsThrough.is_a = [ObjectProperty, associatedWith] +actsThrough.domain = [SocialAgent] +actsThrough.range = [Agent] + +characterizes.is_a = [ObjectProperty, associatedWith] +characterizes.domain = [Concept] +characterizes.range = [Collection] + +isCharacterizedBy.is_a = [ObjectProperty, associatedWith] +isCharacterizedBy.domain = [Collection] +isCharacterizedBy.range = [Concept] + +conceptualizes.is_a = [ObjectProperty, associatedWith] +conceptualizes.domain = [Agent] +conceptualizes.range = [SocialObject] + +isConceptualizedBy.is_a = [ObjectProperty, associatedWith] +isConceptualizedBy.domain = [SocialObject] +isConceptualizedBy.range = [Agent] + +concretelyExpresses.is_a = [ObjectProperty, associatedWith] +concretelyExpresses.domain = [InformationRealization] +concretelyExpresses.range = [SocialObject] + +isConcretelyExpressedBy.is_a = [ObjectProperty, associatedWith] +isConcretelyExpressedBy.domain = [SocialObject] +isConcretelyExpressedBy.range = [InformationRealization] + +coparticipatesWith.is_a = [ObjectProperty, SymmetricProperty, associatedWith] +coparticipatesWith.domain = [Object] +coparticipatesWith.range = [Object] + +covers.is_a = [ObjectProperty, associatedWith] +covers.domain = [Concept] +covers.range = [Collection] + +isCoveredBy.is_a = [ObjectProperty, associatedWith] +isCoveredBy.domain = [Collection] +isCoveredBy.range = [Concept] + +usesConcept.is_a = [ObjectProperty, associatedWith] +usesConcept.domain = [Description] +usesConcept.range = [Concept] + +expands.is_a = [ObjectProperty, isRelatedToDescription] +expands.domain = [Description] +expands.range = [Description] + +isRelatedToDescription.is_a = [ObjectProperty, SymmetricProperty, associatedWith] +isRelatedToDescription.domain = [Description] +isRelatedToDescription.range = [Description] + +isExpandedIn.is_a = [ObjectProperty, isRelatedToDescription] +isExpandedIn.domain = [Description] +isExpandedIn.range = [Description] + +expressesConcept.is_a = [ObjectProperty, expresses] +expressesConcept.domain = [InformationObject] +expressesConcept.range = [Concept] + +isConceptExpressedBy.is_a = [ObjectProperty, isExpressedBy] +isConceptExpressedBy.domain = [Concept] +isConceptExpressedBy.range = [InformationObject] + +farFrom.is_a = [ObjectProperty, SymmetricProperty, associatedWith] +farFrom.domain = [Entity] +farFrom.range = [Entity] + +hasProperPart.is_a = [ObjectProperty, TransitiveProperty, hasPart] + +hasConstraint.is_a = [ObjectProperty, isClassifiedBy] +hasConstraint.domain = [Entity] +hasConstraint.range = [Parameter] + +isConstraintFor.is_a = [ObjectProperty, classifies] +isConstraintFor.domain = [Parameter] +isConstraintFor.range = [Entity] + +isMemberOf.is_a = [ObjectProperty, associatedWith] +isMemberOf.domain = [Entity] +isMemberOf.range = [Collection] + +includesWhole.is_a = [ObjectProperty, isSettingFor] + +includesPart.is_a = [ObjectProperty, isSettingFor] + +isPostconditionOf.is_a = [ObjectProperty, directlyFollows] +isPostconditionOf.domain = [Event | Situation] +isPostconditionOf.range = [Event | Situation] + +isPreconditionOf.is_a = [ObjectProperty, directlyPrecedes] +isPreconditionOf.domain = [Event | Situation] +isPreconditionOf.range = [Event | Situation] + +isPropertPartOf.is_a = [ObjectProperty, TransitiveProperty, isPartOf] + +hasTimeInterval.is_a = [ObjectProperty, hasRegion] +hasTimeInterval.domain = [Event] +hasTimeInterval.range = [TimeInterval] + +isTimeIntervalOf.is_a = [ObjectProperty, isRegionFor] +isTimeIntervalOf.domain = [TimeInterval] +isTimeIntervalOf.range = [Event] + +includesAction.is_a = [ObjectProperty, includesEvent] +includesAction.domain = [Situation] +includesAction.range = [Action] + +isActionIncludedIn.is_a = [ObjectProperty, isEventIncludedIn] +isActionIncludedIn.domain = [Action] +isActionIncludedIn.range = [Situation] + +includesAgent.is_a = [ObjectProperty, includesObject] +includesAgent.domain = [Situation] +includesAgent.range = [Agent] + +isAgentIncludedIn.is_a = [ObjectProperty, isObjectIncludedIn] +isAgentIncludedIn.domain = [Agent] +isAgentIncludedIn.range = [Situation] + +includesTime.is_a = [ObjectProperty, isSettingFor] +includesTime.domain = [Situation] +includesTime.range = [TimeInterval] + +isTimeIncludedIn.is_a = [ObjectProperty, hasSetting] +isTimeIncludedIn.domain = [TimeInterval] +isTimeIncludedIn.range = [Situation] + +introduces.is_a = [ObjectProperty, associatedWith] +introduces.domain = [Description] +introduces.range = [SocialAgent] + +isIntroducedBy.is_a = [ObjectProperty, associatedWith] +isIntroducedBy.domain = [SocialAgent] +isIntroducedBy.range = [Description] + +isAgentInvolvedIn.is_a = [ObjectProperty, isParticipantIn] +isAgentInvolvedIn.domain = [Agent] +isAgentInvolvedIn.range = [Event] + +isConceptUsedIn.is_a = [ObjectProperty, associatedWith] +isConceptUsedIn.domain = [Concept] +isConceptUsedIn.range = [Description] + +isObservableAt.is_a = [ObjectProperty, hasRegion] +isObservableAt.domain = [Entity] +isObservableAt.range = [TimeInterval] + +isTimeOfObservationOf.is_a = [ObjectProperty, isRegionFor] +isTimeOfObservationOf.domain = [TimeInterval] +isTimeOfObservationOf.range = [Entity] + +isParametrizedBy.is_a = [ObjectProperty, isClassifiedBy] +isParametrizedBy.domain = [Region] +isParametrizedBy.range = [Parameter] + +parametrizes.is_a = [ObjectProperty, classifies] +parametrizes.domain = [Parameter] +parametrizes.range = [Region] + +isReferenceOfInformationRealizedBy.is_a = [ObjectProperty, associatedWith] +isReferenceOfInformationRealizedBy.domain = [Entity] +isReferenceOfInformationRealizedBy.range = [InformationRealization] + +realizesInformationAbout.is_a = [ObjectProperty, associatedWith] +realizesInformationAbout.domain = [InformationRealization] +realizesInformationAbout.range = [Entity] + +isSatisfiedBy.is_a = [ObjectProperty, associatedWith] +isSatisfiedBy.domain = [Description] +isSatisfiedBy.range = [Situation] + +isSpecializedBy.is_a = [ObjectProperty, TransitiveProperty, associatedWith] +isSpecializedBy.domain = [SocialObject] +isSpecializedBy.range = [SocialObject] + +specializes.is_a = [ObjectProperty, TransitiveProperty, associatedWith] +specializes.domain = [SocialObject] +specializes.range = [SocialObject] + +isSubordinatedTo.is_a = [ObjectProperty, directlyFollows, isRelatedToConcept] +isSubordinatedTo.domain = [Concept] +isSubordinatedTo.range = [Concept] + +isSuperordinatedTo.is_a = [ObjectProperty, directlyPrecedes, isRelatedToConcept] +isSuperordinatedTo.domain = [Concept] +isSuperordinatedTo.range = [Concept] + +isUnifiedBy.is_a = [ObjectProperty, associatedWith] +isUnifiedBy.domain = [Collection] +isUnifiedBy.range = [Description] + +unifies.is_a = [ObjectProperty, associatedWith] +unifies.domain = [Description] +unifies.range = [Collection] + +nearTo.is_a = [ObjectProperty, SymmetricProperty, associatedWith] +nearTo.domain = [Entity] +nearTo.range = [Entity] + +sameSettingAs.is_a = [ObjectProperty, SymmetricProperty, associatedWith] +sameSettingAs.domain = [Entity] +sameSettingAs.range = [Entity] + + + + + + diff --git a/src/pycrap/ontologies/soma/__init__.py b/src/pycrap/ontologies/soma/__init__.py new file mode 100644 index 000000000..322f45daf --- /dev/null +++ b/src/pycrap/ontologies/soma/__init__.py @@ -0,0 +1,4 @@ +from .classes import * +from .object_properties import * +from .data_properties import * +from .individuals import * diff --git a/src/pycrap/ontologies/soma/classes.py b/src/pycrap/ontologies/soma/classes.py new file mode 100644 index 000000000..154cea66d --- /dev/null +++ b/src/pycrap/ontologies/soma/classes.py @@ -0,0 +1,3644 @@ +from .dependencies import * + + +class Affordance(Base): + """ + A relation between an object (the bearer) and others (the triggers) that describes the disposition of the bearer to be involved in an action execution that also involves some trigger object. + """ + + +class Concept(Base): + """ + A Concept is a SocialObject, and isDefinedIn some Description; once defined, a Concept can be used in other Description(s). If a Concept isDefinedIn exactly one Description, see the LocalConcept class. + The classifies relation relates Concept(s) to Entity(s) at some TimeInterval + """ + + +class Task(Base): + """ + An EventType that classifies an Action to be executed. + For example, reaching a destination is a task that can be executed by performing certain actions, e.g. driving a car, buying a train ticket, etc. + The actions to execute a task can also be organized according to a Plan that is not the same as the one that defines the task (if any). + For example, reaching a destination could be defined by a plan to get on holidays, while the plan to execute the task can consist of putting some travels into a sequence. + """ + + +class Disposition(Base): + """ + The tendency of an object (the bearer) to make certain events happen with others (the triggers). + extrinsic + """ + + +class Role(Base): + """ + A Concept that classifies an Object + """ + + +class Setpoint(Base): + """ + Classifies some dedicated goal region. + """ + + +class Entity(Base): + """ + Anything: real, possible, or imaginary, which some modeller wants to talk about for some purpose. + """ + + +class Answer(Base): + """ + A role that is played by an Information Realization answering some query. + """ + + +class Message(Base): + """ + A message is a discrete unit of communication intended by the source for consumption by some recipient or group of recipients (Source: https://en.wikipedia.org/wiki/Message). + + Note that the Role Message classifies the Information Realization, not the content. + """ + + +class Event(Base): + """ + Any physical, social, or mental process, event, or state. + + More theoretically, events can be classified in different ways, possibly based on 'aspect' (e.g. stative, continuous, accomplishement, achievement, etc.), on 'agentivity' (e.g. intentional, natural, etc.), or on 'typical participants' (e.g. human, physical, abstract, food, etc.). + Here no special direction is taken, and the following explains why: events are related to observable situations, and they can have different views at a same time. + If a position has to be suggested here anyway, the participant-based classification of events seems the most stable and appropriate for many modelling problems. + + (1) Alternative aspectual views + + Consider a same event 'rock erosion in the Sinni valley': it can be conceptualized as an accomplishment (what has brought a certain state to occur), as an achievement (the state resulting from a previous accomplishment), as a punctual event (if we collapse the time interval of the erosion into a time point), or as a transition (something that has changed from a state to a different one). + In the erosion case, we could therefore have good motivations to shift from one aspect to another: a) causation focus, b) effectual focus, c) historical condensation, d) transition (causality). + + The different views refer to the same event, but are still different: how to live with this seeming paradox? + A typical solution e.g. in linguistics (cf. Levin's aspectual classes) and in DOLCE Full (cf. WonderWeb D18 axiomatization) is to classify events based on aspectual differences. But this solution would create different identities for a same event, where the difference is only based on the modeller's attitude. + An alternative solution is suggested here, and exploits the notion of (observable) Situation; a Situation is a view, consistent with a Description, which can be observed of a set of entities. It can also be seen as a 'relational context' created by an observer on the basis of a 'frame'. Therefore, a Situation allows to create a context where each particular view can have a proper identity, while the Event preserves its own identity. + For example, ErosionAsAccomplishment is a Situation where rock erosion is observed as a process leading to a certain achievement: the conditions (roles, parameters) that suggest such view are stated in a Description, which acts as a 'theory of accomplishments'. Similarly, ErosionAsTransition is a Situation where rock erosion is observed as an event that has changed a state to another: the conditions for such interpretation are stated in a different Description, which acts as a 'theory of state transitions'. + Consider that in no case the actual event is changed or enriched in parts by the aspectual view. + + (2) Alternative intentionality views + + Similarly to aspectual views, several intentionality views can be provided for a same Event. For example, one can investigate if an avalanche has been caused by immediate natural forces, or if there is any hint of an intentional effort to activate those natural forces. + Also in this case, the Event as such has not different identities, while the causal analysis generates situations with different identities, according to what Description is taken for interpreting the Event. + On the other hand, if the possible actions of an Agent causing the starting of an avalanche are taken as parts of the Event, then this makes its identity change, because we are adding a part to it. + Therefore, if intentionality is a criterion to classify events or not, this depends on if an ontology designer wants to consider causality as a relevant dimension for events' identity. + + (3) Alternative participant views + + A slightly different case is when we consider the basic participants to an Event. In this case, the identity of the Event is affected by the participating objects, because it depends on them. + For example, if snow, mountain slopes, wind, waves, etc. are considered as an avalanche basic participants, or if we also want to add water, human agents, etc., that makes the identity of an avalanche change. + Anyway, this approach to event classification is based on the designer's choices, and more accurately mirrors lexical or commonsense classifications (see. e.g. WordNet 'supersenses' for verb synsets). + + Ultimately, this discussion has no end, because realists will keep defending the idea that events in reality are not changed by the way we describe them, while constructivists will keep defending the idea that, whatever 'true reality' is about, it can't be modelled without the theoretical burden of how we observe and describe it. + Both positions are in principle valid, but, if taken too radically, they focus on issues that are only partly relevant to the aim of computational ontologies, which assist domain experts in representing a certain portion of reality according to their own assumptions and requirements. + + For this reason, in this ontology version of DOLCE, both events and situations are allowed, together with descriptions (the reason for the inclusion of the D&S framewrok in DOLCE), in order to encode the modelling needs, independently from the position (if any) chosen by the model designer. + """ + + +class Transition(Base): + """ + A transition is a Situation that creates a context for three TimeInterval(s), two additional different Situation(s), one Event, one Process, and at least one Object: the Event is observed as the cause for the transition, one Situation is the state before the transition, the second Situation is the state after the transition, the Process is the invariance under some different transitions (including the one represented here), in which at least one Object is situated. Finally, the time intervals position the situations and the transitional event in time. + This class of situations partly encodes the ontology underlying typical engineering algebras for processes, e.g. Petri Nets. + A full representation of the transition ontology is outside the expressivity of OWL, because we would need qualified cardinality restrictions, coreference, property equivalence, and property composition. + """ + + +class PhysicalObject(Base): + """ + Any Object that has a proper space region. The prototypical physical object has also an associated mass, but the nature of its mass can greatly vary based on the epistemological status of the object (scientifically measured, subjectively possible, imaginary). + """ + + +class Description(Base): + """ + A Description is a SocialObject that represents a conceptualization. + It can be thought also as a 'descriptive context' that uses or defines concepts in order to create a view on a 'relational context' (cf. Situation) out of a set of data or observations. + For example, a Plan is a Description of some actions to be executed by agents in a certain way, with certain parameters; a Diagnosis is a Description that provides an interpretation for a set of observed entities, etc. + Descriptions 'define' or 'use' concepts, and can be 'satisfied' by situations. + """ + + +class EventType(Base): + """ + A Concept that classifies an Event . An event type describes how an Event should be interpreted, executed, expected, seen, etc., according to the Description that the EventType isDefinedIn (or used in) + """ + + +class Parameter(Base): + """ + A Concept that classifies a Region; the difference between a Region and a Parameter is that regions represent sets of observable values, e.g. the height of a given building, while parameters represent constraints or selections on observable values, e.g. 'VeryHigh'. Therefore, parameters can also be used to constrain regions, e.g. VeryHigh on a subset of values of the Region Height applied to buildings, or to add an external selection criterion , such as measurement units, to regions, e.g. Meter on a subset of values from the Region Length applied to the Region Length applied to roads. + """ + + +class ProcessType(Base): + """ + An EventType that classifies Processes. + """ + + +class InformationObject(Base): + """ + A piece of information, such as a musical composition, a text, a word, a picture, independently from how it is concretely realized. + """ + + +class Quality(Base): + """ + Any aspect of an Entity (but not a part of it), which cannot exist without that Entity. For example, the way the surface of a specific PhysicalObject looks like, or the specific light of a place at a certain time, are examples of Quality, while the encoding of a Quality into e.g. a PhysicalAttribute should be modeled as a Region. + From the design viewpoint, the Quality-Region distinction is useful only when individual aspects of an Entity are considered in a domain of discourse. + For example, in an automotive context, it would be irrelevant to consider the aspects of car windows for a specific car, unless the factory wants to check a specific window against design parameters (anomaly detection). + On the other hand, in an antiques context, the individual aspects for a specific piece of furniture are a major focus of attention, and may constitute the actual added value, because the design parameters for old furniture are often not fixed, and may not be viewed as 'anomalies'. + """ + + +class OrderedElement(Base): + """ + A 'Singleton' of an entity that 'is ordered by' some 'Order'. An 'Order item' can only 'precede' or 'follow' another 'Order item', encoding the sortation of the entities contained within the 'Order items'. Different 'Order's need to use different 'Order item's. + """ + + +class MotionProcess(Base): + """ + A class that classifies motion processes. This class is used to represent any process involving motion, encompassing a wide range of activities such as walking, running, jumping, and any other form of physical movement. + """ + + +class Motion(Base): + """ + An EventType that classifies motion Processes. + Motion type + """ + + +class Collection(Base): + """ + Any container for entities that share one or more common properties. E.g. "stone objects", "the nurses", "the Louvre Aegyptian collection", all the elections for the Italian President of the Republic. + A collection is not a logical class: a collection is a first-order entity, while a class is second-order. + A collection is neither an aggregate of its member entities (see e.g. ObjectAggregate class). + """ + + +class System(Base): + """ + A system is a group of interacting or interrelated elements that act according to a set of rules to form a unified whole. + + From Wikipedia: https://en.wikipedia.org/wiki/System + """ + + +class Action(Base): + """ + An Event with at least one Agent that isParticipantIn it, and that executes a Task that typically isDefinedIn a Plan, Workflow, Project, etc. + """ + + +class Region(Base): + """ + Any region in a dimensional space (a dimensional space is a maximal Region), which can be used as a value for a quality of an Entity . For example, TimeInterval, SpaceRegion, PhysicalAttribute, Amount, SocialAttribute are all subclasses of Region. + Regions are not data values in the ordinary knowledge representation sense; in order to get patterns for modelling data, see the properties: representsDataValue and hasDataValue + """ + + +class Binding(Base): + """ + A Relation between Roles/Parameters and their fillers that holds in a particular descriptive context, such as a Workflow or Narrative. + + It covers two conceptually related, but somewhat ontologically distinct situations: + + -- a binding between two Roles, or two Parameters, with the meaning that in the particular descriptive context where the Binding holds, a filler for one Role/Parameter is also a filler for the other + -- a binding between a Role/Parameter and an Entity able to fill that Role/Parameter, with the meaning that in the particular descriptive context where the Binding holds, the Entity fills the Role/Parameter. + + Note: in the second case, the Entity filling the Role/Parameter may be a Role or Parameter itself. This however does NOT reduce to the first case. Consider these examples: + + -- (first situation) The accountant is also the lawyer. In this case, there are two roles, and there is a person filling both of them. This is a factual, role-role binding. + -- (second situation, linking to a generic Entity) The accountant is Bob. In this case, there is a factual, role-filler binding asserting who fills the accountant role. + -- (second situation, linking to a role) The newly opened job is accountant. In this case, there is a factual, role-filler binding asserting that some role is filled by another, without making any assertion about the filler of this second role. It is not known, and not important, whether an accountant exists at this time. + + There is a further, orthogonal distinction made between: + -- factual: the Binding is asserted to hold in the descriptive context + -- counterfactual: the Binding is used to express conditions in the descriptive context. A counterfactual Binding is not meant as an assertion that the Binding actually holds. + """ + + +class Joint(Base): + """ + An object that is used to articulate links in a kinematic structure. + """ + + +class Color(Base): + """ + The color of an object. Color regions encode the color value in some space such as RGB or HSV, and may further be used to classify the color as red, dark, etc. The color of an object may have different facets, e.g. a red and blue color. + """ + + +class Object(Base): + """ + Any physical, social, or mental object, or a substance. Following DOLCE Full, objects are always participating in some event (at least their own life), and are spatially located. + """ + + +class ExecutionStateRegion(Base): + """ + A region containing labels that describe different states in the evolution/completion of a task execution. + """ + + +class Feature(Base): + """ + Features are 'parasitic' entities that only exist insofar their host exists. Typical examples are holes, bumps, boundaries, or spots of color. + """ + + +class Workflow(Base): + """ + A Plan that defines Role(s), Task(s), and a specific structure for tasks to be executed, usually supporting the work of an Organization + """ + + +class FrictionAttribute(Base): + """ + The resistance that one surface or object encounters when moving over another. + """ + + +class Goal(Base): + """ + The Description of a Situation that is desired by an Agent, and usually associated to a Plan that describes how to actually achieve it + """ + + +class StateTransition(Base): + """ + A transition between two states brought about by the Action of some Agent. + """ + + +class Scene(Base): + """ + Scenes are Situations which interpret a State in terms of its conformance to some qualitative, image schematic description. I.e., the scene is described in terms of qualitative functional and spatial relations existing between participating objects. + """ + + +class SituationTransition(Base): + """ + A transition between two situations, usually brought about by the Action of some Agent. + """ + + +class Situation(Base): + """ + A view, consistent with ('satisfying') a Description, on a set of entities. + It can also be seen as a 'relational context' created by an observer on the basis of a 'frame' (i.e. a Description). + For example, a PlanExecution is a context including some actions executed by agents according to certain parameters and expected tasks to be achieved from a Plan; a DiagnosedSituation is a context of observed entities that is interpreted on the basis of a Diagnosis, etc. + Situation is also able to represent reified n-ary relations, where isSettingFor is the top-level relation for all binary projections of the n-ary relation. + If used in a transformation pattern for n-ary relations, the designer should take care of adding (some or all) OWL2 keys, corresponding to binary projections of the n-ary, to a subclass of Situation. Otherwise the 'identification constraint' (Calvanese et al., IJCAI 2001) might be violated. + """ + + +class NonmanifestedSituation(Base): + """ + A Situation which does not manifest in any event. + + The main use case for this is to represent expectations that are not met, e.g. unfulfilled post-conditions of an action. An action with unmet postconditions is then a failure. + + Because of open world semantics of DL, the default assumption for a Situation individual with no "manifests in" relations is simply that we don't know yet whether that Situation is manifested and if so by what Event. + + As such, an explicit assertion is needed to make a Situation a nonmanifested one: either declare that individual's type NonmanifestedSituation, or assert that it has 0 manifestsIn relations. + """ + + +class JointLimit(Base): + """ + The physical limits of a joint. + """ + + +class JointState(Base): + """ + The state of a joint in terms of position, velocity of the joint and effort applied to it. + """ + + +class Localization(Base): + """ + The localization of an object. The region of this quality encodes values to localize the object in a dimensional space, e.g. Euclidean positions that localize the object in Euclidean space. + """ + + +class MassAttribute(Base): + """ + The quantity of matter which a body contains, as measured by its acceleration under given force or by the force exerted on it by a gravitational field. + """ + + +class NetForce(Base): + """ + The accumulated force acting upon an object. + """ + + +class Process(Base): + """ + This is a placeholder for events that are considered in their evolution, or anyway not strictly dependent on agents, tasks, and plans. + See Event class for some thoughts on classifying events. See also 'Transition'. + """ + + +class State(Base): + """ + States are stative and homeomeric events. + + For stative events, the mereological sum of two instances has the same type as both instances. This is, for example, the state of sitting on a chair, or the process of a pendulum swinging around. + + The difference between states and processes is that states are, in addition, homeomeric, and processes are not. This means that, when considering time slices of an event, for states, these time slices always have the same type as the state, but for processes this is not the case. + """ + + +class Succedence(Base): + """ + A relation that holds in some descriptive context such as a Workflow, between two TaskInvocations belonging to that same Workflow. It means that one task invocation should follow the other. + + Note: a successor relation implemented as an OWL object property is sometimes enough, but not in general; in particular, when there are conditions imposed on the succession. + + As a result, a reification pattern was applied here. + Note: it is possible for a Succedence relation to exist between a TaskInvocation and itself; in this case, both the hasPredecessor and hasSuccessor roles are filled by the same TaskInvocation individual. + + Care must be taken with this however, as a natural interpretation of this situation is an infinite loop. + """ + + +class Agent(Base): + """ + Additional comment: a computational agent can be considered as a PhysicalAgent that realizes a certain class of algorithms (that can be considered as instances of InformationObject) that allow to obtain some behaviors that are considered typical of agents in general. For an ontology of computational objects based on DOLCE see e.g. http://www.loa-cnr.it/COS/COS.owl, and http://www.loa-cnr.it/KCO/KCO.owl. + Any agentive Object , either physical (e.g. a whale, a robot, an oak), or social (e.g. a corporation, an institution, a community). + """ + + +class Preference(Base): + """ + A 'Preference' is a 'Quality' of an 'Agent' that orders 'Situation's by some heuristic based on the happiness, satisfaction, gratification, morality, enjoyment, and utility (see alse https://en.wikipedia.org/wiki/Preference) they provide to their bearing Agent. + + The pattern is as follows: A 'Preference' 'is described by' a 'Predilection', which also 'describes' an 'Order' that 'orders' 'Order item's that contain only 'Situation's. The 'Situation's then are modeled according to what the preference entails. + + That a 'Preference' orders 'Situation's might be unintuitive, but makes the model very general. A few examples: + + Example 1 + + "Peter likes coffee and dislikes tea". + Here, between different hypothetical situations where he plays the role of a performer in a drinking task, Peter prefers the situations in which role of the drunken object is played by some coffee (vs. some tea). Note that the coffe and tea are hypothetical objects as well and could, for example, be represented via reified Concepts. + + Example 2 + + "Would you like this pot of coffee, or this pot of tea, Peter?" + Here, as opposed to Example 1, the pot of coffee and the pot of tea are not hypothetical, but concrete. + + Example 3 + + "Would you like this pot of coffee, or should I brew you some tea?" + Here, the pot of coffee is concrete and the tea is not. + + Example 4 + + Situations are not restricted to Tasks; other event types are possible as well. + For example, Peter might prefer the Containment State of a tiger being inside a cage vs. the Containment State of the tiger being outside of the cage. + """ + + +class Shape(Base): + """ + The external form, contours, or outline of an object. + """ + + +class ShapeRegion(Base): + """ + Encodes the shape of an object. + + Note that sometimes the shape as actually used for some purpose may be displaced. This is the case, e.g., for robot links which use a mesh file to describe their shape, but the reference pose of the link uses the mesh translated/rotated in the link's local coordinate frame. + """ + + +class SoftwareInstance(Base): + """ + A Software instance is an entity to represent the agent that emerges from and while executing software: Some object, that can perform actions and communicate via some interfaces. + In this view, we see the of an Agent required intentionality its intentionality as bestowed upon the Software instance from the agents who started the program or gave an input (e.g., via a mouse click) to achieve some goal. + + Another apporach might be to not model this entity at all and only see Execution of Software as a Process (see, e.g., https://en.wikipedia.org/wiki/Execution_(computing)). However, this would complicate modeling communication between running Software processes. + """ + + +class SpaceRegion(Base): + """ + Any Region in a dimensional space that is used to localize an Entity ; i.e., it is not used to represent some characteristic (e.g. it excludes time intervals, colors, size values, judgment values, etc.). Differently from a Place , a space region has a specific dimensional space. + """ + + +class StateType(Base): + """ + An EventType that classifies States. + """ + + +class Relation(Base): + """ + Relations are descriptions that can be considered as the counterpart of formal relations (that are included in the FormalEntity class). + For example, 'givingGrantToInstitution(x,y,z)' with three argument types: Provider(x),Grant(y),Recipient(z), can have a Relation counterpart: 'GivingGrantToInstitution', which defines three Concept instances: Provider,Grant,Recipient. + Since social objects are not formal entities, Relation includes here any 'relation-like' entity in common sense, including social relations. + """ + + +class PhysicalArtifact(Base): + """ + Any PhysicalObject that isDescribedBy a Plan . + This axiomatization is weak, but allows to talk of artifacts in a very general sense, i.e. including recycled objects, objects with an intentional functional change, natural objects that are given a certain function, even though they are not modified or structurally designed, etc. PhysicalArtifact(s) are not considered disjoint from PhysicalBody(s), in order to allow a dual classification when needed. E.g., + FunctionalSubstance(s) are included here as well. + Immaterial (non-physical) artifacts (e.g. texts, ideas, cultural movements, corporations, communities, etc. can be modelled as social objects (see SocialObject), which are all 'artifactual' in the weak sense assumed here. + """ + + +class PhysicalEffector(Base): + """ + A functional part belonging to an Agent and which allows that Agent to act upon its surroundings. + """ + + +class PhysicalPlace(Base): + """ + A physical object that is inherently located; for example, a water area. + """ + + +class QueryingTask(Base): + """ + An Illocutionary act where the Sender of the Message does so to trigger the Receiver to return some information that is specified within the content of the Message. + """ + + +class Design(Base): + """ + A Description of the Situation, in terms of structure and function, held by an Entity for some reason. + A design is usually accompanied by the rationales behind the construction of the designed Entity (i.e. of the reasons why a design is claimed to be as such). For example, the actual design (a Situation) of a car or of a law is based on both the specification (a Description) of the structure, and the rationales used to construct cars or laws. + While designs typically describe entities to be constructed, they can also be used to describe 'refunctionalized' entities, or to hypothesize unknown functions. For example, a cradle can be refunctionalized as a flowerpot based on a certain home design. + """ + + +class MotionDescription(Base): + """ + A Description of a Motion process, e.g. moving the arm into a specific location + """ + + +class Order(Base): + """ + An 'Order' sorts two or more 'Order item's via the relations 'precedes' and 'follows'. + """ + + +class Plan(Base): + """ + A Description having an explicit Goal, to be achieved by executing the plan + """ + + +class Transient(Base): + """ + Objects may undergo changes during Processes; however, while the change Process is in operation, one cannot strictly say either the input of the Process still exists, nor that the result exists yet. + + A prototypical example is making a pancake on a heater. When PancakeMix is put on the hot plate, it ceases to be PancakeMix-- already, the chemical structure of the substance gets altered-- however it is only after sufficient heating that this object becomes a Pancake. + + Transients are the objects undergoing such change processes; they are no longer the initial objects fed into the process, nor are they the objects produced as results. + + Instead, a Transient transitionsFrom some initial Object that was fed into a change Process. Typically, a Transient may transitionTo some resulting Object (though not always, some processes simply destroy objects). + + It is also possible that a Transient transitionsBack to the initial object. An example is the catalyst in a chemical reaction; another example is a loaf of bread after a slice has been cut off. + """ + + +class ColorRegion(Base): + """ + Encodes the color of an object. + """ + + +class InformationRealization(Base): + """ + A concrete realization of an InformationObject, e.g. the written document (object) containing the text of a law, a poetry reading (event), the dark timbre (quality) of a sound (event) in the execution (event) of a musical composition, realizing a 'misterioso' tempo indication. + + The realization of an information object also realizes information about itself. This is a special semiotic feature, which allows to avoid a traditonal paradox, by which an information is often supposed to be about itself besides other entities (e.g. the information object 'carpe diem' is about its meaning in Horace's Odes (let alone its fortune in Western culture and beyond), but also about its expression in context: 'dum loquimur, fugerit invida aetas: carpe diem, quam minimum credula postero', with the sound and emotional relations that it could activate. + This is expressed in OWL2 with a local reflexivity axiom of the dul:InformationRealization class. + """ + + +class ForceAttribute(Base): + """ + The value of a force dynamical characteristic. An example is the force exerted on another object when pushing it. + """ + + +class TimeInterval(Base): + """ + Any Region in a dimensional space that aims at representing time. + """ + + +class PhysicalAttribute(Base): + """ + Physical value of a physical object, e.g. density, color, etc. + """ + + +class API_Specification(Base): + """ + An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build or use an API is called an API specification. + + Source: https://en.wikipedia.org/wiki/API + """ + + +class InterfaceSpecification(Base): + """ + The Specification of an Interface between software, computer hardware, peripheral devices, humans and combinations of these. + + Source: https://en.wikipedia.org/wiki/Interface_(computing) + """ + + +class AbductiveReasoning(Base): + """ + A task in which the Agent proceeds from some set of statements about a world, and attempts to obtain an explanation for these statements. This explanation is often an inferred cause, such as a final cause or intention. Further, it is often required that there be some guarantees that the explanation produced by AbductiveReasoning have some desirable property, such as being the simplest or most likely given the set of statements to explain. + """ + + +class Reasoning(Base): + """ + A Mental task in which an Agent endeavours to obtain new knowledge from knowledge it already possesses. + todo: a taxonomy of reasoning is not trivial. Classical theory distinguishes Deductive, Inductive, and with a stretch Abductive reasoning. However, modern practice distinguishes other categories that overlap with these, e.g. Probabilistic and Non-monotonic. + + Both Abductive and Inductive inference may, and often do, use Probabilistic methods. Probabilistic inference is, by its nature, most opposed to Deductive inference which, classically, requires logical certainty. + + Any of the Abductive/Deductive/Inductive triad can be further affected by the Monotone/Non-monotone distinction. There are preferences (Inductive and Abductive reasoning is probably most often non-monotonic; most of Deductive reasoning is probably done in monotonic formalisms), but it is certainly the case that, e.g., non-monotone Deduction is possible. + + Note, this classification has nothing to do with reasoning domain (e.g. SpatialReasoning, TemporalReasoning, ...) and merely with techniques/logical-mathematical underpinnings. + """ + + +class Accessor(Base): + """ + A role classifying an object used to gain access to some other entity. + """ + + +class Instrument(Base): + """ + An object used to carry out the event. + """ + + +class Accident(Base): + """ + An Event for which causes are unknown and/or considered irrelevant. This is true also for "final causes" (that is, intentions) of Agents participating in the Accident: it is not the intentions of these Agents to bring about the Accident. + + Note a distinction between this definition and some informal, everyday uses of "accident" which require a causal structure and responsibility to be ascertained. An accident, in the informal sense, may require an explanation as to who made a mistake in bringing about the event; a "traffic accident", where we want to know who's responsible, is an example of this. + + Such an event does NOT fall under the definition of Accident here. An example of Accident would be a fair coin landing Heads: the causal chain for why this exact face landed is not important, all that matters is the brute fact that the coin landed Heads. + also think about "mistakes": (Mihai:) yes, but consider whether those might qualify as Situations. Likewise for Accidents, actually. + """ + + +class ActionExecutionPlan(Base): + """ + idea: steps in workflows assert that they are defined by action execution plans. + links role and parameter fillers to e.g. slots in a data structure + """ + + +class Status(Base): + """ + A role that can be played by some parameter which indicates the state of affairs of some entity, e.g. a flag describing the outcome of an action in terms of success or failure, or an indicator of whether a device is turned on or off. + """ + + +class Actuating(Base): + """ + Tasks where the goal is to move an object. + + Usually, an agent will use their prehensile effectors, ie. hands, for this purpose, so there is a lot of conceptual overlap between Actuating and Manipulating. + + However, these categories are nonetheless distinguished in that there are more ways to actuate objects than simply manipulating them; for example, some tool like a net or frying pan might be used to catch an object. + + Another way to look at the difference between Actuating and Manipulating is in what they "profile", ie. focus on as important. + + For Actuating, it is the object's motion that is paramount. + + For Manipulating, it is the movement of the hand(s) and the change in functional relationships (such as kinematic control) between the hand(s) and the manipulated object(s). + todo: think about use of tools. force events are generated between artifacts then. also not only the tool would be the 'salient artifact' here. + """ + + +class PhysicalTask(Base): + """ + A task in which a PhysicalAgent affects some physical object. + """ + + +class AestheticDesign(Base): + """ + A design that describes an aesthetic quality of an object. + + Aesthetics is the philosophical study of beauty and taste. The term stems from the Greek word 'aisthetikos', meaning 'of sense perception', and is related to the study of sensory values. From design point of view, aesthetics refers to the visual attractiveness of an object. Visual aesthetics have these key elements: Color, Shape, Pattern, Line, Texture, Visual weight, Balance, Scale, Proximity and Movement. + """ + + +class AgentRole(Base): + """ + A role classifying an Agent responsible for performing an Action. + + The entity playing an AgentRole is endowed with sentience and the capacity to deliberately choose actions in pursuit of goals. This distinguishes Agents from other causes that could bring an event about. + """ + + +class CausativeRole(Base): + """ + A role classifying objects that are responsible in bringing about an event. + + The paradigmatic example is the Agent performing an Action -- the Agent is the effective cause of the Action it performs. However, not all objects causing events are agents. + """ + + +class Agonist(Base): + """ + A role that classifies entities with a tendency to either cause an alteration or to preserve some state. + """ + + +class Patient(Base): + """ + A role classifying an object that undergoes/is the primary object affected by the event. + """ + + +class Algorithm(Base): + """ + An Algorithm is a finite sequence of well-defined instructions, typically used to solve a class of specific problems or to perform a computation. + + From Wikipedia: https://en.wikipedia.org/wiki/Algorithm + """ + + +class Alteration(Base): + """ + A process by which an aspect of some object changes such as ice cream melting in the sun. + """ + + +class AlterativeInteraction(Base): + """ + A force interaction where the agonist has the tendency to set another object into motion. An example is 'opening a door' where some object interacts with the door such that it moves out of its frame. + """ + + +class ForceInteraction(Base): + """ + Classifies events in which two entities interact with each other with a reference to force. One of the entities, the agonist, has a tendency to either set the other entity (the antagonist) into motion, or to keep it still under the influence of some other force. The tendency only manifests in case the agonist is the "stronger entity". + """ + + +class PreservativeInteraction(Base): + """ + A force interaction where the agonist has a tendency to keep another object still. An example is 'holding a door closed' where some object interacts with the door to neutralize forces that could set the door into motion. + """ + + +class AlteredObject(Base): + """ + An object undergoing modifications. + """ + + +class Amateurish(Base): + """ + A description of amateurish behavior. + """ + + +class DexterityDiagnosis(Base): + """ + A description of the dexterity of a system, possibly in comparison to another system. + """ + + +class Masterful(Base): + """ + A description of masterful behavior. + """ + + +class AnsweringTask(Base): + """ + An Illocutionary act where the Sender emits some Message to the Receiver as a reaction to some previous Communication task where the Roles where switched, i.e., the Sender (Receiver) of the Answering task has been the Sender (Sender) for the cause. + """ + + +class CommandingTask(Base): + """ + An Illocutionary act where the Sender emits some Message with the intent to cause the Receiver to perform some action. + """ + + +class IllocutionaryTask(Base): + """ + A task which is executed by a Locution action: A Locution is what was said and meant, Illocution is what was done. + + When somebody says "Is there any salt?" at the dinner table, the illocutionary act is a request: "please give me some salt" even though the locutionary act (the literal sentence) was to ask a question about the presence of salt. + + Source: https://en.wikipedia.org/wiki/Illocutionary_act + """ + + +class Antagonist(Base): + """ + A role that classifies entities that are opposed to the tendency of some agonist. + """ + + +class Appliance(Base): + """ + A device designed to perform a specific task, and that can be operated in some way. + """ + + +class DesignedArtifact(Base): + """ + A PhysicalArtifact that is also described by a Design. This excludes simple recycling or refunctionalization of natural objects. Most common sense 'artifacts' can be included in this class: cars, lamps, houses, chips, etc. + """ + + +class Approaching(Base): + """ + A process type to classify motions by which a body approaches some object or location. + """ + + +class Locomotion(Base): + """ + Conceptually related to Navigation, but distinguishable from it because of the profile, ie. the focus of the task. + + Navigation is about reaching some goal. + + Locomotion is concerned more with the actual motion. + The Agent repositions their body in the environment. + """ + + +class ArchiveFile(Base): + """ + An archive file is a computer file that is composed of one or more files along with metadata. + + Source: https://en.wikipedia.org/wiki/Archive_file + """ + + +class ArchiveText(Base): + """ + An Archive is a Structured Text that is composed of one or more Structured Texts along with metadata. Archives are used to collect multiple texts together into a single text for easier portability and storage as Archive Files, or simply to compress text to use less storage space as Computer Files. Archive often store directory structures, error detection and correction information, arbitrary comments, and sometimes use built-in encryption. + + Source: https://en.wikipedia.org/wiki/Archive_file + """ + + +class Digital_File(Base): + """ + Any file that exists as a digital resource (but not its content), e.g., a text file actually laying on some hard drive, but not the contained text. + """ + + +class ArchiveFormat(Base): + """ + An Archive Format is the file format of an archive file. + + Source: https://en.wikipedia.org/wiki/Archive_file#Archive_formats + """ + + +class File_format(Base): + """ + A File Format is a standard way that information is encoded for storage in a computer file. It specifies how bits are used to encode information in a digital storage medium. + + From Wikipedia: https://en.wikipedia.org/wiki/File_format + """ + + +class FileConfiguration(Base): + """ + A configuration whose members are all files. Used to model, e.g., concrete collections of zip- and jar-files (and so on). + """ + + +class Structured_Text(Base): + """ + Any Text that adheres to some rules that are in any way more specific than natural language and that cannot be made sense of without knowing said rules. + """ + + +class AreaSurveying(Base): + """ + A task in which an Agent uses its perception apparatus to gain information about some location. + """ + + +class Perceiving(Base): + """ + A task in which the Agent gathers and interprets sensor information about its surroundings. + """ + + +class Arm(Base): + """ + A limb used to reach for objects. + """ + + +class Limb(Base): + """ + An arm or leg of an embodied agent. + """ + + +class Arranging(Base): + """ + A task in which an Agent places a collection of objects at some set of relative poses to each other. + """ + + +class Constructing(Base): + """ + A task in which an Agent creates a new physical object. + """ + + +class ArtificialAgent(Base): + """ + A physical object with artificial characteristics, which can perform actions to achieve desired goals, and typically has sensors and/or actuators. + + There can be non-physical artificial agents such as software programs but they are not considered here in the scope of artificial agent. + """ + + +class PhysicalAgent(Base): + """ + A PhysicalObject that is capable of self-representing (conceptualizing) a Description in order to plan an Action. + A PhysicalAgent is a substrate for (actsFor) a Social Agent + """ + + +class Assembling(Base): + """ + A task in which an Agent connects some objects such that they form a cohesive whole, and which also imposes constraints on the objects' relative motions. Often, the objects that make up an assemblage can also be separated again. + """ + + +class AssertionTask(Base): + """ + An Illocutionary Act where the Sender emits some Message with the intent to change what the Receiver believes to be true in some context. Often, assertions are of facts about the real world, but this need not be the case. Assertions can communicate what someone believes, or refer to a world that is entirely fictional. In all these cases however, assertions are intended to update the listener's model (of the real world, or of the speaker's beliefs, or of the fictional world etc.). + """ + + +class DeclarativeClause(Base): + """ + A clause which makes an assertion or declaration. + """ + + +class AssumingArmPose(Base): + """ + A task by which an Agent arranges one/some/all of its arms according to some configuration. + """ + + +class AssumingPose(Base): + """ + A task by which an Agent arranges its body, or part of it, according to some configuration. + """ + + +class AttentionShift(Base): + """ + A mental task in which the executing Agent shifts his attention from some Information to another. + """ + + +class MentalTask(Base): + """ + A Task classifying some MentalAction, that is, an Action through which an Agent manipulates representations stored in its own cognition. + """ + + +class AvoidedObject(Base): + """ + An object that is avoided. + """ + + +class Avoiding(Base): + """ + A task in which an Agent moves so as to not enter or pass through a location. + """ + + +class Navigating(Base): + """ + A task in which an Agent moves through space so as to arrive at some location, follow some path, or increase its distance from some location or other entity. Often, navigation involves finding paths around obstacles and forbidden areas. + """ + + +class Barrier(Base): + """ + A role classifying an object used to prevent others from entering or leaving a restricted space or group. + """ + + +class Restrictor(Base): + """ + A role classifying an object used to deny access to some other entity. + """ + + +class BehavioralDiagnosis(Base): + """ + A diagnosis of how a system interacts with its world. + """ + + +class Diagnosis(Base): + """ + A Description of the Situation of a system, usually applied in order to control a normal behaviour, or to explain a notable behavior (e.g. a functional breakdown). + """ + + +class BeneficiaryRole(Base): + """ + A role classifying an agent for whose benefit an action is performed. + """ + + +class GoalRole(Base): + """ + A role classifying objects that constitute the goal of an action. + """ + + +class CounterfactualBinding(Base): + """ + CounterfactualBindings are used to express conditions: + + -- that two roles share a filler (RoleRoleBindings); + -- that the filler of a role is a particular entity (RoleFillerBindings). This is typically the case when the filler of the role may be one of a few constants, as is the case with the execution status of a robot task. + + TODO: for the robot workflows we are likely to need at the start, testing equality of fillers is enough. In the future, we may want to replace that with unifiability of fillers. + """ + + +class FactualBinding(Base): + """ + FactualBindings are used in a workflow to assert that: + + -- task- or workflow-defined roles share fillers (RoleRoleBindings). Example, the instrument of a cutting task may be the actee of a grasping task; + -- task- or workflow-defined roles are filled by a particular entity (RoleFillerBindings). This is typically the case when roles, and especially parameters, can be assigned to constants. Example, the waiting time to cook soft eggs is 3 minutes. + """ + + +class RoleFillerBinding(Base): + """ + A binding that connects a role to a particular filler. + """ + + +class RoleRoleBinding(Base): + """ + A binding that asserts that two roles have the same filler. + """ + + +class Blockage(Base): + """ + The disposition of an object (the barrier) to prevent others from accessing, leaving, or seeing a restricted space, or group. + """ + + +class BlockedObject(Base): + """ + An object that is blocked from accessing something. + """ + + +class BodyMovement(Base): + """ + Motion described in terms of how parts of an Agent's body move. + + As such, this concept can be applied only to motions involving some PhysicalAgent, or body parts of a PhysicalAgent. + """ + + +class Boiling(Base): + """ + In each instance of this collection some liquid matter is raised to its boilingPoint and is thereby changed from being in the Liquid-StateOfMatter to being in the Gaseous-StateOfMatter. + """ + + +class Vaporizing(Base): + """ + Some material transitions from a liquid to a gaseous phase. + """ + + +class BoxShape(Base): + """ + A symmetrical shape, either solid or hollow, contained by six rectangles. + """ + + +class CanCut(Base): + """ + The disposition of an object (the tool) to cut other objects. Such as a knife has cutting ability to cut a cucumber into pieces. + """ + + +class Variability(Base): + """ + The disposition of an object (the tool) to change some aspect of others. + """ + + +class Cutter(Base): + """ + A role to classify an object used to cut other objects. Usually should poses sharpness as a quality. Execptions are not considered in this context. Such as a wind, water, or other natural agents cutting(eroding) the rocks. + """ + + +class CutObject(Base): + """ + An object being cut down into pieces. + """ + + +class Capability(Base): + """ + Capability + The disposition of an agent to bring about certain effects, and to achieve certain goals. + The tendency of an object (the bearer) to be able to perform certain tasks together with others (the triggers) and in which the Bearer is the executor of the associated Task and will therefore usually be an Agent. + """ + + +class Capacity(Base): + """ + The maximum amount an object can contain. + """ + + +class Intrinsic(Base): + """ + A physical quality that is independent of context. + intrinsic + """ + + +class Catching(Base): + """ + A task by which an Agent stops a moving object and gains kinematic control over it, usually by grasping. + """ + + +class PickingUp(Base): + """ + A task in which the Agent uses one or more of its grippers to grasp a usually stationary object. + """ + + +class CausalEventRole(Base): + """ + A role filled by a description of some action or process that brings about a motion. + + As an example, consider the utterance "the tennisman served the ball by hitting it with the racket." In this utterance, the filler of the CausalEventRole is expressed by the "by hitting it with the racket" constituent. + """ + + +class EventAdjacentRole(Base): + """ + A role classifying a participant in an event. + + In linguistics, this is also known as a thematic role. + """ + + +class CausedMotionTheory(Base): + """ + A schematic theory describing a situation in which an agent performs an action which causes an object to move along a certain path. A popular example being "He sneezed the napkin off the table." (Goldberg 1995) + + Let xA, xP be objects filling the agent, patient roles of this schema. Then one can infer that xA movesObject xP. + """ + + +class ImageSchemaTheory(Base): + """ + A theory that describes an image-schematic relationship between some entities. + + Image schemas are considered as fundamental, pre-conceptual, building blocks of cognition. They were introduced to characterize how human beings are believed to organize and make sense of experience. + + For SOMA, whereas the focus of executable schematic theories is to describe how an agent might act, image schematic theories focus on descriptions of how objects behave in the absence of, or after, an active intervention from an agent. + """ + + +class PerformerRole(Base): + """ + A role classifying an Agent responsible for performing an Action. + + The entity playing an PerformerRole is endowed with sentience and the capacity to deliberately choose actions in pursuit of goals. This distinguishes Agents from other causes that could bring an event about. + """ + + +class SourcePathGoalTheory(Base): + """ + A very general image-schema of the Path family, this schema describes movement along a path from a source towards a goal. + + Note: in cognitive linguistics literature, the roles of this schema are Source, Path, Goal. However, to avoid overloading some other terminology in SOMA, we renamed Source to Origin and Goal to Destination. + + As yet, this schema is not associated to any object property. + """ + + +class Channel(Base): + """ + A Channel in a Communication Task is the path of travel by a Message, e.g., via WLAN, air (in the case of a Message classifying soundwaves) or a telephone cable. + """ + + +class PathRole(Base): + """ + A role that classifies the path of a motion. + """ + + +class CommunicationTask(Base): + """ + A Task in which two or more Agents exchange information. A CommunicationTask classifies only Events that have only Agents and Social objects as participants. + + Of course, the means of exchange is Physical, however this concept is to classify events for which we are not interested in the physical substrate, but rather who communicated and what the information content was. + """ + + +class CheckingObjectPresence(Base): + """ + A task by which an Agent uses its sensors to check for the presence of a specific object and to obtain some other information about it, e.g. pose. + """ + + +class ChemicalProcess(Base): + """ + A process by which the chemical constituency of an Entity or set of Entities changes. + + In some sense any process that results in entities being created or destroyed might trivially fit here, however this concept is intended specifically for Events where the occuring chemical reactions are of importance. + """ + + +class Choice(Base): + """ + The output of a, e.g, Selecting Task. + """ + + +class ResultRole(Base): + """ + A role classifying the object that is the outcome of a creation or modification action or process. + """ + + +class CircularCylinder(Base): + """ + A cylinder figure with circular cross section. + """ + + +class CylinderShape(Base): + """ + A solid geometrical figure with straight parallel sides and a circular or oval cross section. + """ + + +class Classifier(Base): + ... + + +class StatisticalReasoner(Base): + ... + + +class ClausalObject(Base): + """ + A clause is a phrase containing a subject and a predicate. + """ + + +class Phrase(Base): + ... + + +class Clean(Base): + """ + A cleanliness region with values considered as clean. + """ + + +class CleanlinessRegion(Base): + """ + Encodes the cleanliness of an object. + """ + + +class Cleaning(Base): + """ + This task in which an agent restores all the objects to their destined locations, wiping a specific object + """ + + +class ModifyingPhysicalObject(Base): + """ + Superconcept for tasks that involve affecting some state that an object is in (e.g. where it is located), without creating or destroying the object. + """ + + +class Purification(Base): + """ + The disposition of an object (the tool) to change the cleanliness of others. + """ + + +class Cleanliness(Base): + """ + The quality of being clean. + """ + + +class SocialQuality(Base): + """ + Any aspect of an entity that specifies social characteristics. + """ + + +class ClientServer_Specification(Base): + """ + An API Secification that describes the well known Client-Server pattern: + + The Client-server model is a distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients Often clients and servers communicate over a computer network on separate hardware, but both client and server may reside in the same system. A server host runs one or more server programs, which share their resources with clients. A client usually does not share any of its resources, but it requests content or service from a server. Clients, therefore, initiate communication sessions with servers, which await incoming requests. Examples of computer applications that use the client-server model are email, network printing, and the World Wide Web. + + Source: https://en.wikipedia.org/wiki/Client%E2%80%93server_model + """ + + +class ClientRole(Base): + """ + The Client-server model is a distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients Often clients and servers communicate over a computer network on separate hardware, but both client and server may reside in the same system. A server host runs one or more server programs, which share their resources with clients. A client usually does not share any of its resources, but it requests content or service from a server. Clients, therefore, initiate communication sessions with servers, which await incoming requests. Examples of computer applications that use the client-server model are email, network printing, and the World Wide Web. + + Source: https://en.wikipedia.org/wiki/Client%E2%80%93server_model + """ + + +class ServerRole(Base): + """ + The Client-server model is a distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients Often clients and servers communicate over a computer network on separate hardware, but both client and server may reside in the same system. A server host runs one or more server programs, which share their resources with clients. A client usually does not share any of its resources, but it requests content or service from a server. Clients, therefore, initiate communication sessions with servers, which await incoming requests. Examples of computer applications that use the client-server model are email, network printing, and the World Wide Web. + + Source: https://en.wikipedia.org/wiki/Client%E2%80%93server_model + """ + + +class InterfaceComponentRole(Base): + ... + + +class Closing(Base): + """ + A task in which an Agent manipulates a container so as to block access to its interior. + """ + + +class Delivering(Base): + """ + A task in which an Agent brings an item that the Agent already carries to a specified target. + """ + + +class Fetching(Base): + """ + A task in which an Agent retrieves an object from a particular location, which puts the object under the Agent's control, who can now e.g. transport the object somewhere else; this task may include repositioning the Agent to better reach the object. Note that while in normal linguistic use fetch can mean transport, we use it here to refer only to (a part of) the first stage of transport. + """ + + +class Lifting(Base): + """ + todo: how to distinguish from e.g. 'pushing from the table' + """ + + +class Opening(Base): + """ + A task in which an Agent manipulates a container so as to expose its interior. + """ + + +class Pulling(Base): + """ + A task in which an Agent moves an object in a direction loosely from the object's center of mass towards the contact point between agent and object. + """ + + +class Pushing(Base): + """ + A task in which an Agent moves an object in a direction loosely from the the contact point between agent and object towards object's center of mass. todo: define subclass 'PushingOver'? Would we expect two distinct contacts with the same surface then? + """ + + +class Squeezing(Base): + """ + A task in which an Agent applies pressure to an object they have in their grasp. + """ + + +class Clumsiness(Base): + """ + A description of clumsy behavior. + """ + + +class CognitiveAgent(Base): + """ + An agent that is capable to act on its own, in contrast to sub-cognitive Agents, that need to have their intentionality bestowed upon some other agent. + """ + + +class SubCognitiveAgent(Base): + """ + An agent that is not capable to act on its own, i.e., that is reactive. Its intentionality needs to be bestowed upon from some other agent, that it acts for. + """ + + +class Collision(Base): + """ + A contact event of objects bumping into each other such that their movement is affected. + """ + + +class Extrinsic(Base): + """ + A physical quality that depends on relationships to other objects, such as the color of an object which depends on light conditions in the environment. + """ + + +class ImperativeClause(Base): + """ + A clause which commands some agent to perform a task or bring about a state of affairs. + """ + + +class CommitedObject(Base): + """ + An object committed to a bigger whole. After being committed, the object does not exist anymore in its old form. + """ + + +class ConnectedObject(Base): + """ + An object that is combined with another object. + """ + + +class CommunicationAction(Base): + """ + An action in which an Agent uses some actuator for communication purposes. + """ + + +class LinguisticObject(Base): + ... + + +class CommunicationReport(Base): + """ + A task in which an Agent endeavors to describe truthfully some state of affairs. + """ + + +class Receiver(Base): + """ + The role played by an Agent in a Communication Task that perceives and interpretes some incoming Message. + """ + + +class Sender(Base): + """ + The Role played by an Agent in a Communication Task that emits some Information Realization with the purpose of percipience by some Receiver. + """ + + +class SocialObject(Base): + """ + Any Object that exists only within some communication Event, in which at least one PhysicalObject participates in. + In other words, all objects that have been or are created in the process of social communication: for the sake of communication (InformationObject), for incorporating new individuals (SocialAgent, Place), for contextualizing or intepreting existing entities (Description, Concept), or for collecting existing entities (Collection). + Being dependent on communication, all social objects need to be expressed by some information object (information objects are self-expressing). + """ + + +class CommunicationTopic(Base): + """ + A role that appears in communication tasks, and indicates what the communication is about. + + CommunicationTopic can only classify a Social object that participates in an Action that is classified as (the execution of) a CommunicationTask. + + Note that classifies here is used in the plays-role sense. This isn't to say that the social object, ie the information exchanged in the communication, is an instance of the topic. Rather, the topic role refers to what the information is about. + + For example, if the topic of a communication is flowers, this does not mean the words themselves are flowers, merely that, in some sense, they are about flowers. + """ + + +class ResourceRole(Base): + """ + A role classifying objects that are useful or even necessary to sustain the unfolding of an event. + + Resources are usually not agentive; a different set of roles classifies the agentive participants in actions. Likewise, typically resources do not play causative or goal roles for the event. + + Resources are often consumed by their participation in an event, but this need not always be the case. An instrument and capital are examples of resources that are reusable. + """ + + +class Composing(Base): + """ + The disposition of an object (the tool) to change the compositional structure of others. + """ + + +class Computer_Language(Base): + """ + A computer language is a formal language used in communication with a computer. + + From Wikipedia: https://en.wikipedia.org/wiki/Computer_language + """ + + +class FormalLanguage(Base): + """ + A Formal Language consists of words whose letters are taken from an alphabet and are well-formed according to a specific set of rules. + + From Wikipedia: https://en.wikipedia.org/wiki/Formal_language + """ + + +class Computer_Program(Base): + """ + The Program itself (the specific set of instruction in a Programming Language), not the file that it is contained in nor the implemented algorithm! + """ + + +class Programming_Language(Base): + """ + Any Programming Language, including both human-readable like Java and non-human-readable languages like binary machine code. + """ + + +class Conclusion(Base): + """ + An object that is derived from some premise using some inference rules. + """ + + +class CreatedObject(Base): + """ + An object that is created. + """ + + +class Knowledge(Base): + ... + + +class ConditionalSuccedence(Base): + """ + A relation that holds between two OGPTasks that belong to the same OGPWorkflow, and which means that, if a condition is met, the successor task invocation is to be executed after the predecessor task invocation completes. + + The condition is a conjunction of CounterfactualBindings. These bindings may be RoleRoleBindings (meaning, test whether the fillers for these Roles/Parameters are the same) or RoleFillerBindings (meaning, test whether the filler of the Role unifies with the candidate Entity). + + An empty conjunction of CounterfactualBindings is assumed to be True. + Note: in RobotWorkflows, Tasks typically may have several possible successors, to be selected based on condition-testing. + """ + + +class Configuration(Base): + """ + A description of a State. This includes e.g. what acceptable regions for participant objects of the State might look like. + A configuration of the world is construed to be stable on its own. Outside disturbances may cause state transitions, and the settling into some other, self-stable configuration. + + Several other Description subclasses may function as Configurations. For example, a Goal is a description of a desired State. A Norm describes a State that should be maintained. A Diagnosis describes a State that causes certain symptoms etc. + + Note a couple of issues here. First one relates to what "configuration" means; in particular, this doesn't mean a configuration that is unchanging according to any viewpoint. The analogy here is the "macrostate" from thermodynamics: a macrostate with two gases mixed does not mean all gas particles are motionless, but rather that the locations and movements of gas particles are such that any particle is likely to have as many neighbors of one type as the other. + + The second issue relates to what is "outside". The state is a configuration of some, but not necessarily all, Entities in the world. Entities not in this configuration are outside of it. + """ + + +class Connectivity(Base): + """ + The disposition of an object (the connected object) to establish a connection with others. + """ + + +class ContactState(Base): + """ + Classifies States in which some objects are in contact. + """ + + +class Container(Base): + """ + A role classifying an object used to contain others. + """ + + +class Containment(Base): + """ + Classifies States in which an object is placed inside another. + The disposition of an object (the container) to contain others. + """ + + +class IncludedObject(Base): + """ + An object that is contained in something. This is meant very general and includes, e.g., elements contained in a set, or things that are spatially contained within the boundaries of some object. + """ + + +class ContainmentState(Base): + """ + Classifies States in which an object is kept inside another object. + """ + + +class FunctionalControl(Base): + """ + Classifies States in which an object restricts the movement of another, at least partially. Usually neither object is construed to be an agent. + + Note that this State focuses on how the interaction of, usually non-agentive, objects restricts their motion. This is in contrast to Blockage/Accessibility states where the placement of some objects influences the access to some of them by a third, usually agentive party. + """ + + +class ContainmentTheory(Base): + """ + A schematic theory that describes a functional relation which ensures that the location of some entity, the locatum, is constrained to be within some region which is the interior of some other entity, the relatum. + + This is also known as FunctionalControlInternal in GUM-4-space (Bateman et al. 2010). + + Let xL, xR be objects filling the locatum, relatum roles of this schema. Then one can infer that xL isInsideOf xR. + """ + + +class ControlTheory(Base): + """ + A description of functional-spatial configurations where one object controls another object's position in space, e.g. if a pot moves, then the popcorn contained therein moves, as well. Note that the objects do not need to be in direct contact. + + Adopted from GUM-4-space (Bateman et al. 2010). + """ + + +class ContinuousJoint(Base): + """ + A continuous hinge joint that rotates around an axis and has no upper and lower limits. + """ + + +class HingeJoint(Base): + """ + A joint that rotates along an axis. + """ + + +class FunctionalSpatialSchemaTheory(Base): + """ + The superclass for theories describing functional spatial relations. + + Adopted from GUM-4-space (Bateman et al. 2010). + """ + + +class Cover(Base): + """ + An object used to cover up others, such as a lid used as a cover for a pot. + """ + + +class Coverage(Base): + """ + The disposition of an object (the cover) to hide or to protect objects by covering them. An example is a door that covers items in a container to e.g. prevent dust getting inside of the container. + """ + + +class CoveredObject(Base): + """ + An object that is covered. + """ + + +class CoverageTheory(Base): + """ + A schematic theory of a functional relation between two objects such that one of them, the locatum, blocks access to the interior of the relatum. + + Let xL, xR be objects filling the locatum, relatum roles of this schema. Then one can infer that xL coversObject xR. + """ + + +class CoveringTheory(Base): + """ + A schematic theory of how an agent can use an instrument to prevent access to the interior of a patient. + """ + + +class ExecutableSchematicTheory(Base): + """ + Also known as "executing schemas" or "x-schemas", these were defined by Bergen and Chang in their work "Embodied Construction Grammar in Simulation-Based Language Understanding" as: + + "Executing schemas, or x-schemas, are dynamic representations motivated in part by motor and perceptual systems (Bailey 1997; Narayanan 1997), on the assumption that the same underlying representations used for executing and perceiving an action are brought to bear in understanding language about that action. The x-schema formalism is an extension of Petri nets (Murata 1989) that can model sequential, concurrent, and + asynchronous events" + + SOMA does not restrict the formalism of ExecutableSchematicTheories; i.e. they don't have to be Petri Nets. + + They maintain their role however as representations able to drive a simulation, at some level of abstraction, of an embodied action. This level of abstraction may be still fairly underspecified as in the case of the original x-schemas and as such not a plan that an agent could run in an actual physical environment without further information. + """ + + +class CrackingTheory(Base): + """ + A schematic theory of how an agent can inflict damage to the surface of an object. + """ + + +class Creation(Base): + """ + A process by which an Entity is created in the physical world. + + Note, most of the physical Entities we will be considering here are in fact arrangements of many other, smaller physical Entities. Therefore another way to look at this is, a 'Physical creation' is the process by which a set of physical Entities is arranged in a certain way, and the arrangement is then itself considered a physical Entity. + """ + + +class Cuttability(Base): + """ + The disposition of an object (the barrier) which makes it able to be cut down (into pieces) usually by some other object with role as a Cutter. Such as a cucumber has cuttability disposition which can be cut by a knife. + """ + + +class Tool(Base): + """ + A role to classify an object used to modify or actuate others. + """ + + +class Cutting(Base): + """ + The goal of this task is to separate one or more pieces from some target object by means of cutting into its constituent material. Unlike a disassembly, a cut is usually not easily reversible. + """ + + +class Database(Base): + """ + A Database is a Software that organizes a collection of data stored and and allows for access, usually via some query engine. + + Source: https://en.wikipedia.org/wiki/Database + """ + + +class SoftwareRole(Base): + """ + A Software Role is a Role applying to only Software and encoding the purpose of the Software: Its Role within Interface Patterns (e.g. Client vs. Server), its functionality (e.g. Database vs. Comnputer Game), and so on. + """ + + +class Deciding(Base): + ... + + +class DerivingInformation(Base): + ... + + +class DeductiveReasoning(Base): + """ + A task in which the Agent, using general logical principles that it considers logically valid, applied to premises that it considers logically true, arrives at conclusions that it considers logically certain. + + Deduction is often explained as starting from the "general" (some property X is known about all members of a set S), applying it to the "specific" (some Entity Y is known to belong to set S), to arrive at a specialization of the general property (X applies to Y). + """ + + +class Deformation(Base): + """ + A process by which a physical Entity changes its shape under the influence of some factors outside of the Entity. + + Note, changes of shape may be self-caused; for example, a gas will naturally disperse. This however would be a different type of process (Dispersion). + + A soft slab of clay deforming under its own weight on Earth would still count as deformation: it is the gravity of the Earth (so, a factor outside the slab of clay) which makes the slab change shape. + """ + + +class ShapedObject(Base): + """ + An object undergoing shape change. + """ + + +class FluidFlow(Base): + """ + A process by which a fluid moves or is moved from a location to another, but such that it maintains its constitution. A fluid is an Entity made of many smaller Entities, loosely bound to each other. + + An issue to highlight here is the maintenance of constitution. Fluids-- gases in particular-- are prone to disperse. Such a process is not flow however, because the loose bounds between the constituents become even looser, to the point of the original Entity becoming entirely discombobulated. + """ + + +class Shifting(Base): + """ + The disposition of an object (the tool) to change the localization of others. + """ + + +class DependentPlace(Base): + """ + A feature that is not part of its host, like a hole in a piece of cheese. + """ + + +class Deposit(Base): + """ + A role classifying an object ontop which others are put to e.g. store them, or to place them in a meaningful way for future activities. + """ + + +class DepositedObject(Base): + """ + An object placed ontop of another one. + """ + + +class Deposition(Base): + """ + The disposition to support objects. + """ + + +class InformationAcquisition(Base): + """ + A mental task in which the executing agent acquires some information that was not immediately available to it before. + A synonym might be "Thinking". + + Examples include recalling knowledge or inferring some information from other information. + """ + + +class Premise(Base): + """ + The role of an object that is used to infer some conclusion via some inference rules. + """ + + +class DesignedComponent(Base): + """ + An object designed to be part or element of a larger whole. + """ + + +class FunctionalPart(Base): + """ + Parts of an agent or an artifact are considered as functional parts. + """ + + +class DesignedContainer(Base): + """ + An item designed to be able to hold some other items, preventing their free movement and/or protecting them from outside influence. Containers may be used for storage, or to obtain control over items that are otherwise hard to manipulate directly (e.g. liquids). + """ + + +class DesignedFurniture(Base): + """ + An object used to make a room or building suitable for living or working. + """ + + +class DesignedTool(Base): + """ + An item designed to enable some action, in which it will play an instrumental role. + """ + + +class Destination(Base): + """ + A role classifying the location where an event or object is directed towards. + """ + + +class Location(Base): + """ + A role classifying a location of interest, often specified as a spatial relation between several objects, themselves usually classified by spatial relation roles. + """ + + +class DestroyedObject(Base): + """ + An object that is detroyed. + """ + + +class Destruction(Base): + """ + A process by which a physical Entity is destroyed. + + Note, most of the physical Entities we are concerned with are actually arrangements of many smaller physical Entities, so another way to look at this is that a 'Physical destruction' is a process by which an arrangement of physical Entities, which was previously itself considered a physical Entity, is changed to such an extent that it is no longer recognized as continuing to exist. + """ + + +class DetectedObject(Base): + """ + An object that is detected. + """ + + +class DeviceState(Base): + """ + A quality belonging to a device which indicates its overall functional state. + """ + + +class DeviceStateRange(Base): + """ + This class defines the values that a device state can take. + """ + + +class DeviceTurnedOff(Base): + """ + A value indicating a device is not in operation. + """ + + +class DeviceTurnedOn(Base): + """ + A value indicating a device is in operation. + """ + + +class Dicing(Base): + """ + A particular kind of cutting where the goal is to produce small pieces out of some object or material. Unlike slices, the pieces to be obtained do not have one or two dimensions being more prominent than others. "Dice", the pieces dicing results in, are approximately cubic. + """ + + +class DirectedMotion(Base): + """ + A Motion that is considered to be toward a location or along a path. It is not important that the final location or path be the intention of some Agent, but it is considered that the important feature of this Motion is that it has a path and/or destination. + """ + + +class UndirectedMotion(Base): + """ + A Motion of a physical Entity for which a destination or path are unknown and/or considered irrelevant; the important aspect about this Motion is simply that it occurs, rather than where it is headed or how it proceeds towards it. + """ + + +class Dirty(Base): + """ + A cleanliness region with values considered as dirty. + """ + + +class Discourse(Base): + """ + A mental task, in which two or more agents discuss some topic via multiple Illocutionary acts, which are part of this task. + """ + + +class Distancing(Base): + """ + A task in which an Agent increases its distance from some location. + """ + + +class Dreaming(Base): + """ + Any form of re-processing episodic memories for long-term memory by natural or aritifical agents. + """ + + +class Driving(Base): + """ + A process type classifying a motion of a body that exists because this body is attached to and controls some other moving body, usually a vehicle. + """ + + +class Flying(Base): + """ + A process type classifying a motion of a body that, through its own power, keeps itself aloft. + """ + + +class Swimming(Base): + """ + A motion of some body through water. The body provides the power for the motion. + """ + + +class Walking(Base): + """ + An agent, under its own power, moves over some solid surface. + """ + + +class Dropping(Base): + """ + The dropped object falls mainly under the influence of gravity. However, an agent may also drop something during navigation. The difference to 'Throwing' is that there is no 'Limb motion' which is a constitiuent of the action. + + 'Dropping' is intentional. Dropping by accident may not has a phase to release the grasp. It could be that the grasp was not strong enough and the objects "slips" away. + """ + + +class Placing(Base): + """ + Distinguished from Positioning in that this task is more about placing an object at a functionally specified location (e.g., place the cup on the table) as opposed to positioning an object at a location defined by coordinates or a region of coordinates (position the cup at xyz). + """ + + +class ESTSchemaTheory(Base): + """ + A schematic theory that describes the existence of an entity. + + Developmental psychology posits that "object permanence" (the assumption that physical objects keep existing even when the agent doesn't perceive them, which consequently informs reasoning about where an object should be, even when perception of it is lost) is a cognitive ability that is not, at least in the very young human child, immediately manifest. Rather, it seems learned via interaction, and usually is among an infant's cognitive repertoire by age 2. + + In SOMA, we represent this ability of a cognitive agent as an ability to generate and maintain ESTSchemaTheories. Each instance of such a theory refers to one particular physical object, the one that the instance of the ESTSchemaTheory asserts to exist. + + Because each instance of an ESTSchemaTheory refers to a single object, ESTSchemaTheories are not associated to any relation between OWL individuals. + """ + + +class ExistingObjectRole(Base): + """ + A role that requires of its filler simply to exist, unlike other roles that may demand e.g. agentive or instrumental participation in some executable schema or plan (AgentRole and Instrument respectively). + + The intention behind such a simple role is to have a way to represent, in a schematic formalism used to describe some scene, that an object is present. In particular, the schema used to convey this information is the ESTSchemaTheory, which has ExistingObjectRole as its sole defined role. + """ + + +class Effort(Base): + """ + A parameter describing the amount of force to be exerted by some actuator. + """ + + +class EnclosedObject(Base): + """ + An object included within the spatial boundaries of another object. + """ + + +class Enclosing(Base): + """ + The disposition of an object (the container) to contain other objects by enclosing them to prevent their free movement. + """ + + +class EndEffectorPositioning(Base): + """ + A task in which an Agent places its end effectors at particular poses. + """ + + +class Manipulating(Base): + """ + Tasks where the goal is to move the prehensile effectors, ie. hands, of an agent so as to achieve some spatial or functional relation with some manipulated object. + + Spatial relations refer to positioning the hands in certain ways relative to the manipulated object, for example nearing or distancing them, or aligning them with some relevant axis. + + Functional relations here refer to interactions between the hands and manipulated object which constrain the possible behavior of the object. Examples of functional relations in manipulation are support and kinematic control. + + Note that manipulation tasks are usually performed with the intention of moving an object in some way, so there is a large conceptual overlap between Manipulating and Actuating. + + However these concepts are nonetheless distinguished in what they "profile", ie. what they focus on as particularly important. + + Actuating profiles the movement of the object itself. + + Manipulating profiles the movement of the hands and the functional relations, such as kinematic control, they establish with the manipulated object. + + Note: we employ Manipulating here in its literal, original sense, of using hands for some purpose, and not in the metaphorical sense of exerting psychological pressure on someone. + """ + + +class Episode(Base): + """ + + """ + + +class ExcludedObject(Base): + """ + An object that is not contained in something. This is meant very general and includes, e.g., elements excluded from a set, or things that are spatially excluded from the boundaries of some object. + """ + + +class ExecutableFile(Base): + """ + An Executable File, sometimes simply referred to as an executable or binary, causes a computer "to perform indicated tasks according to encoded instructions", as opposed to a data file that must be interpreted (parsed) by a program to be meaningful. + + The exact interpretation depends upon the use. "Instructions" is traditionally taken to mean machine code instructions for a physical CPU. In some contexts, a file containing scripting instructions (such as bytecode) may also be considered executable. + """ + + +class Executable_Code(Base): + """ + Executable Code is Code that when compiled / interpreted, has some clear entrance point and can be executed. Note the difference to an Executable File, which is the file that contains such (compiled) code. + """ + + +class ExecutableFormat(Base): + """ + An Executable Format is a File Format that allows computers to directly execute the content. Examples are MZ (DOS) or COFF. + """ + + +class SchematicTheory(Base): + """ + A theory used to describe, analyze, and reason with the meaning of a linguistic message. + + Note that such theories are useful both when analyzing an actual linguistic production, and when creating a linguistic production to describe some observed experience. + """ + + +class ExecutableSoftware(Base): + """ + Executable Software is Software that can directly be executed, in comparison to a Software Library, which might only contain functionality via interfaces, but offers no execution entry point. + """ + + +class Software(Base): + ... + + +class RelationAdjacentRole(Base): + """ + A role classifying an object participating in some relation, e.g. a participant in a spatial relation or a linguistic fragment in a rhetorical relation to another. + """ + + +class ExperiencerRole(Base): + """ + A role used in frame semantics to classify agents performing perception actions, or being the subjects affected by some biological process. + """ + + +class ExtractedObject(Base): + """ + An object that is removed from a container or system. + """ + + +class PhysicalQuality(Base): + """ + Any aspect of an entity that is dependent on its physical manifestation. + """ + + +class FailedAttempt(Base): + """ + A description of a failed attempt to achieve some goal. + """ + + +class Unsuccessfulness(Base): + """ + A description of a situation with a goal that was not or not fully achieved by some system. + """ + + +class FaultySoftware(Base): + """ + A description of a situation where some software has a bug. + """ + + +class SoftwareDiagnosis(Base): + """ + A diagnosis of the software of a system. + """ + + +class PhysicalAcquiring(Base): + """ + The goal of this task is to make some object usable for other tasks, by possibly changing its physical state. Usually, it overlaps some task that describes the manner in which an object is obtained. + + The prototypical example of PhysicalAcquiring is picking up an object. + + Note that buying an object is NOT PhysicalAcquiring. Buying, or ownership transfer in general, also involves an adjustment in social structures describing ownership. + """ + + +class Configuration(Base): + """ + A collection whose members are 'unified', i.e. organized according to a certain schema that can be represented by a Description. + Typically, a configuration is the collection that emerges out of a composed entity: an industrial artifact, a plan, a discourse, etc. + E.g. a physical book has a configuration provided by the part-whole schema that holds together its cover, pages, ink. That schema, based on the individual relations between the book and its parts, can be represented in a reified way by means of a (structural) description, which is said to 'unify' the book configuration. + """ + + +class Finger(Base): + """ + A limb used for grasping objects. + """ + + +class Hand(Base): + """ + A prehensile effector including palm, fingers, and thumb. + """ + + +class FixedJoint(Base): + """ + A joint that cannot move, designed to fixiate links. + """ + + +class MovableJoint(Base): + """ + A joint where the two connected links can move relative to each other in some dimension. + """ + + +class Flipping(Base): + """ + The task in which the agent turns an object over by using a tool or by manipulating + """ + + +class FloatingJoint(Base): + """ + A joint that allows motion for all 6 degrees of freedom. + """ + + +class Fluid(Base): + """ + A substance with a consistency such that it can flow or diffuse. + """ + + +class Substance(Base): + """ + Any PhysicalBody that has not necessarily specified (designed) boundaries, e.g. a pile of trash, some sand, etc. + In this sense, an artistic object made of trash or a dose of medicine in the form of a pill would be a FunctionalSubstance, and a DesignedArtifact, since its boundaries are specified by a Design; aleatoric objects that are outcomes of an artistic process might be still considered DesignedArtifact(s), and Substance(s). + """ + + +class MovedObject(Base): + """ + An object undergoing location change. + """ + + +class Focusing(Base): + """ + The mental task to center the attention to some subject. + """ + + +class Foolishness(Base): + """ + A description of foolish behavior. + """ + + +class ForgettingIncorrectInformation(Base): + """ + A mental task in which the executing agent aims to correct its present information by deleting an incorrect information. + """ + + +class InformationDismissal(Base): + """ + A mental task in which the executing agent dismisses some information. + + An example is forgetting some knowledge. + """ + + +class ForgettingIrrelevantInformation(Base): + """ + A mental task in which the executing agent aims to clean up its present information by deleting an irrelevant information. + """ + + +class Language(Base): + """ + A Language is a structured System for communication. + + From Wikipedia: https://en.wikipedia.org/wiki/Language + """ + + +class Item(Base): + """ + A role played by a non-agentive object operated on by an action. + """ + + +class FunctionalDesign(Base): + """ + The design of an object from functionality point of view. A functional design is useful to develop complex modular objects with components that have a specific purpose, and can function with minimum side effect on other components of that object. + """ + + +class FunctionalDiagnosis(Base): + """ + An internal diagnosis of a system. + """ + + +class PhysicalBody(Base): + """ + Physical bodies are PhysicalObject(s), for which we tend to neutralize any possible artifactual character. They can have several granularity levels: geological, chemical, physical, biological, etc. + """ + + +class LocatumRole(Base): + """ + Denotes the object with primary focal prominence in a spatial or spatio-temporal schema. Terminological variants that appear in the literature on cognitive linguistics include Figure (Talmy 1983) and Trajector (Langacker 1986). + """ + + +class RelatumRole(Base): + """ + Denotes the reference object in a spatial or spatio-temporal schema, i.e. the object with secondary focal prominence. Terminological variants: Ground (Talmy 1983), Landmark (Langacker 1986). + """ + + +class GetTaskParameter(Base): + """ + A task in which an Agent computes some parameter relevant for another task. + """ + + +class Planning(Base): + """ + A Mental task in which the Agent endeavours to create a sequence of actions for itself which, if followed, will bring about a particular state of affairs in the world. This particular state of affairs is known to the agent and is often called the goal state of the planning action. Planning commits itself to feasibility: the Agent attempts to find a sequence of actions that it believes it will actually be able to perform. + """ + + +class GraphDatabase(Base): + """ + A Graph Database is a Database that uses graph structures for semantic queries with nodes, edges, and properties to represent and store data. + """ + + +class GraphQueryLanguage(Base): + """ + A Query Language that is designed for communication with some Graph Database. + """ + + +class QueryLanguage(Base): + """ + Query languages, are Computer languages used to make queries in databases and information systems (Source: https://en.wikipedia.org/wiki/Query_language). + + Note that despite their name, Query languages typically come with syntax and semantic to not only ask for information, but also provide them, e.g., via SQL Update. In that sense, the term "query" from above refers to any formal object of information exchange with a database. + """ + + +class GraspTransfer(Base): + """ + A task in which an Agent switches which of its end effectors holds an object. + """ + + +class Grasping(Base): + """ + A task in which an Agent uses its end effectors to grasp an object, thus gaining kinematic control over it. + """ + + +class Graspability(Base): + """ + The disposition of an object (e.g. the handle) to afford grasping the object. + """ + + +class Releasing(Base): + """ + A task in which an agent relinquishes its kinematic control over an object, typically by releasing it from its grasp. + """ + + +class GraspingMotion(Base): + """ + A process type classifying a motion by which some end effector acquires kinematic control over some other object. + """ + + +class IntermediateGrasp(Base): + """ + A kind of grasp that acquires kinematic control over the gripped object, but without attempting to achieve either strong holding force nor precision of subsequent movement of the gripped object. + """ + + +class PowerGrasp(Base): + """ + An Agent grasps an object, and focuses on obtaining a strong grasping force upon it, resulting in a grasp able to resist significant outside disturbances. This is useful when using tools with which to later exert force on other things, e.g. when hammering nails. + """ + + +class PrecisionGrasp(Base): + """ + An Agent grasps an object, and focuses on obtaining precise kinematic control over it. This is useful for then following precise movements, e.g. when writing. + """ + + +class PrehensileMotion(Base): + """ + A motion of a prehensile effector. + """ + + +class ReleasingMotion(Base): + """ + A motion by which a prehensile effector relinquishes kinematic control over an object. + """ + + +class GreenColor(Base): + """ + A color region with dominant green color. + """ + + +class Gripper(Base): + """ + A mechanical device that grasps and holds things. + """ + + +class PrehensileEffector(Base): + """ + An effector used to grasp objects, such as a hand of a human, or the long prehensile tail of a monkey. + """ + + +class HardwareDiagnosis(Base): + """ + A diagnosis of the hardware of a system. + """ + + +class TechnicalDiagnosis(Base): + """ + A functional diagnosis of a technical system. + """ + + +class HasQualityRegion(Base): + """ + The relation between an individual quality and a region. + todo(DB): added for NEEMs (quale change), but not sure yet about it... + """ + + +class Head(Base): + """ + A functional part of the body responsible for carrying high bandwidth sensors, i.e., camera. + """ + + +class HeadMovement(Base): + """ + The Agent moves a part of their body carrying high-bandwidth sensors such as cameras. The movement of other body parts is not significant. + todo: (Mihai:) This seems too specific, given the "Directed"/"Undirected motion" categories. + """ + + +class HeadTurning(Base): + """ + A process type classifying a motion of an Agent's head such that the direction this head faces changes relative to the facing direction of the Agent's body as a whole. + """ + + +class Holding(Base): + """ + A task by which an Agent keeps an object over which it has kinematic control, typically via grasping, at some specified pose. + """ + + +class HostRole(Base): + """ + In the Plug-in-Host pattern, a Host application provides services which the Plug-in can use, including a way for Plug-ins to register themselves with the Host application and a protocol for the exchange of data withPplug-ins. Plug-ins depend on the services provided by the host application and do not usually work by themselves. Conversely, the host application operates independently of the plug-ins, making it possible for end-users to add and update plug-ins dynamically without needing to make changes to the host application. + + Source: https://en.wikipedia.org/wiki/Plug-in_(computing) + """ + + +class PluginSpecification(Base): + """ + The Specification of a Plugin interface defines how a Host and a Plug-in function together and exchange information. + """ + + +class Humanreadable_Programming_Language(Base): + """ + A Programming language like Java, Python etc. but not binary machine code. + """ + + +class Source_Code(Base): + """ + The Source Code itself (the specific set of instruction in a human-readable Programming Language), not the file that it is contained in nor the implemented algorithm! + """ + + +class HumanActivityRecording(Base): + """ + An episode in which one or more human beings perform an activity and are recorded doing so. + """ + + +class RecordedEpisode(Base): + """ + An episode which has been recorded. + """ + + +class Imagining(Base): + """ + A Mental task in which the Agent constructs a mental representation of a possible world. An Agent performing an Imagining activity does not aim to construct a representation that aspires to be faithful to some past, present, or future state of affairs of the actual world it is embodied in. + """ + + +class Impediment(Base): + """ + The disposition of an object (the obstacle) to prohibit certain ways of entering or leaving a space or group. An example is a doorstopper constraining a door, prohibiting it to enter the area behind it. + """ + + +class Obstacle(Base): + """ + An object used to restrict access to a protected space or group. + """ + + +class RestrictedObject(Base): + """ + An object with restrictions to access something. + """ + + +class Inability(Base): + """ + A description of a situation with a goal that some system is unable to achieve. + """ + + +class IncompatibleSoftware(Base): + """ + A description of a situation where two software systems are incompatible with each other. + """ + + +class InductiveReasoning(Base): + """ + A task in which the Agent endeavors to accumulate confidence in some general statement about the world, by gathering instances in which this general statement appears to apply. Note that perfect confidence can never be guaranteed by induction. + + Induction is often described as a move from many "specifics" (swan A is white, swan B is white, swan C is white, ...) to the "general" (all swans are white). + """ + + +class Infeasibility(Base): + """ + A description of a situation with a goal that is impossible to achieve in some situational context. + """ + + +class InferenceRules(Base): + """ + The role of an object that is used to derive a conclusion from some premises. + """ + + +class InformationRetrieval(Base): + """ + A mental task in which an Agent recalls some knowledge that has been memorized previously. + + Examples include a human remembering some information or a computer retrieving knowledge from a database. + + The difference to Remembering is that for this Task, we are concerned with knowledge about a previous world state. Memory Retrieval is more general in the sense that it also includes the retrieval of learned facts and rules. + """ + + +class InformationStorage(Base): + """ + A mental task in which the executing agent persists some information for later recall, if necessary. + + An example is learning new knowledge. + """ + + +class StoredObject(Base): + """ + An object being stored into some other object, usually inside a container. + """ + + +class InsertedObject(Base): + """ + An object inserted into another object. + """ + + +class Insertion(Base): + """ + The disposition of an object (the container) to contain other objects that can be inserted into the container through a portal. + """ + + +class Instructions(Base): + """ + The role of a plan to follow during an execution task. + """ + + +class Interpreting(Base): + """ + A task in which an Agent interpretes some information, e.g., makes sense of some incoming message or its visible surroundings. + """ + + +class InterrogativeClause(Base): + """ + A clause which makes a request, typically information, of some agent. + + Note that in a semantic sense such clauses always request information, but in a pragmatic sense they can be used to convey commands or requests for action, such as e.g. "can you close the door?" The question is not just a request for information about ability, but a request to perform a task. + """ + + +class Introspecting(Base): + """ + A mentalk task in which an Agent gathers and processes information about its own mental tasks via, e.g., Meta Reasoning. + """ + + +class KineticFrictionAttribute(Base): + """ + Friction that occurs when two touching objects are moving relative to each other. + """ + + +class KinoDynamicData(Base): + """ + An InformationObject containing data about how a physical object is put together such that its parts may move relative to each other, and what the physical characteristics of those parts are. + """ + + +class KnowledgeRepresentationLanguage(Base): + """ + A Knowledge Representation Language is a Language with fixed semantics and syntax to describe some knowledge. Examples are JSON and the different OWL Profiles. + """ + + +class Labeling(Base): + ... + + +class Text(Base): + """ + Any Information Object defined using a Language that, when realized through a symbolic writing system, can be read and made sense of. + + One may define Text as anything that can be made sense of, including e.g., Speech or Paintings. + + However, the argument can be made that Speech or Paintings are not considered Text as they cannot be EXACTLY realized by a symbolic writing system: Speech may loose punctuation, Paintings their original appearance. + On the other hand, this might not be true as both could be encoded in a binary format that can be interpreted using a language (eg., mp3, png). + """ + + +class Leaning(Base): + """ + An Agent pitches its body in some direction. + """ + + +class PosturalMoving(Base): + """ + The Agent changes or takes an overall configuration of its body but is otherwise not significantly affecting other objects nor moving a significant amount from its original location. + + Posture changes may take place as part of other actions, for example turning when walking. + """ + + +class Learning(Base): + """ + The mental task of storing information for later use. + + This is more general than memorizing, as the later only captures declarative knowledge. + """ + + +class Leg(Base): + """ + A limb on which an agent walks or stands. + """ + + +class LimbMotion(Base): + """ + An Agent moves its limbs in some way. + """ + + +class Linkage(Base): + """ + The disposition of an object (the linked object) to establish a connection with others by being linked together. + """ + + +class LinkedObject(Base): + """ + An object that is linked to some other object. + """ + + +class LinkageState(Base): + """ + Classifies States in which two objects are in a rigid connection, such that the movement of one determines the movement of the other. + """ + + +class SpatioTemporalRole(Base): + """ + Roles that classify entities which locate an event or object in space and time. + """ + + +class SpatialRelationRole(Base): + """ + Roles classifying entities participating in some spatial relation. + """ + + +class LocutionaryAction(Base): + """ + A Locutionary Act is the performance of an utterance (source: https://en.wikipedia.org/wiki/Locutionary_act). + + We additionally require a Locutionary Act to be performed by an Agent, not an Actor - this is what sets it apart from a Communication Action. + """ + + +class LookingAt(Base): + """ + better: Gazing + """ + + +class LookingFor(Base): + """ + A task by which an Agent uses its perception apparatus to check for the presence of an object in some specified area. + """ + + +class Lowering(Base): + """ + A task in which an Agent reduces the elevation at which they hold an item. + """ + + +class PhysicalAction(Base): + """ + An action performed by an agent by using its body in some way to interact with the physical world, e.g., through manipulation of objects, or by changing the posture. + """ + + +class Markup_Language(Base): + """ + Markup refers to data included in an electronic document which is distinct from the document's content in that it is typically not included in representations of the document for end users, for example on paper or a computer screen, or in an audio stream. Markup is often used to control the display of the document or to enrich its content to facilitate automated processing. A markup language is a set of rules governing what markup information may be included in a document and how it is combined with the content of the document in a way to facilitate use by humans and computer programs. + + From Wikipedia: https://en.wikipedia.org/wiki/Markup_language + """ + + +class Material(Base): + """ + The matter from which a thing is made. + """ + + +class MedicalDiagnosis(Base): + """ + A functional diagnosis of an organism. + """ + + +class Organism(Base): + """ + A physical objects with biological characteristics, typically that organisms can self-reproduce. + """ + + +class Memorizing(Base): + """ + An atomic mental task in which an Agent saves some (declarative) information for later retrieval. + + Examples include a student learning vocabularies or a computer saving some information to a database. + """ + + +class MentalAction(Base): + """ + An Event construed as the Agent participant affecting Entities that are representations of actual or potential Entities or Events in the physical world in which the Agent is embodied. These representations are maintained by the Agent participant in the 'Mental action' event. + + One could argue Mental actions are all Physical actions, because anything the Agent may use to maintain such representations will be physical things, However, we make this distinction because for Mental actions it is less important to consider the physical support of the representation and how it changes, and more important to track how the information content of the representation changes. + """ + + +class MeshShape(Base): + """ + A solid geometrical figure described in a mesh file. + """ + + +class MeshShapeData(Base): + """ + An InformationObject containing data about the geometry of a physical object. + """ + + +class MetaCognitionEvaluationTopic(Base): + """ + A topic used while an Agent describes its own cognitive processes and acions to evaluate them according to some metric. + """ + + +class MetaCognitionTopic(Base): + """ + A topic for a description that an Agent might make of its own cognitive processes and actions. + """ + + +class MetaCognitionMemoryTopic(Base): + """ + A topic used while an Agent describes its own cognitive processes and actions, and which covers descriptions of what memories are involved in them. + """ + + +class MetaCognitionPlanningTopic(Base): + """ + A topic used while an Agent describes the planning it does for its own cognitive processes and actions. + """ + + +class ThinkAloudTopic(Base): + """ + A topic relevant for a think-aloud communication. + """ + + +class MetacognitiveControlling(Base): + """ + The concious or subconcious task to control the own mental processes, e.g., evaluating them and instructing the own mind to shift attention. + """ + + +class MetacognitiveMonitoring(Base): + """ + The task to label the processes and states of the own mind, e.g., to interprete the feeling of knowing an information but not being able to retrieve it at the moment as a tip-of-the-tongue event. + """ + + +class Mixing(Base): + """ + A task by which an Agent combines several entities, such that the combination is difficult or in practice impossible to reverse. + """ + + +class MixingTheory(Base): + """ + A schematic theory about how an agent can mix a fluid or particulate object. + """ + + +class MonitoringJointState(Base): + """ + A task in which the Agent keeps track of the physical state of its joints, e.g. their positions, velocities, efforts. + """ + + +class Proprioceiving(Base): + """ + A task in which the Agent gathers and interprets sensor information about itself. + """ + + +class ProcessFlow(Base): + """ + A description that structures a Process. + """ + + +class PhysicsProcess(Base): + """ + A process involving physical objects and phenomena which does not change the chemical constituency of the affected objects. + """ + + +class MovingAway(Base): + """ + A process type classifying a motion by which some Agent puts distance between itself and another object or location. + """ + + +class MovingTo(Base): + """ + A task in which an Agent moves towards a location. + """ + + +class Natural_Language(Base): + """ + A Natural Language is any language that has evolved naturally in humans through use and repetition without conscious planning or premeditation. + + From Wikipedia: https://en.wikipedia.org/wiki/Natural_language + """ + + +class Natural_Language_Text(Base): + """ + A Text in a Natural Language. + """ + + +class Ontology(Base): + """ + An ontology encompasses a representation, formal naming, and definition of the categories, properties, and relations between the concepts, data, and entities that substantiate one, many, or all domains of discourse. More simply, an ontology is a way of showing the properties of a subject area and how they are related, by defining a set of concepts and categories that represent the subject. + + From Wikipedia: https://en.wikipedia.org/wiki/Ontology_(information_science) + """ + + +class Ontology_Language(Base): + """ + An Ontology Language is a Knowledge Representation Language to describe knowledge about properties of a subject area and how they are related, by defining a set of concepts and categories that represent the subject using logic. Examples are the different OWL Profiles. + + Source: https://en.wikipedia.org/wiki/Ontology_(information_science) + """ + + +class Option(Base): + """ + The Role of objects that are used, e.g., in Selecting Tasks. + """ + + +class FormalEntity(Base): + """ + Entities that are formally defined and are considered independent from the social context in which they are used. They cannot be localized in space or time. Also called 'Platonic entities'. + Mathematical and logical entities are included in this class: sets, categories, tuples, costants, variables, etc. + Abstract formal entities are distinguished from information objects, which are supposed to be part of a social context, and are localized in space and time, therefore being (social) objects. + For example, the class 'Quark' is an abstract formal entity from the purely set-theoretical perspective, but it is an InformationObject from the viewpoint of ontology design, when e.g. implemented in a logical language like OWL. + Abstract formal entities are also distinguished from Concept(s), Collection(s), and Description(s), which are part of a social context, therefore being SocialObject(s) as well. + For example, the class 'Quark' is an abstract FormalEntity from the purely set-theoretical perspective, but it is a Concept within history of science and cultural dynamics. + + These distinctions allow to represent two different notions of 'semantics': the first one is abstract and formal ('formal semantics'), and formallyInterprets symbols that are about entities whatsoever; for example, the term 'Quark' isAbout the Collection of all quarks, and that Collection isFormalGroundingFor the abstract class 'Quark' (in the extensional sense). + The second notion is social, localized in space-time ('social semantics'), and can be used to interpret entities in the intensional sense. For example, the Collection of all quarks isCoveredBy the Concept 'Quark', which is also expressed by the term 'Quark'. + """ + + +class Singleton(Base): + """ + A 'Set' that contains exactly one member. + """ + + +class Orienting(Base): + """ + A task in which an Agent adjusts the orientation of an object. + """ + + +class Positioning(Base): + """ + A task in which an Agent places an object at a particular position. + """ + + +class Origin(Base): + """ + A role classifying the location where an event or object originated. + """ + + +class ParkingArms(Base): + """ + A task by which an Agent arranges its arms in such a way so as to minimize opportunities for collision while moving through the environment. + """ + + +class PhaseTransition(Base): + """ + An EventType that classifies processes by which matter changes from some distinguishable phase to another. We will use this to refer to the classical phase transitions between Solid, Liquid, Gaseous, Plasma etc. phases. + """ + + +class PhysicalAccessibility(Base): + """ + Classifies States in which an item is placed in a container or protected by a protector, but the placement of the item and container is such that a, usually agentive, accessor may nevertheless reach the item in order to perform a task. + """ + + +class PhysicalBlockage(Base): + """ + Classifies States in which an object, in general called restrictor, blocks access to an item. A usually agentive accessor, whose access is blocked, may be specified. + """ + + +class PhysicalExistence(Base): + """ + A State in which an Entity is said to exist in the physical world. + """ + + +class PhysicalState(Base): + """ + A State describing how Entities in the physical world relate to each other. + """ + + +class PlacingTheory(Base): + """ + A schematic theory of how an agent can place a patient at a particular goal location. + """ + + +class PlanarJoint(Base): + """ + A joint that allows motion in a plane perpendicular to an axis. + """ + + +class PluginRole(Base): + """ + In the Plug-in-Host pattern, a Host application provides services which the Plug-in can use, including a way for Plug-ins to register themselves with the Host application and a protocol for the exchange of data withPplug-ins. Plug-ins depend on the services provided by the host application and do not usually work by themselves. Conversely, the host application operates independently of the plug-ins, making it possible for end-users to add and update plug-ins dynamically without needing to make changes to the host application. + + Source: https://en.wikipedia.org/wiki/Plug-in_(computing) + """ + + +class Pourable(Base): + """ + The disposition of a fluid or substance which makes it possible to pour it out of a container and into or onto other objects. + """ + + +class PouredObject(Base): + """ + An object being poured into or onto some other object. A role of some fluid or substance that is the patient of pouring task. + """ + + +class Pouring(Base): + """ + A task in which an agent lets liquid substance to flow out of an object. The agent has a kinematic control over the object. + """ + + +class PouringInto(Base): + """ + The task in which the agent pours the substance into another object. + """ + + +class PouringOnto(Base): + """ + The task in which an agent pours the substance on top of an object + """ + + +class Prediction(Base): + """ + A Mental task in which the Agent endeavours to construct a representation of a future state of the world. Prediction commits itself to some degree of accuracy: the Agent believes that eventually something similar to the predicted state will come to pass. + """ + + +class Prospecting(Base): + """ + A Mental task in which an Agent endeavours to construct a representation of a future state of affairs of the world it is embodied in. + """ + + +class Predilection(Base): + """ + The relation between a 'Preference' and the 'Order' that the 'Preference' defines over Situations. + + For the complete model, see 'Preference'. + """ + + +class SocialRelation(Base): + """ + Any social relationship + """ + + +class PreferenceOrder(Base): + """ + The relation between a 'Preference' and the 'Order' that the 'Preference' defines over Descriptions of Situations. + """ + + +class PreferenceRegion(Base): + """ + The 'Region' of 'Preference's, containing all possible 'Order's between all possible 'Situation's. + """ + + +class SocialObjectAttribute(Base): + """ + Any Region in a dimensional space that is used to represent some characteristic of a SocialObject, e.g. judgment values, social scalars, statistical attributes over a collection of entities, etc. + """ + + +class PrismaticJoint(Base): + """ + A sliding joint that slides along an axis, and has a limited range specified by the upper and lower limits. + """ + + +class Progression(Base): + """ + A situation that sattisies a description of how a process evolves over time. + """ + + +class Protector(Base): + """ + A role classifying an object that protects another by preventing other entities from coming in contact with the protected object. + """ + + +class ProximalTheory(Base): + """ + An image schematic theory that describes a qualitative spatial relation indicating relative proximity, as expressed by the prepositions 'near', 'close to', 'next to', etc. + + It may seem that proximity is a very simple notion, requiring no sophisticated theoretical underpinnings. However, proximity is an extremely object- and purpose-dependent relation. A store next door is in a closeness relation to a person, and so is the Sun in the sky, despite the physical distances being different by several orders of magnitude. + + As such, a theory, i.e. a description of what a particular kind of closeness means and in which contexts it applies, is necessary. + + Adopted from GUM-4-space (Bateman et al. 2010). + + Let xL, xR be objects filling the locatum, relatum roles of this schema. Then one can infer that xL 'near to' xR. + """ + + +class PushingAway(Base): + """ + A task in which an Agent pushes an object in front of themselves. + """ + + +class PushingDown(Base): + """ + A task in which an Agent pushes an object downwards. + """ + + +class PuttingDown(Base): + """ + A task in which an Agent puts down an object they have kinematic control over, e.g. a grasped object. + """ + + +class QualityTransition(Base): + """ + todo(DB): added for NEEMs (quale change), but not sure yet about it... + """ + + +class Query(Base): + """ + A role played by some Information Realization that carries meaning, where this meaning is a query of some sort. + """ + + +class QueryAnsweringTask(Base): + """ + An Answering task that is the reaction to some Query answering task. + + In a lot of cases, such a task is also an Assertion task, e.g., in the following discourse: + + "How will the weather be tomorrow?" + "It is going to rain in the morning." + + However, sometimes this might be not the case, e.g., with counterquestions. + """ + + +class QueryEngine(Base): + """ + A Query Engine is a Software that can answer some queries. + """ + + +class Reaching(Base): + """ + A task in which an Agent moves one or more of its arms towards a location or object. + """ + + +class Retracting(Base): + """ + A task in which an Agent moves its arms away from a location. + """ + + +class Reasoner(Base): + """ + A Reasoner is some Software that can infer new, implicit knowlegde from explicitly stated knowledge. + + This definition is broad and we consider any System fitting the above description as reasoners. For example, the following can be seen as Reasoners: + * A simulation, where the explicit knowledge corresponds to the initial situation, and the implicit knowlegde corresponds to the situation that is derived from that by simulating some unfolding processes. + * A machine learning algorithm, e.g., an image classifier: The explicit knowledge is the visual content of a picture (even down to the pixel), the implicit knowledge is the derived classification. + * A logic based rule engine, where initial facts are the explicit knowledge, and derived facts are the implicit knowledge. + """ + + +class RecipientRole(Base): + """ + A role which classifies an agent who receives an object modified or created by an action. + """ + + +class RedColor(Base): + """ + A color region with dominant red color. + """ + + +class Reification(Base): + """ + A description that *describes* a formal entity. + """ + + +class RelationalDatabase(Base): + """ + A Relational Database is a Database based on the relational model of data, which organizes data into one or more tables (or "relations") of columns and rows, with a unique key identifying each row. + + Source: https://en.wikipedia.org/wiki/Relational_database + """ + + +class RelationalQueryLanguage(Base): + """ + A Query Language that is designed for communication with some Relational Database. + """ + + +class RelevantPart(Base): + """ + Features that are relevant parts of their host, like a bump or an edge. + """ + + +class Remembering(Base): + """ + A Mental task in which the Agent recalls a record of a previous state of affairs in the world. + + The Agent must have witnessed and memorized this state of affairs in order to record it. Remembering commits itself to accuracy: the Agent attempts to reconstruct as accurate a record as it can. Note, this does not mean the Agent will communicate the recollection accurately. + + The difference to Memory retrieval is that for this Task, we are concerned with knowledge about a previous world state. Memory Retrieval is more general in the sense that it also includes the retrieval of learned facts and rules. + """ + + +class Retrospecting(Base): + """ + A Mental task in which an Agent endeavors to construct a representation of a past state of affairs of the world it is embodied in. + Done by analogy with Prospecting. Currently mono-subcategory, but perhaps we might find more. + + As an example, a kind of Abductive reasoning would fit here: reconstruction, in which the agent attempts to create a representation of a past state of affairs which the agent has not actually observed, based on traces and clues surviving to the present. + """ + + +class RemovedObject(Base): + """ + An object that is removed from another. + """ + + +class Replanning(Base): + """ + A mental task, in which an agent reconfigures some plan that has been put together before. + """ + + +class RevoluteJoint(Base): + """ + A hinge joint that rotates along an axis and has a limited range specified by the upper and lower limits. + """ + + +class Room(Base): + """ + Space that can be occupied or where something can be done. + """ + + +class RoomSurface(Base): + """ + The surface of a room. + """ + + +class Surface(Base): + """ + The outside part or uppermost layer of something. + """ + + +class Rubbing(Base): + """ + The motion of an object sliding along the surface of another, for example, to clean the surface. + """ + + +class Theory(Base): + """ + A Theory is a Description that represents a set of assumptions for describing something, usually general. Scientific, philosophical, and commonsense theories can be included here. + This class can also be used to act as 'naturalized reifications' of logical theories (of course, they will be necessarily incomplete in this case, because second-order entities are represented as first-order ones). + """ + + +class SelectedObject(Base): + """ + An object chosen as the result of some selection task. + """ + + +class Selecting(Base): + """ + A Task where an Agent decides between two or more options. + """ + + +class SelectingItem(Base): + """ + A task in which an Agent selects some object to use for a subsequent task. + """ + + +class SelfReflection(Base): + ... + + +class Serving(Base): + """ + The task in which the agent delivers an object to a physical agent + """ + + +class SettingGripper(Base): + """ + A task by which an Agent arranges one/some/all of its grippers in some configuration. + """ + + +class SixDPose(Base): + """ + A point in three dimensional space, given as translation in a reference coordinate system, and an orientation of a coordinate system centered at that point relative to the reference coordinate system. + """ + + +class Shaping(Base): + """ + The disposition of an object (the tool) to change the shape of others. + """ + + +class Sharpness(Base): + """ + The quality of having a thin edge or point that can cut something or make a hole into something. It is worth to note here that the social aspect of sharpness such as the quality of being clear, intelligent etc is not considered as sharpness according to this definition. + """ + + +class Simulating(Base): + """ + A Mental task in which the Agent endeavours to create representations of a sequence of states of affairs in the world. Simulation commits itself to some degree of transition accuracy: supposing the actual state of the world was the initial state of the simulation, the world state and simulation state should evolve to some degree similarly. + + Simulation does not commit itself to state accuracy: the initial state of the simulation is not constrained to be faithful to the actual state of the world in which the Agent is embodied. Counterfactual simulation ("what would happen if--?") is possible. + """ + + +class Simulation_Reasoner(Base): + """ + A Simulation-based Reasoner is a simulation that is used as a reasoner, where the explicit knowledge corresponds to the initial situation, and the implicit knowlegde corresponds to the situation that is derived from that by simulating some unfolding processes. + """ + + +class Set(Base): + ... + + +class Size(Base): + """ + The magnitude or dimension of a thing which can be measured as length, width, height, diameter, perimeter, area, volume. + """ + + +class Slicing(Base): + """ + A particular kind of cutting where the goal is to produce slices from some solid object. + """ + + +class Sluggishness(Base): + """ + A description of sluggish behavior. + """ + + +class SocialState(Base): + """ + A State which describes how Agents relate to each other. + + One can argue that any Social state is a Physical state, since anything the Agents may use to construct a social relationship is made of physical things. The difference is that the physical support of the social relationships is not important here, what matters instead is the nature and content of the social relations, regardless of how they are physically realized. + Note here a distinction: the Agents involved must be able to communicate. This is because while it is often assumed that an Agent has or aspires to have similar cognitive capacities to a human, This need not be the case; in particular, not all Agents need to maintain theories of mind about each other and therefore not all Agents need to communicate with each other. It is hard to see what sort of meaning Social concepts might have to such Agents, since Social concepts are all about shared constructions. + + Note also that the DUL SocialAgent class is not an appropriate restriction however. SocialAgent is one that exists by agreement of PhysicalAgents. For example, a corporation or a nation are SocialAgents. An Agent with the capability to engage socially is not necessarily a DUL SocialAgent. + """ + + +class Software_Configuration(Base): + ... + + +class SocialAgent(Base): + """ + Any individual whose existence is granted simply by its social communicability and capability of action (through some PhysicalAgent). + """ + + +class SoftwareLibrary(Base): + ... + + +class SourceMaterialRole(Base): + """ + A role classifying a substance or object that enters a process of transformation intended to create some other object. + """ + + +class SphereShape(Base): + """ + A round solid figure with every point on its surface equidistant from its centre. + """ + + +class Standing(Base): + """ + A motion by which an Agent arranges its body in an upright configuration. Typically, it makes sense to speak of standing for bodies where some limbs are dedicated to moving the whole body while some limbs are used for manipulation of other objects. + """ + + +class StaticFrictionAttribute(Base): + """ + Friction between two touching objects that do not move relative to each other. + """ + + +class StatusFailure(Base): + """ + A status indicating the failure during some workflow execution. + """ + + +class StimulusRole(Base): + """ + A role classifying an object that is perceived by some agent and thus triggers some reaction (e.g., a perception event). + """ + + +class Stirring(Base): + """ + A task in which an agent dissolves small particles like sugar or salt in fluid + """ + + +class Storage(Base): + """ + The disposition of an object (the container) to store other objects. Storage of an object would facilitate several objectives; such as to store objects in a safe or usual place, to prevent the substances e.g. prevention of milk going bad by storing them in a refrigrator. + """ + + +class StructuralDesign(Base): + """ + A design of an object which describes its stability, strength and rigidity, and considers the way in which parts of an object are arranged. + + """ + + +class TaskInvocation(Base): + """ + An elementary workflow consisting in the invocation of one single task. It is used as a descriptive context inside of which factual bindings are valid between the task's arguments and other entities (such as the "local variables" of a larger workflow). + """ + + +class SuccessDiagnosis(Base): + """ + A diagnosis of the fullfilment of a goal that motivates the behavior of a system. + """ + + +class Successfulness(Base): + """ + A description of a situation with a goal that was achieved by some system. + """ + + +class SupportState(Base): + """ + Classifies States in which an object is not able to move under gravity because of its placement relative to some other object. + """ + + +class Supporter(Base): + """ + A role classifying an object used to support others. + """ + + +class SupportTheory(Base): + """ + An image schematic theory that describes the reified functional relation holding between two spatial objects x and y, such that x physically supports y in the presence of gravity; x and y need not be in contact. An example of such an expression is "The bowl is on the table". + + This is also known as FunctionalControlExternal in GUM (Bateman et al. 2010). + + Let xL, xR be objects filling the locatum, relatum roles of this schema. Then one can infer that xL isSupportedBy xR. + """ + + +class SupportedObject(Base): + """ + An object that is supported by some supporter. + """ + + +class SymbolicReasoner(Base): + """ + A Symbolic Reasoner, is a piece of software able to infer logical consequences from a set of asserted facts or axioms. + + Source: https://en.wikipedia.org/wiki/Semantic_reasoner + """ + + +class Tapping(Base): + """ + A motion, usually repeated several times, for example, to probe the surface of an object. + """ + + +class Taxis(Base): + """ + An innate behavioural response such as the knee-jerk reflex or the sucking reflex of human infants. + """ + + +class Temperature(Base): + """ + The heat present in an object. + """ + + +class TemperatureRegion(Base): + """ + Encodes the temperature of an object. + """ + + +class Tempering(Base): + """ + The disposition of an object (the tool) to change the temperature of others. + """ + + +class ThinkAloud(Base): + """ + A task in which an Agent, while in the course of performing some other task(s), reports on their own decision processes that guide this other task(s) for the benefit of an outside observer. + """ + + +class ThinkAloudActionTopic(Base): + """ + A topic used when an Agent states what they are doing. + """ + + +class ThinkAloudGeneralKnowledgeTopic(Base): + """ + A topic used when an Agent states general knowledge they have. + """ + + +class ThinkAloudKnowledgeTopic(Base): + """ + A topic used when an Agent states some item of knowledge. This knowledge can be general, or specific to the environment and task at hand. + """ + + +class ThinkAloudObstructionTopic(Base): + """ + A topic used when an Agent describes some state of affairs that prevents them from performing an action. + """ + + +class ThinkAloudOpinionTopic(Base): + """ + A topic used when an Agent expresses an opinion about the action they perform or the environment they are in. + """ + + +class ThinkAloudPerceptionTopic(Base): + """ + A topic used when an Agent describes what they currently perceive. + """ + + +class ThinkAloudPlanTopic(Base): + """ + A topic used when an Agent describes what they intend to do. Note, this is not about describing the process through which this plan was constructed; that is covered by the MetaCognitionPlanningTopic. + """ + + +class ThinkAloudSceneKnowledgeTopic(Base): + """ + A topic used when an Agent describes what they know about their environment, including knowledge of world states that they do not currently perceive. + """ + + +class Threshold(Base): + """ + A role played by a parameter which indicates some value that, when crossed, triggers some condition. + """ + + +class Throwing(Base): + """ + A task in which an Agent imparts momentum to an object before releasing it so that it flies for some distance unsupported. + """ + + +class TimeRole(Base): + """ + A role filled by a description of the location in time and/or duration of an event or object. + """ + + +class Transporting(Base): + """ + A task by which an Agent carries an item from a source to a destination location. + """ + + +class Triplestore(Base): + """ + A Triplestore or RDF store is a purpose-built database for the storage and retrieval of triples through semantic queries. + """ + + +class Turning(Base): + """ + A motion by which an agent changes which way their body faces. + """ + + +class UnavailableSoftware(Base): + """ + A description of a situation where some software dependency is not available. + """ + + +class VideoData(Base): + """ + An information object containing data for audio-visual modalities. + """ + + +class ThreeDPosition(Base): + """ + A point in three dimensional space, given as translation. + """ + + diff --git a/src/pycrap/ontologies/soma/data_properties.py b/src/pycrap/ontologies/soma/data_properties.py new file mode 100644 index 000000000..965bfa520 --- /dev/null +++ b/src/pycrap/ontologies/soma/data_properties.py @@ -0,0 +1,210 @@ +from .dependencies import * +from .classes import * + + +class hasColorValue(BaseProperty): + """ + Associates a ColorRegion to numerical data describing the color. + """ + +class hasRegionDataValue(BaseProperty): + """ + A datatype property that encodes values for a Region, e.g. a float for the Region Height. + """ + +class hasDataFormat(BaseProperty): + """ + A property linking an InformationRealization to a string specifying a format name, e.g. URDF or STL. + """ + +class hasDataValue(BaseProperty): + """ + A datatype property that encodes values from a datatype for an Entity. + There are several ways to encode values in DOLCE (Ultralite): + + 1) Directly assert an xsd:_ value to an Entity by using hasDataValue + 2) Assert a Region for an Entity by using hasRegion, and then assert an xsd:_ value to that Region, by using hasRegionDataValue + 3) Assert a Quality for an Entity by using hasQuality, then assert a Region for that Quality, and assert an xsd:_ value to that Region, by using hasRegionDataValue + 4) When the value is required, but not directly observed, assert a Parameter for an xsd:_ value by using hasParameterDataValue, and then associate the Parameter to an Entity by using isConstraintFor + 5) When the value is required, but not directly observed, you can also assert a Parameter for a Region by using parametrizes, and then assert an xsd:_ value to that Region, by using hasRegionDataValue + + The five approaches obey different requirements. + For example, a simple value can be easily asserted by using pattern (1), but if one needs to assert an interval between two values, a Region should be introduced to materialize that interval, as pattern (2) suggests. + Furthermore, if one needs to distinguish the individual Quality of a value, e.g. the particular nature of the density of a substance, pattern (3) can be used. + Patterns (4) and (5) should be used instead when a constraint or a selection is modeled, independently from the actual observation of values in the real world. + """ + +class hasDepth(BaseProperty): + """ + The depth of a shape. + """ + +class hasShapeParameter(BaseProperty): + """ + Associates a SpaceRegion to some parameter value describing its shape. This is a fairly generic property, and to capture the semantics of the information associated to the SpaceRegion, its more specific subproperties should be used. + """ + +class hasEventBegin(BaseProperty): + """ + A relation recording when an Event started. In this case, we think of the Event as something unfolding over some span of time. + """ + +class hasEventTime(BaseProperty): + """ + Superproperty of hasEventBegin and hasEventEnd, records that an Event happened, or was happening, at a particular time. Using the subproperties captures the richer semantics of that time relative to the event. Using only this superproperty may be appropriate when the Event is construed to take place at a single instant of time. + """ + +class hasEventEnd(BaseProperty): + """ + A relation recording when an Event ended. In this case, we think of the Event as something unfolding over some span of time. + """ + +class hasFilePath(BaseProperty): + """ + Associates an entity to some file containing data about it. For example, can be used to describe physical objects via a mesh file. + """ + +class hasForceValue(BaseProperty): + """ + A value that quantifies a force given in Newton. + """ + +class hasFrictionValue(BaseProperty): + """ + The coefficient of friction denotes the ratio of friction force between touching objects. The coefficient is dimensionless. + """ + +class hasHSVValue(BaseProperty): + """ + Associates a ColorRegion to numerical data describing the color. This data uses the Hue-Saturation-Value color space. + """ + +class hasHeight(BaseProperty): + """ + The height of a shape. + """ + +class hasIntervalBegin(BaseProperty): + """ + A relation recording when some TimeInterval started. + """ + +class hasIntervalTime(BaseProperty): + """ + Superproperty of relations used to connect moments in time to a TimeInterval. + """ + +class hasIntervalEnd(BaseProperty): + """ + A relation recording when a TimeInterval ended. + """ + +class hasJointEffort(BaseProperty): + """ + The effort applied in a joint given in N (prismatic joint) or N*m (hinged joints). + """ + +class hasJointParameter(BaseProperty): + """ + Assigns a value for an attribute of a joint. + """ + +class hasJointEffortLimit(BaseProperty): + """ + The maximum effort applied in a joint given in N (prismatic joint) or N*m (hinged joints). + """ + +class hasJointPosition(BaseProperty): + """ + The position of a joint given in m (prismatic joints) or rad (hinged joints). + """ + +class hasJointPositionMax(BaseProperty): + """ + The maximum position of a joint given in m (prismatic joints) or rad (hinged joints). + """ + +class hasJointPositionMin(BaseProperty): + """ + The minimum position of a joint given in m (prismatic joints) or rad (hinged joints). + """ + +class hasJointVelocity(BaseProperty): + """ + The velocity of a joint given in m/s (prismatic joints) or rad/s (hinged joints). + """ + +class hasJointVelocityLimit(BaseProperty): + """ + The maximum velocity of a joint given in m/s (prismatic joints) or rad/s (hinged joints). + """ + +class hasLength(BaseProperty): + """ + The length of a shape. + """ + +class hasMassValue(BaseProperty): + """ + The mass value of a physical object in kilogram. + """ + +class hasNameString(BaseProperty): + """ + A relation recording some identifier associated to an Entity. + """ + +class hasPersistentIdentifier(BaseProperty): + """ + A property linking an InformationRealization to a persistent identifier such as a DOI, which can then be used to obtain an address at which the realization (i.e. digital file) can be retrieved. + """ + +class hasPositionData(BaseProperty): + """ + Associates a spatial region to a position. + """ + +class hasSpaceParameter(BaseProperty): + """ + Associates a SpaceRegion to some parameter value describing it. This is a fairly generic property, and to capture the semantics of the information associated to the SpaceRegion, its more specific subproperties should be used. + """ + +class hasPriority(BaseProperty): + """ + A relation asserting some entity has a particular priority. + """ + +class hasRGBValue(BaseProperty): + """ + Associates a ColorRegion to numerical data describing the color. This data uses the Red-Green-Blue color space. + """ + +class hasRadius(BaseProperty): + """ + The radius of a circular or oval shape. + """ + +class hasReferenceFrame(BaseProperty): + """ + Gives the name associated to the local coordinate frame of a SpaceRegion. + """ + +class hasShapeScale(BaseProperty): + """ + The scale of a shape, given as a vector of three real numbers to adjust x, y, z components of vertex vectors. In cases where a shape needs to be flipped compared to the shape described by a mesh, one of the scale components will be negative. + + It is often the case that shapes need to be altered from their description in a shape file, and a typical example of this is scaling a mesh. + + In robotics, it is not uncommon to encounter shapes that are flipped compared to the shape in a mesh file. This is because robots often have bilateral symmetry, thus it makes sense to reuse the same meshes for corresponding links of the left and right arms. + """ + +class hasWidth(BaseProperty): + """ + The width of a shape. + """ + +class isReificationOf(BaseProperty): + """ + An auxiliary property that is used to generate object individuals, called reifications, from any other Entity, e.g. from relations, classes, data types. These reifications can then be used in DL axioms as any other named individual. + """ + diff --git a/src/pycrap/ontologies/soma/dependencies.py b/src/pycrap/ontologies/soma/dependencies.py new file mode 100644 index 000000000..a0b0b0749 --- /dev/null +++ b/src/pycrap/ontologies/soma/dependencies.py @@ -0,0 +1,2 @@ +from ..base import * +from ..dul import * diff --git a/src/pycrap/ontologies/soma/individuals.py b/src/pycrap/ontologies/soma/individuals.py new file mode 100644 index 000000000..396e77bd6 --- /dev/null +++ b/src/pycrap/ontologies/soma/individuals.py @@ -0,0 +1,47 @@ +from .dependencies import * +from .classes import * +from .object_properties import * +from .data_properties import * + + +ExecutionState_Active = ExecutionStateRegion(namespace = ontology) +ExecutionState_Cancelled = ExecutionStateRegion(namespace = ontology) +ExecutionState_Failed = ExecutionStateRegion(namespace = ontology) +ExecutionState_Paused = ExecutionStateRegion(namespace = ontology) +ExecutionState_Pending = ExecutionStateRegion(namespace = ontology) +ExecutionState_Succeeded = ExecutionStateRegion(namespace = ontology) +FailWFNoContinuation = StatusFailure(namespace = ontology) +FailWFNondeterministicContinuation = StatusFailure(namespace = ontology) +FailWFUninterpretableTask = StatusFailure(namespace = ontology) +RDFType = Reification(namespace = ontology) + +ExecutionState_Active.comment = ['The execution state of an ongoing activity.'] +ExecutionState_Active.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-ACT.owl'] + +ExecutionState_Cancelled.comment = ['The execution state of a cancelled activity.'] +ExecutionState_Cancelled.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-ACT.owl'] + +ExecutionState_Failed.comment = ['The execution state of a failed activity.'] +ExecutionState_Failed.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-ACT.owl'] + +ExecutionState_Paused.comment = ['The execution state of a paused activity.'] +ExecutionState_Paused.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-ACT.owl'] + +ExecutionState_Pending.comment = ['The execution state of a pending activity.'] +ExecutionState_Pending.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-ACT.owl'] + +ExecutionState_Succeeded.comment = ['The execution state of a succeeded activity.'] +ExecutionState_Succeeded.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-ACT.owl'] + +FailWFNoContinuation.comment = ['A particular kind of failure: the workflow fails because there is no way to continue it, and the normal exit has not been reached.'] +FailWFNoContinuation.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-WF.owl'] + +FailWFNondeterministicContinuation.comment = ['A particular kind of failure: it is not clear how to continue a workflow because several possibilities exist.'] +FailWFNondeterministicContinuation.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-WF.owl'] + +FailWFUninterpretableTask.comment = ['A particular kind of failure: a task is not recognized and not associated to anything that could execute it, nor to a workflow that could detail its structure into simpler structure.'] +FailWFUninterpretableTask.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-WF.owl'] + +RDFType.isReificationOf = ['http://www.w3.org/2001/XMLSchema#type'] +RDFType.isDefinedBy = [SOMA.owl] + diff --git a/src/pycrap/ontologies/soma/object_properties.py b/src/pycrap/ontologies/soma/object_properties.py new file mode 100644 index 000000000..735e8ad38 --- /dev/null +++ b/src/pycrap/ontologies/soma/object_properties.py @@ -0,0 +1,1418 @@ +from .dependencies import * + + +class affects(BaseProperty): + """ + Simple relationship between two actions to express that a variation in the course or outcome of the subject (the affector) would have resulted in a variation in the object (the affectee), e.g., a planning task that sets parameters such as goal position affects the subsequently executed pick-and-place task that uses that parameter. + """ + +class precedes(BaseProperty): + """ + A relation between entities, expressing a 'sequence' schema. + E.g. 'year 1999 precedes 2000', 'deciding what coffee to use' precedes 'preparing coffee', 'World War II follows World War I', 'in the Milan to Rome autoroute, Bologna precedes Florence', etc. + It can then be used between tasks, processes, time intervals, spatially locate objects, situations, etc. + Subproperties can be defined in order to distinguish the different uses. + """ + +class isAffectedBy(BaseProperty): + """ + Simple relationship between two actions to express that a variation in the course or outcome of the object (the affector) would have resulted in a variation in the subject (the affectee), e.g., a planning task that sets parameters such as goal position affects the subsequently executed pick-and-place task that uses that parameter. + """ + +class affordanceDefines(BaseProperty): + """ + A relation between an Affordance and a Concept (often an EventType). + """ + +class defines(BaseProperty): + """ + A relation between a Description and a Concept, e.g. a Workflow for a governmental Organization defines the Role 'officer', or 'the Italian Traffic Law defines the role Vehicle'. + """ + +class isDefinedInAffordance(BaseProperty): + """ + A relation between a Concept and an Affordance. + """ + +class affordanceDefinesTask(BaseProperty): + """ + A relation between an Affordance and a Task + """ + +class definesTask(BaseProperty): + """ + A relation between a description and a task, e.g. the recipe for a cake defines the task 'boil'. + """ + +class isTaskDefinedInAffordance(BaseProperty): + """ + A relation between a Task and an Affordance, such that the task is defined in terms of using the affordance. + """ + +class affordsBearer(BaseProperty): + """ + Relates a disposition to the bearer role defined by the affordance describing the disposition. + """ + +class affordsConcept(BaseProperty): + """ + A relation between a disposition and a concept defined in the affordance that describes the disposition. + """ + +class isBearerAffordedBy(BaseProperty): + """ + Relates a disposition to the bearer role defined by the affordance describing the disposition. + """ + +class isDescribedBy(BaseProperty): + """ + The relation between an Entity and a Description: a Description gives a unity to a Collection of parts (the components), or constituents, by assigning a Role to each of them in the context of a whole Object (the system). + A same Entity can be given different descriptions, for example, an old cradle can be given a unifying Description based on the original aesthetic design, the functionality it was built for, or a new aesthetic functionality in which it can be used as a flower pot. + """ + +class definesBearer(BaseProperty): + """ + Relates an affordance which is a relation between a bearer and a trigger, to the role of the bearer when the affordance is manifested. + """ + +class associatedWith(BaseProperty): + """ + A catch-all object property, useful for alignment and querying purposes. + It is declared as both transitive and symmetric, in order to reason an a maximal closure of associations between individuals. + """ + +class isConceptAffordedBy(BaseProperty): + """ + A relation between a disposition and a concept defined in the affordance that describes the disposition. + """ + +class affordsPerformer(BaseProperty): + """ + Relates a disposition to the performer role defined by the affordance describing the disposition. + """ + +class isPerformerAffordedBy(BaseProperty): + ... + +class definesPerformer(BaseProperty): + """ + Relates an affordance which is a relation between a bearer and a trigger, to the role of the performer when the affordance is manifested. + """ + +class affordsSetpoint(BaseProperty): + """ + Relates a disposition to the setpoint parameter defined by the affordance describing the disposition. + """ + +class isSetpointAffordedBy(BaseProperty): + """ + Relates a disposition to the setpoint parameter defined by the affordance describing the disposition. + """ + +class definesSetpoint(BaseProperty): + """ + Defines the dedicated goal region of a description. + """ + +class affordsTask(BaseProperty): + """ + Relates a disposition to the task defined by the affordance describing the disposition. + """ + +class isTaskAffordedBy(BaseProperty): + """ + Relates a disposition to the task defined by the affordance describing the disposition. + """ + +class affordsTrigger(BaseProperty): + """ + Relates a disposition to the trigger role defined by the affordance describing the disposition. + """ + +class isTriggerAffordedBy(BaseProperty): + """ + Relates a disposition to the trigger role defined by the affordance describing the disposition. + """ + +class definesTrigger(BaseProperty): + """ + Relates an affordance which is a relation between a bearer and a trigger, to the role of the trigger when the affordance is manifested. + """ + +class after(BaseProperty): + """ + A relation between entities, expressing a 'sequence' schema where one of the entities strictly ends before the other one. + """ + +class follows(BaseProperty): + """ + A relation between entities, expressing a 'sequence' schema. + E.g. 'year 2000 follows 1999', 'preparing coffee' follows 'deciding what coffee to use', 'II World War follows I World War', etc. + It can be used between tasks, processes or time intervals, and subproperties would fit best in order to distinguish the different uses. + """ + +class before(BaseProperty): + """ + A relation between entities, expressing a 'sequence' schema where one of the entities strictly ends before the other one. + """ + +class answers(BaseProperty): + ... + +class relatesToAnotherRole(BaseProperty): + """ + Simple top-level property for relations between two roles. + """ + +class hasAnswer(BaseProperty): + """ + The relation between a message and its answer. + """ + +class causes(BaseProperty): + ... + +class isReactionTo(BaseProperty): + """ + Simple relationship between two actions to express that the subject (the reaction) would not have occured if it were not for the object (the cause), e.g., a Communication Action classified as an Answering Task is a reaction to another Communication Task classified as a Query Task and would not have occured without the other. An example without Agents involved would be some domino stone would not have toppled without the first one toppling. + + When Agents are involved, the relation might be seen as an abstraction of the execution of some plan that arises from changing the agents goal that is due to perceiving the cause. However, currently it is unclear how to model such a pattern and therefore not included in SOMA. + + This relation is seen as transitive. + """ + +class causesTransition(BaseProperty): + """ + A Transition between two Situations is always the result of some Event, and the causesTransition relation should be used to record the causal relation from the Event to the Transition. + """ + +class isEventIncludedIn(BaseProperty): + ... + +class isCausedByEvent(BaseProperty): + """ + A relation recording that a Transition is the result of some Event. + """ + +class coOccurs(BaseProperty): + """ + A schematic relation between any events that also implies that one event is temporally contained in the other. + + Sub-properties are used to distinct between different cases of event endpoint relations that hold for different types of co-occurance. + """ + +class overlaps(BaseProperty): + """ + A schematic relation between any entities, e.g. 'the chest region overlaps with the abdomen region', 'my spoken words overlap with hers', 'the time of my leave overlaps with the time of your arrival', 'fibromyalgia overlaps with other conditions'. + Subproperties and restrictions can be used to specialize overlaps for objects, events, time intervals, etc. + """ + +class contains(BaseProperty): + """ + A schematic relation asserting containment, understood in a very broad sense, by one Entity of another. The relation is defined with domain and range of maximum generality, as it is possible to construe containment to apply between Events, between Objects, between Qualities and so on. Care should be taken when using it that the construal of containment makes sense and is useful. If a clearer relation expresses the connection between two Entities, use that relation instead. For example, rather than saying an Event contains an Object, it is probably better to say the Event has that Object as a participant. More specific versions of this relation exist, e.g. containsEvent, so it is likely that there will be few situations where it should be used itself. However, by acting as a superproperty to several relations, it captures a core similarity between these and enables taxonomy-based similarity metrics. + """ + +class isContainedIn(BaseProperty): + """ + The inverse of the contains relation. See the contains relation for details. + """ + +class containsEvent(BaseProperty): + """ + `A contains event B` means that A strictly starts before, and ends after B, i.e. B is wholly contained in A. + """ + +class during(BaseProperty): + """ + `A during B` means that B strictly starts before, and ends after A, i.e. A is wholly contained in B. + """ + +class containsObject(BaseProperty): + """ + A spatial relation holding between a container, and objects it contains. + """ + +class isLocationOf(BaseProperty): + """ + A generic, relative localization, holding between any entities. E.g. 'Rome is the seat of the Pope', 'the liver is the location of the tumor'. + For 'absolute' locations, see SpaceRegion + """ + +class isInsideOf(BaseProperty): + """ + A spatial relation holding between an object (the container), and objects it contains. + """ + +class coversObject(BaseProperty): + """ + A relationship from an object (the coverer) that blocks access to another or its interior (the coveree). + """ + +class interactsWith(BaseProperty): + """ + A relation between objects that interact with each other. + """ + +class isCoveredByObject(BaseProperty): + """ + A relation from an object (the coveree) which is itself, or has its interior, prevented from being accessed from outside by a coverer. + """ + +class definesRole(BaseProperty): + """ + A relation between a description and a role, e.g. the recipe for a cake defines the role 'ingredient'. + """ + +class isBearerDefinedIn(BaseProperty): + """ + Relates an affordance which is a relation between a bearer and a trigger, to the role of the bearer when the affordance is manifested. + """ + +class definesEventType(BaseProperty): + ... + +class isEventTypeDefinedIn(BaseProperty): + """ + A relation between an event type and a description, e.g. an event that is described by the Affordance of an object to be cut with a knife. + + The distinction to 'is task defined in' is necessary to let Dispositions and Affordances not only describe which tasks might be afforded by objects, but also whihc processes (where there is no agent). For example, the fall of a knife from a shelf slicing a loaf of bread on impact is , in the absence of an executing agent, not a task but merely a process, the possibility of which is nevertheless described by the dispositions of the knife and the loaf. + """ + +class definesInput(BaseProperty): + """ + The defined participant is an "input": + + - some object existing at the beginning of a Task's execution, and that will be acted on during the execution of the task; + - some region/value which informs the way in which the Task will be executed. + """ + +class definesParticipant(BaseProperty): + """ + A Description definesParticipant a Concept to classify participants in Events associated to that Description. + + The prototypical example is a Task, which is a concept to classify Actions (a form of Event). A Task may define several Roles, with which to classify participants in the event of that Task's execution. + """ + +class definesOutput(BaseProperty): + """ + Defines an "output" participant: + + - an Entity (Object or state of affairs) that exists as a result of the execution of a Task; + - a Region/value that has been demarcated/computed as a result of the execution of a Task. + """ + +class definesParameter(BaseProperty): + """ + A relation between a description and a parameter. + """ + +class isParameterDefinedIn(BaseProperty): + """ + A relation between a description and a parameter. + """ + +class isPerformerDefinedIn(BaseProperty): + """ + Relates an affordance which is a relation between a bearer and a trigger, to the role of the performer when the affordance is manifested. + """ + +class definesProcess(BaseProperty): + """ + A relation between a description and a process type. + """ + +class isProcessDefinedIn(BaseProperty): + """ + A relation between a process type and a description that defines it. + """ + +class isSetpointDefinedIn(BaseProperty): + """ + Defines the dedicated goal region of a description. + """ + +class isTriggerDefinedIn(BaseProperty): + """ + Relates an affordance which is a relation between a bearer and a trigger, to the role of the trigger when the affordance is manifested. + """ + +class derivedFrom(BaseProperty): + """ + The (transitive) relation between an information object and another which it has been derived from. + """ + +class isSourceFor(BaseProperty): + """ + The (transitive) relation between an information object and another which was derived from the former. + """ + +class describesQuality(BaseProperty): + """ + Relates a description to a quality that it describes. + """ + +class describes(BaseProperty): + """ + The relation between a Description and an Entity : a Description gives a unity to a Collection of parts (the components), or constituents, by assigning a Role to each of them in the context of a whole Object (the system). + A same Entity can be given different descriptions, for example, an old cradle can be given a unifying Description based on the original aesthetic design, the functionality it was built for, or a new aesthetic functionality in which it can be used as a flower pot. + """ + +class isQualityDescribedBy(BaseProperty): + """ + Relates a description to a quality it describes. + """ + +class directlyCauses(BaseProperty): + """ + Non-transitive version of "causes". + """ + +class isDirectReactionTo(BaseProperty): + """ + Non-transitive version of "is reaction to". + """ + +class hasTerminalScene(BaseProperty): + """ + A relation between StateTransitions and Scenes, which identifies the scene the transition is expected to end at. + """ + +class includesEvent(BaseProperty): + """ + A relation between situations and events, e.g. 'this morning I've prepared my coffee and had my fingers burnt' (i.e.: the preparation of my coffee this morning included a burning of my fingers). + """ + +class directlyDerivedFrom(BaseProperty): + """ + The relation between an information object and another which it has been derived from. + """ + +class isDirectSourceFor(BaseProperty): + """ + The (transitive) relation between an information object and another which was derived from the former. + """ + +class encapsulates(BaseProperty): + """ + The relation between an Ordered element' and an 'Entity' it contains. + """ + +class encodes(BaseProperty): + """ + The relation between two Information Objects that have the same meaning, but are formatted differently. E.g., a text written in UTF-8 encodes a text in a natural writing system (letters) and vice versa. + """ + +class executesMotion(BaseProperty): + """ + A relation between an motion process and a motion event type, e.g. 'lifting an object' executes the motion process 'lifting'. + """ + +class isOccurrenceOf(BaseProperty): + """ + A relation between an event and an event type, e.g. 'taking the cup from the table' is an occurence of the motion 'approaching'. + """ + +class isExecutedMotionIn(BaseProperty): + """ + A relation between an motion process and a motion event type, e.g. 'lifting an object' executes the motion process 'lifting'. + """ + +class finishedBy(BaseProperty): + """ + `A finishes B` means that A ends exactly where B ends, and that B strictly starts before A. As in "I finish my day by taking a shower". + """ + +class finishes(BaseProperty): + """ + `A finishes B` means that A ends exactly where B ends, and that B strictly starts before A. As in "I finish my day by taking a shower". + """ + +class firstMember(BaseProperty): + """ + A relation between a collection and a member of it that is least according to some ordering. This ordering can be arbitrary, i.e. the order in which Entities are recorded in the Collection. + """ + +class hasMember(BaseProperty): + """ + A relation between collections and entities, e.g. 'my collection of saxophones includes an old Adolphe Sax original alto' (i.e. my collection has member an Adolphe Sax alto). + """ + +class givesMeaningTo(BaseProperty): + """ + The relation between a System and Information Object that is given meaning to by said system, e.g., a Language might give meaning to some word, sentence, text, etc., but without the knowledge of said System (Language), the text will not make sense to a reader. + """ + +class isGivenMeaningBy(BaseProperty): + """ + The relation between an Information Object and a System that gives meaning to said object, e.g., a word, sentence, text, etc. might be given meaning by a Language and without the knowledge of said System (Language), the text will not make sense to a reader. + """ + +class hasAction(BaseProperty): + """ + A relation from an Action to a component Action. + """ + +class hasConstituent(BaseProperty): + """ + 'Constituency' depends on some layering of the world described by the ontology. For example, scientific granularities (e.g. body-organ-tissue-cell) or ontological 'strata' (e.g. social-mental-biological-physical) are typical layerings. + Intuitively, a constituent is a part belonging to a lower layer. Since layering is actually a partition of the world described by the ontology, constituents are not properly classified as parts, although this kinship can be intuitive for common sense. + A desirable advantage of this distinction is that we are able to talk e.g. of physical constituents of non-physical objects (e.g. systems), while this is not possible in terms of parts. + Example of are the persons constituting a social system, the molecules constituting a person, the atoms constituting a river, etc. + In all these examples, we notice a typical discontinuity between the constituted and the constituent object: e.g. a social system is conceptualized at a different layer from the persons that constitute it, a person is conceptualized at a different layer from the molecules that constitute them, and a river is conceptualized at a different layer from the atoms that constitute it. + """ + +class hasAlterationResult(BaseProperty): + """ + Relates an action that alters an object to the region that the alteration reached during the action. + """ + +class hasRegion(BaseProperty): + """ + A relation between entities and regions, e.g. 'the number of wheels of that truck is 12', 'the time of the experiment is August 9th, 2004', 'the whale has been localized at 34 degrees E, 20 degrees S'. + """ + +class isAlterationResultOf(BaseProperty): + """ + Relates an action that alters an object to the region that the alteration reached during the action. + """ + +class hasBinding(BaseProperty): + """ + Asserts that in a context described by Description, a Binding relation holds. + """ + +class hasPart(BaseProperty): + """ + A schematic relation between any entities, e.g. 'the human body has a brain as part', '20th century contains year 1923', 'World War II includes the Pearl Harbour event'. + + Parthood should assume the basic properties of mereology: transitivity, antisymmetry, and reflexivity (propert Parthood of course misses reflexivity). + However, antisymmetry is not supported in OWL2 explicitly, therefore DUL has to adopt one of two patterns: + 1) dropping asymmetry axioms, while granting reflexivity: this means that symmetry is not enforced, but permitted for the case of reflexivity. Of course, in this way we cannot prevent symmetric usages of hasPart; + 2) dropping the reflexivity axiom, and enforce asymmetry: in this case, we would prevent all symmetric usages, but we loose the possibility of enforcing reflexivity, which is commonsensical in parthood. + In DUL, we adopt pattern #1 for partOf, and pattern #2 for properPartOf, which seems a good approximation: due to the lack of inheritance of property characteristics, each asymmetric hasPropertPart assertion would also be a reflexive hasPart assertion (reflexive reduction design pattern). + + Subproperties and restrictions can be used to specialize hasPart for objects, events, etc. + """ + +class hasBindingFiller(BaseProperty): + """ + Indicates that an Entity is described by a Binding, in that it is associated with the Role/Parameter that the Binding binds it to. The Binding is only valid in some descriptive context such as a Workflow or Narrative. + + Note, the filler can be a Role/Parameter as well, and there are two distinct interpretations, depending on whether the Binding is a RoleRoleBinding or a RoleFillerBinding. See the comments on Binding for more details. + + Only RoleFillerBindings can have general Entities as fillers. RoleRoleBindings can only connect to Roles or Parameters via this property. + """ + +class hasBindingRole(BaseProperty): + """ + Indicates that a Role/Parameter is going to be associated to some filler, or other Role/Parameter, by a Binding. The Binding is only valid in some descriptive context such as a Narrative or Workflow. + """ + +class hasChildLink(BaseProperty): + """ + Relates a joint to the link it connects which is closer to the end of the kinematic chain. + """ + +class isChildLinkOf(BaseProperty): + """ + Relates a joint to the link it connects which is closer to the end of the kinematic chain. + """ + +class hasColor(BaseProperty): + """ + Relates an object to its color quality. + """ + +class hasQuality(BaseProperty): + """ + A relation between entities and qualities, e.g. 'Dmitri's skin is yellowish'. + """ + +class isColorOf(BaseProperty): + """ + Relates a color quality to the object the color belongs to. + """ + +class hasDisposition(BaseProperty): + """ + Associates an object to one of its dispositions. + """ + +class isDispositionOf(BaseProperty): + """ + Associates a disposition quality to the object holding it. + """ + +class hasEndLink(BaseProperty): + """ + Relates an object to kinematic components at the end of the kinematic chain. + """ + +class hasLink(BaseProperty): + """ + Relates an object to its kinematic components. + """ + +class isEndLinkOf(BaseProperty): + """ + Relates an object to kinematic components at the end of the kinematic chain. + """ + +class hasExecutionState(BaseProperty): + """ + A relation from an Action to its execution state. + """ + +class hasFeature(BaseProperty): + """ + Associates a physical object to one of its features. + """ + +class isFeatureOf(BaseProperty): + """ + Associates a feature to the physical object it belongs to. + """ + +class hasFirstStep(BaseProperty): + """ + A relation from a Workflow to its first Task. + """ + +class hasStep(BaseProperty): + """ + A relation between a Workflow and a Task it contains. + """ + +class isFirstStepOf(BaseProperty): + """ + A relation stating that some task is the first one in a workflow. + """ + +class hasFrictionAttribute(BaseProperty): + """ + A relation between physical objects and their friction attribute. + """ + +class hasGoal(BaseProperty): + """ + A relation from an Entity to a Goal it pursues. Agents can pursue Goals, and Tasks are also construed as pursuing Goals. + """ + +class hasInitialScene(BaseProperty): + """ + A relation between StateTransitions and Scenes, which identifies the scene the transition starts from. + """ + +class hasInitialState(BaseProperty): + """ + A relation which connects a Transition to the Situation it starts from. + """ + +class isInitialSceneOf(BaseProperty): + """ + A relation between StateTransitions and Scenes, which identifies the scene the transition starts from. + """ + +class hasInitialSituation(BaseProperty): + """ + A relation between SituationTransitions and Situations, which identifies the Situation the transition starts from. + """ + +class isInitialSituationOf(BaseProperty): + """ + A relation between SituationTransitions and Situations, which identifies the Situation the transition starts from. + """ + +class includesSituation(BaseProperty): + """ + A relation recording that a Situation has a (sub) Situation as participant in some role. + """ + +class isInitialStateOf(BaseProperty): + """ + A relation recording that a Situation was where a Transition began. + """ + +class hasInputParameter(BaseProperty): + """ + A relation between a Task and one of its input parameters. + A relation from an EventType (typically, a Task) and a parameter describing some state of affairs before the event classified by the EventType takes place, and which contributes towards that event happening. + """ + +class hasParameter(BaseProperty): + """ + A Concept can have a Parameter that constrains the attributes that a classified Entity can have in a certain Situation, e.g. a 4WheelDriver Role definedIn the ItalianTrafficLaw has a MinimumAge parameter on the Amount 16. + """ + +class isInputParameterFor(BaseProperty): + """ + A relation between a Task and one of its input parameters. + A relation from a Parameter to an EventType (typically, a Task). The parameter describes some state of affairs that precedes and will contribute to the event classified by the EventType. + """ + +class hasJointLimit(BaseProperty): + """ + Relates a joint to its physical limits. + """ + +class isJointLimitOf(BaseProperty): + """ + Relates a joint to its physical limits. + """ + +class hasJointState(BaseProperty): + """ + Relates a joint to its state. + """ + +class isJointStateOf(BaseProperty): + """ + Relates a joint to its state. + """ + +class hasComponent(BaseProperty): + """ + The hasProperPart relation without transitivity, holding between an Object (the system) and another (the component), and assuming a Design that structures the Object. + """ + +class isLinkOf(BaseProperty): + """ + Relates an object to its kinematic components. + """ + +class hasLocalization(BaseProperty): + """ + Relates an object to its localization quality. + """ + +class isLocalizationOf(BaseProperty): + """ + Relates a localization quality to the object the localization belongs to. + """ + +class hasMassAttribute(BaseProperty): + """ + A relation between physical objects and their mass. + """ + +class isMassAttributeOf(BaseProperty): + """ + A relation between physical objects and their mass. + """ + +class hasNetForce(BaseProperty): + """ + A relation between a physical object and the total force acting on it. + """ + +class isNetForceOf(BaseProperty): + """ + A relation between a physical object and the total force acting on it. + """ + +class hasNextStep(BaseProperty): + """ + An ordering relation between tasks in a workflow, saying that a task is followed by another. + """ + +class directlyPrecedes(BaseProperty): + """ + The intransitive precedes relation. For example, Monday directly precedes Tuesday. Directness of precedence depends on the designer conceptualization. + """ + +class hasPreviousStep(BaseProperty): + """ + An ordering relation between tasks in some workflow, stating that a task is preceded by another. + """ + +class hasOutputParameter(BaseProperty): + """ + A relation between a Task and one of its output parameters. + A relation from an EventType (typically a Task) to a Parameter describing an outcome of the event classified by the EventType. + """ + +class isOutputParameterFor(BaseProperty): + """ + A relation between a Task and one of its output parameters. + A relation from a Parameter to an EventType (typically, a Task). The parameter describes an outcome of the event classified by the EventType. + """ + +class hasParentLink(BaseProperty): + """ + Relates a joint to the link it connects which is closer to the root of the kinematic chain. + """ + +class isParentLinkOf(BaseProperty): + """ + Relates a joint to the link it connects which is closer to the root of the kinematic chain. + """ + +class hasPhase(BaseProperty): + """ + A relation used to describe the structure of an Action or Process in terms of phases, i.e. subprocesses and states that occur during its unfolding. + """ + +class hasPhysicalComponent(BaseProperty): + """ + A relation used to describe the structure of a PhysicalObject in terms of physical components, i.e. what other PhysicalObjects are components of it. + """ + +class hasPredecessor(BaseProperty): + """ + Indicates that a Task is the predecessor in a Succedence Relation; that is, this is the task to execute first. + """ + +class hasPreference(BaseProperty): + ... + +class isPreferenceOf(BaseProperty): + """ + Relates a preference quality to the agent the preference belongs to. + """ + +class directlyFollows(BaseProperty): + """ + The intransitive follows relation. For example, Wednesday directly precedes Thursday. Directness of precedence depends on the designer conceptualization. + """ + +class hasProcessType(BaseProperty): + """ + A relation between roles and process types, e.g. a catalysator is needed to trigger some chemical reaction. + """ + +class isRelatedToConcept(BaseProperty): + """ + Any relation between concepts, e.g. superordinated, conceptual parthood, having a parameter, having a task, superordination, etc. + """ + +class isProcessTypeOf(BaseProperty): + """ + A relation between roles and process types, e.g. a catalysator is needed to trigger some chemical reaction. + """ + +class hasQuale(BaseProperty): + """ + Relates a quality to its "value", called quale, which is an atomic quality region. + """ + +class isQualeOf(BaseProperty): + """ + Relates a quality to its "value", called quale, which is an atomic quality region. + """ + +class hasRootLink(BaseProperty): + """ + Relates an object to kinematic components at the root of the kinematic chain. + """ + +class isRootLinkOf(BaseProperty): + """ + Relates an object to kinematic components at the root of the kinematic chain. + """ + +class hasShape(BaseProperty): + """ + Relates an object to its shape quality. + """ + +class isShapeOf(BaseProperty): + """ + Relates a shape quality to the object the shape belongs to. + """ + +class hasShapeRegion(BaseProperty): + """ + A relation between physical objects and their shape attribute. + """ + +class isShapeRegionOf(BaseProperty): + """ + Relates a shape to a physical object that has it. + """ + +class hasSoftwareAgent(BaseProperty): + """ + A relation from an Event and the SoftwareAgent responsible for making that Event happen. + """ + +class involvesAgent(BaseProperty): + """ + Agent participation. + """ + +class hasSpaceRegion(BaseProperty): + """ + Relates an entity to a space region. + """ + +class isSpaceRegionFor(BaseProperty): + """ + Relates a space region to an entity. + """ + +class hasStateType(BaseProperty): + """ + A relation between roles and state types, e.g. 'the chair is the supporter of the person sitting on it'. + """ + +class isStateTypeOf(BaseProperty): + """ + A relation between roles and state types, e.g. 'the chair is the supporter of the person sitting on it'. + """ + +class hasStatus(BaseProperty): + """ + A relation from an Entity to a Quality that is indicative of the Entity's state, e.g. if it is a device, its state of operation. + """ + +class isStepOf(BaseProperty): + """ + A relation stating that a task is a step in a workflow. + """ + +class hasSuccedence(BaseProperty): + """ + A relation between a Workflow and a Succedence that appears in it. + """ + +class hasSuccessor(BaseProperty): + """ + Indicates that a Task is the successor in a Succedence Relation: that is, it is the Task to execute last. + """ + +class hasTask(BaseProperty): + """ + A relation to indicate that a Task is part of a Workflow or ordering Relation: that is, the task may be executed during the execution of the Workflow, or there exists some Relation between the Tasks that informs how their executions are to be located in time. + """ + +class hasTerminalState(BaseProperty): + """ + A relation from a Transition to the Situation it ends in. + """ + +class isTerminalSceneOf(BaseProperty): + """ + A relation between StateTransitions and Scenes, which identifies the scene the transition is expected to end at. + """ + +class hasTerminalSituation(BaseProperty): + """ + A relation between SituationTransitions and Situations, which identifies the Situation the transition ends at. + """ + +class isTerminalSituationOf(BaseProperty): + """ + A relation between SituationTransitions and Situations, which identifies the Situation the transition ends at. + """ + +class isTerminalStateOf(BaseProperty): + """ + A relation recording that a Situation was where a Transition ended. + """ + +class includesConcept(BaseProperty): + """ + A relation recording that a Situation has a Concept as participant in some sort of role. + """ + +class includesObject(BaseProperty): + """ + A relation between situations and objects, e.g. 'this morning I've prepared my coffee and had my fingers burnt' (i.e.: the preparation of my coffee this morning included me). + """ + +class isConceptIncludedIn(BaseProperty): + """ + A relation recording that a Concept participates in a Situation in some way. + """ + +class includesRecord(BaseProperty): + """ + A relationship indicating that an Event has been recorded by an InformationObject + """ + +class isReferenceOf(BaseProperty): + """ + A relation between information objects and any Entity (including information objects). It can be used to talk about e.g. entities are references of proper nouns: the proper noun 'Leonardo da Vinci' isAbout the Person Leonardo da Vinci; as well as to talk about sets of entities that can be described by a common noun: the common noun 'person' isAbout the set of all persons in a domain of discourse, which can be represented in DOLCE-Ultralite as an individual of the class: Collection . + The isReferenceOf relation is irreflexive, differently from its inverse isAbout. + """ + +class isRecordIncludedBy(BaseProperty): + """ + A relationship indicating that an InformationObject is a recording of an Event. + """ + +class isSettingFor(BaseProperty): + """ + A relation between situations and entities, e.g. 'this morning I've prepared my coffee with a new fantastic Arabica', i.e.: the preparation of my coffee this morning is the setting for (an amount of) a new fantastic Arabica. + """ + +class isSituationIncludedIn(BaseProperty): + """ + A relation recording that a Situation participates in another in some role, or can be considered as a subsituation of the other. + """ + +class involvesArtifact(BaseProperty): + """ + Artifact participation. + """ + +class hasParticipant(BaseProperty): + """ + A relation between an object and a process, e.g. 'John took part in the discussion', 'a large mass of snow fell during the avalanche', or 'a cook, some sugar, flour, etc. are all present in the cooking of a cake'. + """ + +class isArtifactInvolvedIn(BaseProperty): + """ + Artifact participation. + """ + +class involvesEffector(BaseProperty): + """ + Effector participation. + """ + +class isEffectorInvolvedIn(BaseProperty): + """ + Effector participation. + """ + +class involvesPlace(BaseProperty): + """ + A relation recording that an Event makes some use of a PhysicalPlace. Typically this place is where the Event is located. + """ + +class isPlaceInvolvedIn(BaseProperty): + """ + A relation recording that a PhysicalPlace is involved in some Event; typically, this is where the Event is located. + """ + +class isRegionFor(BaseProperty): + """ + A relation between entities and regions, e.g. 'the color of my car is red'. + """ + +class isAnsweredBy(BaseProperty): + """ + A relation from a Query to an Agent who answers it. + """ + +class isParticipantIn(BaseProperty): + """ + A relation between an object and a process, e.g. 'John took part in the discussion', 'a large mass of snow fell during the avalanche', or 'a cook, some sugar, flour, etc. are all present in the cooking of a cake'. + """ + +class isAskedBy(BaseProperty): + """ + A relation from a Query to the Agent who asks it. + """ + +class isRoleDefinedIn(BaseProperty): + """ + A relation between a description and a role, e.g. the role 'Ingredient' is defined in the recipe for a cake. + """ + +class isConstituentOf(BaseProperty): + """ + 'Constituency' depends on some layering of the world described by the ontology. For example, scientific granularities (e.g. body-organ-tissue-cell) or ontological 'strata' (e.g. social-mental-biological-physical) are typical layerings. + Intuitively, a constituent is a part belonging to a lower layer. Since layering is actually a partition of the world described by the ontology, constituents are not properly classified as parts, although this kinship can be intuitive for common sense. + A desirable advantage of this distinction is that we are able to talk e.g. of physical constituents of non-physical objects (e.g. systems), while this is not possible in terms of parts. + Example of are the persons constituting a social system, the molecules constituting a person, the atoms constituting a river, etc. + In all these examples, we notice a typical discontinuity between the constituted and the constituent object: e.g. a social system is conceptualized at a different layer from the persons that constitute it, a person is conceptualized at a different layer from the molecules that constitute them, and a river is conceptualized at a different layer from the atoms that constitute it. + """ + +class isQualityOf(BaseProperty): + """ + A relation between entities and qualities, e.g. 'Dmitri's skin is yellowish'. + """ + +class isObjectIncludedIn(BaseProperty): + ... + +class isCreatedOutputOf(BaseProperty): + """ + A relation between a created output role and its Task. The difference to isOutputRoleOf is that the latter is also applicable, e.g., for Deciding between objects, where the selected object is not created, but still an outcome of that task. + """ + +class isOutputRoleOf(BaseProperty): + """ + A relation between an output roles and its Task. + """ + +class isTaskOfCreatedRole(BaseProperty): + """ + A relation between a Task and one of its output roles. The difference to IsTaskOfOutputRole is that the latter is also applicable, e.g., for Deciding between objects, where the selected object is not created, but still an outcome of that task. + """ + +class isDefinedIn(BaseProperty): + """ + A relation between a Description and a Concept, e.g. a Workflow for a governmental Organization defines the Role 'officer', or 'the Italian Traffic Law defines the role Vehicle'. + """ + +class isDepositOf(BaseProperty): + """ + A spatial relation holding between an object (the deposit), and objects that are located ontop of it. + """ + +class isOntopOf(BaseProperty): + """ + A spatial relation holding between an object (the deposit), and objects that are located ontop of it. + """ + +class isDesignFor(BaseProperty): + """ + A special relation between a Design and an Object, to indicate that the Design describes a way to construct the Object. + """ + +class isDesignedBy(BaseProperty): + """ + A special relation between a Design and an Object, to indicate that the Object is described by the Design. + """ + +class isRealizedBy(BaseProperty): + """ + A relation between an information realization and an information object, e.g. the paper copy of the Italian Constitution realizes the text of the Constitution. + """ + +class hasRole(BaseProperty): + """ + A relation between an object and a role, e.g. the person 'John' has role 'student'. + """ + +class isInputRoleOf(BaseProperty): + """ + A relation between an input roles and its Task. + """ + +class isRoleOf(BaseProperty): + """ + A relation between an object and a role, e.g. 'student' is the role of 'John'. + """ + +class realizes(BaseProperty): + """ + A relation between an information realization and an information object, e.g. the paper copy of the Italian Constitution realizes the text of the Constitution. + """ + +class isOccurringIn(BaseProperty): + """ + A relation between an event and an event type, e.g. 'taking the cup from the table' is an occurence of the motion 'approaching'. + """ + +class isExecutorDefinedIn(BaseProperty): + ... + +class isParameterFor(BaseProperty): + """ + A Concept can have a Parameter that constrains the attributes that a classified Entity can have in a certain Situation, e.g. a 4WheelDriver Role definedIn the ItalianTrafficLaw has a MinimumAge parameter on the Amount 16. + """ + +class hasTask(BaseProperty): + """ + A relation between roles and tasks, e.g. 'students have the duty of giving exams' (i.e. the Role 'student' hasTask the Task 'giving exams'). + """ + +class isTaskOfInputRole(BaseProperty): + """ + A relation between a Task and one of its input roles. + """ + +class hasLocation(BaseProperty): + """ + A generic, relative spatial location, holding between any entities. E.g. 'the cat is on the mat', 'Omar is in Samarcanda', 'the wound is close to the femural artery'. + For 'absolute' locations, see SpaceRegion + """ + +class isComponentOf(BaseProperty): + """ + The asymmetric isProperPartOf relation without transitivity, holding between an Object (the system) and another (the component), and assuming a Design that structures the Object. + """ + +class isLinkedTo(BaseProperty): + """ + A spatial relation holding between objects that are linked with each other such that they resist spatial separation. + """ + +class isMotionDescriptionFor(BaseProperty): + """ + A special relation between a Motion Plan and a Motion, to indicate that the Motion Plan describes a way to achieve the Motion. + """ + +class isMovedByAgent(BaseProperty): + """ + A relation from an object to an agent who causes it to move. + """ + +class movesObject(BaseProperty): + """ + A relation from an agent to an object that the agent causes to move. + """ + +class isClassifiedBy(BaseProperty): + """ + A relation between a Concept and an Entity, e.g. 'John is considered a typical rude man'; your last concert constitutes the achievement of a lifetime; '20-year-old means she's mature enough'. + """ + +class classifies(BaseProperty): + """ + A relation between a Concept and an Entity, e.g. the Role 'student' classifies a Person 'John'. + """ + +class isOrderedBy(BaseProperty): + """ + The relation between an 'Order item' and the 'Order' that sorts them (via the relations 'precedes' and 'follows') + """ + +class orders(BaseProperty): + """ + The relation between an 'Order' and the sorted 'Order item' (sorted via the relations 'precedes' and 'follows' between the 'Order item's) + """ + +class isTaskOfOutputRole(BaseProperty): + """ + A relation between a Task and one of its output roles. + """ + +class isPerformedBy(BaseProperty): + """ + A relation from an Action to the Agent who performs it. + """ + +class isPhysicallyContainedIn(BaseProperty): + """ + A spatial relation holding between an object (the container), and objects it contains. + """ + +class isPlanFor(BaseProperty): + """ + A special relation between a Plan and a Task, to indicate that the Plan describes a way to achieve the Task. + """ + +class isAbout(BaseProperty): + """ + A relation between an information object and an Entity (including information objects). It can be used to talk about entities that are references of proper nouns: the proper noun 'Leonardo da Vinci' isAbout the Person Leonardo da Vinci; as well as to talk about sets of entities that can be described by a common noun: the common noun 'person' isAbout the set of all persons in a domain of discourse, which can be represented in DOLCE-Ultralite as an individual of the class: dul:Collection. + A specific sentence may use common nouns with either a singular or plural reference, or it can even refer to all possible references (e.g. in a lexicographic definition): all those uses are kinds of aboutness. + + The isAbout relation is sometimes considered as reflexive, however this is semiotically inaccurate, because information can be about itself ('de dicto' usage, as in 'John is four character long'), but it is typically about something else ('de re' usage, as in 'John loves Mary'). + If a reflexivity exists in general, it rather concerns its realisation, which is always associated with an event, e.g. an utterance, which makes the information denoting itself, besides its aboutness. This is implemented in DUL with the dul:realizesSelfInformation property, which is used with local reflexivity in the dul:InformationRealization class. + """ + +class isReplacedBy(BaseProperty): + """ + The relation between a State that is replaced by another, e.g., the state of a bowl of fruits containing some objects is replaced by a new containment state when one object is taken away (in this example, we simplified the relation between the State and its type). + """ + +class replaces(BaseProperty): + """ + The relation between a State that replaces another, e.g., the state of a bowl of fruits containing some objects is replaced by a new containment state when one object is taken away (in this example, we simplified the relation between the State and its type). + """ + +class hasSetting(BaseProperty): + """ + A relation between entities and situations, e.g. 'this morning I've prepared my coffee with a new fantastic Arabica', i.e.: (an amount of) a new fantastic Arabica hasSetting the preparation of my coffee this morning. + """ + +class isTaskDefinedIn(BaseProperty): + """ + A relation between a description and a task, e.g. the task 'boil' is defined in a recipe for a cake. + """ + +class isSupportedBy(BaseProperty): + """ + A relation between an object (the supporter) and another object (the supportee) where the supporter cancels the effect of gravity on the supportee. + Relates a supportee to one of its supporters. + """ + +class hasCommonBoundary(BaseProperty): + """ + A relation to encode either formal or informal characterizations of 'boundaries' common to two different entities: an Event that ends when another begins, two abstract regions that have a common topological boundary, two objects that are said to be 'in contact' from a commonsense perspective, etc. + """ + +class supports(BaseProperty): + """ + A relation between an object (the supporter) and another object (the supportee) where the supporter cancels the effect of gravity on the supportee. + Relates a supportee to one of its supporters. + """ + +class isTaskOf(BaseProperty): + """ + A relation between roles and tasks, e.g. 'students have the duty of giving exams' (i.e. the Role 'student' hasTask the Task 'giving exams'). + """ + +class isTerminatedBy(BaseProperty): + """ + The association between an Event that is terminated by another Event, e.g., the Action of picking an apple from a bowl of fruits terminates the State of containment between the apple and the bowl. + """ + +class terminates(BaseProperty): + """ + The association between an Event that terminates another Event, e.g., the Action of picking an apple from a bowl of fruits terminates the State of containment between the apple and the bowl. + """ + +class meets(BaseProperty): + """ + A relation between entities, expressing a 'sequence' schema where one of the entities exactly ends where the other entity starts. + """ + +class metBy(BaseProperty): + """ + A relation between entities, expressing a 'sequence' schema where one of the entities exactly ends where the other entity starts. + """ + +class overlappedBy(BaseProperty): + """ + A schematic relation between any entities that also implies ordering, e.g. "she has worked into the night". + """ + +class overlappedOn(BaseProperty): + """ + A schematic relation between any entities that also implies ordering, e.g. "she has worked into the night". + """ + +class simultaneous(BaseProperty): + """ + `A simultaneous B` means that A strictly starts and ends at the same time instant as B, i.e. their temporal extend is equal. + """ + +class startedBy(BaseProperty): + """ + `A starts B` means that A starts exactly where B starts, and that A strictly ends before B. As in "I start my day with a coffee". + """ + +class starts(BaseProperty): + """ + `A starts B` means that A starts exactly where B starts, and that A strictly ends before B. As in "I start my day with a coffee". + """ + +class transitionsBack(BaseProperty): + """ + A property which relates a Transient to an Object it both changes from and changes into. This is useful to model objects which, through participation in a process, transform themselves so that an ontological reclassification is necessary, however this transformation is reversible and at the end of the process the objects revert to their previous kind. An example of this is catalysts in chemistry. + """ + +class transitionsFrom(BaseProperty): + """ + A property which relates a Transient to an Object it changes from. This is useful to model objects which, through participation in a process, transform themselves so that an ontological reclassification is necessary. An example of this is dough undergoing the Maillard reaction through baking. + """ + +class transitionsTo(BaseProperty): + """ + A property which relates a Transient to an Object it changes into. This is useful to model objects which, through participation in a process, transform themselves so that an ontological reclassification is necessary. An example of this is baked dough eventually becoming bread by completing a baking process. + """ + +class hasExpectedTerminalSituation(BaseProperty): + """ + A relation between a Transition and the Situation it is expected to, and does actually, end at. You can assert this relationship when the observed outcome of a transition matches expectations. + """ + +class hasPostcondition(BaseProperty): + """ + Direct succession applied to situations. + E.g., 'A postcondition of our Plan is to have things settled'. + This should be taken to mean that the postcondition is the situation expected to follow the current situation. Whether the expectation is met is another issue. + """ + +class hasRequiredInitialSituation(BaseProperty): + """ + A relationship between a Situation x and another Situation y that precedes it, such that without y manifesting, it would be impossible for x to manifest. + """ + +class hasPrecondition(BaseProperty): + """ + Direct precedence applied to situations. + E.g., 'A precondition to declare war against a foreign country is claiming to find nuclear weapons in it'. + This should be taken to mean: a precondition is a situation without which the current situation would not be possible. + """ + +class manifestsIn(BaseProperty): + """ + A relationship indicating that a Situation is realized in an Event that actually happened. + """ + +class preventedBy(BaseProperty): + """ + A relationship indicating a Situation is prevented by another from manifesting. + """ + +class prevents(BaseProperty): + """ + A relationship indicating that a situation does or would prevent another from manifesting. Useful for reasoning about planning (what to do to avoid some bad outcome) and failure recovery (what aspects of the world state prevent continuing the plan?). + """ + +class actsFor(BaseProperty): + """ + The relation holding between any Agent, and a SocialAgent. In principle, a SocialAgent requires at least one PhysicalAgent in order to act, but this dependency can be 'delegated'; e.g. a university can be acted for by a department, which on its turm is acted for by physical agents. + """ + +class executesTask(BaseProperty): + """ + A relation between an action and a task, e.g. 'putting some water in a pot and putting the pot on a fire until the water starts bubbling' executes the task 'boiling'. + """ + +class expresses(BaseProperty): + """ + A relation between an InformationObject and a 'meaning', generalized here as a 'SocialObject'. For example: 'A Beehive is a structure in which bees are kept, typically in the form of a dome or box.' (Oxford dictionary)'; 'the term Beehive expresses the concept Beehive in my apiculture ontology'. + The intuition for 'meaning' is intended to be very broad. A separate, large comment is included for those who want to investigate more on what kind of meaning can be represented in what form. + This is a large comment field for those who want to investigate the different uses of the 'expresses' relation for modeling different approaches to meaning characterization and modeling. + For example, in all these cases, some aspect of meaning is involved: + + - Beehive means "a structure in which bees are kept, typically in the form of a dome or box." (Oxford dictionary) + - 'Beehive' is a synonym in noun synset 09218159 "beehive|hive" (WordNet) + - 'the term Beehive can be interpreted as the fact of 'being a beehive', i.e. a relation that holds for concepts such as Bee, Honey, Hosting, etc.' + - 'the text of Italian apiculture regulation expresses a rule by which beehives should be kept at least one kilometer away from inhabited areas' + - 'the term Beehive expresses the concept Beehive' + - ''Beehive' for apiculturists does not express the same meaning as for, say, fishermen' + - 'Your meaning of 'Beautiful' does not seem to fit mine' + - ''Beehive' is formally interpreted as the set of all beehives' + - 'from the term 'Beehive', we can build a vector space of statistically significant cooccurring terms in the documents that contain it' + - the lexeme 'Belly' expresses the role 'Body_Part' in the frame 'ObservableBodyParts' (FrameNet) + + As the examples suggest, the 'meaning of meaning' is dependent on the background approach/theory that one assumes. One can hardly make a summary of the too many approaches and theories of meaning, therefore this relation is maybe the most controversial and difficult to explain; normally, in such cases it would be better to give up formalizing. + However, the usefulness of having a 'semantic abstraction' in modeling information objects is so high (e.g. for the semantic web, interoperability, reengineering, etc.), that we accept this challenging task, although without taking any particular position in the debate. + We provide here some examples, which we want to generalize upon when using the 'expresses' relation to model semantic aspects of social reality. + + In the most common approach, lexicographers that write dictionaries, glossaries, etc. assume that the meaning of a term is a paraphrase (or 'gloss', or 'definition'). + Another approach is provided by concept schemes like thesauri and lexicons, which assume that the meaning of a term is a 'concept', encoded as a 'lemma', 'synset', or 'descriptor'. + Still another approach is that of psychologists and cognitive scientists, which often assume that the meaning of an information object is a concept encoded in the mind or cognitive system of an agent. + A radically different approach is taken by social scientists and semioticians, who usually assume that meanings of an information object are spread across the communication practices in which members of a community use that object. + Another approach that tackles the distributed nature of meaning is assumed by geometrical models of semantics, which assume that the meaning of an InformationObject (e.g. a word) results from the set of informational contexts (e.g. within texts) in which that object is used similarly. + The logical approach to meaning is still different, since it assumes that the meaning of e.g. a term is equivalent to the set of individuals that the term can be applied to; for example, the meaning of 'Ali' is e.g. an individual person called Ali, the meaning of 'Airplane' is e.g. the set of airplanes, etc. + Finally, an approach taken by structuralist linguistics and frame semantics is that a meaning is the relational context in which an information object can be applied; for example, a meaning of 'Airplane' is situated e.g. in the context ('frame') of passenger airline flights. + + These different approaches are not necessarily conflicting, and they mostly talk about different aspects of so-called 'semantics'. They can be summarized and modelled within DOLCE-Ultralite as follows (notice that such list is far from exhaustive): + + (1) Informal meaning (as for linguistic or commonsense semantics: a distinction is assumed between (informal) meaning and reference; see isAbout for an alternative pattern on reference) + - Paraphrase meaning (as for lexicographic semantics). Here it is modelled as the expresses relation between instances of InformationObject and different instances of InformationObject that act as 'paraphrases' + - Conceptual meaning (as for 'concept scheme' semantics). Here it is modelled as the expresses relation between instances of InformationObject and instances of Concept + - Relational meaning (as for frame semantics). Here it is modelled as the expresses relation between instances of InformationObject and instances of Description + - Cognitive meaning (as for 'psychological' semantics). Here it is modelled as the expresses relation between any instance of InformationObject and any different instance of InformationObject that isRealizedBy a mental, cognitive or neural state (depending on which theory of mind is assumed). Such states can be considered here as instances of Process (occurring in the mind, cognitive system, or neural system of an agent) + - Cultural meaning (as for 'social science' semantics). Here it is modelled as the expresses relation between instances of InformationObject and instances of SocialObject (institutions, cultural paradigms, norms, social practices, etc.) + - Distributional meaning (as for geometrical models of meaning). Here it is modelled as the expresses relation between any instance of InformationObject and any different instance of InformationObject that isFormallyRepresentedIn some (geometrical) Region (e.g. a vector space) + + (2) Formal meaning (as for logic and formal semantics: no distinction is assumed between informal meaning and reference, therefore between 'expresses' and 'isAbout', which can be used interchangeably) + - Object-level formal meaning (as in the traditional first-order logic semantics). Here it is modelled as the expresses relation between an instance of InformationObject and an instance of Collection that isGroundingFor (in most cases) a Set; isGroundingFor is defined in the ontology: http://www.ontologydesignpatterns.org/ont/dul/IOLite.owl + - Modal formal meaning (as in possible-world semantics). Here it is modelled as the expresses relation between an instance of InformationObject and an instance of Collection that isGroundingFor a Set, and which isPartOf some different instance of Collection that isGroundingFor a PossibleWorld + + This is only a first step to provide a framework, in which one can model different aspects of meaning. A more developed ontology should approach the problem of integrating the different uses of 'expresses', so that different theories, resources, methods can interoperate. + """ + +class isExecutedIn(BaseProperty): + """ + A relation between an action and a task, e.g. 'putting some water in a pot and putting the pot on a fire until the water starts bubbling' executes the task 'boiling'. + """ + +class isExpressedBy(BaseProperty): + """ + A relation between a dul:SocialObject (the 'meaning') and a dul:InformationObject (the 'expression'). + For example: 'A Beehive is a structure in which bees are kept, typically in the form of a dome or box.' (Oxford dictionary)'; 'the term Beehive expresses the concept Beehive in my apiculture ontology'. + The intuition for 'meaning' is intended to be very broad. A separate, large comment is included in the encoding of 'expresses', for those who want to investigate more on what kind of meaning can be represented in what form. + """ + +class isPartOf(BaseProperty): + """ + A relation between any entities, e.g. 'brain is a part of the human body'. See dul:hasPart for additional documentation. + """ + +class satisfies(BaseProperty): + """ + A relation between a Situation and a Description, e.g. the execution of a Plan satisfies that plan. + """ + diff --git a/src/pycrap/ontologies/soma/restrictions.py b/src/pycrap/ontologies/soma/restrictions.py new file mode 100644 index 000000000..98f09a159 --- /dev/null +++ b/src/pycrap/ontologies/soma/restrictions.py @@ -0,0 +1,2304 @@ +from .dependencies import * +from .classes import * +from .individuals import * + + +Affordance.is_a = [Relation, describes.only(Disposition), definesBearer.exactly(1, Role), definesTrigger.exactly(1, Role), definesTask.exactly(1, Task)] + +Concept.is_a = [SocialObject, isDefinedIn.some(Description), hasPart.only(Concept)] + +Task.is_a = [EventType, hasPart.only(Task), isExecutedIn.only(Action), isTaskDefinedIn.only(Description), isTaskOf.only(Role)] + +Disposition.is_a = [Extrinsic, isDescribedBy.exactly(1, Affordance), isDescribedBy.exactly(1, Affordance & definesBearer.exactly(1, Role) & definesEventType.exactly(1, EventType) & definesTrigger.exactly(1, Role))] + +Role.is_a = [Concept, classifies.only(Object), hasPart.only(Role)] + +Setpoint.is_a = [Parameter] + +Entity.is_a = [Thing] + +Answer.is_a = [Message] + +Message.is_a = [Item, hasTask.some(CommunicationTask), classifies.only(InformationRealization)] + +Event.is_a = [Entity, hasParticipant.some(Object), hasTimeInterval.some(TimeInterval), hasConstituent.only(Event), hasPart.only(Event)] + +Transition.is_a = [Situation, includesEvent.some(Event), includesObject.some(Object), isSettingFor.some(Process), isSettingFor.some(Situation & precedes.some(Event & precedes.some(Situation))), includesTime.min(3, TimeInterval), isSettingFor.min(2, Situation)] + +PhysicalObject.is_a = [Object, hasPart.only(PhysicalObject)] + +Description.is_a = [SocialObject] + +EventType.is_a = [Concept, classifies.only(Event)] + +Parameter.is_a = [Concept, classifies.only(Region), hasPart.only(Parameter)] + +ProcessType.is_a = [EventType, classifies.only(Process), hasPart.only(ProcessType), isDefinedIn.only(Description)] + +InformationObject.is_a = [InformationEntity, SocialObject] + +Quality.is_a = [Entity, hasRegion.some(Region), isQualityOf.some(Entity), hasConstituent.only(Quality), hasPart.only(Quality)] + +OrderedElement.is_a = [Singleton, follows.only(OrderedElement), precedes.only(OrderedElement), isOrderedBy.exactly(1, Order)] + +MotionProcess.is_a = [PhysicsProcess] + +Motion.is_a = [ProcessType, isExecutedMotionIn.only(MotionProcess)] + +Collection.is_a = [SocialObject, hasPart.only(Collection)] + +System.is_a = [SocialObject] + +Action.is_a = [Event, hasParticipant.some(Agent), executesTask.min(1, Thing)] + +Region.is_a = [Abstract, hasConstituent.only(Region), hasPart.only(Region), overlaps.only(Region), precedes.only(Region)] + +Binding.is_a = [Relation, CounterfactualBinding | FactualBinding, RoleFillerBinding | RoleRoleBinding, Inverse(hasBinding).some(Description), hasBindingFiller.exactly(1, Entity), hasBindingRole.exactly(1, Parameter | Role)] + +Joint.is_a = [PhysicalBody, hasChildLink.exactly(1, PhysicalObject), hasParentLink.exactly(1, PhysicalObject), hasJointState.max(1, JointState)] +Joint.equivalent_to = [FixedJoint | MovableJoint] + +Color.is_a = [Extrinsic, hasRegion.some(ColorRegion), hasRegion.only(ColorRegion)] + +Object.is_a = [Entity, hasLocation.some(Entity), isParticipantIn.some(Event), hasConstituent.only(Object), hasPart.only(Object), isClassifiedBy.only(Role)] + +ExecutionStateRegion.is_a = [Region] +ExecutionStateRegion.equivalent_to = [OneOf([ExecutionState_Active, ExecutionState_Cancelled, ExecutionState_Failed, ExecutionState_Paused, ExecutionState_Pending, ExecutionState_Succeeded])] + +Feature.is_a = [Object, hasPart.only(Feature), isFeatureOf.exactly(1, PhysicalObject)] + +Workflow.is_a = [Plan, definesRole.some(Role), definesTask.some(Task)] + +FrictionAttribute.is_a = [PhysicalAttribute, hasFrictionValue.exactly(1, float)] + +Goal.is_a = [Description] + +StateTransition.is_a = [Transition, hasInitialScene.some(Scene), hasTerminalScene.some(Scene), includesEvent.some(Action), satisfies.some(ImageSchemaTheory)] + +Scene.is_a = [Situation, includesEvent.some(State), satisfies.some(ImageSchemaTheory)] + +SituationTransition.is_a = [Transition] + +Situation.is_a = [Entity, satisfies.some(Description)] + +NonmanifestedSituation.is_a = [Situation] +NonmanifestedSituation.equivalent_to = [Situation & manifestsIn.exactly(0, Event)] + +JointLimit.is_a = [PhysicalAttribute] + +JointState.is_a = [PhysicalAttribute, hasJointPosition.exactly(1, float), hasJointVelocity.exactly(1, float), hasJointEffort.max(1, float)] + +Localization.is_a = [Extrinsic, hasRegion.some(SpaceRegion), hasRegion.only(SpaceRegion)] + +MassAttribute.is_a = [PhysicalAttribute, hasMassValue.exactly(1, float)] + +NetForce.is_a = [ForceAttribute] + +Process.is_a = [Event] + +State.is_a = [Event] + +Succedence.is_a = [Relation, Inverse(hasSuccedence).some(Description), hasPredecessor.exactly(1, TaskInvocation), hasSuccessor.exactly(1, TaskInvocation)] + +Agent.is_a = [Object] + +Preference.is_a = [SocialQuality, isPreferenceOf.only(Agent)] + +Shape.is_a = [Intrinsic, hasRegion.some(ShapeRegion), hasRegion.only(ShapeRegion)] + +ShapeRegion.is_a = [Region, hasSpaceRegion.max(1, SixDPose)] + +SoftwareInstance.is_a = [Thing, SocialAgent & actsFor.some(Agent), isDesignedBy.some(Software)] + +SpaceRegion.is_a = [Region] + +StateType.is_a = [EventType, classifies.only(State), hasPart.only(StateType)] + +Relation.is_a = [Description] + +PhysicalArtifact.is_a = [PhysicalObject, isDescribedBy.some(Plan)] + +PhysicalEffector.is_a = [FunctionalPart, Inverse(hasPart).some(PhysicalAgent)] + +PhysicalPlace.is_a = [PhysicalObject] + +QueryingTask.is_a = [IllocutionaryTask, isTaskOf.some(Query), classifies.only(hasParticipant.some(InterrogativeClause))] + +Design.is_a = [Description] + +MotionDescription.is_a = [ProcessFlow] + +Order.is_a = [FormalEntity, orders.some(OrderedElement)] + +Plan.is_a = [Description, hasComponent.some(Goal)] + +Transient.is_a = [Object, transitionsFrom.some(Object)] + +ColorRegion.is_a = [PhysicalAttribute, isRegionFor.only(Color)] + +InformationRealization.is_a = [InformationEntity, Event | PhysicalObject | Quality, realizes.some(InformationObject), realizesSelfInformation.has_self()] + +ForceAttribute.is_a = [PhysicalAttribute, hasForceValue.exactly(1, float)] + +TimeInterval.is_a = [Region] + +PhysicalAttribute.is_a = [Region, isRegionFor.only(PhysicalObject)] + +API_Specification.is_a = [InterfaceSpecification] + +InterfaceSpecification.is_a = [Design] + +AbductiveReasoning.is_a = [Reasoning] + +Reasoning.is_a = [DerivingInformation] + +Accessor.is_a = [Instrument] + +Instrument.is_a = [ResourceRole] + +Accident.is_a = [Event] + +ActionExecutionPlan.is_a = [Plan, definesTask.only(hasParameter.some(Status))] + +Status.is_a = [Parameter] + +Actuating.is_a = [PhysicalTask] + +PhysicalTask.is_a = [Task, classifies.only(Action & (hasParticipant.some(PhysicalAgent) | hasParticipant.some(PhysicalObject)))] + +AestheticDesign.is_a = [Design] + +AgentRole.is_a = [CausativeRole, classifies.only(Agent)] + +CausativeRole.is_a = [EventAdjacentRole] + +Agonist.is_a = [Patient] + +Patient.is_a = [EventAdjacentRole] + +Algorithm.is_a = [Plan] + +Alteration.is_a = [ProcessType] + +AlterativeInteraction.is_a = [ForceInteraction] + +ForceInteraction.is_a = [ProcessType, isProcessTypeOf.some(Agonist), isProcessTypeOf.some(Antagonist)] +ForceInteraction.equivalent_to = [AlterativeInteraction | PreservativeInteraction] + +PreservativeInteraction.is_a = [ForceInteraction] + +AlteredObject.is_a = [Patient] + +Amateurish.is_a = [DexterityDiagnosis] + +DexterityDiagnosis.is_a = [BehavioralDiagnosis] + +Masterful.is_a = [DexterityDiagnosis] + +AnsweringTask.is_a = [Thing] +AnsweringTask.equivalent_to = [IllocutionaryTask & classifies.only(isReactionTo.only(isClassifiedBy.some(CommandingTask))), isTaskOf.some(Answer)] + +CommandingTask.is_a = [IllocutionaryTask, classifies.only(hasParticipant.some(ImperativeClause))] + +IllocutionaryTask.is_a = [Thing, CommunicationTask & classifies.only(hasParticipant.only(Agent | SocialObject))] + +Antagonist.is_a = [Patient] + +Appliance.is_a = [DesignedArtifact] + +DesignedArtifact.is_a = [PhysicalArtifact, isDescribedBy.some(Design)] + +Approaching.is_a = [Locomotion] + +Locomotion.is_a = [BodyMovement, DirectedMotion] + +ArchiveFile.is_a = [Digital_File] +ArchiveFile.equivalent_to = [Digital_File & realizes.some(ArchiveText)] + +ArchiveText.is_a = [Thing] +ArchiveText.equivalent_to = [Structured_Text & expresses.some(FileConfiguration), isGivenMeaningBy.some(ArchiveFormat)] + +Digital_File.is_a = [InformationRealization, realizes.some(Structured_Text), hasNameString.some(str)] + +ArchiveFormat.is_a = [File_format, givesMeaningTo.only(ArchiveText)] + +File_format.is_a = [Computer_Language] + +FileConfiguration.is_a = [Thing] +FileConfiguration.equivalent_to = [Configuration & hasMember.only(Digital_File)] + +Structured_Text.is_a = [Thing] +Structured_Text.equivalent_to = [Text & isGivenMeaningBy.some(FormalLanguage)] + +AreaSurveying.is_a = [Perceiving] + +Perceiving.is_a = [Thing, InformationAcquisition & PhysicalTask] + +Arm.is_a = [Limb] + +Limb.is_a = [PhysicalEffector] +Limb.equivalent_to = [Arm | Leg] + +Arranging.is_a = [Constructing] + +Constructing.is_a = [PhysicalTask] + +ArtificialAgent.is_a = [PhysicalAgent] + +PhysicalAgent.is_a = [Agent, PhysicalObject] + +Assembling.is_a = [Constructing] + +AssertionTask.is_a = [IllocutionaryTask, classifies.only(hasParticipant.some(DeclarativeClause))] + +DeclarativeClause.is_a = [ClausalObject] + +AssumingArmPose.is_a = [AssumingPose] + +AssumingPose.is_a = [PhysicalTask] + +AttentionShift.is_a = [MentalTask] + +MentalTask.is_a = [Task, classifies.only(MentalAction)] + +AvoidedObject.is_a = [Patient] + +Avoiding.is_a = [Navigating] + +Navigating.is_a = [PhysicalTask] + +Barrier.is_a = [Restrictor] + +Restrictor.is_a = [Instrument] + +BehavioralDiagnosis.is_a = [Diagnosis, hasConstituent.some(Goal)] + +Diagnosis.is_a = [Description] + +BeneficiaryRole.is_a = [GoalRole] + +GoalRole.is_a = [EventAdjacentRole] + +CounterfactualBinding.is_a = [Binding] + +FactualBinding.is_a = [Binding] + +RoleFillerBinding.is_a = [Binding] + +RoleRoleBinding.is_a = [Binding, hasBindingFiller.only(Parameter | Role)] + +Blockage.is_a = [Disposition, affordsBearer.only(Barrier), affordsTrigger.only(BlockedObject)] + +BlockedObject.is_a = [Patient] + +BodyMovement.is_a = [Motion, classifies.only(hasParticipant.some(PhysicalAgent) | hasParticipant.some(PhysicalObject & isPartOf.some(PhysicalAgent)))] + +Boiling.is_a = [Vaporizing] + +Vaporizing.is_a = [PhaseTransition, isProcessTypeOf.some(AlteredObject & classifies.only(Substance))] + +BoxShape.is_a = [ShapeRegion, hasHeight.exactly(1, float), hasLength.exactly(1, float), hasWidth.exactly(1, float)] + +CanCut.is_a = [Variability, affordsBearer.only(Cutter), affordsTrigger.only(CutObject)] + +Variability.is_a = [Disposition, affordsBearer.only(Tool), affordsTrigger.only(AlteredObject)] + +Cutter.is_a = [Tool] + +CutObject.is_a = [AlteredObject] + +Capability.is_a = [Disposition, isDescribedBy.exactly(1, Affordance & definesBearer.exactly(1, Role) & definesTrigger.exactly(1, Role) & definesTask.exactly(1, Task))] + +Capacity.is_a = [Intrinsic] + +Intrinsic.is_a = [PhysicalQuality] + +Catching.is_a = [Actuating] + +PickingUp.is_a = [Manipulating] + +CausalEventRole.is_a = [CausativeRole] + +EventAdjacentRole.is_a = [Role] + +CausedMotionTheory.is_a = [ImageSchemaTheory, defines.some(CausalEventRole), defines.some(Instrument), defines.some(Patient), defines.some(PerformerRole), hasPart.some(SourcePathGoalTheory)] + +ImageSchemaTheory.is_a = [SchematicTheory] + +PerformerRole.is_a = [CausativeRole, classifies.only(Agent)] + +SourcePathGoalTheory.is_a = [ImageSchemaTheory, defines.some(Destination), defines.some(Origin), defines.some(PathRole)] + +Channel.is_a = [PathRole, hasTask.some(CommunicationTask)] + +PathRole.is_a = [SpatioTemporalRole] + +CommunicationTask.is_a = [Task, isTaskOf.some(Channel) & isTaskOf.some(Message) & isTaskOf.some(Receiver) & isTaskOf.some(Sender), classifies.only(hasParticipant.only(Agent | SocialObject))] + +CheckingObjectPresence.is_a = [Perceiving] + +ChemicalProcess.is_a = [Process] + +Choice.is_a = [ResultRole] + +ResultRole.is_a = [GoalRole] + +CircularCylinder.is_a = [CylinderShape, hasRadius.exactly(1, float)] + +CylinderShape.is_a = [ShapeRegion, hasRadius.some(float), hasLength.exactly(1, float)] + +Classifier.is_a = [StatisticalReasoner] + +StatisticalReasoner.is_a = [Reasoner] + +ClausalObject.is_a = [Phrase] + +Phrase.is_a = [LinguisticObject] + +Clean.is_a = [CleanlinessRegion] + +CleanlinessRegion.is_a = [Region] + +Cleaning.is_a = [ModifyingPhysicalObject, isTaskAffordedBy.some(Purification)] + +ModifyingPhysicalObject.is_a = [PhysicalTask] + +Purification.is_a = [Variability, affordsSetpoint.only(classifies.only(Clean & isRegionFor.only(Cleanliness))), affordsTrigger.only(classifies.only(PhysicalObject))] + +Cleanliness.is_a = [SocialQuality, hasRegion.some(CleanlinessRegion), hasRegion.only(CleanlinessRegion)] + +SocialQuality.is_a = [Quality] + +ClientServer_Specification.is_a = [InterfaceSpecification, definesRole.some(ClientRole) & definesRole.some(ServerRole)] + +ClientRole.is_a = [InterfaceComponentRole, isDefinedIn.some(ClientServer_Specification)] + +ServerRole.is_a = [InterfaceComponentRole, isDefinedIn.some(ClientServer_Specification)] + +InterfaceComponentRole.is_a = [SoftwareRole] +InterfaceComponentRole.equivalent_to = [SoftwareRole & isDefinedIn.only(InterfaceSpecification)] + +Closing.is_a = [Actuating] + +Delivering.is_a = [Actuating, isTaskAffordedBy.some(Shifting)] + +Fetching.is_a = [PhysicalAcquiring] + +Lifting.is_a = [Actuating] + +Opening.is_a = [Actuating] + +Pulling.is_a = [Actuating] + +Pushing.is_a = [Actuating] + +Squeezing.is_a = [Actuating] + +Clumsiness.is_a = [Amateurish] + +CognitiveAgent.is_a = [Agent] + +SubCognitiveAgent.is_a = [Agent] + +Collision.is_a = [ProcessType] + +Extrinsic.is_a = [PhysicalQuality] + +ImperativeClause.is_a = [ClausalObject, expresses.some(StateTransition), expresses.only(StateTransition)] + +CommitedObject.is_a = [ConnectedObject] + +ConnectedObject.is_a = [Patient] + +CommunicationAction.is_a = [Action, hasParticipant.some(LinguisticObject)] + +LinguisticObject.is_a = [InformationObject] + +CommunicationReport.is_a = [CommunicationTask] + +Receiver.is_a = [ExperiencerRole, hasTask.some(CommunicationTask)] + +Sender.is_a = [PerformerRole, hasTask.some(CommunicationTask)] + +SocialObject.is_a = [Object, isExpressedBy.some(InformationObject), hasPart.only(SocialObject)] + +CommunicationTopic.is_a = [ResourceRole, classifies.only(SocialObject & isParticipantIn.some(isClassifiedBy.some(CommunicationTask)))] + +ResourceRole.is_a = [EventAdjacentRole] + +Composing.is_a = [Variability, affordsTrigger.only(ConnectedObject)] + +Computer_Language.is_a = [FormalLanguage] + +FormalLanguage.is_a = [Language, givesMeaningTo.only(Structured_Text)] + +Computer_Program.is_a = [Thing] +Computer_Program.equivalent_to = [Structured_Text & isGivenMeaningBy.some(Programming_Language), Structured_Text & expresses.some(Algorithm)] + +Programming_Language.is_a = [Computer_Language, givesMeaningTo.only(Computer_Program)] + +Conclusion.is_a = [CreatedObject, Knowledge] + +CreatedObject.is_a = [Patient] + +Knowledge.is_a = [Item] + +ConditionalSuccedence.is_a = [Succedence, hasBinding.only(CounterfactualBinding)] + +Configuration.is_a = [Description, describes.some(StateType)] + +Connectivity.is_a = [Disposition, affordsBearer.only(ConnectedObject), affordsTrigger.only(ConnectedObject)] + +ContactState.is_a = [StateType, classifies.only(hasParticipant.min(2, PhysicalObject))] + +Container.is_a = [Restrictor] + +Containment.is_a = [Disposition, affordsBearer.only(Container), affordsTrigger.only(IncludedObject), isDispositionOf.only(hasQuality.some(Capacity))] + +IncludedObject.is_a = [Patient] + +ContainmentState.is_a = [FunctionalControl, isStateTypeOf.some(Container & classifies.only(hasDisposition.some(Containment)))] + +FunctionalControl.is_a = [StateType, isStateTypeOf.some(Item), isStateTypeOf.some(Restrictor)] + +ContainmentTheory.is_a = [ControlTheory] + +ControlTheory.is_a = [FunctionalSpatialSchemaTheory] + +ContinuousJoint.is_a = [HingeJoint] + +HingeJoint.is_a = [MovableJoint] + +FunctionalSpatialSchemaTheory.is_a = [ImageSchemaTheory, defines.some(LocatumRole), defines.some(RelatumRole)] + +Cover.is_a = [Barrier] + +Coverage.is_a = [Blockage, affordsBearer.only(Cover), affordsTrigger.only(CoveredObject)] + +CoveredObject.is_a = [BlockedObject] + +CoverageTheory.is_a = [FunctionalSpatialSchemaTheory] + +CoveringTheory.is_a = [ExecutableSchematicTheory, defines.some(Instrument), defines.exactly(1, Patient)] + +ExecutableSchematicTheory.is_a = [SchematicTheory, defines.some(PerformerRole)] + +CrackingTheory.is_a = [ExecutableSchematicTheory, defines.some(Instrument), defines.some(Patient)] + +Creation.is_a = [ProcessType, isProcessTypeOf.some(CreatedObject)] + +Cuttability.is_a = [Disposition, affordsBearer.only(CutObject), affordsTrigger.only(Cutter)] + +Tool.is_a = [Instrument] + +Cutting.is_a = [ModifyingPhysicalObject] + +Database.is_a = [SoftwareRole] + +SoftwareRole.is_a = [Role, classifies.only(Software)] + +Deciding.is_a = [DerivingInformation] + +DerivingInformation.is_a = [InformationAcquisition, isTaskOfInputRole.some(Premise) & isTaskOfOutputRole.some(Conclusion)] + +DeductiveReasoning.is_a = [Reasoning] + +Deformation.is_a = [Alteration, isProcessTypeOf.exactly(1, ShapedObject)] + +ShapedObject.is_a = [AlteredObject, isTriggerDefinedIn.some(describesQuality.only(Shape)), classifies.only(hasQuality.some(Shape))] + +FluidFlow.is_a = [Motion, isProcessTypeOf.some(MovedObject)] + +Shifting.is_a = [Variability, affordsSetpoint.only(classifies.only(Localization)), affordsTrigger.only(MovedObject)] + +DependentPlace.is_a = [Feature] + +Deposit.is_a = [Instrument] + +DepositedObject.is_a = [Patient] + +Deposition.is_a = [Disposition, affordsBearer.only(Deposit), affordsTrigger.only(DepositedObject)] + +InformationAcquisition.is_a = [Thing] +InformationAcquisition.equivalent_to = [MentalTask & isTaskOfOutputRole.some(Knowledge)] + +Premise.is_a = [Knowledge] + +DesignedComponent.is_a = [FunctionalPart, DesignedArtifact, hasDisposition.some(Connectivity)] + +FunctionalPart.is_a = [PhysicalBody, isComponentOf.only(Agent | DesignedArtifact)] + +DesignedContainer.is_a = [DesignedArtifact, hasDisposition.some(Containment)] + +DesignedFurniture.is_a = [DesignedArtifact] + +DesignedTool.is_a = [DesignedArtifact] + +Destination.is_a = [Location] + +Location.is_a = [SpatioTemporalRole] + +DestroyedObject.is_a = [Patient] + +Destruction.is_a = [ProcessType, isProcessTypeOf.some(DestroyedObject)] + +DetectedObject.is_a = [Patient] + +DeviceState.is_a = [Intrinsic] + +DeviceStateRange.is_a = [Region] +DeviceStateRange.equivalent_to = [DeviceTurnedOff | DeviceTurnedOn] + +DeviceTurnedOff.is_a = [DeviceStateRange] + +DeviceTurnedOn.is_a = [DeviceStateRange] + +Dicing.is_a = [Cutting] + +DirectedMotion.is_a = [Motion] + +UndirectedMotion.is_a = [Motion] + +Dirty.is_a = [CleanlinessRegion] + +Discourse.is_a = [CommunicationTask] + +Distancing.is_a = [Navigating] + +Dreaming.is_a = [DerivingInformation] + +Driving.is_a = [Locomotion] + +Flying.is_a = [Locomotion] + +Swimming.is_a = [Locomotion] + +Walking.is_a = [Locomotion] + +Dropping.is_a = [Actuating] + +Placing.is_a = [PhysicalTask] + +ESTSchemaTheory.is_a = [ImageSchemaTheory, defines.some(ExistingObjectRole), defines.exactly(1, Thing)] + +ExistingObjectRole.is_a = [RelationAdjacentRole, classifies.only(PhysicalObject)] + +Effort.is_a = [Parameter] + +EnclosedObject.is_a = [IncludedObject] + +Enclosing.is_a = [Containment, affordsTrigger.only(EnclosedObject)] + +EndEffectorPositioning.is_a = [Manipulating] + +Manipulating.is_a = [PhysicalTask, classifies.only(PhysicalAction)] + +Episode.is_a = [Situation] + +ExcludedObject.is_a = [Patient] + +ExecutableFile.is_a = [Thing] +ExecutableFile.equivalent_to = [Digital_File & realizes.some(Executable_Code)] + +Executable_Code.is_a = [Computer_Program] +Executable_Code.equivalent_to = [Computer_Program & isGivenMeaningBy.some(ExecutableFormat)] + +ExecutableFormat.is_a = [File_format, givesMeaningTo.only(Executable_Code)] + +SchematicTheory.is_a = [Theory] + +ExecutableSoftware.is_a = [Thing] +ExecutableSoftware.equivalent_to = [Software & hasMember.some(ExecutableFile)] + +Software.is_a = [Design, describes.some(Software_Configuration), describes.only(SoftwareInstance | Software_Configuration)] + +RelationAdjacentRole.is_a = [Role] + +ExperiencerRole.is_a = [PerformerRole] + +ExtractedObject.is_a = [Patient] + +PhysicalQuality.is_a = [Quality, isQualityOf.exactly(1, PhysicalObject)] + +FailedAttempt.is_a = [Unsuccessfulness] + +Unsuccessfulness.is_a = [SuccessDiagnosis] + +FaultySoftware.is_a = [SoftwareDiagnosis] + +SoftwareDiagnosis.is_a = [TechnicalDiagnosis] + +PhysicalAcquiring.is_a = [ModifyingPhysicalObject] + +Configuration.is_a = [Collection] + +Finger.is_a = [Limb, isPartOf.some(Hand)] + +Hand.is_a = [PrehensileEffector] + +FixedJoint.is_a = [Joint, hasJointState.exactly(0, Entity)] + +MovableJoint.is_a = [Joint, hasJointState.exactly(1, JointState)] + +Flipping.is_a = [Actuating, isTaskAffordedBy.some(Shifting)] + +FloatingJoint.is_a = [MovableJoint] + +Fluid.is_a = [Substance] + +Substance.is_a = [PhysicalBody] + +MovedObject.is_a = [AlteredObject, isTriggerDefinedIn.some(describesQuality.only(Localization)), classifies.only(hasQuality.some(Localization))] + +Focusing.is_a = [AttentionShift] + +Foolishness.is_a = [Amateurish] + +ForgettingIncorrectInformation.is_a = [InformationDismissal] + +InformationDismissal.is_a = [MentalTask, isTaskOfInputRole.some(ExcludedObject & Knowledge)] + +ForgettingIrrelevantInformation.is_a = [InformationDismissal] + +Language.is_a = [System, givesMeaningTo.only(Text)] + +Item.is_a = [Patient] + +FunctionalDesign.is_a = [Design] + +FunctionalDiagnosis.is_a = [Diagnosis] + +PhysicalBody.is_a = [PhysicalObject] + +LocatumRole.is_a = [SpatialRelationRole, classifies.only(PhysicalObject)] + +RelatumRole.is_a = [SpatialRelationRole, classifies.only(PhysicalObject)] + +GetTaskParameter.is_a = [Planning] + +Planning.is_a = [Deciding, isTaskOf.some(classifies.some(Plan))] + +GraphDatabase.is_a = [Database] + +GraphQueryLanguage.is_a = [QueryLanguage] + +QueryLanguage.is_a = [Computer_Language] + +GraspTransfer.is_a = [Grasping] + +Grasping.is_a = [Manipulating] + +Graspability.is_a = [Disposition] + +Releasing.is_a = [Manipulating] + +GraspingMotion.is_a = [PrehensileMotion] +GraspingMotion.equivalent_to = [IntermediateGrasp | PowerGrasp | PrecisionGrasp] + +IntermediateGrasp.is_a = [GraspingMotion] + +PowerGrasp.is_a = [GraspingMotion] + +PrecisionGrasp.is_a = [GraspingMotion] + +PrehensileMotion.is_a = [DirectedMotion, isProcessTypeOf.some(MovedObject & classifies.only(PrehensileEffector))] +PrehensileMotion.equivalent_to = [GraspingMotion | ReleasingMotion] + +ReleasingMotion.is_a = [PrehensileMotion] + +GreenColor.is_a = [ColorRegion] + +Gripper.is_a = [PrehensileEffector] + +PrehensileEffector.is_a = [PhysicalEffector] + +HardwareDiagnosis.is_a = [TechnicalDiagnosis] + +TechnicalDiagnosis.is_a = [FunctionalDiagnosis, hasConstituent.some(DesignedArtifact)] + +HasQualityRegion.is_a = [Relation, hasQuality.exactly(1, Quality), hasRegion.exactly(1, Region)] + +Head.is_a = [FunctionalPart] + +HeadMovement.is_a = [BodyMovement] + +HeadTurning.is_a = [HeadMovement] + +Holding.is_a = [Manipulating] + +HostRole.is_a = [InterfaceComponentRole, isDefinedIn.some(PluginSpecification)] + +PluginSpecification.is_a = [API_Specification, definesRole.some(HostRole) & definesRole.some(PluginRole)] + +Humanreadable_Programming_Language.is_a = [Programming_Language, givesMeaningTo.only(Source_Code)] + +Source_Code.is_a = [Computer_Program] +Source_Code.equivalent_to = [Computer_Program & isGivenMeaningBy.some(Humanreadable_Programming_Language)] + +HumanActivityRecording.is_a = [RecordedEpisode] + +RecordedEpisode.is_a = [Episode, includesRecord.some(InformationObject)] + +Imagining.is_a = [InformationAcquisition] + +Impediment.is_a = [Blockage, affordsBearer.only(Obstacle), affordsTrigger.only(RestrictedObject)] + +Obstacle.is_a = [Barrier] + +RestrictedObject.is_a = [BlockedObject] + +Inability.is_a = [Unsuccessfulness] + +IncompatibleSoftware.is_a = [SoftwareDiagnosis] + +InductiveReasoning.is_a = [Reasoning] + +Infeasibility.is_a = [Unsuccessfulness] + +InferenceRules.is_a = [Knowledge] + +InformationRetrieval.is_a = [InformationAcquisition, isTaskOfOutputRole.some(Knowledge)] + +InformationStorage.is_a = [MentalTask, isTaskOfInputRole.some(Knowledge & StoredObject)] + +StoredObject.is_a = [EnclosedObject] + +InsertedObject.is_a = [EnclosedObject] + +Insertion.is_a = [Enclosing, affordsTrigger.only(InsertedObject)] + +Instructions.is_a = [Item] + +Interpreting.is_a = [DerivingInformation] + +InterrogativeClause.is_a = [ClausalObject] + +Introspecting.is_a = [InformationAcquisition] + +KineticFrictionAttribute.is_a = [FrictionAttribute] + +KinoDynamicData.is_a = [InformationObject, isAbout.only(PhysicalObject)] + +KnowledgeRepresentationLanguage.is_a = [Computer_Language] + +Labeling.is_a = [Interpreting] + +Text.is_a = [Thing] +Text.equivalent_to = [InformationObject & isGivenMeaningBy.some(Language)] + +Leaning.is_a = [PosturalMoving] + +PosturalMoving.is_a = [BodyMovement] + +Learning.is_a = [InformationStorage] + +Leg.is_a = [Limb] + +LimbMotion.is_a = [DirectedMotion, isProcessTypeOf.some(MovedObject & classifies.only(Limb))] + +Linkage.is_a = [Connectivity, affordsBearer.only(LinkedObject), affordsTrigger.only(LinkedObject)] + +LinkedObject.is_a = [ConnectedObject] + +LinkageState.is_a = [StateType, isStateTypeOf.some(LinkedObject)] + +SpatioTemporalRole.is_a = [EventAdjacentRole] + +SpatialRelationRole.is_a = [RelationAdjacentRole] + +LocutionaryAction.is_a = [Thing] +LocutionaryAction.equivalent_to = [CommunicationAction & hasParticipant.some(Agent)] + +LookingAt.is_a = [PhysicalTask] + +LookingFor.is_a = [Perceiving] + +Lowering.is_a = [Actuating] + +PhysicalAction.is_a = [Action] + +Markup_Language.is_a = [Computer_Language] + +Material.is_a = [Intrinsic] + +MedicalDiagnosis.is_a = [FunctionalDiagnosis, hasConstituent.some(Organism)] + +Organism.is_a = [BiologicalObject, PhysicalAgent] + +Memorizing.is_a = [Learning] + +MentalAction.is_a = [Action, hasParticipant.only(Agent | SocialObject)] + +MeshShape.is_a = [ShapeRegion, hasFilePath.exactly(1, str), hasShapeScale.max(1, float)] + +MeshShapeData.is_a = [InformationObject, isAbout.only(PhysicalObject)] + +MetaCognitionEvaluationTopic.is_a = [MetaCognitionTopic] + +MetaCognitionTopic.is_a = [ThinkAloudTopic] + +MetaCognitionMemoryTopic.is_a = [MetaCognitionTopic] + +MetaCognitionPlanningTopic.is_a = [MetaCognitionTopic] + +ThinkAloudTopic.is_a = [CommunicationTopic] + +MetacognitiveControlling.is_a = [MentalTask] + +MetacognitiveMonitoring.is_a = [Introspecting] + +Mixing.is_a = [Constructing] + +MixingTheory.is_a = [ExecutableSchematicTheory, defines.some(Instrument), defines.some(Patient)] + +MonitoringJointState.is_a = [Proprioceiving] + +Proprioceiving.is_a = [PhysicalTask] + +ProcessFlow.is_a = [Description, definesProcess.some(ProcessType)] + +PhysicsProcess.is_a = [Process, hasParticipant.some(PhysicalObject)] + +MovingAway.is_a = [Locomotion] + +MovingTo.is_a = [Navigating] + +Natural_Language.is_a = [Language, givesMeaningTo.only(Natural_Language_Text)] + +Natural_Language_Text.is_a = [Thing] +Natural_Language_Text.equivalent_to = [Text & isGivenMeaningBy.some(Natural_Language)] + +Ontology.is_a = [Structured_Text] +Ontology.equivalent_to = [Structured_Text & isGivenMeaningBy.some(Ontology_Language)] + +Ontology_Language.is_a = [KnowledgeRepresentationLanguage, givesMeaningTo.only(Ontology)] + +Option.is_a = [ResourceRole] + +FormalEntity.is_a = [Abstract] + +Singleton.is_a = [Thing] +Singleton.equivalent_to = [Set & encapsulates.exactly(1, Entity)] + +Orienting.is_a = [Positioning] + +Positioning.is_a = [Actuating] + +Origin.is_a = [Location] + +ParkingArms.is_a = [AssumingArmPose] + +PhaseTransition.is_a = [Alteration] + +PhysicalAccessibility.is_a = [StateType, isStateTypeOf.some(Item), isStateTypeOf.some(Restrictor)] + +PhysicalBlockage.is_a = [StateType, isStateTypeOf.some(Item), isStateTypeOf.some(Restrictor)] + +PhysicalExistence.is_a = [PhysicalState] + +PhysicalState.is_a = [State, hasParticipant.some(PhysicalObject)] + +PlacingTheory.is_a = [ExecutableSchematicTheory, defines.some(Destination), defines.some(Patient)] + +PlanarJoint.is_a = [MovableJoint] + +PluginRole.is_a = [InterfaceComponentRole, isDefinedIn.some(PluginSpecification)] + +Pourable.is_a = [Disposition, affordsBearer.only(PouredObject)] + +PouredObject.is_a = [Patient] + +Pouring.is_a = [Actuating, isTaskAffordedBy.some(Pourable)] + +PouringInto.is_a = [Pouring] + +PouringOnto.is_a = [Pouring] + +Prediction.is_a = [Prospecting] + +Prospecting.is_a = [DerivingInformation] + +Predilection.is_a = [SocialRelation, describes.only(Preference | (Order & orders.only(encapsulates.only(Situation))))] + +SocialRelation.is_a = [Relation] + +PreferenceOrder.is_a = [SocialRelation, orders.some(OrderedElement), orders.only(encapsulates.only(Description)), describes.only(Preference)] + +PreferenceRegion.is_a = [SocialObjectAttribute, isRegionFor.some(Preference)] + +SocialObjectAttribute.is_a = [Region, isRegionFor.only(SocialObject)] + +PrismaticJoint.is_a = [MovableJoint, hasJointLimit.exactly(1, JointLimit)] + +Progression.is_a = [Situation] +Progression.equivalent_to = [satisfies.some(ProcessFlow)] + +Protector.is_a = [Restrictor] + +ProximalTheory.is_a = [ImageSchemaTheory, defines.some(LocatumRole), defines.some(RelatumRole)] + +PushingAway.is_a = [Pushing] + +PushingDown.is_a = [Pushing] + +PuttingDown.is_a = [Manipulating] + +QualityTransition.is_a = [Transition] + +Query.is_a = [Message] + +QueryAnsweringTask.is_a = [Thing] +QueryAnsweringTask.equivalent_to = [AnsweringTask & classifies.only(isReactionTo.only(isClassifiedBy.some(QueryingTask)))] + +QueryEngine.is_a = [SoftwareRole] + +Reaching.is_a = [EndEffectorPositioning] + +Retracting.is_a = [EndEffectorPositioning] + +Reasoner.is_a = [SoftwareRole] + +RecipientRole.is_a = [BeneficiaryRole] + +RedColor.is_a = [ColorRegion] + +Reification.is_a = [Description, isReificationOf.exactly(1, normstr)] + +RelationalDatabase.is_a = [Database] + +RelationalQueryLanguage.is_a = [QueryLanguage] + +RelevantPart.is_a = [Feature] + +Remembering.is_a = [Thing, InformationRetrieval & Retrospecting] + +Retrospecting.is_a = [InformationAcquisition] + +RemovedObject.is_a = [ExcludedObject] + +Replanning.is_a = [Planning] + +RevoluteJoint.is_a = [HingeJoint, hasJointLimit.exactly(1, JointLimit)] + +Room.is_a = [PhysicalPlace] + +RoomSurface.is_a = [Surface] + +Surface.is_a = [PhysicalPlace] + +Rubbing.is_a = [DirectedMotion] + +Theory.is_a = [Description, hasComponent.some(Relation)] + +SelectedObject.is_a = [Role] + +Selecting.is_a = [Deciding] + +SelectingItem.is_a = [GetTaskParameter, isTaskOfOutputRole.some(SelectedObject & classifies.only(PhysicalObject))] + +SelfReflection.is_a = [MetacognitiveControlling] + +Serving.is_a = [Delivering, classifies.only(Action & (hasParticipant.some(PhysicalAgent) | hasParticipant.some(PhysicalObject)))] + +SettingGripper.is_a = [AssumingPose] + +SixDPose.is_a = [SpaceRegion, hasPositionData.exactly(1, str)] + +Shaping.is_a = [Variability, affordsSetpoint.only(classifies.only(Shape)), affordsTrigger.only(ShapedObject)] + +Sharpness.is_a = [Intrinsic] + +Simulating.is_a = [Prospecting] + +Simulation_Reasoner.is_a = [Reasoner] + +Set.is_a = [FormalEntity] + +Size.is_a = [Intrinsic] + +Slicing.is_a = [Cutting] + +Sluggishness.is_a = [Amateurish] + +SocialState.is_a = [State, hasParticipant.some(Agent)] + +Software_Configuration.is_a = [Configuration, isDescribedBy.exactly(1, Software)] + +SocialAgent.is_a = [Agent, SocialObject, actsThrough.some(PhysicalAgent)] + +SoftwareLibrary.is_a = [Software] + +SourceMaterialRole.is_a = [ResourceRole] + +SphereShape.is_a = [ShapeRegion, hasRadius.exactly(1, float)] + +Standing.is_a = [PosturalMoving] + +StaticFrictionAttribute.is_a = [FrictionAttribute] + +StatusFailure.is_a = [Region] + +StimulusRole.is_a = [CausativeRole] + +Stirring.is_a = [Mixing, isTaskAffordedBy.some(Composing)] + +Storage.is_a = [Enclosing, affordsTrigger.only(StoredObject)] + +StructuralDesign.is_a = [Design] + +TaskInvocation.is_a = [Workflow, hasBinding.only(FactualBinding), definesTask.exactly(1, Task)] + +SuccessDiagnosis.is_a = [BehavioralDiagnosis] + +Successfulness.is_a = [SuccessDiagnosis] + +SupportState.is_a = [FunctionalControl, isStateTypeOf.some(Supporter & classifies.only(hasDisposition.some(Deposition)))] + +Supporter.is_a = [Restrictor] + +SupportTheory.is_a = [ControlTheory] + +SupportedObject.is_a = [ConnectedObject] + +SymbolicReasoner.is_a = [Reasoner] + +Tapping.is_a = [DirectedMotion] + +Taxis.is_a = [BodyMovement] + +Temperature.is_a = [Intrinsic, hasRegion.some(TemperatureRegion), hasRegion.only(TemperatureRegion)] + +TemperatureRegion.is_a = [Region] + +Tempering.is_a = [Variability, affordsSetpoint.only(classifies.only(Temperature))] + +ThinkAloud.is_a = [CommunicationReport] + +ThinkAloudActionTopic.is_a = [ThinkAloudTopic] + +ThinkAloudGeneralKnowledgeTopic.is_a = [ThinkAloudKnowledgeTopic] + +ThinkAloudKnowledgeTopic.is_a = [ThinkAloudTopic] + +ThinkAloudObstructionTopic.is_a = [ThinkAloudTopic] + +ThinkAloudOpinionTopic.is_a = [ThinkAloudTopic] + +ThinkAloudPerceptionTopic.is_a = [ThinkAloudTopic] + +ThinkAloudPlanTopic.is_a = [ThinkAloudTopic] + +ThinkAloudSceneKnowledgeTopic.is_a = [ThinkAloudKnowledgeTopic] + +Threshold.is_a = [Parameter] + +Throwing.is_a = [Actuating, Manipulating] + +TimeRole.is_a = [SpatioTemporalRole] + +Transporting.is_a = [ModifyingPhysicalObject] + +Triplestore.is_a = [GraphDatabase] + +Turning.is_a = [PosturalMoving] + +UnavailableSoftware.is_a = [SoftwareDiagnosis] + +VideoData.is_a = [InformationObject] + +ThreeDPosition.is_a = [SpaceRegion, hasPositionData.exactly(1, str)] + +hasColorValue.is_a = [DatatypeProperty, hasRegionDataValue] +hasColorValue.domain = [ColorRegion] + +hasRegionDataValue.is_a = [DatatypeProperty, hasDataValue] +hasRegionDataValue.domain = [Region] + +hasDataFormat.is_a = [DatatypeProperty, hasDataValue] +hasDataFormat.domain = [InformationRealization] +hasDataFormat.range = [str] + +hasDataValue.is_a = [DatatypeProperty] +hasDataValue.domain = [Entity] + +hasDepth.is_a = [DatatypeProperty, hasShapeParameter] +hasDepth.domain = [ShapeRegion] +hasDepth.range = [float] + +hasShapeParameter.is_a = [DatatypeProperty, hasRegionDataValue] +hasShapeParameter.domain = [ShapeRegion] +hasShapeParameter.range = [float | float | float | str] + +hasEventBegin.is_a = [DatatypeProperty, hasEventTime] +hasEventBegin.domain = [Event] +hasEventBegin.range = [float] + +hasEventTime.is_a = [DatatypeProperty, hasDataValue] +hasEventTime.domain = [Event] +hasEventTime.range = [float] + +hasEventEnd.is_a = [DatatypeProperty, hasEventTime] +hasEventEnd.domain = [Event] +hasEventEnd.range = [float] + +hasFilePath.is_a = [DatatypeProperty, hasDataValue] +hasFilePath.domain = [Entity] +hasFilePath.range = [str] + +hasForceValue.is_a = [DatatypeProperty, hasRegionDataValue] +hasForceValue.domain = [ForceAttribute] +hasForceValue.range = [float] + +hasFrictionValue.is_a = [DatatypeProperty, hasRegionDataValue] +hasFrictionValue.domain = [FrictionAttribute] +hasFrictionValue.range = [float] + +hasHSVValue.is_a = [DatatypeProperty, hasColorValue] +hasHSVValue.domain = [ColorRegion] +hasHSVValue.range = [str] + +hasHeight.is_a = [DatatypeProperty, hasShapeParameter] +hasHeight.domain = [ShapeRegion] +hasHeight.range = [float] + +hasIntervalBegin.is_a = [DatatypeProperty, hasIntervalTime] +hasIntervalBegin.domain = [TimeInterval] +hasIntervalBegin.range = [float] + +hasIntervalTime.is_a = [DatatypeProperty, hasRegionDataValue] +hasIntervalTime.domain = [TimeInterval] +hasIntervalTime.range = [float] + +hasIntervalEnd.is_a = [DatatypeProperty, hasIntervalTime] +hasIntervalEnd.domain = [TimeInterval] +hasIntervalEnd.range = [float] + +hasJointEffort.is_a = [DatatypeProperty, hasJointParameter] +hasJointEffort.domain = [JointState] +hasJointEffort.range = [float] + +hasJointParameter.is_a = [DatatypeProperty, hasRegionDataValue] +hasJointParameter.domain = [PhysicalAttribute] +hasJointParameter.range = [float] + +hasJointEffortLimit.is_a = [DatatypeProperty, hasJointParameter] +hasJointEffortLimit.domain = [JointLimit] +hasJointEffortLimit.range = [float] + +hasJointPosition.is_a = [DatatypeProperty, hasJointParameter] +hasJointPosition.domain = [JointState] +hasJointPosition.range = [float] + +hasJointPositionMax.is_a = [DatatypeProperty, hasJointParameter] +hasJointPositionMax.domain = [JointLimit] +hasJointPositionMax.range = [float] + +hasJointPositionMin.is_a = [DatatypeProperty, hasJointParameter] +hasJointPositionMin.domain = [JointLimit] +hasJointPositionMin.range = [float] + +hasJointVelocity.is_a = [DatatypeProperty, hasJointParameter] +hasJointVelocity.domain = [JointState] +hasJointVelocity.range = [float] + +hasJointVelocityLimit.is_a = [DatatypeProperty, hasJointParameter] +hasJointVelocityLimit.domain = [JointLimit] +hasJointVelocityLimit.range = [float] + +hasLength.is_a = [DatatypeProperty, hasShapeParameter] +hasLength.domain = [ShapeRegion] +hasLength.range = [float] + +hasMassValue.is_a = [DatatypeProperty, hasRegionDataValue] +hasMassValue.domain = [MassAttribute] +hasMassValue.range = [float] + +hasNameString.is_a = [DatatypeProperty, hasDataValue] +hasNameString.domain = [Entity] +hasNameString.range = [str] + +hasPersistentIdentifier.is_a = [DatatypeProperty, hasDataValue] +hasPersistentIdentifier.domain = [InformationRealization] +hasPersistentIdentifier.range = [str] + +hasPositionData.is_a = [DatatypeProperty, hasSpaceParameter] +hasPositionData.domain = [SpaceRegion] +hasPositionData.range = [str] + +hasSpaceParameter.is_a = [DatatypeProperty, hasRegionDataValue] +hasSpaceParameter.domain = [SpaceRegion] + +hasPriority.is_a = [DatatypeProperty, hasDataValue] +hasPriority.domain = [Task] + +hasRGBValue.is_a = [DatatypeProperty, hasColorValue] +hasRGBValue.domain = [ColorRegion] +hasRGBValue.range = [str] + +hasRadius.is_a = [DatatypeProperty, hasShapeParameter] +hasRadius.domain = [ShapeRegion] +hasRadius.range = [float] + +hasReferenceFrame.is_a = [DatatypeProperty, hasSpaceParameter] +hasReferenceFrame.domain = [SpaceRegion] +hasReferenceFrame.range = [str] + +hasShapeScale.is_a = [DatatypeProperty, hasShapeParameter] +hasShapeScale.domain = [ShapeRegion] +hasShapeScale.range = [float] + +hasWidth.is_a = [DatatypeProperty, hasShapeParameter] +hasWidth.domain = [ShapeRegion] +hasWidth.range = [float] + +isReificationOf.is_a = [DatatypeProperty, hasDataValue] +isReificationOf.domain = [Description] +isReificationOf.range = [normstr] + +affects.is_a = [ObjectProperty, precedes] + +precedes.is_a = [ObjectProperty, TransitiveProperty, associatedWith] +precedes.domain = [Entity] +precedes.range = [Entity] + +isAffectedBy.is_a = [ObjectProperty, follows] + +affordanceDefines.is_a = [ObjectProperty, defines] +affordanceDefines.domain = [Affordance] +affordanceDefines.range = [Concept] + +defines.is_a = [ObjectProperty, usesConcept] +defines.domain = [Description] +defines.range = [Concept] + +isDefinedInAffordance.is_a = [ObjectProperty, isDefinedIn] +isDefinedInAffordance.domain = [Concept] +isDefinedInAffordance.range = [Affordance] + +affordanceDefinesTask.is_a = [ObjectProperty, affordanceDefines, definesTask] +affordanceDefinesTask.domain = [Affordance] +affordanceDefinesTask.range = [Task] + +definesTask.is_a = [ObjectProperty, defines] +definesTask.domain = [Description] +definesTask.range = [Task] + +isTaskDefinedInAffordance.is_a = [ObjectProperty, isDefinedInAffordance, isTaskDefinedIn] +isTaskDefinedInAffordance.domain = [Task] +isTaskDefinedInAffordance.range = [Affordance] + +affordsBearer.is_a = [ObjectProperty, affordsConcept] +affordsBearer.domain = [Disposition] +affordsBearer.range = [Role] + +affordsConcept.is_a = [ObjectProperty, associatedWith] +affordsConcept.domain = [Disposition] +affordsConcept.range = [Concept] + +isBearerAffordedBy.is_a = [ObjectProperty, isConceptAffordedBy] +isBearerAffordedBy.domain = [Role] +isBearerAffordedBy.range = [Disposition] + +isDescribedBy.is_a = [ObjectProperty, associatedWith] +isDescribedBy.domain = [Entity] +isDescribedBy.range = [Description] + +definesBearer.is_a = [ObjectProperty, definesRole] +definesBearer.domain = [Affordance] +definesBearer.range = [Role] + +associatedWith.is_a = [ObjectProperty, SymmetricProperty, TransitiveProperty] +associatedWith.domain = [Entity] +associatedWith.range = [Entity] + +isConceptAffordedBy.is_a = [ObjectProperty, associatedWith] +isConceptAffordedBy.domain = [Concept] +isConceptAffordedBy.range = [Disposition] + +affordsPerformer.is_a = [ObjectProperty, affordsConcept] +affordsPerformer.domain = [Disposition] +affordsPerformer.range = [Role] + +isPerformerAffordedBy.is_a = [ObjectProperty, isConceptAffordedBy] +isPerformerAffordedBy.domain = [Role] +isPerformerAffordedBy.range = [Disposition] + +definesPerformer.is_a = [ObjectProperty, definesRole] +definesPerformer.domain = [Affordance] +definesPerformer.range = [Role] + +affordsSetpoint.is_a = [ObjectProperty, affordsConcept] +affordsSetpoint.domain = [Disposition] +affordsSetpoint.range = [Setpoint] + +isSetpointAffordedBy.is_a = [ObjectProperty, isConceptAffordedBy] +isSetpointAffordedBy.domain = [Setpoint] +isSetpointAffordedBy.range = [Disposition] + +definesSetpoint.is_a = [ObjectProperty, definesParameter] +definesSetpoint.domain = [Description] +definesSetpoint.range = [Setpoint] + +affordsTask.is_a = [ObjectProperty, affordsConcept] +affordsTask.domain = [Disposition] +affordsTask.range = [Task] + +isTaskAffordedBy.is_a = [ObjectProperty, isConceptAffordedBy] +isTaskAffordedBy.domain = [Task] +isTaskAffordedBy.range = [Disposition] + +affordsTrigger.is_a = [ObjectProperty, affordsConcept] +affordsTrigger.domain = [Disposition] +affordsTrigger.range = [Role] + +isTriggerAffordedBy.is_a = [ObjectProperty, isConceptAffordedBy] +isTriggerAffordedBy.domain = [Role] +isTriggerAffordedBy.range = [Disposition] + +definesTrigger.is_a = [ObjectProperty, definesRole] +definesTrigger.domain = [Affordance] +definesTrigger.range = [Role] + +after.is_a = [ObjectProperty, TransitiveProperty, follows] +after.domain = [Entity] +after.range = [Entity] + +follows.is_a = [ObjectProperty, TransitiveProperty, associatedWith] +follows.domain = [Entity] +follows.range = [Entity] + +before.is_a = [ObjectProperty, TransitiveProperty, precedes] +before.domain = [Entity] +before.range = [Entity] + +answers.is_a = [ObjectProperty, relatesToAnotherRole] +answers.domain = [Answer] +answers.range = [Message] + +relatesToAnotherRole.is_a = [ObjectProperty, SymmetricProperty, associatedWith] +relatesToAnotherRole.domain = [Role] +relatesToAnotherRole.range = [Role] + +hasAnswer.is_a = [ObjectProperty, relatesToAnotherRole] +hasAnswer.domain = [Message] +hasAnswer.range = [Answer] + +causes.is_a = [ObjectProperty, TransitiveProperty, affects] + +isReactionTo.is_a = [ObjectProperty, TransitiveProperty, isAffectedBy] +isReactionTo.domain = [Event] +isReactionTo.range = [Event] + +causesTransition.is_a = [ObjectProperty, isEventIncludedIn] +causesTransition.domain = [Event] +causesTransition.range = [Transition] + +isEventIncludedIn.is_a = [ObjectProperty, hasSetting] +isEventIncludedIn.domain = [Event] +isEventIncludedIn.range = [Situation] + +isCausedByEvent.is_a = [ObjectProperty, includesEvent] +isCausedByEvent.domain = [Transition] +isCausedByEvent.range = [Event] + +coOccurs.is_a = [ObjectProperty, SymmetricProperty, overlaps] +coOccurs.domain = [Event] +coOccurs.range = [Event] + +overlaps.is_a = [ObjectProperty, SymmetricProperty, associatedWith] +overlaps.domain = [Entity] +overlaps.range = [Entity] + +contains.is_a = [ObjectProperty, overlaps] +contains.domain = [Entity] +contains.range = [Entity] + +isContainedIn.is_a = [ObjectProperty, overlaps] +isContainedIn.domain = [Entity] +isContainedIn.range = [Entity] + +containsEvent.is_a = [ObjectProperty, TransitiveProperty, coOccurs, contains] +containsEvent.domain = [Event] +containsEvent.range = [Event] + +during.is_a = [ObjectProperty, TransitiveProperty, coOccurs, isContainedIn] +during.domain = [Event] +during.range = [Event] + +containsObject.is_a = [ObjectProperty, TransitiveProperty, contains, isLocationOf] +containsObject.domain = [PhysicalObject] +containsObject.range = [PhysicalObject] + +isLocationOf.is_a = [ObjectProperty, associatedWith] +isLocationOf.domain = [Entity] +isLocationOf.range = [Entity] + +isInsideOf.is_a = [ObjectProperty, TransitiveProperty, isContainedIn, hasLocation] +isInsideOf.domain = [PhysicalObject] +isInsideOf.range = [PhysicalObject] + +coversObject.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, interactsWith] +coversObject.domain = [PhysicalObject] +coversObject.range = [PhysicalObject] + +interactsWith.is_a = [ObjectProperty, SymmetricProperty, associatedWith] +interactsWith.domain = [PhysicalObject] +interactsWith.range = [PhysicalObject] + +isCoveredByObject.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, interactsWith] +isCoveredByObject.domain = [PhysicalObject] +isCoveredByObject.range = [PhysicalObject] + +definesRole.is_a = [ObjectProperty, defines] +definesRole.domain = [Description] +definesRole.range = [Role] + +isBearerDefinedIn.is_a = [ObjectProperty, isRoleDefinedIn] +isBearerDefinedIn.domain = [Role] +isBearerDefinedIn.range = [Affordance] + +definesEventType.is_a = [ObjectProperty, defines] +definesEventType.domain = [Description] +definesEventType.range = [EventType] + +isEventTypeDefinedIn.is_a = [ObjectProperty, isDefinedIn] +isEventTypeDefinedIn.domain = [EventType] +isEventTypeDefinedIn.range = [Description] + +definesInput.is_a = [ObjectProperty, definesParticipant] +definesInput.domain = [Description] +definesInput.range = [Parameter | Role] + +definesParticipant.is_a = [ObjectProperty, defines] +definesParticipant.domain = [Description] +definesParticipant.range = [Concept] + +definesOutput.is_a = [ObjectProperty, definesParticipant] +definesOutput.domain = [Description] +definesOutput.range = [Parameter | Role] + +definesParameter.is_a = [ObjectProperty, defines] +definesParameter.domain = [Description] +definesParameter.range = [Parameter] + +isParameterDefinedIn.is_a = [ObjectProperty, isDefinedIn] +isParameterDefinedIn.domain = [Parameter] +isParameterDefinedIn.range = [Description] + +isPerformerDefinedIn.is_a = [ObjectProperty, isRoleDefinedIn] +isPerformerDefinedIn.domain = [Role] +isPerformerDefinedIn.range = [Description] + +definesProcess.is_a = [ObjectProperty, defines] +definesProcess.domain = [Description] +definesProcess.range = [ProcessType] + +isProcessDefinedIn.is_a = [ObjectProperty, isDefinedIn] +isProcessDefinedIn.domain = [ProcessType] +isProcessDefinedIn.range = [Description] + +isSetpointDefinedIn.is_a = [ObjectProperty, isParameterDefinedIn] +isSetpointDefinedIn.domain = [Setpoint] +isSetpointDefinedIn.range = [Description] + +isTriggerDefinedIn.is_a = [ObjectProperty, isRoleDefinedIn] +isTriggerDefinedIn.domain = [Role] +isTriggerDefinedIn.range = [Affordance] + +derivedFrom.is_a = [ObjectProperty, TransitiveProperty, associatedWith] +derivedFrom.domain = [InformationObject] +derivedFrom.range = [InformationObject] + +isSourceFor.is_a = [ObjectProperty, TransitiveProperty, associatedWith] +isSourceFor.domain = [InformationObject] +isSourceFor.range = [InformationObject] + +describesQuality.is_a = [ObjectProperty, describes] +describesQuality.domain = [Description] +describesQuality.range = [Quality] + +describes.is_a = [ObjectProperty, associatedWith] +describes.domain = [Description] +describes.range = [Entity] + +isQualityDescribedBy.is_a = [ObjectProperty, isDescribedBy] +isQualityDescribedBy.domain = [Quality] +isQualityDescribedBy.range = [Description] + +directlyCauses.is_a = [ObjectProperty, causes] +directlyCauses.domain = [Event] +directlyCauses.range = [Event] + +isDirectReactionTo.is_a = [ObjectProperty, isReactionTo] +isDirectReactionTo.domain = [Event] +isDirectReactionTo.range = [Event] + +hasTerminalScene.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, hasTerminalState] +hasTerminalScene.domain = [StateTransition] +hasTerminalScene.range = [Scene] + +includesEvent.is_a = [ObjectProperty, isSettingFor] +includesEvent.domain = [Situation] +includesEvent.range = [Event] + +directlyDerivedFrom.is_a = [ObjectProperty, derivedFrom] + +isDirectSourceFor.is_a = [ObjectProperty, isSourceFor] + +encapsulates.is_a = [ObjectProperty, associatedWith] +encapsulates.domain = [OrderedElement] +encapsulates.range = [Entity] + +encodes.is_a = [ObjectProperty, SymmetricProperty, associatedWith] +encodes.domain = [InformationObject] +encodes.range = [InformationObject] + +executesMotion.is_a = [ObjectProperty, isOccurrenceOf] +executesMotion.domain = [MotionProcess] +executesMotion.range = [Motion] + +isOccurrenceOf.is_a = [ObjectProperty, isClassifiedBy] +isOccurrenceOf.domain = [Event] +isOccurrenceOf.range = [EventType] + +isExecutedMotionIn.is_a = [ObjectProperty, isOccurringIn] +isExecutedMotionIn.domain = [Motion] +isExecutedMotionIn.range = [MotionProcess] + +finishedBy.is_a = [ObjectProperty, TransitiveProperty, coOccurs] +finishedBy.domain = [Event] +finishedBy.range = [Event] + +finishes.is_a = [ObjectProperty, TransitiveProperty, coOccurs] +finishes.domain = [Event] +finishes.range = [Event] + +firstMember.is_a = [ObjectProperty, hasMember] +firstMember.domain = [Collection] +firstMember.range = [Entity] + +hasMember.is_a = [ObjectProperty, associatedWith] +hasMember.domain = [Collection] +hasMember.range = [Entity] + +givesMeaningTo.is_a = [ObjectProperty, associatedWith] +givesMeaningTo.domain = [System] +givesMeaningTo.range = [InformationObject] + +isGivenMeaningBy.is_a = [ObjectProperty, associatedWith] +isGivenMeaningBy.domain = [InformationObject] +isGivenMeaningBy.range = [System] + +hasAction.is_a = [ObjectProperty, hasConstituent] +hasAction.domain = [Action] +hasAction.range = [Action] + +hasConstituent.is_a = [ObjectProperty, associatedWith] +hasConstituent.domain = [Entity] +hasConstituent.range = [Entity] + +hasAlterationResult.is_a = [ObjectProperty, hasRegion] +hasAlterationResult.domain = [Action] +hasAlterationResult.range = [Region] + +hasRegion.is_a = [ObjectProperty, associatedWith] +hasRegion.domain = [Entity] +hasRegion.range = [Region] + +isAlterationResultOf.is_a = [ObjectProperty, isRegionFor] +isAlterationResultOf.domain = [Region] +isAlterationResultOf.range = [Action] + +hasBinding.is_a = [ObjectProperty, hasPart] +hasBinding.domain = [Description] +hasBinding.range = [Binding] + +hasPart.is_a = [ObjectProperty, TransitiveProperty, ReflexiveProperty, associatedWith] +hasPart.domain = [Entity] +hasPart.range = [Entity] + +hasBindingFiller.is_a = [ObjectProperty, describes] +hasBindingFiller.domain = [Binding] +hasBindingFiller.range = [Entity] + +hasBindingRole.is_a = [ObjectProperty, hasPart] +hasBindingRole.domain = [Binding] +hasBindingRole.range = [Parameter | Role] + +hasChildLink.is_a = [ObjectProperty, hasConstituent] +hasChildLink.domain = [Joint] +hasChildLink.range = [PhysicalObject] + +isChildLinkOf.is_a = [ObjectProperty, isConstituentOf] +isChildLinkOf.domain = [PhysicalObject] +isChildLinkOf.range = [Joint] + +hasColor.is_a = [ObjectProperty, hasQuality] +hasColor.domain = [PhysicalObject] +hasColor.range = [Color] + +hasQuality.is_a = [ObjectProperty, associatedWith] +hasQuality.domain = [Entity] +hasQuality.range = [Quality] + +isColorOf.is_a = [ObjectProperty, isQualityOf] +isColorOf.domain = [Color] +isColorOf.range = [PhysicalObject] + +hasDisposition.is_a = [ObjectProperty, hasQuality] +hasDisposition.domain = [Object] +hasDisposition.range = [Disposition] + +isDispositionOf.is_a = [ObjectProperty, isQualityOf] +isDispositionOf.domain = [Disposition] +isDispositionOf.range = [Object] + +hasEndLink.is_a = [ObjectProperty, hasLink] +hasEndLink.domain = [PhysicalObject] +hasEndLink.range = [PhysicalObject] + +hasLink.is_a = [ObjectProperty, hasComponent] +hasLink.domain = [PhysicalObject] +hasLink.range = [PhysicalObject] + +isEndLinkOf.is_a = [ObjectProperty, isLinkOf] +isEndLinkOf.domain = [PhysicalObject] +isEndLinkOf.range = [PhysicalObject] + +hasExecutionState.is_a = [ObjectProperty, hasRegion] +hasExecutionState.domain = [Action] +hasExecutionState.range = [ExecutionStateRegion] + +hasFeature.is_a = [ObjectProperty, hasConstituent] +hasFeature.domain = [PhysicalObject] +hasFeature.range = [Feature] + +isFeatureOf.is_a = [ObjectProperty, isConstituentOf] +isFeatureOf.domain = [Feature] +isFeatureOf.range = [PhysicalObject] + +hasFirstStep.is_a = [ObjectProperty, hasStep] +hasFirstStep.domain = [Workflow] +hasFirstStep.range = [Task] + +hasStep.is_a = [ObjectProperty, definesTask] +hasStep.domain = [Workflow] +hasStep.range = [Task] + +isFirstStepOf.is_a = [ObjectProperty, isStepOf] +isFirstStepOf.domain = [Task] +isFirstStepOf.range = [Workflow] + +hasFrictionAttribute.is_a = [ObjectProperty, hasRegion] +hasFrictionAttribute.domain = [PhysicalObject] +hasFrictionAttribute.range = [FrictionAttribute] + +hasGoal.is_a = [ObjectProperty, isDescribedBy] +hasGoal.domain = [Entity] +hasGoal.range = [Goal] + +hasInitialScene.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, hasInitialState] +hasInitialScene.domain = [StateTransition] +hasInitialScene.range = [Scene] + +hasInitialState.is_a = [ObjectProperty, includesSituation] +hasInitialState.domain = [Transition] +hasInitialState.range = [Situation] + +isInitialSceneOf.is_a = [ObjectProperty, isInitialStateOf] +isInitialSceneOf.domain = [Scene] +isInitialSceneOf.range = [StateTransition] + +hasInitialSituation.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, hasInitialState] +hasInitialSituation.domain = [SituationTransition] +hasInitialSituation.range = [Situation, Not(NonmanifestedSituation)] + +isInitialSituationOf.is_a = [ObjectProperty, isInitialStateOf] +isInitialSituationOf.domain = [Situation] +isInitialSituationOf.range = [SituationTransition] + +includesSituation.is_a = [ObjectProperty, isSettingFor] +includesSituation.domain = [Situation] +includesSituation.range = [Situation] + +isInitialStateOf.is_a = [ObjectProperty, isSituationIncludedIn] +isInitialStateOf.domain = [Situation] +isInitialStateOf.range = [Transition] + +hasInputParameter.is_a = [ObjectProperty, hasParameter] +hasInputParameter.domain = [EventType] +hasInputParameter.range = [Parameter] + +hasParameter.is_a = [ObjectProperty, isRelatedToConcept] +hasParameter.domain = [Concept] +hasParameter.range = [Parameter] + +isInputParameterFor.is_a = [ObjectProperty, isParameterFor] +isInputParameterFor.domain = [Parameter] +isInputParameterFor.range = [EventType] + +hasJointLimit.is_a = [ObjectProperty, hasRegion] +hasJointLimit.domain = [Joint] +hasJointLimit.range = [JointLimit] + +isJointLimitOf.is_a = [ObjectProperty, isRegionFor] +isJointLimitOf.domain = [JointLimit] +isJointLimitOf.range = [Joint] + +hasJointState.is_a = [ObjectProperty, hasRegion] +hasJointState.domain = [Joint] +hasJointState.range = [JointState] + +isJointStateOf.is_a = [ObjectProperty, isRegionFor] +isJointStateOf.domain = [JointState] +isJointStateOf.range = [Joint] + +hasComponent.is_a = [ObjectProperty, AsymmetricProperty, hasProperPart] +hasComponent.domain = [Entity] +hasComponent.range = [Entity] + +isLinkOf.is_a = [ObjectProperty, isComponentOf] +isLinkOf.domain = [PhysicalObject] +isLinkOf.range = [PhysicalObject] + +hasLocalization.is_a = [ObjectProperty, hasQuality] +hasLocalization.domain = [PhysicalObject] +hasLocalization.range = [Localization] + +isLocalizationOf.is_a = [ObjectProperty, isQualityOf] +isLocalizationOf.domain = [Localization] +isLocalizationOf.range = [PhysicalObject] + +hasMassAttribute.is_a = [ObjectProperty, hasRegion] +hasMassAttribute.domain = [PhysicalObject] +hasMassAttribute.range = [MassAttribute] + +isMassAttributeOf.is_a = [ObjectProperty, isRegionFor] +isMassAttributeOf.domain = [MassAttribute] +isMassAttributeOf.range = [PhysicalObject] + +hasNetForce.is_a = [ObjectProperty, hasRegion] +hasNetForce.domain = [PhysicalObject] +hasNetForce.range = [NetForce] + +isNetForceOf.is_a = [ObjectProperty, isRegionFor] +isNetForceOf.domain = [NetForce] +isNetForceOf.range = [PhysicalObject] + +hasNextStep.is_a = [ObjectProperty, directlyPrecedes] +hasNextStep.domain = [Task] +hasNextStep.range = [Task] + +directlyPrecedes.is_a = [ObjectProperty, precedes] +directlyPrecedes.domain = [Entity] +directlyPrecedes.range = [Entity] + +hasPreviousStep.is_a = [ObjectProperty, directlyFollows] +hasPreviousStep.domain = [Task] +hasPreviousStep.range = [Task] + +hasOutputParameter.is_a = [ObjectProperty, hasParameter] +hasOutputParameter.domain = [EventType] +hasOutputParameter.range = [Parameter] + +isOutputParameterFor.is_a = [ObjectProperty, isParameterFor] +isOutputParameterFor.domain = [Parameter] +isOutputParameterFor.range = [EventType] + +hasParentLink.is_a = [ObjectProperty, hasConstituent] +hasParentLink.domain = [Joint] +hasParentLink.range = [PhysicalObject] + +isParentLinkOf.is_a = [ObjectProperty, isConstituentOf] +isParentLinkOf.domain = [PhysicalObject] +isParentLinkOf.range = [Joint] + +hasPhase.is_a = [ObjectProperty, hasConstituent] +hasPhase.domain = [Action | Process] +hasPhase.range = [State | Process] + +hasPhysicalComponent.is_a = [ObjectProperty, hasComponent] +hasPhysicalComponent.domain = [PhysicalObject] +hasPhysicalComponent.range = [PhysicalObject] + +hasPredecessor.is_a = [ObjectProperty, hasPart] +hasPredecessor.domain = [Succedence] +hasPredecessor.range = [Workflow] + +hasPreference.is_a = [ObjectProperty, hasQuality] +hasPreference.domain = [Agent] +hasPreference.range = [Preference] + +isPreferenceOf.is_a = [ObjectProperty, isQualityOf] +isPreferenceOf.domain = [Preference] +isPreferenceOf.range = [Agent] + +directlyFollows.is_a = [ObjectProperty, follows] +directlyFollows.domain = [Entity] +directlyFollows.range = [Entity] + +hasProcessType.is_a = [ObjectProperty, isRelatedToConcept] +hasProcessType.domain = [Role] +hasProcessType.range = [ProcessType] + +isRelatedToConcept.is_a = [ObjectProperty, SymmetricProperty, associatedWith] +isRelatedToConcept.domain = [Concept] +isRelatedToConcept.range = [Concept] + +isProcessTypeOf.is_a = [ObjectProperty, isRelatedToConcept] +isProcessTypeOf.domain = [ProcessType] +isProcessTypeOf.range = [Role] + +hasQuale.is_a = [ObjectProperty, hasRegion] +hasQuale.domain = [Quality] +hasQuale.range = [Region] + +isQualeOf.is_a = [ObjectProperty, isRegionFor] +isQualeOf.domain = [Region] +isQualeOf.range = [Quality] + +hasRootLink.is_a = [ObjectProperty, hasLink] +hasRootLink.domain = [PhysicalObject] +hasRootLink.range = [PhysicalObject] + +isRootLinkOf.is_a = [ObjectProperty, isLinkOf] +isRootLinkOf.domain = [PhysicalObject] +isRootLinkOf.range = [PhysicalObject] + +hasShape.is_a = [ObjectProperty, hasQuality] +hasShape.domain = [PhysicalObject] +hasShape.range = [Shape] + +isShapeOf.is_a = [ObjectProperty, isQualityOf] +isShapeOf.domain = [Shape] +isShapeOf.range = [PhysicalObject] + +hasShapeRegion.is_a = [ObjectProperty, hasRegion] +hasShapeRegion.domain = [Shape | PhysicalObject] +hasShapeRegion.range = [ShapeRegion] + +isShapeRegionOf.is_a = [ObjectProperty, isRegionFor] +isShapeRegionOf.domain = [ShapeRegion] +isShapeRegionOf.range = [Shape | PhysicalObject] + +hasSoftwareAgent.is_a = [ObjectProperty, involvesAgent] +hasSoftwareAgent.domain = [Event] +hasSoftwareAgent.range = [SoftwareInstance] + +involvesAgent.is_a = [ObjectProperty, hasParticipant] +involvesAgent.domain = [Event] +involvesAgent.range = [Agent] + +hasSpaceRegion.is_a = [ObjectProperty, hasRegion] +hasSpaceRegion.domain = [Localization | ShapeRegion | PhysicalObject] +hasSpaceRegion.range = [SpaceRegion] + +isSpaceRegionFor.is_a = [ObjectProperty, isRegionFor] +isSpaceRegionFor.domain = [SpaceRegion] +isSpaceRegionFor.range = [Localization | PhysicalObject] + +hasStateType.is_a = [ObjectProperty, isRelatedToConcept] +hasStateType.domain = [Role] +hasStateType.range = [StateType] + +isStateTypeOf.is_a = [ObjectProperty, isRelatedToConcept] +isStateTypeOf.domain = [StateType] +isStateTypeOf.range = [Role] + +hasStatus.is_a = [ObjectProperty, hasQuality] + +isStepOf.is_a = [ObjectProperty, isTaskDefinedIn] +isStepOf.domain = [Task] +isStepOf.range = [Workflow] + +hasSuccedence.is_a = [ObjectProperty, hasPart] +hasSuccedence.domain = [Workflow] +hasSuccedence.range = [Succedence] + +hasSuccessor.is_a = [ObjectProperty, hasPart] +hasSuccessor.domain = [Succedence] +hasSuccessor.range = [Workflow] + +hasTask.is_a = [ObjectProperty, hasPart] +hasTask.domain = [Relation | Workflow] +hasTask.range = [Task] + +hasTerminalState.is_a = [ObjectProperty, includesSituation] +hasTerminalState.domain = [Transition] +hasTerminalState.range = [Situation] + +isTerminalSceneOf.is_a = [ObjectProperty, isTerminalStateOf] +isTerminalSceneOf.domain = [Scene] +isTerminalSceneOf.range = [StateTransition] + +hasTerminalSituation.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, hasTerminalState] +hasTerminalSituation.domain = [SituationTransition] +hasTerminalSituation.range = [Situation, Not(NonmanifestedSituation)] + +isTerminalSituationOf.is_a = [ObjectProperty, isTerminalStateOf] +isTerminalSituationOf.domain = [Situation] +isTerminalSituationOf.range = [SituationTransition] + +isTerminalStateOf.is_a = [ObjectProperty, isSituationIncludedIn] +isTerminalStateOf.domain = [Situation] +isTerminalStateOf.range = [Transition] + +includesConcept.is_a = [ObjectProperty, includesObject] +includesConcept.domain = [Situation] +includesConcept.range = [Concept] + +includesObject.is_a = [ObjectProperty, isSettingFor] +includesObject.domain = [Situation] +includesObject.range = [Object] + +isConceptIncludedIn.is_a = [ObjectProperty, isObjectIncludedIn] +isConceptIncludedIn.domain = [Concept] +isConceptIncludedIn.range = [Situation] + +includesRecord.is_a = [ObjectProperty, isReferenceOf] +includesRecord.domain = [Event] +includesRecord.range = [InformationObject] + +isReferenceOf.is_a = [ObjectProperty, associatedWith] +isReferenceOf.domain = [Entity] +isReferenceOf.range = [InformationObject] + +isRecordIncludedBy.is_a = [ObjectProperty, isAbout] +isRecordIncludedBy.domain = [InformationObject] +isRecordIncludedBy.range = [Event] + +isSettingFor.is_a = [ObjectProperty, associatedWith] +isSettingFor.domain = [Situation] +isSettingFor.range = [Entity] + +isSituationIncludedIn.is_a = [ObjectProperty, hasSetting] +isSituationIncludedIn.domain = [Situation] +isSituationIncludedIn.range = [Situation] + +involvesArtifact.is_a = [ObjectProperty, hasParticipant] +involvesArtifact.domain = [Event] +involvesArtifact.range = [PhysicalArtifact] + +hasParticipant.is_a = [ObjectProperty, associatedWith] +hasParticipant.domain = [Event] +hasParticipant.range = [Object] + +isArtifactInvolvedIn.is_a = [ObjectProperty, isParticipantIn] +isArtifactInvolvedIn.domain = [PhysicalArtifact] +isArtifactInvolvedIn.range = [Event] + +involvesEffector.is_a = [ObjectProperty, hasParticipant] +involvesEffector.domain = [Event] +involvesEffector.range = [PhysicalEffector] + +isEffectorInvolvedIn.is_a = [ObjectProperty, isParticipantIn] +isEffectorInvolvedIn.domain = [PhysicalEffector] +isEffectorInvolvedIn.range = [Event] + +involvesPlace.is_a = [ObjectProperty, hasParticipant] +involvesPlace.domain = [Event] +involvesPlace.range = [PhysicalPlace] + +isPlaceInvolvedIn.is_a = [ObjectProperty, isParticipantIn] +isPlaceInvolvedIn.domain = [PhysicalPlace] +isPlaceInvolvedIn.range = [Event] + +isRegionFor.is_a = [ObjectProperty, associatedWith] +isRegionFor.domain = [Region] +isRegionFor.range = [Entity] + +isAnsweredBy.is_a = [ObjectProperty, involvesAgent] +isAnsweredBy.domain = [Event] +isAnsweredBy.range = [Agent] + +isParticipantIn.is_a = [ObjectProperty, associatedWith] +isParticipantIn.domain = [Object] +isParticipantIn.range = [Event] + +isAskedBy.is_a = [ObjectProperty, involvesAgent] +isAskedBy.domain = [QueryingTask] +isAskedBy.range = [Agent] + +isRoleDefinedIn.is_a = [ObjectProperty, isDefinedIn] +isRoleDefinedIn.domain = [Role] +isRoleDefinedIn.range = [Description] + +isConstituentOf.is_a = [ObjectProperty, associatedWith] +isConstituentOf.domain = [Entity] +isConstituentOf.range = [Entity] + +isQualityOf.is_a = [ObjectProperty, associatedWith] +isQualityOf.domain = [Quality] +isQualityOf.range = [Entity] + +isObjectIncludedIn.is_a = [ObjectProperty, hasSetting] +isObjectIncludedIn.domain = [Object] +isObjectIncludedIn.range = [Situation] + +isCreatedOutputOf.is_a = [ObjectProperty, isOutputRoleOf] +isCreatedOutputOf.domain = [Role] +isCreatedOutputOf.range = [Task] + +isOutputRoleOf.is_a = [ObjectProperty, hasTask] +isOutputRoleOf.domain = [Role] +isOutputRoleOf.range = [Task] + +isTaskOfCreatedRole.is_a = [ObjectProperty, isTaskOfOutputRole] +isTaskOfCreatedRole.domain = [Task] +isTaskOfCreatedRole.range = [Role] + +isDefinedIn.is_a = [ObjectProperty, isConceptUsedIn] +isDefinedIn.domain = [Concept] +isDefinedIn.range = [Description] + +isDepositOf.is_a = [ObjectProperty, isLocationOf] +isDepositOf.domain = [PhysicalObject] +isDepositOf.range = [PhysicalObject] + +isOntopOf.is_a = [ObjectProperty, hasLocation] +isOntopOf.domain = [PhysicalObject] +isOntopOf.range = [PhysicalObject] + +isDesignFor.is_a = [ObjectProperty, describes] +isDesignFor.domain = [Design] +isDesignFor.range = [Object] + +isDesignedBy.is_a = [ObjectProperty, isDescribedBy] +isDesignedBy.domain = [Object] +isDesignedBy.range = [Design] + +isRealizedBy.is_a = [ObjectProperty, associatedWith] +isRealizedBy.domain = [InformationObject] +isRealizedBy.range = [InformationRealization] + +hasRole.is_a = [ObjectProperty, isClassifiedBy] +hasRole.domain = [Object] +hasRole.range = [Role] + +isInputRoleOf.is_a = [ObjectProperty, hasTask] +isInputRoleOf.domain = [Role] +isInputRoleOf.range = [Task] + +isRoleOf.is_a = [ObjectProperty, classifies] +isRoleOf.domain = [Role] +isRoleOf.range = [Object] + +realizes.is_a = [ObjectProperty, associatedWith] +realizes.domain = [InformationRealization] +realizes.range = [InformationObject] + +isOccurringIn.is_a = [ObjectProperty, classifies] +isOccurringIn.domain = [EventType] +isOccurringIn.range = [Event] + +isExecutorDefinedIn.is_a = [ObjectProperty] + +isParameterFor.is_a = [ObjectProperty, isRelatedToConcept] +isParameterFor.domain = [Parameter] +isParameterFor.range = [Concept] + +hasTask.is_a = [ObjectProperty, isRelatedToConcept] +hasTask.domain = [Role] +hasTask.range = [Task] + +isTaskOfInputRole.is_a = [ObjectProperty, isTaskOf] +isTaskOfInputRole.domain = [Task] +isTaskOfInputRole.range = [Role] + +hasLocation.is_a = [ObjectProperty, associatedWith] +hasLocation.domain = [Entity] +hasLocation.range = [Entity] + +isComponentOf.is_a = [ObjectProperty, AsymmetricProperty, isPropertPartOf] +isComponentOf.domain = [Entity] +isComponentOf.range = [Entity] + +isLinkedTo.is_a = [ObjectProperty, SymmetricProperty, hasLocation] +isLinkedTo.domain = [PhysicalObject] +isLinkedTo.range = [PhysicalObject] + +isMotionDescriptionFor.is_a = [ObjectProperty, describes] +isMotionDescriptionFor.domain = [MotionDescription] +isMotionDescriptionFor.range = [Motion] + +isMovedByAgent.is_a = [ObjectProperty, interactsWith] +isMovedByAgent.domain = [PhysicalObject] +isMovedByAgent.range = [Agent] + +movesObject.is_a = [ObjectProperty, interactsWith] +movesObject.domain = [Agent] +movesObject.range = [PhysicalObject] + +isClassifiedBy.is_a = [ObjectProperty, associatedWith] +isClassifiedBy.domain = [Entity] +isClassifiedBy.range = [Concept] + +classifies.is_a = [ObjectProperty, associatedWith] +classifies.domain = [Concept] +classifies.range = [Entity] + +isOrderedBy.is_a = [ObjectProperty, associatedWith] +isOrderedBy.domain = [OrderedElement] +isOrderedBy.range = [Order] + +orders.is_a = [ObjectProperty, associatedWith] +orders.domain = [Order] +orders.range = [OrderedElement] + +isTaskOfOutputRole.is_a = [ObjectProperty, isTaskOf] +isTaskOfOutputRole.domain = [Task] +isTaskOfOutputRole.range = [Role] + +isPerformedBy.is_a = [ObjectProperty, involvesAgent] +isPerformedBy.domain = [Action] +isPerformedBy.range = [Agent] + +isPhysicallyContainedIn.is_a = [ObjectProperty, isLocationOf] +isPhysicallyContainedIn.domain = [Entity] +isPhysicallyContainedIn.range = [Entity] + +isPlanFor.is_a = [ObjectProperty, describes] +isPlanFor.domain = [Plan] +isPlanFor.range = [Task] + +isAbout.is_a = [ObjectProperty, associatedWith] +isAbout.domain = [InformationObject] +isAbout.range = [Entity] + +isReplacedBy.is_a = [ObjectProperty, before] +isReplacedBy.domain = [State] +isReplacedBy.range = [State] + +replaces.is_a = [ObjectProperty, after] +replaces.domain = [State] +replaces.range = [State] + +hasSetting.is_a = [ObjectProperty, associatedWith] +hasSetting.domain = [Entity] +hasSetting.range = [Situation] + +isTaskDefinedIn.is_a = [ObjectProperty, isDefinedIn] +isTaskDefinedIn.domain = [Task] +isTaskDefinedIn.range = [Description] + +isSupportedBy.is_a = [ObjectProperty, interactsWith, hasCommonBoundary] +isSupportedBy.domain = [Entity] +isSupportedBy.range = [Entity] + +hasCommonBoundary.is_a = [ObjectProperty, SymmetricProperty, associatedWith] +hasCommonBoundary.domain = [Entity] +hasCommonBoundary.range = [Entity] + +supports.is_a = [ObjectProperty, interactsWith, hasCommonBoundary] +supports.domain = [Entity] +supports.range = [Entity] + +isTaskOf.is_a = [ObjectProperty, isRelatedToConcept] +isTaskOf.domain = [Task] +isTaskOf.range = [Role] + +isTerminatedBy.is_a = [ObjectProperty, associatedWith] +isTerminatedBy.domain = [Event] +isTerminatedBy.range = [Event] + +terminates.is_a = [ObjectProperty, associatedWith] +terminates.domain = [Event] +terminates.range = [Event] + +meets.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, directlyPrecedes] +meets.domain = [Entity] +meets.range = [Entity] + +metBy.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, directlyFollows] +metBy.domain = [Entity] +metBy.range = [Entity] + +overlappedBy.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, overlaps] +overlappedBy.domain = [Entity] +overlappedBy.range = [Entity] + +overlappedOn.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, overlaps] +overlappedOn.domain = [Entity] +overlappedOn.range = [Entity] + +simultaneous.is_a = [ObjectProperty, SymmetricProperty, TransitiveProperty, coOccurs] +simultaneous.domain = [Event] +simultaneous.range = [Event] + +startedBy.is_a = [ObjectProperty, TransitiveProperty, coOccurs] +startedBy.domain = [Event] +startedBy.range = [Event] + +starts.is_a = [ObjectProperty, TransitiveProperty, coOccurs] +starts.domain = [Event] +starts.range = [Event] + +transitionsBack.is_a = [ObjectProperty, transitionsFrom, transitionsTo] +transitionsBack.domain = [Transient] +transitionsBack.range = [Object] + +transitionsFrom.is_a = [ObjectProperty, hasCommonBoundary] +transitionsFrom.domain = [Transient] +transitionsFrom.range = [Object] + +transitionsTo.is_a = [ObjectProperty, hasCommonBoundary] +transitionsTo.domain = [Transient] +transitionsTo.range = [Object] + +hasExpectedTerminalSituation.is_a = [ObjectProperty, hasTerminalSituation, hasPostcondition] +hasExpectedTerminalSituation.domain = [SituationTransition] +hasExpectedTerminalSituation.range = [Situation] + +hasPostcondition.is_a = [ObjectProperty, directlyPrecedes] +hasPostcondition.domain = [Event | Situation] +hasPostcondition.range = [Event | Situation] + +hasRequiredInitialSituation.is_a = [ObjectProperty, hasInitialSituation, hasPrecondition] +hasRequiredInitialSituation.domain = [SituationTransition] +hasRequiredInitialSituation.range = [Situation] + +hasPrecondition.is_a = [ObjectProperty, directlyFollows] +hasPrecondition.domain = [Event | Situation] +hasPrecondition.range = [Event | Situation] + +manifestsIn.is_a = [ObjectProperty, includesEvent] + +preventedBy.is_a = [ObjectProperty, hasSetting] +preventedBy.domain = [Situation] +preventedBy.range = [Situation] + +prevents.is_a = [ObjectProperty, isSettingFor] +prevents.domain = [Situation] +prevents.range = [Situation] + +actsFor.is_a = [ObjectProperty, associatedWith] +actsFor.domain = [Agent] +actsFor.range = [SocialAgent] + +executesTask.is_a = [ObjectProperty, isClassifiedBy] +executesTask.domain = [Action] +executesTask.range = [Task] + +expresses.is_a = [ObjectProperty, associatedWith] +expresses.domain = [InformationObject] +expresses.range = [SocialObject] + +isExecutedIn.is_a = [ObjectProperty, classifies] +isExecutedIn.domain = [Task] +isExecutedIn.range = [Action] + +isExpressedBy.is_a = [ObjectProperty, associatedWith] +isExpressedBy.domain = [SocialObject] +isExpressedBy.range = [InformationObject] + +isPartOf.is_a = [ObjectProperty, TransitiveProperty, ReflexiveProperty, associatedWith] +isPartOf.domain = [Entity] +isPartOf.range = [Entity] + +satisfies.is_a = [ObjectProperty, associatedWith] +satisfies.domain = [Situation] +satisfies.range = [Description] + + + + diff --git a/src/pycrap/ontology.py b/src/pycrap/ontology.py index c75be7b91..5e36960ad 100644 --- a/src/pycrap/ontology.py +++ b/src/pycrap/ontology.py @@ -1,9 +1,7 @@ import tempfile import owlready2 -from typing_extensions import Dict, Any, Type - -from .base import default_pycrap_ontology, Base +from typing_extensions import Dict, Any class Ontology: diff --git a/src/pycrap/parser.py b/src/pycrap/parser.py index b64a90579..d8a19e5c6 100644 --- a/src/pycrap/parser.py +++ b/src/pycrap/parser.py @@ -1,9 +1,10 @@ +import shutil from os import mkdir import networkx as nx import owlready2 import tqdm -from owlready2 import ThingClass, PropertyClass +from owlready2 import ThingClass, PropertyClass, get_ontology from owlready2.base import * from typing_extensions import List, Any @@ -26,20 +27,101 @@ def to_camel_case(string: str) -> str: """ return ''.join(x for x in string.title() if not x.isspace()) -class OntologyParser: +def replace_types(string: str) -> str: + """ + Replace the types in a string with python types + + Example: + >>> replace_types("array_double__") + "float__int" + + :param string: The string to convert + :return: The string with the types replaced + """ + if "-" in str(string): + string = str(string).replace("-", "") + if "array_double" in str(string): + string = str(string).replace("array_double", "float") + if "" in str(string): + string = str(string).replace("", "int") + if "" in str(string): + string = str(string).replace("", "str") + if "" in str(string): + string = str(string).replace("", "normstr") + if "" in str(string): + string = str(string).replace("", "float") + return string + +class AbstractParser: + """ + An abstract class for parsing + """ + + current_file: Any + """ + The current file where contents are written into. + """ + + indentation: int + """ + The indentation to use for the python file. + """ + + file_extension: str = ".py" + """ + The file extension for the python file. + """ + + path: str + """ + The path to write the files of the parsed ontology into. + """ + + + + def __init__(self, path, indentation: int = 4): + self.path = path + self.indentation = indentation + + def apply_indent_to(self, string): + """ + Indent a statement at the beginning of every new line. + + :param string: The statement. + :return: The indented string. + """ + return " " * self.indentation + string.replace('\n', '\n' + ' ' * self.indentation) + + def path_for_file(self, file_name): + """ + Generate the path for a file. + + Example: + >>> parser = AbstractParser("/tmp") + >>> parser.path_for_file("base") + "/tmp/base.py" + + :param file_name: The file name. + :return: The path to the file. + """ + return f"{os.path.join(self.path, file_name)}{self.file_extension}" + + + +class OntologyParser(AbstractParser): """ A class that parses everything from an owlready2 compatible ontology into python files that represent the same ontology. It will create several files in a directory specified by the constructor: - - base: A file that contains an intermediate based class and temporary ontology definitions such that a user - can configure it at the end of the process. + - dependencies: A file that the imports from other packages/modules that are needed to define this ontology. - classes: A file that contains all classes from the ontology without any restrictions. - object_properties: A file the contains all object properties from the ontology without any restrictions. - data_properties: A file the contains all data properties from the ontology without any restrictions. - restrictions: The restrictions for all classes and properties. - - individuals: All indivduals with the resepctive properties from the ontology. - - __init__.py: A package initialization that loads the content of all files. + - individuals: All individuals with the respective properties from the ontology. + - __init__.py: A package initialization that loads the content of all files and hence sets the restrictions + and so on. TODO: Labels metadata and SWRL is not parsed """ @@ -49,16 +131,6 @@ class OntologyParser: The ontology to parse. """ - path: str - """ - The path to write the files of the parsed ontology into. - """ - - base_file_name: str = "base" - """ - The file name where the base classes are written to. - """ - classes_file_name: str = "classes" """ The file name where all elements from ontology.classes() are written to. @@ -70,29 +142,35 @@ class OntologyParser: """ data_properties_file_name: str = "data_properties" + """ + The file name where all elements from ontology.data_properties() are written to. + """ restrictions_file_name: str = "restrictions" + """ + The file name where all restrictions are written to. + """ individuals_file_name: str = "individuals" + """ + The file name where all individuals are written to. + """ - file_extension: str = ".py" - - indentation = 4 + dependencies_file_name: str = "dependencies" """ - The indentation to use for the python file. + The file name where all dependencies are written to. """ - current_file: Any + dependencies: List[owlready2.Ontology] """ - The current file where definitions are written into. + The other ontologies that have to be imported. """ - def __init__(self, ontology: owlready2.Ontology, path: str): + def __init__(self, ontology: owlready2.Ontology, dependencies: List[owlready2.Ontology], path: str, + indentation: int = 4): + super().__init__(path, indentation) self.ontology = ontology - self.path = path - render_func_without_namespace = lambda entity: entity.name - owlready2.set_render_func(render_func_without_namespace) - + self.dependencies = dependencies def digit_to_string(self, cls): # Mapping of digits to words @@ -106,11 +184,11 @@ def digit_to_string(self, cls): return converted_name - def parse(self, additional_imports=None): + def parse(self): """ Parses the ontology into a python file. """ - self.create_base(additional_imports) + self.create_dependencies() self.create_classes() self.create_object_properties() self.create_data_properties() @@ -119,50 +197,35 @@ def parse(self, additional_imports=None): # create swrl rules self.create_init() + def create_dependencies(self): + self.current_file = open(self.path_for_file(self.dependencies_file_name), "w") + self.current_file.write("from ..base import *\n") + for dependency in self.dependencies: + self.current_file.write(f"from ..{to_snake_case(dependency.name)} import *\n") + self.current_file.close() + def create_init(self): """ Create the __init__.py """ self.current_file = open(self.path_for_file("__init__"), "w") - self.import_from_classes() - self.import_from_properties() + self.import_classes() + self.import_properties() self.import_individuals() self.current_file.close() - def create_base(self, additional_imports=None): + def import_dependencies(self): """ - Create the base.py - """ - self.current_file = open(self.path_for_file(self.base_file_name), "w") - self.create_base_imports(additional_imports) - self.current_file.write("\n" * 2) - self.current_file.write("ontology_file = tempfile.NamedTemporaryFile()\n") - self.current_file.write('ontology = owlready2.get_ontology("file://" + ontology_file.name).load()\n') - self.current_file.write("\n" * 2) - self.create_base_class() - self.create_base_property() - self.current_file.close() - - def path_for_file(self, file_name): + Import from the dependencies. """ - Generate the path for a file. - - Example: - >>> parser = OntologyParser(ontology, "/tmp") - >>> parser.path_for_file("base") - "/tmp/base.py" - - :param file_name: The file name. - :return: The path to the file. - """ - return f"{os.path.join(self.path, file_name)}{self.file_extension}" + self.current_file.write(f"from .{self.dependencies_file_name} import *\n") def create_classes(self): """ Create the classes.py """ self.current_file = open(self.path_for_file(self.classes_file_name), "w") - self.import_from_base() + self.import_dependencies() self.current_file.write("\n" * 2) classes = list(self.ontology.classes()) for cls in tqdm.tqdm(classes, desc="Parsing classes"): @@ -174,7 +237,7 @@ def create_object_properties(self): Create the object_properties.py """ self.current_file = open(self.path_for_file(self.object_properties_file_name), "w") - self.import_from_base() + self.import_dependencies() self.current_file.write("\n" * 2) properties = list(self.ontology.object_properties()) for prop in tqdm.tqdm(properties, desc="Parsing object properties"): @@ -186,8 +249,8 @@ def create_data_properties(self): Create the data_properties.py """ self.current_file = open(self.path_for_file(self.data_properties_file_name), "w") - self.import_from_base() - self.import_from_classes() + self.import_dependencies() + self.import_classes() self.current_file.write("\n" * 2) properties = list(self.ontology.data_properties()) for prop in tqdm.tqdm(properties, desc="Parsing data properties"): @@ -199,7 +262,8 @@ def create_restrictions(self): Create the restrictions.py """ self.current_file = open(self.path_for_file(self.restrictions_file_name), "w") - self.import_from_classes() + self.import_dependencies() + self.import_classes() self.import_individuals() self.current_file.write("\n" * 2) @@ -243,19 +307,7 @@ def parse_restrictions_for_class(self, cls: ThingClass): # write is_a restrictions is_a = self.parse_elements(cls.is_a) if is_a: - if "-" in str(is_a): - is_a = str(is_a).replace("-","") - if "array_double" in str(is_a): - is_a = str(is_a).replace("array_double","float") - if "" in str(is_a): - is_a = str(is_a).replace("", "int") - if "" in str(is_a): - is_a = str(is_a).replace("", "str") - if "" in str(is_a): - is_a = str(is_a).replace("", "normstr") - if "" in str(is_a): - is_a = str(is_a).replace("", "float") - is_a = f"{repr(cls)}.is_a = [{is_a}]" + is_a = f"{repr(cls)}.is_a = [{replace_types(str(is_a))}]" self.current_file.write(is_a) self.current_file.write("\n") @@ -292,21 +344,7 @@ def parse_restrictions_for_property(self, prop): # write range restrictions range_string = self.parse_elements(prop.range) if range_string: - if "" in str(range_string): - range_string = str(range_string).replace("", "int") - if "" in str(range_string): - range_string = str(range_string).replace("", "str") - if "" in str(range_string): - range_string = str(range_string).replace("", "normstr") - if "" in str(range_string): - range_string = str(range_string).replace("", "float") - if "array_double" in str(range_string): - range_string = str(range_string).replace("array_double","float") - if "" in str(range_string): - range_string = str(range_string).replace("", "datetime") - - - range_string = f"{repr(prop)}.range = [{range_string}]" + range_string = f"{repr(prop)}.range = [{replace_types(str(range_string))}]" self.current_file.write(range_string) self.current_file.write("\n") @@ -315,9 +353,9 @@ def create_individuals(self): Create all individuals of the ontology. """ self.current_file = open(f"{os.path.join(self.path, self.individuals_file_name)}{self.file_extension}", "w") - self.import_from_base() - self.import_from_classes() - self.import_from_properties() + self.import_dependencies() + self.import_classes() + self.import_properties() self.current_file.write("\n" * 2) individuals = list(self.ontology.individuals()) @@ -347,53 +385,19 @@ def parse_individual_properties(self, individual: owlready2.Thing): self.current_file.write(f"{individual.name}.{repr(prop)} = {individual.__getattr__(repr(prop))}") self.current_file.write("\n") - def create_base_imports(self, additional_imports=None): - """ - Create the imports for the base.py - """ - self.current_file.write("from owlready2 import *\n") - self.current_file.write("import tempfile\n") - - # Additional imports for other ontologies - if additional_imports: - for import_path in additional_imports: - self.current_file.write(f"from {import_path} import *\n") - - def import_from_base(self): - """ - Create the import statement to get everything from the base.py - """ - self.current_file.write("from .base import *\n") - - def import_from_classes(self): + def import_classes(self): """ Create the import statement to get everything from the classes.py """ self.current_file.write("from .classes import *\n") - def import_from_properties(self): + def import_properties(self): """ Create the import statement to get everything from the properties """ self.current_file.write("from .object_properties import *\n") self.current_file.write("from .data_properties import *\n") - def create_base_class(self): - """ - Create the base class for concepts. - """ - self.current_file.write("class Base(Thing):\n") - self.current_file.write(self.apply_indent_to("namespace = ontology")) - self.current_file.write("\n" * 3) - - def create_base_property(self): - """ - Create the base class for properties. - """ - self.current_file.write("class BaseProperty(ObjectProperty):\n") - self.current_file.write(self.apply_indent_to("namespace = ontology")) - self.current_file.write("\n" * 3) - def apply_indent_to(self, string): """ Indent a statement at the beginning of every new line. @@ -470,8 +474,6 @@ def write_is_a(self, cls): self.current_file.write(is_a) self.current_file.write("\n") - - # TODO: Decide upon a better solution for the hyphen symbol def parse_class(self, cls): """ @@ -503,7 +505,7 @@ def parse_property(self, prop): self.current_file.write("\n") -class OntologiesParser: +class OntologiesParser(AbstractParser): """ Class that parses multiple ontologies at once. @@ -528,11 +530,6 @@ class OntologiesParser: The ontologies to parse. """ - path: str - """ - The path to write the packages of the parsed ontology into. - """ - include_imported_ontologies = True """ If True, the imported ontologies are also parsed. @@ -543,18 +540,71 @@ class OntologiesParser: The dependency graph of the ontologies. """ - def __init__(self, ontologies: List[owlready2.Ontology], path: str): + base_file_name: str = "base" + """ + The file name where the base classes are written to. + """ + + clear_existing: bool = True + """ + If True, the existing directories are cleared. + """ + + def __init__(self, ontologies: List[owlready2.Ontology], path: str, indentation: int = 4): + + render_func_without_namespace = lambda entity: entity.name + owlready2.set_render_func(render_func_without_namespace) + + super().__init__(path, indentation) self.ontologies = ontologies - self.path = path if self.include_imported_ontologies: self.ontologies += [imported for onto in self.ontologies for imported in onto.imported_ontologies] # make ontologies unique self.ontologies = list(set(self.ontologies)) - + self.ontologies.sort(key=lambda onto: onto.name) self.create_dependency_graph() + + def create_base(self): + """ + Create the base file + """ + self.current_file = open(self.path_for_file(self.base_file_name), "w") + self.current_file.write("from owlready2 import *\n") + self.current_file.write("import tempfile\n") + self.current_file.write("\n" * 2) + self.current_file.write("ontology_file = tempfile.NamedTemporaryFile()\n") + self.current_file.write('ontology = owlready2.get_ontology("file://" + ontology_file.name).load()\n') + self.current_file.write("\n" * 2) + self.create_base_class() + self.create_base_property() + self.current_file.close() + + def create_base_class(self): + """ + Create the base class for concepts. + """ + self.current_file.write("class Base(Thing):\n") + self.current_file.write(self.apply_indent_to("namespace = ontology")) + self.current_file.write("\n" * 3) + + def create_base_property(self): + """ + Create the base class for properties. + """ + self.current_file.write("class BaseProperty(ObjectProperty):\n") + self.current_file.write(self.apply_indent_to("namespace = ontology")) + self.current_file.write("\n" * 3) + + def destroy_all_ontologies(self): + """ + Destroy all ontologies. + """ + for onto in self.ontologies: + onto.destroy() + def create_dependency_graph(self): """ Create the dependency graph of the ontologies. @@ -565,40 +615,37 @@ def create_dependency_graph(self): for imported in onto.imported_ontologies: self.dependency_graph.add_edge(imported, onto) + def parse(self): + self.create_base() + self.create_ontologies() - - # def create_ontologies(self): - # for onto in nx.topological_sort(self.dependency_graph): - # mkdir(os.path.join(self.path, to_snake_case(onto.name))) - # print(to_snake_case(onto.name)) - # parser = OntologyParser(onto, os.path.join(self.path, to_snake_case(onto.name))) - # # Determine which ontologies depend on this one - # dependents = [to_snake_case(dep.name) for dep in self.dependency_graph.successors(onto)] - # additional_imports = [f"..{dep}" for dep in dependents] - # - # # Parse the ontology, passing its dependents for imports - # parser.parse(additional_imports) + def create_init(self): + """ + Create the __init__.py + """ + self.current_file = open(self.path_for_file("__init__"), "w") + self.current_file.write("from .base import *\n") + for onto in self.ontologies: + self.current_file.write(f"from .{to_snake_case(onto.name)} import *\n") + self.current_file.close() def create_ontologies(self): - for node, successors in self.dependency_graph.adjacency(): - print(f"{node.name}: {[succ.name for succ in successors]}") + self.destroy_all_ontologies() + if self.clear_existing: + for onto in self.ontologies: + ontology_path = os.path.join(self.path, to_snake_case(onto.name)) + if os.path.exists(ontology_path): + shutil.rmtree(ontology_path) - self.dependency_graph = nx.reverse(self.dependency_graph, copy=True) for onto in nx.topological_sort(self.dependency_graph): - + loaded_onto: owlready2.Ontology = get_ontology(onto.base_iri).load() # Create the directory for the ontology - ontology_path = os.path.join(self.path, to_snake_case(onto.name)) + ontology_path = os.path.join(self.path, to_snake_case(loaded_onto.name)) mkdir(ontology_path) # Parse the ontology - parser = OntologyParser(onto, ontology_path) - - # Determine which ontologies depend on this one - dependents = [to_snake_case(dep.name) for dep in self.dependency_graph.successors(onto)] - print(f"Dependents of {onto.name}: {dependents}") - - additional_imports = [f"..{dep}" for dep in dependents] - print(f"Imports added to {onto.name}: {additional_imports}") + parser = OntologyParser(loaded_onto, list(self.dependency_graph.predecessors(onto)), ontology_path) + parser.parse() - # Parse the ontology, passing its dependents for imports - parser.parse(additional_imports) \ No newline at end of file + # Create the __init__.py + self.create_init() \ No newline at end of file diff --git a/src/pycrap/urdf.py b/src/pycrap/urdf.py deleted file mode 100644 index 6dd977dbe..000000000 --- a/src/pycrap/urdf.py +++ /dev/null @@ -1,19 +0,0 @@ -from .base import Base - - -class Link(Base): - """ - A link is a basic element of the URDF. - """ - - -class Joint(Base): - """ - A joint is an element of a URDF that connects two links. - """ - - -class FixedJoint(Joint): - """ - A fixed joint is a joint that does not allow any movement. - """ \ No newline at end of file diff --git a/test/test_pycrap/test_parser.py b/test/test_pycrap/test_parser.py index b0c1919c9..e9ea46190 100644 --- a/test/test_pycrap/test_parser.py +++ b/test/test_pycrap/test_parser.py @@ -9,22 +9,14 @@ from pycrap.parser import OntologyParser, OntologiesParser -class OntologyParserTestCase(unittest.TestCase): + +class OntologiesParserTestCase(unittest.TestCase): @classmethod def setUpClass(cls): - # cls.onto = get_ontology("https://raw.githubusercontent.com/sorinar329/CuttingFood/refs/heads/main/owl/food_cutting.owl").load() - # cls.onto = get_ontology("http://protege.stanford.edu/ontologies/pizza/pizza.owl").load() - cls.onto = get_ontology("http://www.ease-crc.org/ont/SOMA.owl").load() - # - # pizza = cls.onto.get_namespace("http://www.co-ode.org/ontologies/pizza/pizza.owl#") - # my_pizza = pizza.Pizza() - # my_pizza.hasTopping = [pizza.CheeseTopping()] - - # cls.directory = tempfile.mkdtemp() - cls.directory = "/home/tom_sch/playground/parsed_ontology" - cls.parser = OntologyParser(cls.onto, cls.directory) - + cls.ontologies = [get_ontology("http://www.ease-crc.org/ont/SOMA.owl").load()] + cls.directory = tempfile.mkdtemp() + cls.parser = OntologiesParser(cls.ontologies, cls.directory) def test_parsing(self): self.parser.parse() @@ -35,21 +27,5 @@ def test_parsing(self): -class OntologiesParserTestCase(unittest.TestCase): - - @classmethod - def setUpClass(cls): - cls.ontologies = [get_ontology("https://raw.githubusercontent.com/sorinar329/CuttingFood/refs/heads/main/owl/food_cutting.owl").load(), - get_ontology("http://www.ease-crc.org/ont/SOMA.owl").load()] - cls.directory = "/home/tom_sch/playground/parsed_ontology" - cls.parser = OntologiesParser(cls.ontologies, cls.directory) - - - def test_parsing(self): - self.parser.create_ontologies() - # nx.draw(self.parser.dependency_graph, with_labels=True) - # plt.show() - - if __name__ == '__main__': unittest.main() From 82c3c32b00f012e4dfeb4a7832823501cadab3a4 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Wed, 11 Dec 2024 11:22:24 +0100 Subject: [PATCH 14/29] [Ontology] Intermediate commit before doing some name changes --- src/pycrap/parser.py | 93 +++++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 45 deletions(-) diff --git a/src/pycrap/parser.py b/src/pycrap/parser.py index d8a19e5c6..4e732a8f4 100644 --- a/src/pycrap/parser.py +++ b/src/pycrap/parser.py @@ -7,6 +7,7 @@ from owlready2 import ThingClass, PropertyClass, get_ontology from owlready2.base import * from typing_extensions import List, Any +import inflection def to_snake_case(string: str) -> str: @@ -16,6 +17,7 @@ def to_snake_case(string: str) -> str: :param string: The string to convert. :return: The string in snake case. """ + return inflection.underscore(string) return string.replace(" ", "_").lower() def to_camel_case(string: str) -> str: @@ -25,6 +27,7 @@ def to_camel_case(string: str) -> str: :param string: The string to convert. :return: The string in camel case. """ + return inflection.camelize(string) return ''.join(x for x in string.title() if not x.isspace()) def replace_types(string: str) -> str: @@ -35,6 +38,7 @@ def replace_types(string: str) -> str: >>> replace_types("array_double__") "float__int" + # TODO array_double will be converted to float for now, discuss :param string: The string to convert :return: The string with the types replaced """ @@ -52,6 +56,37 @@ def replace_types(string: str) -> str: string = str(string).replace("", "float") return string + +# Mapping of digits to words +digit_map = { + '0': 'Zero', '1': 'One', '2': 'Two', '3': 'Three', '4': 'Four', + '5': 'Five', '6': 'Six', '7': 'Seven', '8': 'Eight', '9': 'Nine' +} + + + +def update_class_names(onto: owlready2.Ontology): + """ + Update the class names to match python conventions. + """ + for cls in onto.classes(): + if cls is owlready2.Thing: + continue + converted_name = to_camel_case(cls.name) + converted_name = ''.join(digit_map[char] if char.isdigit() else char for char in converted_name) + type.__setattr__(cls, "_name", converted_name) + +def update_property_names(onto: owlready2.Ontology): + """ + Update the property names to match python conventions of functions and members. + """ + for prop in onto.properties(): + converted_name = to_snake_case(prop.name) + converted_name = ''.join(digit_map[char] if char.isdigit() else char for char in converted_name) + type.__setattr__(prop, "original_name", prop.name) + type.__setattr__(prop, "_name", converted_name) + + class AbstractParser: """ An abstract class for parsing @@ -107,7 +142,6 @@ def path_for_file(self, file_name): return f"{os.path.join(self.path, file_name)}{self.file_extension}" - class OntologyParser(AbstractParser): """ A class that parses everything from an owlready2 compatible ontology into python files that @@ -171,18 +205,8 @@ def __init__(self, ontology: owlready2.Ontology, dependencies: List[owlready2.On super().__init__(path, indentation) self.ontology = ontology self.dependencies = dependencies + # TODO update class and property names here to match python conventions - def digit_to_string(self, cls): - # Mapping of digits to words - digit_map = { - '0': 'Zero', '1': 'One', '2': 'Two', '3': 'Three', '4': 'Four', - '5': 'Five', '6': 'Six', '7': 'Seven', '8': 'Eight', '9': 'Nine' - } - - # Replace each digit with its corresponding word - converted_name = ''.join(digit_map[char] if char.isdigit() else char for char in cls) - - return converted_name def parse(self): """ @@ -267,19 +291,6 @@ def create_restrictions(self): self.import_individuals() self.current_file.write("\n" * 2) - for cls in self.ontology.classes(): - if cls.name[0].isdigit(): - original_name = cls.name - new_name = self.digit_to_string(original_name) - if new_name != original_name: - cls.name = new_name - - if "-" in cls.name: - original_name = cls.name - new_name = cls.name.replace("-", "") - if new_name != original_name: - cls.name = new_name - elements = list(self.ontology.classes()) + list(self.ontology.properties()) for element in tqdm.tqdm(elements, desc="Parsing restrictions"): @@ -302,8 +313,6 @@ def parse_restrictions_for_class(self, cls: ThingClass): :param cls: The class """ - # TODO: requiring a digit_to_string for the restrictions body. - # TODO: array_double will be converted to float for now, discuss # write is_a restrictions is_a = self.parse_elements(cls.is_a) if is_a: @@ -382,7 +391,9 @@ def parse_individual_properties(self, individual: owlready2.Thing): :param individual: The individual. """ for prop in individual.get_properties(): - self.current_file.write(f"{individual.name}.{repr(prop)} = {individual.__getattr__(repr(prop))}") + if "original_name" not in dir(prop): + continue + self.current_file.write(f"{individual.name}.{prop.name} = {individual.__getattr__(prop.original_name)}") self.current_file.write("\n") def import_classes(self): @@ -480,18 +491,8 @@ def parse_class(self, cls): Parse a class without restrictions. :param cls: The class. """ - if cls.name[0].isdigit(): - # Prepend "I" to make the class name valid - #modified_class_name = "I" + cls.name - modified_class_name = self.digit_to_string(cls.name) - else: - modified_class_name = cls.name - - if "-" in modified_class_name: - modified_class_name = modified_class_name.replace("-", "") - inherited_classes_sting = "Base" - self.current_file.write(f"class {modified_class_name}({inherited_classes_sting}):\n") + self.current_file.write(f"class {repr(cls)}({inherited_classes_sting}):\n") self.write_docstring(cls) self.current_file.write("\n\n") @@ -586,7 +587,7 @@ def create_base_class(self): """ Create the base class for concepts. """ - self.current_file.write("class Base(Thing):\n") + self.current_file.write("class Base(Thing, metaclass=ThingClass):\n") self.current_file.write(self.apply_indent_to("namespace = ontology")) self.current_file.write("\n" * 3) @@ -631,16 +632,18 @@ def create_init(self): def create_ontologies(self): self.destroy_all_ontologies() - if self.clear_existing: - for onto in self.ontologies: - ontology_path = os.path.join(self.path, to_snake_case(onto.name)) - if os.path.exists(ontology_path): - shutil.rmtree(ontology_path) for onto in nx.topological_sort(self.dependency_graph): loaded_onto: owlready2.Ontology = get_ontology(onto.base_iri).load() + update_class_names(loaded_onto) + update_property_names(loaded_onto) # Create the directory for the ontology ontology_path = os.path.join(self.path, to_snake_case(loaded_onto.name)) + + if self.clear_existing: + if os.path.exists(ontology_path): + shutil.rmtree(ontology_path) + mkdir(ontology_path) # Parse the ontology From 3faaae477d3ad165b168016b73501ee5cbf4d170 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Wed, 11 Dec 2024 11:59:15 +0100 Subject: [PATCH 15/29] [Ontology] Added explicit representation of owlready2 logical constructs --- scripts/parse_ontologies.py | 9 +++++++- src/pycrap/parser.py | 41 +++++++++++++++++++++------------ test/test_pycrap/test_parser.py | 3 ++- 3 files changed, 36 insertions(+), 17 deletions(-) diff --git a/scripts/parse_ontologies.py b/scripts/parse_ontologies.py index 8bd1125af..fea55fe22 100644 --- a/scripts/parse_ontologies.py +++ b/scripts/parse_ontologies.py @@ -1,6 +1,8 @@ import os from owlready2 import * from pycrap.parser import OntologiesParser +import matplotlib.pyplot as plt +import networkx as nx """ This file parses all relevant ontologies and generates the corresponding Python classes in the pycrap/ontologies folder. @@ -10,12 +12,17 @@ def main(): ontologies = [ - get_ontology("http://www.ease-crc.org/ont/SOMA.owl").load() + # get_ontology("http://www.ease-crc.org/ont/SOMA.owl").load(), + get_ontology("https://raw.githubusercontent.com/hawkina/soma/refs/heads/soma-cram/owl/CROMA.owl").load(), + # get_ontology("https://raw.githubusercontent.com/hawkina/suturo_knowledge/refs/heads/neems/suturo_knowledge/owl/suturo.owl").load(), ] path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "src", "pycrap", "ontologies") parser = OntologiesParser(ontologies, path) + nx.draw(parser.dependency_graph, labels={node: node.name for node in parser.dependency_graph.nodes()}) + plt.show() + assert nx.is_directed_acyclic_graph(parser.dependency_graph) parser.parse() diff --git a/src/pycrap/parser.py b/src/pycrap/parser.py index 4e732a8f4..35c51c7f3 100644 --- a/src/pycrap/parser.py +++ b/src/pycrap/parser.py @@ -4,11 +4,28 @@ import networkx as nx import owlready2 import tqdm -from owlready2 import ThingClass, PropertyClass, get_ontology +from owlready2 import ThingClass, PropertyClass, get_ontology, LogicalClassConstruct from owlready2.base import * from typing_extensions import List, Any import inflection +# Mapping of digits to words +digit_map = { + '0': 'Zero', '1': 'One', '2': 'Two', '3': 'Three', '4': 'Four', + '5': 'Five', '6': 'Six', '7': 'Seven', '8': 'Eight', '9': 'Nine' +} + +def set_explicit_repr_for_logical_operator(): + def explicit_repr(self): + s = [] + for x in self.Classes: + if isinstance(x, LogicalClassConstruct): + s.append("(%s)" % x) + else: + s.append(repr(x)) + return "%s([%s])" % (self.__class__.__name__, ", ".join(s)) + + LogicalClassConstruct.__repr__ = explicit_repr def to_snake_case(string: str) -> str: """ @@ -18,7 +35,6 @@ def to_snake_case(string: str) -> str: :return: The string in snake case. """ return inflection.underscore(string) - return string.replace(" ", "_").lower() def to_camel_case(string: str) -> str: """ @@ -28,7 +44,6 @@ def to_camel_case(string: str) -> str: :return: The string in camel case. """ return inflection.camelize(string) - return ''.join(x for x in string.title() if not x.isspace()) def replace_types(string: str) -> str: """ @@ -38,7 +53,7 @@ def replace_types(string: str) -> str: >>> replace_types("array_double__") "float__int" - # TODO array_double will be converted to float for now, discuss + # TODO array_double will be converted to float for now :param string: The string to convert :return: The string with the types replaced """ @@ -54,17 +69,13 @@ def replace_types(string: str) -> str: string = str(string).replace("", "normstr") if "" in str(string): string = str(string).replace("", "float") + if "" in str(string): + string = str(string).replace("", "bool") + if "" in str(string): + string = str(string).replace("", "datetime") return string -# Mapping of digits to words -digit_map = { - '0': 'Zero', '1': 'One', '2': 'Two', '3': 'Three', '4': 'Four', - '5': 'Five', '6': 'Six', '7': 'Seven', '8': 'Eight', '9': 'Nine' -} - - - def update_class_names(onto: owlready2.Ontology): """ Update the class names to match python conventions. @@ -72,7 +83,8 @@ def update_class_names(onto: owlready2.Ontology): for cls in onto.classes(): if cls is owlready2.Thing: continue - converted_name = to_camel_case(cls.name) + converted_name = replace_types(cls.name) + converted_name = to_camel_case(converted_name) converted_name = ''.join(digit_map[char] if char.isdigit() else char for char in converted_name) type.__setattr__(cls, "_name", converted_name) @@ -112,8 +124,6 @@ class AbstractParser: The path to write the files of the parsed ontology into. """ - - def __init__(self, path, indentation: int = 4): self.path = path self.indentation = indentation @@ -566,6 +576,7 @@ def __init__(self, ontologies: List[owlready2.Ontology], path: str, indentation: self.ontologies = list(set(self.ontologies)) self.ontologies.sort(key=lambda onto: onto.name) self.create_dependency_graph() + set_explicit_repr_for_logical_operator() def create_base(self): diff --git a/test/test_pycrap/test_parser.py b/test/test_pycrap/test_parser.py index e9ea46190..41dba39ed 100644 --- a/test/test_pycrap/test_parser.py +++ b/test/test_pycrap/test_parser.py @@ -6,7 +6,7 @@ import networkx as nx import matplotlib.pyplot as plt from owlready2 import get_ontology -from pycrap.parser import OntologyParser, OntologiesParser +from pycrap.parser import OntologiesParser @@ -16,6 +16,7 @@ class OntologiesParserTestCase(unittest.TestCase): def setUpClass(cls): cls.ontologies = [get_ontology("http://www.ease-crc.org/ont/SOMA.owl").load()] cls.directory = tempfile.mkdtemp() + cls.directory = os.path.join("/home/tom_sch/playground/ontologies") cls.parser = OntologiesParser(cls.ontologies, cls.directory) def test_parsing(self): From d5c957d20549e69f0f9726403d6a894e4b1fdec0 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Wed, 11 Dec 2024 12:10:07 +0100 Subject: [PATCH 16/29] [Ontology] Added soma and dul --- resources/objects/table.urdf | 118 + scripts/parse_ontologies.py | 5 +- src/pycrap/ontologies/base.py | 2 +- src/pycrap/ontologies/dul/data_properties.py | 10 +- .../ontologies/dul/object_properties.py | 190 +- src/pycrap/ontologies/dul/restrictions.py | 674 +++--- src/pycrap/ontologies/soma/classes.py | 34 +- src/pycrap/ontologies/soma/data_properties.py | 76 +- src/pycrap/ontologies/soma/individuals.py | 12 +- .../ontologies/soma/object_properties.py | 476 ++-- src/pycrap/ontologies/soma/restrictions.py | 2074 ++++++++--------- src/pycrap/ontology.py | 1 + test/test_pycrap/test_parser.py | 2 +- 13 files changed, 1892 insertions(+), 1782 deletions(-) create mode 100644 resources/objects/table.urdf diff --git a/resources/objects/table.urdf b/resources/objects/table.urdf new file mode 100644 index 000000000..1b0d01559 --- /dev/null +++ b/resources/objects/table.urdf @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scripts/parse_ontologies.py b/scripts/parse_ontologies.py index fea55fe22..9c43b095b 100644 --- a/scripts/parse_ontologies.py +++ b/scripts/parse_ontologies.py @@ -12,9 +12,10 @@ def main(): ontologies = [ - # get_ontology("http://www.ease-crc.org/ont/SOMA.owl").load(), - get_ontology("https://raw.githubusercontent.com/hawkina/soma/refs/heads/soma-cram/owl/CROMA.owl").load(), + get_ontology("http://www.ease-crc.org/ont/SOMA.owl").load(), + # get_ontology("https://raw.githubusercontent.com/hawkina/soma/refs/heads/soma-cram/owl/CROMA.owl").load(), # get_ontology("https://raw.githubusercontent.com/hawkina/suturo_knowledge/refs/heads/neems/suturo_knowledge/owl/suturo.owl").load(), + # get_ontology("https://raw.githubusercontent.com/knowrob/knowrob/refs/heads/dev/owl/URDF.owl").load() ] path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "src", "pycrap", "ontologies") diff --git a/src/pycrap/ontologies/base.py b/src/pycrap/ontologies/base.py index e1788cc1c..0ff56a1d0 100644 --- a/src/pycrap/ontologies/base.py +++ b/src/pycrap/ontologies/base.py @@ -6,7 +6,7 @@ ontology = owlready2.get_ontology("file://" + ontology_file.name).load() -class Base(Thing): +class Base(Thing, metaclass=ThingClass): namespace = ontology diff --git a/src/pycrap/ontologies/dul/data_properties.py b/src/pycrap/ontologies/dul/data_properties.py index 81cc9ee05..f2627ed57 100644 --- a/src/pycrap/ontologies/dul/data_properties.py +++ b/src/pycrap/ontologies/dul/data_properties.py @@ -2,12 +2,12 @@ from .classes import * -class hasRegionDataValue(BaseProperty): +class has_region_data_value(BaseProperty): """ A datatype property that encodes values for a Region, e.g. a float for the Region Height. """ -class hasDataValue(BaseProperty): +class has_data_value(BaseProperty): """ A datatype property that encodes values from a datatype for an Entity. There are several ways to encode values in DOLCE (Ultralite): @@ -24,17 +24,17 @@ class hasDataValue(BaseProperty): Patterns (4) and (5) should be used instead when a constraint or a selection is modeled, independently from the actual observation of values in the real world. """ -class hasEventDate(BaseProperty): +class has_event_date(BaseProperty): """ A datatype property that encodes values from xsd:dateTime for an Event; a same Event can have more than one xsd:dateTime value: begin date, end date, date at which the interval holds, etc. """ -class hasIntervalDate(BaseProperty): +class has_interval_date(BaseProperty): """ A datatype property that encodes values from xsd:dateTime for a TimeInterval; a same TimeInterval can have more than one xsd:dateTime value: begin date, end date, date at which the interval holds, etc. """ -class hasParameterDataValue(BaseProperty): +class has_parameter_data_value(BaseProperty): """ Parametrizes values from a datatype. For example, a Parameter MinimumAgeForDriving hasParameterDataValue 18 on datatype xsd:int, in the Italian traffic code. In this example, MinimumAgeForDriving isDefinedIn the Norm ItalianTrafficCodeAgeDriving. More complex parametrization requires workarounds. E.g. AgeRangeForDrugUsage could parametrize data value: 14 to 50 on the datatype: xsd:int. Since complex datatypes are not allowed in OWL1.0, a solution to this can only work by creating two 'sub-parameters': MinimumAgeForDrugUsage (that hasParameterDataValue 14) and MaximumAgeForDrugUsage (that hasParameterDataValue 50), which are components of (cf. hasComponent) the main Parameter AgeRangeForDrugUsage. diff --git a/src/pycrap/ontologies/dul/object_properties.py b/src/pycrap/ontologies/dul/object_properties.py index 63509a461..f83dbeae5 100644 --- a/src/pycrap/ontologies/dul/object_properties.py +++ b/src/pycrap/ontologies/dul/object_properties.py @@ -14,18 +14,18 @@ class defines(BaseProperty): A relation between a Description and a Concept, e.g. a Workflow for a governmental Organization defines the Role 'officer', or 'the Italian Traffic Law defines the role Vehicle'. """ -class definesTask(BaseProperty): +class defines_task(BaseProperty): """ A relation between a description and a task, e.g. the recipe for a cake defines the task 'boil'. """ -class isDescribedBy(BaseProperty): +class is_described_by(BaseProperty): """ The relation between an Entity and a Description: a Description gives a unity to a Collection of parts (the components), or constituents, by assigning a Role to each of them in the context of a whole Object (the system). A same Entity can be given different descriptions, for example, an old cradle can be given a unifying Description based on the original aesthetic design, the functionality it was built for, or a new aesthetic functionality in which it can be used as a flower pot. """ -class associatedWith(BaseProperty): +class associated_with(BaseProperty): """ A catch-all object property, useful for alignment and querying purposes. It is declared as both transitive and symmetric, in order to reason an a maximal closure of associations between individuals. @@ -38,7 +38,7 @@ class follows(BaseProperty): It can be used between tasks, processes or time intervals, and subproperties would fit best in order to distinguish the different uses. """ -class isEventIncludedIn(BaseProperty): +class is_event_included_in(BaseProperty): ... class overlaps(BaseProperty): @@ -47,13 +47,13 @@ class overlaps(BaseProperty): Subproperties and restrictions can be used to specialize overlaps for objects, events, time intervals, etc. """ -class isLocationOf(BaseProperty): +class is_location_of(BaseProperty): """ A generic, relative localization, holding between any entities. E.g. 'Rome is the seat of the Pope', 'the liver is the location of the tumor'. For 'absolute' locations, see SpaceRegion """ -class definesRole(BaseProperty): +class defines_role(BaseProperty): """ A relation between a description and a role, e.g. the recipe for a cake defines the role 'ingredient'. """ @@ -64,17 +64,17 @@ class describes(BaseProperty): A same Entity can be given different descriptions, for example, an old cradle can be given a unifying Description based on the original aesthetic design, the functionality it was built for, or a new aesthetic functionality in which it can be used as a flower pot. """ -class includesEvent(BaseProperty): +class includes_event(BaseProperty): """ A relation between situations and events, e.g. 'this morning I've prepared my coffee and had my fingers burnt' (i.e.: the preparation of my coffee this morning included a burning of my fingers). """ -class hasMember(BaseProperty): +class has_member(BaseProperty): """ A relation between collections and entities, e.g. 'my collection of saxophones includes an old Adolphe Sax original alto' (i.e. my collection has member an Adolphe Sax alto). """ -class hasConstituent(BaseProperty): +class has_constituent(BaseProperty): """ 'Constituency' depends on some layering of the world described by the ontology. For example, scientific granularities (e.g. body-organ-tissue-cell) or ontological 'strata' (e.g. social-mental-biological-physical) are typical layerings. Intuitively, a constituent is a part belonging to a lower layer. Since layering is actually a partition of the world described by the ontology, constituents are not properly classified as parts, although this kinship can be intuitive for common sense. @@ -83,12 +83,12 @@ class hasConstituent(BaseProperty): In all these examples, we notice a typical discontinuity between the constituted and the constituent object: e.g. a social system is conceptualized at a different layer from the persons that constitute it, a person is conceptualized at a different layer from the molecules that constitute them, and a river is conceptualized at a different layer from the atoms that constitute it. """ -class hasRegion(BaseProperty): +class has_region(BaseProperty): """ A relation between entities and regions, e.g. 'the number of wheels of that truck is 12', 'the time of the experiment is August 9th, 2004', 'the whale has been localized at 34 degrees E, 20 degrees S'. """ -class hasPart(BaseProperty): +class has_part(BaseProperty): """ A schematic relation between any entities, e.g. 'the human body has a brain as part', '20th century contains year 1923', 'World War II includes the Pearl Harbour event'. @@ -101,78 +101,78 @@ class hasPart(BaseProperty): Subproperties and restrictions can be used to specialize hasPart for objects, events, etc. """ -class hasQuality(BaseProperty): +class has_quality(BaseProperty): """ A relation between entities and qualities, e.g. 'Dmitri's skin is yellowish'. """ -class hasParameter(BaseProperty): +class has_parameter(BaseProperty): """ A Concept can have a Parameter that constrains the attributes that a classified Entity can have in a certain Situation, e.g. a 4WheelDriver Role definedIn the ItalianTrafficLaw has a MinimumAge parameter on the Amount 16. """ -class hasComponent(BaseProperty): +class has_component(BaseProperty): """ The hasProperPart relation without transitivity, holding between an Object (the system) and another (the component), and assuming a Design that structures the Object. """ -class directlyPrecedes(BaseProperty): +class directly_precedes(BaseProperty): """ The intransitive precedes relation. For example, Monday directly precedes Tuesday. Directness of precedence depends on the designer conceptualization. """ -class directlyFollows(BaseProperty): +class directly_follows(BaseProperty): """ The intransitive follows relation. For example, Wednesday directly precedes Thursday. Directness of precedence depends on the designer conceptualization. """ -class isRelatedToConcept(BaseProperty): +class is_related_to_concept(BaseProperty): """ Any relation between concepts, e.g. superordinated, conceptual parthood, having a parameter, having a task, superordination, etc. """ -class involvesAgent(BaseProperty): +class involves_agent(BaseProperty): """ Agent participation. """ -class includesObject(BaseProperty): +class includes_object(BaseProperty): """ A relation between situations and objects, e.g. 'this morning I've prepared my coffee and had my fingers burnt' (i.e.: the preparation of my coffee this morning included me). """ -class isReferenceOf(BaseProperty): +class is_reference_of(BaseProperty): """ A relation between information objects and any Entity (including information objects). It can be used to talk about e.g. entities are references of proper nouns: the proper noun 'Leonardo da Vinci' isAbout the Person Leonardo da Vinci; as well as to talk about sets of entities that can be described by a common noun: the common noun 'person' isAbout the set of all persons in a domain of discourse, which can be represented in DOLCE-Ultralite as an individual of the class: Collection . The isReferenceOf relation is irreflexive, differently from its inverse isAbout. """ -class isSettingFor(BaseProperty): +class is_setting_for(BaseProperty): """ A relation between situations and entities, e.g. 'this morning I've prepared my coffee with a new fantastic Arabica', i.e.: the preparation of my coffee this morning is the setting for (an amount of) a new fantastic Arabica. """ -class hasParticipant(BaseProperty): +class has_participant(BaseProperty): """ A relation between an object and a process, e.g. 'John took part in the discussion', 'a large mass of snow fell during the avalanche', or 'a cook, some sugar, flour, etc. are all present in the cooking of a cake'. """ -class isRegionFor(BaseProperty): +class is_region_for(BaseProperty): """ A relation between entities and regions, e.g. 'the color of my car is red'. """ -class isParticipantIn(BaseProperty): +class is_participant_in(BaseProperty): """ A relation between an object and a process, e.g. 'John took part in the discussion', 'a large mass of snow fell during the avalanche', or 'a cook, some sugar, flour, etc. are all present in the cooking of a cake'. """ -class isRoleDefinedIn(BaseProperty): +class is_role_defined_in(BaseProperty): """ A relation between a description and a role, e.g. the role 'Ingredient' is defined in the recipe for a cake. """ -class isConstituentOf(BaseProperty): +class is_constituent_of(BaseProperty): """ 'Constituency' depends on some layering of the world described by the ontology. For example, scientific granularities (e.g. body-organ-tissue-cell) or ontological 'strata' (e.g. social-mental-biological-physical) are typical layerings. Intuitively, a constituent is a part belonging to a lower layer. Since layering is actually a partition of the world described by the ontology, constituents are not properly classified as parts, although this kinship can be intuitive for common sense. @@ -181,30 +181,30 @@ class isConstituentOf(BaseProperty): In all these examples, we notice a typical discontinuity between the constituted and the constituent object: e.g. a social system is conceptualized at a different layer from the persons that constitute it, a person is conceptualized at a different layer from the molecules that constitute them, and a river is conceptualized at a different layer from the atoms that constitute it. """ -class isQualityOf(BaseProperty): +class is_quality_of(BaseProperty): """ A relation between entities and qualities, e.g. 'Dmitri's skin is yellowish'. """ -class isObjectIncludedIn(BaseProperty): +class is_object_included_in(BaseProperty): ... -class isDefinedIn(BaseProperty): +class is_defined_in(BaseProperty): """ A relation between a Description and a Concept, e.g. a Workflow for a governmental Organization defines the Role 'officer', or 'the Italian Traffic Law defines the role Vehicle'. """ -class isRealizedBy(BaseProperty): +class is_realized_by(BaseProperty): """ A relation between an information realization and an information object, e.g. the paper copy of the Italian Constitution realizes the text of the Constitution. """ -class hasRole(BaseProperty): +class has_role(BaseProperty): """ A relation between an object and a role, e.g. the person 'John' has role 'student'. """ -class isRoleOf(BaseProperty): +class is_role_of(BaseProperty): """ A relation between an object and a role, e.g. 'student' is the role of 'John'. """ @@ -214,28 +214,28 @@ class realizes(BaseProperty): A relation between an information realization and an information object, e.g. the paper copy of the Italian Constitution realizes the text of the Constitution. """ -class isParameterFor(BaseProperty): +class is_parameter_for(BaseProperty): """ A Concept can have a Parameter that constrains the attributes that a classified Entity can have in a certain Situation, e.g. a 4WheelDriver Role definedIn the ItalianTrafficLaw has a MinimumAge parameter on the Amount 16. """ -class hasTask(BaseProperty): +class has_task(BaseProperty): """ A relation between roles and tasks, e.g. 'students have the duty of giving exams' (i.e. the Role 'student' hasTask the Task 'giving exams'). """ -class hasLocation(BaseProperty): +class has_location(BaseProperty): """ A generic, relative spatial location, holding between any entities. E.g. 'the cat is on the mat', 'Omar is in Samarcanda', 'the wound is close to the femural artery'. For 'absolute' locations, see SpaceRegion """ -class isComponentOf(BaseProperty): +class is_component_of(BaseProperty): """ The asymmetric isProperPartOf relation without transitivity, holding between an Object (the system) and another (the component), and assuming a Design that structures the Object. """ -class isClassifiedBy(BaseProperty): +class is_classified_by(BaseProperty): """ A relation between a Concept and an Entity, e.g. 'John is considered a typical rude man'; your last concert constitutes the achievement of a lifetime; '20-year-old means she's mature enough'. """ @@ -245,7 +245,7 @@ class classifies(BaseProperty): A relation between a Concept and an Entity, e.g. the Role 'student' classifies a Person 'John'. """ -class isAbout(BaseProperty): +class is_about(BaseProperty): """ A relation between an information object and an Entity (including information objects). It can be used to talk about entities that are references of proper nouns: the proper noun 'Leonardo da Vinci' isAbout the Person Leonardo da Vinci; as well as to talk about sets of entities that can be described by a common noun: the common noun 'person' isAbout the set of all persons in a domain of discourse, which can be represented in DOLCE-Ultralite as an individual of the class: dul:Collection. A specific sentence may use common nouns with either a singular or plural reference, or it can even refer to all possible references (e.g. in a lexicographic definition): all those uses are kinds of aboutness. @@ -254,44 +254,44 @@ class isAbout(BaseProperty): If a reflexivity exists in general, it rather concerns its realisation, which is always associated with an event, e.g. an utterance, which makes the information denoting itself, besides its aboutness. This is implemented in DUL with the dul:realizesSelfInformation property, which is used with local reflexivity in the dul:InformationRealization class. """ -class hasSetting(BaseProperty): +class has_setting(BaseProperty): """ A relation between entities and situations, e.g. 'this morning I've prepared my coffee with a new fantastic Arabica', i.e.: (an amount of) a new fantastic Arabica hasSetting the preparation of my coffee this morning. """ -class isTaskDefinedIn(BaseProperty): +class is_task_defined_in(BaseProperty): """ A relation between a description and a task, e.g. the task 'boil' is defined in a recipe for a cake. """ -class hasCommonBoundary(BaseProperty): +class has_common_boundary(BaseProperty): """ A relation to encode either formal or informal characterizations of 'boundaries' common to two different entities: an Event that ends when another begins, two abstract regions that have a common topological boundary, two objects that are said to be 'in contact' from a commonsense perspective, etc. """ -class isTaskOf(BaseProperty): +class is_task_of(BaseProperty): """ A relation between roles and tasks, e.g. 'students have the duty of giving exams' (i.e. the Role 'student' hasTask the Task 'giving exams'). """ -class hasPostcondition(BaseProperty): +class has_postcondition(BaseProperty): """ Direct succession applied to situations. E.g., 'A postcondition of our Plan is to have things settled'. """ -class hasPrecondition(BaseProperty): +class has_precondition(BaseProperty): """ Direct precedence applied to situations. E.g., 'A precondition to declare war against a foreign country is claiming to find nuclear weapons in it'. """ -class actsFor(BaseProperty): +class acts_for(BaseProperty): """ The relation holding between any Agent, and a SocialAgent. In principle, a SocialAgent requires at least one PhysicalAgent in order to act, but this dependency can be 'delegated'; e.g. a university can be acted for by a department, which on its turm is acted for by physical agents. """ -class executesTask(BaseProperty): +class executes_task(BaseProperty): """ A relation between an action and a task, e.g. 'putting some water in a pot and putting the pot on a fire until the water starts bubbling' executes the task 'boiling'. """ @@ -343,19 +343,19 @@ class expresses(BaseProperty): This is only a first step to provide a framework, in which one can model different aspects of meaning. A more developed ontology should approach the problem of integrating the different uses of 'expresses', so that different theories, resources, methods can interoperate. """ -class isExecutedIn(BaseProperty): +class is_executed_in(BaseProperty): """ A relation between an action and a task, e.g. 'putting some water in a pot and putting the pot on a fire until the water starts bubbling' executes the task 'boiling'. """ -class isExpressedBy(BaseProperty): +class is_expressed_by(BaseProperty): """ A relation between a dul:SocialObject (the 'meaning') and a dul:InformationObject (the 'expression'). For example: 'A Beehive is a structure in which bees are kept, typically in the form of a dome or box.' (Oxford dictionary)'; 'the term Beehive expresses the concept Beehive in my apiculture ontology'. The intuition for 'meaning' is intended to be very broad. A separate, large comment is included in the encoding of 'expresses', for those who want to investigate more on what kind of meaning can be represented in what form. """ -class isPartOf(BaseProperty): +class is_part_of(BaseProperty): """ A relation between any entities, e.g. 'brain is a part of the human body'. See dul:hasPart for additional documentation. """ @@ -365,12 +365,12 @@ class satisfies(BaseProperty): A relation between a Situation and a Description, e.g. the execution of a Plan satisfies that plan. """ -class realizesSelfInformation(BaseProperty): +class realizes_self_information(BaseProperty): """ This relation is a workaround to enable local reflexivity axioms (Self) working with non-simple properties; in this case, dul:realizesInformation About. """ -class actsThrough(BaseProperty): +class acts_through(BaseProperty): """ The relation holding between a PhysicalAgent and a SocialAgent. In principle, a SocialAgent requires at least one PhysicalAgent in order to act, but this dependency can be 'delegated', e.g. a university can be acted for by a department, which is acted for by physical agents. AKA isActedBy """ @@ -381,7 +381,7 @@ class characterizes(BaseProperty): E.g. the collection of vintage saxophones is characterized by the Concept 'manufactured by hand', while it gets covered by the Concept 'Saxophone' with the Parameter 'Vintage'. """ -class isCharacterizedBy(BaseProperty): +class is_characterized_by(BaseProperty): ... class conceptualizes(BaseProperty): @@ -390,22 +390,22 @@ class conceptualizes(BaseProperty): Conceptualizations can be distinguished into different forms, primarily based on the type of SocialObject that is conceptualized. Descriptions and concepts can be 'assumed', situations can be 'believed' or 'known', plans can be 'adopted', etc. (see ontology: http://www.ontologydesignpatterns.org/ont/dul/Conceptualization.owl. """ -class isConceptualizedBy(BaseProperty): +class is_conceptualized_by(BaseProperty): """ A relation stating that an Agent is internally representing a Description . E.g., 'John believes in the conspiracy theory'; 'Niels Bohr created a solar-system metaphor for his atomic theory'; 'Jacques assumes all swans are white'; 'the task force shares the attack plan'. """ -class concretelyExpresses(BaseProperty): +class concretely_expresses(BaseProperty): """ A relation between an InformationRealization and a Description, e.g. 'the printout of the Italian Constitution concretelyExpresses the Italian Constitution'. It should be supplied also with a rule stating that the InformationRealization realizes an InformationObject that expresses the Description """ -class isConcretelyExpressedBy(BaseProperty): +class is_concretely_expressed_by(BaseProperty): """ A relation between an InformationRealization and a Description, e.g. 'the printout of the Italian Constitution concretelyExpresses the Italian Constitution'. It should be supplied also with a rule stating that the InformationRealization realizes an InformationObject that expresses the Description """ -class coparticipatesWith(BaseProperty): +class coparticipates_with(BaseProperty): """ A relation between two objects participating in a same Event; e.g., 'Vitas and Jimmy are playing tennis'. """ @@ -416,13 +416,13 @@ class covers(BaseProperty): E.g. the collection of vintage saxophones is covered by the Concept 'Saxophone' with the Parameter 'Vintage'. """ -class isCoveredBy(BaseProperty): +class is_covered_by(BaseProperty): """ A relation between concepts and collections, where a Concept is said to cover a Collection; it corresponds to a link between the (reified) intensional and extensional interpretations of a (reified) class. E.g. the collection of vintage saxophones is covered by the Concept 'Saxophone' with the Parameter 'Vintage'. """ -class usesConcept(BaseProperty): +class uses_concept(BaseProperty): """ A generic relation holding between a Description and a Concept. In order to be used, a Concept must be previously definedIn another Description. This last condition cannot be encoded for object properties in OWL. """ @@ -434,110 +434,110 @@ class expands(BaseProperty): An 'intention' to expand must be present (unless purely formal theories are considered, but even in this case a criterion of relevance is usually active). """ -class isRelatedToDescription(BaseProperty): +class is_related_to_description(BaseProperty): """ Any relation between descriptions. """ -class isExpandedIn(BaseProperty): +class is_expanded_in(BaseProperty): """ A partial order relation that holds between descriptions. It represents the proper part relation between a description and another description featuring the same properties as the former, with at least one additional one. Descriptions can be expanded either by adding other descriptions as parts, or by refining concepts that are used by them. An 'intention' to expand must be present (unless purely formal theories are considered, but even in this case a criterion of relevance is usually active). """ -class expressesConcept(BaseProperty): +class expresses_concept(BaseProperty): """ A relation between an InformationObject and a Concept , e.g. the term "dog" expresses the Concept "dog". For expressing a relational meaning, see the more general object property: expresses """ -class isConceptExpressedBy(BaseProperty): +class is_concept_expressed_by(BaseProperty): """ A relation between an InformationObject and a Concept , e.g. the term "dog" expresses the Concept "dog". For expressing a relational meaning, see the more general object property: expresses """ -class farFrom(BaseProperty): +class far_from(BaseProperty): """ Generic distance relation between any Entity(s). E.g. Rome is far from Beijing, astronomy is far from necromancy. """ -class hasProperPart(BaseProperty): +class has_proper_part(BaseProperty): """ Asymmetric (so including irreflexive) parthood. """ -class hasConstraint(BaseProperty): +class has_constraint(BaseProperty): """ A relation between parameters and entities. It allows to assert generic constraints (encoded as parameters), e.g. MinimumAgeForDriving isConstraintFor John (where John is a legal subject under the TrafficLaw). The intended semantics (not expressible in OWL) is that a Parameter isParameterFor a Concept that classifies an Entity; moreover, it entails that a Parameter parametrizes a Region that isRegionFor that Entity. """ -class isConstraintFor(BaseProperty): +class is_constraint_for(BaseProperty): """ A relation between parameters and entities. It allows to assert generic constraints (encoded as parameters), e.g. MinimumAgeForDriving isConstraintFor John (where John is a legal subject under the TrafficLaw). The intended semantics (not expressible in OWL) is that a Parameter isConstraintFor and Entity if the Parameter isParameterFor a Concept that classifies that Entity; moreover, it entails that a Parameter parametrizes a Region that isRegionFor that Entity. The use in OWL is therefore a shortcut to annotate what Parameter constrains what Entity """ -class isMemberOf(BaseProperty): +class is_member_of(BaseProperty): """ A relation between collections and entities, e.g. 'the Night Watch by Rembrandt is in the Rijksmuseum collection'; 'Davide is member of the Pen Club', 'Igor is one the subjects chosen for the experiment'. """ -class includesWhole(BaseProperty): +class includes_whole(BaseProperty): ... -class includesPart(BaseProperty): +class includes_part(BaseProperty): ... -class isPostconditionOf(BaseProperty): +class is_postcondition_of(BaseProperty): """ Direct succession applied to situations. E.g., 'Taking some rest is a postcondition of my search for a hotel'. """ -class isPreconditionOf(BaseProperty): +class is_precondition_of(BaseProperty): """ Direct precedence applied to situations. E.g., 'claiming to find nuclear weapons in a foreign country is a precondition to declare war against it'. """ -class isPropertPartOf(BaseProperty): +class is_propert_part_of(BaseProperty): """ http://www.ontologydesignpatterns.org/ont/dul/DUL.owl """ -class hasTimeInterval(BaseProperty): +class has_time_interval(BaseProperty): """ The generic relation between events and time intervals. """ -class isTimeIntervalOf(BaseProperty): +class is_time_interval_of(BaseProperty): """ The generic relation between time intervals and events. """ -class includesAction(BaseProperty): +class includes_action(BaseProperty): """ A relation between situations and actions, e.g. 'this morning I've prepared my coffee and had my fingers burnt' (i.e.: the preparation of my coffee this morning included a burning of my fingers). """ -class isActionIncludedIn(BaseProperty): +class is_action_included_in(BaseProperty): ... -class includesAgent(BaseProperty): +class includes_agent(BaseProperty): """ A relation between situations and persons, e.g. 'this morning I've prepared my coffee and had my fingers burnt' (i.e.: the preparation of my coffee this morning included me). """ -class isAgentIncludedIn(BaseProperty): +class is_agent_included_in(BaseProperty): ... -class includesTime(BaseProperty): +class includes_time(BaseProperty): """ A relation between situations and time intervals, e.g. 'this morning I've prepared my coffee and had my fingers burnt' (i.e.: preparing my coffee was held this morning). A data value attached to the time interval typically complements this modelling pattern. """ -class isTimeIncludedIn(BaseProperty): +class is_time_included_in(BaseProperty): ... class introduces(BaseProperty): @@ -545,36 +545,36 @@ class introduces(BaseProperty): A relation between a Description and a SocialAgent, e.g. a Constitutional Charter introduces the SocialAgent 'PresidentOfRepublic'. """ -class isIntroducedBy(BaseProperty): +class is_introduced_by(BaseProperty): """ A relation between a Description and a SocialAgent, e.g. a Constitutional Charter introduces the SocialAgent 'PresidentOfRepublic'. """ -class isAgentInvolvedIn(BaseProperty): +class is_agent_involved_in(BaseProperty): """ Agent participation. """ -class isConceptUsedIn(BaseProperty): +class is_concept_used_in(BaseProperty): """ A more generic relation holding between a Description and a Concept. In order to be used, a Concept must be previously definedIn another Description """ -class isObservableAt(BaseProperty): +class is_observable_at(BaseProperty): """ A relation to represent a (past, present or future) TimeInterval at which an Entity is observable. In order to encode a specific time, a data value should be related to the TimeInterval. An alternative way of representing time is the datatype property: hasIntervalDate """ -class isTimeOfObservationOf(BaseProperty): +class is_time_of_observation_of(BaseProperty): """ A relation to represent a (past, present or future) TimeInterval at which an Entity is observable. In order to encode a specific time, a data value should be related to the TimeInterval. An alternative way of representing time is the datatype property: hasIntervalDate """ -class isParametrizedBy(BaseProperty): +class is_parametrized_by(BaseProperty): """ The relation between a Parameter, e.g. 'MajorAge', and a Region, e.g. '>17 year'. """ @@ -585,22 +585,22 @@ class parametrizes(BaseProperty): For a more data-oriented relation, see hasDataValue """ -class isReferenceOfInformationRealizedBy(BaseProperty): +class is_reference_of_information_realized_by(BaseProperty): """ The relation between entities and information realizations, e.g. between Italy and a paper copy of the text of the Italian Constitution. """ -class realizesInformationAbout(BaseProperty): +class realizes_information_about(BaseProperty): """ The relation between entities and information realizations, e.g. between Italy and a paper copy of the text of the Italian Constitution. """ -class isSatisfiedBy(BaseProperty): +class is_satisfied_by(BaseProperty): """ A relation between a Situation and a Description, e.g. the execution of a Plan satisfies that plan. """ -class isSpecializedBy(BaseProperty): +class is_specialized_by(BaseProperty): """ A partial order relation that holds between social objects. It represents the subsumption relation between e.g. a Concept and another Concept that is broader in extensional interpretation, but narrowe in intensional interpretation. E.g. PhDStudent Role specializes Student Role @@ -613,17 +613,17 @@ class specializes(BaseProperty): Another possible use is between a Collection that isCoveredBy a Concept A, and another Collection that isCoveredBy a Concept B that on its turm specializes A. For example, the 70,000 series Selmer Mark VI saxophone Collection specializes the Selmer Mark VI saxophone Collection. """ -class isSubordinatedTo(BaseProperty): +class is_subordinated_to(BaseProperty): """ Direct succession applied to concepts. E.g. the role 'Officer' is subordinated to 'Director'. """ -class isSuperordinatedTo(BaseProperty): +class is_superordinated_to(BaseProperty): """ Direct precedence applied to concepts. E.g. the role 'Executive' is superordinated to 'DepartmentManager'. """ -class isUnifiedBy(BaseProperty): +class is_unified_by(BaseProperty): """ A Collection has a unification criterion, provided by a Description; for example, a community of practice can be unified by a shared theory or interest, e.g. the community that makes research on mirror neurons shares some core knowledge about mirror neurons, which can be represented as a Description MirrorNeuronTheory that unifies the community. There can be several unifying descriptions. """ @@ -633,12 +633,12 @@ class unifies(BaseProperty): A Collection has a unification criterion, provided by a Description; for example, a community of practice can be unified by a shared theory or interest, e.g. the community that makes research on mirror neurons shares some core knowledge about mirror neurons, which can be represented as a Description MirrorNeuronTheory that unifies the community. There can be several unifying descriptions. """ -class nearTo(BaseProperty): +class near_to(BaseProperty): """ Generic distance relation between any Entity(s). E.g. Rome is near to Florence, astronomy is near to physics. """ -class sameSettingAs(BaseProperty): +class same_setting_as(BaseProperty): """ A relation between two entities participating in a same Situation; e.g., 'Our company provides an antivenom service' (the situation is the service, the two entities are the company and the antivenom). """ diff --git a/src/pycrap/ontologies/dul/restrictions.py b/src/pycrap/ontologies/dul/restrictions.py index 1f05bc962..887ffdd2d 100644 --- a/src/pycrap/ontologies/dul/restrictions.py +++ b/src/pycrap/ontologies/dul/restrictions.py @@ -4,39 +4,39 @@ -Concept.is_a = [SocialObject, isDefinedIn.some(Description), hasPart.only(Concept)] +Concept.is_a = [SocialObject, is_defined_in.some(Description), has_part.only(Concept)] -Task.is_a = [EventType, hasPart.only(Task), isExecutedIn.only(Action), isTaskDefinedIn.only(Description), isTaskOf.only(Role)] +Task.is_a = [EventType, has_part.only(Task), is_executed_in.only(Action), is_task_defined_in.only(Description), is_task_of.only(Role)] -Role.is_a = [Concept, classifies.only(Object), hasPart.only(Role)] +Role.is_a = [Concept, classifies.only(Object), has_part.only(Role)] Entity.is_a = [Thing] -Event.is_a = [Entity, hasParticipant.some(Object), hasTimeInterval.some(TimeInterval), hasConstituent.only(Event), hasPart.only(Event)] +Event.is_a = [Entity, has_participant.some(Object), has_time_interval.some(TimeInterval), has_constituent.only(Event), has_part.only(Event)] -Transition.is_a = [Situation, includesEvent.some(Event), includesObject.some(Object), isSettingFor.some(Process), isSettingFor.some(Situation & precedes.some(Event & precedes.some(Situation))), includesTime.min(3, TimeInterval), isSettingFor.min(2, Situation)] +Transition.is_a = [Situation, includes_event.some(Event), includes_object.some(Object), is_setting_for.some(Process), is_setting_for.some(And([Situation, precedes.some(And([Event, precedes.some(Situation)]))])), includes_time.min(3, TimeInterval), is_setting_for.min(2, Situation)] -PhysicalObject.is_a = [Object, hasPart.only(PhysicalObject)] +PhysicalObject.is_a = [Object, has_part.only(PhysicalObject)] Description.is_a = [SocialObject] EventType.is_a = [Concept, classifies.only(Event)] -Parameter.is_a = [Concept, classifies.only(Region), hasPart.only(Parameter)] +Parameter.is_a = [Concept, classifies.only(Region), has_part.only(Parameter)] InformationObject.is_a = [InformationEntity, SocialObject] -Quality.is_a = [Entity, hasRegion.some(Region), isQualityOf.some(Entity), hasConstituent.only(Quality), hasPart.only(Quality)] +Quality.is_a = [Entity, has_region.some(Region), is_quality_of.some(Entity), has_constituent.only(Quality), has_part.only(Quality)] -Collection.is_a = [SocialObject, hasPart.only(Collection)] +Collection.is_a = [SocialObject, has_part.only(Collection)] -Action.is_a = [Event, hasParticipant.some(Agent), executesTask.min(1, Thing)] +Action.is_a = [Event, has_participant.some(Agent), executes_task.min(1, Thing)] -Region.is_a = [Abstract, hasConstituent.only(Region), hasPart.only(Region), overlaps.only(Region), precedes.only(Region)] +Region.is_a = [Abstract, has_constituent.only(Region), has_part.only(Region), overlaps.only(Region), precedes.only(Region)] -Object.is_a = [Entity, hasLocation.some(Entity), isParticipantIn.some(Event), hasConstituent.only(Object), hasPart.only(Object), isClassifiedBy.only(Role)] +Object.is_a = [Entity, has_location.some(Entity), is_participant_in.some(Event), has_constituent.only(Object), has_part.only(Object), is_classified_by.only(Role)] -Workflow.is_a = [Plan, definesRole.some(Role), definesTask.some(Task)] +Workflow.is_a = [Plan, defines_role.some(Role), defines_task.some(Task)] Goal.is_a = [Description] @@ -50,27 +50,27 @@ Relation.is_a = [Description] -PhysicalArtifact.is_a = [PhysicalObject, isDescribedBy.some(Plan)] +PhysicalArtifact.is_a = [PhysicalObject, is_described_by.some(Plan)] PhysicalPlace.is_a = [PhysicalObject] Design.is_a = [Description] -Plan.is_a = [Description, hasComponent.some(Goal)] +Plan.is_a = [Description, has_component.some(Goal)] -InformationRealization.is_a = [InformationEntity, Event | PhysicalObject | Quality, realizes.some(InformationObject), realizesSelfInformation.has_self()] +InformationRealization.is_a = [InformationEntity, Or([Event, PhysicalObject, Quality]), realizes.some(InformationObject), realizes_self_information.has_self()] TimeInterval.is_a = [Region] -PhysicalAttribute.is_a = [Region, isRegionFor.only(PhysicalObject)] +PhysicalAttribute.is_a = [Region, is_region_for.only(PhysicalObject)] -DesignedArtifact.is_a = [PhysicalArtifact, isDescribedBy.some(Design)] +DesignedArtifact.is_a = [PhysicalArtifact, is_described_by.some(Design)] PhysicalAgent.is_a = [Agent, PhysicalObject] Diagnosis.is_a = [Description] -SocialObject.is_a = [Object, isExpressedBy.some(InformationObject), hasPart.only(SocialObject)] +SocialObject.is_a = [Object, is_expressed_by.some(InformationObject), has_part.only(SocialObject)] Configuration.is_a = [Collection] @@ -84,13 +84,13 @@ SocialRelation.is_a = [Relation] -SocialObjectAttribute.is_a = [Region, isRegionFor.only(SocialObject)] +SocialObjectAttribute.is_a = [Region, is_region_for.only(SocialObject)] -Theory.is_a = [Description, hasComponent.some(Relation)] +Theory.is_a = [Description, has_component.some(Relation)] Set.is_a = [FormalEntity] -SocialAgent.is_a = [Agent, SocialObject, actsThrough.some(PhysicalAgent)] +SocialAgent.is_a = [Agent, SocialObject, acts_through.some(PhysicalAgent)] Abstract.is_a = [Entity] @@ -100,14 +100,14 @@ ChemicalObject.is_a = [PhysicalBody] -Classification.is_a = [TimeIndexedRelation, isSettingFor.some(Concept), isSettingFor.some(Entity), isSettingFor.some(TimeInterval)] +Classification.is_a = [TimeIndexedRelation, is_setting_for.some(Concept), is_setting_for.some(Entity), is_setting_for.some(TimeInterval)] TimeIndexedRelation.is_a = [Situation] -TimeIndexedRelation.equivalent_to = [Situation & isSettingFor.some(TimeInterval)] +TimeIndexedRelation.equivalent_to = [And([Situation, is_setting_for.some(TimeInterval)])] -Collective.is_a = [Collection, hasMember.only(Agent)] +Collective.is_a = [Collection, has_member.only(Agent)] -CollectiveAgent.is_a = [SocialAgent, actsThrough.some(Agent), isIntroducedBy.some(Description)] +CollectiveAgent.is_a = [SocialAgent, acts_through.some(Agent), is_introduced_by.some(Description)] Community.is_a = [CollectiveAgent] @@ -117,7 +117,7 @@ FunctionalSubstance.is_a = [Substance] -Group.is_a = [CollectiveAgent, isDescribedBy.some(Plan)] +Group.is_a = [CollectiveAgent, is_described_by.some(Plan)] InformationEntity.is_a = [Entity] @@ -133,28 +133,28 @@ Norm.is_a = [Description] -ObjectAggregate.is_a = [Thing, Object & hasPart.some(Object & isMemberOf.some(Collection))] +ObjectAggregate.is_a = [Thing, And([Object, has_part.some(And([Object, is_member_of.some(Collection)]))])] Organization.is_a = [SocialAgent] -Parthood.is_a = [TimeIndexedRelation, includesPart.some(Entity), includesWhole.some(Entity)] +Parthood.is_a = [TimeIndexedRelation, includes_part.some(Entity), includes_whole.some(Entity)] Pattern.is_a = [Relation] Personification.is_a = [SocialAgent] -Place.is_a = [SocialObject, isLocationOf.min(1, Thing)] +Place.is_a = [SocialObject, is_location_of.min(1, Thing)] PlanExecution.is_a = [Situation] PlanExecution.equivalent_to = [satisfies.some(Plan)] -Project.is_a = [Plan, definesRole.some(Role), definesTask.some(Task)] +Project.is_a = [Plan, defines_role.some(Role), defines_task.some(Task)] -Right.is_a = [Description, definesRole.min(2, Thing), definesTask.min(1, Thing)] +Right.is_a = [Description, defines_role.min(2, Thing), defines_task.min(1, Thing)] -SocialPerson.is_a = [Person, SocialAgent, actsThrough.exactly(1, Thing)] +SocialPerson.is_a = [Person, SocialAgent, acts_through.exactly(1, Thing)] -SpatioTemporalRegion.is_a = [Region, hasConstituent.some(SpaceRegion), hasConstituent.some(TimeInterval)] +SpatioTemporalRegion.is_a = [Region, has_constituent.some(SpaceRegion), has_constituent.some(TimeInterval)] TypeCollection.is_a = [Collection] @@ -163,460 +163,460 @@ WorkflowExecution.is_a = [Situation] WorkflowExecution.equivalent_to = [satisfies.some(Workflow)] -hasRegionDataValue.is_a = [DatatypeProperty, hasDataValue] -hasRegionDataValue.domain = [Region] +has_region_data_value.is_a = [DatatypeProperty, has_data_value] +has_region_data_value.domain = [Region] -hasDataValue.is_a = [DatatypeProperty] -hasDataValue.domain = [Entity] +has_data_value.is_a = [DatatypeProperty] +has_data_value.domain = [Entity] -hasEventDate.is_a = [DatatypeProperty, hasDataValue] -hasEventDate.domain = [Event] -hasEventDate.range = [] +has_event_date.is_a = [DatatypeProperty, has_data_value] +has_event_date.domain = [Event] +has_event_date.range = [datetime] -hasIntervalDate.is_a = [DatatypeProperty, hasRegionDataValue] -hasIntervalDate.domain = [TimeInterval] -hasIntervalDate.range = [] +has_interval_date.is_a = [DatatypeProperty, has_region_data_value] +has_interval_date.domain = [TimeInterval] +has_interval_date.range = [datetime] -hasParameterDataValue.is_a = [DatatypeProperty, hasDataValue] -hasParameterDataValue.domain = [Parameter] +has_parameter_data_value.is_a = [DatatypeProperty, has_data_value] +has_parameter_data_value.domain = [Parameter] -precedes.is_a = [ObjectProperty, TransitiveProperty, associatedWith] +precedes.is_a = [ObjectProperty, TransitiveProperty, associated_with] precedes.domain = [Entity] precedes.range = [Entity] -defines.is_a = [ObjectProperty, usesConcept] +defines.is_a = [ObjectProperty, uses_concept] defines.domain = [Description] defines.range = [Concept] -definesTask.is_a = [ObjectProperty, defines] -definesTask.domain = [Description] -definesTask.range = [Task] +defines_task.is_a = [ObjectProperty, defines] +defines_task.domain = [Description] +defines_task.range = [Task] -isDescribedBy.is_a = [ObjectProperty, associatedWith] -isDescribedBy.domain = [Entity] -isDescribedBy.range = [Description] +is_described_by.is_a = [ObjectProperty, associated_with] +is_described_by.domain = [Entity] +is_described_by.range = [Description] -associatedWith.is_a = [ObjectProperty, SymmetricProperty, TransitiveProperty] -associatedWith.domain = [Entity] -associatedWith.range = [Entity] +associated_with.is_a = [ObjectProperty, SymmetricProperty, TransitiveProperty] +associated_with.domain = [Entity] +associated_with.range = [Entity] -follows.is_a = [ObjectProperty, TransitiveProperty, associatedWith] +follows.is_a = [ObjectProperty, TransitiveProperty, associated_with] follows.domain = [Entity] follows.range = [Entity] -isEventIncludedIn.is_a = [ObjectProperty, hasSetting] -isEventIncludedIn.domain = [Event] -isEventIncludedIn.range = [Situation] +is_event_included_in.is_a = [ObjectProperty, has_setting] +is_event_included_in.domain = [Event] +is_event_included_in.range = [Situation] -overlaps.is_a = [ObjectProperty, SymmetricProperty, associatedWith] +overlaps.is_a = [ObjectProperty, SymmetricProperty, associated_with] overlaps.domain = [Entity] overlaps.range = [Entity] -isLocationOf.is_a = [ObjectProperty, associatedWith] -isLocationOf.domain = [Entity] -isLocationOf.range = [Entity] +is_location_of.is_a = [ObjectProperty, associated_with] +is_location_of.domain = [Entity] +is_location_of.range = [Entity] -definesRole.is_a = [ObjectProperty, defines] -definesRole.domain = [Description] -definesRole.range = [Role] +defines_role.is_a = [ObjectProperty, defines] +defines_role.domain = [Description] +defines_role.range = [Role] -describes.is_a = [ObjectProperty, associatedWith] +describes.is_a = [ObjectProperty, associated_with] describes.domain = [Description] describes.range = [Entity] -includesEvent.is_a = [ObjectProperty, isSettingFor] -includesEvent.domain = [Situation] -includesEvent.range = [Event] +includes_event.is_a = [ObjectProperty, is_setting_for] +includes_event.domain = [Situation] +includes_event.range = [Event] -hasMember.is_a = [ObjectProperty, associatedWith] -hasMember.domain = [Collection] -hasMember.range = [Entity] +has_member.is_a = [ObjectProperty, associated_with] +has_member.domain = [Collection] +has_member.range = [Entity] -hasConstituent.is_a = [ObjectProperty, associatedWith] -hasConstituent.domain = [Entity] -hasConstituent.range = [Entity] +has_constituent.is_a = [ObjectProperty, associated_with] +has_constituent.domain = [Entity] +has_constituent.range = [Entity] -hasRegion.is_a = [ObjectProperty, associatedWith] -hasRegion.domain = [Entity] -hasRegion.range = [Region] +has_region.is_a = [ObjectProperty, associated_with] +has_region.domain = [Entity] +has_region.range = [Region] -hasPart.is_a = [ObjectProperty, TransitiveProperty, ReflexiveProperty, associatedWith] -hasPart.domain = [Entity] -hasPart.range = [Entity] +has_part.is_a = [ObjectProperty, TransitiveProperty, ReflexiveProperty, associated_with] +has_part.domain = [Entity] +has_part.range = [Entity] -hasQuality.is_a = [ObjectProperty, associatedWith] -hasQuality.domain = [Entity] -hasQuality.range = [Quality] +has_quality.is_a = [ObjectProperty, associated_with] +has_quality.domain = [Entity] +has_quality.range = [Quality] -hasParameter.is_a = [ObjectProperty, isRelatedToConcept] -hasParameter.domain = [Concept] -hasParameter.range = [Parameter] +has_parameter.is_a = [ObjectProperty, is_related_to_concept] +has_parameter.domain = [Concept] +has_parameter.range = [Parameter] -hasComponent.is_a = [ObjectProperty, AsymmetricProperty, hasProperPart] -hasComponent.domain = [Entity] -hasComponent.range = [Entity] +has_component.is_a = [ObjectProperty, AsymmetricProperty, has_proper_part] +has_component.domain = [Entity] +has_component.range = [Entity] -directlyPrecedes.is_a = [ObjectProperty, precedes] -directlyPrecedes.domain = [Entity] -directlyPrecedes.range = [Entity] +directly_precedes.is_a = [ObjectProperty, precedes] +directly_precedes.domain = [Entity] +directly_precedes.range = [Entity] -directlyFollows.is_a = [ObjectProperty, follows] -directlyFollows.domain = [Entity] -directlyFollows.range = [Entity] +directly_follows.is_a = [ObjectProperty, follows] +directly_follows.domain = [Entity] +directly_follows.range = [Entity] -isRelatedToConcept.is_a = [ObjectProperty, SymmetricProperty, associatedWith] -isRelatedToConcept.domain = [Concept] -isRelatedToConcept.range = [Concept] +is_related_to_concept.is_a = [ObjectProperty, SymmetricProperty, associated_with] +is_related_to_concept.domain = [Concept] +is_related_to_concept.range = [Concept] -involvesAgent.is_a = [ObjectProperty, hasParticipant] -involvesAgent.domain = [Event] -involvesAgent.range = [Agent] +involves_agent.is_a = [ObjectProperty, has_participant] +involves_agent.domain = [Event] +involves_agent.range = [Agent] -includesObject.is_a = [ObjectProperty, isSettingFor] -includesObject.domain = [Situation] -includesObject.range = [Object] +includes_object.is_a = [ObjectProperty, is_setting_for] +includes_object.domain = [Situation] +includes_object.range = [Object] -isReferenceOf.is_a = [ObjectProperty, associatedWith] -isReferenceOf.domain = [Entity] -isReferenceOf.range = [InformationObject] +is_reference_of.is_a = [ObjectProperty, associated_with] +is_reference_of.domain = [Entity] +is_reference_of.range = [InformationObject] -isSettingFor.is_a = [ObjectProperty, associatedWith] -isSettingFor.domain = [Situation] -isSettingFor.range = [Entity] +is_setting_for.is_a = [ObjectProperty, associated_with] +is_setting_for.domain = [Situation] +is_setting_for.range = [Entity] -hasParticipant.is_a = [ObjectProperty, associatedWith] -hasParticipant.domain = [Event] -hasParticipant.range = [Object] +has_participant.is_a = [ObjectProperty, associated_with] +has_participant.domain = [Event] +has_participant.range = [Object] -isRegionFor.is_a = [ObjectProperty, associatedWith] -isRegionFor.domain = [Region] -isRegionFor.range = [Entity] +is_region_for.is_a = [ObjectProperty, associated_with] +is_region_for.domain = [Region] +is_region_for.range = [Entity] -isParticipantIn.is_a = [ObjectProperty, associatedWith] -isParticipantIn.domain = [Object] -isParticipantIn.range = [Event] +is_participant_in.is_a = [ObjectProperty, associated_with] +is_participant_in.domain = [Object] +is_participant_in.range = [Event] -isRoleDefinedIn.is_a = [ObjectProperty, isDefinedIn] -isRoleDefinedIn.domain = [Role] -isRoleDefinedIn.range = [Description] +is_role_defined_in.is_a = [ObjectProperty, is_defined_in] +is_role_defined_in.domain = [Role] +is_role_defined_in.range = [Description] -isConstituentOf.is_a = [ObjectProperty, associatedWith] -isConstituentOf.domain = [Entity] -isConstituentOf.range = [Entity] +is_constituent_of.is_a = [ObjectProperty, associated_with] +is_constituent_of.domain = [Entity] +is_constituent_of.range = [Entity] -isQualityOf.is_a = [ObjectProperty, associatedWith] -isQualityOf.domain = [Quality] -isQualityOf.range = [Entity] +is_quality_of.is_a = [ObjectProperty, associated_with] +is_quality_of.domain = [Quality] +is_quality_of.range = [Entity] -isObjectIncludedIn.is_a = [ObjectProperty, hasSetting] -isObjectIncludedIn.domain = [Object] -isObjectIncludedIn.range = [Situation] +is_object_included_in.is_a = [ObjectProperty, has_setting] +is_object_included_in.domain = [Object] +is_object_included_in.range = [Situation] -isDefinedIn.is_a = [ObjectProperty, isConceptUsedIn] -isDefinedIn.domain = [Concept] -isDefinedIn.range = [Description] +is_defined_in.is_a = [ObjectProperty, is_concept_used_in] +is_defined_in.domain = [Concept] +is_defined_in.range = [Description] -isRealizedBy.is_a = [ObjectProperty, associatedWith] -isRealizedBy.domain = [InformationObject] -isRealizedBy.range = [InformationRealization] +is_realized_by.is_a = [ObjectProperty, associated_with] +is_realized_by.domain = [InformationObject] +is_realized_by.range = [InformationRealization] -hasRole.is_a = [ObjectProperty, isClassifiedBy] -hasRole.domain = [Object] -hasRole.range = [Role] +has_role.is_a = [ObjectProperty, is_classified_by] +has_role.domain = [Object] +has_role.range = [Role] -isRoleOf.is_a = [ObjectProperty, classifies] -isRoleOf.domain = [Role] -isRoleOf.range = [Object] +is_role_of.is_a = [ObjectProperty, classifies] +is_role_of.domain = [Role] +is_role_of.range = [Object] -realizes.is_a = [ObjectProperty, associatedWith] +realizes.is_a = [ObjectProperty, associated_with] realizes.domain = [InformationRealization] realizes.range = [InformationObject] -isParameterFor.is_a = [ObjectProperty, isRelatedToConcept] -isParameterFor.domain = [Parameter] -isParameterFor.range = [Concept] +is_parameter_for.is_a = [ObjectProperty, is_related_to_concept] +is_parameter_for.domain = [Parameter] +is_parameter_for.range = [Concept] -hasTask.is_a = [ObjectProperty, isRelatedToConcept] -hasTask.domain = [Role] -hasTask.range = [Task] +has_task.is_a = [ObjectProperty, is_related_to_concept] +has_task.domain = [Role] +has_task.range = [Task] -hasLocation.is_a = [ObjectProperty, associatedWith] -hasLocation.domain = [Entity] -hasLocation.range = [Entity] +has_location.is_a = [ObjectProperty, associated_with] +has_location.domain = [Entity] +has_location.range = [Entity] -isComponentOf.is_a = [ObjectProperty, AsymmetricProperty, isPropertPartOf] -isComponentOf.domain = [Entity] -isComponentOf.range = [Entity] +is_component_of.is_a = [ObjectProperty, AsymmetricProperty, is_propert_part_of] +is_component_of.domain = [Entity] +is_component_of.range = [Entity] -isClassifiedBy.is_a = [ObjectProperty, associatedWith] -isClassifiedBy.domain = [Entity] -isClassifiedBy.range = [Concept] +is_classified_by.is_a = [ObjectProperty, associated_with] +is_classified_by.domain = [Entity] +is_classified_by.range = [Concept] -classifies.is_a = [ObjectProperty, associatedWith] +classifies.is_a = [ObjectProperty, associated_with] classifies.domain = [Concept] classifies.range = [Entity] -isAbout.is_a = [ObjectProperty, associatedWith] -isAbout.domain = [InformationObject] -isAbout.range = [Entity] +is_about.is_a = [ObjectProperty, associated_with] +is_about.domain = [InformationObject] +is_about.range = [Entity] -hasSetting.is_a = [ObjectProperty, associatedWith] -hasSetting.domain = [Entity] -hasSetting.range = [Situation] +has_setting.is_a = [ObjectProperty, associated_with] +has_setting.domain = [Entity] +has_setting.range = [Situation] -isTaskDefinedIn.is_a = [ObjectProperty, isDefinedIn] -isTaskDefinedIn.domain = [Task] -isTaskDefinedIn.range = [Description] +is_task_defined_in.is_a = [ObjectProperty, is_defined_in] +is_task_defined_in.domain = [Task] +is_task_defined_in.range = [Description] -hasCommonBoundary.is_a = [ObjectProperty, SymmetricProperty, associatedWith] -hasCommonBoundary.domain = [Entity] -hasCommonBoundary.range = [Entity] +has_common_boundary.is_a = [ObjectProperty, SymmetricProperty, associated_with] +has_common_boundary.domain = [Entity] +has_common_boundary.range = [Entity] -isTaskOf.is_a = [ObjectProperty, isRelatedToConcept] -isTaskOf.domain = [Task] -isTaskOf.range = [Role] +is_task_of.is_a = [ObjectProperty, is_related_to_concept] +is_task_of.domain = [Task] +is_task_of.range = [Role] -hasPostcondition.is_a = [ObjectProperty, directlyPrecedes] -hasPostcondition.domain = [Event | Situation] -hasPostcondition.range = [Event | Situation] +has_postcondition.is_a = [ObjectProperty, directly_precedes] +has_postcondition.domain = [Or([Event, Situation])] +has_postcondition.range = [Or([Event, Situation])] -hasPrecondition.is_a = [ObjectProperty, directlyFollows] -hasPrecondition.domain = [Event | Situation] -hasPrecondition.range = [Event | Situation] +has_precondition.is_a = [ObjectProperty, directly_follows] +has_precondition.domain = [Or([Event, Situation])] +has_precondition.range = [Or([Event, Situation])] -actsFor.is_a = [ObjectProperty, associatedWith] -actsFor.domain = [Agent] -actsFor.range = [SocialAgent] +acts_for.is_a = [ObjectProperty, associated_with] +acts_for.domain = [Agent] +acts_for.range = [SocialAgent] -executesTask.is_a = [ObjectProperty, isClassifiedBy] -executesTask.domain = [Action] -executesTask.range = [Task] +executes_task.is_a = [ObjectProperty, is_classified_by] +executes_task.domain = [Action] +executes_task.range = [Task] -expresses.is_a = [ObjectProperty, associatedWith] +expresses.is_a = [ObjectProperty, associated_with] expresses.domain = [InformationObject] expresses.range = [SocialObject] -isExecutedIn.is_a = [ObjectProperty, classifies] -isExecutedIn.domain = [Task] -isExecutedIn.range = [Action] +is_executed_in.is_a = [ObjectProperty, classifies] +is_executed_in.domain = [Task] +is_executed_in.range = [Action] -isExpressedBy.is_a = [ObjectProperty, associatedWith] -isExpressedBy.domain = [SocialObject] -isExpressedBy.range = [InformationObject] +is_expressed_by.is_a = [ObjectProperty, associated_with] +is_expressed_by.domain = [SocialObject] +is_expressed_by.range = [InformationObject] -isPartOf.is_a = [ObjectProperty, TransitiveProperty, ReflexiveProperty, associatedWith] -isPartOf.domain = [Entity] -isPartOf.range = [Entity] +is_part_of.is_a = [ObjectProperty, TransitiveProperty, ReflexiveProperty, associated_with] +is_part_of.domain = [Entity] +is_part_of.range = [Entity] -satisfies.is_a = [ObjectProperty, associatedWith] +satisfies.is_a = [ObjectProperty, associated_with] satisfies.domain = [Situation] satisfies.range = [Description] -realizesSelfInformation.is_a = [ObjectProperty, realizesInformationAbout] +realizes_self_information.is_a = [ObjectProperty, realizes_information_about] -actsThrough.is_a = [ObjectProperty, associatedWith] -actsThrough.domain = [SocialAgent] -actsThrough.range = [Agent] +acts_through.is_a = [ObjectProperty, associated_with] +acts_through.domain = [SocialAgent] +acts_through.range = [Agent] -characterizes.is_a = [ObjectProperty, associatedWith] +characterizes.is_a = [ObjectProperty, associated_with] characterizes.domain = [Concept] characterizes.range = [Collection] -isCharacterizedBy.is_a = [ObjectProperty, associatedWith] -isCharacterizedBy.domain = [Collection] -isCharacterizedBy.range = [Concept] +is_characterized_by.is_a = [ObjectProperty, associated_with] +is_characterized_by.domain = [Collection] +is_characterized_by.range = [Concept] -conceptualizes.is_a = [ObjectProperty, associatedWith] +conceptualizes.is_a = [ObjectProperty, associated_with] conceptualizes.domain = [Agent] conceptualizes.range = [SocialObject] -isConceptualizedBy.is_a = [ObjectProperty, associatedWith] -isConceptualizedBy.domain = [SocialObject] -isConceptualizedBy.range = [Agent] +is_conceptualized_by.is_a = [ObjectProperty, associated_with] +is_conceptualized_by.domain = [SocialObject] +is_conceptualized_by.range = [Agent] -concretelyExpresses.is_a = [ObjectProperty, associatedWith] -concretelyExpresses.domain = [InformationRealization] -concretelyExpresses.range = [SocialObject] +concretely_expresses.is_a = [ObjectProperty, associated_with] +concretely_expresses.domain = [InformationRealization] +concretely_expresses.range = [SocialObject] -isConcretelyExpressedBy.is_a = [ObjectProperty, associatedWith] -isConcretelyExpressedBy.domain = [SocialObject] -isConcretelyExpressedBy.range = [InformationRealization] +is_concretely_expressed_by.is_a = [ObjectProperty, associated_with] +is_concretely_expressed_by.domain = [SocialObject] +is_concretely_expressed_by.range = [InformationRealization] -coparticipatesWith.is_a = [ObjectProperty, SymmetricProperty, associatedWith] -coparticipatesWith.domain = [Object] -coparticipatesWith.range = [Object] +coparticipates_with.is_a = [ObjectProperty, SymmetricProperty, associated_with] +coparticipates_with.domain = [Object] +coparticipates_with.range = [Object] -covers.is_a = [ObjectProperty, associatedWith] +covers.is_a = [ObjectProperty, associated_with] covers.domain = [Concept] covers.range = [Collection] -isCoveredBy.is_a = [ObjectProperty, associatedWith] -isCoveredBy.domain = [Collection] -isCoveredBy.range = [Concept] +is_covered_by.is_a = [ObjectProperty, associated_with] +is_covered_by.domain = [Collection] +is_covered_by.range = [Concept] -usesConcept.is_a = [ObjectProperty, associatedWith] -usesConcept.domain = [Description] -usesConcept.range = [Concept] +uses_concept.is_a = [ObjectProperty, associated_with] +uses_concept.domain = [Description] +uses_concept.range = [Concept] -expands.is_a = [ObjectProperty, isRelatedToDescription] +expands.is_a = [ObjectProperty, is_related_to_description] expands.domain = [Description] expands.range = [Description] -isRelatedToDescription.is_a = [ObjectProperty, SymmetricProperty, associatedWith] -isRelatedToDescription.domain = [Description] -isRelatedToDescription.range = [Description] +is_related_to_description.is_a = [ObjectProperty, SymmetricProperty, associated_with] +is_related_to_description.domain = [Description] +is_related_to_description.range = [Description] -isExpandedIn.is_a = [ObjectProperty, isRelatedToDescription] -isExpandedIn.domain = [Description] -isExpandedIn.range = [Description] +is_expanded_in.is_a = [ObjectProperty, is_related_to_description] +is_expanded_in.domain = [Description] +is_expanded_in.range = [Description] -expressesConcept.is_a = [ObjectProperty, expresses] -expressesConcept.domain = [InformationObject] -expressesConcept.range = [Concept] +expresses_concept.is_a = [ObjectProperty, expresses] +expresses_concept.domain = [InformationObject] +expresses_concept.range = [Concept] -isConceptExpressedBy.is_a = [ObjectProperty, isExpressedBy] -isConceptExpressedBy.domain = [Concept] -isConceptExpressedBy.range = [InformationObject] +is_concept_expressed_by.is_a = [ObjectProperty, is_expressed_by] +is_concept_expressed_by.domain = [Concept] +is_concept_expressed_by.range = [InformationObject] -farFrom.is_a = [ObjectProperty, SymmetricProperty, associatedWith] -farFrom.domain = [Entity] -farFrom.range = [Entity] +far_from.is_a = [ObjectProperty, SymmetricProperty, associated_with] +far_from.domain = [Entity] +far_from.range = [Entity] -hasProperPart.is_a = [ObjectProperty, TransitiveProperty, hasPart] +has_proper_part.is_a = [ObjectProperty, TransitiveProperty, has_part] -hasConstraint.is_a = [ObjectProperty, isClassifiedBy] -hasConstraint.domain = [Entity] -hasConstraint.range = [Parameter] +has_constraint.is_a = [ObjectProperty, is_classified_by] +has_constraint.domain = [Entity] +has_constraint.range = [Parameter] -isConstraintFor.is_a = [ObjectProperty, classifies] -isConstraintFor.domain = [Parameter] -isConstraintFor.range = [Entity] +is_constraint_for.is_a = [ObjectProperty, classifies] +is_constraint_for.domain = [Parameter] +is_constraint_for.range = [Entity] -isMemberOf.is_a = [ObjectProperty, associatedWith] -isMemberOf.domain = [Entity] -isMemberOf.range = [Collection] +is_member_of.is_a = [ObjectProperty, associated_with] +is_member_of.domain = [Entity] +is_member_of.range = [Collection] -includesWhole.is_a = [ObjectProperty, isSettingFor] +includes_whole.is_a = [ObjectProperty, is_setting_for] -includesPart.is_a = [ObjectProperty, isSettingFor] +includes_part.is_a = [ObjectProperty, is_setting_for] -isPostconditionOf.is_a = [ObjectProperty, directlyFollows] -isPostconditionOf.domain = [Event | Situation] -isPostconditionOf.range = [Event | Situation] +is_postcondition_of.is_a = [ObjectProperty, directly_follows] +is_postcondition_of.domain = [Or([Event, Situation])] +is_postcondition_of.range = [Or([Event, Situation])] -isPreconditionOf.is_a = [ObjectProperty, directlyPrecedes] -isPreconditionOf.domain = [Event | Situation] -isPreconditionOf.range = [Event | Situation] +is_precondition_of.is_a = [ObjectProperty, directly_precedes] +is_precondition_of.domain = [Or([Event, Situation])] +is_precondition_of.range = [Or([Event, Situation])] -isPropertPartOf.is_a = [ObjectProperty, TransitiveProperty, isPartOf] +is_propert_part_of.is_a = [ObjectProperty, TransitiveProperty, is_part_of] -hasTimeInterval.is_a = [ObjectProperty, hasRegion] -hasTimeInterval.domain = [Event] -hasTimeInterval.range = [TimeInterval] +has_time_interval.is_a = [ObjectProperty, has_region] +has_time_interval.domain = [Event] +has_time_interval.range = [TimeInterval] -isTimeIntervalOf.is_a = [ObjectProperty, isRegionFor] -isTimeIntervalOf.domain = [TimeInterval] -isTimeIntervalOf.range = [Event] +is_time_interval_of.is_a = [ObjectProperty, is_region_for] +is_time_interval_of.domain = [TimeInterval] +is_time_interval_of.range = [Event] -includesAction.is_a = [ObjectProperty, includesEvent] -includesAction.domain = [Situation] -includesAction.range = [Action] +includes_action.is_a = [ObjectProperty, includes_event] +includes_action.domain = [Situation] +includes_action.range = [Action] -isActionIncludedIn.is_a = [ObjectProperty, isEventIncludedIn] -isActionIncludedIn.domain = [Action] -isActionIncludedIn.range = [Situation] +is_action_included_in.is_a = [ObjectProperty, is_event_included_in] +is_action_included_in.domain = [Action] +is_action_included_in.range = [Situation] -includesAgent.is_a = [ObjectProperty, includesObject] -includesAgent.domain = [Situation] -includesAgent.range = [Agent] +includes_agent.is_a = [ObjectProperty, includes_object] +includes_agent.domain = [Situation] +includes_agent.range = [Agent] -isAgentIncludedIn.is_a = [ObjectProperty, isObjectIncludedIn] -isAgentIncludedIn.domain = [Agent] -isAgentIncludedIn.range = [Situation] +is_agent_included_in.is_a = [ObjectProperty, is_object_included_in] +is_agent_included_in.domain = [Agent] +is_agent_included_in.range = [Situation] -includesTime.is_a = [ObjectProperty, isSettingFor] -includesTime.domain = [Situation] -includesTime.range = [TimeInterval] +includes_time.is_a = [ObjectProperty, is_setting_for] +includes_time.domain = [Situation] +includes_time.range = [TimeInterval] -isTimeIncludedIn.is_a = [ObjectProperty, hasSetting] -isTimeIncludedIn.domain = [TimeInterval] -isTimeIncludedIn.range = [Situation] +is_time_included_in.is_a = [ObjectProperty, has_setting] +is_time_included_in.domain = [TimeInterval] +is_time_included_in.range = [Situation] -introduces.is_a = [ObjectProperty, associatedWith] +introduces.is_a = [ObjectProperty, associated_with] introduces.domain = [Description] introduces.range = [SocialAgent] -isIntroducedBy.is_a = [ObjectProperty, associatedWith] -isIntroducedBy.domain = [SocialAgent] -isIntroducedBy.range = [Description] +is_introduced_by.is_a = [ObjectProperty, associated_with] +is_introduced_by.domain = [SocialAgent] +is_introduced_by.range = [Description] -isAgentInvolvedIn.is_a = [ObjectProperty, isParticipantIn] -isAgentInvolvedIn.domain = [Agent] -isAgentInvolvedIn.range = [Event] +is_agent_involved_in.is_a = [ObjectProperty, is_participant_in] +is_agent_involved_in.domain = [Agent] +is_agent_involved_in.range = [Event] -isConceptUsedIn.is_a = [ObjectProperty, associatedWith] -isConceptUsedIn.domain = [Concept] -isConceptUsedIn.range = [Description] +is_concept_used_in.is_a = [ObjectProperty, associated_with] +is_concept_used_in.domain = [Concept] +is_concept_used_in.range = [Description] -isObservableAt.is_a = [ObjectProperty, hasRegion] -isObservableAt.domain = [Entity] -isObservableAt.range = [TimeInterval] +is_observable_at.is_a = [ObjectProperty, has_region] +is_observable_at.domain = [Entity] +is_observable_at.range = [TimeInterval] -isTimeOfObservationOf.is_a = [ObjectProperty, isRegionFor] -isTimeOfObservationOf.domain = [TimeInterval] -isTimeOfObservationOf.range = [Entity] +is_time_of_observation_of.is_a = [ObjectProperty, is_region_for] +is_time_of_observation_of.domain = [TimeInterval] +is_time_of_observation_of.range = [Entity] -isParametrizedBy.is_a = [ObjectProperty, isClassifiedBy] -isParametrizedBy.domain = [Region] -isParametrizedBy.range = [Parameter] +is_parametrized_by.is_a = [ObjectProperty, is_classified_by] +is_parametrized_by.domain = [Region] +is_parametrized_by.range = [Parameter] parametrizes.is_a = [ObjectProperty, classifies] parametrizes.domain = [Parameter] parametrizes.range = [Region] -isReferenceOfInformationRealizedBy.is_a = [ObjectProperty, associatedWith] -isReferenceOfInformationRealizedBy.domain = [Entity] -isReferenceOfInformationRealizedBy.range = [InformationRealization] +is_reference_of_information_realized_by.is_a = [ObjectProperty, associated_with] +is_reference_of_information_realized_by.domain = [Entity] +is_reference_of_information_realized_by.range = [InformationRealization] -realizesInformationAbout.is_a = [ObjectProperty, associatedWith] -realizesInformationAbout.domain = [InformationRealization] -realizesInformationAbout.range = [Entity] +realizes_information_about.is_a = [ObjectProperty, associated_with] +realizes_information_about.domain = [InformationRealization] +realizes_information_about.range = [Entity] -isSatisfiedBy.is_a = [ObjectProperty, associatedWith] -isSatisfiedBy.domain = [Description] -isSatisfiedBy.range = [Situation] +is_satisfied_by.is_a = [ObjectProperty, associated_with] +is_satisfied_by.domain = [Description] +is_satisfied_by.range = [Situation] -isSpecializedBy.is_a = [ObjectProperty, TransitiveProperty, associatedWith] -isSpecializedBy.domain = [SocialObject] -isSpecializedBy.range = [SocialObject] +is_specialized_by.is_a = [ObjectProperty, TransitiveProperty, associated_with] +is_specialized_by.domain = [SocialObject] +is_specialized_by.range = [SocialObject] -specializes.is_a = [ObjectProperty, TransitiveProperty, associatedWith] +specializes.is_a = [ObjectProperty, TransitiveProperty, associated_with] specializes.domain = [SocialObject] specializes.range = [SocialObject] -isSubordinatedTo.is_a = [ObjectProperty, directlyFollows, isRelatedToConcept] -isSubordinatedTo.domain = [Concept] -isSubordinatedTo.range = [Concept] +is_subordinated_to.is_a = [ObjectProperty, directly_follows, is_related_to_concept] +is_subordinated_to.domain = [Concept] +is_subordinated_to.range = [Concept] -isSuperordinatedTo.is_a = [ObjectProperty, directlyPrecedes, isRelatedToConcept] -isSuperordinatedTo.domain = [Concept] -isSuperordinatedTo.range = [Concept] +is_superordinated_to.is_a = [ObjectProperty, directly_precedes, is_related_to_concept] +is_superordinated_to.domain = [Concept] +is_superordinated_to.range = [Concept] -isUnifiedBy.is_a = [ObjectProperty, associatedWith] -isUnifiedBy.domain = [Collection] -isUnifiedBy.range = [Description] +is_unified_by.is_a = [ObjectProperty, associated_with] +is_unified_by.domain = [Collection] +is_unified_by.range = [Description] -unifies.is_a = [ObjectProperty, associatedWith] +unifies.is_a = [ObjectProperty, associated_with] unifies.domain = [Description] unifies.range = [Collection] -nearTo.is_a = [ObjectProperty, SymmetricProperty, associatedWith] -nearTo.domain = [Entity] -nearTo.range = [Entity] +near_to.is_a = [ObjectProperty, SymmetricProperty, associated_with] +near_to.domain = [Entity] +near_to.range = [Entity] -sameSettingAs.is_a = [ObjectProperty, SymmetricProperty, associatedWith] -sameSettingAs.domain = [Entity] -sameSettingAs.range = [Entity] +same_setting_as.is_a = [ObjectProperty, SymmetricProperty, associated_with] +same_setting_as.domain = [Entity] +same_setting_as.range = [Entity] diff --git a/src/pycrap/ontologies/soma/classes.py b/src/pycrap/ontologies/soma/classes.py index 154cea66d..c5468e4f6 100644 --- a/src/pycrap/ontologies/soma/classes.py +++ b/src/pycrap/ontologies/soma/classes.py @@ -554,7 +554,7 @@ class PhysicalAttribute(Base): """ -class API_Specification(Base): +class APISpecification(Base): """ An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build or use an API is called an API specification. @@ -813,7 +813,7 @@ class ArchiveText(Base): """ -class Digital_File(Base): +class DigitalFile(Base): """ Any file that exists as a digital resource (but not its content), e.g., a text file actually laying on some hard drive, but not the contained text. """ @@ -827,7 +827,7 @@ class ArchiveFormat(Base): """ -class File_format(Base): +class FileFormat(Base): """ A File Format is a standard way that information is encoded for storage in a computer file. It specifies how bits are used to encode information in a digital storage medium. @@ -841,7 +841,7 @@ class FileConfiguration(Base): """ -class Structured_Text(Base): +class StructuredText(Base): """ Any Text that adheres to some rules that are in any way more specific than natural language and that cannot be made sense of without knowing said rules. """ @@ -1291,7 +1291,7 @@ class SocialQuality(Base): """ -class ClientServer_Specification(Base): +class ClientServerSpecification(Base): """ An API Secification that describes the well known Client-Server pattern: @@ -1481,7 +1481,7 @@ class Composing(Base): """ -class Computer_Language(Base): +class ComputerLanguage(Base): """ A computer language is a formal language used in communication with a computer. @@ -1497,13 +1497,13 @@ class FormalLanguage(Base): """ -class Computer_Program(Base): +class ComputerProgram(Base): """ The Program itself (the specific set of instruction in a Programming Language), not the file that it is contained in nor the implemented algorithm! """ -class Programming_Language(Base): +class ProgrammingLanguage(Base): """ Any Programming Language, including both human-readable like Java and non-human-readable languages like binary machine code. """ @@ -2058,7 +2058,7 @@ class ExecutableFile(Base): """ -class Executable_Code(Base): +class ExecutableCode(Base): """ Executable Code is Code that when compiled / interpreted, has some clear entrance point and can be executed. Note the difference to an Executable File, which is the file that contains such (compiled) code. """ @@ -2453,13 +2453,13 @@ class PluginSpecification(Base): """ -class Humanreadable_Programming_Language(Base): +class HumanreadableProgrammingLanguage(Base): """ A Programming language like Java, Python etc. but not binary machine code. """ -class Source_Code(Base): +class SourceCode(Base): """ The Source Code itself (the specific set of instruction in a human-readable Programming Language), not the file that it is contained in nor the implemented algorithm! """ @@ -2724,7 +2724,7 @@ class PhysicalAction(Base): """ -class Markup_Language(Base): +class MarkupLanguage(Base): """ Markup refers to data included in an electronic document which is distinct from the document's content in that it is typically not included in representations of the document for end users, for example on paper or a computer screen, or in an audio stream. Markup is often used to control the display of the document or to enrich its content to facilitate automated processing. A markup language is a set of rules governing what markup information may be included in a document and how it is combined with the content of the document in a way to facilitate use by humans and computer programs. @@ -2868,7 +2868,7 @@ class MovingTo(Base): """ -class Natural_Language(Base): +class NaturalLanguage(Base): """ A Natural Language is any language that has evolved naturally in humans through use and repetition without conscious planning or premeditation. @@ -2876,7 +2876,7 @@ class Natural_Language(Base): """ -class Natural_Language_Text(Base): +class NaturalLanguageText(Base): """ A Text in a Natural Language. """ @@ -2890,7 +2890,7 @@ class Ontology(Base): """ -class Ontology_Language(Base): +class OntologyLanguage(Base): """ An Ontology Language is a Knowledge Representation Language to describe knowledge about properties of a subject area and how they are related, by defining a set of concepts and categories that represent the subject using logic. Examples are the different OWL Profiles. @@ -3342,7 +3342,7 @@ class Simulating(Base): """ -class Simulation_Reasoner(Base): +class SimulationReasoner(Base): """ A Simulation-based Reasoner is a simulation that is used as a reasoner, where the explicit knowledge corresponds to the initial situation, and the implicit knowlegde corresponds to the situation that is derived from that by simulating some unfolding processes. """ @@ -3381,7 +3381,7 @@ class SocialState(Base): """ -class Software_Configuration(Base): +class SoftwareConfiguration(Base): ... diff --git a/src/pycrap/ontologies/soma/data_properties.py b/src/pycrap/ontologies/soma/data_properties.py index 965bfa520..01befda3b 100644 --- a/src/pycrap/ontologies/soma/data_properties.py +++ b/src/pycrap/ontologies/soma/data_properties.py @@ -2,22 +2,22 @@ from .classes import * -class hasColorValue(BaseProperty): +class has_color_value(BaseProperty): """ Associates a ColorRegion to numerical data describing the color. """ -class hasRegionDataValue(BaseProperty): +class has_region_data_value(BaseProperty): """ A datatype property that encodes values for a Region, e.g. a float for the Region Height. """ -class hasDataFormat(BaseProperty): +class has_data_format(BaseProperty): """ A property linking an InformationRealization to a string specifying a format name, e.g. URDF or STL. """ -class hasDataValue(BaseProperty): +class has_data_value(BaseProperty): """ A datatype property that encodes values from a datatype for an Entity. There are several ways to encode values in DOLCE (Ultralite): @@ -34,162 +34,162 @@ class hasDataValue(BaseProperty): Patterns (4) and (5) should be used instead when a constraint or a selection is modeled, independently from the actual observation of values in the real world. """ -class hasDepth(BaseProperty): +class has_depth(BaseProperty): """ The depth of a shape. """ -class hasShapeParameter(BaseProperty): +class has_shape_parameter(BaseProperty): """ Associates a SpaceRegion to some parameter value describing its shape. This is a fairly generic property, and to capture the semantics of the information associated to the SpaceRegion, its more specific subproperties should be used. """ -class hasEventBegin(BaseProperty): +class has_event_begin(BaseProperty): """ A relation recording when an Event started. In this case, we think of the Event as something unfolding over some span of time. """ -class hasEventTime(BaseProperty): +class has_event_time(BaseProperty): """ Superproperty of hasEventBegin and hasEventEnd, records that an Event happened, or was happening, at a particular time. Using the subproperties captures the richer semantics of that time relative to the event. Using only this superproperty may be appropriate when the Event is construed to take place at a single instant of time. """ -class hasEventEnd(BaseProperty): +class has_event_end(BaseProperty): """ A relation recording when an Event ended. In this case, we think of the Event as something unfolding over some span of time. """ -class hasFilePath(BaseProperty): +class has_file_path(BaseProperty): """ Associates an entity to some file containing data about it. For example, can be used to describe physical objects via a mesh file. """ -class hasForceValue(BaseProperty): +class has_force_value(BaseProperty): """ A value that quantifies a force given in Newton. """ -class hasFrictionValue(BaseProperty): +class has_friction_value(BaseProperty): """ The coefficient of friction denotes the ratio of friction force between touching objects. The coefficient is dimensionless. """ -class hasHSVValue(BaseProperty): +class has_hsv_value(BaseProperty): """ Associates a ColorRegion to numerical data describing the color. This data uses the Hue-Saturation-Value color space. """ -class hasHeight(BaseProperty): +class has_height(BaseProperty): """ The height of a shape. """ -class hasIntervalBegin(BaseProperty): +class has_interval_begin(BaseProperty): """ A relation recording when some TimeInterval started. """ -class hasIntervalTime(BaseProperty): +class has_interval_time(BaseProperty): """ Superproperty of relations used to connect moments in time to a TimeInterval. """ -class hasIntervalEnd(BaseProperty): +class has_interval_end(BaseProperty): """ A relation recording when a TimeInterval ended. """ -class hasJointEffort(BaseProperty): +class has_joint_effort(BaseProperty): """ The effort applied in a joint given in N (prismatic joint) or N*m (hinged joints). """ -class hasJointParameter(BaseProperty): +class has_joint_parameter(BaseProperty): """ Assigns a value for an attribute of a joint. """ -class hasJointEffortLimit(BaseProperty): +class has_joint_effort_limit(BaseProperty): """ The maximum effort applied in a joint given in N (prismatic joint) or N*m (hinged joints). """ -class hasJointPosition(BaseProperty): +class has_joint_position(BaseProperty): """ The position of a joint given in m (prismatic joints) or rad (hinged joints). """ -class hasJointPositionMax(BaseProperty): +class has_joint_position_max(BaseProperty): """ The maximum position of a joint given in m (prismatic joints) or rad (hinged joints). """ -class hasJointPositionMin(BaseProperty): +class has_joint_position_min(BaseProperty): """ The minimum position of a joint given in m (prismatic joints) or rad (hinged joints). """ -class hasJointVelocity(BaseProperty): +class has_joint_velocity(BaseProperty): """ The velocity of a joint given in m/s (prismatic joints) or rad/s (hinged joints). """ -class hasJointVelocityLimit(BaseProperty): +class has_joint_velocity_limit(BaseProperty): """ The maximum velocity of a joint given in m/s (prismatic joints) or rad/s (hinged joints). """ -class hasLength(BaseProperty): +class has_length(BaseProperty): """ The length of a shape. """ -class hasMassValue(BaseProperty): +class has_mass_value(BaseProperty): """ The mass value of a physical object in kilogram. """ -class hasNameString(BaseProperty): +class has_name_string(BaseProperty): """ A relation recording some identifier associated to an Entity. """ -class hasPersistentIdentifier(BaseProperty): +class has_persistent_identifier(BaseProperty): """ A property linking an InformationRealization to a persistent identifier such as a DOI, which can then be used to obtain an address at which the realization (i.e. digital file) can be retrieved. """ -class hasPositionData(BaseProperty): +class has_position_data(BaseProperty): """ Associates a spatial region to a position. """ -class hasSpaceParameter(BaseProperty): +class has_space_parameter(BaseProperty): """ Associates a SpaceRegion to some parameter value describing it. This is a fairly generic property, and to capture the semantics of the information associated to the SpaceRegion, its more specific subproperties should be used. """ -class hasPriority(BaseProperty): +class has_priority(BaseProperty): """ A relation asserting some entity has a particular priority. """ -class hasRGBValue(BaseProperty): +class has_rgb_value(BaseProperty): """ Associates a ColorRegion to numerical data describing the color. This data uses the Red-Green-Blue color space. """ -class hasRadius(BaseProperty): +class has_radius(BaseProperty): """ The radius of a circular or oval shape. """ -class hasReferenceFrame(BaseProperty): +class has_reference_frame(BaseProperty): """ Gives the name associated to the local coordinate frame of a SpaceRegion. """ -class hasShapeScale(BaseProperty): +class has_shape_scale(BaseProperty): """ The scale of a shape, given as a vector of three real numbers to adjust x, y, z components of vertex vectors. In cases where a shape needs to be flipped compared to the shape described by a mesh, one of the scale components will be negative. @@ -198,12 +198,12 @@ class hasShapeScale(BaseProperty): In robotics, it is not uncommon to encounter shapes that are flipped compared to the shape in a mesh file. This is because robots often have bilateral symmetry, thus it makes sense to reuse the same meshes for corresponding links of the left and right arms. """ -class hasWidth(BaseProperty): +class has_width(BaseProperty): """ The width of a shape. """ -class isReificationOf(BaseProperty): +class is_reification_of(BaseProperty): """ An auxiliary property that is used to generate object individuals, called reifications, from any other Entity, e.g. from relations, classes, data types. These reifications can then be used in DL axioms as any other named individual. """ diff --git a/src/pycrap/ontologies/soma/individuals.py b/src/pycrap/ontologies/soma/individuals.py index 396e77bd6..3946e4261 100644 --- a/src/pycrap/ontologies/soma/individuals.py +++ b/src/pycrap/ontologies/soma/individuals.py @@ -16,32 +16,22 @@ RDFType = Reification(namespace = ontology) ExecutionState_Active.comment = ['The execution state of an ongoing activity.'] -ExecutionState_Active.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-ACT.owl'] ExecutionState_Cancelled.comment = ['The execution state of a cancelled activity.'] -ExecutionState_Cancelled.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-ACT.owl'] ExecutionState_Failed.comment = ['The execution state of a failed activity.'] -ExecutionState_Failed.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-ACT.owl'] ExecutionState_Paused.comment = ['The execution state of a paused activity.'] -ExecutionState_Paused.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-ACT.owl'] ExecutionState_Pending.comment = ['The execution state of a pending activity.'] -ExecutionState_Pending.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-ACT.owl'] ExecutionState_Succeeded.comment = ['The execution state of a succeeded activity.'] -ExecutionState_Succeeded.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-ACT.owl'] FailWFNoContinuation.comment = ['A particular kind of failure: the workflow fails because there is no way to continue it, and the normal exit has not been reached.'] -FailWFNoContinuation.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-WF.owl'] FailWFNondeterministicContinuation.comment = ['A particular kind of failure: it is not clear how to continue a workflow because several possibilities exist.'] -FailWFNondeterministicContinuation.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-WF.owl'] FailWFUninterpretableTask.comment = ['A particular kind of failure: a task is not recognized and not associated to anything that could execute it, nor to a workflow that could detail its structure into simpler structure.'] -FailWFUninterpretableTask.isDefinedBy = ['http://www.ease-crc.org/ont/SOMA-WF.owl'] -RDFType.isReificationOf = ['http://www.w3.org/2001/XMLSchema#type'] -RDFType.isDefinedBy = [SOMA.owl] +RDFType.is_reification_of = ['http://www.w3.org/2001/XMLSchema#type'] diff --git a/src/pycrap/ontologies/soma/object_properties.py b/src/pycrap/ontologies/soma/object_properties.py index 735e8ad38..c49ba077c 100644 --- a/src/pycrap/ontologies/soma/object_properties.py +++ b/src/pycrap/ontologies/soma/object_properties.py @@ -14,12 +14,12 @@ class precedes(BaseProperty): Subproperties can be defined in order to distinguish the different uses. """ -class isAffectedBy(BaseProperty): +class is_affected_by(BaseProperty): """ Simple relationship between two actions to express that a variation in the course or outcome of the object (the affector) would have resulted in a variation in the subject (the affectee), e.g., a planning task that sets parameters such as goal position affects the subsequently executed pick-and-place task that uses that parameter. """ -class affordanceDefines(BaseProperty): +class affordance_defines(BaseProperty): """ A relation between an Affordance and a Concept (often an EventType). """ @@ -29,112 +29,112 @@ class defines(BaseProperty): A relation between a Description and a Concept, e.g. a Workflow for a governmental Organization defines the Role 'officer', or 'the Italian Traffic Law defines the role Vehicle'. """ -class isDefinedInAffordance(BaseProperty): +class is_defined_in_affordance(BaseProperty): """ A relation between a Concept and an Affordance. """ -class affordanceDefinesTask(BaseProperty): +class affordance_defines_task(BaseProperty): """ A relation between an Affordance and a Task """ -class definesTask(BaseProperty): +class defines_task(BaseProperty): """ A relation between a description and a task, e.g. the recipe for a cake defines the task 'boil'. """ -class isTaskDefinedInAffordance(BaseProperty): +class is_task_defined_in_affordance(BaseProperty): """ A relation between a Task and an Affordance, such that the task is defined in terms of using the affordance. """ -class affordsBearer(BaseProperty): +class affords_bearer(BaseProperty): """ Relates a disposition to the bearer role defined by the affordance describing the disposition. """ -class affordsConcept(BaseProperty): +class affords_concept(BaseProperty): """ A relation between a disposition and a concept defined in the affordance that describes the disposition. """ -class isBearerAffordedBy(BaseProperty): +class is_bearer_afforded_by(BaseProperty): """ Relates a disposition to the bearer role defined by the affordance describing the disposition. """ -class isDescribedBy(BaseProperty): +class is_described_by(BaseProperty): """ The relation between an Entity and a Description: a Description gives a unity to a Collection of parts (the components), or constituents, by assigning a Role to each of them in the context of a whole Object (the system). A same Entity can be given different descriptions, for example, an old cradle can be given a unifying Description based on the original aesthetic design, the functionality it was built for, or a new aesthetic functionality in which it can be used as a flower pot. """ -class definesBearer(BaseProperty): +class defines_bearer(BaseProperty): """ Relates an affordance which is a relation between a bearer and a trigger, to the role of the bearer when the affordance is manifested. """ -class associatedWith(BaseProperty): +class associated_with(BaseProperty): """ A catch-all object property, useful for alignment and querying purposes. It is declared as both transitive and symmetric, in order to reason an a maximal closure of associations between individuals. """ -class isConceptAffordedBy(BaseProperty): +class is_concept_afforded_by(BaseProperty): """ A relation between a disposition and a concept defined in the affordance that describes the disposition. """ -class affordsPerformer(BaseProperty): +class affords_performer(BaseProperty): """ Relates a disposition to the performer role defined by the affordance describing the disposition. """ -class isPerformerAffordedBy(BaseProperty): +class is_performer_afforded_by(BaseProperty): ... -class definesPerformer(BaseProperty): +class defines_performer(BaseProperty): """ Relates an affordance which is a relation between a bearer and a trigger, to the role of the performer when the affordance is manifested. """ -class affordsSetpoint(BaseProperty): +class affords_setpoint(BaseProperty): """ Relates a disposition to the setpoint parameter defined by the affordance describing the disposition. """ -class isSetpointAffordedBy(BaseProperty): +class is_setpoint_afforded_by(BaseProperty): """ Relates a disposition to the setpoint parameter defined by the affordance describing the disposition. """ -class definesSetpoint(BaseProperty): +class defines_setpoint(BaseProperty): """ Defines the dedicated goal region of a description. """ -class affordsTask(BaseProperty): +class affords_task(BaseProperty): """ Relates a disposition to the task defined by the affordance describing the disposition. """ -class isTaskAffordedBy(BaseProperty): +class is_task_afforded_by(BaseProperty): """ Relates a disposition to the task defined by the affordance describing the disposition. """ -class affordsTrigger(BaseProperty): +class affords_trigger(BaseProperty): """ Relates a disposition to the trigger role defined by the affordance describing the disposition. """ -class isTriggerAffordedBy(BaseProperty): +class is_trigger_afforded_by(BaseProperty): """ Relates a disposition to the trigger role defined by the affordance describing the disposition. """ -class definesTrigger(BaseProperty): +class defines_trigger(BaseProperty): """ Relates an affordance which is a relation between a bearer and a trigger, to the role of the trigger when the affordance is manifested. """ @@ -159,12 +159,12 @@ class before(BaseProperty): class answers(BaseProperty): ... -class relatesToAnotherRole(BaseProperty): +class relates_to_another_role(BaseProperty): """ Simple top-level property for relations between two roles. """ -class hasAnswer(BaseProperty): +class has_answer(BaseProperty): """ The relation between a message and its answer. """ @@ -172,7 +172,7 @@ class hasAnswer(BaseProperty): class causes(BaseProperty): ... -class isReactionTo(BaseProperty): +class is_reaction_to(BaseProperty): """ Simple relationship between two actions to express that the subject (the reaction) would not have occured if it were not for the object (the cause), e.g., a Communication Action classified as an Answering Task is a reaction to another Communication Task classified as a Query Task and would not have occured without the other. An example without Agents involved would be some domino stone would not have toppled without the first one toppling. @@ -181,20 +181,20 @@ class isReactionTo(BaseProperty): This relation is seen as transitive. """ -class causesTransition(BaseProperty): +class causes_transition(BaseProperty): """ A Transition between two Situations is always the result of some Event, and the causesTransition relation should be used to record the causal relation from the Event to the Transition. """ -class isEventIncludedIn(BaseProperty): +class is_event_included_in(BaseProperty): ... -class isCausedByEvent(BaseProperty): +class is_caused_by_event(BaseProperty): """ A relation recording that a Transition is the result of some Event. """ -class coOccurs(BaseProperty): +class co_occurs(BaseProperty): """ A schematic relation between any events that also implies that one event is temporally contained in the other. @@ -212,12 +212,12 @@ class contains(BaseProperty): A schematic relation asserting containment, understood in a very broad sense, by one Entity of another. The relation is defined with domain and range of maximum generality, as it is possible to construe containment to apply between Events, between Objects, between Qualities and so on. Care should be taken when using it that the construal of containment makes sense and is useful. If a clearer relation expresses the connection between two Entities, use that relation instead. For example, rather than saying an Event contains an Object, it is probably better to say the Event has that Object as a participant. More specific versions of this relation exist, e.g. containsEvent, so it is likely that there will be few situations where it should be used itself. However, by acting as a superproperty to several relations, it captures a core similarity between these and enables taxonomy-based similarity metrics. """ -class isContainedIn(BaseProperty): +class is_contained_in(BaseProperty): """ The inverse of the contains relation. See the contains relation for details. """ -class containsEvent(BaseProperty): +class contains_event(BaseProperty): """ `A contains event B` means that A strictly starts before, and ends after B, i.e. B is wholly contained in A. """ @@ -227,58 +227,58 @@ class during(BaseProperty): `A during B` means that B strictly starts before, and ends after A, i.e. A is wholly contained in B. """ -class containsObject(BaseProperty): +class contains_object(BaseProperty): """ A spatial relation holding between a container, and objects it contains. """ -class isLocationOf(BaseProperty): +class is_location_of(BaseProperty): """ A generic, relative localization, holding between any entities. E.g. 'Rome is the seat of the Pope', 'the liver is the location of the tumor'. For 'absolute' locations, see SpaceRegion """ -class isInsideOf(BaseProperty): +class is_inside_of(BaseProperty): """ A spatial relation holding between an object (the container), and objects it contains. """ -class coversObject(BaseProperty): +class covers_object(BaseProperty): """ A relationship from an object (the coverer) that blocks access to another or its interior (the coveree). """ -class interactsWith(BaseProperty): +class interacts_with(BaseProperty): """ A relation between objects that interact with each other. """ -class isCoveredByObject(BaseProperty): +class is_covered_by_object(BaseProperty): """ A relation from an object (the coveree) which is itself, or has its interior, prevented from being accessed from outside by a coverer. """ -class definesRole(BaseProperty): +class defines_role(BaseProperty): """ A relation between a description and a role, e.g. the recipe for a cake defines the role 'ingredient'. """ -class isBearerDefinedIn(BaseProperty): +class is_bearer_defined_in(BaseProperty): """ Relates an affordance which is a relation between a bearer and a trigger, to the role of the bearer when the affordance is manifested. """ -class definesEventType(BaseProperty): +class defines_event_type(BaseProperty): ... -class isEventTypeDefinedIn(BaseProperty): +class is_event_type_defined_in(BaseProperty): """ A relation between an event type and a description, e.g. an event that is described by the Affordance of an object to be cut with a knife. The distinction to 'is task defined in' is necessary to let Dispositions and Affordances not only describe which tasks might be afforded by objects, but also whihc processes (where there is no agent). For example, the fall of a knife from a shelf slicing a loaf of bread on impact is , in the absence of an executing agent, not a task but merely a process, the possibility of which is nevertheless described by the dispositions of the knife and the loaf. """ -class definesInput(BaseProperty): +class defines_input(BaseProperty): """ The defined participant is an "input": @@ -286,14 +286,14 @@ class definesInput(BaseProperty): - some region/value which informs the way in which the Task will be executed. """ -class definesParticipant(BaseProperty): +class defines_participant(BaseProperty): """ A Description definesParticipant a Concept to classify participants in Events associated to that Description. The prototypical example is a Task, which is a concept to classify Actions (a form of Event). A Task may define several Roles, with which to classify participants in the event of that Task's execution. """ -class definesOutput(BaseProperty): +class defines_output(BaseProperty): """ Defines an "output" participant: @@ -301,52 +301,52 @@ class definesOutput(BaseProperty): - a Region/value that has been demarcated/computed as a result of the execution of a Task. """ -class definesParameter(BaseProperty): +class defines_parameter(BaseProperty): """ A relation between a description and a parameter. """ -class isParameterDefinedIn(BaseProperty): +class is_parameter_defined_in(BaseProperty): """ A relation between a description and a parameter. """ -class isPerformerDefinedIn(BaseProperty): +class is_performer_defined_in(BaseProperty): """ Relates an affordance which is a relation between a bearer and a trigger, to the role of the performer when the affordance is manifested. """ -class definesProcess(BaseProperty): +class defines_process(BaseProperty): """ A relation between a description and a process type. """ -class isProcessDefinedIn(BaseProperty): +class is_process_defined_in(BaseProperty): """ A relation between a process type and a description that defines it. """ -class isSetpointDefinedIn(BaseProperty): +class is_setpoint_defined_in(BaseProperty): """ Defines the dedicated goal region of a description. """ -class isTriggerDefinedIn(BaseProperty): +class is_trigger_defined_in(BaseProperty): """ Relates an affordance which is a relation between a bearer and a trigger, to the role of the trigger when the affordance is manifested. """ -class derivedFrom(BaseProperty): +class derived_from(BaseProperty): """ The (transitive) relation between an information object and another which it has been derived from. """ -class isSourceFor(BaseProperty): +class is_source_for(BaseProperty): """ The (transitive) relation between an information object and another which was derived from the former. """ -class describesQuality(BaseProperty): +class describes_quality(BaseProperty): """ Relates a description to a quality that it describes. """ @@ -357,37 +357,37 @@ class describes(BaseProperty): A same Entity can be given different descriptions, for example, an old cradle can be given a unifying Description based on the original aesthetic design, the functionality it was built for, or a new aesthetic functionality in which it can be used as a flower pot. """ -class isQualityDescribedBy(BaseProperty): +class is_quality_described_by(BaseProperty): """ Relates a description to a quality it describes. """ -class directlyCauses(BaseProperty): +class directly_causes(BaseProperty): """ Non-transitive version of "causes". """ -class isDirectReactionTo(BaseProperty): +class is_direct_reaction_to(BaseProperty): """ Non-transitive version of "is reaction to". """ -class hasTerminalScene(BaseProperty): +class has_terminal_scene(BaseProperty): """ A relation between StateTransitions and Scenes, which identifies the scene the transition is expected to end at. """ -class includesEvent(BaseProperty): +class includes_event(BaseProperty): """ A relation between situations and events, e.g. 'this morning I've prepared my coffee and had my fingers burnt' (i.e.: the preparation of my coffee this morning included a burning of my fingers). """ -class directlyDerivedFrom(BaseProperty): +class directly_derived_from(BaseProperty): """ The relation between an information object and another which it has been derived from. """ -class isDirectSourceFor(BaseProperty): +class is_direct_source_for(BaseProperty): """ The (transitive) relation between an information object and another which was derived from the former. """ @@ -402,22 +402,22 @@ class encodes(BaseProperty): The relation between two Information Objects that have the same meaning, but are formatted differently. E.g., a text written in UTF-8 encodes a text in a natural writing system (letters) and vice versa. """ -class executesMotion(BaseProperty): +class executes_motion(BaseProperty): """ A relation between an motion process and a motion event type, e.g. 'lifting an object' executes the motion process 'lifting'. """ -class isOccurrenceOf(BaseProperty): +class is_occurrence_of(BaseProperty): """ A relation between an event and an event type, e.g. 'taking the cup from the table' is an occurence of the motion 'approaching'. """ -class isExecutedMotionIn(BaseProperty): +class is_executed_motion_in(BaseProperty): """ A relation between an motion process and a motion event type, e.g. 'lifting an object' executes the motion process 'lifting'. """ -class finishedBy(BaseProperty): +class finished_by(BaseProperty): """ `A finishes B` means that A ends exactly where B ends, and that B strictly starts before A. As in "I finish my day by taking a shower". """ @@ -427,32 +427,32 @@ class finishes(BaseProperty): `A finishes B` means that A ends exactly where B ends, and that B strictly starts before A. As in "I finish my day by taking a shower". """ -class firstMember(BaseProperty): +class first_member(BaseProperty): """ A relation between a collection and a member of it that is least according to some ordering. This ordering can be arbitrary, i.e. the order in which Entities are recorded in the Collection. """ -class hasMember(BaseProperty): +class has_member(BaseProperty): """ A relation between collections and entities, e.g. 'my collection of saxophones includes an old Adolphe Sax original alto' (i.e. my collection has member an Adolphe Sax alto). """ -class givesMeaningTo(BaseProperty): +class gives_meaning_to(BaseProperty): """ The relation between a System and Information Object that is given meaning to by said system, e.g., a Language might give meaning to some word, sentence, text, etc., but without the knowledge of said System (Language), the text will not make sense to a reader. """ -class isGivenMeaningBy(BaseProperty): +class is_given_meaning_by(BaseProperty): """ The relation between an Information Object and a System that gives meaning to said object, e.g., a word, sentence, text, etc. might be given meaning by a Language and without the knowledge of said System (Language), the text will not make sense to a reader. """ -class hasAction(BaseProperty): +class has_action(BaseProperty): """ A relation from an Action to a component Action. """ -class hasConstituent(BaseProperty): +class has_constituent(BaseProperty): """ 'Constituency' depends on some layering of the world described by the ontology. For example, scientific granularities (e.g. body-organ-tissue-cell) or ontological 'strata' (e.g. social-mental-biological-physical) are typical layerings. Intuitively, a constituent is a part belonging to a lower layer. Since layering is actually a partition of the world described by the ontology, constituents are not properly classified as parts, although this kinship can be intuitive for common sense. @@ -461,27 +461,27 @@ class hasConstituent(BaseProperty): In all these examples, we notice a typical discontinuity between the constituted and the constituent object: e.g. a social system is conceptualized at a different layer from the persons that constitute it, a person is conceptualized at a different layer from the molecules that constitute them, and a river is conceptualized at a different layer from the atoms that constitute it. """ -class hasAlterationResult(BaseProperty): +class has_alteration_result(BaseProperty): """ Relates an action that alters an object to the region that the alteration reached during the action. """ -class hasRegion(BaseProperty): +class has_region(BaseProperty): """ A relation between entities and regions, e.g. 'the number of wheels of that truck is 12', 'the time of the experiment is August 9th, 2004', 'the whale has been localized at 34 degrees E, 20 degrees S'. """ -class isAlterationResultOf(BaseProperty): +class is_alteration_result_of(BaseProperty): """ Relates an action that alters an object to the region that the alteration reached during the action. """ -class hasBinding(BaseProperty): +class has_binding(BaseProperty): """ Asserts that in a context described by Description, a Binding relation holds. """ -class hasPart(BaseProperty): +class has_part(BaseProperty): """ A schematic relation between any entities, e.g. 'the human body has a brain as part', '20th century contains year 1923', 'World War II includes the Pearl Harbour event'. @@ -494,7 +494,7 @@ class hasPart(BaseProperty): Subproperties and restrictions can be used to specialize hasPart for objects, events, etc. """ -class hasBindingFiller(BaseProperty): +class has_binding_filler(BaseProperty): """ Indicates that an Entity is described by a Binding, in that it is associated with the Role/Parameter that the Binding binds it to. The Binding is only valid in some descriptive context such as a Workflow or Narrative. @@ -503,515 +503,515 @@ class hasBindingFiller(BaseProperty): Only RoleFillerBindings can have general Entities as fillers. RoleRoleBindings can only connect to Roles or Parameters via this property. """ -class hasBindingRole(BaseProperty): +class has_binding_role(BaseProperty): """ Indicates that a Role/Parameter is going to be associated to some filler, or other Role/Parameter, by a Binding. The Binding is only valid in some descriptive context such as a Narrative or Workflow. """ -class hasChildLink(BaseProperty): +class has_child_link(BaseProperty): """ Relates a joint to the link it connects which is closer to the end of the kinematic chain. """ -class isChildLinkOf(BaseProperty): +class is_child_link_of(BaseProperty): """ Relates a joint to the link it connects which is closer to the end of the kinematic chain. """ -class hasColor(BaseProperty): +class has_color(BaseProperty): """ Relates an object to its color quality. """ -class hasQuality(BaseProperty): +class has_quality(BaseProperty): """ A relation between entities and qualities, e.g. 'Dmitri's skin is yellowish'. """ -class isColorOf(BaseProperty): +class is_color_of(BaseProperty): """ Relates a color quality to the object the color belongs to. """ -class hasDisposition(BaseProperty): +class has_disposition(BaseProperty): """ Associates an object to one of its dispositions. """ -class isDispositionOf(BaseProperty): +class is_disposition_of(BaseProperty): """ Associates a disposition quality to the object holding it. """ -class hasEndLink(BaseProperty): +class has_end_link(BaseProperty): """ Relates an object to kinematic components at the end of the kinematic chain. """ -class hasLink(BaseProperty): +class has_link(BaseProperty): """ Relates an object to its kinematic components. """ -class isEndLinkOf(BaseProperty): +class is_end_link_of(BaseProperty): """ Relates an object to kinematic components at the end of the kinematic chain. """ -class hasExecutionState(BaseProperty): +class has_execution_state(BaseProperty): """ A relation from an Action to its execution state. """ -class hasFeature(BaseProperty): +class has_feature(BaseProperty): """ Associates a physical object to one of its features. """ -class isFeatureOf(BaseProperty): +class is_feature_of(BaseProperty): """ Associates a feature to the physical object it belongs to. """ -class hasFirstStep(BaseProperty): +class has_first_step(BaseProperty): """ A relation from a Workflow to its first Task. """ -class hasStep(BaseProperty): +class has_step(BaseProperty): """ A relation between a Workflow and a Task it contains. """ -class isFirstStepOf(BaseProperty): +class is_first_step_of(BaseProperty): """ A relation stating that some task is the first one in a workflow. """ -class hasFrictionAttribute(BaseProperty): +class has_friction_attribute(BaseProperty): """ A relation between physical objects and their friction attribute. """ -class hasGoal(BaseProperty): +class has_goal(BaseProperty): """ A relation from an Entity to a Goal it pursues. Agents can pursue Goals, and Tasks are also construed as pursuing Goals. """ -class hasInitialScene(BaseProperty): +class has_initial_scene(BaseProperty): """ A relation between StateTransitions and Scenes, which identifies the scene the transition starts from. """ -class hasInitialState(BaseProperty): +class has_initial_state(BaseProperty): """ A relation which connects a Transition to the Situation it starts from. """ -class isInitialSceneOf(BaseProperty): +class is_initial_scene_of(BaseProperty): """ A relation between StateTransitions and Scenes, which identifies the scene the transition starts from. """ -class hasInitialSituation(BaseProperty): +class has_initial_situation(BaseProperty): """ A relation between SituationTransitions and Situations, which identifies the Situation the transition starts from. """ -class isInitialSituationOf(BaseProperty): +class is_initial_situation_of(BaseProperty): """ A relation between SituationTransitions and Situations, which identifies the Situation the transition starts from. """ -class includesSituation(BaseProperty): +class includes_situation(BaseProperty): """ A relation recording that a Situation has a (sub) Situation as participant in some role. """ -class isInitialStateOf(BaseProperty): +class is_initial_state_of(BaseProperty): """ A relation recording that a Situation was where a Transition began. """ -class hasInputParameter(BaseProperty): +class has_input_parameter(BaseProperty): """ A relation between a Task and one of its input parameters. A relation from an EventType (typically, a Task) and a parameter describing some state of affairs before the event classified by the EventType takes place, and which contributes towards that event happening. """ -class hasParameter(BaseProperty): +class has_parameter(BaseProperty): """ A Concept can have a Parameter that constrains the attributes that a classified Entity can have in a certain Situation, e.g. a 4WheelDriver Role definedIn the ItalianTrafficLaw has a MinimumAge parameter on the Amount 16. """ -class isInputParameterFor(BaseProperty): +class is_input_parameter_for(BaseProperty): """ A relation between a Task and one of its input parameters. A relation from a Parameter to an EventType (typically, a Task). The parameter describes some state of affairs that precedes and will contribute to the event classified by the EventType. """ -class hasJointLimit(BaseProperty): +class has_joint_limit(BaseProperty): """ Relates a joint to its physical limits. """ -class isJointLimitOf(BaseProperty): +class is_joint_limit_of(BaseProperty): """ Relates a joint to its physical limits. """ -class hasJointState(BaseProperty): +class has_joint_state(BaseProperty): """ Relates a joint to its state. """ -class isJointStateOf(BaseProperty): +class is_joint_state_of(BaseProperty): """ Relates a joint to its state. """ -class hasComponent(BaseProperty): +class has_component(BaseProperty): """ The hasProperPart relation without transitivity, holding between an Object (the system) and another (the component), and assuming a Design that structures the Object. """ -class isLinkOf(BaseProperty): +class is_link_of(BaseProperty): """ Relates an object to its kinematic components. """ -class hasLocalization(BaseProperty): +class has_localization(BaseProperty): """ Relates an object to its localization quality. """ -class isLocalizationOf(BaseProperty): +class is_localization_of(BaseProperty): """ Relates a localization quality to the object the localization belongs to. """ -class hasMassAttribute(BaseProperty): +class has_mass_attribute(BaseProperty): """ A relation between physical objects and their mass. """ -class isMassAttributeOf(BaseProperty): +class is_mass_attribute_of(BaseProperty): """ A relation between physical objects and their mass. """ -class hasNetForce(BaseProperty): +class has_net_force(BaseProperty): """ A relation between a physical object and the total force acting on it. """ -class isNetForceOf(BaseProperty): +class is_net_force_of(BaseProperty): """ A relation between a physical object and the total force acting on it. """ -class hasNextStep(BaseProperty): +class has_next_step(BaseProperty): """ An ordering relation between tasks in a workflow, saying that a task is followed by another. """ -class directlyPrecedes(BaseProperty): +class directly_precedes(BaseProperty): """ The intransitive precedes relation. For example, Monday directly precedes Tuesday. Directness of precedence depends on the designer conceptualization. """ -class hasPreviousStep(BaseProperty): +class has_previous_step(BaseProperty): """ An ordering relation between tasks in some workflow, stating that a task is preceded by another. """ -class hasOutputParameter(BaseProperty): +class has_output_parameter(BaseProperty): """ A relation between a Task and one of its output parameters. A relation from an EventType (typically a Task) to a Parameter describing an outcome of the event classified by the EventType. """ -class isOutputParameterFor(BaseProperty): +class is_output_parameter_for(BaseProperty): """ A relation between a Task and one of its output parameters. A relation from a Parameter to an EventType (typically, a Task). The parameter describes an outcome of the event classified by the EventType. """ -class hasParentLink(BaseProperty): +class has_parent_link(BaseProperty): """ Relates a joint to the link it connects which is closer to the root of the kinematic chain. """ -class isParentLinkOf(BaseProperty): +class is_parent_link_of(BaseProperty): """ Relates a joint to the link it connects which is closer to the root of the kinematic chain. """ -class hasPhase(BaseProperty): +class has_phase(BaseProperty): """ A relation used to describe the structure of an Action or Process in terms of phases, i.e. subprocesses and states that occur during its unfolding. """ -class hasPhysicalComponent(BaseProperty): +class has_physical_component(BaseProperty): """ A relation used to describe the structure of a PhysicalObject in terms of physical components, i.e. what other PhysicalObjects are components of it. """ -class hasPredecessor(BaseProperty): +class has_predecessor(BaseProperty): """ Indicates that a Task is the predecessor in a Succedence Relation; that is, this is the task to execute first. """ -class hasPreference(BaseProperty): +class has_preference(BaseProperty): ... -class isPreferenceOf(BaseProperty): +class is_preference_of(BaseProperty): """ Relates a preference quality to the agent the preference belongs to. """ -class directlyFollows(BaseProperty): +class directly_follows(BaseProperty): """ The intransitive follows relation. For example, Wednesday directly precedes Thursday. Directness of precedence depends on the designer conceptualization. """ -class hasProcessType(BaseProperty): +class has_process_type(BaseProperty): """ A relation between roles and process types, e.g. a catalysator is needed to trigger some chemical reaction. """ -class isRelatedToConcept(BaseProperty): +class is_related_to_concept(BaseProperty): """ Any relation between concepts, e.g. superordinated, conceptual parthood, having a parameter, having a task, superordination, etc. """ -class isProcessTypeOf(BaseProperty): +class is_process_type_of(BaseProperty): """ A relation between roles and process types, e.g. a catalysator is needed to trigger some chemical reaction. """ -class hasQuale(BaseProperty): +class has_quale(BaseProperty): """ Relates a quality to its "value", called quale, which is an atomic quality region. """ -class isQualeOf(BaseProperty): +class is_quale_of(BaseProperty): """ Relates a quality to its "value", called quale, which is an atomic quality region. """ -class hasRootLink(BaseProperty): +class has_root_link(BaseProperty): """ Relates an object to kinematic components at the root of the kinematic chain. """ -class isRootLinkOf(BaseProperty): +class is_root_link_of(BaseProperty): """ Relates an object to kinematic components at the root of the kinematic chain. """ -class hasShape(BaseProperty): +class has_shape(BaseProperty): """ Relates an object to its shape quality. """ -class isShapeOf(BaseProperty): +class is_shape_of(BaseProperty): """ Relates a shape quality to the object the shape belongs to. """ -class hasShapeRegion(BaseProperty): +class has_shape_region(BaseProperty): """ A relation between physical objects and their shape attribute. """ -class isShapeRegionOf(BaseProperty): +class is_shape_region_of(BaseProperty): """ Relates a shape to a physical object that has it. """ -class hasSoftwareAgent(BaseProperty): +class has_software_agent(BaseProperty): """ A relation from an Event and the SoftwareAgent responsible for making that Event happen. """ -class involvesAgent(BaseProperty): +class involves_agent(BaseProperty): """ Agent participation. """ -class hasSpaceRegion(BaseProperty): +class has_space_region(BaseProperty): """ Relates an entity to a space region. """ -class isSpaceRegionFor(BaseProperty): +class is_space_region_for(BaseProperty): """ Relates a space region to an entity. """ -class hasStateType(BaseProperty): +class has_state_type(BaseProperty): """ A relation between roles and state types, e.g. 'the chair is the supporter of the person sitting on it'. """ -class isStateTypeOf(BaseProperty): +class is_state_type_of(BaseProperty): """ A relation between roles and state types, e.g. 'the chair is the supporter of the person sitting on it'. """ -class hasStatus(BaseProperty): +class has_status(BaseProperty): """ A relation from an Entity to a Quality that is indicative of the Entity's state, e.g. if it is a device, its state of operation. """ -class isStepOf(BaseProperty): +class is_step_of(BaseProperty): """ A relation stating that a task is a step in a workflow. """ -class hasSuccedence(BaseProperty): +class has_succedence(BaseProperty): """ A relation between a Workflow and a Succedence that appears in it. """ -class hasSuccessor(BaseProperty): +class has_successor(BaseProperty): """ Indicates that a Task is the successor in a Succedence Relation: that is, it is the Task to execute last. """ -class hasTask(BaseProperty): +class has_task(BaseProperty): """ A relation to indicate that a Task is part of a Workflow or ordering Relation: that is, the task may be executed during the execution of the Workflow, or there exists some Relation between the Tasks that informs how their executions are to be located in time. """ -class hasTerminalState(BaseProperty): +class has_terminal_state(BaseProperty): """ A relation from a Transition to the Situation it ends in. """ -class isTerminalSceneOf(BaseProperty): +class is_terminal_scene_of(BaseProperty): """ A relation between StateTransitions and Scenes, which identifies the scene the transition is expected to end at. """ -class hasTerminalSituation(BaseProperty): +class has_terminal_situation(BaseProperty): """ A relation between SituationTransitions and Situations, which identifies the Situation the transition ends at. """ -class isTerminalSituationOf(BaseProperty): +class is_terminal_situation_of(BaseProperty): """ A relation between SituationTransitions and Situations, which identifies the Situation the transition ends at. """ -class isTerminalStateOf(BaseProperty): +class is_terminal_state_of(BaseProperty): """ A relation recording that a Situation was where a Transition ended. """ -class includesConcept(BaseProperty): +class includes_concept(BaseProperty): """ A relation recording that a Situation has a Concept as participant in some sort of role. """ -class includesObject(BaseProperty): +class includes_object(BaseProperty): """ A relation between situations and objects, e.g. 'this morning I've prepared my coffee and had my fingers burnt' (i.e.: the preparation of my coffee this morning included me). """ -class isConceptIncludedIn(BaseProperty): +class is_concept_included_in(BaseProperty): """ A relation recording that a Concept participates in a Situation in some way. """ -class includesRecord(BaseProperty): +class includes_record(BaseProperty): """ A relationship indicating that an Event has been recorded by an InformationObject """ -class isReferenceOf(BaseProperty): +class is_reference_of(BaseProperty): """ A relation between information objects and any Entity (including information objects). It can be used to talk about e.g. entities are references of proper nouns: the proper noun 'Leonardo da Vinci' isAbout the Person Leonardo da Vinci; as well as to talk about sets of entities that can be described by a common noun: the common noun 'person' isAbout the set of all persons in a domain of discourse, which can be represented in DOLCE-Ultralite as an individual of the class: Collection . The isReferenceOf relation is irreflexive, differently from its inverse isAbout. """ -class isRecordIncludedBy(BaseProperty): +class is_record_included_by(BaseProperty): """ A relationship indicating that an InformationObject is a recording of an Event. """ -class isSettingFor(BaseProperty): +class is_setting_for(BaseProperty): """ A relation between situations and entities, e.g. 'this morning I've prepared my coffee with a new fantastic Arabica', i.e.: the preparation of my coffee this morning is the setting for (an amount of) a new fantastic Arabica. """ -class isSituationIncludedIn(BaseProperty): +class is_situation_included_in(BaseProperty): """ A relation recording that a Situation participates in another in some role, or can be considered as a subsituation of the other. """ -class involvesArtifact(BaseProperty): +class involves_artifact(BaseProperty): """ Artifact participation. """ -class hasParticipant(BaseProperty): +class has_participant(BaseProperty): """ A relation between an object and a process, e.g. 'John took part in the discussion', 'a large mass of snow fell during the avalanche', or 'a cook, some sugar, flour, etc. are all present in the cooking of a cake'. """ -class isArtifactInvolvedIn(BaseProperty): +class is_artifact_involved_in(BaseProperty): """ Artifact participation. """ -class involvesEffector(BaseProperty): +class involves_effector(BaseProperty): """ Effector participation. """ -class isEffectorInvolvedIn(BaseProperty): +class is_effector_involved_in(BaseProperty): """ Effector participation. """ -class involvesPlace(BaseProperty): +class involves_place(BaseProperty): """ A relation recording that an Event makes some use of a PhysicalPlace. Typically this place is where the Event is located. """ -class isPlaceInvolvedIn(BaseProperty): +class is_place_involved_in(BaseProperty): """ A relation recording that a PhysicalPlace is involved in some Event; typically, this is where the Event is located. """ -class isRegionFor(BaseProperty): +class is_region_for(BaseProperty): """ A relation between entities and regions, e.g. 'the color of my car is red'. """ -class isAnsweredBy(BaseProperty): +class is_answered_by(BaseProperty): """ A relation from a Query to an Agent who answers it. """ -class isParticipantIn(BaseProperty): +class is_participant_in(BaseProperty): """ A relation between an object and a process, e.g. 'John took part in the discussion', 'a large mass of snow fell during the avalanche', or 'a cook, some sugar, flour, etc. are all present in the cooking of a cake'. """ -class isAskedBy(BaseProperty): +class is_asked_by(BaseProperty): """ A relation from a Query to the Agent who asks it. """ -class isRoleDefinedIn(BaseProperty): +class is_role_defined_in(BaseProperty): """ A relation between a description and a role, e.g. the role 'Ingredient' is defined in the recipe for a cake. """ -class isConstituentOf(BaseProperty): +class is_constituent_of(BaseProperty): """ 'Constituency' depends on some layering of the world described by the ontology. For example, scientific granularities (e.g. body-organ-tissue-cell) or ontological 'strata' (e.g. social-mental-biological-physical) are typical layerings. Intuitively, a constituent is a part belonging to a lower layer. Since layering is actually a partition of the world described by the ontology, constituents are not properly classified as parts, although this kinship can be intuitive for common sense. @@ -1020,70 +1020,70 @@ class isConstituentOf(BaseProperty): In all these examples, we notice a typical discontinuity between the constituted and the constituent object: e.g. a social system is conceptualized at a different layer from the persons that constitute it, a person is conceptualized at a different layer from the molecules that constitute them, and a river is conceptualized at a different layer from the atoms that constitute it. """ -class isQualityOf(BaseProperty): +class is_quality_of(BaseProperty): """ A relation between entities and qualities, e.g. 'Dmitri's skin is yellowish'. """ -class isObjectIncludedIn(BaseProperty): +class is_object_included_in(BaseProperty): ... -class isCreatedOutputOf(BaseProperty): +class is_created_output_of(BaseProperty): """ A relation between a created output role and its Task. The difference to isOutputRoleOf is that the latter is also applicable, e.g., for Deciding between objects, where the selected object is not created, but still an outcome of that task. """ -class isOutputRoleOf(BaseProperty): +class is_output_role_of(BaseProperty): """ A relation between an output roles and its Task. """ -class isTaskOfCreatedRole(BaseProperty): +class is_task_of_created_role(BaseProperty): """ A relation between a Task and one of its output roles. The difference to IsTaskOfOutputRole is that the latter is also applicable, e.g., for Deciding between objects, where the selected object is not created, but still an outcome of that task. """ -class isDefinedIn(BaseProperty): +class is_defined_in(BaseProperty): """ A relation between a Description and a Concept, e.g. a Workflow for a governmental Organization defines the Role 'officer', or 'the Italian Traffic Law defines the role Vehicle'. """ -class isDepositOf(BaseProperty): +class is_deposit_of(BaseProperty): """ A spatial relation holding between an object (the deposit), and objects that are located ontop of it. """ -class isOntopOf(BaseProperty): +class is_ontop_of(BaseProperty): """ A spatial relation holding between an object (the deposit), and objects that are located ontop of it. """ -class isDesignFor(BaseProperty): +class is_design_for(BaseProperty): """ A special relation between a Design and an Object, to indicate that the Design describes a way to construct the Object. """ -class isDesignedBy(BaseProperty): +class is_designed_by(BaseProperty): """ A special relation between a Design and an Object, to indicate that the Object is described by the Design. """ -class isRealizedBy(BaseProperty): +class is_realized_by(BaseProperty): """ A relation between an information realization and an information object, e.g. the paper copy of the Italian Constitution realizes the text of the Constitution. """ -class hasRole(BaseProperty): +class has_role(BaseProperty): """ A relation between an object and a role, e.g. the person 'John' has role 'student'. """ -class isInputRoleOf(BaseProperty): +class is_input_role_of(BaseProperty): """ A relation between an input roles and its Task. """ -class isRoleOf(BaseProperty): +class is_role_of(BaseProperty): """ A relation between an object and a role, e.g. 'student' is the role of 'John'. """ @@ -1093,61 +1093,61 @@ class realizes(BaseProperty): A relation between an information realization and an information object, e.g. the paper copy of the Italian Constitution realizes the text of the Constitution. """ -class isOccurringIn(BaseProperty): +class is_occurring_in(BaseProperty): """ A relation between an event and an event type, e.g. 'taking the cup from the table' is an occurence of the motion 'approaching'. """ -class isExecutorDefinedIn(BaseProperty): +class is_executor_defined_in(BaseProperty): ... -class isParameterFor(BaseProperty): +class is_parameter_for(BaseProperty): """ A Concept can have a Parameter that constrains the attributes that a classified Entity can have in a certain Situation, e.g. a 4WheelDriver Role definedIn the ItalianTrafficLaw has a MinimumAge parameter on the Amount 16. """ -class hasTask(BaseProperty): +class has_task(BaseProperty): """ A relation between roles and tasks, e.g. 'students have the duty of giving exams' (i.e. the Role 'student' hasTask the Task 'giving exams'). """ -class isTaskOfInputRole(BaseProperty): +class is_task_of_input_role(BaseProperty): """ A relation between a Task and one of its input roles. """ -class hasLocation(BaseProperty): +class has_location(BaseProperty): """ A generic, relative spatial location, holding between any entities. E.g. 'the cat is on the mat', 'Omar is in Samarcanda', 'the wound is close to the femural artery'. For 'absolute' locations, see SpaceRegion """ -class isComponentOf(BaseProperty): +class is_component_of(BaseProperty): """ The asymmetric isProperPartOf relation without transitivity, holding between an Object (the system) and another (the component), and assuming a Design that structures the Object. """ -class isLinkedTo(BaseProperty): +class is_linked_to(BaseProperty): """ A spatial relation holding between objects that are linked with each other such that they resist spatial separation. """ -class isMotionDescriptionFor(BaseProperty): +class is_motion_description_for(BaseProperty): """ A special relation between a Motion Plan and a Motion, to indicate that the Motion Plan describes a way to achieve the Motion. """ -class isMovedByAgent(BaseProperty): +class is_moved_by_agent(BaseProperty): """ A relation from an object to an agent who causes it to move. """ -class movesObject(BaseProperty): +class moves_object(BaseProperty): """ A relation from an agent to an object that the agent causes to move. """ -class isClassifiedBy(BaseProperty): +class is_classified_by(BaseProperty): """ A relation between a Concept and an Entity, e.g. 'John is considered a typical rude man'; your last concert constitutes the achievement of a lifetime; '20-year-old means she's mature enough'. """ @@ -1157,7 +1157,7 @@ class classifies(BaseProperty): A relation between a Concept and an Entity, e.g. the Role 'student' classifies a Person 'John'. """ -class isOrderedBy(BaseProperty): +class is_ordered_by(BaseProperty): """ The relation between an 'Order item' and the 'Order' that sorts them (via the relations 'precedes' and 'follows') """ @@ -1167,27 +1167,27 @@ class orders(BaseProperty): The relation between an 'Order' and the sorted 'Order item' (sorted via the relations 'precedes' and 'follows' between the 'Order item's) """ -class isTaskOfOutputRole(BaseProperty): +class is_task_of_output_role(BaseProperty): """ A relation between a Task and one of its output roles. """ -class isPerformedBy(BaseProperty): +class is_performed_by(BaseProperty): """ A relation from an Action to the Agent who performs it. """ -class isPhysicallyContainedIn(BaseProperty): +class is_physically_contained_in(BaseProperty): """ A spatial relation holding between an object (the container), and objects it contains. """ -class isPlanFor(BaseProperty): +class is_plan_for(BaseProperty): """ A special relation between a Plan and a Task, to indicate that the Plan describes a way to achieve the Task. """ -class isAbout(BaseProperty): +class is_about(BaseProperty): """ A relation between an information object and an Entity (including information objects). It can be used to talk about entities that are references of proper nouns: the proper noun 'Leonardo da Vinci' isAbout the Person Leonardo da Vinci; as well as to talk about sets of entities that can be described by a common noun: the common noun 'person' isAbout the set of all persons in a domain of discourse, which can be represented in DOLCE-Ultralite as an individual of the class: dul:Collection. A specific sentence may use common nouns with either a singular or plural reference, or it can even refer to all possible references (e.g. in a lexicographic definition): all those uses are kinds of aboutness. @@ -1196,7 +1196,7 @@ class isAbout(BaseProperty): If a reflexivity exists in general, it rather concerns its realisation, which is always associated with an event, e.g. an utterance, which makes the information denoting itself, besides its aboutness. This is implemented in DUL with the dul:realizesSelfInformation property, which is used with local reflexivity in the dul:InformationRealization class. """ -class isReplacedBy(BaseProperty): +class is_replaced_by(BaseProperty): """ The relation between a State that is replaced by another, e.g., the state of a bowl of fruits containing some objects is replaced by a new containment state when one object is taken away (in this example, we simplified the relation between the State and its type). """ @@ -1206,23 +1206,23 @@ class replaces(BaseProperty): The relation between a State that replaces another, e.g., the state of a bowl of fruits containing some objects is replaced by a new containment state when one object is taken away (in this example, we simplified the relation between the State and its type). """ -class hasSetting(BaseProperty): +class has_setting(BaseProperty): """ A relation between entities and situations, e.g. 'this morning I've prepared my coffee with a new fantastic Arabica', i.e.: (an amount of) a new fantastic Arabica hasSetting the preparation of my coffee this morning. """ -class isTaskDefinedIn(BaseProperty): +class is_task_defined_in(BaseProperty): """ A relation between a description and a task, e.g. the task 'boil' is defined in a recipe for a cake. """ -class isSupportedBy(BaseProperty): +class is_supported_by(BaseProperty): """ A relation between an object (the supporter) and another object (the supportee) where the supporter cancels the effect of gravity on the supportee. Relates a supportee to one of its supporters. """ -class hasCommonBoundary(BaseProperty): +class has_common_boundary(BaseProperty): """ A relation to encode either formal or informal characterizations of 'boundaries' common to two different entities: an Event that ends when another begins, two abstract regions that have a common topological boundary, two objects that are said to be 'in contact' from a commonsense perspective, etc. """ @@ -1233,12 +1233,12 @@ class supports(BaseProperty): Relates a supportee to one of its supporters. """ -class isTaskOf(BaseProperty): +class is_task_of(BaseProperty): """ A relation between roles and tasks, e.g. 'students have the duty of giving exams' (i.e. the Role 'student' hasTask the Task 'giving exams'). """ -class isTerminatedBy(BaseProperty): +class is_terminated_by(BaseProperty): """ The association between an Event that is terminated by another Event, e.g., the Action of picking an apple from a bowl of fruits terminates the State of containment between the apple and the bowl. """ @@ -1253,17 +1253,17 @@ class meets(BaseProperty): A relation between entities, expressing a 'sequence' schema where one of the entities exactly ends where the other entity starts. """ -class metBy(BaseProperty): +class met_by(BaseProperty): """ A relation between entities, expressing a 'sequence' schema where one of the entities exactly ends where the other entity starts. """ -class overlappedBy(BaseProperty): +class overlapped_by(BaseProperty): """ A schematic relation between any entities that also implies ordering, e.g. "she has worked into the night". """ -class overlappedOn(BaseProperty): +class overlapped_on(BaseProperty): """ A schematic relation between any entities that also implies ordering, e.g. "she has worked into the night". """ @@ -1273,7 +1273,7 @@ class simultaneous(BaseProperty): `A simultaneous B` means that A strictly starts and ends at the same time instant as B, i.e. their temporal extend is equal. """ -class startedBy(BaseProperty): +class started_by(BaseProperty): """ `A starts B` means that A starts exactly where B starts, and that A strictly ends before B. As in "I start my day with a coffee". """ @@ -1283,51 +1283,51 @@ class starts(BaseProperty): `A starts B` means that A starts exactly where B starts, and that A strictly ends before B. As in "I start my day with a coffee". """ -class transitionsBack(BaseProperty): +class transitions_back(BaseProperty): """ A property which relates a Transient to an Object it both changes from and changes into. This is useful to model objects which, through participation in a process, transform themselves so that an ontological reclassification is necessary, however this transformation is reversible and at the end of the process the objects revert to their previous kind. An example of this is catalysts in chemistry. """ -class transitionsFrom(BaseProperty): +class transitions_from(BaseProperty): """ A property which relates a Transient to an Object it changes from. This is useful to model objects which, through participation in a process, transform themselves so that an ontological reclassification is necessary. An example of this is dough undergoing the Maillard reaction through baking. """ -class transitionsTo(BaseProperty): +class transitions_to(BaseProperty): """ A property which relates a Transient to an Object it changes into. This is useful to model objects which, through participation in a process, transform themselves so that an ontological reclassification is necessary. An example of this is baked dough eventually becoming bread by completing a baking process. """ -class hasExpectedTerminalSituation(BaseProperty): +class has_expected_terminal_situation(BaseProperty): """ A relation between a Transition and the Situation it is expected to, and does actually, end at. You can assert this relationship when the observed outcome of a transition matches expectations. """ -class hasPostcondition(BaseProperty): +class has_postcondition(BaseProperty): """ Direct succession applied to situations. E.g., 'A postcondition of our Plan is to have things settled'. This should be taken to mean that the postcondition is the situation expected to follow the current situation. Whether the expectation is met is another issue. """ -class hasRequiredInitialSituation(BaseProperty): +class has_required_initial_situation(BaseProperty): """ A relationship between a Situation x and another Situation y that precedes it, such that without y manifesting, it would be impossible for x to manifest. """ -class hasPrecondition(BaseProperty): +class has_precondition(BaseProperty): """ Direct precedence applied to situations. E.g., 'A precondition to declare war against a foreign country is claiming to find nuclear weapons in it'. This should be taken to mean: a precondition is a situation without which the current situation would not be possible. """ -class manifestsIn(BaseProperty): +class manifests_in(BaseProperty): """ A relationship indicating that a Situation is realized in an Event that actually happened. """ -class preventedBy(BaseProperty): +class prevented_by(BaseProperty): """ A relationship indicating a Situation is prevented by another from manifesting. """ @@ -1337,12 +1337,12 @@ class prevents(BaseProperty): A relationship indicating that a situation does or would prevent another from manifesting. Useful for reasoning about planning (what to do to avoid some bad outcome) and failure recovery (what aspects of the world state prevent continuing the plan?). """ -class actsFor(BaseProperty): +class acts_for(BaseProperty): """ The relation holding between any Agent, and a SocialAgent. In principle, a SocialAgent requires at least one PhysicalAgent in order to act, but this dependency can be 'delegated'; e.g. a university can be acted for by a department, which on its turm is acted for by physical agents. """ -class executesTask(BaseProperty): +class executes_task(BaseProperty): """ A relation between an action and a task, e.g. 'putting some water in a pot and putting the pot on a fire until the water starts bubbling' executes the task 'boiling'. """ @@ -1394,19 +1394,19 @@ class expresses(BaseProperty): This is only a first step to provide a framework, in which one can model different aspects of meaning. A more developed ontology should approach the problem of integrating the different uses of 'expresses', so that different theories, resources, methods can interoperate. """ -class isExecutedIn(BaseProperty): +class is_executed_in(BaseProperty): """ A relation between an action and a task, e.g. 'putting some water in a pot and putting the pot on a fire until the water starts bubbling' executes the task 'boiling'. """ -class isExpressedBy(BaseProperty): +class is_expressed_by(BaseProperty): """ A relation between a dul:SocialObject (the 'meaning') and a dul:InformationObject (the 'expression'). For example: 'A Beehive is a structure in which bees are kept, typically in the form of a dome or box.' (Oxford dictionary)'; 'the term Beehive expresses the concept Beehive in my apiculture ontology'. The intuition for 'meaning' is intended to be very broad. A separate, large comment is included in the encoding of 'expresses', for those who want to investigate more on what kind of meaning can be represented in what form. """ -class isPartOf(BaseProperty): +class is_part_of(BaseProperty): """ A relation between any entities, e.g. 'brain is a part of the human body'. See dul:hasPart for additional documentation. """ diff --git a/src/pycrap/ontologies/soma/restrictions.py b/src/pycrap/ontologies/soma/restrictions.py index 98f09a159..82b7c5b88 100644 --- a/src/pycrap/ontologies/soma/restrictions.py +++ b/src/pycrap/ontologies/soma/restrictions.py @@ -3,15 +3,15 @@ from .individuals import * -Affordance.is_a = [Relation, describes.only(Disposition), definesBearer.exactly(1, Role), definesTrigger.exactly(1, Role), definesTask.exactly(1, Task)] +Affordance.is_a = [Relation, describes.only(Disposition), defines_bearer.exactly(1, Role), defines_trigger.exactly(1, Role), defines_task.exactly(1, Task)] -Concept.is_a = [SocialObject, isDefinedIn.some(Description), hasPart.only(Concept)] +Concept.is_a = [SocialObject, is_defined_in.some(Description), has_part.only(Concept)] -Task.is_a = [EventType, hasPart.only(Task), isExecutedIn.only(Action), isTaskDefinedIn.only(Description), isTaskOf.only(Role)] +Task.is_a = [EventType, has_part.only(Task), is_executed_in.only(Action), is_task_defined_in.only(Description), is_task_of.only(Role)] -Disposition.is_a = [Extrinsic, isDescribedBy.exactly(1, Affordance), isDescribedBy.exactly(1, Affordance & definesBearer.exactly(1, Role) & definesEventType.exactly(1, EventType) & definesTrigger.exactly(1, Role))] +Disposition.is_a = [Extrinsic, is_described_by.exactly(1, Affordance), is_described_by.exactly(1, And([Affordance, defines_bearer.exactly(1, Role), defines_event_type.exactly(1, EventType), defines_trigger.exactly(1, Role)]))] -Role.is_a = [Concept, classifies.only(Object), hasPart.only(Role)] +Role.is_a = [Concept, classifies.only(Object), has_part.only(Role)] Setpoint.is_a = [Parameter] @@ -19,78 +19,78 @@ Answer.is_a = [Message] -Message.is_a = [Item, hasTask.some(CommunicationTask), classifies.only(InformationRealization)] +Message.is_a = [Item, has_task.some(CommunicationTask), classifies.only(InformationRealization)] -Event.is_a = [Entity, hasParticipant.some(Object), hasTimeInterval.some(TimeInterval), hasConstituent.only(Event), hasPart.only(Event)] +Event.is_a = [Entity, has_participant.some(Object), has_time_interval.some(TimeInterval), has_constituent.only(Event), has_part.only(Event)] -Transition.is_a = [Situation, includesEvent.some(Event), includesObject.some(Object), isSettingFor.some(Process), isSettingFor.some(Situation & precedes.some(Event & precedes.some(Situation))), includesTime.min(3, TimeInterval), isSettingFor.min(2, Situation)] +Transition.is_a = [Situation, includes_event.some(Event), includes_object.some(Object), is_setting_for.some(Process), is_setting_for.some(And([Situation, precedes.some(And([Event, precedes.some(Situation)]))])), includes_time.min(3, TimeInterval), is_setting_for.min(2, Situation)] -PhysicalObject.is_a = [Object, hasPart.only(PhysicalObject)] +PhysicalObject.is_a = [Object, has_part.only(PhysicalObject)] Description.is_a = [SocialObject] EventType.is_a = [Concept, classifies.only(Event)] -Parameter.is_a = [Concept, classifies.only(Region), hasPart.only(Parameter)] +Parameter.is_a = [Concept, classifies.only(Region), has_part.only(Parameter)] -ProcessType.is_a = [EventType, classifies.only(Process), hasPart.only(ProcessType), isDefinedIn.only(Description)] +ProcessType.is_a = [EventType, classifies.only(Process), has_part.only(ProcessType), is_defined_in.only(Description)] InformationObject.is_a = [InformationEntity, SocialObject] -Quality.is_a = [Entity, hasRegion.some(Region), isQualityOf.some(Entity), hasConstituent.only(Quality), hasPart.only(Quality)] +Quality.is_a = [Entity, has_region.some(Region), is_quality_of.some(Entity), has_constituent.only(Quality), has_part.only(Quality)] -OrderedElement.is_a = [Singleton, follows.only(OrderedElement), precedes.only(OrderedElement), isOrderedBy.exactly(1, Order)] +OrderedElement.is_a = [Singleton, follows.only(OrderedElement), precedes.only(OrderedElement), is_ordered_by.exactly(1, Order)] MotionProcess.is_a = [PhysicsProcess] -Motion.is_a = [ProcessType, isExecutedMotionIn.only(MotionProcess)] +Motion.is_a = [ProcessType, is_executed_motion_in.only(MotionProcess)] -Collection.is_a = [SocialObject, hasPart.only(Collection)] +Collection.is_a = [SocialObject, has_part.only(Collection)] System.is_a = [SocialObject] -Action.is_a = [Event, hasParticipant.some(Agent), executesTask.min(1, Thing)] +Action.is_a = [Event, has_participant.some(Agent), executes_task.min(1, Thing)] -Region.is_a = [Abstract, hasConstituent.only(Region), hasPart.only(Region), overlaps.only(Region), precedes.only(Region)] +Region.is_a = [Abstract, has_constituent.only(Region), has_part.only(Region), overlaps.only(Region), precedes.only(Region)] -Binding.is_a = [Relation, CounterfactualBinding | FactualBinding, RoleFillerBinding | RoleRoleBinding, Inverse(hasBinding).some(Description), hasBindingFiller.exactly(1, Entity), hasBindingRole.exactly(1, Parameter | Role)] +Binding.is_a = [Relation, Or([CounterfactualBinding, FactualBinding]), Or([RoleFillerBinding, RoleRoleBinding]), Inverse(has_binding).some(Description), has_binding_filler.exactly(1, Entity), has_binding_role.exactly(1, Or([Parameter, Role]))] -Joint.is_a = [PhysicalBody, hasChildLink.exactly(1, PhysicalObject), hasParentLink.exactly(1, PhysicalObject), hasJointState.max(1, JointState)] -Joint.equivalent_to = [FixedJoint | MovableJoint] +Joint.is_a = [PhysicalBody, has_child_link.exactly(1, PhysicalObject), has_parent_link.exactly(1, PhysicalObject), has_joint_state.max(1, JointState)] +Joint.equivalent_to = [Or([FixedJoint, MovableJoint])] -Color.is_a = [Extrinsic, hasRegion.some(ColorRegion), hasRegion.only(ColorRegion)] +Color.is_a = [Extrinsic, has_region.some(ColorRegion), has_region.only(ColorRegion)] -Object.is_a = [Entity, hasLocation.some(Entity), isParticipantIn.some(Event), hasConstituent.only(Object), hasPart.only(Object), isClassifiedBy.only(Role)] +Object.is_a = [Entity, has_location.some(Entity), is_participant_in.some(Event), has_constituent.only(Object), has_part.only(Object), is_classified_by.only(Role)] ExecutionStateRegion.is_a = [Region] ExecutionStateRegion.equivalent_to = [OneOf([ExecutionState_Active, ExecutionState_Cancelled, ExecutionState_Failed, ExecutionState_Paused, ExecutionState_Pending, ExecutionState_Succeeded])] -Feature.is_a = [Object, hasPart.only(Feature), isFeatureOf.exactly(1, PhysicalObject)] +Feature.is_a = [Object, has_part.only(Feature), is_feature_of.exactly(1, PhysicalObject)] -Workflow.is_a = [Plan, definesRole.some(Role), definesTask.some(Task)] +Workflow.is_a = [Plan, defines_role.some(Role), defines_task.some(Task)] -FrictionAttribute.is_a = [PhysicalAttribute, hasFrictionValue.exactly(1, float)] +FrictionAttribute.is_a = [PhysicalAttribute, has_friction_value.exactly(1, float)] Goal.is_a = [Description] -StateTransition.is_a = [Transition, hasInitialScene.some(Scene), hasTerminalScene.some(Scene), includesEvent.some(Action), satisfies.some(ImageSchemaTheory)] +StateTransition.is_a = [Transition, has_initial_scene.some(Scene), has_terminal_scene.some(Scene), includes_event.some(Action), satisfies.some(ImageSchemaTheory)] -Scene.is_a = [Situation, includesEvent.some(State), satisfies.some(ImageSchemaTheory)] +Scene.is_a = [Situation, includes_event.some(State), satisfies.some(ImageSchemaTheory)] SituationTransition.is_a = [Transition] Situation.is_a = [Entity, satisfies.some(Description)] NonmanifestedSituation.is_a = [Situation] -NonmanifestedSituation.equivalent_to = [Situation & manifestsIn.exactly(0, Event)] +NonmanifestedSituation.equivalent_to = [And([Situation, manifests_in.exactly(0, Event)])] JointLimit.is_a = [PhysicalAttribute] -JointState.is_a = [PhysicalAttribute, hasJointPosition.exactly(1, float), hasJointVelocity.exactly(1, float), hasJointEffort.max(1, float)] +JointState.is_a = [PhysicalAttribute, has_joint_position.exactly(1, float), has_joint_velocity.exactly(1, float), has_joint_effort.max(1, float)] -Localization.is_a = [Extrinsic, hasRegion.some(SpaceRegion), hasRegion.only(SpaceRegion)] +Localization.is_a = [Extrinsic, has_region.some(SpaceRegion), has_region.only(SpaceRegion)] -MassAttribute.is_a = [PhysicalAttribute, hasMassValue.exactly(1, float)] +MassAttribute.is_a = [PhysicalAttribute, has_mass_value.exactly(1, float)] NetForce.is_a = [ForceAttribute] @@ -98,31 +98,31 @@ State.is_a = [Event] -Succedence.is_a = [Relation, Inverse(hasSuccedence).some(Description), hasPredecessor.exactly(1, TaskInvocation), hasSuccessor.exactly(1, TaskInvocation)] +Succedence.is_a = [Relation, Inverse(has_succedence).some(Description), has_predecessor.exactly(1, TaskInvocation), has_successor.exactly(1, TaskInvocation)] Agent.is_a = [Object] -Preference.is_a = [SocialQuality, isPreferenceOf.only(Agent)] +Preference.is_a = [SocialQuality, is_preference_of.only(Agent)] -Shape.is_a = [Intrinsic, hasRegion.some(ShapeRegion), hasRegion.only(ShapeRegion)] +Shape.is_a = [Intrinsic, has_region.some(ShapeRegion), has_region.only(ShapeRegion)] -ShapeRegion.is_a = [Region, hasSpaceRegion.max(1, SixDPose)] +ShapeRegion.is_a = [Region, has_space_region.max(1, SixDPose)] -SoftwareInstance.is_a = [Thing, SocialAgent & actsFor.some(Agent), isDesignedBy.some(Software)] +SoftwareInstance.is_a = [Thing, And([SocialAgent, acts_for.some(Agent)]), is_designed_by.some(Software)] SpaceRegion.is_a = [Region] -StateType.is_a = [EventType, classifies.only(State), hasPart.only(StateType)] +StateType.is_a = [EventType, classifies.only(State), has_part.only(StateType)] Relation.is_a = [Description] -PhysicalArtifact.is_a = [PhysicalObject, isDescribedBy.some(Plan)] +PhysicalArtifact.is_a = [PhysicalObject, is_described_by.some(Plan)] -PhysicalEffector.is_a = [FunctionalPart, Inverse(hasPart).some(PhysicalAgent)] +PhysicalEffector.is_a = [FunctionalPart, Inverse(has_part).some(PhysicalAgent)] PhysicalPlace.is_a = [PhysicalObject] -QueryingTask.is_a = [IllocutionaryTask, isTaskOf.some(Query), classifies.only(hasParticipant.some(InterrogativeClause))] +QueryingTask.is_a = [IllocutionaryTask, is_task_of.some(Query), classifies.only(has_participant.some(InterrogativeClause))] Design.is_a = [Description] @@ -130,21 +130,21 @@ Order.is_a = [FormalEntity, orders.some(OrderedElement)] -Plan.is_a = [Description, hasComponent.some(Goal)] +Plan.is_a = [Description, has_component.some(Goal)] -Transient.is_a = [Object, transitionsFrom.some(Object)] +Transient.is_a = [Object, transitions_from.some(Object)] -ColorRegion.is_a = [PhysicalAttribute, isRegionFor.only(Color)] +ColorRegion.is_a = [PhysicalAttribute, is_region_for.only(Color)] -InformationRealization.is_a = [InformationEntity, Event | PhysicalObject | Quality, realizes.some(InformationObject), realizesSelfInformation.has_self()] +InformationRealization.is_a = [InformationEntity, Or([Event, PhysicalObject, Quality]), realizes.some(InformationObject), realizes_self_information.has_self()] -ForceAttribute.is_a = [PhysicalAttribute, hasForceValue.exactly(1, float)] +ForceAttribute.is_a = [PhysicalAttribute, has_force_value.exactly(1, float)] TimeInterval.is_a = [Region] -PhysicalAttribute.is_a = [Region, isRegionFor.only(PhysicalObject)] +PhysicalAttribute.is_a = [Region, is_region_for.only(PhysicalObject)] -API_Specification.is_a = [InterfaceSpecification] +APISpecification.is_a = [InterfaceSpecification] InterfaceSpecification.is_a = [Design] @@ -158,13 +158,13 @@ Accident.is_a = [Event] -ActionExecutionPlan.is_a = [Plan, definesTask.only(hasParameter.some(Status))] +ActionExecutionPlan.is_a = [Plan, defines_task.only(has_parameter.some(Status))] Status.is_a = [Parameter] Actuating.is_a = [PhysicalTask] -PhysicalTask.is_a = [Task, classifies.only(Action & (hasParticipant.some(PhysicalAgent) | hasParticipant.some(PhysicalObject)))] +PhysicalTask.is_a = [Task, classifies.only(And([Action, (Or([has_participant.some(PhysicalAgent), has_participant.some(PhysicalObject)]))]))] AestheticDesign.is_a = [Design] @@ -182,8 +182,8 @@ AlterativeInteraction.is_a = [ForceInteraction] -ForceInteraction.is_a = [ProcessType, isProcessTypeOf.some(Agonist), isProcessTypeOf.some(Antagonist)] -ForceInteraction.equivalent_to = [AlterativeInteraction | PreservativeInteraction] +ForceInteraction.is_a = [ProcessType, is_process_type_of.some(Agonist), is_process_type_of.some(Antagonist)] +ForceInteraction.equivalent_to = [Or([AlterativeInteraction, PreservativeInteraction])] PreservativeInteraction.is_a = [ForceInteraction] @@ -196,48 +196,48 @@ Masterful.is_a = [DexterityDiagnosis] AnsweringTask.is_a = [Thing] -AnsweringTask.equivalent_to = [IllocutionaryTask & classifies.only(isReactionTo.only(isClassifiedBy.some(CommandingTask))), isTaskOf.some(Answer)] +AnsweringTask.equivalent_to = [And([IllocutionaryTask, classifies.only(is_reaction_to.only(is_classified_by.some(CommandingTask)))]), is_task_of.some(Answer)] -CommandingTask.is_a = [IllocutionaryTask, classifies.only(hasParticipant.some(ImperativeClause))] +CommandingTask.is_a = [IllocutionaryTask, classifies.only(has_participant.some(ImperativeClause))] -IllocutionaryTask.is_a = [Thing, CommunicationTask & classifies.only(hasParticipant.only(Agent | SocialObject))] +IllocutionaryTask.is_a = [Thing, And([CommunicationTask, classifies.only(has_participant.only(Or([Agent, SocialObject])))])] Antagonist.is_a = [Patient] Appliance.is_a = [DesignedArtifact] -DesignedArtifact.is_a = [PhysicalArtifact, isDescribedBy.some(Design)] +DesignedArtifact.is_a = [PhysicalArtifact, is_described_by.some(Design)] Approaching.is_a = [Locomotion] Locomotion.is_a = [BodyMovement, DirectedMotion] -ArchiveFile.is_a = [Digital_File] -ArchiveFile.equivalent_to = [Digital_File & realizes.some(ArchiveText)] +ArchiveFile.is_a = [DigitalFile] +ArchiveFile.equivalent_to = [And([DigitalFile, realizes.some(ArchiveText)])] ArchiveText.is_a = [Thing] -ArchiveText.equivalent_to = [Structured_Text & expresses.some(FileConfiguration), isGivenMeaningBy.some(ArchiveFormat)] +ArchiveText.equivalent_to = [And([StructuredText, expresses.some(FileConfiguration)]), is_given_meaning_by.some(ArchiveFormat)] -Digital_File.is_a = [InformationRealization, realizes.some(Structured_Text), hasNameString.some(str)] +DigitalFile.is_a = [InformationRealization, realizes.some(StructuredText), has_name_string.some(str)] -ArchiveFormat.is_a = [File_format, givesMeaningTo.only(ArchiveText)] +ArchiveFormat.is_a = [FileFormat, gives_meaning_to.only(ArchiveText)] -File_format.is_a = [Computer_Language] +FileFormat.is_a = [ComputerLanguage] FileConfiguration.is_a = [Thing] -FileConfiguration.equivalent_to = [Configuration & hasMember.only(Digital_File)] +FileConfiguration.equivalent_to = [And([Configuration, has_member.only(DigitalFile)])] -Structured_Text.is_a = [Thing] -Structured_Text.equivalent_to = [Text & isGivenMeaningBy.some(FormalLanguage)] +StructuredText.is_a = [Thing] +StructuredText.equivalent_to = [And([Text, is_given_meaning_by.some(FormalLanguage)])] AreaSurveying.is_a = [Perceiving] -Perceiving.is_a = [Thing, InformationAcquisition & PhysicalTask] +Perceiving.is_a = [Thing, And([InformationAcquisition, PhysicalTask])] Arm.is_a = [Limb] Limb.is_a = [PhysicalEffector] -Limb.equivalent_to = [Arm | Leg] +Limb.equivalent_to = [Or([Arm, Leg])] Arranging.is_a = [Constructing] @@ -249,7 +249,7 @@ Assembling.is_a = [Constructing] -AssertionTask.is_a = [IllocutionaryTask, classifies.only(hasParticipant.some(DeclarativeClause))] +AssertionTask.is_a = [IllocutionaryTask, classifies.only(has_participant.some(DeclarativeClause))] DeclarativeClause.is_a = [ClausalObject] @@ -271,7 +271,7 @@ Restrictor.is_a = [Instrument] -BehavioralDiagnosis.is_a = [Diagnosis, hasConstituent.some(Goal)] +BehavioralDiagnosis.is_a = [Diagnosis, has_constituent.some(Goal)] Diagnosis.is_a = [Description] @@ -285,29 +285,29 @@ RoleFillerBinding.is_a = [Binding] -RoleRoleBinding.is_a = [Binding, hasBindingFiller.only(Parameter | Role)] +RoleRoleBinding.is_a = [Binding, has_binding_filler.only(Or([Parameter, Role]))] -Blockage.is_a = [Disposition, affordsBearer.only(Barrier), affordsTrigger.only(BlockedObject)] +Blockage.is_a = [Disposition, affords_bearer.only(Barrier), affords_trigger.only(BlockedObject)] BlockedObject.is_a = [Patient] -BodyMovement.is_a = [Motion, classifies.only(hasParticipant.some(PhysicalAgent) | hasParticipant.some(PhysicalObject & isPartOf.some(PhysicalAgent)))] +BodyMovement.is_a = [Motion, classifies.only(Or([has_participant.some(PhysicalAgent), has_participant.some(And([PhysicalObject, is_part_of.some(PhysicalAgent)]))]))] Boiling.is_a = [Vaporizing] -Vaporizing.is_a = [PhaseTransition, isProcessTypeOf.some(AlteredObject & classifies.only(Substance))] +Vaporizing.is_a = [PhaseTransition, is_process_type_of.some(And([AlteredObject, classifies.only(Substance)]))] -BoxShape.is_a = [ShapeRegion, hasHeight.exactly(1, float), hasLength.exactly(1, float), hasWidth.exactly(1, float)] +BoxShape.is_a = [ShapeRegion, has_height.exactly(1, float), has_length.exactly(1, float), has_width.exactly(1, float)] -CanCut.is_a = [Variability, affordsBearer.only(Cutter), affordsTrigger.only(CutObject)] +CanCut.is_a = [Variability, affords_bearer.only(Cutter), affords_trigger.only(CutObject)] -Variability.is_a = [Disposition, affordsBearer.only(Tool), affordsTrigger.only(AlteredObject)] +Variability.is_a = [Disposition, affords_bearer.only(Tool), affords_trigger.only(AlteredObject)] Cutter.is_a = [Tool] CutObject.is_a = [AlteredObject] -Capability.is_a = [Disposition, isDescribedBy.exactly(1, Affordance & definesBearer.exactly(1, Role) & definesTrigger.exactly(1, Role) & definesTask.exactly(1, Task))] +Capability.is_a = [Disposition, is_described_by.exactly(1, And([Affordance, defines_bearer.exactly(1, Role), defines_trigger.exactly(1, Role), defines_task.exactly(1, Task)]))] Capacity.is_a = [Intrinsic] @@ -321,7 +321,7 @@ EventAdjacentRole.is_a = [Role] -CausedMotionTheory.is_a = [ImageSchemaTheory, defines.some(CausalEventRole), defines.some(Instrument), defines.some(Patient), defines.some(PerformerRole), hasPart.some(SourcePathGoalTheory)] +CausedMotionTheory.is_a = [ImageSchemaTheory, defines.some(CausalEventRole), defines.some(Instrument), defines.some(Patient), defines.some(PerformerRole), has_part.some(SourcePathGoalTheory)] ImageSchemaTheory.is_a = [SchematicTheory] @@ -329,11 +329,11 @@ SourcePathGoalTheory.is_a = [ImageSchemaTheory, defines.some(Destination), defines.some(Origin), defines.some(PathRole)] -Channel.is_a = [PathRole, hasTask.some(CommunicationTask)] +Channel.is_a = [PathRole, has_task.some(CommunicationTask)] PathRole.is_a = [SpatioTemporalRole] -CommunicationTask.is_a = [Task, isTaskOf.some(Channel) & isTaskOf.some(Message) & isTaskOf.some(Receiver) & isTaskOf.some(Sender), classifies.only(hasParticipant.only(Agent | SocialObject))] +CommunicationTask.is_a = [Task, And([is_task_of.some(Channel), is_task_of.some(Message), is_task_of.some(Receiver), is_task_of.some(Sender)]), classifies.only(has_participant.only(Or([Agent, SocialObject])))] CheckingObjectPresence.is_a = [Perceiving] @@ -343,9 +343,9 @@ ResultRole.is_a = [GoalRole] -CircularCylinder.is_a = [CylinderShape, hasRadius.exactly(1, float)] +CircularCylinder.is_a = [CylinderShape, has_radius.exactly(1, float)] -CylinderShape.is_a = [ShapeRegion, hasRadius.some(float), hasLength.exactly(1, float)] +CylinderShape.is_a = [ShapeRegion, has_radius.some(float), has_length.exactly(1, float)] Classifier.is_a = [StatisticalReasoner] @@ -359,28 +359,28 @@ CleanlinessRegion.is_a = [Region] -Cleaning.is_a = [ModifyingPhysicalObject, isTaskAffordedBy.some(Purification)] +Cleaning.is_a = [ModifyingPhysicalObject, is_task_afforded_by.some(Purification)] ModifyingPhysicalObject.is_a = [PhysicalTask] -Purification.is_a = [Variability, affordsSetpoint.only(classifies.only(Clean & isRegionFor.only(Cleanliness))), affordsTrigger.only(classifies.only(PhysicalObject))] +Purification.is_a = [Variability, affords_setpoint.only(classifies.only(And([Clean, is_region_for.only(Cleanliness)]))), affords_trigger.only(classifies.only(PhysicalObject))] -Cleanliness.is_a = [SocialQuality, hasRegion.some(CleanlinessRegion), hasRegion.only(CleanlinessRegion)] +Cleanliness.is_a = [SocialQuality, has_region.some(CleanlinessRegion), has_region.only(CleanlinessRegion)] SocialQuality.is_a = [Quality] -ClientServer_Specification.is_a = [InterfaceSpecification, definesRole.some(ClientRole) & definesRole.some(ServerRole)] +ClientServerSpecification.is_a = [InterfaceSpecification, And([defines_role.some(ClientRole), defines_role.some(ServerRole)])] -ClientRole.is_a = [InterfaceComponentRole, isDefinedIn.some(ClientServer_Specification)] +ClientRole.is_a = [InterfaceComponentRole, is_defined_in.some(ClientServerSpecification)] -ServerRole.is_a = [InterfaceComponentRole, isDefinedIn.some(ClientServer_Specification)] +ServerRole.is_a = [InterfaceComponentRole, is_defined_in.some(ClientServerSpecification)] InterfaceComponentRole.is_a = [SoftwareRole] -InterfaceComponentRole.equivalent_to = [SoftwareRole & isDefinedIn.only(InterfaceSpecification)] +InterfaceComponentRole.equivalent_to = [And([SoftwareRole, is_defined_in.only(InterfaceSpecification)])] Closing.is_a = [Actuating] -Delivering.is_a = [Actuating, isTaskAffordedBy.some(Shifting)] +Delivering.is_a = [Actuating, is_task_afforded_by.some(Shifting)] Fetching.is_a = [PhysicalAcquiring] @@ -410,32 +410,32 @@ ConnectedObject.is_a = [Patient] -CommunicationAction.is_a = [Action, hasParticipant.some(LinguisticObject)] +CommunicationAction.is_a = [Action, has_participant.some(LinguisticObject)] LinguisticObject.is_a = [InformationObject] CommunicationReport.is_a = [CommunicationTask] -Receiver.is_a = [ExperiencerRole, hasTask.some(CommunicationTask)] +Receiver.is_a = [ExperiencerRole, has_task.some(CommunicationTask)] -Sender.is_a = [PerformerRole, hasTask.some(CommunicationTask)] +Sender.is_a = [PerformerRole, has_task.some(CommunicationTask)] -SocialObject.is_a = [Object, isExpressedBy.some(InformationObject), hasPart.only(SocialObject)] +SocialObject.is_a = [Object, is_expressed_by.some(InformationObject), has_part.only(SocialObject)] -CommunicationTopic.is_a = [ResourceRole, classifies.only(SocialObject & isParticipantIn.some(isClassifiedBy.some(CommunicationTask)))] +CommunicationTopic.is_a = [ResourceRole, classifies.only(And([SocialObject, is_participant_in.some(is_classified_by.some(CommunicationTask))]))] ResourceRole.is_a = [EventAdjacentRole] -Composing.is_a = [Variability, affordsTrigger.only(ConnectedObject)] +Composing.is_a = [Variability, affords_trigger.only(ConnectedObject)] -Computer_Language.is_a = [FormalLanguage] +ComputerLanguage.is_a = [FormalLanguage] -FormalLanguage.is_a = [Language, givesMeaningTo.only(Structured_Text)] +FormalLanguage.is_a = [Language, gives_meaning_to.only(StructuredText)] -Computer_Program.is_a = [Thing] -Computer_Program.equivalent_to = [Structured_Text & isGivenMeaningBy.some(Programming_Language), Structured_Text & expresses.some(Algorithm)] +ComputerProgram.is_a = [Thing] +ComputerProgram.equivalent_to = [And([StructuredText, is_given_meaning_by.some(ProgrammingLanguage)]), And([StructuredText, expresses.some(Algorithm)])] -Programming_Language.is_a = [Computer_Language, givesMeaningTo.only(Computer_Program)] +ProgrammingLanguage.is_a = [ComputerLanguage, gives_meaning_to.only(ComputerProgram)] Conclusion.is_a = [CreatedObject, Knowledge] @@ -443,23 +443,23 @@ Knowledge.is_a = [Item] -ConditionalSuccedence.is_a = [Succedence, hasBinding.only(CounterfactualBinding)] +ConditionalSuccedence.is_a = [Succedence, has_binding.only(CounterfactualBinding)] Configuration.is_a = [Description, describes.some(StateType)] -Connectivity.is_a = [Disposition, affordsBearer.only(ConnectedObject), affordsTrigger.only(ConnectedObject)] +Connectivity.is_a = [Disposition, affords_bearer.only(ConnectedObject), affords_trigger.only(ConnectedObject)] -ContactState.is_a = [StateType, classifies.only(hasParticipant.min(2, PhysicalObject))] +ContactState.is_a = [StateType, classifies.only(has_participant.min(2, PhysicalObject))] Container.is_a = [Restrictor] -Containment.is_a = [Disposition, affordsBearer.only(Container), affordsTrigger.only(IncludedObject), isDispositionOf.only(hasQuality.some(Capacity))] +Containment.is_a = [Disposition, affords_bearer.only(Container), affords_trigger.only(IncludedObject), is_disposition_of.only(has_quality.some(Capacity))] IncludedObject.is_a = [Patient] -ContainmentState.is_a = [FunctionalControl, isStateTypeOf.some(Container & classifies.only(hasDisposition.some(Containment)))] +ContainmentState.is_a = [FunctionalControl, is_state_type_of.some(And([Container, classifies.only(has_disposition.some(Containment))]))] -FunctionalControl.is_a = [StateType, isStateTypeOf.some(Item), isStateTypeOf.some(Restrictor)] +FunctionalControl.is_a = [StateType, is_state_type_of.some(Item), is_state_type_of.some(Restrictor)] ContainmentTheory.is_a = [ControlTheory] @@ -473,7 +473,7 @@ Cover.is_a = [Barrier] -Coverage.is_a = [Blockage, affordsBearer.only(Cover), affordsTrigger.only(CoveredObject)] +Coverage.is_a = [Blockage, affords_bearer.only(Cover), affords_trigger.only(CoveredObject)] CoveredObject.is_a = [BlockedObject] @@ -485,9 +485,9 @@ CrackingTheory.is_a = [ExecutableSchematicTheory, defines.some(Instrument), defines.some(Patient)] -Creation.is_a = [ProcessType, isProcessTypeOf.some(CreatedObject)] +Creation.is_a = [ProcessType, is_process_type_of.some(CreatedObject)] -Cuttability.is_a = [Disposition, affordsBearer.only(CutObject), affordsTrigger.only(Cutter)] +Cuttability.is_a = [Disposition, affords_bearer.only(CutObject), affords_trigger.only(Cutter)] Tool.is_a = [Instrument] @@ -499,17 +499,17 @@ Deciding.is_a = [DerivingInformation] -DerivingInformation.is_a = [InformationAcquisition, isTaskOfInputRole.some(Premise) & isTaskOfOutputRole.some(Conclusion)] +DerivingInformation.is_a = [InformationAcquisition, And([is_task_of_input_role.some(Premise), is_task_of_output_role.some(Conclusion)])] DeductiveReasoning.is_a = [Reasoning] -Deformation.is_a = [Alteration, isProcessTypeOf.exactly(1, ShapedObject)] +Deformation.is_a = [Alteration, is_process_type_of.exactly(1, ShapedObject)] -ShapedObject.is_a = [AlteredObject, isTriggerDefinedIn.some(describesQuality.only(Shape)), classifies.only(hasQuality.some(Shape))] +ShapedObject.is_a = [AlteredObject, is_trigger_defined_in.some(describes_quality.only(Shape)), classifies.only(has_quality.some(Shape))] -FluidFlow.is_a = [Motion, isProcessTypeOf.some(MovedObject)] +FluidFlow.is_a = [Motion, is_process_type_of.some(MovedObject)] -Shifting.is_a = [Variability, affordsSetpoint.only(classifies.only(Localization)), affordsTrigger.only(MovedObject)] +Shifting.is_a = [Variability, affords_setpoint.only(classifies.only(Localization)), affords_trigger.only(MovedObject)] DependentPlace.is_a = [Feature] @@ -517,18 +517,18 @@ DepositedObject.is_a = [Patient] -Deposition.is_a = [Disposition, affordsBearer.only(Deposit), affordsTrigger.only(DepositedObject)] +Deposition.is_a = [Disposition, affords_bearer.only(Deposit), affords_trigger.only(DepositedObject)] InformationAcquisition.is_a = [Thing] -InformationAcquisition.equivalent_to = [MentalTask & isTaskOfOutputRole.some(Knowledge)] +InformationAcquisition.equivalent_to = [And([MentalTask, is_task_of_output_role.some(Knowledge)])] Premise.is_a = [Knowledge] -DesignedComponent.is_a = [FunctionalPart, DesignedArtifact, hasDisposition.some(Connectivity)] +DesignedComponent.is_a = [FunctionalPart, DesignedArtifact, has_disposition.some(Connectivity)] -FunctionalPart.is_a = [PhysicalBody, isComponentOf.only(Agent | DesignedArtifact)] +FunctionalPart.is_a = [PhysicalBody, is_component_of.only(Or([Agent, DesignedArtifact]))] -DesignedContainer.is_a = [DesignedArtifact, hasDisposition.some(Containment)] +DesignedContainer.is_a = [DesignedArtifact, has_disposition.some(Containment)] DesignedFurniture.is_a = [DesignedArtifact] @@ -540,14 +540,14 @@ DestroyedObject.is_a = [Patient] -Destruction.is_a = [ProcessType, isProcessTypeOf.some(DestroyedObject)] +Destruction.is_a = [ProcessType, is_process_type_of.some(DestroyedObject)] DetectedObject.is_a = [Patient] DeviceState.is_a = [Intrinsic] DeviceStateRange.is_a = [Region] -DeviceStateRange.equivalent_to = [DeviceTurnedOff | DeviceTurnedOn] +DeviceStateRange.equivalent_to = [Or([DeviceTurnedOff, DeviceTurnedOn])] DeviceTurnedOff.is_a = [DeviceStateRange] @@ -587,7 +587,7 @@ EnclosedObject.is_a = [IncludedObject] -Enclosing.is_a = [Containment, affordsTrigger.only(EnclosedObject)] +Enclosing.is_a = [Containment, affords_trigger.only(EnclosedObject)] EndEffectorPositioning.is_a = [Manipulating] @@ -598,19 +598,19 @@ ExcludedObject.is_a = [Patient] ExecutableFile.is_a = [Thing] -ExecutableFile.equivalent_to = [Digital_File & realizes.some(Executable_Code)] +ExecutableFile.equivalent_to = [And([DigitalFile, realizes.some(ExecutableCode)])] -Executable_Code.is_a = [Computer_Program] -Executable_Code.equivalent_to = [Computer_Program & isGivenMeaningBy.some(ExecutableFormat)] +ExecutableCode.is_a = [ComputerProgram] +ExecutableCode.equivalent_to = [And([ComputerProgram, is_given_meaning_by.some(ExecutableFormat)])] -ExecutableFormat.is_a = [File_format, givesMeaningTo.only(Executable_Code)] +ExecutableFormat.is_a = [FileFormat, gives_meaning_to.only(ExecutableCode)] SchematicTheory.is_a = [Theory] ExecutableSoftware.is_a = [Thing] -ExecutableSoftware.equivalent_to = [Software & hasMember.some(ExecutableFile)] +ExecutableSoftware.equivalent_to = [And([Software, has_member.some(ExecutableFile)])] -Software.is_a = [Design, describes.some(Software_Configuration), describes.only(SoftwareInstance | Software_Configuration)] +Software.is_a = [Design, describes.some(SoftwareConfiguration), describes.only(Or([SoftwareInstance, SoftwareConfiguration]))] RelationAdjacentRole.is_a = [Role] @@ -618,7 +618,7 @@ ExtractedObject.is_a = [Patient] -PhysicalQuality.is_a = [Quality, isQualityOf.exactly(1, PhysicalObject)] +PhysicalQuality.is_a = [Quality, is_quality_of.exactly(1, PhysicalObject)] FailedAttempt.is_a = [Unsuccessfulness] @@ -632,15 +632,15 @@ Configuration.is_a = [Collection] -Finger.is_a = [Limb, isPartOf.some(Hand)] +Finger.is_a = [Limb, is_part_of.some(Hand)] Hand.is_a = [PrehensileEffector] -FixedJoint.is_a = [Joint, hasJointState.exactly(0, Entity)] +FixedJoint.is_a = [Joint, has_joint_state.exactly(0, Entity)] -MovableJoint.is_a = [Joint, hasJointState.exactly(1, JointState)] +MovableJoint.is_a = [Joint, has_joint_state.exactly(1, JointState)] -Flipping.is_a = [Actuating, isTaskAffordedBy.some(Shifting)] +Flipping.is_a = [Actuating, is_task_afforded_by.some(Shifting)] FloatingJoint.is_a = [MovableJoint] @@ -648,7 +648,7 @@ Substance.is_a = [PhysicalBody] -MovedObject.is_a = [AlteredObject, isTriggerDefinedIn.some(describesQuality.only(Localization)), classifies.only(hasQuality.some(Localization))] +MovedObject.is_a = [AlteredObject, is_trigger_defined_in.some(describes_quality.only(Localization)), classifies.only(has_quality.some(Localization))] Focusing.is_a = [AttentionShift] @@ -656,11 +656,11 @@ ForgettingIncorrectInformation.is_a = [InformationDismissal] -InformationDismissal.is_a = [MentalTask, isTaskOfInputRole.some(ExcludedObject & Knowledge)] +InformationDismissal.is_a = [MentalTask, is_task_of_input_role.some(And([ExcludedObject, Knowledge]))] ForgettingIrrelevantInformation.is_a = [InformationDismissal] -Language.is_a = [System, givesMeaningTo.only(Text)] +Language.is_a = [System, gives_meaning_to.only(Text)] Item.is_a = [Patient] @@ -676,13 +676,13 @@ GetTaskParameter.is_a = [Planning] -Planning.is_a = [Deciding, isTaskOf.some(classifies.some(Plan))] +Planning.is_a = [Deciding, is_task_of.some(classifies.some(Plan))] GraphDatabase.is_a = [Database] GraphQueryLanguage.is_a = [QueryLanguage] -QueryLanguage.is_a = [Computer_Language] +QueryLanguage.is_a = [ComputerLanguage] GraspTransfer.is_a = [Grasping] @@ -693,7 +693,7 @@ Releasing.is_a = [Manipulating] GraspingMotion.is_a = [PrehensileMotion] -GraspingMotion.equivalent_to = [IntermediateGrasp | PowerGrasp | PrecisionGrasp] +GraspingMotion.equivalent_to = [Or([IntermediateGrasp, PowerGrasp, PrecisionGrasp])] IntermediateGrasp.is_a = [GraspingMotion] @@ -701,8 +701,8 @@ PrecisionGrasp.is_a = [GraspingMotion] -PrehensileMotion.is_a = [DirectedMotion, isProcessTypeOf.some(MovedObject & classifies.only(PrehensileEffector))] -PrehensileMotion.equivalent_to = [GraspingMotion | ReleasingMotion] +PrehensileMotion.is_a = [DirectedMotion, is_process_type_of.some(And([MovedObject, classifies.only(PrehensileEffector)]))] +PrehensileMotion.equivalent_to = [Or([GraspingMotion, ReleasingMotion])] ReleasingMotion.is_a = [PrehensileMotion] @@ -714,9 +714,9 @@ HardwareDiagnosis.is_a = [TechnicalDiagnosis] -TechnicalDiagnosis.is_a = [FunctionalDiagnosis, hasConstituent.some(DesignedArtifact)] +TechnicalDiagnosis.is_a = [FunctionalDiagnosis, has_constituent.some(DesignedArtifact)] -HasQualityRegion.is_a = [Relation, hasQuality.exactly(1, Quality), hasRegion.exactly(1, Region)] +HasQualityRegion.is_a = [Relation, has_quality.exactly(1, Quality), has_region.exactly(1, Region)] Head.is_a = [FunctionalPart] @@ -726,22 +726,22 @@ Holding.is_a = [Manipulating] -HostRole.is_a = [InterfaceComponentRole, isDefinedIn.some(PluginSpecification)] +HostRole.is_a = [InterfaceComponentRole, is_defined_in.some(PluginSpecification)] -PluginSpecification.is_a = [API_Specification, definesRole.some(HostRole) & definesRole.some(PluginRole)] +PluginSpecification.is_a = [APISpecification, And([defines_role.some(HostRole), defines_role.some(PluginRole)])] -Humanreadable_Programming_Language.is_a = [Programming_Language, givesMeaningTo.only(Source_Code)] +HumanreadableProgrammingLanguage.is_a = [ProgrammingLanguage, gives_meaning_to.only(SourceCode)] -Source_Code.is_a = [Computer_Program] -Source_Code.equivalent_to = [Computer_Program & isGivenMeaningBy.some(Humanreadable_Programming_Language)] +SourceCode.is_a = [ComputerProgram] +SourceCode.equivalent_to = [And([ComputerProgram, is_given_meaning_by.some(HumanreadableProgrammingLanguage)])] HumanActivityRecording.is_a = [RecordedEpisode] -RecordedEpisode.is_a = [Episode, includesRecord.some(InformationObject)] +RecordedEpisode.is_a = [Episode, includes_record.some(InformationObject)] Imagining.is_a = [InformationAcquisition] -Impediment.is_a = [Blockage, affordsBearer.only(Obstacle), affordsTrigger.only(RestrictedObject)] +Impediment.is_a = [Blockage, affords_bearer.only(Obstacle), affords_trigger.only(RestrictedObject)] Obstacle.is_a = [Barrier] @@ -757,15 +757,15 @@ InferenceRules.is_a = [Knowledge] -InformationRetrieval.is_a = [InformationAcquisition, isTaskOfOutputRole.some(Knowledge)] +InformationRetrieval.is_a = [InformationAcquisition, is_task_of_output_role.some(Knowledge)] -InformationStorage.is_a = [MentalTask, isTaskOfInputRole.some(Knowledge & StoredObject)] +InformationStorage.is_a = [MentalTask, is_task_of_input_role.some(And([Knowledge, StoredObject]))] StoredObject.is_a = [EnclosedObject] InsertedObject.is_a = [EnclosedObject] -Insertion.is_a = [Enclosing, affordsTrigger.only(InsertedObject)] +Insertion.is_a = [Enclosing, affords_trigger.only(InsertedObject)] Instructions.is_a = [Item] @@ -777,14 +777,14 @@ KineticFrictionAttribute.is_a = [FrictionAttribute] -KinoDynamicData.is_a = [InformationObject, isAbout.only(PhysicalObject)] +KinoDynamicData.is_a = [InformationObject, is_about.only(PhysicalObject)] -KnowledgeRepresentationLanguage.is_a = [Computer_Language] +KnowledgeRepresentationLanguage.is_a = [ComputerLanguage] Labeling.is_a = [Interpreting] Text.is_a = [Thing] -Text.equivalent_to = [InformationObject & isGivenMeaningBy.some(Language)] +Text.equivalent_to = [And([InformationObject, is_given_meaning_by.some(Language)])] Leaning.is_a = [PosturalMoving] @@ -794,20 +794,20 @@ Leg.is_a = [Limb] -LimbMotion.is_a = [DirectedMotion, isProcessTypeOf.some(MovedObject & classifies.only(Limb))] +LimbMotion.is_a = [DirectedMotion, is_process_type_of.some(And([MovedObject, classifies.only(Limb)]))] -Linkage.is_a = [Connectivity, affordsBearer.only(LinkedObject), affordsTrigger.only(LinkedObject)] +Linkage.is_a = [Connectivity, affords_bearer.only(LinkedObject), affords_trigger.only(LinkedObject)] LinkedObject.is_a = [ConnectedObject] -LinkageState.is_a = [StateType, isStateTypeOf.some(LinkedObject)] +LinkageState.is_a = [StateType, is_state_type_of.some(LinkedObject)] SpatioTemporalRole.is_a = [EventAdjacentRole] SpatialRelationRole.is_a = [RelationAdjacentRole] LocutionaryAction.is_a = [Thing] -LocutionaryAction.equivalent_to = [CommunicationAction & hasParticipant.some(Agent)] +LocutionaryAction.equivalent_to = [And([CommunicationAction, has_participant.some(Agent)])] LookingAt.is_a = [PhysicalTask] @@ -817,21 +817,21 @@ PhysicalAction.is_a = [Action] -Markup_Language.is_a = [Computer_Language] +MarkupLanguage.is_a = [ComputerLanguage] Material.is_a = [Intrinsic] -MedicalDiagnosis.is_a = [FunctionalDiagnosis, hasConstituent.some(Organism)] +MedicalDiagnosis.is_a = [FunctionalDiagnosis, has_constituent.some(Organism)] Organism.is_a = [BiologicalObject, PhysicalAgent] Memorizing.is_a = [Learning] -MentalAction.is_a = [Action, hasParticipant.only(Agent | SocialObject)] +MentalAction.is_a = [Action, has_participant.only(Or([Agent, SocialObject]))] -MeshShape.is_a = [ShapeRegion, hasFilePath.exactly(1, str), hasShapeScale.max(1, float)] +MeshShape.is_a = [ShapeRegion, has_file_path.exactly(1, str), has_shape_scale.max(1, float)] -MeshShapeData.is_a = [InformationObject, isAbout.only(PhysicalObject)] +MeshShapeData.is_a = [InformationObject, is_about.only(PhysicalObject)] MetaCognitionEvaluationTopic.is_a = [MetaCognitionTopic] @@ -855,30 +855,30 @@ Proprioceiving.is_a = [PhysicalTask] -ProcessFlow.is_a = [Description, definesProcess.some(ProcessType)] +ProcessFlow.is_a = [Description, defines_process.some(ProcessType)] -PhysicsProcess.is_a = [Process, hasParticipant.some(PhysicalObject)] +PhysicsProcess.is_a = [Process, has_participant.some(PhysicalObject)] MovingAway.is_a = [Locomotion] MovingTo.is_a = [Navigating] -Natural_Language.is_a = [Language, givesMeaningTo.only(Natural_Language_Text)] +NaturalLanguage.is_a = [Language, gives_meaning_to.only(NaturalLanguageText)] -Natural_Language_Text.is_a = [Thing] -Natural_Language_Text.equivalent_to = [Text & isGivenMeaningBy.some(Natural_Language)] +NaturalLanguageText.is_a = [Thing] +NaturalLanguageText.equivalent_to = [And([Text, is_given_meaning_by.some(NaturalLanguage)])] -Ontology.is_a = [Structured_Text] -Ontology.equivalent_to = [Structured_Text & isGivenMeaningBy.some(Ontology_Language)] +Ontology.is_a = [StructuredText] +Ontology.equivalent_to = [And([StructuredText, is_given_meaning_by.some(OntologyLanguage)])] -Ontology_Language.is_a = [KnowledgeRepresentationLanguage, givesMeaningTo.only(Ontology)] +OntologyLanguage.is_a = [KnowledgeRepresentationLanguage, gives_meaning_to.only(Ontology)] Option.is_a = [ResourceRole] FormalEntity.is_a = [Abstract] Singleton.is_a = [Thing] -Singleton.equivalent_to = [Set & encapsulates.exactly(1, Entity)] +Singleton.equivalent_to = [And([Set, encapsulates.exactly(1, Entity)])] Orienting.is_a = [Positioning] @@ -890,25 +890,25 @@ PhaseTransition.is_a = [Alteration] -PhysicalAccessibility.is_a = [StateType, isStateTypeOf.some(Item), isStateTypeOf.some(Restrictor)] +PhysicalAccessibility.is_a = [StateType, is_state_type_of.some(Item), is_state_type_of.some(Restrictor)] -PhysicalBlockage.is_a = [StateType, isStateTypeOf.some(Item), isStateTypeOf.some(Restrictor)] +PhysicalBlockage.is_a = [StateType, is_state_type_of.some(Item), is_state_type_of.some(Restrictor)] PhysicalExistence.is_a = [PhysicalState] -PhysicalState.is_a = [State, hasParticipant.some(PhysicalObject)] +PhysicalState.is_a = [State, has_participant.some(PhysicalObject)] PlacingTheory.is_a = [ExecutableSchematicTheory, defines.some(Destination), defines.some(Patient)] PlanarJoint.is_a = [MovableJoint] -PluginRole.is_a = [InterfaceComponentRole, isDefinedIn.some(PluginSpecification)] +PluginRole.is_a = [InterfaceComponentRole, is_defined_in.some(PluginSpecification)] -Pourable.is_a = [Disposition, affordsBearer.only(PouredObject)] +Pourable.is_a = [Disposition, affords_bearer.only(PouredObject)] PouredObject.is_a = [Patient] -Pouring.is_a = [Actuating, isTaskAffordedBy.some(Pourable)] +Pouring.is_a = [Actuating, is_task_afforded_by.some(Pourable)] PouringInto.is_a = [Pouring] @@ -918,17 +918,17 @@ Prospecting.is_a = [DerivingInformation] -Predilection.is_a = [SocialRelation, describes.only(Preference | (Order & orders.only(encapsulates.only(Situation))))] +Predilection.is_a = [SocialRelation, describes.only(Or([Preference, (And([Order, orders.only(encapsulates.only(Situation))]))]))] SocialRelation.is_a = [Relation] PreferenceOrder.is_a = [SocialRelation, orders.some(OrderedElement), orders.only(encapsulates.only(Description)), describes.only(Preference)] -PreferenceRegion.is_a = [SocialObjectAttribute, isRegionFor.some(Preference)] +PreferenceRegion.is_a = [SocialObjectAttribute, is_region_for.some(Preference)] -SocialObjectAttribute.is_a = [Region, isRegionFor.only(SocialObject)] +SocialObjectAttribute.is_a = [Region, is_region_for.only(SocialObject)] -PrismaticJoint.is_a = [MovableJoint, hasJointLimit.exactly(1, JointLimit)] +PrismaticJoint.is_a = [MovableJoint, has_joint_limit.exactly(1, JointLimit)] Progression.is_a = [Situation] Progression.equivalent_to = [satisfies.some(ProcessFlow)] @@ -948,7 +948,7 @@ Query.is_a = [Message] QueryAnsweringTask.is_a = [Thing] -QueryAnsweringTask.equivalent_to = [AnsweringTask & classifies.only(isReactionTo.only(isClassifiedBy.some(QueryingTask)))] +QueryAnsweringTask.equivalent_to = [And([AnsweringTask, classifies.only(is_reaction_to.only(is_classified_by.some(QueryingTask)))])] QueryEngine.is_a = [SoftwareRole] @@ -962,7 +962,7 @@ RedColor.is_a = [ColorRegion] -Reification.is_a = [Description, isReificationOf.exactly(1, normstr)] +Reification.is_a = [Description, is_reification_of.exactly(1, normstr)] RelationalDatabase.is_a = [Database] @@ -970,7 +970,7 @@ RelevantPart.is_a = [Feature] -Remembering.is_a = [Thing, InformationRetrieval & Retrospecting] +Remembering.is_a = [Thing, And([InformationRetrieval, Retrospecting])] Retrospecting.is_a = [InformationAcquisition] @@ -978,7 +978,7 @@ Replanning.is_a = [Planning] -RevoluteJoint.is_a = [HingeJoint, hasJointLimit.exactly(1, JointLimit)] +RevoluteJoint.is_a = [HingeJoint, has_joint_limit.exactly(1, JointLimit)] Room.is_a = [PhysicalPlace] @@ -988,29 +988,29 @@ Rubbing.is_a = [DirectedMotion] -Theory.is_a = [Description, hasComponent.some(Relation)] +Theory.is_a = [Description, has_component.some(Relation)] SelectedObject.is_a = [Role] Selecting.is_a = [Deciding] -SelectingItem.is_a = [GetTaskParameter, isTaskOfOutputRole.some(SelectedObject & classifies.only(PhysicalObject))] +SelectingItem.is_a = [GetTaskParameter, is_task_of_output_role.some(And([SelectedObject, classifies.only(PhysicalObject)]))] SelfReflection.is_a = [MetacognitiveControlling] -Serving.is_a = [Delivering, classifies.only(Action & (hasParticipant.some(PhysicalAgent) | hasParticipant.some(PhysicalObject)))] +Serving.is_a = [Delivering, classifies.only(And([Action, (Or([has_participant.some(PhysicalAgent), has_participant.some(PhysicalObject)]))]))] SettingGripper.is_a = [AssumingPose] -SixDPose.is_a = [SpaceRegion, hasPositionData.exactly(1, str)] +SixDPose.is_a = [SpaceRegion, has_position_data.exactly(1, str)] -Shaping.is_a = [Variability, affordsSetpoint.only(classifies.only(Shape)), affordsTrigger.only(ShapedObject)] +Shaping.is_a = [Variability, affords_setpoint.only(classifies.only(Shape)), affords_trigger.only(ShapedObject)] Sharpness.is_a = [Intrinsic] Simulating.is_a = [Prospecting] -Simulation_Reasoner.is_a = [Reasoner] +SimulationReasoner.is_a = [Reasoner] Set.is_a = [FormalEntity] @@ -1020,17 +1020,17 @@ Sluggishness.is_a = [Amateurish] -SocialState.is_a = [State, hasParticipant.some(Agent)] +SocialState.is_a = [State, has_participant.some(Agent)] -Software_Configuration.is_a = [Configuration, isDescribedBy.exactly(1, Software)] +SoftwareConfiguration.is_a = [Configuration, is_described_by.exactly(1, Software)] -SocialAgent.is_a = [Agent, SocialObject, actsThrough.some(PhysicalAgent)] +SocialAgent.is_a = [Agent, SocialObject, acts_through.some(PhysicalAgent)] SoftwareLibrary.is_a = [Software] SourceMaterialRole.is_a = [ResourceRole] -SphereShape.is_a = [ShapeRegion, hasRadius.exactly(1, float)] +SphereShape.is_a = [ShapeRegion, has_radius.exactly(1, float)] Standing.is_a = [PosturalMoving] @@ -1040,19 +1040,19 @@ StimulusRole.is_a = [CausativeRole] -Stirring.is_a = [Mixing, isTaskAffordedBy.some(Composing)] +Stirring.is_a = [Mixing, is_task_afforded_by.some(Composing)] -Storage.is_a = [Enclosing, affordsTrigger.only(StoredObject)] +Storage.is_a = [Enclosing, affords_trigger.only(StoredObject)] StructuralDesign.is_a = [Design] -TaskInvocation.is_a = [Workflow, hasBinding.only(FactualBinding), definesTask.exactly(1, Task)] +TaskInvocation.is_a = [Workflow, has_binding.only(FactualBinding), defines_task.exactly(1, Task)] SuccessDiagnosis.is_a = [BehavioralDiagnosis] Successfulness.is_a = [SuccessDiagnosis] -SupportState.is_a = [FunctionalControl, isStateTypeOf.some(Supporter & classifies.only(hasDisposition.some(Deposition)))] +SupportState.is_a = [FunctionalControl, is_state_type_of.some(And([Supporter, classifies.only(has_disposition.some(Deposition))]))] Supporter.is_a = [Restrictor] @@ -1066,11 +1066,11 @@ Taxis.is_a = [BodyMovement] -Temperature.is_a = [Intrinsic, hasRegion.some(TemperatureRegion), hasRegion.only(TemperatureRegion)] +Temperature.is_a = [Intrinsic, has_region.some(TemperatureRegion), has_region.only(TemperatureRegion)] TemperatureRegion.is_a = [Region] -Tempering.is_a = [Variability, affordsSetpoint.only(classifies.only(Temperature))] +Tempering.is_a = [Variability, affords_setpoint.only(classifies.only(Temperature))] ThinkAloud.is_a = [CommunicationReport] @@ -1106,264 +1106,264 @@ VideoData.is_a = [InformationObject] -ThreeDPosition.is_a = [SpaceRegion, hasPositionData.exactly(1, str)] +ThreeDPosition.is_a = [SpaceRegion, has_position_data.exactly(1, str)] -hasColorValue.is_a = [DatatypeProperty, hasRegionDataValue] -hasColorValue.domain = [ColorRegion] +has_color_value.is_a = [DatatypeProperty, has_region_data_value] +has_color_value.domain = [ColorRegion] -hasRegionDataValue.is_a = [DatatypeProperty, hasDataValue] -hasRegionDataValue.domain = [Region] +has_region_data_value.is_a = [DatatypeProperty, has_data_value] +has_region_data_value.domain = [Region] -hasDataFormat.is_a = [DatatypeProperty, hasDataValue] -hasDataFormat.domain = [InformationRealization] -hasDataFormat.range = [str] +has_data_format.is_a = [DatatypeProperty, has_data_value] +has_data_format.domain = [InformationRealization] +has_data_format.range = [str] -hasDataValue.is_a = [DatatypeProperty] -hasDataValue.domain = [Entity] +has_data_value.is_a = [DatatypeProperty] +has_data_value.domain = [Entity] -hasDepth.is_a = [DatatypeProperty, hasShapeParameter] -hasDepth.domain = [ShapeRegion] -hasDepth.range = [float] +has_depth.is_a = [DatatypeProperty, has_shape_parameter] +has_depth.domain = [ShapeRegion] +has_depth.range = [float] -hasShapeParameter.is_a = [DatatypeProperty, hasRegionDataValue] -hasShapeParameter.domain = [ShapeRegion] -hasShapeParameter.range = [float | float | float | str] +has_shape_parameter.is_a = [DatatypeProperty, has_region_data_value] +has_shape_parameter.domain = [ShapeRegion] +has_shape_parameter.range = [Or([float, float, float, str])] -hasEventBegin.is_a = [DatatypeProperty, hasEventTime] -hasEventBegin.domain = [Event] -hasEventBegin.range = [float] +has_event_begin.is_a = [DatatypeProperty, has_event_time] +has_event_begin.domain = [Event] +has_event_begin.range = [float] -hasEventTime.is_a = [DatatypeProperty, hasDataValue] -hasEventTime.domain = [Event] -hasEventTime.range = [float] +has_event_time.is_a = [DatatypeProperty, has_data_value] +has_event_time.domain = [Event] +has_event_time.range = [float] -hasEventEnd.is_a = [DatatypeProperty, hasEventTime] -hasEventEnd.domain = [Event] -hasEventEnd.range = [float] +has_event_end.is_a = [DatatypeProperty, has_event_time] +has_event_end.domain = [Event] +has_event_end.range = [float] -hasFilePath.is_a = [DatatypeProperty, hasDataValue] -hasFilePath.domain = [Entity] -hasFilePath.range = [str] +has_file_path.is_a = [DatatypeProperty, has_data_value] +has_file_path.domain = [Entity] +has_file_path.range = [str] -hasForceValue.is_a = [DatatypeProperty, hasRegionDataValue] -hasForceValue.domain = [ForceAttribute] -hasForceValue.range = [float] +has_force_value.is_a = [DatatypeProperty, has_region_data_value] +has_force_value.domain = [ForceAttribute] +has_force_value.range = [float] -hasFrictionValue.is_a = [DatatypeProperty, hasRegionDataValue] -hasFrictionValue.domain = [FrictionAttribute] -hasFrictionValue.range = [float] +has_friction_value.is_a = [DatatypeProperty, has_region_data_value] +has_friction_value.domain = [FrictionAttribute] +has_friction_value.range = [float] -hasHSVValue.is_a = [DatatypeProperty, hasColorValue] -hasHSVValue.domain = [ColorRegion] -hasHSVValue.range = [str] +has_hsv_value.is_a = [DatatypeProperty, has_color_value] +has_hsv_value.domain = [ColorRegion] +has_hsv_value.range = [str] -hasHeight.is_a = [DatatypeProperty, hasShapeParameter] -hasHeight.domain = [ShapeRegion] -hasHeight.range = [float] +has_height.is_a = [DatatypeProperty, has_shape_parameter] +has_height.domain = [ShapeRegion] +has_height.range = [float] -hasIntervalBegin.is_a = [DatatypeProperty, hasIntervalTime] -hasIntervalBegin.domain = [TimeInterval] -hasIntervalBegin.range = [float] +has_interval_begin.is_a = [DatatypeProperty, has_interval_time] +has_interval_begin.domain = [TimeInterval] +has_interval_begin.range = [float] -hasIntervalTime.is_a = [DatatypeProperty, hasRegionDataValue] -hasIntervalTime.domain = [TimeInterval] -hasIntervalTime.range = [float] +has_interval_time.is_a = [DatatypeProperty, has_region_data_value] +has_interval_time.domain = [TimeInterval] +has_interval_time.range = [float] -hasIntervalEnd.is_a = [DatatypeProperty, hasIntervalTime] -hasIntervalEnd.domain = [TimeInterval] -hasIntervalEnd.range = [float] +has_interval_end.is_a = [DatatypeProperty, has_interval_time] +has_interval_end.domain = [TimeInterval] +has_interval_end.range = [float] -hasJointEffort.is_a = [DatatypeProperty, hasJointParameter] -hasJointEffort.domain = [JointState] -hasJointEffort.range = [float] +has_joint_effort.is_a = [DatatypeProperty, has_joint_parameter] +has_joint_effort.domain = [JointState] +has_joint_effort.range = [float] -hasJointParameter.is_a = [DatatypeProperty, hasRegionDataValue] -hasJointParameter.domain = [PhysicalAttribute] -hasJointParameter.range = [float] +has_joint_parameter.is_a = [DatatypeProperty, has_region_data_value] +has_joint_parameter.domain = [PhysicalAttribute] +has_joint_parameter.range = [float] -hasJointEffortLimit.is_a = [DatatypeProperty, hasJointParameter] -hasJointEffortLimit.domain = [JointLimit] -hasJointEffortLimit.range = [float] +has_joint_effort_limit.is_a = [DatatypeProperty, has_joint_parameter] +has_joint_effort_limit.domain = [JointLimit] +has_joint_effort_limit.range = [float] -hasJointPosition.is_a = [DatatypeProperty, hasJointParameter] -hasJointPosition.domain = [JointState] -hasJointPosition.range = [float] +has_joint_position.is_a = [DatatypeProperty, has_joint_parameter] +has_joint_position.domain = [JointState] +has_joint_position.range = [float] -hasJointPositionMax.is_a = [DatatypeProperty, hasJointParameter] -hasJointPositionMax.domain = [JointLimit] -hasJointPositionMax.range = [float] +has_joint_position_max.is_a = [DatatypeProperty, has_joint_parameter] +has_joint_position_max.domain = [JointLimit] +has_joint_position_max.range = [float] -hasJointPositionMin.is_a = [DatatypeProperty, hasJointParameter] -hasJointPositionMin.domain = [JointLimit] -hasJointPositionMin.range = [float] +has_joint_position_min.is_a = [DatatypeProperty, has_joint_parameter] +has_joint_position_min.domain = [JointLimit] +has_joint_position_min.range = [float] -hasJointVelocity.is_a = [DatatypeProperty, hasJointParameter] -hasJointVelocity.domain = [JointState] -hasJointVelocity.range = [float] +has_joint_velocity.is_a = [DatatypeProperty, has_joint_parameter] +has_joint_velocity.domain = [JointState] +has_joint_velocity.range = [float] -hasJointVelocityLimit.is_a = [DatatypeProperty, hasJointParameter] -hasJointVelocityLimit.domain = [JointLimit] -hasJointVelocityLimit.range = [float] +has_joint_velocity_limit.is_a = [DatatypeProperty, has_joint_parameter] +has_joint_velocity_limit.domain = [JointLimit] +has_joint_velocity_limit.range = [float] -hasLength.is_a = [DatatypeProperty, hasShapeParameter] -hasLength.domain = [ShapeRegion] -hasLength.range = [float] +has_length.is_a = [DatatypeProperty, has_shape_parameter] +has_length.domain = [ShapeRegion] +has_length.range = [float] -hasMassValue.is_a = [DatatypeProperty, hasRegionDataValue] -hasMassValue.domain = [MassAttribute] -hasMassValue.range = [float] +has_mass_value.is_a = [DatatypeProperty, has_region_data_value] +has_mass_value.domain = [MassAttribute] +has_mass_value.range = [float] -hasNameString.is_a = [DatatypeProperty, hasDataValue] -hasNameString.domain = [Entity] -hasNameString.range = [str] +has_name_string.is_a = [DatatypeProperty, has_data_value] +has_name_string.domain = [Entity] +has_name_string.range = [str] -hasPersistentIdentifier.is_a = [DatatypeProperty, hasDataValue] -hasPersistentIdentifier.domain = [InformationRealization] -hasPersistentIdentifier.range = [str] +has_persistent_identifier.is_a = [DatatypeProperty, has_data_value] +has_persistent_identifier.domain = [InformationRealization] +has_persistent_identifier.range = [str] -hasPositionData.is_a = [DatatypeProperty, hasSpaceParameter] -hasPositionData.domain = [SpaceRegion] -hasPositionData.range = [str] +has_position_data.is_a = [DatatypeProperty, has_space_parameter] +has_position_data.domain = [SpaceRegion] +has_position_data.range = [str] -hasSpaceParameter.is_a = [DatatypeProperty, hasRegionDataValue] -hasSpaceParameter.domain = [SpaceRegion] +has_space_parameter.is_a = [DatatypeProperty, has_region_data_value] +has_space_parameter.domain = [SpaceRegion] -hasPriority.is_a = [DatatypeProperty, hasDataValue] -hasPriority.domain = [Task] +has_priority.is_a = [DatatypeProperty, has_data_value] +has_priority.domain = [Task] -hasRGBValue.is_a = [DatatypeProperty, hasColorValue] -hasRGBValue.domain = [ColorRegion] -hasRGBValue.range = [str] +has_rgb_value.is_a = [DatatypeProperty, has_color_value] +has_rgb_value.domain = [ColorRegion] +has_rgb_value.range = [str] -hasRadius.is_a = [DatatypeProperty, hasShapeParameter] -hasRadius.domain = [ShapeRegion] -hasRadius.range = [float] +has_radius.is_a = [DatatypeProperty, has_shape_parameter] +has_radius.domain = [ShapeRegion] +has_radius.range = [float] -hasReferenceFrame.is_a = [DatatypeProperty, hasSpaceParameter] -hasReferenceFrame.domain = [SpaceRegion] -hasReferenceFrame.range = [str] +has_reference_frame.is_a = [DatatypeProperty, has_space_parameter] +has_reference_frame.domain = [SpaceRegion] +has_reference_frame.range = [str] -hasShapeScale.is_a = [DatatypeProperty, hasShapeParameter] -hasShapeScale.domain = [ShapeRegion] -hasShapeScale.range = [float] +has_shape_scale.is_a = [DatatypeProperty, has_shape_parameter] +has_shape_scale.domain = [ShapeRegion] +has_shape_scale.range = [float] -hasWidth.is_a = [DatatypeProperty, hasShapeParameter] -hasWidth.domain = [ShapeRegion] -hasWidth.range = [float] +has_width.is_a = [DatatypeProperty, has_shape_parameter] +has_width.domain = [ShapeRegion] +has_width.range = [float] -isReificationOf.is_a = [DatatypeProperty, hasDataValue] -isReificationOf.domain = [Description] -isReificationOf.range = [normstr] +is_reification_of.is_a = [DatatypeProperty, has_data_value] +is_reification_of.domain = [Description] +is_reification_of.range = [normstr] affects.is_a = [ObjectProperty, precedes] -precedes.is_a = [ObjectProperty, TransitiveProperty, associatedWith] +precedes.is_a = [ObjectProperty, TransitiveProperty, associated_with] precedes.domain = [Entity] precedes.range = [Entity] -isAffectedBy.is_a = [ObjectProperty, follows] +is_affected_by.is_a = [ObjectProperty, follows] -affordanceDefines.is_a = [ObjectProperty, defines] -affordanceDefines.domain = [Affordance] -affordanceDefines.range = [Concept] +affordance_defines.is_a = [ObjectProperty, defines] +affordance_defines.domain = [Affordance] +affordance_defines.range = [Concept] -defines.is_a = [ObjectProperty, usesConcept] +defines.is_a = [ObjectProperty, uses_concept] defines.domain = [Description] defines.range = [Concept] -isDefinedInAffordance.is_a = [ObjectProperty, isDefinedIn] -isDefinedInAffordance.domain = [Concept] -isDefinedInAffordance.range = [Affordance] +is_defined_in_affordance.is_a = [ObjectProperty, is_defined_in] +is_defined_in_affordance.domain = [Concept] +is_defined_in_affordance.range = [Affordance] -affordanceDefinesTask.is_a = [ObjectProperty, affordanceDefines, definesTask] -affordanceDefinesTask.domain = [Affordance] -affordanceDefinesTask.range = [Task] +affordance_defines_task.is_a = [ObjectProperty, affordance_defines, defines_task] +affordance_defines_task.domain = [Affordance] +affordance_defines_task.range = [Task] -definesTask.is_a = [ObjectProperty, defines] -definesTask.domain = [Description] -definesTask.range = [Task] +defines_task.is_a = [ObjectProperty, defines] +defines_task.domain = [Description] +defines_task.range = [Task] -isTaskDefinedInAffordance.is_a = [ObjectProperty, isDefinedInAffordance, isTaskDefinedIn] -isTaskDefinedInAffordance.domain = [Task] -isTaskDefinedInAffordance.range = [Affordance] +is_task_defined_in_affordance.is_a = [ObjectProperty, is_defined_in_affordance, is_task_defined_in] +is_task_defined_in_affordance.domain = [Task] +is_task_defined_in_affordance.range = [Affordance] -affordsBearer.is_a = [ObjectProperty, affordsConcept] -affordsBearer.domain = [Disposition] -affordsBearer.range = [Role] +affords_bearer.is_a = [ObjectProperty, affords_concept] +affords_bearer.domain = [Disposition] +affords_bearer.range = [Role] -affordsConcept.is_a = [ObjectProperty, associatedWith] -affordsConcept.domain = [Disposition] -affordsConcept.range = [Concept] +affords_concept.is_a = [ObjectProperty, associated_with] +affords_concept.domain = [Disposition] +affords_concept.range = [Concept] -isBearerAffordedBy.is_a = [ObjectProperty, isConceptAffordedBy] -isBearerAffordedBy.domain = [Role] -isBearerAffordedBy.range = [Disposition] +is_bearer_afforded_by.is_a = [ObjectProperty, is_concept_afforded_by] +is_bearer_afforded_by.domain = [Role] +is_bearer_afforded_by.range = [Disposition] -isDescribedBy.is_a = [ObjectProperty, associatedWith] -isDescribedBy.domain = [Entity] -isDescribedBy.range = [Description] +is_described_by.is_a = [ObjectProperty, associated_with] +is_described_by.domain = [Entity] +is_described_by.range = [Description] -definesBearer.is_a = [ObjectProperty, definesRole] -definesBearer.domain = [Affordance] -definesBearer.range = [Role] +defines_bearer.is_a = [ObjectProperty, defines_role] +defines_bearer.domain = [Affordance] +defines_bearer.range = [Role] -associatedWith.is_a = [ObjectProperty, SymmetricProperty, TransitiveProperty] -associatedWith.domain = [Entity] -associatedWith.range = [Entity] +associated_with.is_a = [ObjectProperty, SymmetricProperty, TransitiveProperty] +associated_with.domain = [Entity] +associated_with.range = [Entity] -isConceptAffordedBy.is_a = [ObjectProperty, associatedWith] -isConceptAffordedBy.domain = [Concept] -isConceptAffordedBy.range = [Disposition] +is_concept_afforded_by.is_a = [ObjectProperty, associated_with] +is_concept_afforded_by.domain = [Concept] +is_concept_afforded_by.range = [Disposition] -affordsPerformer.is_a = [ObjectProperty, affordsConcept] -affordsPerformer.domain = [Disposition] -affordsPerformer.range = [Role] +affords_performer.is_a = [ObjectProperty, affords_concept] +affords_performer.domain = [Disposition] +affords_performer.range = [Role] -isPerformerAffordedBy.is_a = [ObjectProperty, isConceptAffordedBy] -isPerformerAffordedBy.domain = [Role] -isPerformerAffordedBy.range = [Disposition] +is_performer_afforded_by.is_a = [ObjectProperty, is_concept_afforded_by] +is_performer_afforded_by.domain = [Role] +is_performer_afforded_by.range = [Disposition] -definesPerformer.is_a = [ObjectProperty, definesRole] -definesPerformer.domain = [Affordance] -definesPerformer.range = [Role] +defines_performer.is_a = [ObjectProperty, defines_role] +defines_performer.domain = [Affordance] +defines_performer.range = [Role] -affordsSetpoint.is_a = [ObjectProperty, affordsConcept] -affordsSetpoint.domain = [Disposition] -affordsSetpoint.range = [Setpoint] +affords_setpoint.is_a = [ObjectProperty, affords_concept] +affords_setpoint.domain = [Disposition] +affords_setpoint.range = [Setpoint] -isSetpointAffordedBy.is_a = [ObjectProperty, isConceptAffordedBy] -isSetpointAffordedBy.domain = [Setpoint] -isSetpointAffordedBy.range = [Disposition] +is_setpoint_afforded_by.is_a = [ObjectProperty, is_concept_afforded_by] +is_setpoint_afforded_by.domain = [Setpoint] +is_setpoint_afforded_by.range = [Disposition] -definesSetpoint.is_a = [ObjectProperty, definesParameter] -definesSetpoint.domain = [Description] -definesSetpoint.range = [Setpoint] +defines_setpoint.is_a = [ObjectProperty, defines_parameter] +defines_setpoint.domain = [Description] +defines_setpoint.range = [Setpoint] -affordsTask.is_a = [ObjectProperty, affordsConcept] -affordsTask.domain = [Disposition] -affordsTask.range = [Task] +affords_task.is_a = [ObjectProperty, affords_concept] +affords_task.domain = [Disposition] +affords_task.range = [Task] -isTaskAffordedBy.is_a = [ObjectProperty, isConceptAffordedBy] -isTaskAffordedBy.domain = [Task] -isTaskAffordedBy.range = [Disposition] +is_task_afforded_by.is_a = [ObjectProperty, is_concept_afforded_by] +is_task_afforded_by.domain = [Task] +is_task_afforded_by.range = [Disposition] -affordsTrigger.is_a = [ObjectProperty, affordsConcept] -affordsTrigger.domain = [Disposition] -affordsTrigger.range = [Role] +affords_trigger.is_a = [ObjectProperty, affords_concept] +affords_trigger.domain = [Disposition] +affords_trigger.range = [Role] -isTriggerAffordedBy.is_a = [ObjectProperty, isConceptAffordedBy] -isTriggerAffordedBy.domain = [Role] -isTriggerAffordedBy.range = [Disposition] +is_trigger_afforded_by.is_a = [ObjectProperty, is_concept_afforded_by] +is_trigger_afforded_by.domain = [Role] +is_trigger_afforded_by.range = [Disposition] -definesTrigger.is_a = [ObjectProperty, definesRole] -definesTrigger.domain = [Affordance] -definesTrigger.range = [Role] +defines_trigger.is_a = [ObjectProperty, defines_role] +defines_trigger.domain = [Affordance] +defines_trigger.range = [Role] after.is_a = [ObjectProperty, TransitiveProperty, follows] after.domain = [Entity] after.range = [Entity] -follows.is_a = [ObjectProperty, TransitiveProperty, associatedWith] +follows.is_a = [ObjectProperty, TransitiveProperty, associated_with] follows.domain = [Entity] follows.range = [Entity] @@ -1371,41 +1371,41 @@ before.domain = [Entity] before.range = [Entity] -answers.is_a = [ObjectProperty, relatesToAnotherRole] +answers.is_a = [ObjectProperty, relates_to_another_role] answers.domain = [Answer] answers.range = [Message] -relatesToAnotherRole.is_a = [ObjectProperty, SymmetricProperty, associatedWith] -relatesToAnotherRole.domain = [Role] -relatesToAnotherRole.range = [Role] +relates_to_another_role.is_a = [ObjectProperty, SymmetricProperty, associated_with] +relates_to_another_role.domain = [Role] +relates_to_another_role.range = [Role] -hasAnswer.is_a = [ObjectProperty, relatesToAnotherRole] -hasAnswer.domain = [Message] -hasAnswer.range = [Answer] +has_answer.is_a = [ObjectProperty, relates_to_another_role] +has_answer.domain = [Message] +has_answer.range = [Answer] causes.is_a = [ObjectProperty, TransitiveProperty, affects] -isReactionTo.is_a = [ObjectProperty, TransitiveProperty, isAffectedBy] -isReactionTo.domain = [Event] -isReactionTo.range = [Event] +is_reaction_to.is_a = [ObjectProperty, TransitiveProperty, is_affected_by] +is_reaction_to.domain = [Event] +is_reaction_to.range = [Event] -causesTransition.is_a = [ObjectProperty, isEventIncludedIn] -causesTransition.domain = [Event] -causesTransition.range = [Transition] +causes_transition.is_a = [ObjectProperty, is_event_included_in] +causes_transition.domain = [Event] +causes_transition.range = [Transition] -isEventIncludedIn.is_a = [ObjectProperty, hasSetting] -isEventIncludedIn.domain = [Event] -isEventIncludedIn.range = [Situation] +is_event_included_in.is_a = [ObjectProperty, has_setting] +is_event_included_in.domain = [Event] +is_event_included_in.range = [Situation] -isCausedByEvent.is_a = [ObjectProperty, includesEvent] -isCausedByEvent.domain = [Transition] -isCausedByEvent.range = [Event] +is_caused_by_event.is_a = [ObjectProperty, includes_event] +is_caused_by_event.domain = [Transition] +is_caused_by_event.range = [Event] -coOccurs.is_a = [ObjectProperty, SymmetricProperty, overlaps] -coOccurs.domain = [Event] -coOccurs.range = [Event] +co_occurs.is_a = [ObjectProperty, SymmetricProperty, overlaps] +co_occurs.domain = [Event] +co_occurs.range = [Event] -overlaps.is_a = [ObjectProperty, SymmetricProperty, associatedWith] +overlaps.is_a = [ObjectProperty, SymmetricProperty, associated_with] overlaps.domain = [Entity] overlaps.range = [Entity] @@ -1413,889 +1413,889 @@ contains.domain = [Entity] contains.range = [Entity] -isContainedIn.is_a = [ObjectProperty, overlaps] -isContainedIn.domain = [Entity] -isContainedIn.range = [Entity] +is_contained_in.is_a = [ObjectProperty, overlaps] +is_contained_in.domain = [Entity] +is_contained_in.range = [Entity] -containsEvent.is_a = [ObjectProperty, TransitiveProperty, coOccurs, contains] -containsEvent.domain = [Event] -containsEvent.range = [Event] +contains_event.is_a = [ObjectProperty, TransitiveProperty, co_occurs, contains] +contains_event.domain = [Event] +contains_event.range = [Event] -during.is_a = [ObjectProperty, TransitiveProperty, coOccurs, isContainedIn] +during.is_a = [ObjectProperty, TransitiveProperty, co_occurs, is_contained_in] during.domain = [Event] during.range = [Event] -containsObject.is_a = [ObjectProperty, TransitiveProperty, contains, isLocationOf] -containsObject.domain = [PhysicalObject] -containsObject.range = [PhysicalObject] +contains_object.is_a = [ObjectProperty, TransitiveProperty, contains, is_location_of] +contains_object.domain = [PhysicalObject] +contains_object.range = [PhysicalObject] -isLocationOf.is_a = [ObjectProperty, associatedWith] -isLocationOf.domain = [Entity] -isLocationOf.range = [Entity] +is_location_of.is_a = [ObjectProperty, associated_with] +is_location_of.domain = [Entity] +is_location_of.range = [Entity] -isInsideOf.is_a = [ObjectProperty, TransitiveProperty, isContainedIn, hasLocation] -isInsideOf.domain = [PhysicalObject] -isInsideOf.range = [PhysicalObject] +is_inside_of.is_a = [ObjectProperty, TransitiveProperty, is_contained_in, has_location] +is_inside_of.domain = [PhysicalObject] +is_inside_of.range = [PhysicalObject] -coversObject.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, interactsWith] -coversObject.domain = [PhysicalObject] -coversObject.range = [PhysicalObject] +covers_object.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, interacts_with] +covers_object.domain = [PhysicalObject] +covers_object.range = [PhysicalObject] -interactsWith.is_a = [ObjectProperty, SymmetricProperty, associatedWith] -interactsWith.domain = [PhysicalObject] -interactsWith.range = [PhysicalObject] +interacts_with.is_a = [ObjectProperty, SymmetricProperty, associated_with] +interacts_with.domain = [PhysicalObject] +interacts_with.range = [PhysicalObject] -isCoveredByObject.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, interactsWith] -isCoveredByObject.domain = [PhysicalObject] -isCoveredByObject.range = [PhysicalObject] +is_covered_by_object.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, interacts_with] +is_covered_by_object.domain = [PhysicalObject] +is_covered_by_object.range = [PhysicalObject] -definesRole.is_a = [ObjectProperty, defines] -definesRole.domain = [Description] -definesRole.range = [Role] +defines_role.is_a = [ObjectProperty, defines] +defines_role.domain = [Description] +defines_role.range = [Role] -isBearerDefinedIn.is_a = [ObjectProperty, isRoleDefinedIn] -isBearerDefinedIn.domain = [Role] -isBearerDefinedIn.range = [Affordance] +is_bearer_defined_in.is_a = [ObjectProperty, is_role_defined_in] +is_bearer_defined_in.domain = [Role] +is_bearer_defined_in.range = [Affordance] -definesEventType.is_a = [ObjectProperty, defines] -definesEventType.domain = [Description] -definesEventType.range = [EventType] +defines_event_type.is_a = [ObjectProperty, defines] +defines_event_type.domain = [Description] +defines_event_type.range = [EventType] -isEventTypeDefinedIn.is_a = [ObjectProperty, isDefinedIn] -isEventTypeDefinedIn.domain = [EventType] -isEventTypeDefinedIn.range = [Description] +is_event_type_defined_in.is_a = [ObjectProperty, is_defined_in] +is_event_type_defined_in.domain = [EventType] +is_event_type_defined_in.range = [Description] -definesInput.is_a = [ObjectProperty, definesParticipant] -definesInput.domain = [Description] -definesInput.range = [Parameter | Role] +defines_input.is_a = [ObjectProperty, defines_participant] +defines_input.domain = [Description] +defines_input.range = [Or([Parameter, Role])] -definesParticipant.is_a = [ObjectProperty, defines] -definesParticipant.domain = [Description] -definesParticipant.range = [Concept] +defines_participant.is_a = [ObjectProperty, defines] +defines_participant.domain = [Description] +defines_participant.range = [Concept] -definesOutput.is_a = [ObjectProperty, definesParticipant] -definesOutput.domain = [Description] -definesOutput.range = [Parameter | Role] +defines_output.is_a = [ObjectProperty, defines_participant] +defines_output.domain = [Description] +defines_output.range = [Or([Parameter, Role])] -definesParameter.is_a = [ObjectProperty, defines] -definesParameter.domain = [Description] -definesParameter.range = [Parameter] +defines_parameter.is_a = [ObjectProperty, defines] +defines_parameter.domain = [Description] +defines_parameter.range = [Parameter] -isParameterDefinedIn.is_a = [ObjectProperty, isDefinedIn] -isParameterDefinedIn.domain = [Parameter] -isParameterDefinedIn.range = [Description] +is_parameter_defined_in.is_a = [ObjectProperty, is_defined_in] +is_parameter_defined_in.domain = [Parameter] +is_parameter_defined_in.range = [Description] -isPerformerDefinedIn.is_a = [ObjectProperty, isRoleDefinedIn] -isPerformerDefinedIn.domain = [Role] -isPerformerDefinedIn.range = [Description] +is_performer_defined_in.is_a = [ObjectProperty, is_role_defined_in] +is_performer_defined_in.domain = [Role] +is_performer_defined_in.range = [Description] -definesProcess.is_a = [ObjectProperty, defines] -definesProcess.domain = [Description] -definesProcess.range = [ProcessType] +defines_process.is_a = [ObjectProperty, defines] +defines_process.domain = [Description] +defines_process.range = [ProcessType] -isProcessDefinedIn.is_a = [ObjectProperty, isDefinedIn] -isProcessDefinedIn.domain = [ProcessType] -isProcessDefinedIn.range = [Description] +is_process_defined_in.is_a = [ObjectProperty, is_defined_in] +is_process_defined_in.domain = [ProcessType] +is_process_defined_in.range = [Description] -isSetpointDefinedIn.is_a = [ObjectProperty, isParameterDefinedIn] -isSetpointDefinedIn.domain = [Setpoint] -isSetpointDefinedIn.range = [Description] +is_setpoint_defined_in.is_a = [ObjectProperty, is_parameter_defined_in] +is_setpoint_defined_in.domain = [Setpoint] +is_setpoint_defined_in.range = [Description] -isTriggerDefinedIn.is_a = [ObjectProperty, isRoleDefinedIn] -isTriggerDefinedIn.domain = [Role] -isTriggerDefinedIn.range = [Affordance] +is_trigger_defined_in.is_a = [ObjectProperty, is_role_defined_in] +is_trigger_defined_in.domain = [Role] +is_trigger_defined_in.range = [Affordance] -derivedFrom.is_a = [ObjectProperty, TransitiveProperty, associatedWith] -derivedFrom.domain = [InformationObject] -derivedFrom.range = [InformationObject] +derived_from.is_a = [ObjectProperty, TransitiveProperty, associated_with] +derived_from.domain = [InformationObject] +derived_from.range = [InformationObject] -isSourceFor.is_a = [ObjectProperty, TransitiveProperty, associatedWith] -isSourceFor.domain = [InformationObject] -isSourceFor.range = [InformationObject] +is_source_for.is_a = [ObjectProperty, TransitiveProperty, associated_with] +is_source_for.domain = [InformationObject] +is_source_for.range = [InformationObject] -describesQuality.is_a = [ObjectProperty, describes] -describesQuality.domain = [Description] -describesQuality.range = [Quality] +describes_quality.is_a = [ObjectProperty, describes] +describes_quality.domain = [Description] +describes_quality.range = [Quality] -describes.is_a = [ObjectProperty, associatedWith] +describes.is_a = [ObjectProperty, associated_with] describes.domain = [Description] describes.range = [Entity] -isQualityDescribedBy.is_a = [ObjectProperty, isDescribedBy] -isQualityDescribedBy.domain = [Quality] -isQualityDescribedBy.range = [Description] +is_quality_described_by.is_a = [ObjectProperty, is_described_by] +is_quality_described_by.domain = [Quality] +is_quality_described_by.range = [Description] -directlyCauses.is_a = [ObjectProperty, causes] -directlyCauses.domain = [Event] -directlyCauses.range = [Event] +directly_causes.is_a = [ObjectProperty, causes] +directly_causes.domain = [Event] +directly_causes.range = [Event] -isDirectReactionTo.is_a = [ObjectProperty, isReactionTo] -isDirectReactionTo.domain = [Event] -isDirectReactionTo.range = [Event] +is_direct_reaction_to.is_a = [ObjectProperty, is_reaction_to] +is_direct_reaction_to.domain = [Event] +is_direct_reaction_to.range = [Event] -hasTerminalScene.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, hasTerminalState] -hasTerminalScene.domain = [StateTransition] -hasTerminalScene.range = [Scene] +has_terminal_scene.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, has_terminal_state] +has_terminal_scene.domain = [StateTransition] +has_terminal_scene.range = [Scene] -includesEvent.is_a = [ObjectProperty, isSettingFor] -includesEvent.domain = [Situation] -includesEvent.range = [Event] +includes_event.is_a = [ObjectProperty, is_setting_for] +includes_event.domain = [Situation] +includes_event.range = [Event] -directlyDerivedFrom.is_a = [ObjectProperty, derivedFrom] +directly_derived_from.is_a = [ObjectProperty, derived_from] -isDirectSourceFor.is_a = [ObjectProperty, isSourceFor] +is_direct_source_for.is_a = [ObjectProperty, is_source_for] -encapsulates.is_a = [ObjectProperty, associatedWith] +encapsulates.is_a = [ObjectProperty, associated_with] encapsulates.domain = [OrderedElement] encapsulates.range = [Entity] -encodes.is_a = [ObjectProperty, SymmetricProperty, associatedWith] +encodes.is_a = [ObjectProperty, SymmetricProperty, associated_with] encodes.domain = [InformationObject] encodes.range = [InformationObject] -executesMotion.is_a = [ObjectProperty, isOccurrenceOf] -executesMotion.domain = [MotionProcess] -executesMotion.range = [Motion] +executes_motion.is_a = [ObjectProperty, is_occurrence_of] +executes_motion.domain = [MotionProcess] +executes_motion.range = [Motion] -isOccurrenceOf.is_a = [ObjectProperty, isClassifiedBy] -isOccurrenceOf.domain = [Event] -isOccurrenceOf.range = [EventType] +is_occurrence_of.is_a = [ObjectProperty, is_classified_by] +is_occurrence_of.domain = [Event] +is_occurrence_of.range = [EventType] -isExecutedMotionIn.is_a = [ObjectProperty, isOccurringIn] -isExecutedMotionIn.domain = [Motion] -isExecutedMotionIn.range = [MotionProcess] +is_executed_motion_in.is_a = [ObjectProperty, is_occurring_in] +is_executed_motion_in.domain = [Motion] +is_executed_motion_in.range = [MotionProcess] -finishedBy.is_a = [ObjectProperty, TransitiveProperty, coOccurs] -finishedBy.domain = [Event] -finishedBy.range = [Event] +finished_by.is_a = [ObjectProperty, TransitiveProperty, co_occurs] +finished_by.domain = [Event] +finished_by.range = [Event] -finishes.is_a = [ObjectProperty, TransitiveProperty, coOccurs] +finishes.is_a = [ObjectProperty, TransitiveProperty, co_occurs] finishes.domain = [Event] finishes.range = [Event] -firstMember.is_a = [ObjectProperty, hasMember] -firstMember.domain = [Collection] -firstMember.range = [Entity] +first_member.is_a = [ObjectProperty, has_member] +first_member.domain = [Collection] +first_member.range = [Entity] -hasMember.is_a = [ObjectProperty, associatedWith] -hasMember.domain = [Collection] -hasMember.range = [Entity] +has_member.is_a = [ObjectProperty, associated_with] +has_member.domain = [Collection] +has_member.range = [Entity] -givesMeaningTo.is_a = [ObjectProperty, associatedWith] -givesMeaningTo.domain = [System] -givesMeaningTo.range = [InformationObject] +gives_meaning_to.is_a = [ObjectProperty, associated_with] +gives_meaning_to.domain = [System] +gives_meaning_to.range = [InformationObject] -isGivenMeaningBy.is_a = [ObjectProperty, associatedWith] -isGivenMeaningBy.domain = [InformationObject] -isGivenMeaningBy.range = [System] +is_given_meaning_by.is_a = [ObjectProperty, associated_with] +is_given_meaning_by.domain = [InformationObject] +is_given_meaning_by.range = [System] -hasAction.is_a = [ObjectProperty, hasConstituent] -hasAction.domain = [Action] -hasAction.range = [Action] +has_action.is_a = [ObjectProperty, has_constituent] +has_action.domain = [Action] +has_action.range = [Action] -hasConstituent.is_a = [ObjectProperty, associatedWith] -hasConstituent.domain = [Entity] -hasConstituent.range = [Entity] +has_constituent.is_a = [ObjectProperty, associated_with] +has_constituent.domain = [Entity] +has_constituent.range = [Entity] -hasAlterationResult.is_a = [ObjectProperty, hasRegion] -hasAlterationResult.domain = [Action] -hasAlterationResult.range = [Region] +has_alteration_result.is_a = [ObjectProperty, has_region] +has_alteration_result.domain = [Action] +has_alteration_result.range = [Region] -hasRegion.is_a = [ObjectProperty, associatedWith] -hasRegion.domain = [Entity] -hasRegion.range = [Region] +has_region.is_a = [ObjectProperty, associated_with] +has_region.domain = [Entity] +has_region.range = [Region] -isAlterationResultOf.is_a = [ObjectProperty, isRegionFor] -isAlterationResultOf.domain = [Region] -isAlterationResultOf.range = [Action] +is_alteration_result_of.is_a = [ObjectProperty, is_region_for] +is_alteration_result_of.domain = [Region] +is_alteration_result_of.range = [Action] -hasBinding.is_a = [ObjectProperty, hasPart] -hasBinding.domain = [Description] -hasBinding.range = [Binding] +has_binding.is_a = [ObjectProperty, has_part] +has_binding.domain = [Description] +has_binding.range = [Binding] -hasPart.is_a = [ObjectProperty, TransitiveProperty, ReflexiveProperty, associatedWith] -hasPart.domain = [Entity] -hasPart.range = [Entity] +has_part.is_a = [ObjectProperty, TransitiveProperty, ReflexiveProperty, associated_with] +has_part.domain = [Entity] +has_part.range = [Entity] -hasBindingFiller.is_a = [ObjectProperty, describes] -hasBindingFiller.domain = [Binding] -hasBindingFiller.range = [Entity] +has_binding_filler.is_a = [ObjectProperty, describes] +has_binding_filler.domain = [Binding] +has_binding_filler.range = [Entity] -hasBindingRole.is_a = [ObjectProperty, hasPart] -hasBindingRole.domain = [Binding] -hasBindingRole.range = [Parameter | Role] +has_binding_role.is_a = [ObjectProperty, has_part] +has_binding_role.domain = [Binding] +has_binding_role.range = [Or([Parameter, Role])] -hasChildLink.is_a = [ObjectProperty, hasConstituent] -hasChildLink.domain = [Joint] -hasChildLink.range = [PhysicalObject] +has_child_link.is_a = [ObjectProperty, has_constituent] +has_child_link.domain = [Joint] +has_child_link.range = [PhysicalObject] -isChildLinkOf.is_a = [ObjectProperty, isConstituentOf] -isChildLinkOf.domain = [PhysicalObject] -isChildLinkOf.range = [Joint] +is_child_link_of.is_a = [ObjectProperty, is_constituent_of] +is_child_link_of.domain = [PhysicalObject] +is_child_link_of.range = [Joint] -hasColor.is_a = [ObjectProperty, hasQuality] -hasColor.domain = [PhysicalObject] -hasColor.range = [Color] +has_color.is_a = [ObjectProperty, has_quality] +has_color.domain = [PhysicalObject] +has_color.range = [Color] -hasQuality.is_a = [ObjectProperty, associatedWith] -hasQuality.domain = [Entity] -hasQuality.range = [Quality] +has_quality.is_a = [ObjectProperty, associated_with] +has_quality.domain = [Entity] +has_quality.range = [Quality] -isColorOf.is_a = [ObjectProperty, isQualityOf] -isColorOf.domain = [Color] -isColorOf.range = [PhysicalObject] +is_color_of.is_a = [ObjectProperty, is_quality_of] +is_color_of.domain = [Color] +is_color_of.range = [PhysicalObject] -hasDisposition.is_a = [ObjectProperty, hasQuality] -hasDisposition.domain = [Object] -hasDisposition.range = [Disposition] +has_disposition.is_a = [ObjectProperty, has_quality] +has_disposition.domain = [Object] +has_disposition.range = [Disposition] -isDispositionOf.is_a = [ObjectProperty, isQualityOf] -isDispositionOf.domain = [Disposition] -isDispositionOf.range = [Object] +is_disposition_of.is_a = [ObjectProperty, is_quality_of] +is_disposition_of.domain = [Disposition] +is_disposition_of.range = [Object] -hasEndLink.is_a = [ObjectProperty, hasLink] -hasEndLink.domain = [PhysicalObject] -hasEndLink.range = [PhysicalObject] +has_end_link.is_a = [ObjectProperty, has_link] +has_end_link.domain = [PhysicalObject] +has_end_link.range = [PhysicalObject] -hasLink.is_a = [ObjectProperty, hasComponent] -hasLink.domain = [PhysicalObject] -hasLink.range = [PhysicalObject] +has_link.is_a = [ObjectProperty, has_component] +has_link.domain = [PhysicalObject] +has_link.range = [PhysicalObject] -isEndLinkOf.is_a = [ObjectProperty, isLinkOf] -isEndLinkOf.domain = [PhysicalObject] -isEndLinkOf.range = [PhysicalObject] +is_end_link_of.is_a = [ObjectProperty, is_link_of] +is_end_link_of.domain = [PhysicalObject] +is_end_link_of.range = [PhysicalObject] -hasExecutionState.is_a = [ObjectProperty, hasRegion] -hasExecutionState.domain = [Action] -hasExecutionState.range = [ExecutionStateRegion] +has_execution_state.is_a = [ObjectProperty, has_region] +has_execution_state.domain = [Action] +has_execution_state.range = [ExecutionStateRegion] -hasFeature.is_a = [ObjectProperty, hasConstituent] -hasFeature.domain = [PhysicalObject] -hasFeature.range = [Feature] +has_feature.is_a = [ObjectProperty, has_constituent] +has_feature.domain = [PhysicalObject] +has_feature.range = [Feature] -isFeatureOf.is_a = [ObjectProperty, isConstituentOf] -isFeatureOf.domain = [Feature] -isFeatureOf.range = [PhysicalObject] +is_feature_of.is_a = [ObjectProperty, is_constituent_of] +is_feature_of.domain = [Feature] +is_feature_of.range = [PhysicalObject] -hasFirstStep.is_a = [ObjectProperty, hasStep] -hasFirstStep.domain = [Workflow] -hasFirstStep.range = [Task] +has_first_step.is_a = [ObjectProperty, has_step] +has_first_step.domain = [Workflow] +has_first_step.range = [Task] -hasStep.is_a = [ObjectProperty, definesTask] -hasStep.domain = [Workflow] -hasStep.range = [Task] +has_step.is_a = [ObjectProperty, defines_task] +has_step.domain = [Workflow] +has_step.range = [Task] -isFirstStepOf.is_a = [ObjectProperty, isStepOf] -isFirstStepOf.domain = [Task] -isFirstStepOf.range = [Workflow] +is_first_step_of.is_a = [ObjectProperty, is_step_of] +is_first_step_of.domain = [Task] +is_first_step_of.range = [Workflow] -hasFrictionAttribute.is_a = [ObjectProperty, hasRegion] -hasFrictionAttribute.domain = [PhysicalObject] -hasFrictionAttribute.range = [FrictionAttribute] +has_friction_attribute.is_a = [ObjectProperty, has_region] +has_friction_attribute.domain = [PhysicalObject] +has_friction_attribute.range = [FrictionAttribute] -hasGoal.is_a = [ObjectProperty, isDescribedBy] -hasGoal.domain = [Entity] -hasGoal.range = [Goal] +has_goal.is_a = [ObjectProperty, is_described_by] +has_goal.domain = [Entity] +has_goal.range = [Goal] -hasInitialScene.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, hasInitialState] -hasInitialScene.domain = [StateTransition] -hasInitialScene.range = [Scene] +has_initial_scene.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, has_initial_state] +has_initial_scene.domain = [StateTransition] +has_initial_scene.range = [Scene] -hasInitialState.is_a = [ObjectProperty, includesSituation] -hasInitialState.domain = [Transition] -hasInitialState.range = [Situation] +has_initial_state.is_a = [ObjectProperty, includes_situation] +has_initial_state.domain = [Transition] +has_initial_state.range = [Situation] -isInitialSceneOf.is_a = [ObjectProperty, isInitialStateOf] -isInitialSceneOf.domain = [Scene] -isInitialSceneOf.range = [StateTransition] +is_initial_scene_of.is_a = [ObjectProperty, is_initial_state_of] +is_initial_scene_of.domain = [Scene] +is_initial_scene_of.range = [StateTransition] -hasInitialSituation.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, hasInitialState] -hasInitialSituation.domain = [SituationTransition] -hasInitialSituation.range = [Situation, Not(NonmanifestedSituation)] +has_initial_situation.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, has_initial_state] +has_initial_situation.domain = [SituationTransition] +has_initial_situation.range = [Situation, Not(NonmanifestedSituation)] -isInitialSituationOf.is_a = [ObjectProperty, isInitialStateOf] -isInitialSituationOf.domain = [Situation] -isInitialSituationOf.range = [SituationTransition] +is_initial_situation_of.is_a = [ObjectProperty, is_initial_state_of] +is_initial_situation_of.domain = [Situation] +is_initial_situation_of.range = [SituationTransition] -includesSituation.is_a = [ObjectProperty, isSettingFor] -includesSituation.domain = [Situation] -includesSituation.range = [Situation] +includes_situation.is_a = [ObjectProperty, is_setting_for] +includes_situation.domain = [Situation] +includes_situation.range = [Situation] -isInitialStateOf.is_a = [ObjectProperty, isSituationIncludedIn] -isInitialStateOf.domain = [Situation] -isInitialStateOf.range = [Transition] +is_initial_state_of.is_a = [ObjectProperty, is_situation_included_in] +is_initial_state_of.domain = [Situation] +is_initial_state_of.range = [Transition] -hasInputParameter.is_a = [ObjectProperty, hasParameter] -hasInputParameter.domain = [EventType] -hasInputParameter.range = [Parameter] +has_input_parameter.is_a = [ObjectProperty, has_parameter] +has_input_parameter.domain = [EventType] +has_input_parameter.range = [Parameter] -hasParameter.is_a = [ObjectProperty, isRelatedToConcept] -hasParameter.domain = [Concept] -hasParameter.range = [Parameter] +has_parameter.is_a = [ObjectProperty, is_related_to_concept] +has_parameter.domain = [Concept] +has_parameter.range = [Parameter] -isInputParameterFor.is_a = [ObjectProperty, isParameterFor] -isInputParameterFor.domain = [Parameter] -isInputParameterFor.range = [EventType] +is_input_parameter_for.is_a = [ObjectProperty, is_parameter_for] +is_input_parameter_for.domain = [Parameter] +is_input_parameter_for.range = [EventType] -hasJointLimit.is_a = [ObjectProperty, hasRegion] -hasJointLimit.domain = [Joint] -hasJointLimit.range = [JointLimit] +has_joint_limit.is_a = [ObjectProperty, has_region] +has_joint_limit.domain = [Joint] +has_joint_limit.range = [JointLimit] -isJointLimitOf.is_a = [ObjectProperty, isRegionFor] -isJointLimitOf.domain = [JointLimit] -isJointLimitOf.range = [Joint] +is_joint_limit_of.is_a = [ObjectProperty, is_region_for] +is_joint_limit_of.domain = [JointLimit] +is_joint_limit_of.range = [Joint] -hasJointState.is_a = [ObjectProperty, hasRegion] -hasJointState.domain = [Joint] -hasJointState.range = [JointState] +has_joint_state.is_a = [ObjectProperty, has_region] +has_joint_state.domain = [Joint] +has_joint_state.range = [JointState] -isJointStateOf.is_a = [ObjectProperty, isRegionFor] -isJointStateOf.domain = [JointState] -isJointStateOf.range = [Joint] +is_joint_state_of.is_a = [ObjectProperty, is_region_for] +is_joint_state_of.domain = [JointState] +is_joint_state_of.range = [Joint] -hasComponent.is_a = [ObjectProperty, AsymmetricProperty, hasProperPart] -hasComponent.domain = [Entity] -hasComponent.range = [Entity] +has_component.is_a = [ObjectProperty, AsymmetricProperty, has_proper_part] +has_component.domain = [Entity] +has_component.range = [Entity] -isLinkOf.is_a = [ObjectProperty, isComponentOf] -isLinkOf.domain = [PhysicalObject] -isLinkOf.range = [PhysicalObject] +is_link_of.is_a = [ObjectProperty, is_component_of] +is_link_of.domain = [PhysicalObject] +is_link_of.range = [PhysicalObject] -hasLocalization.is_a = [ObjectProperty, hasQuality] -hasLocalization.domain = [PhysicalObject] -hasLocalization.range = [Localization] +has_localization.is_a = [ObjectProperty, has_quality] +has_localization.domain = [PhysicalObject] +has_localization.range = [Localization] -isLocalizationOf.is_a = [ObjectProperty, isQualityOf] -isLocalizationOf.domain = [Localization] -isLocalizationOf.range = [PhysicalObject] +is_localization_of.is_a = [ObjectProperty, is_quality_of] +is_localization_of.domain = [Localization] +is_localization_of.range = [PhysicalObject] -hasMassAttribute.is_a = [ObjectProperty, hasRegion] -hasMassAttribute.domain = [PhysicalObject] -hasMassAttribute.range = [MassAttribute] +has_mass_attribute.is_a = [ObjectProperty, has_region] +has_mass_attribute.domain = [PhysicalObject] +has_mass_attribute.range = [MassAttribute] -isMassAttributeOf.is_a = [ObjectProperty, isRegionFor] -isMassAttributeOf.domain = [MassAttribute] -isMassAttributeOf.range = [PhysicalObject] +is_mass_attribute_of.is_a = [ObjectProperty, is_region_for] +is_mass_attribute_of.domain = [MassAttribute] +is_mass_attribute_of.range = [PhysicalObject] -hasNetForce.is_a = [ObjectProperty, hasRegion] -hasNetForce.domain = [PhysicalObject] -hasNetForce.range = [NetForce] +has_net_force.is_a = [ObjectProperty, has_region] +has_net_force.domain = [PhysicalObject] +has_net_force.range = [NetForce] -isNetForceOf.is_a = [ObjectProperty, isRegionFor] -isNetForceOf.domain = [NetForce] -isNetForceOf.range = [PhysicalObject] +is_net_force_of.is_a = [ObjectProperty, is_region_for] +is_net_force_of.domain = [NetForce] +is_net_force_of.range = [PhysicalObject] -hasNextStep.is_a = [ObjectProperty, directlyPrecedes] -hasNextStep.domain = [Task] -hasNextStep.range = [Task] +has_next_step.is_a = [ObjectProperty, directly_precedes] +has_next_step.domain = [Task] +has_next_step.range = [Task] -directlyPrecedes.is_a = [ObjectProperty, precedes] -directlyPrecedes.domain = [Entity] -directlyPrecedes.range = [Entity] +directly_precedes.is_a = [ObjectProperty, precedes] +directly_precedes.domain = [Entity] +directly_precedes.range = [Entity] -hasPreviousStep.is_a = [ObjectProperty, directlyFollows] -hasPreviousStep.domain = [Task] -hasPreviousStep.range = [Task] +has_previous_step.is_a = [ObjectProperty, directly_follows] +has_previous_step.domain = [Task] +has_previous_step.range = [Task] -hasOutputParameter.is_a = [ObjectProperty, hasParameter] -hasOutputParameter.domain = [EventType] -hasOutputParameter.range = [Parameter] +has_output_parameter.is_a = [ObjectProperty, has_parameter] +has_output_parameter.domain = [EventType] +has_output_parameter.range = [Parameter] -isOutputParameterFor.is_a = [ObjectProperty, isParameterFor] -isOutputParameterFor.domain = [Parameter] -isOutputParameterFor.range = [EventType] +is_output_parameter_for.is_a = [ObjectProperty, is_parameter_for] +is_output_parameter_for.domain = [Parameter] +is_output_parameter_for.range = [EventType] -hasParentLink.is_a = [ObjectProperty, hasConstituent] -hasParentLink.domain = [Joint] -hasParentLink.range = [PhysicalObject] +has_parent_link.is_a = [ObjectProperty, has_constituent] +has_parent_link.domain = [Joint] +has_parent_link.range = [PhysicalObject] -isParentLinkOf.is_a = [ObjectProperty, isConstituentOf] -isParentLinkOf.domain = [PhysicalObject] -isParentLinkOf.range = [Joint] +is_parent_link_of.is_a = [ObjectProperty, is_constituent_of] +is_parent_link_of.domain = [PhysicalObject] +is_parent_link_of.range = [Joint] -hasPhase.is_a = [ObjectProperty, hasConstituent] -hasPhase.domain = [Action | Process] -hasPhase.range = [State | Process] +has_phase.is_a = [ObjectProperty, has_constituent] +has_phase.domain = [Or([Action, Process])] +has_phase.range = [Or([State, Process])] -hasPhysicalComponent.is_a = [ObjectProperty, hasComponent] -hasPhysicalComponent.domain = [PhysicalObject] -hasPhysicalComponent.range = [PhysicalObject] +has_physical_component.is_a = [ObjectProperty, has_component] +has_physical_component.domain = [PhysicalObject] +has_physical_component.range = [PhysicalObject] -hasPredecessor.is_a = [ObjectProperty, hasPart] -hasPredecessor.domain = [Succedence] -hasPredecessor.range = [Workflow] +has_predecessor.is_a = [ObjectProperty, has_part] +has_predecessor.domain = [Succedence] +has_predecessor.range = [Workflow] -hasPreference.is_a = [ObjectProperty, hasQuality] -hasPreference.domain = [Agent] -hasPreference.range = [Preference] +has_preference.is_a = [ObjectProperty, has_quality] +has_preference.domain = [Agent] +has_preference.range = [Preference] -isPreferenceOf.is_a = [ObjectProperty, isQualityOf] -isPreferenceOf.domain = [Preference] -isPreferenceOf.range = [Agent] +is_preference_of.is_a = [ObjectProperty, is_quality_of] +is_preference_of.domain = [Preference] +is_preference_of.range = [Agent] -directlyFollows.is_a = [ObjectProperty, follows] -directlyFollows.domain = [Entity] -directlyFollows.range = [Entity] +directly_follows.is_a = [ObjectProperty, follows] +directly_follows.domain = [Entity] +directly_follows.range = [Entity] -hasProcessType.is_a = [ObjectProperty, isRelatedToConcept] -hasProcessType.domain = [Role] -hasProcessType.range = [ProcessType] +has_process_type.is_a = [ObjectProperty, is_related_to_concept] +has_process_type.domain = [Role] +has_process_type.range = [ProcessType] -isRelatedToConcept.is_a = [ObjectProperty, SymmetricProperty, associatedWith] -isRelatedToConcept.domain = [Concept] -isRelatedToConcept.range = [Concept] +is_related_to_concept.is_a = [ObjectProperty, SymmetricProperty, associated_with] +is_related_to_concept.domain = [Concept] +is_related_to_concept.range = [Concept] -isProcessTypeOf.is_a = [ObjectProperty, isRelatedToConcept] -isProcessTypeOf.domain = [ProcessType] -isProcessTypeOf.range = [Role] +is_process_type_of.is_a = [ObjectProperty, is_related_to_concept] +is_process_type_of.domain = [ProcessType] +is_process_type_of.range = [Role] -hasQuale.is_a = [ObjectProperty, hasRegion] -hasQuale.domain = [Quality] -hasQuale.range = [Region] +has_quale.is_a = [ObjectProperty, has_region] +has_quale.domain = [Quality] +has_quale.range = [Region] -isQualeOf.is_a = [ObjectProperty, isRegionFor] -isQualeOf.domain = [Region] -isQualeOf.range = [Quality] +is_quale_of.is_a = [ObjectProperty, is_region_for] +is_quale_of.domain = [Region] +is_quale_of.range = [Quality] -hasRootLink.is_a = [ObjectProperty, hasLink] -hasRootLink.domain = [PhysicalObject] -hasRootLink.range = [PhysicalObject] +has_root_link.is_a = [ObjectProperty, has_link] +has_root_link.domain = [PhysicalObject] +has_root_link.range = [PhysicalObject] -isRootLinkOf.is_a = [ObjectProperty, isLinkOf] -isRootLinkOf.domain = [PhysicalObject] -isRootLinkOf.range = [PhysicalObject] +is_root_link_of.is_a = [ObjectProperty, is_link_of] +is_root_link_of.domain = [PhysicalObject] +is_root_link_of.range = [PhysicalObject] -hasShape.is_a = [ObjectProperty, hasQuality] -hasShape.domain = [PhysicalObject] -hasShape.range = [Shape] +has_shape.is_a = [ObjectProperty, has_quality] +has_shape.domain = [PhysicalObject] +has_shape.range = [Shape] -isShapeOf.is_a = [ObjectProperty, isQualityOf] -isShapeOf.domain = [Shape] -isShapeOf.range = [PhysicalObject] +is_shape_of.is_a = [ObjectProperty, is_quality_of] +is_shape_of.domain = [Shape] +is_shape_of.range = [PhysicalObject] -hasShapeRegion.is_a = [ObjectProperty, hasRegion] -hasShapeRegion.domain = [Shape | PhysicalObject] -hasShapeRegion.range = [ShapeRegion] +has_shape_region.is_a = [ObjectProperty, has_region] +has_shape_region.domain = [Or([Shape, PhysicalObject])] +has_shape_region.range = [ShapeRegion] -isShapeRegionOf.is_a = [ObjectProperty, isRegionFor] -isShapeRegionOf.domain = [ShapeRegion] -isShapeRegionOf.range = [Shape | PhysicalObject] +is_shape_region_of.is_a = [ObjectProperty, is_region_for] +is_shape_region_of.domain = [ShapeRegion] +is_shape_region_of.range = [Or([Shape, PhysicalObject])] -hasSoftwareAgent.is_a = [ObjectProperty, involvesAgent] -hasSoftwareAgent.domain = [Event] -hasSoftwareAgent.range = [SoftwareInstance] +has_software_agent.is_a = [ObjectProperty, involves_agent] +has_software_agent.domain = [Event] +has_software_agent.range = [SoftwareInstance] -involvesAgent.is_a = [ObjectProperty, hasParticipant] -involvesAgent.domain = [Event] -involvesAgent.range = [Agent] +involves_agent.is_a = [ObjectProperty, has_participant] +involves_agent.domain = [Event] +involves_agent.range = [Agent] -hasSpaceRegion.is_a = [ObjectProperty, hasRegion] -hasSpaceRegion.domain = [Localization | ShapeRegion | PhysicalObject] -hasSpaceRegion.range = [SpaceRegion] +has_space_region.is_a = [ObjectProperty, has_region] +has_space_region.domain = [Or([Localization, ShapeRegion, PhysicalObject])] +has_space_region.range = [SpaceRegion] -isSpaceRegionFor.is_a = [ObjectProperty, isRegionFor] -isSpaceRegionFor.domain = [SpaceRegion] -isSpaceRegionFor.range = [Localization | PhysicalObject] +is_space_region_for.is_a = [ObjectProperty, is_region_for] +is_space_region_for.domain = [SpaceRegion] +is_space_region_for.range = [Or([Localization, PhysicalObject])] -hasStateType.is_a = [ObjectProperty, isRelatedToConcept] -hasStateType.domain = [Role] -hasStateType.range = [StateType] +has_state_type.is_a = [ObjectProperty, is_related_to_concept] +has_state_type.domain = [Role] +has_state_type.range = [StateType] -isStateTypeOf.is_a = [ObjectProperty, isRelatedToConcept] -isStateTypeOf.domain = [StateType] -isStateTypeOf.range = [Role] +is_state_type_of.is_a = [ObjectProperty, is_related_to_concept] +is_state_type_of.domain = [StateType] +is_state_type_of.range = [Role] -hasStatus.is_a = [ObjectProperty, hasQuality] +has_status.is_a = [ObjectProperty, has_quality] -isStepOf.is_a = [ObjectProperty, isTaskDefinedIn] -isStepOf.domain = [Task] -isStepOf.range = [Workflow] +is_step_of.is_a = [ObjectProperty, is_task_defined_in] +is_step_of.domain = [Task] +is_step_of.range = [Workflow] -hasSuccedence.is_a = [ObjectProperty, hasPart] -hasSuccedence.domain = [Workflow] -hasSuccedence.range = [Succedence] +has_succedence.is_a = [ObjectProperty, has_part] +has_succedence.domain = [Workflow] +has_succedence.range = [Succedence] -hasSuccessor.is_a = [ObjectProperty, hasPart] -hasSuccessor.domain = [Succedence] -hasSuccessor.range = [Workflow] +has_successor.is_a = [ObjectProperty, has_part] +has_successor.domain = [Succedence] +has_successor.range = [Workflow] -hasTask.is_a = [ObjectProperty, hasPart] -hasTask.domain = [Relation | Workflow] -hasTask.range = [Task] +has_task.is_a = [ObjectProperty, has_part] +has_task.domain = [Or([Relation, Workflow])] +has_task.range = [Task] -hasTerminalState.is_a = [ObjectProperty, includesSituation] -hasTerminalState.domain = [Transition] -hasTerminalState.range = [Situation] +has_terminal_state.is_a = [ObjectProperty, includes_situation] +has_terminal_state.domain = [Transition] +has_terminal_state.range = [Situation] -isTerminalSceneOf.is_a = [ObjectProperty, isTerminalStateOf] -isTerminalSceneOf.domain = [Scene] -isTerminalSceneOf.range = [StateTransition] +is_terminal_scene_of.is_a = [ObjectProperty, is_terminal_state_of] +is_terminal_scene_of.domain = [Scene] +is_terminal_scene_of.range = [StateTransition] -hasTerminalSituation.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, hasTerminalState] -hasTerminalSituation.domain = [SituationTransition] -hasTerminalSituation.range = [Situation, Not(NonmanifestedSituation)] +has_terminal_situation.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, has_terminal_state] +has_terminal_situation.domain = [SituationTransition] +has_terminal_situation.range = [Situation, Not(NonmanifestedSituation)] -isTerminalSituationOf.is_a = [ObjectProperty, isTerminalStateOf] -isTerminalSituationOf.domain = [Situation] -isTerminalSituationOf.range = [SituationTransition] +is_terminal_situation_of.is_a = [ObjectProperty, is_terminal_state_of] +is_terminal_situation_of.domain = [Situation] +is_terminal_situation_of.range = [SituationTransition] -isTerminalStateOf.is_a = [ObjectProperty, isSituationIncludedIn] -isTerminalStateOf.domain = [Situation] -isTerminalStateOf.range = [Transition] +is_terminal_state_of.is_a = [ObjectProperty, is_situation_included_in] +is_terminal_state_of.domain = [Situation] +is_terminal_state_of.range = [Transition] -includesConcept.is_a = [ObjectProperty, includesObject] -includesConcept.domain = [Situation] -includesConcept.range = [Concept] +includes_concept.is_a = [ObjectProperty, includes_object] +includes_concept.domain = [Situation] +includes_concept.range = [Concept] -includesObject.is_a = [ObjectProperty, isSettingFor] -includesObject.domain = [Situation] -includesObject.range = [Object] +includes_object.is_a = [ObjectProperty, is_setting_for] +includes_object.domain = [Situation] +includes_object.range = [Object] -isConceptIncludedIn.is_a = [ObjectProperty, isObjectIncludedIn] -isConceptIncludedIn.domain = [Concept] -isConceptIncludedIn.range = [Situation] +is_concept_included_in.is_a = [ObjectProperty, is_object_included_in] +is_concept_included_in.domain = [Concept] +is_concept_included_in.range = [Situation] -includesRecord.is_a = [ObjectProperty, isReferenceOf] -includesRecord.domain = [Event] -includesRecord.range = [InformationObject] +includes_record.is_a = [ObjectProperty, is_reference_of] +includes_record.domain = [Event] +includes_record.range = [InformationObject] -isReferenceOf.is_a = [ObjectProperty, associatedWith] -isReferenceOf.domain = [Entity] -isReferenceOf.range = [InformationObject] +is_reference_of.is_a = [ObjectProperty, associated_with] +is_reference_of.domain = [Entity] +is_reference_of.range = [InformationObject] -isRecordIncludedBy.is_a = [ObjectProperty, isAbout] -isRecordIncludedBy.domain = [InformationObject] -isRecordIncludedBy.range = [Event] +is_record_included_by.is_a = [ObjectProperty, is_about] +is_record_included_by.domain = [InformationObject] +is_record_included_by.range = [Event] -isSettingFor.is_a = [ObjectProperty, associatedWith] -isSettingFor.domain = [Situation] -isSettingFor.range = [Entity] +is_setting_for.is_a = [ObjectProperty, associated_with] +is_setting_for.domain = [Situation] +is_setting_for.range = [Entity] -isSituationIncludedIn.is_a = [ObjectProperty, hasSetting] -isSituationIncludedIn.domain = [Situation] -isSituationIncludedIn.range = [Situation] +is_situation_included_in.is_a = [ObjectProperty, has_setting] +is_situation_included_in.domain = [Situation] +is_situation_included_in.range = [Situation] -involvesArtifact.is_a = [ObjectProperty, hasParticipant] -involvesArtifact.domain = [Event] -involvesArtifact.range = [PhysicalArtifact] +involves_artifact.is_a = [ObjectProperty, has_participant] +involves_artifact.domain = [Event] +involves_artifact.range = [PhysicalArtifact] -hasParticipant.is_a = [ObjectProperty, associatedWith] -hasParticipant.domain = [Event] -hasParticipant.range = [Object] +has_participant.is_a = [ObjectProperty, associated_with] +has_participant.domain = [Event] +has_participant.range = [Object] -isArtifactInvolvedIn.is_a = [ObjectProperty, isParticipantIn] -isArtifactInvolvedIn.domain = [PhysicalArtifact] -isArtifactInvolvedIn.range = [Event] +is_artifact_involved_in.is_a = [ObjectProperty, is_participant_in] +is_artifact_involved_in.domain = [PhysicalArtifact] +is_artifact_involved_in.range = [Event] -involvesEffector.is_a = [ObjectProperty, hasParticipant] -involvesEffector.domain = [Event] -involvesEffector.range = [PhysicalEffector] +involves_effector.is_a = [ObjectProperty, has_participant] +involves_effector.domain = [Event] +involves_effector.range = [PhysicalEffector] -isEffectorInvolvedIn.is_a = [ObjectProperty, isParticipantIn] -isEffectorInvolvedIn.domain = [PhysicalEffector] -isEffectorInvolvedIn.range = [Event] +is_effector_involved_in.is_a = [ObjectProperty, is_participant_in] +is_effector_involved_in.domain = [PhysicalEffector] +is_effector_involved_in.range = [Event] -involvesPlace.is_a = [ObjectProperty, hasParticipant] -involvesPlace.domain = [Event] -involvesPlace.range = [PhysicalPlace] +involves_place.is_a = [ObjectProperty, has_participant] +involves_place.domain = [Event] +involves_place.range = [PhysicalPlace] -isPlaceInvolvedIn.is_a = [ObjectProperty, isParticipantIn] -isPlaceInvolvedIn.domain = [PhysicalPlace] -isPlaceInvolvedIn.range = [Event] +is_place_involved_in.is_a = [ObjectProperty, is_participant_in] +is_place_involved_in.domain = [PhysicalPlace] +is_place_involved_in.range = [Event] -isRegionFor.is_a = [ObjectProperty, associatedWith] -isRegionFor.domain = [Region] -isRegionFor.range = [Entity] +is_region_for.is_a = [ObjectProperty, associated_with] +is_region_for.domain = [Region] +is_region_for.range = [Entity] -isAnsweredBy.is_a = [ObjectProperty, involvesAgent] -isAnsweredBy.domain = [Event] -isAnsweredBy.range = [Agent] +is_answered_by.is_a = [ObjectProperty, involves_agent] +is_answered_by.domain = [Event] +is_answered_by.range = [Agent] -isParticipantIn.is_a = [ObjectProperty, associatedWith] -isParticipantIn.domain = [Object] -isParticipantIn.range = [Event] +is_participant_in.is_a = [ObjectProperty, associated_with] +is_participant_in.domain = [Object] +is_participant_in.range = [Event] -isAskedBy.is_a = [ObjectProperty, involvesAgent] -isAskedBy.domain = [QueryingTask] -isAskedBy.range = [Agent] +is_asked_by.is_a = [ObjectProperty, involves_agent] +is_asked_by.domain = [QueryingTask] +is_asked_by.range = [Agent] -isRoleDefinedIn.is_a = [ObjectProperty, isDefinedIn] -isRoleDefinedIn.domain = [Role] -isRoleDefinedIn.range = [Description] +is_role_defined_in.is_a = [ObjectProperty, is_defined_in] +is_role_defined_in.domain = [Role] +is_role_defined_in.range = [Description] -isConstituentOf.is_a = [ObjectProperty, associatedWith] -isConstituentOf.domain = [Entity] -isConstituentOf.range = [Entity] +is_constituent_of.is_a = [ObjectProperty, associated_with] +is_constituent_of.domain = [Entity] +is_constituent_of.range = [Entity] -isQualityOf.is_a = [ObjectProperty, associatedWith] -isQualityOf.domain = [Quality] -isQualityOf.range = [Entity] +is_quality_of.is_a = [ObjectProperty, associated_with] +is_quality_of.domain = [Quality] +is_quality_of.range = [Entity] -isObjectIncludedIn.is_a = [ObjectProperty, hasSetting] -isObjectIncludedIn.domain = [Object] -isObjectIncludedIn.range = [Situation] +is_object_included_in.is_a = [ObjectProperty, has_setting] +is_object_included_in.domain = [Object] +is_object_included_in.range = [Situation] -isCreatedOutputOf.is_a = [ObjectProperty, isOutputRoleOf] -isCreatedOutputOf.domain = [Role] -isCreatedOutputOf.range = [Task] +is_created_output_of.is_a = [ObjectProperty, is_output_role_of] +is_created_output_of.domain = [Role] +is_created_output_of.range = [Task] -isOutputRoleOf.is_a = [ObjectProperty, hasTask] -isOutputRoleOf.domain = [Role] -isOutputRoleOf.range = [Task] +is_output_role_of.is_a = [ObjectProperty, has_task] +is_output_role_of.domain = [Role] +is_output_role_of.range = [Task] -isTaskOfCreatedRole.is_a = [ObjectProperty, isTaskOfOutputRole] -isTaskOfCreatedRole.domain = [Task] -isTaskOfCreatedRole.range = [Role] +is_task_of_created_role.is_a = [ObjectProperty, is_task_of_output_role] +is_task_of_created_role.domain = [Task] +is_task_of_created_role.range = [Role] -isDefinedIn.is_a = [ObjectProperty, isConceptUsedIn] -isDefinedIn.domain = [Concept] -isDefinedIn.range = [Description] +is_defined_in.is_a = [ObjectProperty, is_concept_used_in] +is_defined_in.domain = [Concept] +is_defined_in.range = [Description] -isDepositOf.is_a = [ObjectProperty, isLocationOf] -isDepositOf.domain = [PhysicalObject] -isDepositOf.range = [PhysicalObject] +is_deposit_of.is_a = [ObjectProperty, is_location_of] +is_deposit_of.domain = [PhysicalObject] +is_deposit_of.range = [PhysicalObject] -isOntopOf.is_a = [ObjectProperty, hasLocation] -isOntopOf.domain = [PhysicalObject] -isOntopOf.range = [PhysicalObject] +is_ontop_of.is_a = [ObjectProperty, has_location] +is_ontop_of.domain = [PhysicalObject] +is_ontop_of.range = [PhysicalObject] -isDesignFor.is_a = [ObjectProperty, describes] -isDesignFor.domain = [Design] -isDesignFor.range = [Object] +is_design_for.is_a = [ObjectProperty, describes] +is_design_for.domain = [Design] +is_design_for.range = [Object] -isDesignedBy.is_a = [ObjectProperty, isDescribedBy] -isDesignedBy.domain = [Object] -isDesignedBy.range = [Design] +is_designed_by.is_a = [ObjectProperty, is_described_by] +is_designed_by.domain = [Object] +is_designed_by.range = [Design] -isRealizedBy.is_a = [ObjectProperty, associatedWith] -isRealizedBy.domain = [InformationObject] -isRealizedBy.range = [InformationRealization] +is_realized_by.is_a = [ObjectProperty, associated_with] +is_realized_by.domain = [InformationObject] +is_realized_by.range = [InformationRealization] -hasRole.is_a = [ObjectProperty, isClassifiedBy] -hasRole.domain = [Object] -hasRole.range = [Role] +has_role.is_a = [ObjectProperty, is_classified_by] +has_role.domain = [Object] +has_role.range = [Role] -isInputRoleOf.is_a = [ObjectProperty, hasTask] -isInputRoleOf.domain = [Role] -isInputRoleOf.range = [Task] +is_input_role_of.is_a = [ObjectProperty, has_task] +is_input_role_of.domain = [Role] +is_input_role_of.range = [Task] -isRoleOf.is_a = [ObjectProperty, classifies] -isRoleOf.domain = [Role] -isRoleOf.range = [Object] +is_role_of.is_a = [ObjectProperty, classifies] +is_role_of.domain = [Role] +is_role_of.range = [Object] -realizes.is_a = [ObjectProperty, associatedWith] +realizes.is_a = [ObjectProperty, associated_with] realizes.domain = [InformationRealization] realizes.range = [InformationObject] -isOccurringIn.is_a = [ObjectProperty, classifies] -isOccurringIn.domain = [EventType] -isOccurringIn.range = [Event] +is_occurring_in.is_a = [ObjectProperty, classifies] +is_occurring_in.domain = [EventType] +is_occurring_in.range = [Event] -isExecutorDefinedIn.is_a = [ObjectProperty] +is_executor_defined_in.is_a = [ObjectProperty] -isParameterFor.is_a = [ObjectProperty, isRelatedToConcept] -isParameterFor.domain = [Parameter] -isParameterFor.range = [Concept] +is_parameter_for.is_a = [ObjectProperty, is_related_to_concept] +is_parameter_for.domain = [Parameter] +is_parameter_for.range = [Concept] -hasTask.is_a = [ObjectProperty, isRelatedToConcept] -hasTask.domain = [Role] -hasTask.range = [Task] +has_task.is_a = [ObjectProperty, is_related_to_concept] +has_task.domain = [Role] +has_task.range = [Task] -isTaskOfInputRole.is_a = [ObjectProperty, isTaskOf] -isTaskOfInputRole.domain = [Task] -isTaskOfInputRole.range = [Role] +is_task_of_input_role.is_a = [ObjectProperty, is_task_of] +is_task_of_input_role.domain = [Task] +is_task_of_input_role.range = [Role] -hasLocation.is_a = [ObjectProperty, associatedWith] -hasLocation.domain = [Entity] -hasLocation.range = [Entity] +has_location.is_a = [ObjectProperty, associated_with] +has_location.domain = [Entity] +has_location.range = [Entity] -isComponentOf.is_a = [ObjectProperty, AsymmetricProperty, isPropertPartOf] -isComponentOf.domain = [Entity] -isComponentOf.range = [Entity] +is_component_of.is_a = [ObjectProperty, AsymmetricProperty, is_propert_part_of] +is_component_of.domain = [Entity] +is_component_of.range = [Entity] -isLinkedTo.is_a = [ObjectProperty, SymmetricProperty, hasLocation] -isLinkedTo.domain = [PhysicalObject] -isLinkedTo.range = [PhysicalObject] +is_linked_to.is_a = [ObjectProperty, SymmetricProperty, has_location] +is_linked_to.domain = [PhysicalObject] +is_linked_to.range = [PhysicalObject] -isMotionDescriptionFor.is_a = [ObjectProperty, describes] -isMotionDescriptionFor.domain = [MotionDescription] -isMotionDescriptionFor.range = [Motion] +is_motion_description_for.is_a = [ObjectProperty, describes] +is_motion_description_for.domain = [MotionDescription] +is_motion_description_for.range = [Motion] -isMovedByAgent.is_a = [ObjectProperty, interactsWith] -isMovedByAgent.domain = [PhysicalObject] -isMovedByAgent.range = [Agent] +is_moved_by_agent.is_a = [ObjectProperty, interacts_with] +is_moved_by_agent.domain = [PhysicalObject] +is_moved_by_agent.range = [Agent] -movesObject.is_a = [ObjectProperty, interactsWith] -movesObject.domain = [Agent] -movesObject.range = [PhysicalObject] +moves_object.is_a = [ObjectProperty, interacts_with] +moves_object.domain = [Agent] +moves_object.range = [PhysicalObject] -isClassifiedBy.is_a = [ObjectProperty, associatedWith] -isClassifiedBy.domain = [Entity] -isClassifiedBy.range = [Concept] +is_classified_by.is_a = [ObjectProperty, associated_with] +is_classified_by.domain = [Entity] +is_classified_by.range = [Concept] -classifies.is_a = [ObjectProperty, associatedWith] +classifies.is_a = [ObjectProperty, associated_with] classifies.domain = [Concept] classifies.range = [Entity] -isOrderedBy.is_a = [ObjectProperty, associatedWith] -isOrderedBy.domain = [OrderedElement] -isOrderedBy.range = [Order] +is_ordered_by.is_a = [ObjectProperty, associated_with] +is_ordered_by.domain = [OrderedElement] +is_ordered_by.range = [Order] -orders.is_a = [ObjectProperty, associatedWith] +orders.is_a = [ObjectProperty, associated_with] orders.domain = [Order] orders.range = [OrderedElement] -isTaskOfOutputRole.is_a = [ObjectProperty, isTaskOf] -isTaskOfOutputRole.domain = [Task] -isTaskOfOutputRole.range = [Role] +is_task_of_output_role.is_a = [ObjectProperty, is_task_of] +is_task_of_output_role.domain = [Task] +is_task_of_output_role.range = [Role] -isPerformedBy.is_a = [ObjectProperty, involvesAgent] -isPerformedBy.domain = [Action] -isPerformedBy.range = [Agent] +is_performed_by.is_a = [ObjectProperty, involves_agent] +is_performed_by.domain = [Action] +is_performed_by.range = [Agent] -isPhysicallyContainedIn.is_a = [ObjectProperty, isLocationOf] -isPhysicallyContainedIn.domain = [Entity] -isPhysicallyContainedIn.range = [Entity] +is_physically_contained_in.is_a = [ObjectProperty, is_location_of] +is_physically_contained_in.domain = [Entity] +is_physically_contained_in.range = [Entity] -isPlanFor.is_a = [ObjectProperty, describes] -isPlanFor.domain = [Plan] -isPlanFor.range = [Task] +is_plan_for.is_a = [ObjectProperty, describes] +is_plan_for.domain = [Plan] +is_plan_for.range = [Task] -isAbout.is_a = [ObjectProperty, associatedWith] -isAbout.domain = [InformationObject] -isAbout.range = [Entity] +is_about.is_a = [ObjectProperty, associated_with] +is_about.domain = [InformationObject] +is_about.range = [Entity] -isReplacedBy.is_a = [ObjectProperty, before] -isReplacedBy.domain = [State] -isReplacedBy.range = [State] +is_replaced_by.is_a = [ObjectProperty, before] +is_replaced_by.domain = [State] +is_replaced_by.range = [State] replaces.is_a = [ObjectProperty, after] replaces.domain = [State] replaces.range = [State] -hasSetting.is_a = [ObjectProperty, associatedWith] -hasSetting.domain = [Entity] -hasSetting.range = [Situation] +has_setting.is_a = [ObjectProperty, associated_with] +has_setting.domain = [Entity] +has_setting.range = [Situation] -isTaskDefinedIn.is_a = [ObjectProperty, isDefinedIn] -isTaskDefinedIn.domain = [Task] -isTaskDefinedIn.range = [Description] +is_task_defined_in.is_a = [ObjectProperty, is_defined_in] +is_task_defined_in.domain = [Task] +is_task_defined_in.range = [Description] -isSupportedBy.is_a = [ObjectProperty, interactsWith, hasCommonBoundary] -isSupportedBy.domain = [Entity] -isSupportedBy.range = [Entity] +is_supported_by.is_a = [ObjectProperty, interacts_with, has_common_boundary] +is_supported_by.domain = [Entity] +is_supported_by.range = [Entity] -hasCommonBoundary.is_a = [ObjectProperty, SymmetricProperty, associatedWith] -hasCommonBoundary.domain = [Entity] -hasCommonBoundary.range = [Entity] +has_common_boundary.is_a = [ObjectProperty, SymmetricProperty, associated_with] +has_common_boundary.domain = [Entity] +has_common_boundary.range = [Entity] -supports.is_a = [ObjectProperty, interactsWith, hasCommonBoundary] +supports.is_a = [ObjectProperty, interacts_with, has_common_boundary] supports.domain = [Entity] supports.range = [Entity] -isTaskOf.is_a = [ObjectProperty, isRelatedToConcept] -isTaskOf.domain = [Task] -isTaskOf.range = [Role] +is_task_of.is_a = [ObjectProperty, is_related_to_concept] +is_task_of.domain = [Task] +is_task_of.range = [Role] -isTerminatedBy.is_a = [ObjectProperty, associatedWith] -isTerminatedBy.domain = [Event] -isTerminatedBy.range = [Event] +is_terminated_by.is_a = [ObjectProperty, associated_with] +is_terminated_by.domain = [Event] +is_terminated_by.range = [Event] -terminates.is_a = [ObjectProperty, associatedWith] +terminates.is_a = [ObjectProperty, associated_with] terminates.domain = [Event] terminates.range = [Event] -meets.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, directlyPrecedes] +meets.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, directly_precedes] meets.domain = [Entity] meets.range = [Entity] -metBy.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, directlyFollows] -metBy.domain = [Entity] -metBy.range = [Entity] +met_by.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, directly_follows] +met_by.domain = [Entity] +met_by.range = [Entity] -overlappedBy.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, overlaps] -overlappedBy.domain = [Entity] -overlappedBy.range = [Entity] +overlapped_by.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, overlaps] +overlapped_by.domain = [Entity] +overlapped_by.range = [Entity] -overlappedOn.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, overlaps] -overlappedOn.domain = [Entity] -overlappedOn.range = [Entity] +overlapped_on.is_a = [ObjectProperty, AsymmetricProperty, IrreflexiveProperty, overlaps] +overlapped_on.domain = [Entity] +overlapped_on.range = [Entity] -simultaneous.is_a = [ObjectProperty, SymmetricProperty, TransitiveProperty, coOccurs] +simultaneous.is_a = [ObjectProperty, SymmetricProperty, TransitiveProperty, co_occurs] simultaneous.domain = [Event] simultaneous.range = [Event] -startedBy.is_a = [ObjectProperty, TransitiveProperty, coOccurs] -startedBy.domain = [Event] -startedBy.range = [Event] +started_by.is_a = [ObjectProperty, TransitiveProperty, co_occurs] +started_by.domain = [Event] +started_by.range = [Event] -starts.is_a = [ObjectProperty, TransitiveProperty, coOccurs] +starts.is_a = [ObjectProperty, TransitiveProperty, co_occurs] starts.domain = [Event] starts.range = [Event] -transitionsBack.is_a = [ObjectProperty, transitionsFrom, transitionsTo] -transitionsBack.domain = [Transient] -transitionsBack.range = [Object] +transitions_back.is_a = [ObjectProperty, transitions_from, transitions_to] +transitions_back.domain = [Transient] +transitions_back.range = [Object] -transitionsFrom.is_a = [ObjectProperty, hasCommonBoundary] -transitionsFrom.domain = [Transient] -transitionsFrom.range = [Object] +transitions_from.is_a = [ObjectProperty, has_common_boundary] +transitions_from.domain = [Transient] +transitions_from.range = [Object] -transitionsTo.is_a = [ObjectProperty, hasCommonBoundary] -transitionsTo.domain = [Transient] -transitionsTo.range = [Object] +transitions_to.is_a = [ObjectProperty, has_common_boundary] +transitions_to.domain = [Transient] +transitions_to.range = [Object] -hasExpectedTerminalSituation.is_a = [ObjectProperty, hasTerminalSituation, hasPostcondition] -hasExpectedTerminalSituation.domain = [SituationTransition] -hasExpectedTerminalSituation.range = [Situation] +has_expected_terminal_situation.is_a = [ObjectProperty, has_terminal_situation, has_postcondition] +has_expected_terminal_situation.domain = [SituationTransition] +has_expected_terminal_situation.range = [Situation] -hasPostcondition.is_a = [ObjectProperty, directlyPrecedes] -hasPostcondition.domain = [Event | Situation] -hasPostcondition.range = [Event | Situation] +has_postcondition.is_a = [ObjectProperty, directly_precedes] +has_postcondition.domain = [Or([Event, Situation])] +has_postcondition.range = [Or([Event, Situation])] -hasRequiredInitialSituation.is_a = [ObjectProperty, hasInitialSituation, hasPrecondition] -hasRequiredInitialSituation.domain = [SituationTransition] -hasRequiredInitialSituation.range = [Situation] +has_required_initial_situation.is_a = [ObjectProperty, has_initial_situation, has_precondition] +has_required_initial_situation.domain = [SituationTransition] +has_required_initial_situation.range = [Situation] -hasPrecondition.is_a = [ObjectProperty, directlyFollows] -hasPrecondition.domain = [Event | Situation] -hasPrecondition.range = [Event | Situation] +has_precondition.is_a = [ObjectProperty, directly_follows] +has_precondition.domain = [Or([Event, Situation])] +has_precondition.range = [Or([Event, Situation])] -manifestsIn.is_a = [ObjectProperty, includesEvent] +manifests_in.is_a = [ObjectProperty, includes_event] -preventedBy.is_a = [ObjectProperty, hasSetting] -preventedBy.domain = [Situation] -preventedBy.range = [Situation] +prevented_by.is_a = [ObjectProperty, has_setting] +prevented_by.domain = [Situation] +prevented_by.range = [Situation] -prevents.is_a = [ObjectProperty, isSettingFor] +prevents.is_a = [ObjectProperty, is_setting_for] prevents.domain = [Situation] prevents.range = [Situation] -actsFor.is_a = [ObjectProperty, associatedWith] -actsFor.domain = [Agent] -actsFor.range = [SocialAgent] +acts_for.is_a = [ObjectProperty, associated_with] +acts_for.domain = [Agent] +acts_for.range = [SocialAgent] -executesTask.is_a = [ObjectProperty, isClassifiedBy] -executesTask.domain = [Action] -executesTask.range = [Task] +executes_task.is_a = [ObjectProperty, is_classified_by] +executes_task.domain = [Action] +executes_task.range = [Task] -expresses.is_a = [ObjectProperty, associatedWith] +expresses.is_a = [ObjectProperty, associated_with] expresses.domain = [InformationObject] expresses.range = [SocialObject] -isExecutedIn.is_a = [ObjectProperty, classifies] -isExecutedIn.domain = [Task] -isExecutedIn.range = [Action] +is_executed_in.is_a = [ObjectProperty, classifies] +is_executed_in.domain = [Task] +is_executed_in.range = [Action] -isExpressedBy.is_a = [ObjectProperty, associatedWith] -isExpressedBy.domain = [SocialObject] -isExpressedBy.range = [InformationObject] +is_expressed_by.is_a = [ObjectProperty, associated_with] +is_expressed_by.domain = [SocialObject] +is_expressed_by.range = [InformationObject] -isPartOf.is_a = [ObjectProperty, TransitiveProperty, ReflexiveProperty, associatedWith] -isPartOf.domain = [Entity] -isPartOf.range = [Entity] +is_part_of.is_a = [ObjectProperty, TransitiveProperty, ReflexiveProperty, associated_with] +is_part_of.domain = [Entity] +is_part_of.range = [Entity] -satisfies.is_a = [ObjectProperty, associatedWith] +satisfies.is_a = [ObjectProperty, associated_with] satisfies.domain = [Situation] satisfies.range = [Description] diff --git a/src/pycrap/ontology.py b/src/pycrap/ontology.py index 5e36960ad..bb5edd6aa 100644 --- a/src/pycrap/ontology.py +++ b/src/pycrap/ontology.py @@ -2,6 +2,7 @@ import owlready2 from typing_extensions import Dict, Any +from .ontologies.base import Base, ontology as default_pycrap_ontology class Ontology: diff --git a/test/test_pycrap/test_parser.py b/test/test_pycrap/test_parser.py index 41dba39ed..e513a2468 100644 --- a/test/test_pycrap/test_parser.py +++ b/test/test_pycrap/test_parser.py @@ -16,7 +16,7 @@ class OntologiesParserTestCase(unittest.TestCase): def setUpClass(cls): cls.ontologies = [get_ontology("http://www.ease-crc.org/ont/SOMA.owl").load()] cls.directory = tempfile.mkdtemp() - cls.directory = os.path.join("/home/tom_sch/playground/ontologies") + # cls.directory = os.path.join(os.path.expanduser("~") ,"playground/ontologies") cls.parser = OntologiesParser(cls.ontologies, cls.directory) def test_parsing(self): From a06cc11c80613f5b3833b65ad7600a4359494ddf Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Wed, 11 Dec 2024 17:28:06 +0100 Subject: [PATCH 17/29] [Ontology] Fixed import for owlready2 name conflicts --- src/pycrap/parser.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/pycrap/parser.py b/src/pycrap/parser.py index 35c51c7f3..6eadf7c47 100644 --- a/src/pycrap/parser.py +++ b/src/pycrap/parser.py @@ -1,13 +1,13 @@ import shutil from os import mkdir +import inflection import networkx as nx import owlready2 import tqdm from owlready2 import ThingClass, PropertyClass, get_ontology, LogicalClassConstruct from owlready2.base import * from typing_extensions import List, Any -import inflection # Mapping of digits to words digit_map = { @@ -15,6 +15,7 @@ '5': 'Five', '6': 'Six', '7': 'Seven', '8': 'Eight', '9': 'Nine' } + def set_explicit_repr_for_logical_operator(): def explicit_repr(self): s = [] @@ -27,6 +28,7 @@ def explicit_repr(self): LogicalClassConstruct.__repr__ = explicit_repr + def to_snake_case(string: str) -> str: """ Convert a string to snake case. @@ -36,6 +38,7 @@ def to_snake_case(string: str) -> str: """ return inflection.underscore(string) + def to_camel_case(string: str) -> str: """ Convert a string to camel case. @@ -45,6 +48,7 @@ def to_camel_case(string: str) -> str: """ return inflection.camelize(string) + def replace_types(string: str) -> str: """ Replace the types in a string with python types @@ -88,6 +92,7 @@ def update_class_names(onto: owlready2.Ontology): converted_name = ''.join(digit_map[char] if char.isdigit() else char for char in converted_name) type.__setattr__(cls, "_name", converted_name) + def update_property_names(onto: owlready2.Ontology): """ Update the property names to match python conventions of functions and members. @@ -217,7 +222,6 @@ def __init__(self, ontology: owlready2.Ontology, dependencies: List[owlready2.On self.dependencies = dependencies # TODO update class and property names here to match python conventions - def parse(self): """ Parses the ontology into a python file. @@ -578,13 +582,15 @@ def __init__(self, ontologies: List[owlready2.Ontology], path: str, indentation: self.create_dependency_graph() set_explicit_repr_for_logical_operator() - def create_base(self): """ Create the base file """ self.current_file = open(self.path_for_file(self.base_file_name), "w") - self.current_file.write("from owlready2 import *\n") + self.current_file.write( + "from owlready2 import Thing, ThingClass, ObjectProperty, get_ontology, And, Or, Not, OneOf, Inverse, " + "normstr, DatatypeProperty, TransitiveProperty, SymmetricProperty, AsymmetricProperty, ReflexiveProperty, " + "IrreflexiveProperty, datetime \n") self.current_file.write("import tempfile\n") self.current_file.write("\n" * 2) self.current_file.write("ontology_file = tempfile.NamedTemporaryFile()\n") @@ -662,4 +668,4 @@ def create_ontologies(self): parser.parse() # Create the __init__.py - self.create_init() \ No newline at end of file + self.create_init() From 52a89824b80be33b95c09f67e2cfa46c1be1f020 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Wed, 11 Dec 2024 17:28:55 +0100 Subject: [PATCH 18/29] [Ontology] Fixed import for owlready2 name conflicts --- src/pycrap/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pycrap/parser.py b/src/pycrap/parser.py index 6eadf7c47..53282e2f2 100644 --- a/src/pycrap/parser.py +++ b/src/pycrap/parser.py @@ -594,7 +594,7 @@ def create_base(self): self.current_file.write("import tempfile\n") self.current_file.write("\n" * 2) self.current_file.write("ontology_file = tempfile.NamedTemporaryFile()\n") - self.current_file.write('ontology = owlready2.get_ontology("file://" + ontology_file.name).load()\n') + self.current_file.write('ontology = get_ontology("file://" + ontology_file.name).load()\n') self.current_file.write("\n" * 2) self.create_base_class() self.create_base_property() From ce9d8eafab32c305a811ea1fb4a014e35f728985 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Thu, 12 Dec 2024 09:38:51 +0100 Subject: [PATCH 19/29] [Ontology] Updated pycrap tests --- src/pycram/datastructures/mixins.py | 2 +- src/pycram/datastructures/world.py | 2 +- src/pycram/testing.py | 2 +- src/pycram/world_concepts/world_object.py | 2 +- src/pycrap/ontologies/base.py | 4 +- src/pycrap/ontologies/soma/individuals.py | 2 +- .../{ontology.py => ontology_wrapper.py} | 4 +- src/pycrap/urdf_parser.py | 238 ------------------ test/test_object.py | 2 +- test/test_orm/test_orm.py | 2 +- test/test_pycrap/test_annotation.py | 30 ++- 11 files changed, 26 insertions(+), 264 deletions(-) rename src/pycrap/{ontology.py => ontology_wrapper.py} (94%) delete mode 100644 src/pycrap/urdf_parser.py diff --git a/src/pycram/datastructures/mixins.py b/src/pycram/datastructures/mixins.py index 5ff4dc555..9bc6a2c92 100644 --- a/src/pycram/datastructures/mixins.py +++ b/src/pycram/datastructures/mixins.py @@ -1,6 +1,6 @@ from typing_extensions import Type, Optional -from pycrap import Base +from pycrap.ontologies import Base class HasConcept: diff --git a/src/pycram/datastructures/world.py b/src/pycram/datastructures/world.py index c69c704bf..cddabc622 100644 --- a/src/pycram/datastructures/world.py +++ b/src/pycram/datastructures/world.py @@ -12,7 +12,7 @@ from typing_extensions import List, Optional, Dict, Tuple, Callable, TYPE_CHECKING, Union, Type import pycrap -from pycrap import PhysicalObject +from pycrap.ontologies import PhysicalObject from ..cache_manager import CacheManager from ..config.world_conf import WorldConfig from ..datastructures.dataclasses import (Color, AxisAlignedBoundingBox, CollisionCallbacks, diff --git a/src/pycram/testing.py b/src/pycram/testing.py index c5e66d609..c27fc9316 100644 --- a/src/pycram/testing.py +++ b/src/pycram/testing.py @@ -11,7 +11,7 @@ from .datastructures.enums import ObjectType, WorldMode from .object_descriptors.urdf import ObjectDescription from .ros_utils.viz_marker_publisher import VizMarkerPublisher -from pycrap import ontology, Milk, Robot, Kitchen, Cereal +from pycrap import ontology_wrapper, Milk, Robot, Kitchen, Cereal import owlready2 class EmptyBulletWorldTestCase(unittest.TestCase): diff --git a/src/pycram/world_concepts/world_object.py b/src/pycram/world_concepts/world_object.py index 6a055cdec..a01045aea 100644 --- a/src/pycram/world_concepts/world_object.py +++ b/src/pycram/world_concepts/world_object.py @@ -32,7 +32,7 @@ from ..robot_description import RobotDescriptionManager, RobotDescription from ..world_concepts.constraints import Attachment from ..datastructures.mixins import HasConcept -from pycrap import PhysicalObject, ontology, Base, Agent +from pycrap import PhysicalObject, ontology_wrapper, Base, Agent Link = ObjectDescription.Link diff --git a/src/pycrap/ontologies/base.py b/src/pycrap/ontologies/base.py index 0ff56a1d0..aead71806 100644 --- a/src/pycrap/ontologies/base.py +++ b/src/pycrap/ontologies/base.py @@ -1,9 +1,9 @@ -from owlready2 import * +from owlready2 import Thing, ThingClass, ObjectProperty, get_ontology, And, Or, Not, OneOf, Inverse, normstr, DatatypeProperty, TransitiveProperty, SymmetricProperty, AsymmetricProperty, ReflexiveProperty, IrreflexiveProperty, datetime import tempfile ontology_file = tempfile.NamedTemporaryFile() -ontology = owlready2.get_ontology("file://" + ontology_file.name).load() +ontology = get_ontology("file://" + ontology_file.name).load() class Base(Thing, metaclass=ThingClass): diff --git a/src/pycrap/ontologies/soma/individuals.py b/src/pycrap/ontologies/soma/individuals.py index 3946e4261..1341195e3 100644 --- a/src/pycrap/ontologies/soma/individuals.py +++ b/src/pycrap/ontologies/soma/individuals.py @@ -33,5 +33,5 @@ FailWFUninterpretableTask.comment = ['A particular kind of failure: a task is not recognized and not associated to anything that could execute it, nor to a workflow that could detail its structure into simpler structure.'] -RDFType.is_reification_of = ['http://www.w3.org/2001/XMLSchema#type'] +# RDFType.is_reification_of = ['http://www.w3.org/2001/XMLSchema#type'] diff --git a/src/pycrap/ontology.py b/src/pycrap/ontology_wrapper.py similarity index 94% rename from src/pycrap/ontology.py rename to src/pycrap/ontology_wrapper.py index bb5edd6aa..f6ab0d44c 100644 --- a/src/pycrap/ontology.py +++ b/src/pycrap/ontology_wrapper.py @@ -5,7 +5,7 @@ from .ontologies.base import Base, ontology as default_pycrap_ontology -class Ontology: +class OntologyWrapper: """ Wrapper class for user-friendly access of the owlready2 ontology class. @@ -57,6 +57,8 @@ def classes(): def search(self, *args, **kwargs): """ + Check https://owlready2.readthedocs.io/en/latest/onto.html#simple-queries for details. + :return: The search results of the ontology. """ return self.ontology.search(*args, **kwargs) diff --git a/src/pycrap/urdf_parser.py b/src/pycrap/urdf_parser.py deleted file mode 100644 index c27d3ed38..000000000 --- a/src/pycrap/urdf_parser.py +++ /dev/null @@ -1,238 +0,0 @@ -import xml.etree.ElementTree as ET -import os -from typing import List, Any - - -class URDFParser: - - - base_file_name: str = "base" - - classes_file_name: str = "classes" - - properties_file_name: str = "properties" - - restrictions_file_name: str = "restrictions" - - individuals_file_name: str = "individuals" - - file_extension: str = ".py" - - indentation = 4 - - def __init__(self, urdf_file: str, output_dir: str): - """ - Initialize the URDFParser with the URDF file and output directory. - """ - self.urdf_file = urdf_file - self.output_dir = output_dir - self.links: List[str] = [] - self.joints: List[dict] = [] - self._parse_urdf() - - def _parse_urdf(self): - """ - Parse the URDF file to extract links and joints. - """ - - tree = ET.parse(self.urdf_file) - root = tree.getroot() - - for child in root: - if child.tag == 'link': - self.links.append(child.attrib['name']) - elif child.tag == 'joint': - joint_info = { - 'name': child.attrib['name'], - 'type': child.attrib.get('type'), - 'parent': child.find('parent').attrib['link'], - 'child': child.find('child').attrib['link'] - } - self.joints.append(joint_info) - - - def parse_furniture(self, link): - """ - Parse the furniture file. - Test it on a hardcoded furniture list, later use an actual ontology file for it. - - """ - # furniture = imported_ontology.classes() - furniture = ["Door", "Fridge", "Handle"] - matching_list = [] - for l in link.split("_"): - if l.capitalize() in furniture: - matched_furniture = furniture.index(l.capitalize()) - print(f"Here it is, Found: {l} from Link: {link}") - print(f"Restriction would be:{l}.is_a = [{furniture[matched_furniture]}] ") - matching_list.append(furniture[matched_furniture]) - - - return matching_list - - - def apply_indent_to(self, string: str) -> str: - """ - Indent a statement at the beginning of every new line. - """ - return " " * self.indentation + string.replace('\n', '\n' + ' ' * self.indentation) - - def path_for_file(self, file_name: str) -> str: - """ - Generate the full path for a file in the output directory. - """ - return os.path.join(self.output_dir, f"{file_name}{self.file_extension}") - - def generate_base_imports(self): - """ - Generate a Python file containing the base class. - """ - base_file_path = self.path_for_file(self.base_file_name) - with open(base_file_path, "w") as file: - # Write imports and setup - file.write("from owlready2 import Thing, ObjectProperty\n") - file.write("import tempfile\n\n") - file.write("import owlready2\n\n") - file.write("ontology_file = tempfile.NamedTemporaryFile()\n") - file.write('ontology = owlready2.get_ontology("file://" + ontology_file.name).load()\n\n') - - # Write the Base class - file.write("class Base(Thing):\n") - file.write(" \"\"\"Base class for all links and joints.\"\"\"\n") - file.write(" namespace = ontology\n\n") - - # Write the BaseProperty class - file.write("class BaseProperty(ObjectProperty):\n") - file.write(" \"\"\"Base property for object properties.\"\"\"\n") - file.write(" namespace = ontology\n\n") - - print(f"Base class written to {base_file_path}") - - - def generate_classes_file(self): - """ - Generate a Python file with classes for all links and joints. - - Classes Joints, Links and the Joint types are always defined. - - Add some Furniture classes, later import another ontology. - - """ - classes_file_path = self.path_for_file(self.classes_file_name) - with open(classes_file_path, "w") as file: - file.write("from base import *\n\n\n") - file.write("class Links(Base):\n") - file.write(" pass\n\n") - - file.write("class Joints(Base):\n") - file.write(" pass\n\n") - - file.write("class Fixed(Base):\n") - #file.write(" \"\"\"Fixed base class for all links and joints.\"\"\"\n") - file.write(" pass\n\n") - - file.write("class Revolute(Base):\n") - # file.write(" \"\"\"Fixed base class for all links and joints.\"\"\"\n") - file.write(" pass\n\n") - - file.write("class Prismatic(Base):\n") - # file.write(" \"\"\"Fixed base class for all links and joints.\"\"\"\n") - file.write(" pass\n\n") - - file.write("class Planar(Base):\n") - # file.write(" \"\"\"Fixed base class for all links and joints.\"\"\"\n") - file.write(" pass\n\n") - - file.write("class Continous(Base):\n") - # file.write(" \"\"\"Fixed base class for all links and joints.\"\"\"\n") - file.write(" pass\n\n") - - file.write("class Door(Base):\n") - # file.write(" \"\"\"Fixed base class for all links and joints.\"\"\"\n") - file.write(" pass\n\n") - - file.write("class Fridge(Base):\n") - # file.write(" \"\"\"Fixed base class for all links and joints.\"\"\"\n") - file.write(" pass\n\n") - - file.write("class Handle(Base):\n") - # file.write(" \"\"\"Fixed base class for all links and joints.\"\"\"\n") - file.write(" pass\n\n") - - print(f"Classes written to {classes_file_path}") - - - def generate_individuals_file(self): - """ - Generate a Python file with individuals. - """ - individuals_file_path = self.path_for_file(self.individuals_file_name) - with open(individuals_file_path, "w") as file: - file.write("from properties import *\n\n\n") - for link in self.links: - file.write(f"{link} = Links('{link}')\n") - - for joint in self.joints: - file.write(f"{joint['name']} = Joints('{joint['name']}')\n") - - def generate_properties_file(self): - """ - Generate a Python file with properties for joints. - """ - properties_file_path = self.path_for_file(self.properties_file_name) - with open(properties_file_path, "w") as file: - # Write imports at the top - file.write("from classes import *\n\n") - - # Write the HasParentLink class - file.write("class hasParentLink(BaseProperty):\n") - file.write(" \"\"\"Property to link a joint to its parent link.\"\"\"\n") - file.write(" pass\n\n") # Properly indented pass statement - - # Write the HasChildLink class - file.write("class hasChildLink(BaseProperty):\n") - file.write(" \"\"\"Property to link a joint to its child link.\"\"\"\n") - file.write(" pass\n\n") # Properly indented pass statement - - print(f"Properties written to {properties_file_path}") - - def generate_restrictions_file(self): - """ - Generate a Python file with restrictions for joints, including joint types and relationships. - """ - restrictions_file_path = self.path_for_file(self.restrictions_file_name) - - with open(restrictions_file_path, "w") as file: - # Write the header - file.write("from individuals import *\n\n") - # Generate the restrictions for joints - file.write("Fixed.is_a = [Joints]\n\n") - file.write("Revolute.is_a = [Joints]\n\n") - file.write("Prismatic.is_a = [Joints]\n\n") - file.write("Planar.is_a = [Joints]\n\n") - file.write("Continous.is_a = [Joints]\n\n") - - for joint in self.joints: - instance_name = joint['name'] - joint_type = joint['type'].capitalize() - file.write(f"{instance_name}.is_a = [{joint_type}]\n") - file.write(f"{instance_name}.hasChildLink.append({joint['child']})\n") - file.write(f"{instance_name}.hasParentLink = [{joint['parent']}]\n") - file.write("\n") - - for link in self.links: - matched_furnitures = self.parse_furniture(link) - if matched_furnitures: - file.write(f"{link}.is_a = [Links, {', '.join(matched_furnitures)}]\n") - - print(f"Restrictions written to {restrictions_file_path}") - - def generate_all(self): - """ - Generate all required Python files. - """ - self.generate_base_imports() - self.generate_classes_file() - self.generate_properties_file() - self.generate_restrictions_file() - self.generate_individuals_file() \ No newline at end of file diff --git a/test/test_object.py b/test/test_object.py index 39b4830fa..9cadbf7b3 100644 --- a/test/test_object.py +++ b/test/test_object.py @@ -12,7 +12,7 @@ from geometry_msgs.msg import Point, Quaternion import pathlib -from pycrap import ontology, Milk, Food +from pycrap import ontology_wrapper, Milk, Food class TestObject(BulletWorldTestCase): diff --git a/test/test_orm/test_orm.py b/test/test_orm/test_orm.py index 3c5ef6af5..98924e32c 100644 --- a/test/test_orm/test_orm.py +++ b/test/test_orm/test_orm.py @@ -26,7 +26,7 @@ from pycram.orm.views import PickUpWithContextView from pycram.datastructures.enums import Arms, Grasp, GripperState, ObjectType from pycram.worlds.bullet_world import BulletWorld -from pycrap import ontology, Apartment, Robot, Milk +from pycrap import ontology_wrapper, Apartment, Robot, Milk class DatabaseTestCaseMixin(BulletWorldTestCase): diff --git a/test/test_pycrap/test_annotation.py b/test/test_pycrap/test_annotation.py index 01d3aa3ba..dc1a28e7b 100644 --- a/test/test_pycrap/test_annotation.py +++ b/test/test_pycrap/test_annotation.py @@ -1,28 +1,26 @@ import unittest -from pycram.testing import EmptyBulletWorldTestCase -from pycram.world_concepts.world_object import Object -from pycrap import Table, Ontology, Board, PhysicalObject, has_part +from pycrap.ontologies import DesignedFurniture, Surface +from pycrap.ontology_wrapper import OntologyWrapper class TableConceptTestCase(unittest.TestCase): + """ + Test some basic ontology queries. + """ def setUp(self): - self.ontology = Ontology() + self.ontology = OntologyWrapper() def test_table_creation(self): - table_without_parts = Table() - table_with_parts = Table() - table_top = Board() + table_without_parts = DesignedFurniture() + table_with_parts = DesignedFurniture() + table_top = Surface() table_with_parts.has_part = [table_top] - result = list(self.ontology.search(is_a=Table, has_part=self.ontology.search(is_a=Board))) + result = list(self.ontology.search(is_a=DesignedFurniture, has_part=self.ontology.search(is_a=Surface))) self.assertEqual(len(result), 1) + tables = list(self.ontology.search(type=DesignedFurniture)) + self.assertEqual(len(tables), 2) - - - -class AnnotationTestCase(EmptyBulletWorldTestCase): - - def test_tagging_of_tables(self): - table = Object("table", Table, "table" + self.extension) - print(type(table.description)) + def tearDown(self): + self.ontology.destroy_individuals() From a1ee15931e86c7c02e2b773df541d7b9d5449400 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Thu, 12 Dec 2024 10:02:21 +0100 Subject: [PATCH 20/29] [Ontology] Added crax for custom pycram classes --- src/pycram/designator.py | 12 +----------- src/pycram/designators/motion_designator.py | 2 +- src/pycram/testing.py | 6 +++--- src/pycram/world_concepts/world_object.py | 2 +- src/pycram/worlds/bullet_world.py | 2 +- src/pycrap/ontologies/__init__.py | 1 + src/pycrap/ontologies/crax/__init__.py | 4 ++++ src/pycrap/ontologies/crax/classes.py | 6 ++++++ src/pycrap/ontologies/crax/data_properties.py | 0 src/pycrap/ontologies/crax/dependencies.py | 3 +++ src/pycrap/ontologies/crax/individuals.py | 7 +++++++ src/pycrap/ontologies/crax/object_properties.py | 0 src/pycrap/ontologies/crax/restrictions.py | 5 +++++ 13 files changed, 33 insertions(+), 17 deletions(-) create mode 100644 src/pycrap/ontologies/crax/__init__.py create mode 100644 src/pycrap/ontologies/crax/classes.py create mode 100644 src/pycrap/ontologies/crax/data_properties.py create mode 100644 src/pycrap/ontologies/crax/dependencies.py create mode 100644 src/pycrap/ontologies/crax/individuals.py create mode 100644 src/pycrap/ontologies/crax/object_properties.py create mode 100644 src/pycrap/ontologies/crax/restrictions.py diff --git a/src/pycram/designator.py b/src/pycram/designator.py index 1a9ee3eb5..16404a65c 100644 --- a/src/pycram/designator.py +++ b/src/pycram/designator.py @@ -5,15 +5,8 @@ from dataclasses import dataclass, field, fields from inspect import isgenerator, isgeneratorfunction -from pycrap import PhysicalObject, Agent +from pycrap.ontologies import PhysicalObject, Agent from .ros.logging import logwarn, loginfo - -try: - import owlready2 -except ImportError: - owlready2 = None - logwarn("owlready2 is not installed!") - from sqlalchemy.orm.session import Session from .datastructures.world import World @@ -38,9 +31,6 @@ from .orm.base import RobotState, ProcessMetaData from .tasktree import with_tree -if TYPE_CHECKING: - from .ontology.ontology_common import OntologyConceptHolder - class DesignatorError(Exception): """Implementation of designator errors.""" diff --git a/src/pycram/designators/motion_designator.py b/src/pycram/designators/motion_designator.py index cf52d6802..277692509 100644 --- a/src/pycram/designators/motion_designator.py +++ b/src/pycram/designators/motion_designator.py @@ -3,7 +3,7 @@ from sqlalchemy.orm import Session -from pycrap import PhysicalObject +from pycrap.ontologies import PhysicalObject from .object_designator import ObjectDesignatorDescription, ObjectPart, RealObject from ..designator import ResolutionError from ..orm.base import ProcessMetaData diff --git a/src/pycram/testing.py b/src/pycram/testing.py index c27fc9316..90e8928ab 100644 --- a/src/pycram/testing.py +++ b/src/pycram/testing.py @@ -8,11 +8,11 @@ from .datastructures.pose import Pose from .robot_description import RobotDescription, RobotDescriptionManager from .process_module import ProcessModule -from .datastructures.enums import ObjectType, WorldMode +from .datastructures.enums import WorldMode from .object_descriptors.urdf import ObjectDescription from .ros_utils.viz_marker_publisher import VizMarkerPublisher -from pycrap import ontology_wrapper, Milk, Robot, Kitchen, Cereal -import owlready2 +from pycrap.ontologies import Milk, Robot, Kitchen, Cereal + class EmptyBulletWorldTestCase(unittest.TestCase): """ diff --git a/src/pycram/world_concepts/world_object.py b/src/pycram/world_concepts/world_object.py index a01045aea..133b504b2 100644 --- a/src/pycram/world_concepts/world_object.py +++ b/src/pycram/world_concepts/world_object.py @@ -32,7 +32,7 @@ from ..robot_description import RobotDescriptionManager, RobotDescription from ..world_concepts.constraints import Attachment from ..datastructures.mixins import HasConcept -from pycrap import PhysicalObject, ontology_wrapper, Base, Agent +from pycrap.ontologies import PhysicalObject, Agent Link = ObjectDescription.Link diff --git a/src/pycram/worlds/bullet_world.py b/src/pycram/worlds/bullet_world.py index c3a3b5f86..d7bfe73af 100755 --- a/src/pycram/worlds/bullet_world.py +++ b/src/pycram/worlds/bullet_world.py @@ -10,7 +10,7 @@ from geometry_msgs.msg import Point from typing_extensions import List, Optional, Dict, Any -from pycrap import Floor +from pycrap.ontologies import Floor from ..datastructures.dataclasses import Color, AxisAlignedBoundingBox, MultiBody, VisualShape, BoxVisualShape, \ ClosestPoint, LateralFriction, ContactPoint, ContactPointsList, ClosestPointsList from ..datastructures.enums import ObjectType, WorldMode, JointType diff --git a/src/pycrap/ontologies/__init__.py b/src/pycrap/ontologies/__init__.py index 05112cc06..5d09354e3 100644 --- a/src/pycrap/ontologies/__init__.py +++ b/src/pycrap/ontologies/__init__.py @@ -1,3 +1,4 @@ from .base import * from .dul import * from .soma import * +from .crax import * diff --git a/src/pycrap/ontologies/crax/__init__.py b/src/pycrap/ontologies/crax/__init__.py new file mode 100644 index 000000000..322f45daf --- /dev/null +++ b/src/pycrap/ontologies/crax/__init__.py @@ -0,0 +1,4 @@ +from .classes import * +from .object_properties import * +from .data_properties import * +from .individuals import * diff --git a/src/pycrap/ontologies/crax/classes.py b/src/pycrap/ontologies/crax/classes.py new file mode 100644 index 000000000..72658e42a --- /dev/null +++ b/src/pycrap/ontologies/crax/classes.py @@ -0,0 +1,6 @@ +from .dependencies import * + +class Floor(Base): + """ + The floor of the world. + """ \ No newline at end of file diff --git a/src/pycrap/ontologies/crax/data_properties.py b/src/pycrap/ontologies/crax/data_properties.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/pycrap/ontologies/crax/dependencies.py b/src/pycrap/ontologies/crax/dependencies.py new file mode 100644 index 000000000..a6f3b2da2 --- /dev/null +++ b/src/pycrap/ontologies/crax/dependencies.py @@ -0,0 +1,3 @@ +from ..base import * +from ..dul import * +from ..soma import * diff --git a/src/pycrap/ontologies/crax/individuals.py b/src/pycrap/ontologies/crax/individuals.py new file mode 100644 index 000000000..9de858d06 --- /dev/null +++ b/src/pycrap/ontologies/crax/individuals.py @@ -0,0 +1,7 @@ +from .dependencies import * +from .classes import * +from .object_properties import * +from .data_properties import * + + + diff --git a/src/pycrap/ontologies/crax/object_properties.py b/src/pycrap/ontologies/crax/object_properties.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/pycrap/ontologies/crax/restrictions.py b/src/pycrap/ontologies/crax/restrictions.py new file mode 100644 index 000000000..6530ff73b --- /dev/null +++ b/src/pycrap/ontologies/crax/restrictions.py @@ -0,0 +1,5 @@ +from .dependencies import * +from .classes import * +from .individuals import * + +Floor.is_a = [PhysicalObject] From 6ea426d1bfb75107b112aad7bef07705c61c7ac2 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Thu, 12 Dec 2024 10:10:28 +0100 Subject: [PATCH 21/29] [Ontology] Fixed most imports --- src/pycram/datastructures/world.py | 8 +++++--- src/pycrap/ontologies/crax/classes.py | 20 ++++++++++++++++++++ src/pycrap/ontologies/crax/restrictions.py | 8 ++++++++ test/test_attachment.py | 2 +- test/test_bullet_world.py | 2 +- test/test_bullet_world_reasoning.py | 2 -- 6 files changed, 35 insertions(+), 7 deletions(-) diff --git a/src/pycram/datastructures/world.py b/src/pycram/datastructures/world.py index cddabc622..518bce49f 100644 --- a/src/pycram/datastructures/world.py +++ b/src/pycram/datastructures/world.py @@ -11,8 +11,10 @@ from geometry_msgs.msg import Point from typing_extensions import List, Optional, Dict, Tuple, Callable, TYPE_CHECKING, Union, Type -import pycrap + from pycrap.ontologies import PhysicalObject +from pycrap.ontology_wrapper import OntologyWrapper + from ..cache_manager import CacheManager from ..config.world_conf import WorldConfig from ..datastructures.dataclasses import (Color, AxisAlignedBoundingBox, CollisionCallbacks, @@ -74,7 +76,7 @@ class World(StateEntity, ABC): Global reference for the cache manager, this is used to cache the description files of the robot and the objects. """ - ontology: Optional[pycrap.Ontology] = None + ontology: Optional[OntologyWrapper] = None """ The ontology of this world. """ @@ -93,7 +95,7 @@ def __init__(self, mode: WorldMode, is_prospection_world: bool = False, clear_ca StateEntity.__init__(self) - self.ontology = pycrap.Ontology() + self.ontology = OntologyWrapper() self.latest_state_id: Optional[int] = None diff --git a/src/pycrap/ontologies/crax/classes.py b/src/pycrap/ontologies/crax/classes.py index 72658e42a..042986b32 100644 --- a/src/pycrap/ontologies/crax/classes.py +++ b/src/pycrap/ontologies/crax/classes.py @@ -3,4 +3,24 @@ class Floor(Base): """ The floor of the world. + """ + +class Milk(Base): + """ + A milk carton. + """ + +class Robot(Base): + """ + The robot. + """ + +class Cereal(Base): + """ + A cereal box. + """ + +class Kitchen(Base): + """ + A kitchen. """ \ No newline at end of file diff --git a/src/pycrap/ontologies/crax/restrictions.py b/src/pycrap/ontologies/crax/restrictions.py index 6530ff73b..70638f613 100644 --- a/src/pycrap/ontologies/crax/restrictions.py +++ b/src/pycrap/ontologies/crax/restrictions.py @@ -3,3 +3,11 @@ from .individuals import * Floor.is_a = [PhysicalObject] + +Milk.is_a = [PhysicalObject] + +Robot.is_a = [Agent] + +Cereal.is_a = [PhysicalObject] + +Kitchen.is_a = [Room] \ No newline at end of file diff --git a/test/test_attachment.py b/test/test_attachment.py index 68458bd97..a87bd03d2 100644 --- a/test/test_attachment.py +++ b/test/test_attachment.py @@ -5,7 +5,7 @@ from pycram.datastructures.pose import Pose from pycram.datastructures.world import UseProspectionWorld from pycram.world_concepts.world_object import Object -from pycrap import Milk, Cereal +from pycrap.ontologies import Milk, Cereal class TestAttachment(BulletWorldTestCase): diff --git a/test/test_bullet_world.py b/test/test_bullet_world.py index e9774138c..7d7d66030 100644 --- a/test/test_bullet_world.py +++ b/test/test_bullet_world.py @@ -12,7 +12,7 @@ from pycram.object_descriptors.urdf import ObjectDescription from pycram.robot_description import RobotDescription from pycram.world_concepts.world_object import Object -from pycrap import Milk, Robot +from pycrap.ontologies import Milk, Robot fix_missing_inertial = ObjectDescription.fix_missing_inertial diff --git a/test/test_bullet_world_reasoning.py b/test/test_bullet_world_reasoning.py index 2c66942b8..5ef305c97 100644 --- a/test/test_bullet_world_reasoning.py +++ b/test/test_bullet_world_reasoning.py @@ -5,8 +5,6 @@ from pycram.datastructures.pose import Pose from pycram.robot_description import RobotDescription -use_new = True - class TestCaseBulletWorldReasoning(BulletWorldTestCase): From 0384560a966330e1d5f394928a58d89d1d4a3756 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Thu, 12 Dec 2024 13:36:13 +0100 Subject: [PATCH 22/29] [Ontology] Fixed all tests --- src/pycrap/ontologies/crax/__init__.py | 1 + src/pycrap/ontologies/crax/classes.py | 11 ++++++++++- src/pycrap/ontologies/crax/restrictions.py | 12 +++++++++--- src/pycrap/ontologies/dul/__init__.py | 1 + src/pycrap/ontologies/dul/restrictions.py | 6 ++++-- src/pycrap/ontologies/soma/__init__.py | 1 + src/pycrap/parser.py | 9 ++++++++- test/test_designator/test_action_designator.py | 3 +-- test/test_designator/test_move_and_pick_up.py | 2 +- test/test_designator/test_move_and_place.py | 2 +- test/test_designator/test_object_designator.py | 8 +++----- test/test_failure_handling.py | 2 +- test/test_object.py | 2 +- test/test_orm/test_orm.py | 2 +- test/test_pycrap/test_pycrap.py | 17 ++++++----------- 15 files changed, 49 insertions(+), 30 deletions(-) diff --git a/src/pycrap/ontologies/crax/__init__.py b/src/pycrap/ontologies/crax/__init__.py index 322f45daf..9ca08ad4e 100644 --- a/src/pycrap/ontologies/crax/__init__.py +++ b/src/pycrap/ontologies/crax/__init__.py @@ -2,3 +2,4 @@ from .object_properties import * from .data_properties import * from .individuals import * +from .restrictions import * diff --git a/src/pycrap/ontologies/crax/classes.py b/src/pycrap/ontologies/crax/classes.py index 042986b32..6601eae0e 100644 --- a/src/pycrap/ontologies/crax/classes.py +++ b/src/pycrap/ontologies/crax/classes.py @@ -23,4 +23,13 @@ class Cereal(Base): class Kitchen(Base): """ A kitchen. - """ \ No newline at end of file + """ + +class Food(Base): + ... + +class Apartment(Base): + ... + +class Cup(Base): + ... \ No newline at end of file diff --git a/src/pycrap/ontologies/crax/restrictions.py b/src/pycrap/ontologies/crax/restrictions.py index 70638f613..28707346a 100644 --- a/src/pycrap/ontologies/crax/restrictions.py +++ b/src/pycrap/ontologies/crax/restrictions.py @@ -4,10 +4,16 @@ Floor.is_a = [PhysicalObject] -Milk.is_a = [PhysicalObject] +Milk.is_a = [Food] Robot.is_a = [Agent] -Cereal.is_a = [PhysicalObject] +Cereal.is_a = [Food] -Kitchen.is_a = [Room] \ No newline at end of file +Kitchen.is_a = [Room, Location] + +Food.is_a = [PhysicalObject] + +Apartment.is_a = [Room, Location] + +Cup.is_a = [Container, PhysicalObject] \ No newline at end of file diff --git a/src/pycrap/ontologies/dul/__init__.py b/src/pycrap/ontologies/dul/__init__.py index 322f45daf..9ca08ad4e 100644 --- a/src/pycrap/ontologies/dul/__init__.py +++ b/src/pycrap/ontologies/dul/__init__.py @@ -2,3 +2,4 @@ from .object_properties import * from .data_properties import * from .individuals import * +from .restrictions import * diff --git a/src/pycrap/ontologies/dul/restrictions.py b/src/pycrap/ontologies/dul/restrictions.py index 887ffdd2d..1a50b78ad 100644 --- a/src/pycrap/ontologies/dul/restrictions.py +++ b/src/pycrap/ontologies/dul/restrictions.py @@ -1,3 +1,5 @@ +import datetime + from .dependencies import * from .classes import * from .individuals import * @@ -171,11 +173,11 @@ has_event_date.is_a = [DatatypeProperty, has_data_value] has_event_date.domain = [Event] -has_event_date.range = [datetime] +has_event_date.range = [datetime.datetime] has_interval_date.is_a = [DatatypeProperty, has_region_data_value] has_interval_date.domain = [TimeInterval] -has_interval_date.range = [datetime] +has_interval_date.range = [datetime.datetime] has_parameter_data_value.is_a = [DatatypeProperty, has_data_value] has_parameter_data_value.domain = [Parameter] diff --git a/src/pycrap/ontologies/soma/__init__.py b/src/pycrap/ontologies/soma/__init__.py index 322f45daf..9ca08ad4e 100644 --- a/src/pycrap/ontologies/soma/__init__.py +++ b/src/pycrap/ontologies/soma/__init__.py @@ -2,3 +2,4 @@ from .object_properties import * from .data_properties import * from .individuals import * +from .restrictions import * diff --git a/src/pycrap/parser.py b/src/pycrap/parser.py index 53282e2f2..d31fb646c 100644 --- a/src/pycrap/parser.py +++ b/src/pycrap/parser.py @@ -76,7 +76,7 @@ def replace_types(string: str) -> str: if "" in str(string): string = str(string).replace("", "bool") if "" in str(string): - string = str(string).replace("", "datetime") + string = str(string).replace("", "datetime.datetime") return string @@ -250,8 +250,15 @@ def create_init(self): self.import_classes() self.import_properties() self.import_individuals() + self.import_restrictions() self.current_file.close() + def import_restrictions(self): + """ + Write the import statement that imports restrictions. + """ + self.current_file.write("from .restrictions import *\n") + def import_dependencies(self): """ Import from the dependencies. diff --git a/test/test_designator/test_action_designator.py b/test/test_designator/test_action_designator.py index 6b2b8c556..435f1812b 100644 --- a/test/test_designator/test_action_designator.py +++ b/test/test_designator/test_action_designator.py @@ -10,8 +10,7 @@ from pycram.datastructures.enums import ObjectType, Arms, GripperState, Grasp from pycram.testing import BulletWorldTestCase import numpy as np - -from pycrap import Milk +from pycrap.ontologies import Milk class TestActionDesignatorGrounding(BulletWorldTestCase): diff --git a/test/test_designator/test_move_and_pick_up.py b/test/test_designator/test_move_and_pick_up.py index b837a9993..9987f9631 100644 --- a/test/test_designator/test_move_and_pick_up.py +++ b/test/test_designator/test_move_and_pick_up.py @@ -14,7 +14,7 @@ Grasp as PMGrasp) from pycram.failures import PlanFailure from pycram.process_module import simulated_robot -from pycrap import Milk +from pycrap.ontologies import Milk class MoveAndPickUpTestCase(BulletWorldTestCase): diff --git a/test/test_designator/test_move_and_place.py b/test/test_designator/test_move_and_place.py index 2b4232096..092a7db6f 100644 --- a/test/test_designator/test_move_and_place.py +++ b/test/test_designator/test_move_and_place.py @@ -12,7 +12,7 @@ from pycram.designators.specialized_designators.probabilistic.probabilistic_action import (MoveAndPlace) from pycram.failures import PlanFailure from pycram.process_module import simulated_robot -from pycrap import Milk +from pycrap.ontologies import Milk class MoveAndPlaceTestCase(BulletWorldTestCase): diff --git a/test/test_designator/test_object_designator.py b/test/test_designator/test_object_designator.py index b7ae91a25..c2668b29b 100644 --- a/test/test_designator/test_object_designator.py +++ b/test/test_designator/test_object_designator.py @@ -1,8 +1,8 @@ import unittest -from pycram.testing import BulletWorldTestCase, EmptyBulletWorldTestCase + from pycram.designators.object_designator import * -from pycram.datastructures.enums import ObjectType -from pycrap import Milk, Food, Cereal +from pycram.testing import BulletWorldTestCase +from pycrap.ontologies import Milk, Food class TestObjectDesignator(BulletWorldTestCase): @@ -32,7 +32,5 @@ def test_type_query_for_food(self): self.assertEqual(len(result_in_world), 2) - - if __name__ == '__main__': unittest.main() diff --git a/test/test_failure_handling.py b/test/test_failure_handling.py index b0112dc63..74b4328e0 100644 --- a/test/test_failure_handling.py +++ b/test/test_failure_handling.py @@ -11,7 +11,7 @@ from pycram.process_module import ProcessModule, simulated_robot from pycram.robot_description import RobotDescription from pycram.object_descriptors.urdf import ObjectDescription -from pycrap import Robot +from pycrap.ontologies import Robot extension = ObjectDescription.get_file_extension() diff --git a/test/test_object.py b/test/test_object.py index 9cadbf7b3..43af93852 100644 --- a/test/test_object.py +++ b/test/test_object.py @@ -12,7 +12,7 @@ from geometry_msgs.msg import Point, Quaternion import pathlib -from pycrap import ontology_wrapper, Milk, Food +from pycrap.ontologies import Milk class TestObject(BulletWorldTestCase): diff --git a/test/test_orm/test_orm.py b/test/test_orm/test_orm.py index 98924e32c..11cb758fb 100644 --- a/test/test_orm/test_orm.py +++ b/test/test_orm/test_orm.py @@ -26,7 +26,7 @@ from pycram.orm.views import PickUpWithContextView from pycram.datastructures.enums import Arms, Grasp, GripperState, ObjectType from pycram.worlds.bullet_world import BulletWorld -from pycrap import ontology_wrapper, Apartment, Robot, Milk +from pycrap.ontologies import Apartment, Robot, Milk class DatabaseTestCaseMixin(BulletWorldTestCase): diff --git a/test/test_pycrap/test_pycrap.py b/test/test_pycrap/test_pycrap.py index 8fc76a6af..2dd612cb9 100644 --- a/test/test_pycrap/test_pycrap.py +++ b/test/test_pycrap/test_pycrap.py @@ -2,7 +2,8 @@ import pycrap import inspect -from pycrap import Ontology +from pycrap.ontologies import Base, Cup +from pycrap.ontology_wrapper import OntologyWrapper def recursive_subclasses(cls): @@ -16,18 +17,12 @@ def recursive_subclasses(cls): class CrapTestCase(unittest.TestCase): def setUp(self): - self.ontology = Ontology() - - def test_creation(self): - for cls in recursive_subclasses(pycrap.Base): - cls: pycrap.Base - cls.set_comment_to_docstring() - self.assertTrue(len(pycrap.PhysicalObject.comment) > 0) + self.ontology = OntologyWrapper() def test_multiple_worlds(self): - second_ontology = Ontology() - cup1 = pycrap.Cup(namespace=self.ontology.ontology) - cup2 = pycrap.Cup(namespace=second_ontology.ontology) + second_ontology = OntologyWrapper() + cup1 = Cup(namespace=self.ontology.ontology) + cup2 = Cup(namespace=second_ontology.ontology) self.assertEqual(len(list(self.ontology.individuals())), 1) self.assertEqual(len(list(second_ontology.individuals())), 1) self.assertNotEqual(cup1, cup2) From b180c563e97d22ecd41db96cb0519053a8055893 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Thu, 12 Dec 2024 13:41:55 +0100 Subject: [PATCH 23/29] [Ontology] Started to fix doc --- examples/action_designator.md | 8 ++++---- examples/bullet_world.md | 8 ++++---- examples/cram_plan_tutorial.md | 9 ++++----- src/pycrap/ontologies/crax/classes.py | 6 ++++++ src/pycrap/ontologies/crax/restrictions.py | 6 +++++- 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/examples/action_designator.md b/examples/action_designator.md index 0496ce710..ed8cf33a6 100644 --- a/examples/action_designator.md +++ b/examples/action_designator.md @@ -41,12 +41,12 @@ from pycram.worlds.bullet_world import BulletWorld from pycram.world_concepts.world_object import Object from pycram.datastructures.enums import ObjectType, WorldMode from pycram.datastructures.pose import Pose -import pycrap +from pycrap.ontologies import Robot, Milk, Apartment world = BulletWorld(WorldMode.DIRECT) -pr2 = Object("pr2", pycrap.Robot, "pr2.urdf", pose=Pose([1, 2, 0])) -apartmet = Object("apartment", pycrap.Apartment, "apartment.urdf") -milk = Object("milk", pycrap.Milk, "milk.stl", pose=Pose([2.3, 2, 1.1])) +pr2 = Object("pr2", Robot, "pr2.urdf", pose=Pose([1, 2, 0])) +apartmet = Object("apartment", Apartment, "apartment.urdf") +milk = Object("milk", Milk, "milk.stl", pose=Pose([2.3, 2, 1.1])) ``` To move the robot we need to create a description and resolve it to an actual Designator. The description of navigation diff --git a/examples/bullet_world.md b/examples/bullet_world.md index 4b5876817..885d2ca5b 100644 --- a/examples/bullet_world.md +++ b/examples/bullet_world.md @@ -22,7 +22,7 @@ First we need to import and create a BulletWorld. from pycram.worlds.bullet_world import BulletWorld from pycram.datastructures.pose import Pose from pycram.datastructures.enums import ObjectType, WorldMode -import pycrap +from pycrap.ontologies import Milk, Cereal, Robot world = BulletWorld(mode=WorldMode.DIRECT) ``` @@ -42,7 +42,7 @@ To spawn new things in the BulletWorld we need to import the Object class and cr ```python from pycram.world_concepts.world_object import Object -milk = Object("milk", pycrap.Milk, "milk.stl", pose=Pose([0, 0, 1])) +milk = Object("milk", Milk, "milk.stl", pose=Pose([0, 0, 1])) ``` @@ -92,7 +92,7 @@ parameter. Since attachments are bi-directional it doesn't matter on which Objec First we need another Object ```python -cereal = Object("cereal", pycrap.Cereal, "breakfast_cereal.stl", pose=Pose([1, 0, 1])) +cereal = Object("cereal", Cereal, "breakfast_cereal.stl", pose=Pose([1, 0, 1])) ``` ```python @@ -120,7 +120,7 @@ which contain every link or joint as key and a unique id, used by PyBullet, as v We will see this at the example of the PR2: ```python -pr2 = Object("pr2", pycrap.Robot, "pr2.urdf") +pr2 = Object("pr2", Robot, "pr2.urdf") print(pr2.links) ``` diff --git a/examples/cram_plan_tutorial.md b/examples/cram_plan_tutorial.md index 4a47dfb99..cc3e99ffd 100644 --- a/examples/cram_plan_tutorial.md +++ b/examples/cram_plan_tutorial.md @@ -32,14 +32,14 @@ from pycram.world_concepts.world_object import Object import anytree import pycram.failures import numpy as np -import pycrap +from pycrap.ontologies import Robot, Milk, Cereal, Spoon, Bowl, Apartment np.random.seed(4) world = BulletWorld() -robot = Object("pr2", pycrap.Robot, "pr2.urdf") +robot = Object("pr2", Robot, "pr2.urdf") robot_desig = ObjectDesignatorDescription(names=['pr2']).resolve() -apartment = Object("apartment", pycrap.Apartment, "apartment.urdf", pose=Pose([-1.5, -2.5, 0])) +apartment = Object("apartment", Apartment, "apartment.urdf", pose=Pose([-1.5, -2.5, 0])) apartment_desig = ObjectDesignatorDescription(names=['apartment']).resolve() table_top = apartment.get_link_position("cooktop") # milk = Object("milk", "milk", "milk.stl", position=[table_top[0]-0.15, table_top[1], table_top[2]]) @@ -99,7 +99,6 @@ def get_n_random_positions(pose_list, n=4, dist=0.5, random=True): ``` ```python -import pycrap from pycram.costmaps import SemanticCostmap from pycram.pose_generator_and_validator import PoseGenerator @@ -108,7 +107,7 @@ poses_list = list(PoseGenerator(scm, number_of_samples=-1)) poses_list.sort(reverse=True, key=lambda x: np.linalg.norm(x.position_as_list())) object_poses = get_n_random_positions(poses_list) object_names = ["bowl", "breakfast_cereal", "spoon"] -object_types = [pycrap.Bowl, pycrap.Cereal, pycrap.Spoon] +object_types = [Bowl, Cereal, Spoon] objects = {} object_desig = {} for obj_name, obj_type, obj_pose in zip(object_names, object_types, object_poses): diff --git a/src/pycrap/ontologies/crax/classes.py b/src/pycrap/ontologies/crax/classes.py index 6601eae0e..81a27a24b 100644 --- a/src/pycrap/ontologies/crax/classes.py +++ b/src/pycrap/ontologies/crax/classes.py @@ -32,4 +32,10 @@ class Apartment(Base): ... class Cup(Base): + ... + +class Spoon(Base): + ... + +class Bowl(Base): ... \ No newline at end of file diff --git a/src/pycrap/ontologies/crax/restrictions.py b/src/pycrap/ontologies/crax/restrictions.py index 28707346a..e871db45c 100644 --- a/src/pycrap/ontologies/crax/restrictions.py +++ b/src/pycrap/ontologies/crax/restrictions.py @@ -16,4 +16,8 @@ Apartment.is_a = [Room, Location] -Cup.is_a = [Container, PhysicalObject] \ No newline at end of file +Cup.is_a = [Container, PhysicalObject] + +Spoon.is_a = [PhysicalObject] + +Bowl.is_a = [Container, PhysicalObject] \ No newline at end of file From 5331007a28daa532bd77ed891d607a3048f7a3fe Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Thu, 12 Dec 2024 13:49:00 +0100 Subject: [PATCH 24/29] [Ontology] Updated doc --- examples/intro.md | 12 ++++++------ examples/language.md | 4 ++-- examples/local_transformer.md | 8 ++++---- examples/location_designator.md | 10 +++++----- examples/migrate_neems.md | 10 +++++----- examples/minimal_task_tree.md | 10 +++++----- examples/motion_designator.md | 10 +++++----- examples/object_designator.md | 16 +++++++--------- examples/orm_example.md | 10 +++++----- 9 files changed, 44 insertions(+), 46 deletions(-) diff --git a/examples/intro.md b/examples/intro.md index c2251194a..4368f9d73 100644 --- a/examples/intro.md +++ b/examples/intro.md @@ -28,17 +28,17 @@ It is possible to spawn objects and robots into the BulletWorld, these objects c A BulletWorld can be created by simply creating an object of the BulletWorld class. ```python -import pycrap from pycram.worlds.bullet_world import BulletWorld from pycram.world_concepts.world_object import Object from pycram.datastructures.enums import ObjectType, WorldMode from pycram.datastructures.pose import Pose +from pycrap.ontologies import Milk, Cereal, Robot, Kitchen world = BulletWorld(mode=WorldMode.DIRECT) -milk = Object("milk", pycrap.Milk, "milk.stl") -pr2 = Object("pr2", pycrap.Robot, "pr2.urdf") -cereal = Object("cereal", pycrap.Cereal, "breakfast_cereal.stl", pose=Pose([1.4, 1, 0.95])) +milk = Object("milk", Milk, "milk.stl") +pr2 = Object("pr2", Robot, "pr2.urdf") +cereal = Object("cereal", Cereal, "breakfast_cereal.stl", pose=Pose([1.4, 1, 0.95])) ``` The BulletWorld allows to render images from arbitrary positions. In the following example we render images with the @@ -91,7 +91,7 @@ Since everything inside the BulletWorld is an Object, even a complex environment in the same way as the milk. ```python -kitchen = Object("kitchen", pycrap.Kitchen, "kitchen.urdf") +kitchen = Object("kitchen", Kitchen, "kitchen.urdf") ``` ## Costmaps @@ -294,7 +294,7 @@ Location Designators can create a position in cartesian space from a symbolic de from pycram.designators.location_designator import * from pycram.designators.object_designator import * -robot_desig = BelieveObject(types=[pycrap.Robot]).resolve() +robot_desig = BelieveObject(types=[Robot]).resolve() milk_desig = BelieveObject(names=["milk"]).resolve() location_desig = CostmapLocation(target=milk_desig, visible_for=robot_desig) diff --git a/examples/language.md b/examples/language.md index 11b9280ab..ad42a2207 100644 --- a/examples/language.md +++ b/examples/language.md @@ -73,13 +73,13 @@ plan. If you are performing a plan with a simulated robot, you need a BulletWorld. ```python -import pycrap from pycram.worlds.bullet_world import BulletWorld from pycram.world_concepts.world_object import Object from pycram.datastructures.enums import ObjectType +from pycrap.ontologies import Robot world = BulletWorld() -pr2 = Object("pr2", pycrap.Robot, "pr2.urdf") +pr2 = Object("pr2", Robot, "pr2.urdf") ``` ```python diff --git a/examples/local_transformer.md b/examples/local_transformer.md index 2b3965fba..2cefa2024 100644 --- a/examples/local_transformer.md +++ b/examples/local_transformer.md @@ -28,7 +28,6 @@ from pycram.world_concepts.world_object import Object from pycram.datastructures.pose import Transform, Pose from pycram.local_transformer import LocalTransformer from pycram.datastructures.enums import WorldMode -import pycrap ``` ## Initializing the World @@ -55,10 +54,11 @@ These objects will be used in subsequent tasks, to provide the frames to which w ```python from pycram.worlds.bullet_world import Object from pycram.datastructures.enums import ObjectType +from pycrap.ontologies import Kitchen, Milk, Bowl -kitchen = Object("kitchen", pycrap.Kitchen, "kitchen.urdf") -milk = Object("milk", pycrap.Milk, "milk.stl", pose=Pose([0.9, 1, 0.95])) -bowl = Object("bowl", pycrap.Bowl, "bowl.stl", pose=Pose([1.6, 1, 0.90])) +kitchen = Object("kitchen", Kitchen, "kitchen.urdf") +milk = Object("milk", Milk, "milk.stl", pose=Pose([0.9, 1, 0.95])) +bowl = Object("bowl", Bowl, "bowl.stl", pose=Pose([1.6, 1, 0.90])) ``` ## Creating a Local Transfomer diff --git a/examples/location_designator.md b/examples/location_designator.md index 58a0dac45..9ea79ccce 100644 --- a/examples/location_designator.md +++ b/examples/location_designator.md @@ -42,11 +42,11 @@ from pycram.worlds.bullet_world import BulletWorld from pycram.world_concepts.world_object import Object from pycram.datastructures.enums import ObjectType, WorldMode from pycram.datastructures.pose import Pose -import pycrap +from pycrap.ontologies import Apartment, Robot, Milk world = BulletWorld(WorldMode.DIRECT) -apartment = Object("apartment", pycrap.Apartment, "apartment.urdf") -pr2 = Object("pr2", pycrap.Robot, "pr2.urdf") +apartment = Object("apartment", Apartment, "apartment.urdf") +pr2 = Object("pr2", Robot, "pr2.urdf") ``` Next up we will create the location designator description, the {meth}`~pycram.designators.location_designator.CostmapLocation` that we will be using needs a @@ -79,7 +79,7 @@ PR2 will be set to 0.2 since otherwise the arms of the robot will be too low to ```python pr2.set_joint_position("torso_lift_joint", 0.2) -milk = Object("milk", pycrap.Milk, "milk.stl", pose=Pose([1.3, 1, 0.9])) +milk = Object("milk", Milk, "milk.stl", pose=Pose([1.3, 1, 0.9])) ``` @@ -182,7 +182,7 @@ from pycram.datastructures.enums import ObjectType apartment_desig = BelieveObject(names=["apartment"]) handle_desig = ObjectPart(names=["handle_cab10_t"], part_of=apartment_desig.resolve()) -robot_desig = BelieveObject(types=[pycrap.Robot]) +robot_desig = BelieveObject(types=[Robot]) access_location = AccessingLocation(handle_desig.resolve(), robot_desig.resolve()).resolve() print(access_location.pose) diff --git a/examples/migrate_neems.md b/examples/migrate_neems.md index 123b788e8..76cee7304 100644 --- a/examples/migrate_neems.md +++ b/examples/migrate_neems.md @@ -56,16 +56,16 @@ from pycram.tasktree import with_tree from pycram.worlds.bullet_world import BulletWorld from pycram.world_concepts.world_object import Object from pycram.designators.object_designator import * -import pycrap +from pycrap.ontologies import Robot, Kitchen, Milk, Cereal class ExamplePlans: def __init__(self): self.world = BulletWorld("DIRECT") - self.pr2 = Object("pr2", pycrap.Robot, "pr2.urdf") - self.kitchen = Object("kitchen", pycrap.Kitchen, "kitchen.urdf") - self.milk = Object("milk", pycrap.Milk, "milk.stl", pose=Pose([1.3, 1, 0.9])) - self.cereal = Object("cereal", pycrap.Cereal, "breakfast_cereal.stl", pose=Pose([1.3, 0.7, 0.95])) + self.pr2 = Object("pr2", Robot, "pr2.urdf") + self.kitchen = Object("kitchen", Kitchen, "kitchen.urdf") + self.milk = Object("milk", Milk, "milk.stl", pose=Pose([1.3, 1, 0.9])) + self.cereal = Object("cereal", Cereal, "breakfast_cereal.stl", pose=Pose([1.3, 0.7, 0.95])) self.milk_desig = ObjectDesignatorDescription(names=["milk"]) self.cereal_desig = ObjectDesignatorDescription(names=["cereal"]) self.robot_desig = ObjectDesignatorDescription(names=["pr2"]).resolve() diff --git a/examples/minimal_task_tree.md b/examples/minimal_task_tree.md index d4af30aaa..9b397a428 100644 --- a/examples/minimal_task_tree.md +++ b/examples/minimal_task_tree.md @@ -32,17 +32,17 @@ from pycram.datastructures.pose import Pose from pycram.datastructures.enums import ObjectType, WorldMode import anytree import pycram.failures -import pycrap ``` Next we will create a bullet world with a PR2 in a kitchen containing milk and cereal. ```python +from pycrap.ontologies import Milk, Cereal, Robot, Kitchen world = BulletWorld(WorldMode.DIRECT) -pr2 = Object("pr2", pycrap.Robot, "pr2.urdf") -kitchen = Object("kitchen", pycrap.Kitchen, "kitchen.urdf") -milk = Object("milk", pycrap.Milk, "milk.stl", pose=Pose([1.3, 1, 0.9])) -cereal = Object("cereal", pycrap.Cereal, "breakfast_cereal.stl", pose=Pose([1.3, 0.7, 0.95])) +pr2 = Object("pr2", Robot, "pr2.urdf") +kitchen = Object("kitchen", Kitchen, "kitchen.urdf") +milk = Object("milk", Milk, "milk.stl", pose=Pose([1.3, 1, 0.9])) +cereal = Object("cereal", Cereal, "breakfast_cereal.stl", pose=Pose([1.3, 0.7, 0.95])) milk_desig = ObjectDesignatorDescription(names=["milk"]) cereal_desig = ObjectDesignatorDescription(names=["cereal"]) robot_desig = ObjectDesignatorDescription(names=["pr2"]).resolve() diff --git a/examples/motion_designator.md b/examples/motion_designator.md index 78ac06954..fd66b2561 100644 --- a/examples/motion_designator.md +++ b/examples/motion_designator.md @@ -27,11 +27,11 @@ from pycram.worlds.bullet_world import BulletWorld from pycram.world_concepts.world_object import Object from pycram.datastructures.enums import ObjectType, WorldMode from pycram.datastructures.pose import Pose -import pycrap +from pycrap.ontologies import Robot, Milk world = BulletWorld(WorldMode.DIRECT) -pr2 = Object("pr2", pycrap.Robot, "pr2.urdf") -milk = Object("milk", pycrap.Milk, "milk.stl", pose=Pose([1.5, 0, 1])) +pr2 = Object("pr2", Robot, "pr2.urdf") +milk = Object("milk", Milk, "milk.stl", pose=Pose([1.5, 0, 1])) ``` ## Move @@ -116,7 +116,7 @@ from pycram.process_module import simulated_robot with simulated_robot: LookingMotion(target=Pose([1.5, 0, 1], [0, 0, 0, 1])).perform() - motion_description = DetectingMotion(object_type=pycrap.Milk) + motion_description = DetectingMotion(object_type=Milk) obj = motion_description.perform() @@ -151,7 +151,7 @@ from pycram.designators.motion_designator import WorldStateDetectingMotion from pycram.process_module import simulated_robot with simulated_robot: - motion_description = WorldStateDetectingMotion(object_type=pycrap.Milk) + motion_description = WorldStateDetectingMotion(object_type=Milk) obj = motion_description.perform() diff --git a/examples/object_designator.md b/examples/object_designator.md index 752476a61..e2ed26fa5 100644 --- a/examples/object_designator.md +++ b/examples/object_designator.md @@ -36,7 +36,6 @@ from pycram.worlds.bullet_world import BulletWorld from pycram.world_concepts.world_object import Object from pycram.datastructures.enums import ObjectType, WorldMode from pycram.datastructures.pose import Pose -import pycrap world = BulletWorld(WorldMode.DIRECT) ``` @@ -49,12 +48,11 @@ description which will be used to describe objects in the real world. Since {meth}`~pycram.designators.object_designator.BelieveObject` describes Objects in the BulletWorld we create a few. ```python -import pycrap - -kitchen = Object("kitchen", pycrap.Kitchen, "kitchen.urdf") -milk = Object("milk", pycrap.Milk, "milk.stl", pose=Pose([1.3, 1, 0.9])) -cereal = Object("froot_loops", pycrap.Cereal, "breakfast_cereal.stl", pose=Pose([1.3, 0.9, 0.95])) -spoon = Object("spoon", pycrap.Spoon, "spoon.stl", pose=Pose([1.3, 1.1, 0.87])) +from pycrap.ontologies import Milk, Cereal, Kitchen, Spoon +kitchen = Object("kitchen", Kitchen, "kitchen.urdf") +milk = Object("milk", Milk, "milk.stl", pose=Pose([1.3, 1, 0.9])) +cereal = Object("froot_loops", Cereal, "breakfast_cereal.stl", pose=Pose([1.3, 0.9, 0.95])) +spoon = Object("spoon", Spoon, "spoon.stl", pose=Pose([1.3, 1.1, 0.87])) ``` Now that we have objects we can create an object designator to describe them. For the start we want an object designator @@ -75,7 +73,7 @@ the world. ```python from pycram.designators.object_designator import BelieveObject -object_description = BelieveObject(types=[pycrap.Milk, pycrap.Cereal]) +object_description = BelieveObject(types=[Milk, Cereal]) print(object_description.resolve()) ``` @@ -109,7 +107,7 @@ For this we need some objects, so if you didn't already spawn them you can use t ```python from pycram.designators.object_designator import BelieveObject -object_description = BelieveObject(types=[pycrap.Milk, pycrap.Cereal]) +object_description = BelieveObject(types=[Milk, Cereal]) for obj in object_description: print(obj, "\n") diff --git a/examples/orm_example.md b/examples/orm_example.md index 442bcd7c1..62732dfbc 100644 --- a/examples/orm_example.md +++ b/examples/orm_example.md @@ -48,13 +48,13 @@ from pycram.designators.object_designator import * from pycram.datastructures.pose import Pose from pycram.orm.base import ProcessMetaData import anytree -import pycrap +from pycrap.ontologies import Robot, Kitchen, Milk, Cereal world = BulletWorld(WorldMode.DIRECT) -pr2 = Object("pr2", pycrap.Robot, "pr2.urdf") -kitchen = Object("kitchen", pycrap.Kitchen, "kitchen.urdf") -milk = Object("milk", pycrap.Milk, "milk.stl", pose=Pose([1.3, 1, 0.9])) -cereal = Object("cereal", pycrap.Cereal, "breakfast_cereal.stl", pose=Pose([1.3, 0.7, 0.95])) +pr2 = Object("pr2", Robot, "pr2.urdf") +kitchen = Object("kitchen", Kitchen, "kitchen.urdf") +milk = Object("milk", Milk, "milk.stl", pose=Pose([1.3, 1, 0.9])) +cereal = Object("cereal", Cereal, "breakfast_cereal.stl", pose=Pose([1.3, 0.7, 0.95])) milk_desig = ObjectDesignatorDescription(names=["milk"]) cereal_desig = ObjectDesignatorDescription(names=["cereal"]) robot_desig = ObjectDesignatorDescription(names=["pr2"]).resolve() From bfef679a88da4accfec8f612ec0d097b68ac2bee Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Thu, 12 Dec 2024 14:02:28 +0100 Subject: [PATCH 25/29] [Ontology] Updated doc --- examples/ontology.md | 10 +++++----- src/pycrap/ontologies/crax/restrictions.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/ontology.md b/examples/ontology.md index 85c03fb68..ffa380a3a 100644 --- a/examples/ontology.md +++ b/examples/ontology.md @@ -40,7 +40,6 @@ You can access the ontology by importing the PyCRAP package: ```python import pycram -import pycrap ``` The ontology is structured in classes and instances. The classes are the concepts that are used to describe the world. @@ -52,25 +51,26 @@ from pycram.worlds.bullet_world import BulletWorld from pycram.datastructures.enums import WorldMode from pycram.world_concepts.world_object import Object from pycram.datastructures.pose import Pose +from pycrap.ontologies import Milk, Cereal, Food world = BulletWorld(mode=WorldMode.DIRECT) -milk = Object("milk", pycrap.Milk, "milk.stl") -cereal = Object("cereal", pycrap.Cereal, "breakfast_cereal.stl", pose=Pose([1.4, 1, 0.95])) +milk = Object("milk", Milk, "milk.stl") +cereal = Object("cereal", Cereal, "breakfast_cereal.stl", pose=Pose([1.4, 1, 0.95])) ``` You can query the ontology using [owlready2](https://owlready2.readthedocs.io/en/v0.41/index.html). For example, we can see all food objects like this: ```python -print("All food instances", list(world.ontology.search(type=pycrap.Food))) +print("All food instances", list(world.ontology.search(type=Food))) ``` You can also search for objects in the world using the ontology: ```python from pycram.designators.object_designator import OntologyObjectDesignatorDescription -object_designator = OntologyObjectDesignatorDescription(world.ontology.search(type=pycrap.Food)) +object_designator = OntologyObjectDesignatorDescription(world.ontology.search(type=Food)) result_in_world = list(object_designator.__iter__()) print(result_in_world) ``` diff --git a/src/pycrap/ontologies/crax/restrictions.py b/src/pycrap/ontologies/crax/restrictions.py index e871db45c..e84fc3efc 100644 --- a/src/pycrap/ontologies/crax/restrictions.py +++ b/src/pycrap/ontologies/crax/restrictions.py @@ -20,4 +20,4 @@ Spoon.is_a = [PhysicalObject] -Bowl.is_a = [Container, PhysicalObject] \ No newline at end of file +Bowl.is_a = [Container, PhysicalObject] From 5da6d6c6de8220248643399b3afb2db0c6af6e41 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Thu, 12 Dec 2024 14:36:43 +0100 Subject: [PATCH 26/29] [Ontology] Merged with dev but did not update doc yet --- src/pycram/designator.py | 4 ++-- src/pycram/designators/action_designator.py | 2 +- src/pycram/designators/motion_designator.py | 2 +- src/pycram/world_concepts/world_object.py | 6 +++--- test/test_butterworth_filter.py | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/pycram/designator.py b/src/pycram/designator.py index 7db4e8519..c783208c0 100644 --- a/src/pycram/designator.py +++ b/src/pycram/designator.py @@ -1,13 +1,13 @@ # used for delayed evaluation of typing until python 3.11 becomes mainstream from __future__ import annotations +import inspect from abc import ABC, abstractmethod from dataclasses import dataclass, field, fields from inspect import isgenerator, isgeneratorfunction -from pycrap.ontologies import PhysicalObject, Agent from typing_extensions import get_type_hints -from pycrap import PhysicalObject, Agent +from pycrap.ontologies import PhysicalObject, Agent from .datastructures.property import Property, EmptyProperty from .ros.logging import logwarn, loginfo from sqlalchemy.orm.session import Session diff --git a/src/pycram/designators/action_designator.py b/src/pycram/designators/action_designator.py index 8f868171e..f139f05e5 100644 --- a/src/pycram/designators/action_designator.py +++ b/src/pycram/designators/action_designator.py @@ -10,7 +10,7 @@ from tf import transformations from typing_extensions import List, Union, Optional, Type -from pycrap import PhysicalObject, Location +from pycrap.ontologies import PhysicalObject, Location from .location_designator import CostmapLocation from .motion_designator import MoveJointsMotion, MoveGripperMotion, MoveArmJointsMotion, MoveTCPMotion, MoveMotion, \ LookingMotion, DetectingMotion, OpeningMotion, ClosingMotion diff --git a/src/pycram/designators/motion_designator.py b/src/pycram/designators/motion_designator.py index dcbc7f0ba..92f10beb7 100644 --- a/src/pycram/designators/motion_designator.py +++ b/src/pycram/designators/motion_designator.py @@ -2,7 +2,7 @@ from sqlalchemy.orm import Session -from pycrap.ontologies import PhysicalObject +from pycrap.ontologies import PhysicalObject, Location from .object_designator import ObjectDesignatorDescription, ObjectPart, RealObject from ..datastructures.enums import MovementType from ..failure_handling import try_motion diff --git a/src/pycram/world_concepts/world_object.py b/src/pycram/world_concepts/world_object.py index ff3469374..fbaffd611 100644 --- a/src/pycram/world_concepts/world_object.py +++ b/src/pycram/world_concepts/world_object.py @@ -33,7 +33,7 @@ from ..robot_description import RobotDescriptionManager, RobotDescription from ..world_concepts.constraints import Attachment from ..datastructures.mixins import HasConcept -from pycrap.ontologies import PhysicalObject, Agent +from pycrap.ontologies import PhysicalObject, Agent, Floor, Location, Robot Link = ObjectDescription.Link @@ -631,7 +631,7 @@ def is_an_environment(self) -> bool: :return: True if the object is of type environment, False otherwise. """ - return issubclass(self.obj_type, pycrap.Location) or issubclass(self.obj_type, pycrap.Floor) + return issubclass(self.obj_type, Location) or issubclass(self.obj_type, Floor) @property def is_a_robot(self) -> bool: @@ -640,7 +640,7 @@ def is_a_robot(self) -> bool: :return: True if the object is a robot, False otherwise. """ - return issubclass(self.obj_type, pycrap.Robot) + return issubclass(self.obj_type, Robot) def attach(self, child_object: Object, diff --git a/test/test_butterworth_filter.py b/test/test_butterworth_filter.py index bcbf9f95f..420d95caa 100644 --- a/test/test_butterworth_filter.py +++ b/test/test_butterworth_filter.py @@ -37,8 +37,8 @@ def test_filter_single_value_data(self): filter = Butterworth() data = [1] filtered_data = filter.filter(data) - expected_filtered_data = [0.026077721701092293] # The expected filtered value - self.assertEqual(filtered_data.tolist(), expected_filtered_data) + expected_filtered_data = 0.026077721701092293 # The expected filtered value + self.assertAlmostEqual(filtered_data.tolist()[0], expected_filtered_data) if __name__ == '__main__': unittest.main() \ No newline at end of file From b9e2dfa42b55d7d7b6da14017490bfafcd61b8e5 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Thu, 12 Dec 2024 15:18:09 +0100 Subject: [PATCH 27/29] [Ontology] Fixed doc --- examples/cram_plan_tutorial.md | 13 ++++++------- examples/improving_actions.md | 4 ++-- examples/knowledge_source.md | 2 +- examples/location_designator.md | 10 +++++----- examples/motion_designator.md | 5 ++--- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/examples/cram_plan_tutorial.md b/examples/cram_plan_tutorial.md index 33458861c..259c91d7d 100644 --- a/examples/cram_plan_tutorial.md +++ b/examples/cram_plan_tutorial.md @@ -32,7 +32,7 @@ from pycram.world_concepts.world_object import Object import anytree import pycram.failures import numpy as np -import pycrap +from pycrap.ontologies import Milk, Cereal, Robot, Kitchen, Spoon, Apartment, Bowl np.random.seed(4) @@ -49,9 +49,9 @@ else: world = BulletWorld() viz_marker_publisher = VizMarkerPublisher() -robot = Object("pr2", pycrap.Robot, "pr2.urdf") +robot = Object("pr2", Robot, "pr2.urdf") robot_desig = ObjectDesignatorDescription(names=['pr2']).resolve() -apartment = Object("apartment", pycrap.Apartment, "apartment.urdf") +apartment = Object("apartment", Apartment, "apartment.urdf") apartment_desig = ObjectDesignatorDescription(names=['apartment']).resolve() table_top_name = "stove" if use_multiverse else "cooktop" table_top = apartment.get_link_position(table_top_name) @@ -89,7 +89,7 @@ def get_n_random_positions(pose_list, n=4, dist=0.5, random=True): ```python from tf.transformations import quaternion_from_euler -import pycrap + from pycram.costmaps import SemanticCostmap from pycram.pose_generator_and_validator import PoseGenerator @@ -103,7 +103,7 @@ poses_list = list(PoseGenerator(edges_cm, number_of_samples=-1)) poses_list.sort(reverse=True, key=lambda x: np.linalg.norm(x.position_as_list())) object_poses = get_n_random_positions(poses_list) object_names = ["bowl", "breakfast_cereal", "spoon"] -object_types = [pycrap.Bowl, pycrap.Cereal, pycrap.Spoon] +object_types = [Bowl, Cereal, Spoon] objects = {} object_desig = {} for obj_name, obj_type, obj_pose in zip(object_names, object_types, object_poses): @@ -140,7 +140,6 @@ Finally, we create a plan where the robot parks his arms, walks to the kitchen c execute the plan. ```python -import pycrap from pycram.external_interfaces.ik import IKError from pycram.datastructures.enums import Grasp @@ -159,7 +158,7 @@ def plan(obj_desig: ObjectDesignatorDescription.Object, torso=0.2, place=counter ParkArmsActionPerformable(Arms.BOTH).perform() good_torsos.append(torso) picked_up_arm = pose.reachable_arms[0] - grasp = Grasp.TOP if issubclass(obj_desig.world_object.obj_type, pycrap.Spoon) else Grasp.FRONT + grasp = Grasp.TOP if issubclass(obj_desig.world_object.obj_type, Spoon) else Grasp.FRONT PickUpActionPerformable(object_designator=obj_desig, arm=pose.reachable_arms[0], grasp=grasp, prepose_distance=0.03).perform() diff --git a/examples/improving_actions.md b/examples/improving_actions.md index 17b5da281..a04c6b54a 100644 --- a/examples/improving_actions.md +++ b/examples/improving_actions.md @@ -75,7 +75,7 @@ session = sqlalchemy.orm.sessionmaker(bind=engine)() Now we construct an empty world with just a floating milk, where we can learn about PickUp actions. ```python -from pycrap import Robot, Milk +from pycrap.ontologies import Robot, Milk world = BulletWorld(WorldMode.DIRECT) print(world.prospection_world) @@ -167,7 +167,7 @@ Next, we put the learned model to the test in a complex environment, where the m area. ```python -from pycrap import Apartment +from pycrap.ontologies import Apartment kitchen = Object("apartment", Apartment, "apartment.urdf") milk.set_pose(Pose([0.5, 3.15, 1.04])) diff --git a/examples/knowledge_source.md b/examples/knowledge_source.md index 855760bd5..76e0f8776 100644 --- a/examples/knowledge_source.md +++ b/examples/knowledge_source.md @@ -141,7 +141,7 @@ from pycram.datastructures.enums import WorldMode, ObjectType from pycram.knowledge.knowledge_engine import KnowledgeEngine from pycram.datastructures.pose import Pose from pycram.datastructures.property import ReachableProperty, SpaceIsFreeProperty -from pycrap import Robot +from pycrap.ontologies import Robot world = BulletWorld(WorldMode.GUI) pr2 = Object("pr2", Robot, "pr2.urdf") diff --git a/examples/location_designator.md b/examples/location_designator.md index d213b7332..8050d12aa 100644 --- a/examples/location_designator.md +++ b/examples/location_designator.md @@ -42,7 +42,7 @@ from pycram.worlds.bullet_world import BulletWorld from pycram.world_concepts.world_object import Object from pycram.datastructures.enums import ObjectType, WorldMode from pycram.datastructures.pose import Pose -import pycrap +from pycrap.ontologies import Apartment, Robot, Milk use_multiverse = False viz_marker_publisher = None @@ -57,8 +57,8 @@ else: world = BulletWorld() viz_marker_publisher = VizMarkerPublisher() -apartment = Object("apartment", pycrap.Apartment, "apartment.urdf") -pr2 = Object("pr2", pycrap.Robot, "pr2.urdf") +apartment = Object("apartment", Apartment, "apartment.urdf") +pr2 = Object("pr2", Robot, "pr2.urdf") ``` Next up we will create the location designator description, the {meth}`~pycram.designators.location_designator.CostmapLocation` that we will be using needs a @@ -91,7 +91,7 @@ PR2 will be set to 0.2 since otherwise the arms of the robot will be too low to ```python pr2.set_joint_position("torso_lift_joint", 0.2) -milk = Object("milk", pycrap.Milk, "milk.stl", pose=Pose([1.3, 1, 0.9])) +milk = Object("milk", Milk, "milk.stl", pose=Pose([1.3, 1, 0.9])) ``` @@ -195,7 +195,7 @@ from pycram.designators.location_designator import * apartment_desig = BelieveObject(names=["apartment"]) handle_name = "cabinet10_drawer1_handle" if use_multiverse else "handle_cab10_t" handle_desig = ObjectPart(names=[handle_name], part_of=apartment_desig.resolve()) -robot_desig = BelieveObject(types=[pycrap.Robot]) +robot_desig = BelieveObject(types=[Robot]) access_location = AccessingLocation(handle_desig.resolve(), robot_desig.resolve(), prepose_distance=0.03).resolve() diff --git a/examples/motion_designator.md b/examples/motion_designator.md index fe97bc802..fe49ac13d 100644 --- a/examples/motion_designator.md +++ b/examples/motion_designator.md @@ -27,7 +27,7 @@ from pycram.worlds.bullet_world import BulletWorld from pycram.world_concepts.world_object import Object from pycram.datastructures.enums import ObjectType, WorldMode from pycram.datastructures.pose import Pose -import pycrap +import pycrap.ontologies as pycrap world = BulletWorld(WorldMode.DIRECT) pr2 = Object("pr2", pycrap.Robot, "pr2.urdf") @@ -116,14 +116,13 @@ from pycram.designators.motion_designator import DetectingMotion, LookingMotion from pycram.process_module import simulated_robot from pycram.datastructures.pose import Pose from pycram.datastructures.enums import DetectionTechnique, DetectionState -from pycrap import Milk from pycram.designators.object_designator import BelieveObject with simulated_robot: LookingMotion(target=Pose([1.5, 0, 1], [0, 0, 0, 1])).perform() - motion_description = DetectingMotion(technique=DetectionTechnique.TYPES,state=DetectionState.START, object_designator_description=BelieveObject(types=[Milk]), + motion_description = DetectingMotion(technique=DetectionTechnique.TYPES,state=DetectionState.START, object_designator_description=BelieveObject(types=[pycrap.Milk]), region=None) obj = motion_description.perform() From d0c369588d80d0bbec4e7233ef2cd6286e0e96df Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Thu, 12 Dec 2024 15:29:51 +0100 Subject: [PATCH 28/29] [Ontology] Updated requirements --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ff7fc5ea9..b5b55deca 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,4 +26,5 @@ sympy pint>=0.21.1 Pygments~=2.14.0 -typeguard~=4.3.0 \ No newline at end of file +typeguard~=4.3.0 +inflection>=0.5.1 \ No newline at end of file From a6485eab0052166156fa1be3da739188f7e8ae6e Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Thu, 12 Dec 2024 16:08:06 +0100 Subject: [PATCH 29/29] [Ontology] Fixed demos --- demos/pycram_bullet_world_demo/demo.py | 2 +- demos/pycram_multiverse_demo/demo.py | 2 +- demos/pycram_multiverse_demo/fallschool_demo.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/demos/pycram_bullet_world_demo/demo.py b/demos/pycram_bullet_world_demo/demo.py index 96995c155..4c6113bd1 100644 --- a/demos/pycram_bullet_world_demo/demo.py +++ b/demos/pycram_bullet_world_demo/demo.py @@ -9,7 +9,7 @@ from pycram.world_concepts.world_object import Object from pycram.datastructures.dataclasses import Color from pycram.ros_utils.viz_marker_publisher import VizMarkerPublisher -from pycrap import Robot, Apartment, Milk, Cereal, Spoon, Bowl +from pycrap.ontologies import Robot, Apartment, Milk, Cereal, Spoon, Bowl import numpy as np diff --git a/demos/pycram_multiverse_demo/demo.py b/demos/pycram_multiverse_demo/demo.py index 65850ceea..3547b25d6 100644 --- a/demos/pycram_multiverse_demo/demo.py +++ b/demos/pycram_multiverse_demo/demo.py @@ -14,7 +14,7 @@ from pycram.robot_description import RobotDescription from pycram.world_concepts.world_object import Object from pycram.worlds.multiverse import Multiverse -from pycrap import PhysicalObject +from pycrap.ontologies import PhysicalObject world = Multiverse() diff --git a/demos/pycram_multiverse_demo/fallschool_demo.py b/demos/pycram_multiverse_demo/fallschool_demo.py index d60276976..1b85f08be 100644 --- a/demos/pycram_multiverse_demo/fallschool_demo.py +++ b/demos/pycram_multiverse_demo/fallschool_demo.py @@ -19,7 +19,7 @@ from pycram.worlds.bullet_world import BulletWorld from pycram.worlds.multiverse import Multiverse from pycram.ros_utils.viz_marker_publisher import VizMarkerPublisher -from pycrap import PhysicalObject +from pycrap.ontologies import PhysicalObject @with_simulated_robot