1 ///////////////////////////////////////////////////////////////////////////////
2 // This file is generated automatically using Prop (version 2.3.6),
3 // last updated on Nov 2, 1999.
4 // The original source file is "collection.ph".
5 ///////////////////////////////////////////////////////////////////////////////
7 #line 1 "collection.ph"
8 ///////////////////////////////////////////////////////////////////////////////
10 // This file describe the collection datatypes in Prop.
12 ///////////////////////////////////////////////////////////////////////////////
13 #ifndef collection_datatypes_h
14 #define collection_datatypes_h
18 ///////////////////////////////////////////////////////////////////////////////
20 // CollectionAttrib describes the set of extension properties that
21 // a collection may have.
23 ///////////////////////////////////////////////////////////////////////////////
24 enum { COLLECTION_NONE
= 0,
25 COLLECTION_ORDERED
= 1, // is it ordered?
26 COLLECTION_IDEMPOTENT
= 2, // no duplicates?
27 COLLECTION_SINGLE_VALUED
= 4, // single valued map?
28 COLLECTION_EXTERNAL_KEYED
= 8 // external ordering function?
31 ///////////////////////////////////////////////////////////////////////////////
33 // Operations that can be performed on a collection.
35 ///////////////////////////////////////////////////////////////////////////////
36 enum { OP_size
= 1<<1, // cardinality
37 OP_capacity
= 1<<2, // maximum capacity
38 OP_growth
= 1<<3, // dynamic expansion
39 OP_copy
= 1<<4, // copy
40 OP_move
= 1<<5, // destructive copy
41 OP_merge
= 1<<6, // destructive merge
42 OP_with
= 1<<7, // insert an element by key
43 OP_less
= 1<<8, // delete an element by key
44 OP_union
= 1<<9, // union
45 OP_intersect
= 1<<10, // intersection
46 OP_arb
= 1<<11, // choose an arbitrary element
47 OP_delete
= 1<<12, // self deletion
48 OP_forall
= 1<<13, // iteration
49 OP_minkey
= 1<<14, // find min element by key
50 OP_maxkey
= 1<<15, // find max element by key
51 OP_deletemin
= 1<<16, // delete min element by key
52 OP_deletemax
= 1<<17, // delete max element by key
53 OP_count
= 1<<18, // count element by key
54 OP_map
= 1<<19, // f(x)
55 OP_mapall
= 1<<20, // f{x}
56 OP_inverse
= 1<<21, // f^{-1}{x}
57 OP_dom
= 1<<22, // dom f
58 OP_ran
= 1<<23 // ran f
61 ///////////////////////////////////////////////////////////////////////////////
63 // Intensional properties are described by CollectionRep.
65 ///////////////////////////////////////////////////////////////////////////////
68 REP_unbased
= 1<<1, // linked list representation
69 REP_weakly_based
= 1<<2, // linked list representation
70 REP_strongly_based
= 1<<3, // linked list representation
71 REP_array
= 1<<4, // array representation
72 REP_based
= 1<<5, // based set representation
73 REP_bitmap
= 1<<6, // bitmap representation
74 REP_hash
= 1<<7, // hash table representation
75 REP_heap
= 1<<8 // binary heap representation
78 ///////////////////////////////////////////////////////////////////////////////
80 // The collection type descriptor is described as follows. All collection
81 // types are generative.
83 ///////////////////////////////////////////////////////////////////////////////
84 #line 77 "collection.ph"
85 #line 85 "collection.ph"
86 ///////////////////////////////////////////////////////////////////////////////
88 // Forward class definition for CollectionDesc
90 ///////////////////////////////////////////////////////////////////////////////
91 #ifndef datatype_CollectionDesc_defined
92 #define datatype_CollectionDesc_defined
93 class a_CollectionDesc
;
94 typedef a_CollectionDesc
* CollectionDesc
;
97 ///////////////////////////////////////////////////////////////////////////////
98 // Definition of type CollectionOp
99 ///////////////////////////////////////////////////////////////////////////////
100 #line 82 "collection.ph"
101 typedef int CollectionOp
;
103 ///////////////////////////////////////////////////////////////////////////////
104 // Definition of type CollectionAttrib
105 ///////////////////////////////////////////////////////////////////////////////
106 #line 83 "collection.ph"
107 typedef int CollectionAttrib
;
109 ///////////////////////////////////////////////////////////////////////////////
110 // Definition of type CollectionDescs
111 ///////////////////////////////////////////////////////////////////////////////
112 #line 84 "collection.ph"
113 typedef a_List
<CollectionDesc
> * CollectionDescs
;
115 ///////////////////////////////////////////////////////////////////////////////
117 // Class for datatype constructor CollectionDesc::COLdesc
119 ///////////////////////////////////////////////////////////////////////////////
120 class a_CollectionDesc
: public MEM
{
122 #line 77 "collection.ph"
123 Id name
; CollectionAttrib attrib
; CollectionRep rep
;
124 a_CollectionDesc (Id x_name
, CollectionAttrib x_attrib
= COLLECTION_NONE
, CollectionRep x_rep
= REP_none
);
126 inline int boxed(const a_CollectionDesc
*) { return 1; }
127 inline int untag(const a_CollectionDesc
*) { return 0; }
128 ///////////////////////////////////////////////////////////////////////////////
130 // Datatype constructor functions for CollectionDesc
132 ///////////////////////////////////////////////////////////////////////////////
133 extern a_CollectionDesc
* COLdesc (Id x_name
, CollectionAttrib x_attrib
= COLLECTION_NONE
, CollectionRep x_rep
= REP_none
);
135 #line 85 "collection.ph"
136 #line 85 "collection.ph"
140 #line 88 "collection.ph"
142 ------------------------------- Statistics -------------------------------
143 Merge matching rules = yes
144 Number of DFA nodes merged = 0
145 Number of ifs generated = 0
146 Number of switches generated = 0
149 Adaptive matching = enabled
150 Fast string matching = disabled
151 Inline downcasts = enabled
152 --------------------------------------------------------------------------