00001 /* --------------------------------------------------------------------------- 00002 00003 00004 This file is part of the ``compile.type_checking.checkers'' package 00005 of NuSMV version 2. Copyright (C) 2006 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 00038 #ifndef __NUSMV_CORE_COMPILE_TYPE_CHECKING_CHECKERS_CHECKERS_INT_H__ 00039 #define __NUSMV_CORE_COMPILE_TYPE_CHECKING_CHECKERS_CHECKERS_INT_H__ 00040 00041 00042 #include "nusmv/core/compile/type_checking/checkers/CheckerBase.h" 00043 00044 #include "nusmv/core/node/node.h" 00045 #include "nusmv/core/opt/opt.h" 00046 00047 00048 /*---------------------------------------------------------------------------*/ 00049 /* Constant declarations */ 00050 /*---------------------------------------------------------------------------*/ 00051 00052 /*---------------------------------------------------------------------------*/ 00053 /* Structure declarations */ 00054 /*---------------------------------------------------------------------------*/ 00055 00056 00069 typedef enum 00070 { 00071 TC_VIOLATION_FIRST, /* This MUST be the first! */ 00072 /* --------------------------------------------------------------------- */ 00073 00074 TC_VIOLATION_UNDEF_IDENTIFIER, /* undefined identifier is met */ 00075 TC_VIOLATION_AMBIGUOUS_IDENTIFIER, /* identifier has two interpretations */ 00076 TC_VIOLATION_TYPE_MANDATORY, /* the most general type system 00077 violation, and this is mandatory 00078 to report 00079 */ 00080 TC_VIOLATION_TYPE_BACK_COMP, /* type system is violated, but it 00081 was not an error before the 00082 introduction of the type 00083 checking package. 00084 */ 00085 TC_VIOLATION_TYPE_WARNING, /* type system is violated, but is 00086 NOT an error, i.e. just 00087 a warning is output. 00088 */ 00089 TC_VIOLATION_OUT_OF_WORD_WIDTH, /* access to the bits outside 00090 of the Word width */ 00091 TC_VIOLATION_INCORRECT_WORD_WIDTH, /* incorrectly formed Word type */ 00092 00093 TC_VIOLATION_OUT_OF_WORDARRAY_WIDTH, /* the address or 00094 value word widths are not 00095 the specified ones */ 00096 TC_VIOLATION_INCORRECT_WORDARRAY_WIDTH,/* incorrectly formed WordArray type*/ 00097 00098 TC_VIOLATION_DUPLICATE_CONSTANTS, /* duplicate constants in an enum type */ 00099 00100 TC_VIOLATION_ATTIME_NESTED, /* nested attime operator */ 00101 TC_VIOLATION_ATTIME_NUM_REQ, /* time must be a constant number */ 00102 00103 TC_VIOLATION_PARAMS_NUM_ERROR, /* Invalid number of parameters in 00104 NFunctions calls*/ 00105 00106 TC_VIOLATION_PARAMS_TYPE_ERROR, /* Invalid number of parameters in 00107 NFunctions calls*/ 00108 00109 /* TODO[AMa] This should be removed when MathSAT will support multiple 00110 parameter types */ 00111 TC_VIOLATION_DIFFERENT_TYPE_PARAMS_ERROR, /* Invalid types for parameters.. 00112 due a MathSAT limitation, types 00113 cannot be of mixed types */ 00114 TC_VIOLATION_UNCONSTANT_EXPRESSION, 00115 00116 TC_VIOLATION_INVALID_RANGE, 00117 /* --------------------------------------------------------------------- */ 00118 TC_VIOLATION_LAST, /* This MUST be the last! */ 00119 00120 } TypeSystemViolation; 00121 00144 typedef boolean 00145 (*TypeCheckingViolationHandler_ptr) (CheckerBase_ptr checker, 00146 TypeSystemViolation violation, 00147 node_ptr expression); 00148 00149 00150 00151 /*---------------------------------------------------------------------------*/ 00152 /* Macro declarations */ 00153 /*---------------------------------------------------------------------------*/ 00154 00155 /*---------------------------------------------------------------------------*/ 00156 /* Variable declarations */ 00157 /*---------------------------------------------------------------------------*/ 00158 00159 00160 00161 /*---------------------------------------------------------------------------*/ 00162 /* Function prototypes */ 00163 /*---------------------------------------------------------------------------*/ 00164 00171 boolean 00172 TypeSystemViolation_is_valid(TypeSystemViolation violation); 00173 00174 00175 00176 #endif /* __NUSMV_CORE_COMPILE_TYPE_CHECKING_CHECKERS_CHECKERS_INT_H__ */