/[ascend]/trunk/base/generic/compiler/instance_io.h
ViewVC logotype

Diff of /trunk/base/generic/compiler/instance_io.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 479 by johnpye, Sun Feb 5 06:43:19 2006 UTC revision 480 by johnpye, Mon Apr 17 10:45:23 2006 UTC
# Line 69  extern struct gl_list_t *ShortestPath(CO Line 69  extern struct gl_list_t *ShortestPath(CO
69   */   */
70    
71  extern struct gl_list_t *AllPaths(CONST struct Instance *inst);  extern struct gl_list_t *AllPaths(CONST struct Instance *inst);
72  /**<  /**<
73   *  AllPaths makes and returns a list of lists of NameNode structures.   *  AllPaths makes and returns a list of lists of NameNode structures.
74   *  Each member of list AllPaths returns is a path from the given instance   *  Each member of list AllPaths returns is a path from the given instance
75   *  to root.<br><br>   *  to root.<br><br>
# Line 89  extern struct gl_list_t *AllPaths(CONST Line 89  extern struct gl_list_t *AllPaths(CONST
89   */   */
90    
91  extern struct gl_list_t *ISAPaths(CONST struct gl_list_t *pathlist);  extern struct gl_list_t *ISAPaths(CONST struct gl_list_t *pathlist);
92  /**<  /**<
93   *  Given pathlist, the output of AllPaths, returns the list of   *  Given pathlist, the output of AllPaths, returns the list of
94   *  names which are real: that is names which have been constructed   *  names which are real: that is names which have been constructed
95   *  without ALIASES or WILL_BE's intermediate.   *  without ALIASES or WILL_BE's intermediate.
# Line 122  extern void WriteInstanceNameDS(Asc_DStr Line 122  extern void WriteInstanceNameDS(Asc_DStr
122   *  relative names instead, where the context is assumed to be ref.   *  relative names instead, where the context is assumed to be ref.
123   */   */
124    
125  extern char *WriteInstanceNameString(CONST struct Instance *i,  extern char* ASC_DLLSPEC WriteInstanceNameString(CONST struct Instance *i,
126                                       CONST struct Instance *ref);                                       CONST struct Instance *ref);
127  /**<  /**<
128   *  Return a string (that the user must destroy eventually).  The name that is   *  Return a string (that the user must destroy eventually).  The name that is
# Line 133  extern char *WriteInstanceNameString(CON Line 133  extern char *WriteInstanceNameString(CON
133   */   */
134    
135  extern int WriteAnyInstanceName(FILE *f, struct Instance *i);  extern int WriteAnyInstanceName(FILE *f, struct Instance *i);
136  /**<  /**<
137   *  Print the instance's name to the specified file.   *  Print the instance's name to the specified file.
138   *  Very similar to WriteInstanceName().  The name that is   *  Very similar to WriteInstanceName().  The name that is
139   *  printed is derived from *any* path from i to NULL.   *  printed is derived from *any* path from i to NULL.
# Line 148  extern unsigned long CountAliases(CONST Line 148  extern unsigned long CountAliases(CONST
148   */   */
149    
150  extern unsigned long CountISAs(CONST struct Instance *i);  extern unsigned long CountISAs(CONST struct Instance *i);
151  /**<  /**<
152   *  Count the names with which the instance given was created.   *  Count the names with which the instance given was created.
153   */   */
154    
155  extern void WriteAliases(FILE *f, CONST struct Instance *i);  extern void WriteAliases(FILE *f, CONST struct Instance *i);
156  /**<  /**<
157   *  Print all the instance's names to the specified file.   *  Print all the instance's names to the specified file.
158   */   */
159    
160  extern void WriteISAs(FILE *f, CONST struct Instance *i);  extern void WriteISAs(FILE *f, CONST struct Instance *i);
161  /**<  /**<
162   *  Print the instance's constructed names to the specified file.   *  Print the instance's constructed names to the specified file.
163   *  (there may not be any in bizarre circumstances).   *  (there may not be any in bizarre circumstances).
164   */   */
165    
166  extern struct gl_list_t *WriteAliasStrings(CONST struct Instance *i);  extern struct gl_list_t *WriteAliasStrings(CONST struct Instance *i);
167  /**<  /**<
168   *  Return a list of strings of all the possible instance names for i.   *  Return a list of strings of all the possible instance names for i.
169   *  The list AND the strings on it are the user's responsibility to destroy.   *  The list AND the strings on it are the user's responsibility to destroy.
170   *  gl_free_and_destroy(aliases) would be convenient.   *  gl_free_and_destroy(aliases) would be convenient.
171   */   */
172    
173  extern struct gl_list_t *WriteISAStrings(CONST struct Instance *i);  extern struct gl_list_t *WriteISAStrings(CONST struct Instance *i);
174  /**<  /**<
175   *  Return a list of strings of all the constructed instance names for i.   *  Return a list of strings of all the constructed instance names for i.
176   *  Names created by WILL_BE/ALIASES are not returned.   *  Names created by WILL_BE/ALIASES are not returned.
177   *  Under bizarre circumstances, the list may be empty.   *  Under bizarre circumstances, the list may be empty.
# Line 184  extern struct gl_list_t *WriteISAStrings Line 184  extern struct gl_list_t *WriteISAStrings
184   */   */
185    
186  extern void WriteClique(FILE *f, CONST struct Instance *i);  extern void WriteClique(FILE *f, CONST struct Instance *i);
187  /**<  /**<
188   *  Print all the instance's clique members.   *  Print all the instance's clique members.
189   */   */
190    
191  extern void WriteInstance(FILE *f, CONST struct Instance *i);            extern void ASC_DLLSPEC WriteInstance(FILE *f, CONST struct Instance *i);
192  /**<  /**<
193   *  Print the information contained in i.   *  Print the information contained in i.
194   */   */
195    
196  extern int WritePath(FILE *f, CONST struct gl_list_t *path);  extern int WritePath(FILE *f, CONST struct gl_list_t *path);
197  /**<  /**<
198   *  Returns the number of name pieces written.   *  Returns the number of name pieces written.
199   */   */
200    
201  extern char *WritePathString(CONST struct gl_list_t *path);  extern char *WritePathString(CONST struct gl_list_t *path);
202  /**<  /**<
203   *  <!--  str =  WritePathString(path);                                -->   *  <!--  str =  WritePathString(path);                                -->
204   *  <!--  CONST struct gl_list_t *path;                                -->   *  <!--  CONST struct gl_list_t *path;                                -->
205   *  <!--  char *str;                                                   -->   *  <!--  char *str;                                                   -->
# Line 208  extern char *WritePathString(CONST struc Line 208  extern char *WritePathString(CONST struc
208   */   */
209    
210  extern void SaveInstance(FILE *f, CONST struct Instance *inst, int dorelations);  extern void SaveInstance(FILE *f, CONST struct Instance *inst, int dorelations);
211  /**<  /**<
212   *  Save the information contained in inst in a format that will allow   *  Save the information contained in inst in a format that will allow
213   *  efficient reconstruction of the instance. This will be followed up   *  efficient reconstruction of the instance. This will be followed up
214   *  with RestoreInstance.   *  with RestoreInstance.
215   */   */
216    
217  extern void WriteInstanceList(struct gl_list_t *list);  extern void WriteInstanceList(struct gl_list_t *list);
218  /**<  /**<
219   *  This is a debugging aid and not intended for general use.   *  This is a debugging aid and not intended for general use.
220   *  It assumes that this is a list of instances and will try to write   *  It assumes that this is a list of instances and will try to write
221   *  out the instance name for each element on the list.   *  out the instance name for each element on the list.
# Line 227  extern void WriteAtomValue(FILE *fp, CON Line 227  extern void WriteAtomValue(FILE *fp, CON
227   */   */
228    
229  typedef VOIDPTR (*IPFunc)(struct Instance *,VOIDPTR);  typedef VOIDPTR (*IPFunc)(struct Instance *,VOIDPTR);
230  /**<  /**<
231   *  This is the type of function you should write for use with   *  This is the type of function you should write for use with
232   *  PushInterfacePtrs(). It will be applied to the instances in the   *  PushInterfacePtrs(). It will be applied to the instances in the
233   *  tree. If your function returns anything other than NULL, then   *  tree. If your function returns anything other than NULL, then
# Line 289  extern struct gl_list_t *PushInterfacePt Line 289  extern struct gl_list_t *PushInterfacePt
289   */   */
290    
291  typedef VOIDPTR (*IPDeleteFunc)(struct Instance *, VOIDPTR, VOIDPTR);  typedef VOIDPTR (*IPDeleteFunc)(struct Instance *, VOIDPTR, VOIDPTR);
292  /**<  /**<
293   *  This is a function you supply. It will be called with the pointer   *  This is a function you supply. It will be called with the pointer
294   *  you returned in IPFunc and the matching instance and the void   *  you returned in IPFunc and the matching instance and the void
295   *  you passed to PopInterfacePtrs.   *  you passed to PopInterfacePtrs.
296   *  This is so you may do any destruction of the objects returned by IPFunc.   *  This is so you may do any destruction of the objects returned by IPFunc.
297   */   */
298    
299  extern void PopInterfacePtrs(struct gl_list_t *oldips,  extern void PopInterfacePtrs(struct gl_list_t *oldips,
300                               IPDeleteFunc ipdestroyf,                               IPDeleteFunc ipdestroyf,
301                               VOIDPTR vp);                               VOIDPTR vp);
302  /**<  /**<
# Line 316  extern int ArrayIsRelation(struct Instan Line 316  extern int ArrayIsRelation(struct Instan
316   */   */
317    
318  extern int ArrayIsLogRel(struct Instance *i);  extern int ArrayIsLogRel(struct Instance *i);
319  /**<  /**<
320   *  Returns 1 if the instance sent in is a good logical relation array   *  Returns 1 if the instance sent in is a good logical relation array
321   *  or logical relation, 0 OTHERWISE.   *  or logical relation, 0 OTHERWISE.
322   */   */
323    
324  extern int ArrayIsWhen(struct Instance *i);  extern int ArrayIsWhen(struct Instance *i);
325  /**<  /**<
326   *  Returns 1 if the instance sent in is a good when array   *  Returns 1 if the instance sent in is a good when array
327   *  or when, 0 OTHERWISE.   *  or when, 0 OTHERWISE.
328   */   */
329    
330  extern int ArrayIsModel(struct Instance *i);  extern int ArrayIsModel(struct Instance *i);
331  /**<  /**<
332   *  Returns 1 if the instance sent in is a good model array   *  Returns 1 if the instance sent in is a good model array
333   *  or when, 0 OTHERWISE.   *  or when, 0 OTHERWISE.
334   */   */

Legend:
Removed from v.479  
changed lines
  Added in v.480

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22