a whole. There have been some reports on similar attempts in the literature, see for
example [4], by using planning systems. While we address some of the properties con-
sidered in [4], here we offer an alternative solution to the problem that is closer to our
framework and the methods and tools used in Software Engineering for verification and
validation of software [2].
We are mainly focused on checking semantic correctness of the set of ECA rules as
a whole. We consider here a list of properties whose verification can be automised in
our framework and are important to obtain a more reliable set of ECA rules: a) Consis-
tency: the actions triggered at each step should not be inconsistent. A separate check is
performed to consider consistency of the incoming actions compared with the existing
DB (but this second consistency check is undertaken at run time) (see [1]). b) Trigger-
ability: this checks if each ON clause specification is such that it is always/sometimes
potentially triggerable. c) Joint applicability: this checks if triggerability is possible for
any subset. Due to the computational complexity of this goal N-Joint applicability can
be explored meaning that only possible combinations of up to N rules are explored for
joint applicability. d) Rule coverage: this checks if there are pairs (R1, R2) of rules such
that the triggering conditions of R1 is a subset of the triggering conditions of R2. e) Rule
cascading: this checks if there are any forced sequences of rule activations imposed by
design. f) Postcondition satisfaction: this checks if a given postcondition is achieved
after activation of a rule. An example illustrating this situations can be seen in section
6.2 of [1].
We use an interpreter of the language proposed in [3] where a fragment of MTL,
called MTL-programs is mapped to a constraint logic programming framework which
admits efficient satisfiability checking of the constraints generated. Complexity is in the
worse case linear in the number of variables involved. On the other hand, MTL offers a
language which is expressive enough for us to map the language of our ECA rules into
and to write the queries that allow us to check the properties described previously. We
further restrict the expressiveness of MTL-programs by discarding the past fragment.
Due to space restrictions we do not provide full details of this theoretical frame-
work. Here we instantiate the general framework offered in [3] to a specific case study
and temporal domain so formulas given below will refer to meaningful predicates used
in the ECA rules and metrics will be referred to calendar dates. Although the initial
framework considers an unbounded temporal structure we have natural initial and final
times given by the time where the system started and the present, respectively. Also,
before starting the verification process, the ECA rules have been translated and la-
belled so that a rule ON E IF C DO A will produce an MTL-program-F-based clause
do(RuleID, A) ← E ∧ C. So that the rule will be identified by a unique RuleID.
Actions inconsistency, returns the IDs of rules which are conflicting in any sense that
can be specified by using a predicate conflictingActions:
2(checkInconsistency(RuleID1, RuleID2) ←
do(RuleID1, A1) ∧ do(RuleID2, A2) ∧ conflictingActions(A1, A2))
Further details on how to deal with the other properties can be seen in section 6.3 of
[1].
119