Page 193 -
P. 193

184                                                          M. Pesic
                           ConDec language. ConDec provides more than 20 constraint templates, among
                           which are the ones depicted in Fig. 6.5. ConDec templates are structured into three
                           groups: (1) Existence templates specify how many times or when a task can be
                           executed, for example, init and existence templates; (2) relation templates define
                           some relation between two (or more) tasks, for example, response, precedence,
                           and succession;(3) negation templates define a negative relation between tasks, for
                           example, not coexistence; and (4) choice templates define a choice between tasks,
                           for example, 1of 4.
                              Figure 6.7 depicts the relation between constraint templates, constraints, and
                           models for ConDec. At the template abstraction level, templates are defined on a
                           predefined number of abstract parameters (e.g., parameter A and B). When a con-
                           straint is specified, the abstract parameter is replaced by a concrete one, for example,
                           in Fig. 6.7 the left precedence constraint concretizes abstract parameter A from the
                           precedence template with concrete parameter bill. A “plain” constraint is a con-
                           cretization of the predefined parameters of a constraint template (cf. Fig. 6.6). Each
                           constraint can easily be extended to deal with more parameters than defined by its
                           template by the means of branching.
                              Every ConDec template involves a specific number of tasks. For example, tem-
                           plates existence(A), precedence(A,B),and 1 of 4(A,B,C,D) involve one, two, and
                           four tasks, respectively. When a constraint is created based on a template, the con-
                           straint will involve as many real tasks as predefined in the template. Templates can
                           be reused to specify different constraints, as shown for the precedence template in
                           Fig. 6.7. Finally, constraints from the ConDec constraint templates can be used to
                           specify ConDec models.



                                                 GRAPHICAL                LTL FORMULA
                              TEMPLATE       A                B     (! A) W B

                              ‘PLAIN’
                                            pickup            bill  (! bill) W pickup
                              CONSTRAINT
                                            pickup
                              BRANCHED
                              CONSTRAINT
                                                              bill  (! bill) W (pickup \/ deliver)
                                           delivery
                                             A1
                              BRANCHED
                              CONSTRAINT     A2                     (! B) W (A1 \/ A2  \/ … \/ AN)
                              TO MULTIPLE                     B
                              TASKS          ...
                                             AN

                           Fig. 6.6 Branching the response template
   188   189   190   191   192   193   194   195   196   197   198