Previous: Function Definitions, Up: Programs [Contents][Index]
A TeleoR-program is a sequence of TeleoR procedure definitions that have the form
Head
{
TeleoR Rule
...
TeleoR Rule
}
where Head is the same as for relation rules. The order of the procedure definitions is not significant but the order of the rules inside each procedure is significant. Each TeleoR Rule has one of the forms given below.
The most simple TeleoR rule has the form
Guard
~>
TeleoR Action
where Guard is a conjunct of goals and TeleoR Action is of the form given below.
At the other extreme, the two most complete forms of a TeleoR rule are
Guard
or_while
Ormin_time
Duration~>
TeleoR Action
and
Guard
commit_while
Commitmin_time
Duration~>
TeleoR Action
where Or and Commit are conjuncts of goals and Duration is a number.
The right hand side of each TeleoR rule most often takes one of the following forms:
()
represents the empty set of primitive actions. The order of the robotic actions is not significant. They are to be executed in parallel.
[
RobotAction:
Duration,
...,
RobotAction:
Duration]
.
where the last action need not have a maximum duration and RobotAction is either a TeleoR procedure call or a robotic action.
However any of the above robot actions action can be optionally followed by an agent action as follows.
RobotAction
++
AgentAction
Each AgentAction is:
;
s and enclosed in {
, }
parenthesesIf the RobotAction action is the empty action ()
but there is an AgentAction the rule form:
...
~>
()
++
AgentAction
may be abbreviated to:
...
~+>
AgentAction
A TeleoR program in which every rule uses the ~+>
arrow, and which has no percept
declaration or primitive_action
type definition, is a program for a software agent that communicates with other agents, and perhaps hardware devices, purely by messages routed via Pedro.
Previous: Function Definitions, Up: Programs [Contents][Index]