LAC(ID:8292/)


COnfiguration language for the SLON system

(LAC - Language for Configuration acronym in Russian)


Related languages
SLON => LAC   COnfiguration language for

References:
  • Krasinsky, G.A.; Novikov, F.A.; Scripnichenko, V.I. "Problem Oriented Language for Ephemeris Astronomy and its Realisation in the System ERAProblem Oriented Language for Ephemeris Astronomy and its Realisation in the System ERA" Celestial Mechonics 45: 219-229,1989. view details Extract: General Outline of the System
    General Outline of the System
    Practically any astronomical observational program needs ephemeris calculations either for prediction of the observables or for the aims of slewing. Sometimes these calculations are almost trivial and printed Astronomical Ephemerides may be useful. But as a rule that is not the case and observers are obliged to call for help from specialists in various branches of ephemeris astronomy.
    In many cases the ephemeris software is a real nuisance if one analyses the standard type acknowledgements in astronomical Papers: "we are indebted to Dr. X who has provided us with the ephemerides of Galilean satellites" or "our thanks to Dr. Y for calculations of the lunar occultations". One of the aims of project ERA (Ephemerides for Research in Astronomy) was to satisfy the interests of Users inexperienced in ephemeris astronomy.
    However that was not the single motivation. The system ERA was designed for professional use to facilitate solving the most complicated problems of ephemeris astronomy (calculation of the observables, comparison of the dynamical theories with observations, scheduling observational activities, prediction of astronomical phenomena, and so on). A technology for scientific work in the field of the ephemeris astronomy was worked out.
    Moreover running time operations were included in the system, because one of the intentions was to rnake it appropriate as a kind of operational system for large astronomical instruments, or for instrumental complexes (such as VLBI nets) .
    The core of the system is a problem-oriented language SLON which controls a developed applied program package. According to our experience, any observational program may be easily formulated in terms of the language. After translation, a resulting SLON program is executed making calls to the subroutines from the applied program package. The base units of the language are tables (supplied by names and kept as files) of observations (real or synthesied). In the language there are well developed means to manipulate the tables, combine, modify and keep them.
    Thus, the system consists of three parts:
    1. SLON-processor.
    2. File management system.
    3. Applied program package.
    The User need not know the structure of the applied program package ; he interacts with the package only in terms of the problem-oriented language SLON. The system is intelligent in the sense that there is no predescribed Set of tasks, but any problem formulated in terms of the language may be solved.
    The accuracy of the modelling in the system corresponds to the level of demands from the modern high precision observations (such as VLBI observations). The system ERA includes a specialised database for coordinates of the Earth pole and for differences TAI-UT1. These data are refreshed one time in a year after the BIH Annual Report is issued. As a Standard for lunar and planet ephemerides the tape with DE 200 Chebyshev polynomials is in use, but the planetary theory [51 may be chosen as an option. The DE 200 tape was restructured and enriched by adding polynomials for lunar physical librations and for differences TAITDB due to General Relativity. For dynamical theories of other celestial bodies there are utilities for calculating Chebyshev polynomials according to the interface with the system ERA.
    As the system is comparatively large and rather sophisticated, from the very beginning attention was paid to the principles of the system supporting, mobility, discipline of programming, documentation and testing. In order to facilitate administrating the system and satisfy diverse demands from Users, a special language for description of the desired configuration of the system was realised (LAC - Language for Configuration). The output of the LAC-program is a database, which contains full information on all objects and constructions of the system ERA. This approach is quite effective in unifying the work of many people participating in the project.
    Structural realisation of the system made possible the deep segmentation and as a result restrictions from computer memory are comparatively weak. The running version of the system consists of more than 20000 lines of Pascal and Fortran text and needs 128 Kbytes of core memory (for Soviet BESM-6 computer). This version of the system ERA was at work in summer 1986 and now it is thorougly tested in all its subsystems. The testing is a continuing process because in many cases a special scientific research presents new demands. The correctness of the ephemeris predictions is tested by discussion of observations from very different observational programs - from solar and lunar eclipses to VLBI observations of IRIS program and space probes of VEGA mission (3).
    The ideas of the system evolved during 1983-1985 and at the end of this period they were fully crystallized and fixed. There are three programming efforts which have influenced the system. The main concept of the language has been developed from the ideas of the applied program package MAMONT [I]. The technology and style of the system programming were strongly influenced by works of S-Lavrov and his collaborators on automatic program synthesis [2,3J. The file management system has its origin in [ 4 ] .
    Extract: The Language Slon: Informal Description - Variables
    The Language Slon: Informal Description - Variables
    The User of the system ERA formulates his observational program in terms of more or less convenient astronomical notation.
    For instance, he must choose OBJECT from a Set of permissible values (SUN, MOON, MERCURY, ... ) , indicate TYPE-OF-OBSERVATION from (SPHERICAL, RANGING, INTERFEROMETRY, ... ) and so On. Any variable is characterized by its type (in the sense of the type conception of program languages) . The types of the CLON variables may be: 1. Integer, 2. Real, 3. Double precision, 4. String, 5. Double string, 6. Literal (for instance, the type OBJECT) and 7. Boolean.
    SLON-translator makes strong type checking. The most usable variables for the running version of the System are:
    1. Double precision: DATE, APPROXIMATION
    2. Real: LONGITUDE, LATITUDE, ALTITUDE, PX, PY, X-POLE, Y-POLE, UT1-TAI, TAI-UTC, ALPHA, DELTA, MU - ALPHA, MU DELTA, PARALLAX, X - CRATE, Y-CRATE, Z-CRATE, LIMB-R, LI-F, EPOCH, EQUINOXY, REFRACTION, CX, CY, 0-CX, 0-CY, DX, DY, STEPOF-ITERAT IONS, EQUINOX-OF-CATALOG, T, P, X, Y, Z
    3. Integer: SUBTYPE, N-OF-ITERATION, N-OF-STAR, N, PARAMETER-FIXED,
    4. Literal: TYPE-OFOBSERVATION, COORDINATES, OBSERVER, OBJECT, TIME-SCALE I SYSTEM, CHANGING
    5. Double string: OBSERVATORY, NAMEOF - STAR, COMMENT
    6. Boolean: FLAG
    String-type variables are presented in SLON-program as an arbitrary text bracketed by the symbol " (for instance, as "WASHINGTON") . The text is cut from right side to 6 (12) symbols for Single (double) strings. The values of boolean variables are the symbols YES and NO.
    The values of literal type variables are given by the following list:
    TYPE-OF-OBSERVATIONS:
    SPHERICAL, RANGING, TIMING, INTERFEROMETRY,
    DIFFERENTIAL, ANGULAR-DISTANCE, PHASE, ECLIPSES
    COORDINATES:
    EQUATORIAL, HORIZONTAL, HOUR - ANGLE,
    ECLIPTICAL, GALACTICAL
    T 1-SCALE :
    UTC, ET, UT1, TA1
    SYSTEM:
    FK4, FK5, FK4FK5
    OBJECT :
    SUN, MOON, MERCURY, VENUS, MARS, JUPITER, SATURN, URANUS,
    NEPTUNE, PLUTO, STAR, PLANET VENUS-SATELLIT LUNAR-S ATE LLI
    TE, EARTH-SATELLITE, MARS-SATELLITE, PHOBOS, DEIMOS, 10,
    EUROPE, GANIMED, CRATE, PROBE
    OBSERVER :
    TOPOCENTRIC, BARYCENTRIC
    CHANGING :
    INCREASE, DECREASE
    To complete this description it is necessary to include into the list of the values for the type OBSERVER the Set SUN-CENTERED, MOON-CENTERED and so On (any OBJECT may be used as a prefix apart of STAR). Similarly, for the type COORDINATES the values SUN - CENTRIC, MOON-CENTRIC and so on have to be added.
    In many cases in the process of observing, more than one object or observer are involved. To describe such complex observations two additional series of variables are constructed adding the postfix 1 or 2 to any variable. For instance, there exist variables DATE-1, DATE - 2 and OBJECT-1, OBJECT-2. Extract: The Language Slon: Informal Description - Semantics of the variables
    The Language Slon: Informal Description - Semantics of the variables
    Any observation is determined by assigning concrete values to the SLON-variables. Corresponding observables may be calculated by a special operation COMPUTE with results assigned to the variables CX, 0-CX (for the first Parameter observed) and to CY, 0-CY (for the second one). For correct calculation of the residials 0-CX, 0-CY, observed values are to be placed into OX, OY. In order to indicate that some variables are to be computed, before application of COMPUTE a special symbol * must be assigned to them. If symbol * is assigned to another variable than CX, CY, 0-CX, 0-CY, then an indirect ephemeris task arises. The system checks whether the task is meaningful and solves it by iterations. Variables STEP-OF-ITERATIONS, N-OF-ITERATIONS, APPROXIMATION, CHANGING rule the process of iteration and the variable PARAMETER FIXED indicates either CX or CY has the desirable constant ialue of the observable for the indirect task.
    Meaning of the observables is determined mainly by values of the variables TYPE-OF-OBSERVATIONS and SUBTYPE. In brief the meaning is:
    SPHERICAL. Calculation of the longitude and latitude in the coordinate frame determined by the variable COORDINATES. If
    SUBTYPE is equal to 1 then it is the latitude of the object that is calculated else - the colatitude. The system of reductions and values of the astronomical constants are determined by the variable SYSTEM. By a default convention the calculated coordinates are apparent ones but, if EQUINOXY is not equal to zero, they are the mean coordinates for the date of EQUINOXY.
    ANGULAR DISTANCE. Calculation of the angular distance and positional angle between OBJECT and OBJECT-1. In dependency on
    SUBTYPE not only the angular distance D between the Centers but a number of linear combinations between the distance and visible radii r and rl of the celestial bodies are calculated according to the table:
    SUBTYPE
    1
    2
    3
    4
    5
    6
    observable
    D
    D - rl
    D - r
    D - r -rl
    D + r -rl
    D + R +rl
    DIFFERENTIAL. Calculation of spherical coordinate differences of the bodies OBJECT-1 and OBJECT.
    RANGING. Calculation of the time delay and Doppler shift. If time
    of observation corresponds to reception of the Signal, then
    SYBTYPE is equal to 1, if it is a time of shooting then to 2.
    INTERFEROMETRY.Calculation of the time delay and fringe frequency
    if SUBTYPE is equal to 1 and the space frequencies otherwise.
    TIMING. Calculation of the time correction to the observed
    arrival time (i.e. reduction to the barycenter of Solar system).
    The second observable is the time derivative of the first one.
    PHASE. Calculation of the angle D between directions OBJECTOBSERVER
    and OBJECT-OBJECT-1. The observables are linear
    combinations of D, the apparent radius r of the body OBJECT-1, and
    rl of the Earth (for the observer on the body OBJECT). They are
    calculated according t o t h e value of SUBTYPE by the Same way as
    for the value ANGULAR-DISTANCE.
    ECLIPSIS. Calculation of angular distances between directions
    OBJECT-OBJECT-1 and OBJECT-OBJECT-2.
    If the value of OBSERVER is TOPOCENTRIC, then coordinates of
    the observatory may be presented either as the geodetic LONGITUDE,
    LATITUDE and ALTITUDE or as the geocentric LONGITUDE, equatorial
    projection PX, polar projection PY., The three later variables
    having the higher priority.
    The system automatically makes all reductions of the
    coordinates and times due to the Earth rotation irregularities
    according to BIH data and in correspondence with the value of
    TIME-SCALE. If BIH data are not yet available, then the User may
    introduce his own data by assigning "by handw the numerical values
    to t h e variables X-POLE, Y-POLE, TA1 - UTC, UT1 - TAI.
    Star coordinates are described by a set of parameters;
    ALPHA, DELTA, %ALPHA, K D E L T A , PARALLAX, EPOCH,
    EQUINOXY-OF-CATALOG, RADIAL-VELOCITY.
    It is possible to calculate observables for any points on the
    surface of the object. The User has to assign the values to polar
    coordinates LIMB-R and LIMB-F of t h e point on the l i m b . The
    radial coordinate LIMB-R must be presented i n units of the
    apparent radius of the planet and the polar coordinate LIMB-F is
    supposed to be in the coordinate frame determined by the variable
    COORDINATES.
    If one would like to calculate observables for the point on
    the surface of the planet, then numerical values are to be
    assigned to the variables X-CRATE, Y-CRATE and Z-CRATE. By this
    way the coordinates of the point are fixed in the standard
    coordinate frame with its origin in the barycenter of the central
    planet.
    No need to assign values to all the variables. It is quite
    essential that there exists a default convention supported by LAC
    description of the system. The default values of the literal type
    variables are the first ones in the corresponding lists given
    above .
    Extract: The Language Slon: Informal Description - Tables and presentation of variables
    The Language Slon: Informal Description -  Tables and presentation of variables.
    Due to the default convention it is possible to consider that
    after assigning the values to any subset of variables some
    observation is detedned and thus an "elementaryn ephemeris task
    arises. The most characteristic feature of the language is the
    advanced means for describing a flow of the elementary tasks which
    in the whole may correspond to a rather complicated observational
    program. The simplest way to describe such a flow is to introduce
    a table which contains the values of the variables for each task
    i n every row. These values will be referred to as a "Tuple." The
    head of the table determines the names of the corresponding SLONvariables.
    This table may be supplied by a name. For instance,
    the SLON Operator
    EXAMPLE :=//OBJECT, DATE, cx /
    SUN, 2442000.5D, * /
    MOON, - I * //;
    determines a t a b l e EXAMPLE which is kept for one run of the
    program (the postfix "Dn marks the double precision numbers). In
    order t o save the table, the symbol of assigning <= ("arrow") must
    be used instead of the symbol :=. The symbol "*" indicates t h a t
    the variable CX is unknown; the symbol "-V stands for the default
    values (for DATE that is JD 24442000.5) .
    The internal presentation of the variable as a rule differs
    from the external one (in the SLON-program presentation) and the
    User may choose a System of units which is the most adequate to
    his problem. For instance, if the calendar dates are preferable,
    then the table EXAMPLE may be presented in the form:
    EXAMPLE : =/ /OBJECT, CALEND (DATE) , CX/
    SUN, 19720101.0Df * /
    MOON , - I * //;
    Extract: The Language Slon: Informal Description - Algebra of tables
    The Language Slon: Informal Description -  Algebra of tables
    Any table may be presented in SLON-program by three ways:
    1. By explicit denotations of all its tuples (see 2.3).
    2. By reference to the name of a table determined earlier.
    3. By a program which consequently gets all tuples according to a "table expression".
    Table expressions are constructed by special operations "addition" and "multiplication, which operate tables as their arguments. Thus, an algebra arises and SLON-operators have the form of table polynomials. Let us describe this algebra.

    1. Addition of tables. The sum A+B of the t a b l e A (with n tuples) and B (with m tuples) is a t a b l e constructed according t o the rules:
    a) Headline of the sum A+B consists both of names of variables i n A and B.
    b) The tuples of the sum are n tuples of A and m tuples of B. Missing values are Set by the default convention.
    2. Multiplication of tables. The table A*B is a result of multiplying the table A and B. The operation is meaningful if no common variables are present in A and B. Just as for addition, the headline unites names of variables in A and B. Tuples of the product (in number n*m) are obtained by consequent joining every tuple of A with all tuples of B. For instance, the table EXAMPLE may be presented as a sum: or as a product:
    From this example, it is clear that the operation "multiplication" makes it possible to factorize the tables with regular structure and to save the place and efforts while determining the tables.
    3. Iteration of a table. Instead of adding the table several times, one may use the operation of "iteration" (multiplying the table by an integer constant). For instance: A+A+A is equivalent to 3A.

    Extract: The Language Slon: Informal Description - Actors
    The Language Slon: Informal Description -  Actors
    Any table may be accompanied by "actors" which work on every tuple and either transform the values of the variables or simply have some side effects (for instance, they may print the values or calculate observables). For calculation of observables the actor COMPUTE which incorporates all subroutines from the applied program package was realized. For output of results the actors PRINT or SCREEN OUTPUT may be used. Let us consider a SLON operator which refers to the table EXAMPLE determined above: := EXAMPLE COMPUTE PRINT ( CALEND (DATA) , OBJECT, HMS (CX) ); In this case the resulting table is rewritten not to another one but "into air". Result of the work of the operator is a printed listing which consists of the headline of the table EXAMPLE and its tuples. The actor COMPUTE has assigned to the variable CX the value calculated according to the meaning of the ephemeris task. Namely, it is the apparent right ascensions CX of the Sun and the Moon for JD 2442000.5 that is calculated (by the default convention the TYPEOFOBSERVATION is SPHERICAL, the COORDINATES are EQUATORIAL and so on).
    This example demonstrates that the function-transformers may be applied to Parameters of actors. The interpretation in this case depends on the concrete actor. For PRINT these functions transform internal representation of the variables into an external one according to the chosen system of units (calendar data for DATE and hours, minutes, seconds for right ascension CX).
    There are four embedded (built-in) actors of projection and selection having the form:
    ONLY (list of the variables)
    (rejection of colurnns of the table, which are not in the list).
    EXCEPT (list of the variables)
    (rejection of colurnns of the table from the list) .
    IF (boolean expression)
    (rejection of tuples for the value NO of the boolean expression) .
    IF-NOT (boolean expression)
    (rejection of tuples for the value YES of the boolean expression) .
    Boolean expressions are constructed in the usual way from variables and their values by means of logical relations ">" ,
    11<111 I
    11 <>I1 IIORW , IINOTll , WAND 11 I .
    As operands of the boolean expressions, the algebraic expressions involving SLON variables are allowed. Moreover, all Sets of elementary functions as well as the function-transformers mentioned above may be used. For instance
    : =EXAMPLE IF ( DATE > CALEND ( 1972 0 1 0 1 . 0 ) AND OBJECT=MOON) ;
    Besides the one-argument elementary functions and function transformers, there exist "function-constants" without any arguments. They give the values of the most usable constants (value PI, light interval TAU, astronomical unit AU and so on). One such function of special interest is the function "I" which gives the running number of the corresponding tuple. Users may construct their own actors and include them in the system of LAC program. For any actors in addition to the four embedded ones, it is possible to organize conditional calls by the indicator ON with a boolean expression. For instance:
    :=EXAMPLE COMPUTE ON (OBJECT=SUN);
    In order to call actors only on the last tuple of the table, one may use the indicator ON-END - all actors after this indicator work only at the end of the table.
    Now we give the list of the actors which were realised by May 1988. Parameters of the actors are either a list of names of variables or expressions (arithmetical or logical). Strong type checking is guaranteed. If the list of names is not a Single parameter, then this list must be bracketed.
    Table 2. List of the actors
    Actors and their parameters semantics
    -
    COMPUTE
    PRINT( )
    SCREEN - INPUT ( )
    SCREEN-OUTPUT( )
    CHANGE ( [ I ,
    PLOT ( ,
    [ 1,
    ,
    ,
    ,
    ,
    )
    PLOT-OUTPUT ( )
    SAVE ( )
    RESTORE ( < l i s t > )
    PARTIALS (
    PARTIAL-OUTPUT
    SURFACE( )
    TIME ( )
    PAUSE ( )
    Calculation of the observables
    Printing
    Input from the screen for the interactive work
    Output from the screen ) Assigning the value of the second parameter to the variables from the list
    The first parameter - number of the plot, the first two elements in the list -the variables to be plotted (abscissa and ordinate), the four double variables - the boundaries; the string is a symbol for drawning.
    Output of the picture formed by consequent application of PLOT. The integer is a number of the plot. Saving one tuple in an internal memory.
    Restoring from the internal results which have been saved by SAVE) Calculation of partials and saving them in the file with name given by the string parameter.
    Output of the partials.
    Calculation of the height on the apparent limb of celestial bodies with polar LIMB-F and LIMB-R coordinates. (Mars, Venus and lunar marginal zone)
    Running time (Julian date) from a timer is assigned to the first element of the list
    Pause in sec. in real time calculations

    Extract: The Language Slon: Informal Description - Loops
    The Language Slon: Informal Description -  Loops
    Making use of the iterators of tables, the actor CHANGE and
    the function "I" ( which gives the sequence number of the tuple)
    one may construct the table with arbitrary complex cyclic
    structure. For instance, the operator
    DATA : = ( ~ o O / / D A T E / ~ ~ ~ ~ O O O . ~ / / )
    CHANGE( [DATE], DATE+(I-1)*2 ) :
    has the result that the table DATA, which consists of 100 tuples,
    the values of DATE increase with the step 2.