Skip to content

Initial version of PyCRAM Designators in SOMA#320

Draft
mrnolte wants to merge 8 commits intoease-crc:masterfrom
mrnolte:master
Draft

Initial version of PyCRAM Designators in SOMA#320
mrnolte wants to merge 8 commits intoease-crc:masterfrom
mrnolte:master

Conversation

@mrnolte
Copy link
Copy Markdown
Collaborator

@mrnolte mrnolte commented May 12, 2025

Here is a minimal addition of PyCRAM Designators to SOMA via SOMA-PYCRAM. Does it make sense? And, especially, does it make sense to put it into the main repository?

@mpomarlan mpomarlan self-assigned this May 12, 2025
<uri id="User Edited Redirect" name="http://www.ease-crc.org/ont/SOMA-AGENT.owl" uri="SOMA-AGENT.owl"/>
<uri id="User Edited Redirect" name="http://www.ease-crc.org/ont/SOMA-ALL.owl" uri="SOMA-ALL.owl"/>
<uri id="User Edited Redirect" name="http://www.ease-crc.org/ont/SOMA-AGENT.owl" uri="SOMA-AGENT.owl"/>
<uri id="User Edited Redirect" name="http://www.ease-crc.org/ont/SOMA-All.owl" uri="SOMA-ALL.owl"/>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SOMA-ALL became SOMA-All in the name. Is this safe or will it break anything?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was because the prefix in the file SOMA-ALL was actually SOMA-All, I fixed this

@@ -0,0 +1,66 @@
Prefix(:=<http://www.semanticweb.org/robin/ontologies/2025/4/untitled-ontology-8/>)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor nitpick but the : prefix should be something SOMA related, rather than a Protege generated-default.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this!


# Class: <http://www.ease-crc.org/ont/SOMA.owl#PyCramActionDesignator> (PyCRAM Action Designator)

AnnotationAssertion(rdfs:comment <http://www.ease-crc.org/ont/SOMA.owl#PyCramActionDesignator> "A PyCRAM Designator expressing a Plan for a Task.")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK action designators are not exactly plans. They specify what, not how.

If possible, I would go with any "official" definitions for pycram action designators here. E.g., what does the pycram documentation describe them as? If it turns out the pycram doc describes them as plans, it is itself likely wrong however and we would need a different text for them.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I'd argue that DUL does not offer anything better than a DUL:Plan for this, unfortunately. I quote the documentation (https://pycram.readthedocs.io/en/latest/designators.html):

Action designators can be seen as higher level plans that include failure handling and parametrization.

Ontologically, they are of course not the plan itself, merely a structured representation of said plan; i.e., they must be a DUL:InformationObject (more specifically, they are SOMA:StructuredText, but this does not matter for this argument). As a DUL:InformationObject, they DUL:expresses some DUL:SocialObject. This is true for all PyCRAM Designators (!). Now, for Action Designators we may consider different SocialObjects, e.g., DUL:Task, DUL:Plan, and DUL:Method. For DUL:Task, we would need a DUL:Description that DUL:defines it. This to me is unintuitive, as while a DUL:Task may have subtasks, it is not structured - the structure stems from a plan (as far as I understand it). For a DUL:Plan, DUL says

A Plan is a Description of some actions to be executed by agents in a certain way, with certain parameters

This to me sound exactly to what Designators are. DUL:Method seems wrong to me, because it more vague, i.e., DUL says

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.

So, when your saying that

If it turns out the pycram doc describes them as plans, it is itself likely wrong however and we would need a different text for them.

what do you actually mean by that? What do you think do they express?

AnnotationAssertion(rdfs:comment <http://www.ease-crc.org/ont/SOMA.owl#PyCramActionDesignator> "A PyCRAM Designator expressing a Plan for a Task.")
AnnotationAssertion(rdfs:label <http://www.ease-crc.org/ont/SOMA.owl#PyCramActionDesignator> "PyCRAM Action Designator")
SubClassOf(<http://www.ease-crc.org/ont/SOMA.owl#PyCramActionDesignator> <http://www.ease-crc.org/ont/SOMA.owl#PyCramDesignator>)
SubClassOf(<http://www.ease-crc.org/ont/SOMA.owl#PyCramActionDesignator> ObjectSomeValuesFrom(<http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#expresses> <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#Plan>))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above. Worth discussing, because action designators, at least in Lisp CRAM, rather expressed goals than plans.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I now see; however, we have that DUL:Plan DUL:hasComponent some DUL:Goal, i.e., we have something more general than the goal itself.


As structured data, it conveys:
- For object lookups: a dul:Configuration of feature‐roles (e.g., type, color, shape).
- For actions and motions: a dul:Method that prescribes how to carry out an underspecified task or movement toward a goal.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true for motion. As discussed above, at least this was not the intention for the action designators. The reason was that several different actions may be appropriate for achieving a goal, and thus the idea was to specify a common core -- the goal to be pursued -- and then let the designator resolution process to fill in the details of how the action is to be performed. Designators can add more constraints to this description, all the way down to fully specifying what actions to use and with what parameters, but this is not intended as a typical usecase.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now, following your line of argumentation, I believe we must look at two different things here, actually. So, an unresolved action designator would express a DUL:Method, while a resolved action designator would express a DUL:Plan?


AnnotationAssertion(rdfs:label <http://www.ease-crc.org/ont/SOMA.owl#Resolving_of_PyCRAM_Designators> "Resolving a PyCRAM Designator")
SubClassOf(<http://www.ease-crc.org/ont/SOMA.owl#Resolving_of_PyCRAM_Designators> <http://www.ease-crc.org/ont/SOMA.owl#DerivingInformation>)
SubClassOf(<http://www.ease-crc.org/ont/SOMA.owl#Resolving_of_PyCRAM_Designators> ObjectSomeValuesFrom(<http://www.ease-crc.org/ont/SOMA.owl#isTaskOfInputRole> <http://www.ease-crc.org/ont/SOMA.owl#PyCramDesignator>))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the domains and ranges of the isTaskOfInput/OutputRole?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah damn, I forgot the Role inbetween. Will change that, good catch!

@mrnolte
Copy link
Copy Markdown
Collaborator Author

mrnolte commented May 13, 2025

I now added more specific classes to the model, which divide the underspecified description (PyCRAM Designator Description) and the specified description (PyCRAM Designator Referent). @mpomarlan does this now resolve your issues with the modeling?

As a side note, there is yet another issue, in which the description itself, e.g., "a blue cup" must be somehow represented. This is problematic in that OWL does not allow nesting of expressions. I fear that we must reify the concepts and relations.

@mrnolte mrnolte requested a review from mpomarlan May 13, 2025 21:45
@mrnolte mrnolte marked this pull request as draft May 13, 2025 21:45
@mpomarlan
Copy link
Copy Markdown
Collaborator

Could you expand on the blue cup comment?

For the rest, it turns out we have 2, soon to be 3, PRs incoming about designators. Yours, Sascha's, and Alina's. It would be good I think to harmonize these in a SOMA meeting, e.g. this Friday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants