Home

Products

Documentation

Download

Support

 

Documentation

Language Specification - Detectable (DET) - Semantics


Prev

Description

Syntax

Semantics

Next


When

For each detectable needs to be specified when the agent or object can detect a certain fact. There are two options:

whenever:

This means that the detectable is checked every time a new fact is asserted in the world and for an agent also every time a new belief is asserted.

at a specified time:

For the detectable needs to be specified exactly when the detectable needs to be checked by specifying a percentage varying from 0 to 100% specifying at what percentage of the workframe completion the detectable needs to check the fact set and belief set. These kind of detectables are only checked once.

< Class Variable >

Agents and objects do not always have the ability to know in advance about what concepts they can detect facts. To allow these agents and objects to detect facts about unknown concepts it is possible to define the class of concepts for which facts need to be detected. On the left hand side of the detectable condition instead of specifying the name of a variable, parameter or concept instance (agent, object, conceptual object, or area) the class of concept is specified in between the brackets < and > such as <BaseGroup>. This will have the agent or object detect all facts of which the left hand side concept instance is an instance of the specified class or an instance of any of its sub classes. The matches can be restricted by specifying a more specific class in the detectable condition. The agent or object will in that case only detect those instances that are instances of that class or any of its subclasses, but not any of its superclasses, even if the superclass defines that attribute and facts for concept instances of that super class exist. A bracketed class name may also be used on the right hand side of a detectable condition to indicate that, in the belief matching step, beliefs may have any right hand side concept that is an instance of that class or any of its subclasses.

Wildcard

A wildcard character, ‘?’, may be used on the right-hand side of a detectable condition to indicate that the right-hand side value or object of a matching fact (in step one) or a matching belief (in step 2) is ignored. Normally, this may be stated more directly by simply omitting the operator and right-hand side of a value comparison or by omitting the right-hand side object of a relation comparison. However, the wildcard may occasionally be useful in a relation comparison together with ‘is false’ or ‘is unknown’ to match beliefs with truth values other than ‘true’.

Detect-certainty

The detect-certainty is a number ranging from 0 to 100 and represents the percentage of chance that a fact will be detected based on the detectable. A detect-certainty of 0% means that the fact will never be detected and basically means that the detectable is switched off. A detect-certainty of 100% means that a fact will always be detected based on the detectable.

Detectable action

There are 5 different detectable actions possible:

continue:

Has no effect, only used for having agents or object detect facts and turn them into beliefs.

impasse:

Impasses the workframe on which the agent or object is working until the impasse is resolved.

abort:

Terminates the workframe on which the agent or object is working immediately.

complete:

Terminates the workframe on which the agent or object is working immediately, but still executes all remaining consequences defined in the workframe. All remaining activities are skipped.

end_activity:

This action type is only meaning full when used with composite activities. Causes the composite activity on which the agent or object is working to be ended.

Defaults

  • when = whenever
  • dc = 100
  • action = continue

Constraints

  1. In the comparison the left hand side attribute type and the right hand side value-type or right hand side attribute type of a value-expression must be the same. Object-attribute-index is considered type compatible with any type and is permitted on both the left and right hand side. For detectables the right hand side is ignored and therefore no errors or warnings will ever be generated even if the right hand side resolves to a value that is type incompatible with the left hand side. However for the trigger the right hand side is relevant and if the value resulting from evaluating the right hand side is type incompatible with the left hand side a warning is generated in the log and the detectable action is not executed.

  2. In the comparison the left hand side and right hand side types in a relational expression must match the types as defined for the relation used in the relational expression.

  3. ID.name when used as the left hand side concept must be the name of a concept class, i.e. a group, class, conceptual class or area definition.

  4. The value of the detect-certainty ranges from 0 to 100 and represents a percentage.

  5. The end-activity action type can only be used when a detectable is defined in a composite activity.

 


Questions or problems regarding this web site should be directed to the Webmaster.
Copyright © 2000-2009 NASA Ames Research Center. All rights reserved.
Last modified: Tuesday May 19, 2009.