March 2009 Tools for VDM in Industry 1 Tools for VDM in Industry Professor Peter Gorm Larsen Professor Peter Gorm Larsen Engineering College of Aarhus Engineering College of Aarhus ( ([email protected]) ) Also adjunct professor at Aarhus Also adjunct professor at Aarhus University University
59
Embed
March 2009Tools for VDM in Industry1 Professor Peter Gorm Larsen Engineering College of Aarhus ([email protected]) [email protected] Also adjunct professor at Aarhus.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
March 2009 Tools for VDM in Industry 1
Tools for VDM in Industry
Professor Peter Gorm LarsenProfessor Peter Gorm LarsenEngineering College of AarhusEngineering College of Aarhus
(([email protected]))Also adjunct professor at Aarhus University Also adjunct professor at Aarhus University
March 2009 Tools for VDM in Industry 2
Personal Background• Theoretical Work
• VDM-SL Semantics (ISO standard)• VDM-SL Proof Rules (PhD work)
• More Practical Work• VDM and Structured Analysis in combination• VDMTools architect• Transfer VDM to Industry• Intensive use Industrially
• Employed by• For 13 years: IFAD A/S• For 3,5 years: Systematic Software Engineering A/S• For 3,5 years:
• Engineering College of Aarhus
March 2009 Tools for VDM in Industry 3
Tools for VDM in Industry
Industrial Experience with VDM
• ”Bootstrapping” VDMTools
• Overview of VDMTools
• The Overture/Eclipse Initiative
• Vision for the future
March 2009 Tools for VDM in Industry 4
References, World-wide, 2001
FranceFranceAerospatiale Espace et DefenseAerospatiale Espace et DefenseDassault AviationDassault AviationDasssault ElectroniqueDasssault ElectroniqueCISI CEA et DefenseCISI CEA et DefenseCEA LetiCEA LetiCap GeminiCap GeminiLAASLAASMatra Bae DynamicsMatra Bae Dynamics
U.K.U.K.British Aerospace Systems & British Aerospace Systems & EquipmentEquipmentBritish Aerospace DefenseBritish Aerospace DefenseAdelardAdelardICL Enterprise EngineeringICL Enterprise EngineeringRolls RoyceRolls RoyceTransitive TechnologiesTransitive Technologies
ItalyItalyENEAENEAAnsaldoAnsaldo
The NetherlandsThe NetherlandsDutch Dept. of DefenceDutch Dept. of DefenceOriginOriginChessChess
PortugalPortugalSidereusSidereus
DenmarkDenmarkBaan NordicBaan NordicOdense Steel ShipyardOdense Steel ShipyardDDC InternationalDDC International
North AmericaNorth AmericaBoeingBoeingRockwell CollinsRockwell CollinsLockheed MartinLockheed MartinDDC-I, Inc.DDC-I, Inc.Rational Software Corp.Rational Software Corp.Formal Systems Inc.Formal Systems Inc.Concordia UniversityConcordia University
• Mobile FeliCa IC chips can be embedded inside mobile phones
• Used for different on-line services including payment• Uses Near-Field-Communication technology• Used for example for metro ticking in Tokyo• The IC Chips contains an operating system as
firmware for 50 million mobile phones• This is fully developed using the VDM++ technology• Between 50 and 60 people in total on the project
Further Information• Applying Formal Specification in Industry. P.G. Larsen, J.
Fitzgerald and T. Brookes. Published in "IEEE Software" vol. 13, no. 3, May 1996
• A Lightweight Approach to Formal Methods S.Agerholm and P.G. Larsen. In Proceedings of the International Workshop on Current Trends in Applied Formal Methods, Boppard, Germany, Springer-Verlag, October 1998.
• Applications of VDM in Banknote Processing P. Smith and P.G. Larsen. + Application of VDM-SL to the Development of the SPOT4 Programming Messages Generator, A. Puccetti and J.Y. Tixadou + Formal Specification of an Auctioning System Using VDM++ and UML, M.Verhoef et. al.Published at the First VDM Workshop: VDM in Practice with the FM'99 Symposium, Toulouse, France, September 1999.
• Application of a Formal Specification Language in the Development of the ``Mobile FeliCa'' IC Chip Firmware for Embedding in Mobile Phone, Taro Kurita and Miki Chiba and Yasumasa Nakatsugawa, Springer-Verlag, FM2008, May 2008.
• GNU C++/Visual C++• Generic VDM C++ library• GUI: Previously:Tcl/Tk, Now: Qt• flex and bison• CVS/Ediff version control• OSs: Windows, Linux, Unix • Test environments• Development procedures
• Scanner/parser (lex/yacc)• pretty-printer (simple C++ component)• GUI (previously: Tcl/Tk, now: Qt)• Interface to third party tools
• Rational Rose and XMI based UML tools
• Corba for API
• ML for HOL
• Generic VDM C++ library
March 2009 Tools for VDM in Industry 31
VDM + Hand Coding
• Dynamic semantics (SL and ++)• Static semantics (SL and ++)• Java/C++ Code generators (SL and ++)• Test environments for each component• Reused at implementation level• Java/C++ code generators now themselves
partially code generated
March 2009 Tools for VDM in Industry 32
Maintenance Approach
• Bugs first reproduced at specification level• Tested using the VDM debugger• Check that all tests are satisfactory• Implement changes of specification• Rerun all tests at implementation level
March 2009 Tools for VDM in Industry 33
VDM + code generation
• Animator for SA/RT• Specification Manager (SL and ++)• VDM++ to/from UML translation• Proof support (SL)• Parts of GUI now code generated• VDM model becomes source• Trade-off with abstraction
March 2009 Tools for VDM in Industry 34
Tools for VDM in Industry
Industrial Experience with VDM
”Bootstrapping” VDMTools
Overview of VDMTools
• The Overture/Eclipse Initiative
• Vision for the future
March 2009 Tools for VDM in Industry 35
VDMTools Overview
Rose-VDM++ Link
Document Generator
Code Generators- C++, Java
Syntax & Type Checker
API (Corba), DL Facility
Interpreter (Debugger)
Integrity CheckerJava to VDM++
Round Trip Engineering support
Experimentally linked to HOL
Syntax & Type Checker
Integrity Checker
March 2009 Tools for VDM in Industry 36
Japanese Support via Unicode
March 2009 Tools for VDM in Industry 37
Validation with VDMTools®
VDM specsVDM specs
Test casesTest cases Expected resultsExpected results
Actual resultsActual results
ComparisonComparison
ExecutionExecution
March 2009 Tools for VDM in Industry 38
Documentation in MS Word/RTF
One compound document:One compound document:
• Documentation
• Specification
• Test coverage
• Test coverage
statistics
March 2009 Tools for VDM in Industry 39
Architecture of the Rose VDM++ Link
VDM++ ToolboxVDM++ Toolbox Rational Rose 2000Rational Rose 2000
Further Information• An Executable Subset of Meta-IV with Loose Specification, P.G.
Larsen, P.B. Lassen, VDM '91: Formal Software Development Methods, 1991
• The IFAD VDM-SL Toolbox: A Practical Approach to Formal Specifications, R. Elmstrøm, P.G. Larsen, P.B. Lassen, ACM Sigplan Notices, September 1994
• Computer-aided Validation of Formal Specifications, P. Mukherjee, Software Engineering Journal, July 1995
• Ten Years of Historical Development - ”Bootstrapping” VDMTools, P.G. Larsen, Journal of Universal Computer Science, 2001
• VDMTools: advances in support for formal modeling in VDM, J. S. Fitzgerald and P. G. Larsen and S. Sahara, ACM Sigplan Notices, February 2008
March 2009 Tools for VDM in Industry 44
Tools for VDM in Industry
Industrial Experience with VDM
”Bootstrapping” VDMTools
Overview of VDMTools
The Overture/Eclipse Initiative
• Vision for the future
March 2009 Tools for VDM in Industry
Overture versus VDMTools
• VDMTools (http://www.vdmtools.jp/en)• Closed source, proprietary (available under NDA)• Monolithic architecture (single binary), C++• Optimized for performance, industry strength
• Overture Tool project (http://www.overturetool.org)• Open source, GPL license• Plug-in architecture, Eclipse, Java• Optimized for flexibility, targets academic use• (partly) developed using VDMTools
March 2009 Tools for VDM in Industry 46
Overture – an open-source initiative
• Based on the Eclipse platform• Extendible open VDM++ tool support• Initial tool support produced in MSc project in NL• MSc project carried out at TUD
• Jacob Porsborg Nielsen and Jens Kielsgaard Hansen• MSc project at Aarhus University
• Thomas Christensen• MSc projects at Engineering College of Aarhus
• Hugo Macedo, Minho University• Sander Vermolen, University of Nijmegen• Adriana Sucena, Minho University• Carlos Vilhena, Minho University• Augusto Ribeiro, Minho University• Kenneth Lausdahl and Hans Christian Lintrup, IHA
March 2009 Tools for VDM in Industry 47
Basic automatic checks and GUI
Overture Architecture Overview
Syntax Check
Connection to standard developm
ent environments
UML, SysMLAADL
VisualisationSupport
Code Generators- C++, Java
GUIgenerators
ReverseEngineering
support
Type Check
Refactoringsupport
OML editorWith
syntaxhighlighting
Validation support
PrettyPrinting
Withcoverage
Interpreter (Debugger)
With APIcapabilities
Test Generation
support
VisualizationSupport forExecution
tracesVerification support
ProofObligationgeneration
AutomaticProof
support
InteractiveProof
support
ModelCheckingsupport
EclipseAST
Not yet available PlannedA version is available
Connection to JML
March 2009 Tools for VDM in Industry 48
Example Screen dump
March 2009 Tools for VDM in Industry
Automatic AST generation
OVERTUREAST spec
(VDM-SL subset)ASTGEN sed script
JAVAinterfaces
VDM++classes
VDMTools
javaclasses
sed
modified javaclasses“implements”● specified in VDM++
● code generated
other users can use these specs to specify their own OVERTURE extensions (in VDM++)
March 2009 Tools for VDM in Industry
Tracefile Viewer (1)
March 2009 Tools for VDM in Industry
Tracefile Viewer (2)
March 2009 Tools for VDM in Industry
Tracefile Viewer (3)
March 2009 Tools for VDM in Industry 53
Tools for VDM in Industry
Industrial Experience with VDM
”Bootstrapping” VDMTools
Overview of VDMTools
The Overture/Eclipse Initiative
Vision for the future
March 2009 Tools for VDM in Industry 54
Extending VDM++ with better support for distributed real-time
• Today embedded real-time systems are increasingly distributed
• Hard to master complexity within tight time schedules• Current research work extend VDM++ with better
support for describing and analyzing this• Possibility to use CPU’s and BUS’es inside system• Deployment of objects to CPUs• Setting priorities of operations• Introduction of asynchronous operations• Cycles statement in addition to duration statement
March 2009 Tools for VDM in Industry
Combining with continuous time
March 2009 Tools for VDM in Industry 56
Beyond the Ordinary: Design of Embedded Real-time Control
•BODERC project @ ESI
•Sept 2002 - Apr 2007
•Multi-disciplinary design•mechanics
•electronics
•software
•High-tech systems focus
•Early life cycle trade-off analysis
•Industry as a laboratory
•http://www.esi.nl/boderc
March 2009 Tools for VDM in Industry 57
continuousvalidation
Printer paper path - case study
VDM++ VDMTools
Bondgraphs
20-sim
co-simresults
VDM++ VDMTools
Bondgraphs
20-sim SIL simresults
C++ HOSTCOMPILER DLL
VDM++ VDMTools C++ TARGETCOMPILER ctrl app
measure-ments
March 2009 Tools for VDM in Industry 58
An email from an old (very good) student
… At that time I understood that a formal specification would be an advantage for big projects but I had no idea how desperately this is also needed in smaller projects when there are many people involved. Today I do know:
At the moment I am working at BMW in the communications department. We work on the integration of the car telephone (including a telematics unit with GPS coordinates) into the overall car. There is a lot of interaction between the telephone and the HMI of the car and there are different versions and types of all the involved devices. There are also five companies (BMW, Motorola, Siemens VDO, Harmann-becker, Alpine) who develop the different units. The system should not be so complex because many of the devices should (!) behave similarly. But the specifications we write are English plain text (hundreds of pages), in our department more than 10 people are involved and we do not know anymore how the devices will behave ourselves...every external company has an own interpretation of the specs and this interpretation changes over time. If you ask the same person twice you get different answers (I frankly admit that I am no exception)... You can imagine how "efficient" everything is and its a miracle that the system still works (with a number of bugs though)...