{{:mucimg.jpg|}} ====== Lecture 2 : Formal Methods for Middleware verification ====== * Date : December, 14th 2009 * Instructor : A. Ressouche and J.-Y. Tigli * Duration : 4h There are currently two families of formal methods. These two approaches are complementary. ===== Proof-based verification ===== Example : such as B or Z In proof-based methods, the model is described by means of axioms, properties are theorems to be verified using a theorem prover. Proof-based techniques allow the analysis of infinite systems. However, the use of a theorem prover is a very difficult and a very technical task that is hard to automate. === References === * Abrial, J., “Z: an introduction to formal methods,” Cambridge University Press, 1995. * Diller, A., “The B-book,” John Willey & SONS, 1994. ===== Model-checking ===== Example : such as Spin or Lustre. In model checking, the model is expressed using a language from which an exhaustive execution can be computed (this usually requires a mathematically based definition). An “execution engine” produces the exhaustive state space associated to the system as a graph where actions (atomic instructions in the language) relate to states (a given possible value of the system’s context). It is then possible to explore the graph to check if a property is satisfied. Model checking is dedicated to finite-state systems but modeling and verification can be done using graphical toolkits and most steps can be automated === References === * Halbwachs, N., A tutorial of Lustre (1993). ====== Ressources : ====== * Slides of the lecture "Synchronous Languages Verification" : [[http://rainbow.i3s.unice.fr/~tigli/cours/MUC/Lecture2/Lecture2_MUC_UBINET_2010_verif_slides.pdf|Synchronous Languages Verification]] * Lustre Manual : {{https://rainbow.i3s.unice.fr/~tigli/cours/MUC/Lecture2/LustreManual/lv4man.ps| paper }} * Sample Lustre programs to illustrate the lecture [[http://rainbow.i3s.unice.fr/~tigli/cours/MUC/Lecture2/Lecture%202%20Sample%20programs.zip|Sample Lustre programs]] * Documentation for the tutorial 3 " Verification with Lustre and Lesar " : [[http://rainbow.i3s.unice.fr/~tigli/cours/MUC/Lecture2/Tutorial3_MUC_Ubinet_2010_Doc.pdf|Tutorial 3, Verification with Lustre and Lesar]] * Sample code in Lustre: [[http://rainbow.i3s.unice.fr/~tigli/cours/MUC/Lecture2/Tutorial3/|Tutorial 3, sample code in Lustre]] * Documentation for the tutorial 2 "Creating an advanced Component in WComp 2.0" : [[http://rainbow.i3s.unice.fr/~tigli/cours/MUC/Lecture2/Tutorial2_MUC_Ubinet_2010_Doc.pdf|Tutorial 2, Creating an advanced Component in WComp 2.0]] ===== References ===== * On the Formal Verification of Middleware Behavioral Properties, Jérôme Huguesa, Thomas Vergnauda, Laurent Pauteta, Yann Thierry-Miega, Soheib Baarira, and Fabrice Kordona, Electronic Notes in Theoretical Computer Science, Elsevier editor, Volume 133, 31 May 2005, Pages 139-157, Proceedings of the Ninth International Workshop on Formal Methods for Industrial Critical Systems (FMICS 2004) ====== Tools : ====== ===== Lustre ===== Software : [[http://www-verimag.imag.fr/~raymond/LNW1023/|Lustre V4 / Lesar Distribution]] Lustre/Lesar V4 for cygwin This distribution is experimental. == Requirements :== It requires a recent, fully installed version of the cygwin system for Windows (gcc, g++, tcl/tk etc). [[http://www.cygwin.com/|Cywin installation ]] == Installation :== Within a cygwin shell, extract the archive (typically in /usr/local). Modify your bashrc file with: export LUSTRE_INSTALL=/usr/local/lustre export PATH=$LUSTRE_INSTALL/bin:$PATH export MANPATH=$MANPATH:$LUSTRE_INSTALL/man: [[http://www-verimag.imag.fr/~raymond/LNW1023/cygwin/lv4-cyg-00.tgz|windows beta distribution]] ===== NuSMV ===== [[http://nusmv.irst.itc.it/NuSMV/index.html|An overview of NuSMV]] NuSMV is a software tool for the formal verification of finite state systems. It has been developed jointly by ITC-IRST and by Carnegie Mellon University. NuSMV allows to check finite state systems against specifications in the temporal logic CTL. The input language of NuSMV is designed to allow the description of finite state systems that range from completely synchronous to completely asynchronous. The NuSMV language (like the language of SMV) provides for modular hierarchical descriptions and for the definition of reusable components. The basic purpose of the NuSMV language is to describe (using expressions in propositional calculus) the transition relation of a finite Kripke structure. This provides a great deal of flexibility, but at the same time it can introduce danger of inconsistency (for non expert users).