systembuilder.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-2004 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_SYSTEMBUILDER_H
00023 #define UTAP_SYSTEMBUILDER_H
00024 
00025 #include <cassert>
00026 #include <vector>
00027 #include <inttypes.h>
00028 
00029 #include "utap/statementbuilder.h"
00030 #include "utap/utap.h"
00031 
00032 namespace UTAP
00033 {
00069     class SystemBuilder : public StatementBuilder
00070     {
00071     protected:
00073         int32_t currentChanPriority;
00074 
00076         int32_t currentProcPriority;
00077 
00079         edge_t *currentEdge;
00080 
00081         //
00082         // Method for handling types
00083         //
00084 
00085         declarations_t *getCurrentDeclarationBlock();
00086 
00087         virtual variable_t *addVariable(type_t type, const char*  name,
00088                                         expression_t init);
00089         virtual bool addFunction(type_t type, const char* name);
00090 
00091     public:
00092         SystemBuilder(TimedAutomataSystem *);
00093 
00094         virtual void declProgress(bool);
00095         virtual void procBegin(const char* name);
00096         virtual void procEnd(); 
00097         virtual void procState(const char* name, bool hasInvariant); 
00098         virtual void procStateCommit(const char* name); 
00099         virtual void procStateUrgent(const char* name); 
00100         virtual void procStateInit(const char* name); 
00101         virtual void procEdgeBegin(const char* from, const char* to, const bool control);
00102         virtual void procEdgeEnd(const char* from, const char* to); 
00103         virtual void procSelect(const char *id);
00104         virtual void procGuard();
00105         virtual void procSync(Constants::synchronisation_t type);
00106         virtual void procUpdate();
00107         virtual void instantiationBegin(const char*, size_t, const char*);
00108         virtual void instantiationEnd(
00109             const char *, size_t, const char *, size_t);
00110         virtual void process(const char*);
00111         virtual void done();    
00112         virtual void beforeUpdate();
00113         virtual void afterUpdate();
00114         virtual void incProcPriority();
00115         virtual void incChanPriority();
00116         virtual void chanPriority();
00117         virtual void procPriority(const char*);
00118         virtual void defaultChanPriority();
00119     };
00120 }
00121 #endif

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