00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _H_dffctdef
00025 #define _H_dffctdef
00026
00027 #ifndef _H_conscomp
00028 #include "conscomp.h"
00029 #endif
00030 #ifndef _H_symbol
00031 #include "symbol.h"
00032 #endif
00033 #ifndef _H_expressn
00034 #include "expressn.h"
00035 #endif
00036 #ifndef _H_evaluatn
00037 #include "evaluatn.h"
00038 #endif
00039 #ifndef _H_constrct
00040 #include "constrct.h"
00041 #endif
00042 #ifndef _H_moduldef
00043 #include "moduldef.h"
00044 #endif
00045 #ifndef _H_cstrccom
00046 #include "cstrccom.h"
00047 #endif
00048
00049 #define DEFFACTS_DATA 0
00050
00051 struct deffactsData
00052 {
00053 struct construct *DeffactsConstruct;
00054 int DeffactsModuleIndex;
00055 #if CONSTRUCT_COMPILER && (! RUN_TIME)
00056 struct CodeGeneratorItem *DeffactsCodeItem;
00057 #endif
00058 };
00059
00060 struct deffacts
00061 {
00062 struct constructHeader header;
00063 struct expr *assertList;
00064 };
00065
00066 struct deffactsModule
00067 {
00068 struct defmoduleItemHeader header;
00069 };
00070
00071 #define EnvGetDeffactsName(theEnv,x) GetConstructNameString((struct constructHeader *) x)
00072 #define EnvGetDeffactsPPForm(theEnv,x) GetConstructPPForm(theEnv,(struct constructHeader *) x)
00073 #define EnvDeffactsModule(theEnv,x) GetConstructModuleName((struct constructHeader *) x)
00074 #define DeffactsData(theEnv) ((struct deffactsData *) GetEnvironmentData(theEnv,DEFFACTS_DATA))
00075
00076 #ifdef LOCALE
00077 #undef LOCALE
00078 #endif
00079
00080 #ifdef _DFFCTDEF_SOURCE_
00081 #define LOCALE
00082 #else
00083 #define LOCALE extern
00084 #endif
00085
00086 #define DeffactsModule(x) GetConstructModuleName((struct constructHeader *) x)
00087 #define FindDeffacts(a) EnvFindDeffacts(GetCurrentEnvironment(),a)
00088 #define GetDeffactsName(x) GetConstructNameString((struct constructHeader *) x)
00089 #define GetDeffactsPPForm(x) GetConstructPPForm(GetCurrentEnvironment(),(struct constructHeader *) x)
00090 #define GetNextDeffacts(a) EnvGetNextDeffacts(GetCurrentEnvironment(),a)
00091 #define IsDeffactsDeletable(a) EnvIsDeffactsDeletable(GetCurrentEnvironment(),a)
00092
00093 LOCALE void InitializeDeffacts(void *);
00094 LOCALE void *EnvFindDeffacts(void *,char *);
00095 LOCALE void *EnvGetNextDeffacts(void *,void *);
00096 LOCALE void CreateInitialFactDeffacts(void);
00097 LOCALE intBool EnvIsDeffactsDeletable(void *,void *);
00098 LOCALE struct deffactsModule *GetDeffactsModuleItem(void *,struct defmodule *);
00099
00100 #endif
00101
00102