Tactical BDI Agent Framework for Java
‘DSL’ stands for Domain Specific Language.
Basic terminology. A goal can be given to an agent, and represents what the agent has to achieve/solve. A goal can also be a composition of other goals; this is called a goal-structure. A goal-structure can for example be composed of n goals which have to be solved in sequence.
A tactic is a program for solving a goal. Every leaf-goal in a goal structure must have a tactic associated with it. In turn, a tactic can be composed from actions. An action can be guarded, which defines if it is executable or not.
For explanation on how tactics are executed to solve a goal (or in other words: agents’ execution model), see this document .
Most of the contsructs below are defined in:
The syntax of goals is shown below.
goal ::=
A predicate is a Java-function that returns a boolean. It can be constructed using a lambda-expression. For example (int x) -> x==10
is a predicate that is true when given a integer value 10. If this predicate is used as a goal, it specifies when the goal is considered as solved.
A goal needs a tactic; it specifies how to solve it. The syntax of tactics is given later.
A goal-structure is a composition of goals, e.g. it can be a sequence of sub-goals that should be achieved in the order as the sequence specifies.
goal-structure ::=
The syntax for assigning a goal structure to an agent:
An agent can also dynamically add and remove goals in its goal-structure (the goal-structure that was given to the agent to solve). This using the following actions:
A testing-goal is a special kind of goal. It can only be given to a test-agent (an instance of the class eu.iv4xr.framework.mainConcepts.TestAgent
).
It is just an ordinary goal, but additionally it allows an ‘invariant’ to be specified. When the goal is solved, this invariant will also be checked if it also holds. If it does not then we have a violation.
The syntax of testing goals:
verdictfunction ::= assertTrue_( assertion-name , assertion-info , predicate )
assertTrue_( test-agent , assertion-name , assertion-info , predicate )
This is actually a test-goal with a trivial ‘true’ as the goal to solve (so it will always be solved), and the asserted predicate as the invariant to check. Effectively, this checks whether the current agent state satisfies the invariant.
The syntax of tactics and actions is shown below.
tactic ::=
action ::=
A function is a Java-function, which can be formed with a lambda expression. For example (int x) -> x*x
constructs a function that returns 2x given an integer x as input. A bi-function is a Java-function that takes two arguments. Similarly, it can be constructed using a lambda-expression.
‘LTL’ stands for Linear Temporal Logic. An LTL formula is essentially a sequence predicate. It can be evaluated on a sequence of values to give a judgement whether or not the sequence satisfies the formula. LTL is explained here.