lib/create_standard_function_txt.sh
author laurent
Thu, 08 Sep 2011 20:25:00 +0200
changeset 375 7a11f9e9e703
parent 351 e7d236750709
child 385 450d684013dc
permissions -rwxr-xr-x
Merge with 01068ccb73b202b2872d4117ad01984bac956cbb
351
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     1
#!/bin/sh 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     2
#
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     3
# copyright 2011 Mario de Sousa (msousa@fe.up.pt)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     4
#
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     5
# Offered to the public under the terms of the GNU Lesser General Public
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     6
# License as published by the Free Software Foundation; either version 2
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     7
# of the License, or (at your option) any later version.
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     8
#
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     9
# This program is distributed in the hope that it will be useful, but
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    10
# WITHOUT ANY WARRANTY; without even the implied warranty of
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    12
# General Public License for more details.
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    13
#
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    14
# This code is made available on the understanding that it will not be
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    15
# used in safety-critical situations without a full and competent review.
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    16
#
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    17
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    18
echo "(************************************************)"
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    19
echo "(************************************************)"
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    20
echo "(***                                          ***)"
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    21
echo "(***    The IEC 61131-3 standard functions    ***)"
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    22
echo "(***                                          ***)"
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    23
echo "(***    Auto-generated file. Do not edit!     ***)"
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    24
echo "(***                                          ***)"
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    25
echo "(************************************************)"
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    26
echo "(************************************************)"
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    27
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    28
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    29
echo "{disable code generation}"
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    30
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    31
# Lets parse this file with the C pre-processor!
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    32
#cpp <<"END" | sed "s/ FUNCTION/\nFUNCTION/g" | grep -v '#'
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    33
# We usee gcc -E instead, as it seems cpp on OSX works differently! However, it needs an input file parameter...
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    34
#gcc -E <<"END" | sed "s/ FUNCTION/\nFUNCTION/g" | grep -v '#'
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    35
cpp <<"END" | sed "s/ FUNCTION/\nFUNCTION/g" | grep -v '#'
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    36
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    37
#define __DEFINE_CLASHING_FUNCTIONS 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    38
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    39
/* Macro that expand to subtypes */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    40
#define __ANY(DO)                 __ANY_DERIVED(DO) __ANY_ELEMENTARY(DO)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    41
#define __ANY_DERIVED(DO)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    42
#define __ANY_ELEMENTARY(DO)      __ANY_MAGNITUDE(DO) __ANY_BIT(DO) __ANY_STRING(DO) __ANY_DATE(DO)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    43
#define __ANY_MAGNITUDE(DO)       __ANY_NUM(DO) DO(TIME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    44
#define __ANY_BIT(DO)             __ANY_NBIT(DO) DO(BOOL)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    45
#define __ANY_NBIT(DO)            DO(BYTE) DO(WORD) DO(DWORD) DO(LWORD)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    46
#define __ANY_STRING(DO)          DO(STRING)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    47
#define __ANY_DATE(DO)            DO(DATE) DO(TOD) DO(DT)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    48
#define __ANY_NUM(DO)             __ANY_REAL(DO) __ANY_INT(DO)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    49
#define __ANY_REAL(DO)            DO(REAL) DO(LREAL)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    50
#define __ANY_INT(DO)             __ANY_SINT(DO) __ANY_UINT(DO)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    51
#define __ANY_SINT(DO)            DO(SINT) DO(INT) DO(DINT) DO(LINT)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    52
#define __ANY_UINT(DO)            DO(USINT) DO(UINT) DO(UDINT) DO(ULINT)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    53
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    54
#define __ANY_1(DO,P1)            __ANY_DERIVED_1(DO,P1) __ANY_ELEMENTARY_1(DO,P1)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    55
#define __ANY_DERIVED_1(DO,P1)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    56
#define __ANY_ELEMENTARY_1(DO,P1) __ANY_MAGNITUDE_1(DO,P1) __ANY_BIT_1(DO,P1) __ANY_STRING_1(DO,P1) __ANY_DATE_1(DO,P1)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    57
#define __ANY_MAGNITUDE_1(DO,P1)  __ANY_NUM_1(DO,P1) DO(TIME,P1)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    58
#define __ANY_BIT_1(DO,P1)        __ANY_NBIT_1(DO,P1) DO(BOOL,P1)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    59
#define __ANY_NBIT_1(DO,P1)       DO(BYTE,P1) DO(WORD,P1) DO(DWORD,P1) DO(LWORD,P1)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    60
#define __ANY_STRING_1(DO,P1)     DO(STRING,P1)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    61
#define __ANY_DATE_1(DO,P1)       DO(DATE,P1) DO(TOD,P1) DO(DT,P1)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    62
#define __ANY_NUM_1(DO,P1)        __ANY_REAL_1(DO,P1) __ANY_INT_1(DO,P1)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    63
#define __ANY_REAL_1(DO,P1)       DO(REAL,P1) DO(LREAL,P1)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    64
#define __ANY_INT_1(DO,P1)        __ANY_SINT_1(DO,P1) __ANY_UINT_1(DO,P1)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    65
#define __ANY_SINT_1(DO,P1)       DO(SINT,P1) DO(INT,P1) DO(DINT,P1) DO(LINT,P1)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    66
#define __ANY_UINT_1(DO,P1)       DO(USINT,P1) DO(UINT,P1) DO(UDINT,P1) DO(ULINT,P1)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    67
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    68
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    69
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    70
/*****************************************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    71
/*****************************************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    72
/*****                                                       *****/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    73
/*****                 IEC 61131-3                           *****/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    74
/*****      S T A N D A R D     F U N C T I O N S            *****/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    75
/*****                                                       *****/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    76
/*****************************************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    77
/*****************************************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    78
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    79
/* NOTE: We only define and declare the explicitly typed standard functions
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    80
 *       (e.g., SIN_REAL, SIN_LREAL, ..., ADD_SINT, ADD_INT, ADD_LINT, ...)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    81
 *       We do not declare/define the overloaded functions
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    82
 *       (SIN, ADD, ...). 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    83
 *       When handling a call to an overloaded function, the iec2c compiler 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    84
 *       will determine in stage3 the data type of the parameter being passed, 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    85
 *       and in stage4 generate the C code to call the correct
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    86
 *       typed standard function.
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    87
 */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    88
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    89
/* NOTE on explicit typing of:
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    90
 *           - Table 25 - Standard bit shift functions
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    91
 *           - Table 29 - Character string Functions
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    92
 *
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    93
 *  In section 2.5.1.4 (Typing, overloading, and type conversion) of the IEC 61131-3 (version 2)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    94
 *  of the standard, it is stated:
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    95
 * "A standard function, [...] is said to be overloaded when it
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    96
 * can operate on input data elements of various types within a generic type designator as defined in
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    97
 * 2.3.2. For instance, an overloaded addition function on generic type ANY_NUM can operate on data
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    98
 * of types LREAL, REAL, DINT, INT, and SINT."
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    99
 * [...]
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   100
 * "When a function which normally represents an overloaded operator is to be typed, i.e., the types
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   101
 * of its inputs and outputs restricted to a particular elementary or derived data type as defined in
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   102
 * 2.3, this shall be done by appending an "underline" character followed by the required type, as
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   103
 * shown in table 21."
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   104
 *
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   105
 * However, this explanation (as well as the example in table 21) only refers to functions where the same
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   106
 * generic data type is used for the single input and the output parameter.
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   107
 * How can we create explicitly types functions when this is not the case?
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   108
 * It does not seem to be covered by the standard.
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   109
 *
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   110
 * For this reason, we do not define the LEN_SINT, LEN_INT, LEN_STRING, LEN_[ANY_INT], LEN_[ANY_STRING] functions...
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   111
 */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   112
 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   113
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   114
/*****************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   115
/*****************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   116
/*  2.5.1.5.1 Type Conversion Functions  */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   117
/*****************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   118
/*****************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   119
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   120
/* macros for non-extensible functions */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   121
#define __function_1p(fname,to_TYPENAME,p1_NAME,p1_TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   122
FUNCTION fname : to_TYPENAME\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   123
  VAR_INPUT p1_NAME : p1_TYPENAME; END_VAR\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   124
  RETURN; \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   125
END_FUNCTION\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   126
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   127
#define __function_2p(fname,to_TYPENAME,p1_NAME,p1_TYPENAME,p2_NAME,p2_TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   128
FUNCTION fname : to_TYPENAME\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   129
  VAR_INPUT p1_NAME : p1_TYPENAME; p2_NAME : p2_TYPENAME; END_VAR\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   130
  RETURN; \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   131
END_FUNCTION\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   132
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   133
#define __function_3p(fname,to_TYPENAME,p1_NAME,p1_TYPENAME,p2_NAME,p2_TYPENAME,p3_NAME,p3_TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   134
FUNCTION fname : to_TYPENAME\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   135
  VAR_INPUT p1_NAME : p1_TYPENAME; p2_NAME : p2_TYPENAME; p3_NAME : p3_TYPENAME; END_VAR\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   136
  RETURN; \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   137
END_FUNCTION\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   138
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   139
#define __function_4p(fname,to_TYPENAME,p1_NAME,p1_TYPENAME,p2_NAME,p2_TYPENAME,p3_NAME,p3_TYPENAME,p4_NAME,p4_TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   140
FUNCTION fname : to_TYPENAME\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   141
  VAR_INPUT p1_NAME : p1_TYPENAME; p2_NAME : p2_TYPENAME; p3_NAME : p3_TYPENAME; p4_NAME : p4_TYPENAME; END_VAR\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   142
  RETURN; \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   143
END_FUNCTION\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   144
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   145
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   146
/* macro for extensible functions */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   147
#define __function_1e(fname,to_TYPENAME,p1_NAME,p1_TYPENAME, FIRST_INDEX) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   148
FUNCTION fname : to_TYPENAME\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   149
  VAR_INPUT p1_NAME FIRST_INDEX .. : p1_TYPENAME; END_VAR\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   150
  RETURN; \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   151
END_FUNCTION\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   152
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   153
#define __function_2e(fname,to_TYPENAME,p1_NAME,p1_TYPENAME,p2_NAME,p2_TYPENAME, FIRST_INDEX) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   154
FUNCTION fname : to_TYPENAME\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   155
  VAR_INPUT p1_NAME : p1_TYPENAME; p2_NAME FIRST_INDEX .. : p2_TYPENAME; END_VAR\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   156
  RETURN; \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   157
END_FUNCTION\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   158
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   159
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   160
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   161
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   162
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   163
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   164
#define __to_anynum_(from_TYPENAME)   __ANY_NUM_1(__iec_,from_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   165
#define __to_anyint_(from_TYPENAME)   __ANY_INT_1(__iec_,from_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   166
#define __to_anybit_(from_TYPENAME)   __ANY_BIT_1(__iec_,from_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   167
#define __to_anynbit_(from_TYPENAME) __ANY_NBIT_1(__iec_,from_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   168
#define __to_anysint_(from_TYPENAME) __ANY_SINT_1(__iec_,from_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   169
#define __to_anyuint_(from_TYPENAME) __ANY_UINT_1(__iec_,from_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   170
#define __to_anyreal_(from_TYPENAME) __ANY_REAL_1(__iec_,from_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   171
#define __to_anydate_(from_TYPENAME) __ANY_DATE_1(__iec_,from_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   172
#define __to_time_(from_TYPENAME)    __iec_(TIME,from_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   173
#define __to_string_(from_TYPENAME)  __iec_(STRING,from_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   174
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   175
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   176
/*****************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   177
/*   *_TO_**     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   178
/*****************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   179
#define __iec_(to_TYPENAME,from_TYPENAME) __function_1p(from_TYPENAME##_TO_##to_TYPENAME, to_TYPENAME, IN, from_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   180
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   181
/******** [ANY_BIT]_TO_[ANY_NUM | ANY_BIT]   ************/ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   182
__ANY_BIT(__to_anynum_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   183
__ANY_BIT(__to_anybit_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   184
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   185
/******** [ANY_NUM]_TO_[ANY_NUM | ANY_BIT]   ************/ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   186
__ANY_NUM(__to_anynum_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   187
__ANY_NUM(__to_anybit_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   188
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   189
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   190
/******** [ANY_BIT | ANY_NUM]_TO_[TIME | ANY_DATE]   ************/ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   191
__ANY_BIT(__to_time_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   192
__ANY_NUM(__to_time_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   193
__ANY_BIT(__to_anydate_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   194
__ANY_NUM(__to_anydate_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   195
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   196
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   197
/******** [TIME | ANY_DATE]_TO_[ANY_BIT | ANY_NUM]   ************/ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   198
__to_anynum_(TIME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   199
__to_anybit_(TIME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   200
__ANY_DATE(__to_anynum_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   201
__ANY_DATE(__to_anybit_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   202
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   203
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   204
/******** [ANY_DATE]_TO_[ANY_DATE | TIME]   ************/ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   205
/* Not supported: DT_TO_TIME */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   206
/*__iec_(to_TYPENAME,from_TYPENAME)*/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   207
__iec_(DATE,DT)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   208
__iec_(DT,DT)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   209
__iec_(TOD,DT)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   210
/* Not supported: DATE_TO_TIME */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   211
__iec_(DATE,DATE)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   212
/* Not supported: DATE_TO_DT */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   213
/* Not supported: DATE_TO_TOD */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   214
/* Not supported: TOD_TO_TIME */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   215
/* Not supported: TOD_TO_DATE */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   216
/* Not supported: TOD_TO_DT */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   217
__iec_(TOD,TOD)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   218
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   219
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   220
/******** TIME_TO_[ANY_DATE]   ************/ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   221
/* Not supported: TIME_TO_DATE */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   222
/* Not supported: TIME_TO_DT */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   223
/* Not supported: TIME_TO_TOD */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   224
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   225
/******** TIME_TO_TIME   ************/ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   226
__iec_(TIME,TIME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   227
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   228
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   229
/******** [ANY_BIT]_TO_STRING   ************/ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   230
__ANY_BIT(__to_string_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   231
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   232
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   233
/******** [ANY_NUM]_TO_STRING   ************/ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   234
__ANY_NUM(__to_string_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   235
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   236
/******** [ANY_DATE]_TO_STRING   ************/ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   237
__ANY_DATE(__to_string_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   238
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   239
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   240
/******** TIME_TO_STRING   ************/ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   241
__iec_(STRING,TIME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   242
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   243
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   244
/******** STRING_TO_[ANY_BIT]   ************/ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   245
__to_anybit_(STRING)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   246
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   247
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   248
/******** STRING_TO_[ANY_NUM]   ************/ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   249
__to_anynum_(STRING)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   250
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   251
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   252
/******** STRING_TO_[ANY_DATE]   ************/ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   253
__to_anydate_(STRING)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   254
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   255
                                   
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   256
/******** STRING_TO_TIME   ************/ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   257
__iec_(TIME,STRING)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   258
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   259
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   260
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   261
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   262
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   263
/**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   264
/*   TRUNC    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   265
/**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   266
/* overloaded function! */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   267
#define __iec_(to_TYPENAME,from_TYPENAME) __function_1p(TRUNC, to_TYPENAME, IN, from_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   268
__ANY_REAL(__to_anyint_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   269
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   270
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   271
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   272
/*******************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   273
/*   *_TO_BCD_*    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   274
/*******************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   275
#define __iec_(to_TYPENAME,from_TYPENAME) __function_1p(from_TYPENAME##_TO_BCD_##to_TYPENAME, to_TYPENAME, IN, from_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   276
__ANY_UINT(__to_anynbit_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   277
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   278
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   279
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   280
/*******************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   281
/*   *_BCD_TO_*    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   282
/*******************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   283
#define __iec_(to_TYPENAME,from_TYPENAME) __function_1p(from_TYPENAME##_BCD_TO_##to_TYPENAME, to_TYPENAME, IN, from_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   284
__ANY_NBIT(__to_anyuint_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   285
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   286
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   287
/***********************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   288
/***********************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   289
/*  2.5.1.5.2 Numerical Functions  */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   290
/***********************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   291
/***********************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   292
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   293
/******************************************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   294
/***   Table 23 - Standard functions of one numeric variable    ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   295
/******************************************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   296
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   297
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   298
  /*    ABS     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   299
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   300
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   301
__function_1p(ABS_##TYPENAME, TYPENAME, IN, TYPENAME)  /* explicitly typed function */\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   302
__function_1p(ABS, TYPENAME, IN, TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   303
__ANY_REAL(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   304
__ANY_INT(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   305
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   306
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   307
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   308
  /*    SQRT    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   309
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   310
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   311
__function_1p(SQRT_##TYPENAME, TYPENAME, IN, TYPENAME)  /* explicitly typed function */\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   312
__function_1p(SQRT, TYPENAME, IN, TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   313
__ANY_REAL(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   314
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   315
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   316
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   317
  /*     LN     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   318
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   319
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   320
__function_1p(LN_##TYPENAME, TYPENAME, IN, TYPENAME)  /* explicitly typed function */\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   321
__function_1p(LN, TYPENAME, IN, TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   322
__ANY_REAL(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   323
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   324
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   325
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   326
  /*     LOG    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   327
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   328
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   329
__function_1p(LOG_##TYPENAME, TYPENAME, IN, TYPENAME)  /* explicitly typed function */\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   330
__function_1p(LOG, TYPENAME, IN, TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   331
__ANY_REAL(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   332
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   333
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   334
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   335
  /*     EXP    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   336
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   337
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   338
__function_1p(EXP_##TYPENAME, TYPENAME, IN, TYPENAME)  /* explicitly typed function */\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   339
__function_1p(EXP, TYPENAME, IN, TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   340
__ANY_REAL(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   341
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   342
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   343
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   344
  /*     SIN    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   345
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   346
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   347
__function_1p(SIN_##TYPENAME, TYPENAME, IN, TYPENAME)  /* explicitly typed function */\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   348
__function_1p(SIN, TYPENAME, IN, TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   349
__ANY_REAL(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   350
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   351
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   352
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   353
  /*     COS    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   354
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   355
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   356
__function_1p(COS_##TYPENAME, TYPENAME, IN, TYPENAME)  /* explicitly typed function */\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   357
__function_1p(COS, TYPENAME, IN, TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   358
__ANY_REAL(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   359
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   360
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   361
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   362
  /*     TAN    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   363
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   364
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   365
__function_1p(TAN_##TYPENAME, TYPENAME, IN, TYPENAME)  /* explicitly typed function */\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   366
__function_1p(TAN, TYPENAME, IN, TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   367
__ANY_REAL(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   368
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   369
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   370
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   371
  /*    ASIN    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   372
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   373
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   374
__function_1p(ASIN_##TYPENAME, TYPENAME, IN, TYPENAME)  /* explicitly typed function */\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   375
__function_1p(ASIN, TYPENAME, IN, TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   376
__ANY_REAL(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   377
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   378
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   379
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   380
  /*    ACOS    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   381
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   382
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   383
__function_1p(ACOS_##TYPENAME, TYPENAME, IN, TYPENAME)  /* explicitly typed function */\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   384
__function_1p(ACOS, TYPENAME, IN, TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   385
__ANY_REAL(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   386
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   387
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   388
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   389
  /*    ATAN    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   390
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   391
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   392
__function_1p(ATAN_##TYPENAME, TYPENAME, IN, TYPENAME)  /* explicitly typed function */\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   393
__function_1p(ATAN, TYPENAME, IN, TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   394
__ANY_REAL(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   395
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   396
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   397
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   398
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   399
/*****************************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   400
/***   Table 24 - Standard arithmetic functions    ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   401
/*****************************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   402
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   403
#define __arith_expand(fname,TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   404
__function_1e(fname##_##TYPENAME, TYPENAME, IN, TYPENAME, 1)     /* explicitly typed function */\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   405
__function_1e(fname, TYPENAME, IN, TYPENAME, 1)                  /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   406
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   407
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   408
#define __arith_static(fname,TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   409
__function_1p(fname##_##TYPENAME, TYPENAME, IN, TYPENAME)  /* explicitly typed function */\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   410
__function_1p(fname, TYPENAME, IN, TYPENAME)               /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   411
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   412
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   413
  /*     ADD    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   414
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   415
#define __iec_(TYPENAME) __arith_expand(ADD, TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   416
__ANY_NUM(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   417
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   418
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   419
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   420
  /*     MUL    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   421
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   422
#define __iec_(TYPENAME) __arith_expand(MUL, TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   423
__ANY_NUM(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   424
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   425
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   426
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   427
  /*     SUB    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   428
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   429
#define __iec_(TYPENAME) __arith_static(SUB, TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   430
__ANY_NUM(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   431
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   432
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   433
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   434
  /*     DIV    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   435
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   436
#define __iec_(TYPENAME)\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   437
__function_2p(DIV_##TYPENAME, TYPENAME, IN1, TYPENAME, IN2, TYPENAME)  /* explicitly typed function */\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   438
__function_2p(DIV, TYPENAME, IN1, TYPENAME, IN2, TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   439
__ANY_NUM(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   440
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   441
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   442
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   443
  /*     MOD    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   444
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   445
#ifdef __DEFINE_CLASHING_FUNCTIONS  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   446
#define __iec_(TYPENAME)\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   447
__function_2p(MOD_##TYPENAME, TYPENAME, IN1, TYPENAME, IN2, TYPENAME)  /* explicitly typed function */\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   448
__function_2p(MOD, TYPENAME, IN1, TYPENAME, IN2, TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   449
__ANY_INT(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   450
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   451
#endif
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   452
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   453
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   454
  /*    EXPT    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   455
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   456
#define __in1_anyreal_(in2_TYPENAME)   __ANY_REAL_1(__iec_,in2_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   457
#define __iec_(in1_TYPENAME,in2_TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   458
__function_2p(EXPT, in1_TYPENAME, IN1, in1_TYPENAME, IN2, in2_TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   459
__ANY_NUM(__in1_anyreal_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   460
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   461
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   462
  /***************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   463
  /*     MOVE    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   464
  /***************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   465
#define __iec_(TYPENAME) __arith_static(MOVE, TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   466
__ANY(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   467
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   468
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   469
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   470
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   471
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   472
/***********************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   473
/***********************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   474
/*  2.5.1.5.3 Bit String Functions */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   475
/***********************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   476
/***********************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   477
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   478
/****************************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   479
/***   Table 25 - Standard bit shift functions    ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   480
/****************************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   481
/* We do not delcare explcitly typed versions of the functions in table 29.
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   482
 * See note at top of this file regarding explicitly typed functions for more details.
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   483
 */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   484
#define __in1_anybit_(in2_TYPENAME)   __ANY_BIT_1(__iec_,in2_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   485
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   486
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   487
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   488
  /*     SHL    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   489
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   490
#define __iec_(in1_TYPENAME,in2_TYPENAME) __function_2p(SHL, in1_TYPENAME, IN, in1_TYPENAME, N, in2_TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   491
__ANY_INT(__in1_anybit_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   492
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   493
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   494
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   495
  /*     SHR    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   496
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   497
#define __iec_(in1_TYPENAME,in2_TYPENAME) __function_2p(SHR, in1_TYPENAME, IN, in1_TYPENAME, N, in2_TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   498
__ANY_INT(__in1_anybit_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   499
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   500
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   501
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   502
  /*     ROR    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   503
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   504
#define __iec_(in1_TYPENAME,in2_TYPENAME) __function_2p(ROR, in1_TYPENAME, IN, in1_TYPENAME, N, in2_TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   505
__ANY_INT(__in1_anybit_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   506
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   507
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   508
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   509
  /*     ROL    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   510
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   511
#define __iec_(in1_TYPENAME,in2_TYPENAME) __function_2p(ROL, in1_TYPENAME, IN, in1_TYPENAME, N, in2_TYPENAME)             /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   512
__ANY_INT(__in1_anybit_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   513
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   514
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   515
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   516
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   517
/*********************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   518
/***   Table 26    ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   519
/*********************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   520
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   521
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   522
  /*     AND    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   523
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   524
#ifdef __DEFINE_CLASHING_FUNCTIONS  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   525
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   526
__function_1e(AND, TYPENAME, IN, TYPENAME, 1)                /* overloaded function */ \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   527
__function_1e(AND_##TYPENAME, TYPENAME, IN, TYPENAME, 1)     /* explicitly typed function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   528
__ANY_BIT(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   529
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   530
#endif
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   531
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   532
  /*************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   533
  /*     OR    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   534
  /*************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   535
#ifdef __DEFINE_CLASHING_FUNCTIONS  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   536
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   537
__function_1e(OR, TYPENAME, IN, TYPENAME, 1)                /* overloaded function */ \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   538
__function_1e(OR_##TYPENAME, TYPENAME, IN, TYPENAME, 1)     /* explicitly typed function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   539
__ANY_BIT(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   540
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   541
#endif
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   542
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   543
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   544
  /*     XOR    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   545
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   546
#ifdef __DEFINE_CLASHING_FUNCTIONS  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   547
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   548
__function_1e(XOR, TYPENAME, IN, TYPENAME, 1)                /* overloaded function */ \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   549
__function_1e(XOR_##TYPENAME, TYPENAME, IN, TYPENAME, 1)     /* explicitly typed function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   550
__ANY_BIT(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   551
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   552
#endif
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   553
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   554
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   555
  /*     NOT    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   556
  /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   557
#ifdef __DEFINE_CLASHING_FUNCTIONS  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   558
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   559
__function_1p(NOT, TYPENAME, IN, TYPENAME)             /* overloaded function */ \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   560
__function_1p(NOT_##TYPENAME, TYPENAME, IN, TYPENAME)  /* explicitly typed function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   561
__ANY_BIT(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   562
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   563
#endif
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   564
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   565
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   566
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   567
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   568
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   569
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   570
/***************************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   571
/***************************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   572
/*  2.5.1.5.4  Selection and comparison Functions  */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   573
/***************************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   574
/***************************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   575
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   576
/*********************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   577
/***   Table 27    ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   578
/*********************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   579
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   580
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   581
    /*    SEL     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   582
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   583
/* The standard states that the inputs for SEL and MUX must be named starting off from 0,
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   584
 * unlike remaining functions, that start off at 1.
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   585
 */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   586
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   587
__function_3p(SEL, TYPENAME, G, BOOL, IN0, TYPENAME, IN1, TYPENAME)             /* overloaded function */ \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   588
__function_3p(SEL_##TYPENAME, TYPENAME, G, BOOL, IN0, TYPENAME, IN1, TYPENAME)  /* explicitly typed function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   589
__ANY(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   590
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   591
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   592
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   593
    /*     MAX    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   594
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   595
/* Should be for: ANY_ELEMENTARY, but we currently do not support WSTRING yet... */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   596
/* However, we can call __ANY_ELEMENTARY since the __ANY_STRING macro does not call DO(WSTRING) */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   597
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   598
__function_1e(MAX, TYPENAME, IN, TYPENAME, 1)             /* overloaded function */ \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   599
__function_1e(MAX_##TYPENAME, TYPENAME, IN, TYPENAME, 1)  /* explicitly typed function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   600
__ANY_ELEMENTARY(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   601
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   602
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   603
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   604
    /*     MIN    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   605
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   606
/* Should be for: ANY_ELEMENTARY, but we currently do not support WSTRING yet... */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   607
/* However, we can call __ANY_ELEMENTARY since the __ANY_STRING macro does not call DO(WSTRING) */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   608
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   609
__function_1e(MIN, TYPENAME, IN, TYPENAME, 1)             /* overloaded function */ \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   610
__function_1e(MIN_##TYPENAME, TYPENAME, IN, TYPENAME, 1)  /* explicitly typed function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   611
__ANY_ELEMENTARY(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   612
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   613
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   614
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   615
    /*   LIMIT    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   616
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   617
/* Should be for: ANY_ELEMENTARY, but we currently do not support WSTRING yet... */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   618
/* However, we can call __ANY_ELEMENTARY since the __ANY_STRING macro does not call DO(WSTRING) */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   619
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   620
__function_3p(LIMIT, TYPENAME, MN, TYPENAME, IN, TYPENAME, MX, TYPENAME)             /* overloaded function */ \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   621
__function_3p(LIMIT_##TYPENAME, TYPENAME, MN, TYPENAME, IN, TYPENAME, MX, TYPENAME)  /* explicitly typed function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   622
__ANY_ELEMENTARY(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   623
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   624
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   625
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   626
    /*     MUX    */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   627
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   628
/* The standard states that the inputs for SEL and MUX must be named starting off from 0,
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   629
 * unlike remaining functions, that start off at 1.
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   630
 */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   631
/* The standard considers the explicit typing of MUX function as a special case... 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   632
 * It should look like: 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   633
 *         MUX_SINT_REAL, MUX_SINT_STRING, MUX_SINT_[ANY]
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   634
 *         MUX_INT_REAL,  MUX_INT_STRING,  MUX_INT_[ANY]
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   635
 *         MUX_[ANY_INT]_[ANY]
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   636
 */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   637
#define __in1_anyint_(in2_TYPENAME)   __ANY_INT_1(__iec_,in2_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   638
#define __iec_(in1_TYPENAME,in2_TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   639
__function_2e(MUX, in2_TYPENAME, K, in1_TYPENAME, IN, in2_TYPENAME, 0)                                  /* overloaded function */ \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   640
__function_2e(MUX_##in1_TYPENAME##_##in2_TYPENAME, in2_TYPENAME, K, in1_TYPENAME, IN, in2_TYPENAME, 0)  /* explicitly typed function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   641
__ANY(__in1_anyint_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   642
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   643
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   644
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   645
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   646
/******************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   647
/***             Table 28               ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   648
/***   Standard comparison functions    ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   649
/******************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   650
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   651
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   652
    /*     GT     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   653
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   654
/* Should be for: ANY_ELEMENTARY, but we currently do not support WSTRING yet... */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   655
/* However, we can call __ANY_ELEMENTARY since the __ANY_STRING macro does not call DO(WSTRING) */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   656
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   657
__function_1e(GT, BOOL, IN, TYPENAME, 1)             /* overloaded function */ \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   658
__function_1e(GT_##TYPENAME, BOOL, IN, TYPENAME, 1)  /* explicitly typed function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   659
__ANY_ELEMENTARY(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   660
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   661
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   662
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   663
    /*     GE     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   664
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   665
/* Should be for: ANY_ELEMENTARY, but we currently do not support WSTRING yet... */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   666
/* However, we can call __ANY_ELEMENTARY since the __ANY_STRING macro does not call DO(WSTRING) */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   667
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   668
__function_1e(GE, BOOL, IN, TYPENAME, 1)             /* overloaded function */ \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   669
__function_1e(GE_##TYPENAME, BOOL, IN, TYPENAME, 1)  /* explicitly typed function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   670
__ANY_ELEMENTARY(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   671
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   672
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   673
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   674
    /*     EQ     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   675
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   676
/* Should be for: ANY_ELEMENTARY, but we currently do not support WSTRING yet... */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   677
/* However, we can call __ANY_ELEMENTARY since the __ANY_STRING macro does not call DO(WSTRING) */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   678
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   679
__function_1e(EQ, BOOL, IN, TYPENAME, 1)             /* overloaded function */ \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   680
__function_1e(EQ_##TYPENAME, BOOL, IN, TYPENAME, 1)  /* explicitly typed function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   681
__ANY_ELEMENTARY(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   682
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   683
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   684
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   685
    /*     LT     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   686
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   687
/* Should be for: ANY_ELEMENTARY, but we currently do not support WSTRING yet... */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   688
/* However, we can call __ANY_ELEMENTARY since the __ANY_STRING macro does not call DO(WSTRING) */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   689
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   690
__function_1e(LT, BOOL, IN, TYPENAME, 1)             /* overloaded function */ \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   691
__function_1e(LT_##TYPENAME, BOOL, IN, TYPENAME, 1)  /* explicitly typed function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   692
__ANY_ELEMENTARY(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   693
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   694
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   695
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   696
    /*     LE     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   697
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   698
/* Should be for: ANY_ELEMENTARY, but we currently do not support WSTRING yet... */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   699
/* However, we can call __ANY_ELEMENTARY since the __ANY_STRING macro does not call DO(WSTRING) */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   700
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   701
__function_1e(LE, BOOL, IN, TYPENAME, 1)             /* overloaded function */ \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   702
__function_1e(LE_##TYPENAME, BOOL, IN, TYPENAME, 1)  /* explicitly typed function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   703
__ANY_ELEMENTARY(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   704
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   705
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   706
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   707
    /*     NE     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   708
    /**************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   709
/* Should be for: ANY_ELEMENTARY, but we currently do not support WSTRING yet... */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   710
/* However, we can call __ANY_ELEMENTARY since the __ANY_STRING macro does not call DO(WSTRING) */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   711
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   712
__function_1e(NE, BOOL, IN, TYPENAME, 1)             /* overloaded function */ \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   713
__function_1e(NE_##TYPENAME, BOOL, IN, TYPENAME, 1)  /* explicitly typed function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   714
__ANY_ELEMENTARY(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   715
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   716
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   717
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   718
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   719
/*********************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   720
/*********************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   721
/*  2.5.1.5.5   Character string  Functions  */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   722
/*********************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   723
/*********************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   724
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   725
/*************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   726
/***           Table 29            ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   727
/***  Character string  Functions  ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   728
/*************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   729
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   730
/* We do not delcare explcitly typed versions of the functions in table 29.
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   731
 * See note at top of this file regarding explicitly typed functions for more details.
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   732
 */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   733
 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   734
#define __A_anyint_(B_TYPENAME)   __ANY_INT_1(__iec_,B_TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   735
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   736
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   737
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   738
    /***************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   739
    /*     LEN     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   740
    /***************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   741
#define __iec_(A_TYPENAME,B_TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   742
__function_1p(LEN, A_TYPENAME, IN, B_TYPENAME)                                  /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   743
__ANY_STRING(__A_anyint_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   744
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   745
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   746
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   747
    /****************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   748
    /*     LEFT     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   749
    /****************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   750
#define __iec_(A_TYPENAME,B_TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   751
__function_2p(LEFT, B_TYPENAME, IN, B_TYPENAME, L, A_TYPENAME)                  /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   752
__ANY_STRING(__A_anyint_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   753
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   754
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   755
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   756
    /*****************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   757
    /*     RIGHT     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   758
    /*****************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   759
#define __iec_(A_TYPENAME,B_TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   760
__function_2p(RIGHT, B_TYPENAME, IN, B_TYPENAME, L, A_TYPENAME)                 /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   761
__ANY_STRING(__A_anyint_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   762
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   763
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   764
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   765
    /***************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   766
    /*     MID     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   767
    /***************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   768
#define __iec_(A_TYPENAME,B_TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   769
__function_3p(MID, B_TYPENAME, IN, B_TYPENAME, L, A_TYPENAME, P, A_TYPENAME)    /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   770
__ANY_STRING(__A_anyint_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   771
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   772
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   773
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   774
    /******************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   775
    /*     CONCAT     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   776
    /******************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   777
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   778
__function_1e(CONCAT, TYPENAME, IN, TYPENAME, 1)    /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   779
__ANY_STRING(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   780
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   781
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   782
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   783
    /******************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   784
    /*     INSERT     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   785
    /******************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   786
#define __iec_(A_TYPENAME,B_TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   787
__function_3p(INSERT, B_TYPENAME, IN1, B_TYPENAME, IN2, B_TYPENAME, P, A_TYPENAME)    /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   788
__ANY_STRING(__A_anyint_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   789
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   790
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   791
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   792
    /******************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   793
    /*     DELETE     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   794
    /******************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   795
#define __iec_(A_TYPENAME,B_TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   796
__function_3p(DELETE, B_TYPENAME, IN, B_TYPENAME, L, A_TYPENAME, P, A_TYPENAME)    /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   797
__ANY_STRING(__A_anyint_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   798
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   799
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   800
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   801
    /*******************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   802
    /*     REPLACE     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   803
    /*******************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   804
#define __iec_(A_TYPENAME,B_TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   805
__function_4p(REPLACE, B_TYPENAME, IN1, B_TYPENAME, IN2, B_TYPENAME, L, A_TYPENAME, P, A_TYPENAME)    /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   806
__ANY_STRING(__A_anyint_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   807
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   808
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   809
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   810
    /****************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   811
    /*     FIND     */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   812
    /****************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   813
#define __iec_(A_TYPENAME,B_TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   814
__function_2p(FIND, A_TYPENAME, IN1, B_TYPENAME, IN2, B_TYPENAME)                 /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   815
__ANY_STRING(__A_anyint_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   816
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   817
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   818
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   819
/*********************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   820
/*********************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   821
/*  2.5.1.5.6  Functions of time data types  */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   822
/*********************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   823
/*********************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   824
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   825
/**************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   826
/***           Table 30             ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   827
/***  Functions of time data types  ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   828
/**************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   829
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   830
__function_2p(ADD_TIME, TIME, IN1, TIME, IN2, TIME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   831
__function_2p(ADD_TOD_TIME, TOD, IN1, TOD, IN2, TIME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   832
__function_2p(ADD_DT_TIME, DT, IN1, DT, IN2, TIME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   833
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   834
__function_2p(SUB_TIME, TIME, IN1, TIME, IN2, TIME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   835
__function_2p(SUB_DATE_DATE, TIME, IN1, DATE, IN2, DATE)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   836
__function_2p(SUB_TOD_TIME, TOD, IN1, TOD, IN2, TIME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   837
__function_2p(SUB_TOD_TOD, TIME, IN1, TOD, IN2, TOD)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   838
__function_2p(SUB_DT_TIME, DT, IN1, DT, IN2, TIME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   839
__function_2p(SUB_DT_DT, TIME, IN1, DT, IN2, DT)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   840
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   841
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   842
/***  MULTIME  ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   843
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   844
__function_2p(MULTIME_##TYPENAME, TIME, IN1, TIME, IN2, TYPENAME)    /* explicitly typed function */\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   845
__function_2p(MULTIME, TIME, IN1, TIME, IN2, TYPENAME)               /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   846
__ANY_NUM(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   847
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   848
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   849
/***  MUL  ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   850
/* NOTE: We can not include the explicitly typed function
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   851
 * __function_2p(DIV_##TYPENAME, TIME, IN1, TIME, IN2, TYPENAME)    
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   852
 * as it would clash with another function with the exact same name declared above
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   853
 * __function_2p(DIV_##TYPENAME, TYPENAME, IN1, TYPENAME, IN2, TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   854
 * and the standard does not define this explicitly defined function as being overloaded 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   855
 * (i.e. having an ANY_***) input or output parameter
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   856
 * Note that our compiler would nevertheless work just fine with this overloaded declaration.
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   857
 */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   858
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   859
__function_2p(MUL, TIME, IN1, TIME, IN2, TYPENAME)               /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   860
__ANY_NUM(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   861
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   862
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   863
/***  DIVTIME  ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   864
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   865
__function_2p(DIVTIME_##TYPENAME, TIME, IN1, TIME, IN2, TYPENAME)    /* explicitly typed function */\
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   866
__function_2p(DIVTIME, TIME, IN1, TIME, IN2, TYPENAME)               /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   867
__ANY_NUM(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   868
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   869
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   870
/***  DIV  ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   871
/* NOTE: We can not include the explicitly typed function
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   872
 * __function_2p(DIV_##TYPENAME, TIME, IN1, TIME, IN2, TYPENAME)    
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   873
 * as it would clash with another function with the exact same name declared above
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   874
 * __function_2p(DIV_##TYPENAME, TYPENAME, IN1, TYPENAME, IN2, TYPENAME)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   875
 * and the standard does not define this explicitly defined function as being overloaded 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   876
 * (i.e. having an ANY_***) input or output parameter
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   877
 * Note that our compiler would nevertheless work just fine with this overloaded declaration.
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   878
 */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   879
#define __iec_(TYPENAME) \
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   880
__function_2p(DIV, TIME, IN1, TIME, IN2, TYPENAME)               /* overloaded function */ 
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   881
__ANY_NUM(__iec_)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   882
#undef __iec_
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   883
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   884
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   885
/*** CONCAT_DATE_TOD ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   886
__function_2p(CONCAT_DATE_TOD, DT, IN1, DATE, IN2, TOD)
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   887
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   888
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   889
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   890
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   891
/****************************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   892
/****************************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   893
/*  2.5.1.5.6   Functions of enumerated data types  */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   894
/****************************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   895
/****************************************************/  
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   896
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   897
/********************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   898
/***              Table 31                ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   899
/***  Functions of enumerated data types  ***/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   900
/********************************************/
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   901
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   902
/* Do we support this? */
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   903
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   904
END
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   905
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   906
echo "{enable code generation}"
e7d236750709 Support for semantic verification of calls to standard function calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   907
echo