]>
Commit | Line | Data |
---|---|---|
3814599d | 1 | /* |
c0de361f | 2 | ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003. |
3814599d | 3 | ** See ../LICENSE for license information. |
4 | */ | |
5 | /* | |
6 | ** functionConstraint.h | |
7 | */ | |
8 | ||
9 | # ifndef FCNCONSTRAINT_H | |
10 | # define FcNCONSTRAINT_H | |
11 | ||
12 | typedef enum | |
13 | { | |
ba45e1e4 | 14 | FCT_BUFFER, FCT_METASTATE, FCT_CONJUNCT |
3814599d | 15 | } functionConstraintKind ; |
16 | ||
17 | struct s_functionConstraint { | |
18 | functionConstraintKind kind; | |
19 | union { | |
20 | /*@only@*/ constraintList buffer; | |
21 | /*@only@*/ metaStateConstraint metastate; | |
ba45e1e4 | 22 | struct { functionConstraint op1; functionConstraint op2; } conjunct; |
3814599d | 23 | } constraint; |
24 | } ; | |
25 | ||
26 | /*@constant null functionConstraint functionConstraint_undefined; @*/ | |
27 | # define functionConstraint_undefined ((functionConstraint) NULL) | |
28 | ||
0e41eb0e | 29 | extern /*@falsewhennull@*/ bool functionConstraint_isDefined (functionConstraint) /*@*/ ; |
3814599d | 30 | # define functionConstraint_isDefined(p_info) ((p_info) != NULL) |
31 | ||
c3be2604 | 32 | extern /*@falsewhennull@*/ bool functionConstraint_isBufferConstraint (/*@sef@*/ functionConstraint) /*@*/ ; |
33 | # define functionConstraint_isBufferConstraint(p_con) (((p_con) != NULL) && ((p_con)->kind == FCT_BUFFER)) | |
34 | ||
4287634e | 35 | extern void functionConstraint_addBufferConstraints (functionConstraint p_node, /*@only@*/ constraintList) |
36 | /*@modifies p_node@*/ ; | |
c3be2604 | 37 | |
0e41eb0e | 38 | extern /*@nullwhentrue@*/ bool functionConstraint_isUndefined (functionConstraint) /*@*/ ; |
3814599d | 39 | # define functionConstraint_isUndefined(p_info) ((p_info) == NULL) |
40 | ||
41 | extern functionConstraint functionConstraint_copy (functionConstraint) /*@*/ ; | |
42 | ||
43 | extern functionConstraint | |
44 | functionConstraint_createBufferConstraint (/*@only@*/ constraintList) ; | |
45 | ||
46 | extern functionConstraint | |
47 | functionConstraint_createMetaStateConstraint (/*@only@*/ metaStateConstraint) ; | |
48 | ||
49 | extern bool functionConstraint_hasBufferConstraint (functionConstraint) /*@*/ ; | |
ba45e1e4 | 50 | extern bool functionConstraint_hasMetaStateConstraint (functionConstraint) /*@*/ ; |
51 | ||
52 | extern functionConstraint | |
53 | functionConstraint_conjoin (/*@only@*/ functionConstraint, /*@only@*/ functionConstraint) ; | |
3814599d | 54 | |
ccf0a4a8 | 55 | extern /*@only@*/ constraintList functionConstraint_getBufferConstraints (functionConstraint) /*@*/ ; |
56 | extern /*@only@*/ metaStateConstraintList functionConstraint_getMetaStateConstraints (functionConstraint) /*@*/ ; | |
3814599d | 57 | |
58 | extern cstring functionConstraint_unparse (functionConstraint) /*@*/ ; | |
59 | extern void functionConstraint_free (/*@only@*/ functionConstraint) ; | |
60 | ||
61 | # else | |
62 | # error "Multiple include" | |
63 | # endif | |
64 | ||
65 | ||
66 | ||
67 |