/* $Id: backend.h,v 1.27 2003/04/17 12:29:18 dirkl Exp $ $Log: backend.h,v $ Revision 1.27 2003/04/17 12:29:18 dirkl - increased max number of record elements Revision 1.26 2002/02/26 13:23:14 sbeyer * fixed bug where RAM lost information about its address width * fixed bug where array of RAM was treated as single bitvector * made pseudo-warning in case of overloaded functions real warning (source code is now REALLY processed further after WARNING output) * in case of (case insensitive) overloading, added location of initial definition to warning/error output * WARNING output no longer reports termination of pvs2hdl Revision 1.25 2001/06/22 13:02:57 dirkl *** empty log message *** Revision 1.24 2001/06/22 10:28:29 dirkl - prepared new config-file format - excluded context pvsctl Revision 1.23 2001/06/12 14:56:44 sbeyer * added reasonable error message for record type overflow * increased supported record size from 200 to 1000 fields Revision 1.22 2001/05/30 18:07:57 sbeyer * added array and ram support in types * BETA support for function lookup table Revision 1.21 2001/01/26 16:15:09 sbeyer added forgotten line number to raise_error Revision 1.20 2001/01/25 15:06:17 sbeyer knot_error now outputs c-file name and line number Revision 1.19 2001/01/25 10:44:18 sbeyer finally wrote real 'safe' functions for allocating and deallocation nodes and strings; allocated node is now initialized with zeroes Revision 1.18 2001/01/23 15:58:02 sbeyer moved macros knot_error, raise_error from shared_lists.h to backend.h Revision 1.17 2001/01/16 17:27:28 sbeyer better allocation/deallocation treatment Revision 1.16 2001/01/15 16:07:47 sbeyer small bugfixes Revision 1.15 2001/01/15 15:11:08 sbeyer cosmetic changes (like const qualifier) Revision 1.14 2001/01/11 11:47:28 sbeyer renamed subknoten to sub in struct knoten Revision 1.13 2001/01/10 18:11:09 sbeyer added surce_line, source_file to 'knoten' Revision 1.12 2001/01/09 16:27:31 sbeyer *** empty log message *** */ #ifndef backend_h #define backend_h #include "parser_typen.h" #ifdef __cplusplus extern "C" { #endif #define MAX_NUM_ACTUALS 20 #define MAX_RECORD_MEMBER_COUNT 1500 #define bitvector 0 #define unbounded_nat 1 #define bounded_nat 2 #define other 3 #define ram 4 struct knoten *alloc_knoten(); char *alloc_str(const char *src); void free_str(char *str); void free_knot(struct knoten *knot); struct knoten { int typ; int subtyp; int subanz; char *wert_str; int wert_int; double wert_double; struct knoten *sub[10]; int source_line; char *source_file; }; #define knot_error(PRINTF,knot) { PRINTF; printf("\nterminated c-file %s, line %d due to error in pvs-file %s, line %d\ncorresponding pvs-parse tree in file \"error.gdl\"\n",__FILE__,__LINE__,knot->source_file,knot->source_line); gdl_ausgabe("error.gdl",knot); exit(1); } #define knot_warning(PRINTF,knot) { printf("Warning!!!"); PRINTF; printf("\nc-file %s, line %d due to pvs-file %s, line %d\ncorresponding pvs-parse tree in file \"warning.gdl\"\n",__FILE__,__LINE__,knot->source_file,knot->source_line); gdl_ausgabe("warning.gdl",knot); } #define raise_error(PRINTF) { PRINTF; printf("\nterminated c-file %s, line %d\n",__FILE__,__LINE__); exit(1); } #ifdef __cplusplus } #endif #endif // backend_h