00001 /* --------------------------------------------------------------------------- 00002 00003 00004 This file is part of the ``wff.lr'' package of NuSMV version 2. 00005 Copyright (C) 2013 by FBK-irst. 00006 00007 NuSMV version 2 is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Lesser General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 NuSMV version 2 is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public 00018 License along with this library; if not, write to the Free Software 00019 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 00020 00021 For more information on NuSMV see <http://nusmv.fbk.eu> 00022 or email to <nusmv-users@fbk.eu>. 00023 Please report bugs to <nusmv-users@fbk.eu>. 00024 00025 To contact the NuSMV development board, email to <nusmv@fbk.eu>. 00026 00027 -----------------------------------------------------------------------------*/ 00028 00039 #ifndef __NUSMV_CORE_WFF_LR_MASTER_LOGIC_RECOGNIZER_H__ 00040 #define __NUSMV_CORE_WFF_LR_MASTER_LOGIC_RECOGNIZER_H__ 00041 00042 00043 #include "nusmv/core/node/MasterNodeWalker.h" 00044 #include "nusmv/core/utils/defs.h" 00045 00052 typedef enum LogicType_TAG { 00053 EXP_FIRST = -1, 00054 EXP_NONE = 0, 00055 EXP_SIMPLE, 00056 EXP_NEXT, 00057 EXP_LTL, 00058 EXP_CTL, 00059 EXP_ERROR, 00060 EXP_LAST 00061 } LogicType; 00062 00068 #define LOGIC_RECOGNIZED_CHECK_INSTANCE(self) \ 00069 nusmv_assert(self > EXP_FIRST && self < EXP_LAST); 00070 00076 #define LOGIC_RECOGNIZED_ASSERT_VALID(self) \ 00077 nusmv_assert(self > EXP_FIRST && self < EXP_ERROR); 00078 00084 #define LOGIC_RECOGNIZED_ASSERT_HAS_VALUE(self) \ 00085 nusmv_assert(self > EXP_NONE && self < EXP_ERROR); 00086 00093 typedef struct MasterLogicRecognizer_TAG* MasterLogicRecognizer_ptr; 00094 00101 #define MASTER_LOGIC_RECOGNIZER(self) \ 00102 ((MasterLogicRecognizer_ptr) self) 00103 00109 #define MASTER_LOGIC_RECOGNIZER_CHECK_INSTANCE(self) \ 00110 (nusmv_assert(MASTER_LOGIC_RECOGNIZER(self) != MASTER_LOGIC_RECOGNIZER(NULL))) 00111 00112 00113 00116 /*---------------------------------------------------------------------------*/ 00117 /* Function prototypes */ 00118 /*---------------------------------------------------------------------------*/ 00119 00128 MasterLogicRecognizer_ptr MasterLogicRecognizer_create(NuSMVEnv_ptr env); 00129 00136 MasterLogicRecognizer_ptr 00137 MasterLogicRecognizer_create_with_default_recognizers(NuSMVEnv_ptr env); 00138 00147 void MasterLogicRecognizer_destroy(MasterLogicRecognizer_ptr self); 00148 00153 LogicType MasterLogicRecognizer_recognize(MasterLogicRecognizer_ptr self, 00154 node_ptr expression, 00155 node_ptr context); 00156 00157 00162 #endif /* __NUSMV_CORE_WFF_LR_MASTER_LOGIC_RECOGNIZER_H__ */