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

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

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

revision 11 by aw0a, Sat Nov 13 16:45:56 2004 UTC revision 33 by ben.allan, Sun Dec 26 20:06:01 2004 UTC
# Line 1  Line 1 
1  /*  /**<
2   *  Value Type Definitions   *  Value Type Definitions
3   *  by Tom Epperly   *  by Tom Epperly
4   *  Created: 1/16/90   *  Created: 1/16/90
# Line 27  Line 27 
27   *  Mass Ave, Cambridge, MA 02139 USA.  Check the file named COPYING.   *  Mass Ave, Cambridge, MA 02139 USA.  Check the file named COPYING.
28   */   */
29    
30  /*  /**<
31   *  When #including value_type.h, make sure these files are #included first:   *  When #including value_type.h, make sure these files are #included first:
32   *         #include "fractions.h"   *         #include "fractions.h"
33   *         #include "compiler.h"   *         #include "compiler.h"
# Line 38  Line 38 
38    
39  #ifndef __VALUE_TYPE_H_SEEN__  #ifndef __VALUE_TYPE_H_SEEN__
40  #define __VALUE_TYPE_H_SEEN__  #define __VALUE_TYPE_H_SEEN__
41  /* requires  /**< requires
42  # #include<stdio.h>  # #include<stdio.h>
43  # #include"compiler.h"  # #include"compiler.h"
44  # #include"list.h"  # #include"list.h"
# Line 48  Line 48 
48  # #include"setinstval.h"  # #include"setinstval.h"
49  */  */
50    
51  /* Note:  /**< Note:
52   * This file is a mess as we are passing around 24 byte structures rather than   * This file is a mess as we are passing around 24 byte structures rather than
53   * pointers to structures. ewww! Anytime you are returned a struct value_t   * pointers to structures. ewww! Anytime you are returned a struct value_t
54   * from any of the functions in this file, remember to call DestroyValue   * from any of the functions in this file, remember to call DestroyValue
# Line 67  Line 67 
67   */   */
68  enum evaluation_error{  enum evaluation_error{
69    type_conflict,    type_conflict,
70    name_unfound,         /* inst of name not made yet */    name_unfound,         /**< inst of name not made yet */
71    incorrect_name,       /* name can never be found */    incorrect_name,       /**< name can never be found */
72    temporary_variable_reused,    temporary_variable_reused,
73    undefined_value,      /* inst exists without being assigned */    undefined_value,      /**< inst exists without being assigned */
74    dimension_conflict,       /* arithmetic error in dimensionality */    dimension_conflict,       /**< arithmetic error in dimensionality */
75    incorrect_such_that,    incorrect_such_that,
76    empty_choice,         /* CHOICE() on an empty set */    empty_choice,         /**< CHOICE() on an empty set */
77    empty_intersection,    empty_intersection,
78    illegal_set_use               /* set used in list context */    illegal_set_use               /**< set used in list context */
79  };  };
80    
81  enum value_kind {  enum value_kind {
# Line 83  enum value_kind { Line 83  enum value_kind {
83    integer_value,    integer_value,
84    symbol_value,    symbol_value,
85    boolean_value,    boolean_value,
86    list_value,   /* keep set and list together */    list_value,   /**< keep set and list together */
87    set_value,   /* set is unique and sorted, or ought to be */    set_value,   /**< set is unique and sorted, or ought to be */
88    error_value    error_value
89  };  };
90    
# Line 94  struct real_value_t{ Line 94  struct real_value_t{
94  };  };
95    
96  union value_union{  union value_union{
97    struct real_value_t r;    /* real value */    struct real_value_t r;    /**< real value */
98    long i;           /* integer value */    long i;           /**< integer value */
99    int b;            /* boolean value */    int b;            /**< boolean value */
100    symchar *sym_ptr;     /* symbol value */    symchar *sym_ptr;     /**< symbol value */
101    struct set_t *sptr;       /* set structure */    struct set_t *sptr;       /**< set structure */
102    struct gl_list_t *lvalues;    /* list of values */    struct gl_list_t *lvalues;    /**< list of values */
103    enum evaluation_error t;  /* type of evaluation error */    enum evaluation_error t;  /**< type of evaluation error */
104  };  };
105    
106  /* v.constant is true if the data from which the value is derived is  /**< v.constant is true if the data from which the value is derived is
107   * impossible to change. Useful in some applications.   * impossible to change. Useful in some applications.
108   * At present it should only be examined for values of type   * At present it should only be examined for values of type
109   * real, boolean, integer, symbol. always true for sets at present.   * real, boolean, integer, symbol. always true for sets at present.
# Line 112  union value_union{ Line 112  union value_union{
112   */   */
113  struct value_t {  struct value_t {
114    enum value_kind t;    enum value_kind t;
115    unsigned int constant; /* since the union aligns on the double, this free */    unsigned int constant; /**< since the union aligns on the double, this free */
116    union value_union u;    union value_union u;
117  };  };
118  /* Be sure that within value_t the union is aligned on an 8 byte boundary  /**< Be sure that within value_t the union is aligned on an 8 byte boundary
119   * or alignment errors will occur. As of 3/96 it does on all   * or alignment errors will occur. As of 3/96 it does on all
120   * CMU architectures (sparc, hp, alpha).   * CMU architectures (sparc, hp, alpha).
121   * Someone really should redo this struct value_t so that it doesn't   * Someone really should redo this struct value_t so that it doesn't
# Line 124  struct value_t { Line 124  struct value_t {
124   */   */
125    
126  void InitValueManager(void);  void InitValueManager(void);
127  /*  /**<
128   *  InitValueManager();   *  InitValueManager();
129   *  Sets up value memory management. This must be called once   *  Sets up value memory management. This must be called once
130   *  before any value_t can be built, ideally at startup time.   *  before any value_t can be built, ideally at startup time.
# Line 134  void InitValueManager(void); Line 134  void InitValueManager(void);
134   */   */
135    
136  void DestroyValueManager(void);  void DestroyValueManager(void);
137  /*  /**<
138   *  DestroyValueManager();   *  DestroyValueManager();
139   *  Destroy value memory management. This must be called to   *  Destroy value memory management. This must be called to
140   *  clean up before shutting down ASCEND.   *  clean up before shutting down ASCEND.
# Line 143  void DestroyValueManager(void); Line 143  void DestroyValueManager(void);
143   */   */
144    
145  void ReportValueManager(FILE*);  void ReportValueManager(FILE*);
146  /*  /**<
147   *  ReportValueManager(f);   *  ReportValueManager(f);
148   *  FILE *f;   *  FILE *f;
149   *  Reports on the value manager to f.   *  Reports on the value manager to f.
150   */   */
151    
152  /* In the macro IVAL, x must be a struct value_t variable,  /**< In the macro IVAL, x must be a struct value_t variable,
153   * NOT a pointer to same.   * NOT a pointer to same.
154   * If you want to init a pointer contents, y, use IVALPTR.   * If you want to init a pointer contents, y, use IVALPTR.
155   */   */
156  #ifdef NDEBUG  #ifdef NDEBUG
157  /* do nothings */  /**< do nothings */
158  #define IVAL(x)  #define IVAL(x)
159  #define IVALPTR(y)  #define IVALPTR(y)
160  #else  #else
161  /* init to 0 */  /**< init to 0 */
162  #define IVAL(x) ValInit(&(x))  #define IVAL(x) ValInit(&(x))
163  #define IVALPTR(y) ValInit(y)  #define IVALPTR(y) ValInit(y)
164  #endif  #endif
165  extern void ValInit(struct value_t *);  extern void ValInit(struct value_t *);
166  /*  /**<
167   *  ValInit(v)   *  ValInit(v)
168   *  Inits the contents of v to 0.   *  Inits the contents of v to 0.
169   *  Do not call this function -- use the IVAL macros   *  Do not call this function -- use the IVAL macros
170   */   */
171    
172  /*  /**<
173   * IVAL(stackvar) should be called on locally allocated   * IVAL(stackvar) should be called on locally allocated
174   * value_t before any other action using them is taken.   * value_t before any other action using them is taken.
175   * When NDEBUG is not defined, it causes the stack memory to be   * When NDEBUG is not defined, it causes the stack memory to be
# Line 180  extern void ValInit(struct value_t *); Line 180  extern void ValInit(struct value_t *);
180    
181    
182  #define ValueKind(v) ((v).t)  #define ValueKind(v) ((v).t)
183  /*  /**<
184   *  macro ValueKind(v)   *  macro ValueKind(v)
185   *  struct value_t v;   *  struct value_t v;
186   *  Return the value of a value_t.   *  Return the value of a value_t.
187   */   */
188    
189  #define IntegerValue(v) ((v).u.i)  #define IntegerValue(v) ((v).u.i)
190  /*  /**<
191   *  macro IntegerValue(v)   *  macro IntegerValue(v)
192   *  struct value_t v;   *  struct value_t v;
193   *  Return the value of an integer or integer_constant value_t.   *  Return the value of an integer or integer_constant value_t.
194   */   */
195    
196  #define RealValue(v) ((v).u.r.value)  #define RealValue(v) ((v).u.r.value)
197  /*  /**<
198   *  macro RealValue(v)   *  macro RealValue(v)
199   *  struct value_t v;   *  struct value_t v;
200   *  Return the real value of a real or real_constant value_t.   *  Return the real value of a real or real_constant value_t.
201   */   */
202    
203  #define BooleanValue(v) ((v).u.b)  #define BooleanValue(v) ((v).u.b)
204  /*  /**<
205   *  macro BooleanValue(v)   *  macro BooleanValue(v)
206   *  struct value_t v;   *  struct value_t v;
207   *  Return the boolean value of a boolean or boolean_constant value_t.   *  Return the boolean value of a boolean or boolean_constant value_t.
208   */   */
209    
210  #define RealValueDimensions(v) ((v).u.r.dimp)  #define RealValueDimensions(v) ((v).u.r.dimp)
211  /*  /**<
212   *  macro RealValueDimensions(v)   *  macro RealValueDimensions(v)
213   *  struct value_t v;   *  struct value_t v;
214   *  Return the dimensions of the real or real_constant value_t.   *  Return the dimensions of the real or real_constant value_t.
215   */   */
216    
217  #define SetValue(v) ((v).u.sptr)  #define SetValue(v) ((v).u.sptr)
218  /*  /**<
219   *  macro SetValue(v)   *  macro SetValue(v)
220   *  struct value_t v;   *  struct value_t v;
221   *  Return the set value of a set value_t.   *  Return the set value of a set value_t.
222   */   */
223    
224  #define SymbolValue(v) ((v).u.sym_ptr)  #define SymbolValue(v) ((v).u.sym_ptr)
225  /*  /**<
226   *  macro SymbolValue(v)   *  macro SymbolValue(v)
227   *  struct value_t v;   *  struct value_t v;
228   *  Return the symbol value of a symbol or symbol_constant value_t.   *  Return the symbol value of a symbol or symbol_constant value_t.
# Line 230  extern void ValInit(struct value_t *); Line 230  extern void ValInit(struct value_t *);
230   */   */
231    
232  #define ErrorValue(v) ((v).u.t)  #define ErrorValue(v) ((v).u.t)
233  /*  /**<
234   *  macro ErrorValue(v)   *  macro ErrorValue(v)
235   *  struct value_t v;   *  struct value_t v;
236   *  Return the error type.   *  Return the error type.
237   */   */
238    
239  extern struct value_t CopyValue(struct value_t);  extern struct value_t CopyValue(struct value_t);
240  /*  /**<
241   *  struct value_t CopyValue(value)   *  struct value_t CopyValue(value)
242   *  struct value_t value;   *  struct value_t value;
243   *  Return a copy of the value.   *  Return a copy of the value.
244   */   */
245    
246  extern struct value_t CreateRealValue(double,CONST dim_type *,unsigned);  extern struct value_t CreateRealValue(double,CONST dim_type *,unsigned);
247  /*  /**<
248   *  struct value_t CreateRealValue(value,dim,constant)   *  struct value_t CreateRealValue(value,dim,constant)
249   *  double value;   *  double value;
250   *  const dim_type *dim;   *  const dim_type *dim;
# Line 254  extern struct value_t CreateRealValue(do Line 254  extern struct value_t CreateRealValue(do
254   */   */
255    
256  extern struct value_t CreateIntegerValue(long,unsigned);  extern struct value_t CreateIntegerValue(long,unsigned);
257  /*  /**<
258   *  struct value_t CreateIntegerValue(value,constant)   *  struct value_t CreateIntegerValue(value,constant)
259   *  long value;   *  long value;
260   *  Create an integer value.   *  Create an integer value.
# Line 263  extern struct value_t CreateIntegerValue Line 263  extern struct value_t CreateIntegerValue
263   */   */
264    
265  extern struct value_t CreateSymbolValue(symchar *,unsigned);  extern struct value_t CreateSymbolValue(symchar *,unsigned);
266  /*  /**<
267   *  struct value_t CreateSymbolValue(sym_ptr,constant)   *  struct value_t CreateSymbolValue(sym_ptr,constant)
268   *  symchar *sym_ptr;   *  symchar *sym_ptr;
269   *  Create a symbol value.   *  Create a symbol value.
# Line 272  extern struct value_t CreateSymbolValue( Line 272  extern struct value_t CreateSymbolValue(
272   */   */
273    
274  extern struct value_t CreateBooleanValue(int,unsigned);  extern struct value_t CreateBooleanValue(int,unsigned);
275  /*  /**<
276   *  struct value_t CreateBooleanValue(truth,constant)   *  struct value_t CreateBooleanValue(truth,constant)
277   *  int truth;   *  int truth;
278   *  Create a boolean value.   *  Create a boolean value.
# Line 281  extern struct value_t CreateBooleanValue Line 281  extern struct value_t CreateBooleanValue
281   */   */
282    
283  extern struct value_t CreateSetValue(struct set_t *);  extern struct value_t CreateSetValue(struct set_t *);
284  /*  /**<
285   *  struct value_t CreateSetValue(sptr)   *  struct value_t CreateSetValue(sptr)
286   *  struct set_t *sptr;   *  struct set_t *sptr;
287   *  Create a set value.   *  Create a set value.
# Line 291  extern struct value_t CreateSetValue(str Line 291  extern struct value_t CreateSetValue(str
291   */   */
292    
293  extern struct value_t CreateSetFromList(struct value_t);  extern struct value_t CreateSetFromList(struct value_t);
294  /*  /**<
295   *  struct value_t CreateSetFromList(value)   *  struct value_t CreateSetFromList(value)
296   *  struct value_t value;   *  struct value_t value;
297   *  Create a set from a list of values. Does not damage the list value given.   *  Create a set from a list of values. Does not damage the list value given.
# Line 303  extern struct value_t CreateSetFromList( Line 303  extern struct value_t CreateSetFromList(
303   */   */
304    
305  extern struct value_t CreateOrderedSetFromList(struct value_t);  extern struct value_t CreateOrderedSetFromList(struct value_t);
306  /*  /**<
307   *  struct value_t CreateOrderedSetFromList(value)   *  struct value_t CreateOrderedSetFromList(value)
308   *  struct value_t value;   *  struct value_t value;
309   *  Create a set from a list of values. The set that will be created will   *  Create a set from a list of values. The set that will be created will
# Line 316  extern struct value_t CreateOrderedSetFr Line 316  extern struct value_t CreateOrderedSetFr
316   */   */
317    
318  extern struct value_t CreateErrorValue(enum evaluation_error);  extern struct value_t CreateErrorValue(enum evaluation_error);
319  /*  /**<
320   *  struct value_t CreateErrorValue(t)   *  struct value_t CreateErrorValue(t)
321   *  enum evaluation_error t;   *  enum evaluation_error t;
322   *  Create an error value.   *  Create an error value.
# Line 325  extern struct value_t CreateErrorValue(e Line 325  extern struct value_t CreateErrorValue(e
325   */   */
326    
327  extern struct value_t CreateVacantListValue(void);  extern struct value_t CreateVacantListValue(void);
328  /*  /**<
329   *  struct value_t CreateEmptyListValue()   *  struct value_t CreateEmptyListValue()
330   *  Create a list value with no elements and minimal memory.   *  Create a list value with no elements and minimal memory.
331   *  Use this when you expect the list to die soon and without expansion.   *  Use this when you expect the list to die soon and without expansion.
# Line 334  extern struct value_t CreateVacantListVa Line 334  extern struct value_t CreateVacantListVa
334   */   */
335    
336  extern struct value_t CreateEmptyListValue(void);  extern struct value_t CreateEmptyListValue(void);
337  /*  /**<
338   *  struct value_t CreateEmptyListValue()   *  struct value_t CreateEmptyListValue()
339   *  Create a list value with no elements but some memory.   *  Create a list value with no elements but some memory.
340   *  Value created is created marked as variable. Mark it as constant   *  Value created is created marked as variable. Mark it as constant
# Line 342  extern struct value_t CreateEmptyListVal Line 342  extern struct value_t CreateEmptyListVal
342   */   */
343    
344  extern void AppendToListValue(struct value_t,struct value_t);  extern void AppendToListValue(struct value_t,struct value_t);
345  /*  /**<
346   *  void AppendToListValue(list,value)   *  void AppendToListValue(list,value)
347   *  struct value_t list,value;   *  struct value_t list,value;
348   *  Add "value" to the list value "list".  This procedure will destory   *  Add "value" to the list value "list".  This procedure will destory
# Line 350  extern void AppendToListValue(struct val Line 350  extern void AppendToListValue(struct val
350   */   */
351    
352  #define IsConstantValue(v) ((v).constant)  #define IsConstantValue(v) ((v).constant)
353  /*  /**<
354   *  Return 1 if value is marked constant, 0 if not.   *  Return 1 if value is marked constant, 0 if not.
355   */   */
356    
357  #define BothConstantValue(va,vb) ((va).constant && (vb).constant)  #define BothConstantValue(va,vb) ((va).constant && (vb).constant)
358  /*  /**<
359   *  Return 1 if both args marked constant, 0 if not.   *  Return 1 if both args marked constant, 0 if not.
360   */   */
361    
362  #define SetConstantValue(v) ((v).constant = 1)  #define SetConstantValue(v) ((v).constant = 1)
363  /*  /**<
364   *  Mark value as constant.   *  Mark value as constant.
365   */   */
366    
367  #define SetVariableValue(v) ((v).constant = 0)  #define SetVariableValue(v) ((v).constant = 0)
368  /*  /**<
369   *  Mark value as constant.   *  Mark value as constant.
370   */   */
371    
372  extern void DestroyValue(struct value_t *);  extern void DestroyValue(struct value_t *);
373  /*  /**<
374   *  This function will deallocate the sets and lists of a value.   *  This function will deallocate the sets and lists of a value.
375   *  Note this requires a pointer. This function does NOT free the   *  Note this requires a pointer. This function does NOT free the
376   *  pointer sent it. It DOES free all the values contained in the list of   *  pointer sent it. It DOES free all the values contained in the list of
# Line 378  extern void DestroyValue(struct value_t Line 378  extern void DestroyValue(struct value_t
378   *  potentially recursive.   *  potentially recursive.
379   */   */
380    
381  /*  /**<
382   *  OPERATIONS: None of the operations below will ever deallocate memory.   *  OPERATIONS: None of the operations below will ever deallocate memory.
383   */   */
384    
385  extern struct value_t AddValues(struct value_t,struct value_t);  extern struct value_t AddValues(struct value_t,struct value_t);
386  /*  /**<
387   *  struct value_t AddValues(value1,value2);   *  struct value_t AddValues(value1,value2);
388   *  struct value_t value1,value2;   *  struct value_t value1,value2;
389   *  return value1 + value2   *  return value1 + value2
# Line 394  extern struct value_t AddValues(struct v Line 394  extern struct value_t AddValues(struct v
394   */   */
395    
396  extern struct value_t SubtractValues(struct value_t,struct value_t);  extern struct value_t SubtractValues(struct value_t,struct value_t);
397  /*  /**<
398   *  struct value_t SubtractValues(value1,value2)   *  struct value_t SubtractValues(value1,value2)
399   *  struct value_t value1,value2;   *  struct value_t value1,value2;
400   *  return value1 - value2   *  return value1 - value2
# Line 404  extern struct value_t SubtractValues(str Line 404  extern struct value_t SubtractValues(str
404   */   */
405    
406  extern struct value_t MultiplyValues(struct value_t,struct value_t);  extern struct value_t MultiplyValues(struct value_t,struct value_t);
407  /*  /**<
408   *  struct value_t MultiplyValues(value1,value2)   *  struct value_t MultiplyValues(value1,value2)
409   *  struct value_t value1,value2;   *  struct value_t value1,value2;
410   *  return value1 * value2   *  return value1 * value2
# Line 417  extern struct value_t MultiplyValues(str Line 417  extern struct value_t MultiplyValues(str
417   */   */
418    
419  extern struct value_t DivideValues(struct value_t,struct value_t);  extern struct value_t DivideValues(struct value_t,struct value_t);
420  /*  /**<
421   *  struct value_t DivideValues(struct value_t,struct value_t)   *  struct value_t DivideValues(struct value_t,struct value_t)
422   *  struct value_t value1,value2;   *  struct value_t value1,value2;
423   *  return value1 / value2   *  return value1 / value2
# Line 430  extern struct value_t DivideValues(struc Line 430  extern struct value_t DivideValues(struc
430   */   */
431    
432  extern struct value_t PowerValues(struct value_t,struct value_t);  extern struct value_t PowerValues(struct value_t,struct value_t);
433  /*  /**<
434   *  struct value_t PowerValues(struct value_t,struct value_t)   *  struct value_t PowerValues(struct value_t,struct value_t)
435   *  struct value_t value1,value2;   *  struct value_t value1,value2;
436   *  return value1 ^ value2   *  return value1 ^ value2
# Line 441  extern struct value_t PowerValues(struct Line 441  extern struct value_t PowerValues(struct
441   */   */
442    
443  extern struct value_t CardValues(struct value_t);  extern struct value_t CardValues(struct value_t);
444  /*  /**<
445   *  struct value_t CardValues(value)   *  struct value_t CardValues(value)
446   *  struct value_t value;   *  struct value_t value;
447   *  Return the cardinality of the set in value.   *  Return the cardinality of the set in value.
# Line 450  extern struct value_t CardValues(struct Line 450  extern struct value_t CardValues(struct
450   */   */
451    
452  extern struct value_t ChoiceValues(struct value_t);  extern struct value_t ChoiceValues(struct value_t);
453  /*  /**<
454   *  struct value_t ChoiceValues(value)   *  struct value_t ChoiceValues(value)
455   *  struct value_t value;   *  struct value_t value;
456   *  return an arbitrary but consistent member of the set in value.   *  return an arbitrary but consistent member of the set in value.
# Line 459  extern struct value_t ChoiceValues(struc Line 459  extern struct value_t ChoiceValues(struc
459   */   */
460    
461  #define FIRSTCHOICE 1  #define FIRSTCHOICE 1
462  /*  /**<
463   *  If FIRSTCHOICE = 0 ChoiceValues uses a fancy method to pick the   *  If FIRSTCHOICE = 0 ChoiceValues uses a fancy method to pick the
464   *  set member, else it will always return the first (in internal   *  set member, else it will always return the first (in internal
465   *  storage) set member. You can guess what our storage is.   *  storage) set member. You can guess what our storage is.
# Line 469  extern struct value_t ChoiceValues(struc Line 469  extern struct value_t ChoiceValues(struc
469   */   */
470    
471  extern struct value_t SumValues(struct value_t);  extern struct value_t SumValues(struct value_t);
472  /*  /**<
473   *  struct value_t SumValues(value)   *  struct value_t SumValues(value)
474   *  struct value_t value;   *  struct value_t value;
475   *  Return the summation of the value.   *  Return the summation of the value.
# Line 480  extern struct value_t SumValues(struct v Line 480  extern struct value_t SumValues(struct v
480   */   */
481    
482  extern struct value_t ProdValues(struct value_t);  extern struct value_t ProdValues(struct value_t);
483  /*  /**<
484   *  struct value_t ProdValues(value)   *  struct value_t ProdValues(value)
485   *  struct value_t value;   *  struct value_t value;
486   *  Return the product of the value.   *  Return the product of the value.
# Line 489  extern struct value_t ProdValues(struct Line 489  extern struct value_t ProdValues(struct
489   */   */
490    
491  extern struct value_t UnionValues(struct value_t);  extern struct value_t UnionValues(struct value_t);
492  /*  /**<
493   *  struct value_t UnionValues(value)   *  struct value_t UnionValues(value)
494   *  struct value_t value;   *  struct value_t value;
495   *  Return the union of the value.   *  Return the union of the value.
# Line 498  extern struct value_t UnionValues(struct Line 498  extern struct value_t UnionValues(struct
498   */   */
499    
500  extern struct value_t IntersectionValues(struct value_t);  extern struct value_t IntersectionValues(struct value_t);
501  /*  /**<
502   *  struct value_t IntersectionValues(value)   *  struct value_t IntersectionValues(value)
503   *  struct value_t value;   *  struct value_t value;
504   *  Return the intersection of the value.  If value is an empty list,   *  Return the intersection of the value.  If value is an empty list,
# Line 508  extern struct value_t IntersectionValues Line 508  extern struct value_t IntersectionValues
508   */   */
509    
510  extern struct value_t OrValues(struct value_t,struct value_t);  extern struct value_t OrValues(struct value_t,struct value_t);
511  /*  /**<
512   *  struct value_t OrValues(value1,value2)   *  struct value_t OrValues(value1,value2)
513   *  struct value_t value1,value2;   *  struct value_t value1,value2;
514   *  Return value1 OR value2. Arguments and result are boolean.   *  Return value1 OR value2. Arguments and result are boolean.
# Line 516  extern struct value_t OrValues(struct va Line 516  extern struct value_t OrValues(struct va
516   */   */
517    
518  extern struct value_t AndValues(struct value_t,struct value_t);  extern struct value_t AndValues(struct value_t,struct value_t);
519  /*  /**<
520   *  struct value_t AndValues(value1,value2)   *  struct value_t AndValues(value1,value2)
521   *  struct value_t value1,value2;   *  struct value_t value1,value2;
522   *  Return value1 AND value2. Arguments and result are boolean.   *  Return value1 AND value2. Arguments and result are boolean.
# Line 524  extern struct value_t AndValues(struct v Line 524  extern struct value_t AndValues(struct v
524   */   */
525    
526  extern struct value_t InValues(struct value_t,struct value_t);  extern struct value_t InValues(struct value_t,struct value_t);
527  /*  /**<
528   *  struct value_t InValues(value1,value2)   *  struct value_t InValues(value1,value2)
529   *  struct value_t value1,value2;   *  struct value_t value1,value2;
530   *  Return value1 IN value2.   *  Return value1 IN value2.
# Line 533  extern struct value_t InValues(struct va Line 533  extern struct value_t InValues(struct va
533   */   */
534    
535  extern struct value_t EqualValues(struct value_t, struct value_t);  extern struct value_t EqualValues(struct value_t, struct value_t);
536  /*  /**<
537   *  struct value_t EqualValues(value1,value2)   *  struct value_t EqualValues(value1,value2)
538   *  struct value_t value1,value2;   *  struct value_t value1,value2;
539   *  Return value1 == value2. Result is boolean.   *  Return value1 == value2. Result is boolean.
# Line 543  extern struct value_t EqualValues(struct Line 543  extern struct value_t EqualValues(struct
543   */   */
544    
545  extern struct value_t NotEqualValues(struct value_t,struct value_t);  extern struct value_t NotEqualValues(struct value_t,struct value_t);
546  /*  /**<
547   *  struct value_t NotEqualValues(value1,value2)   *  struct value_t NotEqualValues(value1,value2)
548   *  sturct value_t value1,value2;   *  sturct value_t value1,value2;
549   *  Return value1 != value2. Result is boolean.   *  Return value1 != value2. Result is boolean.
# Line 554  extern struct value_t NotEqualValues(str Line 554  extern struct value_t NotEqualValues(str
554   */   */
555    
556  extern struct value_t LessValues(struct value_t,struct value_t);  extern struct value_t LessValues(struct value_t,struct value_t);
557  /*  /**<
558   *  struct value_t LessValues(value1,value2)   *  struct value_t LessValues(value1,value2)
559   *  struct value_t value1,value2   *  struct value_t value1,value2
560   *  return value1 < value2. result is boolean.   *  return value1 < value2. result is boolean.
# Line 565  extern struct value_t LessValues(struct Line 565  extern struct value_t LessValues(struct
565   */   */
566    
567  extern struct value_t GreaterValues(struct value_t,struct value_t);  extern struct value_t GreaterValues(struct value_t,struct value_t);
568  /*  /**<
569   *  struct value_t GreaterValues(value1,value2)   *  struct value_t GreaterValues(value1,value2)
570   *  struct value_t value1,value2;   *  struct value_t value1,value2;
571   *  return value1 > value2. result is boolean.   *  return value1 > value2. result is boolean.
# Line 576  extern struct value_t GreaterValues(stru Line 576  extern struct value_t GreaterValues(stru
576   */   */
577    
578  extern struct value_t LessEqValues(struct value_t,struct value_t);  extern struct value_t LessEqValues(struct value_t,struct value_t);
579  /*  /**<
580   *  struct value_t LessEqValues(value1,value2)   *  struct value_t LessEqValues(value1,value2)
581   *  struct value_t value1,value2   *  struct value_t value1,value2
582   *  return value1 <= value2. result is boolean.   *  return value1 <= value2. result is boolean.
# Line 587  extern struct value_t LessEqValues(struc Line 587  extern struct value_t LessEqValues(struc
587   */   */
588    
589  extern struct value_t GreaterEqValues(struct value_t,struct value_t);  extern struct value_t GreaterEqValues(struct value_t,struct value_t);
590  /*  /**<
591   *  struct value_t GreaterEqValues(value1,value2)   *  struct value_t GreaterEqValues(value1,value2)
592   *  struct value_t value1,value2;   *  struct value_t value1,value2;
593   *  return value1 >= value2. result is boolean.   *  return value1 >= value2. result is boolean.
# Line 598  extern struct value_t GreaterEqValues(st Line 598  extern struct value_t GreaterEqValues(st
598   */   */
599    
600  extern struct value_t ApplyFunction(struct value_t, CONST struct Func *);  extern struct value_t ApplyFunction(struct value_t, CONST struct Func *);
601  /*  /**<
602   *  struct value_t ApplyFunction(value,f)   *  struct value_t ApplyFunction(value,f)
603   *  struct value_t value;   *  struct value_t value;
604   *  const struct Func *f;   *  const struct Func *f;
# Line 608  extern struct value_t ApplyFunction(stru Line 608  extern struct value_t ApplyFunction(stru
608   */   */
609    
610  extern struct value_t NegateValue(struct value_t );  extern struct value_t NegateValue(struct value_t );
611  /*  /**<
612   *  struct value_t NegateValue(value)   *  struct value_t NegateValue(value)
613   *  struct value_t value;   *  struct value_t value;
614   *  return - value;   *  return - value;
# Line 616  extern struct value_t NegateValue(struct Line 616  extern struct value_t NegateValue(struct
616   */   */
617    
618  extern struct value_t NotValue(struct value_t);  extern struct value_t NotValue(struct value_t);
619  /*  /**<
620   *  struct value_t NotValue(value)   *  struct value_t NotValue(value)
621   *  struct value_t value;   *  struct value_t value;
622   *  return NOT value; Value and result are boolean.   *  return NOT value; Value and result are boolean.
623   *  If args are constant, result is.   *  If args are constant, result is.
624   */   */
625  #endif /* __VALUE_TYPE_H_SEEN__ */  #endif /**< __VALUE_TYPE_H_SEEN__ */

Legend:
Removed from v.11  
changed lines
  Added in v.33

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