(U1.03.01) Supervisor and command language
Process control: This document describes the role and operation: of the supervisor who ensures the control of an execution of Code_Aster ; and of the process control language which ensures the communication between the user and the code.
The role of the supervisor is to ensure the command of the course of operations in the course of execution of a program. The instructions of execution are generally provided by the user. This requires a formalization of the communications between the code and its owner, it is the process control language.
The language Python is employed to write the catalog of commands, the supervisor and the command files user. For the command files, that makes it possible to discharge the supervisor from the task of syntactic analysis, reserved for Python itself.
A command file is a succession of call to functions Python (commands), defined in the catalog of commands. These functions have arguments of entry: keywords and their contents, and of the arguments of output: product concepts. The user who composes his command file must thus subject himself to the general syntax of Python (parenthesizing, indentation…) and with the rules imposed by the catalog of commands (the provided arguments are coherent with until the function waits).
For a first making of contact with the code, the reader will be able not to approach chapter 2.
2 General mechanism of operation of the supervisor
2.1 Structures general
The concerned basic elements during an execution of an Aster computation are:
- the command file, provided by the user,
- the catalog of commands: it is a modulus python of name catastrophes placed in the package Catastrophes,
- the SUPERVISORY high level object,
- object JDC created by the latter and which is finally carried out.
The SUPERVISORY object is a python object which analyzes the options transmitted on the command line, imports the catalog of commands, created object JDC starting from the command file and carries out this one.
Object JDC (name for Command set) is a python object created by the SUPERVISORY object starting from the text of the command file and of the modulus catalogues commands. It contains the STAGE objects. Object JDC is representative of the command file user.
The STAGE objects are representative of each call to Aster commands in the command file. Each STAGE object of the command is called the name that it reference, the list of the active keywords and their values, the type and after the product concept. Construction then the execution of object JDC start the following actions:
- syntactic command file user analyzes: it is on this level that syntax python is checked (brackets, commas between keywords, indentation…). The detection of an error (SyntaxError Python) causes the stop of the execution of Aster. The first error is fatal: one does not search the following errors,
- construction of the stages: that consists in creating a STAGE object for each call to an Aster command in the command file. This object is recorded at JDC which manages the list of the stages and the related concepts,
- checking of each STAGE: if the call to a command in the file user is incoherent with the catalog of commands, a report is displayed and the execution is stopped on this level. It is the semantic checking,
- execution itself of the commands: for each stage taken in the order, call to high level routine
FORTRAN (op0nnn.f) corresponding.