-
Notifications
You must be signed in to change notification settings - Fork 3
Deterministic Instructions
All imperative code is either executable (possible) or not, and once it has started executing, it may fail.
{
IMPERATIVE_STATEMENT
[IMPERATIVE_STATEMENT ...]
}
Execute each IMPERATIVE_STATEMENT
in succession.
Fails: When one of its elements fails.
Possible: Iff the first element is possible.
while (BOOLEAN_EXPRESSION)
IMPERATIVE_STATEMENT
Fails: When IMPERATIVE_STATEMENT
fails.
Possible: Iff BOOLEAN_EXPRESSION
is false or IMPERATIVE_STATEMENT
is possible.
if (BOOLEAN_EXPRESSION)
IMPERATIVE_STATEMENT
[ else
IMPERATIVE_STATEMENT ]
Fails: When the executed IMPERATIVE_STATEMENT
fails.
Possible: Iff according to the BOOLEAN_EXPRESSION
the respective IMPERATIVE_STATEMENT
is possible.
test(BOOLEAN_EXPRESSION);
Block until some condition holds.
Fails: Never.
Possible: Iff BOOLEAN_EXPRESSION
evaluates to true
in the current situation.
concurrent {
IMPERATIVE_STATEMENT
[ IMPERATIVE_STATEMENT ... ]
}
Execute multiple imperative branches in parallel.
Caution: Concurrent execution is currently undefined during planning. Thus it should not be placed anywhere under a solve statement.
Fails: When all of the IMPERATIVE_STATEMENT
s have failed.
Possible: Iff at least one IMPERATIVE_STATEMENT
is possible.
solve (HORIZON, REWARD_FUNC)
IMPERATIVE_CODE
Find the executable (possible) choice for all nondeterminisms within IMPERATIVE_CODE
that results in the highest cumulative reward from REWARD_FUNC
.
The search depth is limited to HORIZON
primitive actions.
Caution: Note that both the start and the end of a durative action count as one primitive action.
See Action execution.