MAOS: PortalDocumentationSeting & Script Files → Script Format

The documentation for script format is structured into three major parts: Topology, Solver (Behavioral Toolbox), and Predefined Macro Components/Modules.

The scripts actually build relations between knowledge components. Please see document for knowledge components for more information on them and their parameters.

See the setting file "topology.par" for more information about topology instances.

Existing Topologies: Without special notice, all the topology files are located in the dictionary "maosKernel/topology", i.e., they have a same package name "maosKernel.behavior.topology".

The Solver (Behavioral Toolbox) files are located in "solver" setting dictionaries.

Purpose: The solver (behavioral toolbox) script file is used for producing three stochastic search components, i.e., R_INI, R_G, and R_T, as follows.

Script Syntax: The script file contains multiple lines, and is executed one by one from the top to the bottom. The format of each line is: -CMD_FLAG CMD_NAME < CMD_BODY

CMD_FLAG is a flag used for indicating how the line will be parsed; CMD_NAME gives the name of the line; and CMD_BODY provides actual information.

At present, three CMD_FLAG flags are considered:

1) P: indicates a parameter-mapping line. CMD_BODY is represented in the format INN_NAME:INN_PARAM, in which INN_NAME points to the line with a same CMD_NAME name, and INN_PARAM points to the parameter of the line. Then CMD_NAME is an setting parameter of the script file. As a setting parameter in NAME=VALUE provided for the script, then it seeks the setting parameter with CMD_NAME==NAME, and sets VALUE to INN_NAME:INN_PARAM.

2) D: defines an instance of knowledge component. CMD_NAME is the component's name. CMD_BODY is represented in the format COM_NAME:[NAME=VALUE], in which COM_NAME designates to a knowledge component (the whole name of a related JAVA class), and [NAME=VALUE] provides the setting parameters of the component.

3) L: loads a predefined macro component. CMD_NAME is the component's name. CMD_BODY is represented in the format PRE_NAME:[NAME=VALUE], in which PRE_NAME points to a macro component defined in "predefined", and [NAME=VALUE] provides the setting parameters of the component. Moreover, PRE_NAME is represented in the format MCOM_NAME@NCOM_FILE, in which MCOM_FILE specifies the actual file name and MCOM_NAME is the name of the macro component.

For a line in a D or L flag, the VALUE of an parameter can be a component defined in a previous line, and it is represented as &REF_NAME, in which REF_NAME is the name of the component to be used.

The predefined files are located in "predefined" setting dictionaries.

Each predefined file contains multiple sections, in which each section starts with "[SECT_NAME]". Each section contains the script lines for describing a macro component with the name SECT_NAME.

Script Syntax: The script syntax is similar with that of Solver, except for the following differences: 1) it only produces one component, i.e., the component with the name SECT_NAME, accessed by its caller. Thus the CMD_NAME of the final line is exactly equal to the SECT_NAME; 2) the VALUE of an parameter is represented as %INP_NAME, if this parameter is realized from the setting parameter [INP_NAME=VALUE] of a caller. It means both -P lines and lines with %INP_NAME comprises the setting parameters of an predefined component.


Return to homepage

Maintained by AdaptiveBox StUdIo, under a Creative Commons Attribution 3.0 License.