Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

227 motivating scenario discovery of behavior specifications for sending messages #228

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8570092
Create dataset.ttl
danaivach Jan 17, 2024
c54b446
Provide automatic model test report [skip actions]
invalid-email-address Jan 17, 2024
91875c7
Add FIPA terms and profile of agent A
danaivach Jan 17, 2024
dad708d
Provide automatic model test report [skip actions]
invalid-email-address Jan 17, 2024
dd3b629
docs(messaging) add queries, dataset, fipa terms
danaivach Jan 22, 2024
3fb4c87
Provide automatic model test report [skip actions]
invalid-email-address Jan 22, 2024
ee6c1c3
docs(messaging) up shape names to specifications
danaivach Jan 23, 2024
41f0a20
Merge branch '227-motivating-scenario-discovery-of-behavior-specifica…
danaivach Jan 23, 2024
d774a7b
Provide automatic model test report [skip actions]
invalid-email-address Jan 23, 2024
f7b60a4
docs(messaging) add scenario desc
danaivach Jan 24, 2024
cd0dbaf
Create discover-messaging-behavior-specifications
danaivach Jan 24, 2024
c85db68
Provide automatic model test report [skip actions]
invalid-email-address Jan 24, 2024
c34cc60
Rename domains/manufacturing-environments/discovering-messaging-behav…
danaivach Jan 24, 2024
7c22554
Provide automatic model test report [skip actions]
invalid-email-address Jan 24, 2024
d9a094e
Delete domains/manufacturing-environments/discover-messaging-behavior…
danaivach Jan 24, 2024
5db3ca0
Rename domains/manufacturing-environments/discover-messaging-behavior…
danaivach Jan 24, 2024
3e6156a
Rename dataset.ttl to dataset.ttl
danaivach Jan 24, 2024
a994160
Provide automatic model test report [skip actions]
invalid-email-address Jan 24, 2024
3029872
refactor(messaging) move docs
danaivach Jan 24, 2024
403f9f7
Merge branch '227-motivating-scenario-discovery-of-behavior-specifica…
danaivach Jan 24, 2024
6c3e176
Provide automatic model test report [skip actions]
invalid-email-address Jan 24, 2024
54cf44d
docs(messaging) fix references
danaivach Jan 25, 2024
1e3e0d3
Provide automatic model test report [skip actions]
invalid-email-address Jan 25, 2024
2f0df8d
Update fipa.ttl
NicoRobertIn Feb 12, 2024
64467d8
Provide automatic model test report [skip actions]
invalid-email-address Feb 12, 2024
da1ed2e
Rm second base
danaivach Feb 14, 2024
bc87891
Provide automatic model test report [skip actions]
invalid-email-address Feb 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,861 changes: 2,278 additions & 2,583 deletions .acimov/output/model-test-actions.md

Large diffs are not rendered by default.

4,552 changes: 2,215 additions & 2,337 deletions .acimov/output/model-test-actions.ttl

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Discover Behavior Specifications for Sending Messages to Agents
Feature: Discovery of Behavior Specifications for Sending Messages to Agents


## Description
Two agents are situated in a manufacturing workspace: Agent A manages the scheduling of production goals. Agent B operates a robotic arm artifact, that is contained in the workspace, towards achieving production goals. Agent A knows that Agent B is situated in the same workspace, and discovers a signifier that reveals information about how to send a message to Agent B for requesting to move the gripper of the robotic arm artifact.
Agent A discovers the signifier that is exposed in the resource profile of Agent B, which reveals information about how to send a [FIPA Request](http://www.fipa.org/specs/fipa00037/SC00037J.html#_Toc26729708) message to Agent B. This information specifies a set of contraints on how to execute the action of sending the message:
- the action execution should have a [FIPA ACL Message](http://www.fipa.org/specs/fipa00061/SC00061G.html) as input;
- the action execution should use an HTTP form based on the [FIPA Agent Message Transport Protocol for HTTP](http://www.fipa.org/specs/fipa00084/XC00084C.html);
- The action execution may be part of a behavior execution that is specified in the [FIPA Request Interaction Protocol Specification](http://www.fipa.org/specs/fipa00026/SC00026H.html)

Agent A executes the action by sending a message to Agent B, where the message has the following parameters:
- Agent A as sender
- Agent B as receiver
- the Request Communicative Act from the [FIPA Communicative Act Library](http://www.fipa.org/specs/fipa00037/SC00037J.html) as performative
- An Action Execution specification as content
- The [FIPA SL Content Language](http://www.fipa.org/specs/fipa00008/SC00008I.html) as language of the content

Agent B receives the message, and by interpreting the sender of the message, it retrieves the resource profile of Agent A. Agent B discovers the signifiers that are exposed in the resource profile of Agent A, which reveal information about how to send FIPA Agree and FIPA Refuse messages to Agent A.


## Competency Questions

| ID | Question in Natural Language | Example |
|----|---------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
| q1 | What are the signifiers that are exposed by a given resource profile, and that reveal information about how to send a message? | Signifier exposed in the profile `ex:agentBProfile` that reveals information about how to send a `fipa:ACLMessage`: `ex:agentBProfile` | |
| q2 | What is the action execution specification that a given signifier signifies? | Action execution specification that the signifier `ex:requestable` signifies: `ex:requestActionSpecification`|
| q3 | What is the specification of the input based on a given action execution specification? | Specification of the input based on the action execution specification `ex:requestActionSpecification`: `ex:requestMessageSpecification` |
| q4 | What are the types of the input that an action execution should have based on a given action execution specification? | Type of the input that the action execution should have based on the action execution specification `ex:requestActionSpecification`: `fipa:ACLMessage`|
| q5 | What are the properties that the input of an action execution should have based on a given action execution specification? | Properties that the input of an action execution should have based on the action execution specification `ex:requestActionSpecification`: `fipa:hasSender`, `fipa:hasReceiver`, `fipa:hasPerformative`, `fipa:hasContent`, `fipa:hasLanguage` |
| q6 | What is the suprotocol that an action execution should use based on a given action execution specification? | Subprotocol that an action execution should use based on the action execution specification `ex:requestActionSpecification`: "fipa.mts.mtp.http.std" |
| q7 | What are the types of a behavior execution in which a given specified action execution is included? | Types of a behavior execution in which an action execution specified in the action execution specification `ex:requestActionSpecification` is included: `fipa:RequestInteractionProtocolEnactment`, `dul:PlanExecution` |

## Glossary
- **Message**: The individual unit of communication between two or more agents.
- **Subrotocol**: An extension mechanism to a transport protocol [Matsukura et al., 2023], such as the [FIPA Agent Message Transport Protocol for HTTP](http://www.fipa.org/specs/fipa00084/XC00084C.html), that can be, for example, specified as part of the hypermedia control (e.g. an [hctl:Form](https://www.w3.org/2019/wot/hypermedia#Form)) describing how to execute an action.
- **Agent Interaction Protocol**: A specification of interaction between two or more autonomous agents that serves as a standard of correctness for agent behavior in a multi-agent system [Baldoni et al., 2018].
- **Action Execution as part of a Behavior Execution**: An action exection that takes place upon the execution of a (more complex) behavior, for example, as part of the execution of a plan, or of the enactment of an agent interaction protocol.
- **Behavior Execution**: see [Discovery of Behavior Specifications](../discover-behavior-specifications/README.md).
- **Action Execution**: see [Discovery of Behavior Specifications](../discover-behavior-specifications/README.md).
- **Input**: see [Discovery of Behavior Specifications](../discover-behavior-specifications/README.md).
- **Form**: see [Discovery of Behavior Specifications](../discover-behavior-specifications/README.md).
- **Signification of Behavior**: see [Discovery of Behavior Specifications](../discover-behavior-specifications/README.md).
- **Signifier**: see [Discovery of Signifiers](../discover-signifiers/README.md).
- **Signifier Exposure**: see [Discovery of Signifiers](../discover-signifiers/README.md).
- **Situatedness**: see [Discovery of Signifiers](../discover-signifiers/README.md).
- **Workspace**: see [Discovery of Workspaces, Agents, and Artifacts in Hypermedia Environments](../discover-core/README.md).
- **Resource Containment**: see [Discovery of Workspaces, Agents, and Artifacts in Hypermedia Environments](../discover-core/README.md).
- **Artifact**: see [Discovery of Workspaces, Agents, and Artifacts in Hypermedia Environments](../discover-core/README.md).
- **Agent**: see [Discovery of Workspaces, Agents, and Artifacts in Hypermedia Environments](../discover-core/README.md).
- **Resource Profile**: see [Discovery of Workspaces, Agents, and Artifacts in Hypermedia Environments](../discover-core/README.md).

[Matsukura et al., 2023] Matsukura, R., & McCool, M., & Lagally, M., & Toumura, K. (2023). Web of Things (WoT) Architecture 1.1. W3C Recommendation (W3C). Available online: https://www.w3.org/TR/wot-architecture11/.

[Baldoni et al., 2018] Baldoni, M., Baroglio, C., Amit, K. C., & Günay, A. (2018). Interaction Protocols. Handbook of Normative Multiagent Systems.

Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
@prefix hmas: <https://purl.org/hmas/> .
@prefix fipa: <http://ns.hyperagents.org/fipa#> .
@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .
@prefix htv: <http://www.w3.org/2011/http#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix dul: <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.org/> .

ex:manufacturingWorkspace a hmas:Workspace ;
hmas:contains ex:agentA, ex:agentB .

#### Agent A's profile (the agent can request actions to be performed) ####

ex:agentAProfile a fipa:AgentDescription ;
hmas:isProfileOf ex:agentA ;
hmas:exposesSignifier ex:aggreable, ex:refusable .

ex:agentA a hmas:Agent .

ex:aggreable a hmas:Signifier ;
hmas:signifies ex:agreeActionSpecification .

ex:refusable a hmas:Signifier ;
hmas:signifies ex:refuseActionSpecification .

#### Endpoint for sending messages to Agent A ####
ex:agentAMessageEndpointShape a sh:NodeShape ;
sh:class hmas:ActionExecution ;
sh:property [
sh:path prov:used ;
sh:minQualifiedShape 1 ;
sh:maxQualifiedShape 1 ;
sh:qualifiedValueShape [
sh:class hctl:Form ;
sh:property [
sh:path hctl:forSubprotocol ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:hasValue "fipa.mts.mtp.http.std" # identifier of the FIPA Agent Message Transport Protocol for HTTP Specification
], [
sh:path htv:methodName ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:hasValue "POST"
], [
sh:path hctl:hasTarget ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:hasValue <http://eduroamverw-130-82-25-24.unisg.ch:7779/acc>
]
]
].

#### Send Agreement Action Specification ####
ex:agreeActionSpecification a ex:agentAMessageEndpointShape ;
sh:class hmas:ActionExecution, dul:Action ;
sh:property [
sh:path hmas:hasInput ;
sh:qualifiedValueShape ex:agreeMessageSpecification ;
sh:qualifiedMinCount 1 ;
sh:qualifiedMaxCount 1
], [
sh:path dul:isActionIncludedIn ;
sh:qualifiedValueShape [ sh:class fipa:RequestInteractionProtocolEnactment, dul:PlanExecution ] ;
sh:qualifiedMinCount 0 ;
sh:qualifiedMaxCount 1
] .

#### Send Refusal Action Specification ####
ex:refuseActionSpecification a ex:agentAMessageEndpointShape ;
sh:class hmas:ActionExecution, dul:Action ;
sh:property [
sh:path hmas:hasInput ;
sh:qualifiedValueShape ex:refuseMessageSpecification ;
sh:qualifiedMinCount 1 ;
sh:qualifiedMaxCount 1
], [
sh:path dul:isActionIncludedIn ;
sh:qualifiedValueShape [ sh:class fipa:RequestInteractionProtocolEnactment, dul:PlanExecution ] ;
sh:qualifiedMinCount 0 ;
sh:qualifiedMaxCount 1
] .

#### Agree Message Specification ####
ex:agreeMessageSpecification a fipa:ACLMessageStructure ;
sh:class fipa:ACLMessage ;
sh:property [
sh:path fipa:hasReceiver ; # specifies itself as the receiver
sh:hasValue ex:agentA ;
sh:minCount 1;
sh:maxCount 1;
] ;
sh:property [
sh:path fipa:hasSender ; # specifies that the sender should be an agent
sh:class hmas:Agent;
sh:minCount 1;
sh:maxCount 1;
] ;
sh:property [
sh:path fipa:hasPerformative ; # specifies that the performative should be fipa:agree
sh:hasValue fipa:agree;
sh:minCount 1;
sh:maxCount 1;
] ;
sh:property [
sh:path fipa:hasContent ; # specifies that the content should be an action execution specification
sh:minQualifiedShape 1 ;
sh:maxQualifiedShape 1 ;
sh:qualifiedValueShape [ sh:class hmas:ActionExecution ]
] ;
sh:property [
sh:path fipa:hasLanguage ;
sh:hasValue fipa:FIPASL ; # specifies that the content should be expressed in the FIPA SL Content Language
sh:minCount 1;
sh:maxCount 1;
] .

#### Refuse Message Specification ####
ex:refuseMessageSpecification a fipa:ACLMessageStructure ;
sh:class fipa:ACLMessage ;
sh:property [
sh:path fipa:hasReceiver ; # specifies itself as the receiver
sh:hasValue ex:agentA ;
sh:minCount 1;
sh:maxCount 1;
] ;
sh:property [
sh:path fipa:hasSender ; # specifies that the sender should be an agent
sh:class hmas:Agent;
sh:minCount 1;
sh:maxCount 1;
] ;
sh:property [
sh:path fipa:hasPerformative ; # specifies that the performative should be fipa:refuse
sh:hasValue fipa:refuse;
sh:minCount 1;
sh:maxCount 1;
] ;
sh:property [
sh:path fipa:hasContent ; # specifies that the content should be an action execution specification
sh:minQualifiedShape 1 ;
sh:maxQualifiedShape 1 ;
sh:qualifiedValueShape [ sh:class hmas:ActionExecution ]
] ;
sh:property [
sh:path fipa:hasLanguage ;
sh:hasValue fipa:FIPASL ; # specifies that the content should be expressed in the FIPA SL Content Language
sh:minCount 1;
sh:maxCount 1;
] .

#### Agent B's profile (the agent can perform actions upon requests) ####

ex:agentBProfile a fipa:AgentDescription ;
hmas:isProfileOf ex:agentB ;
hmas:exposesSignifier ex:requestable .

ex:agentB a hmas:Agent .

ex:requestable a hmas:Signifier ;
hmas:signifies ex:requestActionSpecification .

#### Send Request Action Specification ####
ex:requestActionSpecification a sh:NodeShape ;
sh:class hmas:ActionExecution, dul:Action ;
sh:property [
sh:path prov:used ;
sh:minQualifiedShape 1 ;
sh:maxQualifiedShape 1 ;
sh:qualifiedValueShape [
sh:class hctl:Form ;
sh:property [
sh:path hctl:forSubprotocol ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:hasValue "fipa.mts.mtp.http.std" # identifier of the FIPA Agent Message Transport Protocol for HTTP Specification
], [
sh:path htv:methodName ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:hasValue "POST"
], [
sh:path hctl:hasTarget ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:hasValue <http://eduroamverw-130-82-25-24.unisg.ch:7778/acc>
]
]
], [
sh:path hmas:hasInput ;
sh:qualifiedValueShape ex:requestMessageSpecification ;
sh:qualifiedMinCount 1 ;
sh:qualifiedMaxCount 1
], [
sh:path dul:isActionIncludedIn ;
sh:qualifiedValueShape [ sh:class fipa:RequestInteractionProtocolEnactment, dul:PlanExecution ] ;
sh:qualifiedMinCount 0 ;
sh:qualifiedMaxCount 1
] .

#### Request Message Specification
ex:requestMessageSpecification a fipa:ACLMessageStructure ;
sh:class fipa:ACLMessage ;
sh:property [
sh:path fipa:hasReceiver ; # specifies itself as the receiver
sh:hasValue ex:agentB ;
sh:minCount 1;
sh:maxCount 1;
] ;
sh:property [
sh:path fipa:hasSender ; # specifies that the sender should be an agent
sh:class hmas:Agent;
sh:minCount 1;
sh:maxCount 1;
] ;
sh:property [
sh:path fipa:hasPerformative ; # specifies that the performative should be fipa:request
sh:hasValue fipa:request;
sh:minCount 1;
sh:maxCount 1;
] ;
sh:property [
sh:path fipa:hasContent ; # specifies that the content should be an action execution specification
sh:minQualifiedShape 1 ;
sh:maxQualifiedShape 1 ;
sh:qualifiedValueShape [ sh:class hmas:ActionExecution ]
] ;
sh:property [
sh:path fipa:hasLanguage ;
sh:hasValue fipa:FIPASL ; # specifies that the content should be expressed in the FIPA SL Content Language
sh:minCount 1;
sh:maxCount 1;
] .
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
signifier
http://example.org/requestable
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
prefix hmas: <https://purl.org/hmas/>
prefix ex: <http://example.org/>
prefix sh: <http://www.w3.org/ns/shacl#>
prefix fipa: <http://ns.hyperagents.org/fipa#>

select ?signifier
where {
ex:agentBProfile hmas:exposesSignifier ?signifier .
?signifier hmas:signifies ?actionExecutionSpec .
?actionExecutionSpec sh:property [
sh:path hmas:hasInput ;
sh:qualifiedValueShape [ sh:class fipa:ACLMessage ]
] .
}
order by ?signifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
actionExecutionSpec
http://example.org/requestActionSpecification
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
prefix hmas: <https://purl.org/hmas/>
prefix ex: <http://example.org/>

select ?actionExecutionSpec
where {
ex:requestable hmas:signifies ?actionExecutionSpec .
}
order by ?actionExecutionSpec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
inputSpec
http://example.org/requestMessageSpecification
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix hmas: <https://purl.org/hmas/>
prefix sh: <http://www.w3.org/ns/shacl#>
prefix ex: <http://example.org/>

select ?inputSpec
where {
ex:requestActionSpecification sh:property ?propertySpec .
?propertySpec sh:path hmas:hasInput ;
sh:qualifiedValueShape ?inputSpec .
}
order by ?inputSpec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
inputType
http://ns.hyperagents.org/fipa#ACLMessage
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
prefix hmas: <https://purl.org/hmas/>
prefix sh: <http://www.w3.org/ns/shacl#>
prefix ex: <http://example.org/>

select ?inputType
where {
ex:requestActionSpecification sh:property ?propertySpec .
?propertySpec sh:path hmas:hasInput ;
sh:qualifiedValueShape ?inputSpec .
?inputSpec sh:class ?inputType .
}
order by ?inputType
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
inputProperty
http://ns.hyperagents.org/fipa#hasContent
http://ns.hyperagents.org/fipa#hasLanguage
http://ns.hyperagents.org/fipa#hasPerformative
http://ns.hyperagents.org/fipa#hasReceiver
http://ns.hyperagents.org/fipa#hasSender
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
prefix hmas: <https://purl.org/hmas/>
prefix sh: <http://www.w3.org/ns/shacl#>
prefix ex: <http://example.org/>

select ?inputProperty
where {
ex:requestActionSpecification sh:property ?propertySpec .
?propertySpec sh:path hmas:hasInput ;
sh:qualifiedValueShape ?inputSpec .
?inputSpec sh:property ?inputPropertySpec .
?inputPropertySpec sh:path ?inputProperty .
}
order by ?inputProperty
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
subprotocol
"fipa.mts.mtp.http.std"
Loading