Chapter 4 Functional Description
Functional description of the software is automatically generated from behavioural test suite (latest build report available is here). Every behaviour described below is already implemented and working. Note, therefore, that the aim of this section is to describe already implemented functionality, contrary to planned functionality, described elsewhere – e.g. Conceptual Framework. Therefore #2, the contents of this section gets augmented every time the new behaviour is implemented and tested – so evolves in parallel with the codebase.
4.1 Agent behaviour
Agents can interact with the graph structure of OfferNet by issuing semantically constrained graph traversals which query or mutate the graph as needed. These define the API of the OfferNet graph.
4.1.1 Scenario: an agent can introduce a new agent to the network by ‘befriending’ it
The only way for the OfferNet to grow in a decentralized manner (i.e. without central controlling repository) is for new agents to get introduced to the network via old agent’s recommendation.
Given : Agent “AgentOne” is created on the OfferNet
And : Agent “AgentTwo” does not exist on the OfferNet
When : Agent “AgentOne” befriends Agent “AgentTwo”
Then : Agent “AgentTwo” exists on the OfferNet
Then : there is “knows” link between “AgentOne” and “AgentTwo”
And : there is no “knows” link between “AgentTwo” and “AgentOne”
4.1.2 Scenario: an agent can ‘befriend’ another agent existing in the network
OfferNet is a social network of Agents. Each agent has an ability to initiate creation of ‘knows’ link to another agent existing in the network. So if two unconnected agents exist on the network and one of them knows the identity of the other, then the first one can initiate creation of ‘knows’ link to another in the underlying graph which should result in the appropriate relation between them. Note that the ‘knows’ relation is not reciprocal.
Given : Agent “AgentOne” is created on the OfferNet
And : Agent “AgentTwo” is created on the OfferNet
And : there is no “knows” link between “AgentOne” and “AgentTwo”
And : there is no “knows” link between “AgentTwo” and “AgentOne”
When : Agent “AgentOne” befriends Agent “AgentTwo”
Then : there is “knows” link between “AgentOne” and “AgentTwo”
And : there is no “knows” link between “AgentTwo” and “AgentOne”
4.1.3 Scenario: an agent can post an {offer-demand} pair to the OfferNet
Agents in an Offer Network engage in exchange by publishing an offer-demand pairs, or ’work’s. See explanation of the Offer Network structure in Data structures and objects.
Given : Agent “AgentOne” is created on the OfferNet
When : Agent “AgentOne” posts a pair of offer “0.15” and demand of “0.57”
Then : Agent “AgentOne” owns a work which “demands” item “0.57”
And : Agent “AgentOne” owns a work which “offers” item “0.15”