1 |
/* ASCEND modelling environment |
2 |
Copyright (C) 1990, 1993, 1994 Thomas Guthrie Epperly |
3 |
Copyright (C) 2006 Carnegie Mellon University |
4 |
|
5 |
This program is free software; you can redistribute it and/or modify |
6 |
it under the terms of the GNU General Public License as published by |
7 |
the Free Software Foundation; either version 2, or (at your option) |
8 |
any later version. |
9 |
|
10 |
This program is distributed in the hope that it will be useful, |
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
GNU General Public License for more details. |
14 |
|
15 |
You should have received a copy of the GNU General Public License |
16 |
along with this program; if not, write to the Free Software |
17 |
Foundation, Inc., 59 Temple Place - Suite 330, |
18 |
Boston, MA 02111-1307, USA. |
19 |
*//** |
20 |
@file |
21 |
Instance Checking Routines. |
22 |
|
23 |
Requires: |
24 |
#include <stdio.h> |
25 |
#include "utilities/ascConfig.h" |
26 |
#include "instance_enum.h" |
27 |
#include "compiler.h" |
28 |
*//* |
29 |
by Tom Epperly |
30 |
Created: 5/4/1990 |
31 |
Version: $Revision: 1.8 $ |
32 |
Version control file: $RCSfile: check.h,v $ |
33 |
Date last modified: $Date: 1997/07/18 12:28:19 $ |
34 |
Last modified by: $Author: mthomas $ |
35 |
*/ |
36 |
|
37 |
#ifndef ASC_CHECK_H |
38 |
#define ASC_CHECK_H |
39 |
|
40 |
/** addtogroup compiler Compiler |
41 |
@{ |
42 |
*/ |
43 |
|
44 |
#include <utilities/ascConfig.h> |
45 |
|
46 |
#define CheckInstance(a,b) CheckInstanceLevel((a),(b),5) |
47 |
ASC_DLLSPEC void CheckInstanceLevel(FILE *f, CONST struct Instance *i, int pass); |
48 |
/**< |
49 |
* Perform all the possible consistency checks possible, and check for |
50 |
* as many errors as possible. This won't modify anything. |
51 |
* The value of pass determines which pending statements will be |
52 |
* printed. |
53 |
* pass == 0: do not print pendings <br> |
54 |
* pass == 1: IS_As and other constructors only <br> |
55 |
* pass == 2: relations also <br> |
56 |
* pass == 3: logical relations also <br> |
57 |
* pass == 4: whens also <br> |
58 |
* pass == 5: defaults also <br> |
59 |
*/ |
60 |
|
61 |
extern void CheckInstanceStructure(FILE *f, CONST struct Instance *i); |
62 |
/**< |
63 |
* Perform popular consistency checks possible, and check for |
64 |
* as many errors as possible. This won't modify anything. |
65 |
* This doesn't warn about unassigned real constants, basically. |
66 |
*/ |
67 |
|
68 |
extern void InstanceTokenStatistics(FILE *f, CONST struct Instance *i); |
69 |
/**< |
70 |
* This compiles and prints various token relation statistics for |
71 |
* this instance tree. |
72 |
*/ |
73 |
|
74 |
ASC_DLLSPEC void InstanceStatistics(FILE *f, CONST struct Instance *i); |
75 |
/**< |
76 |
* This compiles and prints various statistics about this instance tree. |
77 |
*/ |
78 |
|
79 |
/* @} */ |
80 |
|
81 |
#endif /* ASC_CHECK_H */ |
82 |
|