C:/Users/Dennis/src/lang/Life_start/Life/life-1.02/source/c_life.h

Go to the documentation of this file.
00001 #ifndef C_LIFE_H
00002 #define C_LIFE_H
00003 /*      $Id: c_life.h,v 1.2 1994/12/08 23:21:00 duchier Exp $    */
00004 
00005 #include <stdio.h>
00006 
00007 
00008 /* Type for psi-terms, hidden from users */
00009 typedef void *PsiTerm;
00010 
00011 
00012 /* Replies to queries */
00013 
00014 /* Input failed */
00015 #define WFno 0
00016 
00017 /* Input succeeded */
00018 #define WFyes  1
00019 
00020 /* Input succeeded with possibly more answers */
00021 #define WFmore 2
00022 
00023 
00024 
00025 
00026 /* A useful macro for goals which should succeed */
00027 
00028 #define WFProve(A) { char *c=(A);if(!WFInput(c)) \
00029   fprintf(stderr,"%s failed (%s, line %d)\n",c,__FILE__,__LINE__); }
00030 
00031 
00032 
00033 /* Function declarations */
00034 
00035 /* Submit a query */
00036 int WFInput(/* char *query */);
00037 
00038 /* Get a variable's value */
00039 PsiTerm WFGetVar(/* char *name */);
00040 
00041 /* Get the type of a psi-term */
00042 char *WFType(/* PsiTerm psi */);
00043 
00044 /* Get the value of a psi-term if it's a double */
00045 double WFGetDouble(/* PsiTerm psi, int *ok */);
00046 
00047 /* Get the value of a psi-term if it's a string */
00048 char *WFGetString(/* PsiTerm psi, int *ok */);
00049 
00050 /* Count the features of a psi-term */
00051 int WFFeatureCount(/* PsiTerm psi */);
00052 
00053 /* Get the value of a feature */
00054 PsiTerm WFGetFeature(/* PsiTerm psi, char *featureName */);
00055 
00056 /* Get all the feature names as a NULL-terminated array of strings */
00057 char **WFFeatures(/* PsiTerm psi */);
00058 
00059 
00060 
00061 #endif /* C_LIFE_H */

Generated on Sat Jan 26 08:48:06 2008 for WildLife by  doxygen 1.5.4