Translating B to TLA + for Validation with TLC
The state-based formal methods B and TLA + share the common base of predicate logic, arithmetic and set theory. However, there are still considerable differences, such as the way to specify state transitions, the different approaches to typing, and the available tool support. In this paper, we present a translation from B to TLA + to validate B specifications using the model checker TLC. We provide translation rules for almost all constructs of B, in particular for those which are not built-in in TLA + . The translation also includes many adaptations and optimizations to allow efficient checking by TLC. Moreover, we present a way to validate liveness properties for B specifications under fairness conditions. Our implemented translator, Tlc4B, automatically translates a B specification to TLA + , invokes the model checker TLC, and translates the results back to B. We use ProB to double check the counter examples produced by TLC and replay them in the ProB animator. We also present a series of case studies and benchmark tests comparing Tlc4B and ProB.
KeywordsB-Method TLA + Tool Support Model Checking Animation
Unable to display preview. Download preview PDF.
- 1.Abrial, J.-R.: The B-Book. Cambridge University Press (1996)Google Scholar
- 2.ClearSy. B language reference manual, http://www.tools.clearsy.com/resources/Manrefb_en.pdf (accessed: November 10, 2013)
- 6.Hansen, D., Leuschel, M.: Translating B to TLA+ for validation with TLC (2013), http://www.stups.uni-duesseldorf.de/w/Special:Publication/HansenLeuschel_TLC4B_techreport
- 7.Lamport, L.: The TLA+ hyperbook, http://research.microsoft.com/en-us/um/people/lamport/tla/hyperbook.html (accessed: October 30, 2013)
- 8.Lamport, L.: Specifying Systems, The TLA+ Language and Tools for Hardware and Software Engineers. Addison-Wesley (2002)Google Scholar
- 11.Mosbahi, O., Jemni, L., Jaray, J.: A formal approach for the development of automated systems. In: Filipe, J., Shishkov, B., Helfert, M. (eds.) ICSOFT (SE), pp. 304–310. INSTICC Press (2007)Google Scholar
- 12.Reynolds, M.: Changing nothing is sometimes doing something. Technical Report TR-98-02, Department of Computer Science, King’s College London (February 1998)Google Scholar