M. Staroletov assistant professor Altai State Technical University Barnaul, Russia Tools, methods and program analysis conference (TMPA-2014), Kostroma
technology to develop software firstly focuses on the model developing, not on algorithmic and computation concepts Achievements: UML, classes, patterns, CASE-tools Model based testing(MBT) – technology of software testing based on comparation the model and system under test during the work, generation test cases by the model, and reflection the system to the model for studying its properties. Achievements: no such known in the software engineering area
and test • Concurrent and distributive programs: no shared state, no checking the whole system logic • No one community chosen methodology in testing based on model creation • Good progress in verification (MBC) area • Needs to bridge together program modeling, testing and verification
of interoperable multi-component concurrent program • Create methods of how user can make the model when he has some system or how to create the system if user has the model • Create methods how to dynamically and statically test the system with using the model • Create demo software
to the time of model creation? Inject a model description into the code by hand or with using IDE addition Implement state-based system with logic on the basis of our extended finite automaton Yes No Code creation Model injection Better to refactor that to the second case Model editing System skeleton classes generation Write actual system code in the states
Robinson • We can start as a finite automaton • Then add things we are going to model and test • Automaton can model each component of the complex system (no global state)
object oriented relation • We used to create extended automaton description as a theoretic-set description with complex transition functions • Then we moved to automaton descriptions as states, transitions and operations • This model easily refers into object- oriented classes
Make transition to another state Or apply a operation Create a thread Wait a thread (with some probability) Send a message Wait for a message Block a common resource Unblock a common resource
provided classes to make inter-operational part of the system and to describe the model • And writes the code for states which does actual system behavior • Approach like the same is used now in Microsoft Workflow Foundation
• “Printf injection” paradigm A(); ↔ A(); printf(“\n A() done”); B(); ↔ B(); printf(“\n B() done”); C(); ↔ C(); printf(“\n C() done”); • Then collect state trace in one place and check it
• Which collects data from all components • Data about all model events is sent by the code - that preprocessor inserts to a code in the places of model description - in our classes which user used by the model skeleton • Server collects the global state and checks model violations
events by the model - message sending and receiving - thread creation and joining - resource handling • Server produces: - state trace - message chart diagram - dynamic model probabilities calculation
to apply some algorithms (graphs theory, NY street sweeper, resource waiting graphs, etc) Than it was abandoned as: • Now we do all the checking by using Spin verifier integrated into our system • The goal is to map our model to Promela code and create LTL predicates
such tools as Spin • Our approach is to hide Promela/Spin interface and use it as a backend • Potentially we can use other verificators and/or methods • Model transformation is done for most common checkings that satisfy our tasks
• Ability to create and check model description for the system • Set of classes that can be used as a skeleton for interoperable state based system • Dynamic and static checking use methods we described in this work integrated into an IDE.
to write code first but model first • Students thinks about some interoperation system in a real world and try to model it (systems like fast-food cafe, wedding, paying for the flat, buying the gadgets, the field of dreams TV show,...) • Then implement it as IPC based app and network app and check the correctness