Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

common.h

Go to the documentation of this file.
00001 // -*- mode: C++; c-file-style: "stroustrup"; c-basic-offset: 4; -*-
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 
00096             /*******************************************************
00097              * Additional constants used by ExpressionProgram's and
00098              * the TypeCheckBuilder (but not by the parser, although
00099              * some of then ought to be used, FIXME).
00100              */
00101             IDENTIFIER = 512,
00102             CONSTANT = 513,
00103             ARRAY = 514,
00104             POSTINCREMENT = 515,
00105             PREINCREMENT = 516,
00106             POSTDECREMENT = 517,
00107             PREDECREMENT = 518,
00108             UNARY_MINUS = 519,
00109             LIST = 520,
00110             DOT = 521,
00111             INLINEIF = 522,
00112             COMMA = 523,
00113             SYNC = 525,
00114             DEADLOCK = 526,
00115             FUNCALL = 527,
00116 
00117             /*******************************************************
00118              * Types
00119              */
00120             UNKNOWN = 600,
00121             VOID_TYPE = 601,
00122             CLOCK = 602,
00123             INT = 603,
00124             BOOL = 604,
00125             SCALAR = 605,
00126             LOCATION = 606,
00127             CHANNEL = 607,
00128             COST = 608,
00129             INVARIANT = 609,
00130             INVARIANT_WR = 610,
00131             GUARD = 611,
00132             DIFF = 612,
00133             CONSTRAINT= 613,
00134 
00135             RANGE = 650,
00136             LABEL = 651,
00137             RECORD = 652,
00138             REF = 654,
00139             URGENT = 655,
00140             COMMITTED = 656,
00141             WINNING = 657,
00142             LOSING = 658,
00143             BROADCAST = 659,
00144             TYPEDEF = 661,
00145             PROCESS = 662,
00146             PROCESSSET = 663,
00147             INSTANCE = 665,
00148             META = 667,
00149             FUNCTION = 668
00150         };
00151 
00152         /**********************************************************
00153          * Synchronisations:
00154          */
00155         enum synchronisation_t 
00156         {
00157             SYNC_QUE = 0,
00158             SYNC_BANG = 1
00159         };
00160     }
00161 
00163     typedef enum 
00164     { 
00165         S_XTA, // entire system 
00166         S_DECLARATION, S_LOCAL_DECL, S_INST, S_SYSTEM, S_PARAMETERS, 
00167         S_INVARIANT, S_SELECT, S_GUARD, S_SYNC, S_ASSIGN, 
00168         S_EXPRESSION, S_PROPERTY
00169     } xta_part_t;
00170 
00171 }
00172 
00173 #endif

Generated on Sat Apr 29 21:02:13 2006 for libutap by  doxygen 1.4.2