An Abstract Interpretation Framework for Diagnosis and Verification of Timed Concurrent Constraint Languages

Nowadays, concurrent and reactive systems are widely used in a great variety of modern applications. We can think, for example, in mobile phone applications or in the software used in the medical or in the financial sphere. It is often the case that these applications are classified as critical, therefore a single error in the system can lead to catastrophic consequences. It is well known that finding program bugs is a very hard task, which become even worse when it is necessary to deal with time and concurrency features. For these reasons, formal verification of concurrent and reactive systems is a hot topic in modern computer science. The concurrent constraint paradigm (ccp in short) is a simple but powerful model for concurrent systems. It is different from other programming paradigms mainly due to the notion of store-as-constraint that replaces the classical store-as-valuation model. In this way, the languages from this paradigm can easily deal with partial information (an underlying constraint system handles constraints on system variables). Within the ccp family, the Timed Concurrent Constraint Language (tccp in short) adds to the original ccp model the notion of time and the ability to capture the absence of information. With these features, it is possible to specify—in a very natural way— behaviors typical of reactive systems such as timeouts or preemption actions. The existing formal techniques for the verification of tccp are based on model checking. Model checking is a verification method that, given a graph representation of the program and a temporal logic formula, is able to check if the program satisfies the formula. However, this method suffers the state-explosion problem, i.e., the dimension of the graph grows exponentially w.r. t. the dimension of the program. This problem limits the use of model checking, especially in presence of concurrency. In the field of formal verification, abstract interpretation is a valid alternative to model checking. Abstract interpretation is a theory of sound semantic approximation proposed with the aim of providing a general framework for analysis, verification and debugging of systems. The main idea behind this approach is to approximate the program behavior (or concrete semantics) into an abstract semantics in order to obtain effectiveness and efficiency at the price of losing some precision in the results. In this thesis, we propose a semantic framework for tccp based on abstract interpretation with the main purpose of formally verifying and debugging tccp programs. A key point for the efficacy of the resulting methodologies is the adequacy of the concrete semantics. Thus, in this thesis, much effort has been devoted to the development of a suitable small-step denotational semantics for the tccp language to start with. Our denotational semantics models precisely the small-step behavior of tccp and is suitable to be used within the abstract interpretation framework. Namely, it is defined in a compositional and bottom-up way, it is as condensed as possible (it does not contain redundant elements), and it is goal-independent (its calculus does not depend on the semantic evaluation of a specific initial agent). Another contribution of this thesis is the definition (by abstraction of our small-step denotational semantics) of a big-step denotational semantics that abstracts away from the information about the evolution of the state and keeps only the the first and the last (if it exists) state. We show that this big-step semantics is essentially equivalent to the input-output semantics defined by de Boer, Gabbrielli and Meo in [43]. In order to fulfill our goal of formally validate tccp programs, we build different approximations of our small-step denotational semantics by using standard abstract interpretation techniques. In this way we obtain debugging and verification tools which are correct by construction. More specifically, we propose two abstract semantics that are used to formally debug tccp programs. The first one approximates the information content of tccp behavioral traces, while the second one approximates our small-step semantics with temporal logic formulas. By applying abstract diagnosis with these abstract semantics we obtain two fully-automatic verification methods for tccp.