Development: Updating the AFAPL2 Language FAQ

From Agent Factory

Jump to: navigation, search

This FAQ describes a number of issues associated with modifying/extending the set of constructs and operators that make up the AFAPL2 Language. It is intended that the primary audience for this FAQ will be those people who are working directly on modifications to the AFAPL2 language. As such, many of the answers are brief and assume a significant amount of prior knowledge regarding the implementation of the AFAPL2 language.

Contents

How do I add a new plan operator?

Adding a new plan operator requires updates to the design time tools (parser/compiler) and to the interpreter.

Adding a new Plan Operator to the Parser

TBC

Adding a new Plan Operator to the Compiler

The Phase3Visitor class implements the visitor that checks the activities specified in both commitments and plans of the agent. This check is carried out by a recursive call on the checkActivity(...) method. In this method, there is a set of if statements that specify how the method should behave for each type of plan operator. A corresponding branch should be added to this if statement for any new plan operators.

Adding a new Plan Operator to the Interpreter

TBC