]>
Commit | Line | Data |
---|---|---|
3814599d | 1 | /* |
2 | ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001. | |
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 | ||
29 | extern /*@falsenull@*/ bool functionConstraint_isDefined (functionConstraint) /*@*/ ; | |
30 | # define functionConstraint_isDefined(p_info) ((p_info) != NULL) | |
31 | ||
32 | extern /*@truenull@*/ bool functionConstraint_isUndefined (functionConstraint) /*@*/ ; | |
33 | # define functionConstraint_isUndefined(p_info) ((p_info) == NULL) | |
34 | ||
35 | extern functionConstraint functionConstraint_copy (functionConstraint) /*@*/ ; | |
36 | ||
37 | extern functionConstraint | |
38 | functionConstraint_createBufferConstraint (/*@only@*/ constraintList) ; | |
39 | ||
40 | extern functionConstraint | |
41 | functionConstraint_createMetaStateConstraint (/*@only@*/ metaStateConstraint) ; | |
42 | ||
43 | extern bool functionConstraint_hasBufferConstraint (functionConstraint) /*@*/ ; | |
ba45e1e4 | 44 | extern bool functionConstraint_hasMetaStateConstraint (functionConstraint) /*@*/ ; |
45 | ||
46 | extern functionConstraint | |
47 | functionConstraint_conjoin (/*@only@*/ functionConstraint, /*@only@*/ functionConstraint) ; | |
3814599d | 48 | |
ccf0a4a8 | 49 | extern /*@only@*/ constraintList functionConstraint_getBufferConstraints (functionConstraint) /*@*/ ; |
50 | extern /*@only@*/ metaStateConstraintList functionConstraint_getMetaStateConstraints (functionConstraint) /*@*/ ; | |
3814599d | 51 | |
52 | extern cstring functionConstraint_unparse (functionConstraint) /*@*/ ; | |
53 | extern void functionConstraint_free (/*@only@*/ functionConstraint) ; | |
54 | ||
55 | # else | |
56 | # error "Multiple include" | |
57 | # endif | |
58 | ||
59 | ||
60 | ||
61 |