Formal Modeling of a Generic Middleware to Ensure

Formal Modeling of a Generic Middleware to Ensure

Formal Modeling of a Generic Middleware to ∗ Ensure Invariant Properties Xavier Renault1, J´erˆome Hugues2, and Fabrice Kordon1 1 Universit´ePierre & Marie Curie, Laboratoire d’Informatique de Paris 6/MoVe 4, place Jussieu, F-75252 Paris CEDEX 05, France [email protected],[email protected] 2 GET-T´el´ecom Paris – LTCI-UMR 5141 CNRS 46, rue Barrault, F-75634 Paris CEDEX 13, France [email protected] Abstract. The complexity of middleware leads to complex Applica- tion Programming Interfaces (APIs) and semantics, supported by con- figurable components in the middleware. Those components are selected to provide the desired semantics. Yet, incorrect configuration can lead to faulty middleware executions, detected late in the development cycle. We use formals methods to tackle this problem. They allow us to find appropriate composition of middleware components and the use of their APIs, and to detect valid or faulty sequences. To provide reusable results, we modeled a canonical middleware architecture using Z. We propose a validation scenario to verify middleware’s invariants. We define invariants to exhibit inconsistent usage of these APIs. The speci- fication has been checked with the Z/EVES [13] theorem prover. 1 Introduction Middleware is now a central piece of many applications. Therefore, expectations about middleware reliability increase. To meet this goal, their architecture is being revisited, cleaned to exhibit structuring patterns. For example, TAO [12] or Zen [10] take advantage of Design Patterns to provide a safer design. Based on this architecture, the middleware can be tuned to operate dedicated policies (tasking management, memory allocation, etc.). Yet, these complex assemblies of design patterns has never been formally proved in an easy and efficient way. Thus, components interactions may lead to faulty configurations lately detected. A way to tackle this problem is to define and check invariants [5]. This is a way to express stability conditions on software components. For example, one can use OCL [9] to declare such invariants. Should the middleware architecture be formally specified and its invariants formally expressed, one can define use case scenarios to verify the system. We aim to model middleware’s components to ensure their composition. We specify invariants (e.g. array size of some internal structures, unicity of identifiers) for each component and check if they are verified for the selected assembly. ∗ This work is funded in part by the ANR/RNTL Flex-eWare project. Z [13] is an algebraic specification language, based on the mathematical typed set theory. It has a schema notation, which allow one to specify structures in the system. It relies on a decidable type system, allowing one to automatically perform well-formedness checking (e.g. interface matching, resource usage). In this paper we use Z to specify middleware services. We compose them as a middleware developer or user would do. Then we formally prove that query identifiers are consistent. Section 2 sketches the use of formal methods for middleware. Then Section 3 presents the canonical middleware we selected. Section 4 details its modeling with Z, and section 5 shows how we prove important properties on the system. 2 Applying Formal Methods to Middleware Middleware provides a set of mechanisms to support distribution functions. Its typical architecture is made of components, each of which supports a particular step in the processing of interactions. Interactions are supported by the exchange of messages between a client and a server, representing the caller and the callee. Middleware’s architecture is a set of components supporting the different steps of this interaction. The use of components (and their variations, imple- menting different configurations or policies) allows developers to tune or to select configurations/policies to configure and deploy a middleware that meet applica- tion requirements. A middleware configuration is defined as a set of components implementation selected to fulfill requirements. So far, middleware are described through their components and the service they implement. Components are often described with semi-formal notation such as UML. These notations allow to express invariants (e.g. OCL in UML). However, very few middleware specification is based on formal methods. This is a problem because formal specification of components and their related prop- erties is needed to formally ensure that invariants are still valid for a given configuration (e.g. the selected implementation of components respect the mid- dleware invariants). Related Works There are two main approaches using formal methods in such context: dynamic and static. Dynamic Verification deals with the system’s behavior. It is the enumeration and analysis of all the states the system can reach during its execution. It is of interest to check if the system is deadlock or livelock free (model-checking). For example, in [11], LOTOS is used to build a formal framework to specify a middleware behavior based on its architecture [2]. Petri Nets [14] are also used to verify that PolyORB’s core is both livelock and deadlock free [6]. Static Verification deals with structural aspects of a system and relies on predicate logic [5]. It is appropriate to analyse systems architectures, such as composition of interfaces from a typing theory point of view. It is also useful to check that invariants defined in the specification remains when components are composed. For example, in [1] the Z algebraic notation is used to verify the CORBA [4] object model: this study exhibits inconsistencies in the OMG CORBA Security Services. Similar work has been achieved on the CORBA Nam- ing Service [7] or on parts of the POSIX real-time standard [3]. They both char- acterize potential problems in the use of components (such as logical naming or messages typing). Z is also used in [8] to specify the architecture of a cognitive application for redesign. However there is no approach that really deals with middleware architecture issues. They only describe high-level services or behavior. Our Approach We first analyse the architecture of a middleware to find rele- vant abstractions of the system. We also specify properties: 1) inside components, 2) at components interfaces, and 3) at the composition level. The chosen architecture (presented in Section 3) is modular and versatile. It provides de facto a set of interesting abstractions for formal description. This work is complementary to the state of the art because we focus on the verification of properties for a given components assembly. In an idealistic middleware development process, architecture verification ap- pears after static verification (that deals with service specification) and before the dynamic verification (that ensures behavior of the system). It aims at build- ing a middleware correct by construction. For example, we want to ensure that a configuration (i.e. a specific instantiation of selected components expressed by their formal specification) will not lead to a non-functionnal middleware (for instance one that cannot process requests). 3 Middleware Architectures New architectures based on design patterns and genericity ease middleware adap- tation by enhancing their configurability capabilities[12][10]. However their de- velopment process is not clearly specified and remains complex because it re- quires the implementation of most of the middleware functions. We present in this section the characteristics of a specific middleware archi- tecture we chose for our study. The Schizophrenic architecture [15] is based on a Neutral Core Middleware (NCM), on which we can plug application-level and protocol-level personalities. The Neutral Core Middleware (NCM) provides a set of canonical services on which we can build higher level services. The former are generic components for which a general implementation is provided. They are sufficient to describe various distribution models. Application personalities are the adaptation layer between application com- ponents and middleware through a dedicated API or code generator. They reg- ister application components within the NCM; they interact with it to enable the exchange of requests between entities at the application-level. Protocol personalities handle the mapping of personality-neutral requests (representing interactions between application entities) onto messages transmit- ted through a communication channel. We chose the Schizophrenic architecture because the core of the middleware fits to formally specify services and invariants in the system: main services are grouped in this core, easing the formal analysis of the middleware. PolyORB implements a schizophrenic architecture presented in [15]. It demon- strates the concept is sound: it implements multiple personalities like CORBA, GIOP, Distributed Systems Annex of Ada, a Message Oriented Middleware de- rived from Java’s JMS and SOAP. From the NCM, we identify seven steps in the processing of a request, each of which is defined as a fundamental service. Their associated level is the middleware is depicted in Figure 1. We present these fundamental services and their specific roles: first, the client looks up server’s reference using the addressing service (a). Then, it uses the binding factory (b) to establish a connection with the server, using one commu- nication channels (e.g. sockets, protocol stack). Request parameters are mapped onto a representation suitable for transmission over network, using the repre- sentation service (c) (e.g. CORBA

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    16 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us