common.h

Go to the documentation of this file.
00001 // -*- mode: C++; c-file-style: "stroustrup"; c-basic-offset: 4; indent-tabs-mode: nil; -*-
00002 
00003 /* libutap - Uppaal Timed Automata Parser.
00004    Copyright (C) 2002-2006 Uppsala University and Aalborg University.
00005    
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Lesser General Public License
00008    as published by the Free Software Foundation; either version 2.1 of
00009    the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful, but
00012    WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Lesser General Public License for more details.
00015 
00016    You should have received a copy of the GNU Lesser General Public
00017    License along with this library; if not, write to the Free Software
00018    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00019    USA
00020 */
00021 
00022 #ifndef UTAP_COMMON_HH
00023 #define UTAP_COMMON_HH
00024 
00025 #ifdef __MINGW32__
00026 #include <stdint.h>
00027 #else
00028 #include <inttypes.h>
00029 #endif
00030 #include <string>
00031 #include <vector>
00032 
00033 namespace UTAP
00034 {
00035     namespace Constants
00036     {
00037         enum kind_t 
00038         {
00039             PLUS = 0,
00040             MINUS = 1,
00041             MULT = 2,
00042             DIV = 3,
00043             MOD = 4,
00044             BIT_AND = 5,
00045             BIT_OR = 6,
00046             BIT_XOR = 7,
00047             BIT_LSHIFT = 8,
00048             BIT_RSHIFT = 9,
00049             AND = 10,
00050             OR = 11,
00051             MIN = 12,
00052             MAX = 13,
00053             RATE = 14,
00054 
00055             /********************************************************
00056              * Relational operators
00057              */
00058             LT = 20,
00059             LE = 21,
00060             EQ = 22,
00061             NEQ = 23,
00062             GE = 24,
00063             GT = 25,
00064 
00065             /********************************************************
00066              * Unary operators
00067              */
00068             NOT = 30,
00069             FORALL = 31,
00070             EXISTS = 32,
00071 
00072             /********************************************************
00073              * Assignment operators
00074              */
00075             ASSIGN = 40,
00076             ASSPLUS = 41,
00077             ASSMINUS = 42,
00078             ASSDIV = 43,
00079             ASSMOD = 44,
00080             ASSMULT = 45,
00081             ASSAND = 46,
00082             ASSOR = 47,
00083             ASSXOR = 48,
00084             ASSLSHIFT = 49,
00085             ASSRSHIFT = 50,
00086 
00087             /*******************************************************
00088              * CTL Quantifiers
00089              */
00090             EF = 60,
00091             EG = 61,
00092             AF = 62,
00093             AG = 63,
00094             LEADSTO = 64,
00095             A_UNTIL = 65,
00096             A_WEAKUNTIL = 66,
00097             EF2 = 67,
00098             EG2 = 68,
00099             AF2 = 69,
00100             AG2 = 70,
00101             AG_R = 71,
00102             EF_R = 72,
00103 
00104             /*******************************************************
00105              * Control Synthesis Operator
00106              */
00107             CONTROL = 80,
00108             EF_CONTROL = 81,
00109             CONTROL_TOPT = 82,
00110 
00111             /*******************************************************
00112              * Parameter generation
00113              */
00114             SUP = 83,
00115             INF = 84,
00116             
00117             /*******************************************************
00118              * Additional constants used by ExpressionProgram's and
00119              * the TypeCheckBuilder (but not by the parser, although
00120              * some of then ought to be used, FIXME).
00121              */
00122             IDENTIFIER = 512,
00123             CONSTANT = 513,
00124             ARRAY = 514,
00125             POSTINCREMENT = 515,
00126             PREINCREMENT = 516,
00127             POSTDECREMENT = 517,
00128             PREDECREMENT = 518,
00129             UNARY_MINUS = 519,
00130             LIST = 520,
00131             DOT = 521,
00132             INLINEIF = 522,
00133             COMMA = 523,
00134             SYNC = 525,
00135             DEADLOCK = 526,
00136             FUNCALL = 527,
00137 
00138             /*******************************************************
00139              * Types
00140              */
00141             UNKNOWN = 600,
00142             VOID_TYPE = 601,
00143             CLOCK = 602,
00144             INT = 603,
00145             BOOL = 604,
00146             SCALAR = 605,
00147             LOCATION = 606,
00148             CHANNEL = 607,
00149             COST = 608,
00150             INVARIANT = 609,
00151             INVARIANT_WR = 610,
00152             GUARD = 611,
00153             DIFF = 612,
00154             CONSTRAINT= 613,
00155             FORMULA = 614,
00156 
00157             RANGE = 650,
00158             LABEL = 651,
00159             RECORD = 652,
00160             REF = 654,
00161             URGENT = 655,
00162             COMMITTED = 656,
00163             BROADCAST = 657,
00164             TYPEDEF = 658,
00165             PROCESS = 659,
00166             PROCESSSET = 660,
00167             INSTANCE = 661,
00168             META = 662,
00169             FUNCTION = 663
00170         };
00171 
00172         /**********************************************************
00173          * Synchronisations:
00174          */
00175         enum synchronisation_t 
00176         {
00177             SYNC_QUE = 0,
00178             SYNC_BANG = 1
00179         };
00180     }
00181 
00183     typedef enum 
00184     { 
00185         S_XTA, // entire system 
00186         S_DECLARATION, S_LOCAL_DECL, S_INST, S_SYSTEM, S_PARAMETERS, 
00187         S_INVARIANT, S_SELECT, S_GUARD, S_SYNC, S_ASSIGN, 
00188         S_EXPRESSION, S_PROPERTY
00189     } xta_part_t;
00190 
00191 }
00192 
00193 #endif

Generated on Thu Feb 22 14:46:52 2007 for libutap by  doxygen 1.4.7