Abstract
Lua is a programming language designed as scripting language, which is fast, lightweight, and suitable for embedded applications. Due to its features, Lua is widely used in the development of games and interactive applications for digital TV. However, during the development phase of such applications, some errors may be introduced, such as deadlock, arithmetic overflow, and division by zero. This paper describes a novel verification approach for software written in Lua, using as backend the Efficient SMTBased Context-Bounded Model Checker (ESBMC). Such an approach, called bounded model checking - Lua (BMCLua), consists in translating Lua programs into ANSI-C source code, which is then verified with ESBMC. Experimental results show that the proposed verification methodology is effective and efficient, when verifying safety properties in Lua programs. The performed experiments have shown that BMCLua produces an ANSI-C code that is more efficient for verification, when compared with other existing approaches. To the best of our knowledge, this work is the first that applies bounded model checking to the verification of Lua programs.
- ABNT NBR 15606-2: "Digital Terrestrial Television, Data Coding and Transmission Speci cation for Digital Broadcasting Part 2: Ginga-NCL for xed and mobile receivers XML application language for application coding"; (2009).Google Scholar
- Aho, Alfred V. and Sethi, Ravi and Ullman, Jeffrey D.: "Compilers: Principles, Techniques, and Tools"; Addison-Wesley, Boston / MA (1986). Google ScholarDigital Library
- Alessandro Armando, Jacopo Mantovani, and Lorenzo Platania.: "Bounded model checking of software using SMT solvers instead of SAT solvers"; Int. J. Softw. Tools Technol. Transf. 11, 1 (January 2009), 69--83.Google Scholar
- Baier, C. and Katoen, J.: "Principles of Model Checking (Representation and Mind Series)"; The MIT Press. (2008). Google ScholarDigital Library
- Bannister, M. J. and Eppstein, D.: "Randomised Speedup of the Bellman-Ford Algorithm"; CoRR, Cornell, 1111.5414, (2011); available at: http://dblp.uni-trier.de/db/journals/corr/corr1111.html#abs-1111-5414Google Scholar
- Barbosa, D. C. and Clua, E.: "Ginga Game: A framework for game development for the interactive digital television"; Proc. of the 6th Brazilian Symposium on Games and Digital Entertainment (2009), 162--167. Google ScholarDigital Library
- Barnes, J.: "Programming in Ada"; Cambridge University Press. (2014).Google Scholar
- Barrett, C. and Stump, A. and Tinelli, C.: "The Satisfiability Modulo Theories Library (SMT-LIB)"; (2010); available at: www.SMT-LIB.orgGoogle Scholar
- Beyer, Dirk.: "Reliable and Reproducible Competition Results with BenchExec and Witnesses (Report on SV-COMP 2016)"; Springer Berlin Heidelberg; Chechik, Marsha and Raskin, Jean-François (2016), 887--904. Google ScholarDigital Library
- Biere, A.: "Bounded Model Checking", in Handbook of Satisfiability; IOS Press. (2009), 457--481.Google ScholarDigital Library
- Brummayer, R. and Biere, A.: "Boolector: An efficient SMT solver for bit-vectors and arrays"; Lect. Notes Comp. Sci. 5505, Springer (2009), 174--177. Google ScholarDigital Library
- Cheriton, D. and Tarjan, R. E.: "Finding minimum spanning trees"; SIAM Journal on Computing, SIAM, 5, 4 (1976), 724--742.Google ScholarCross Ref
- Clarke, E. and Kroening, D. and Lerda, F.: "A tool for checking ANSI-C programs"; Lect. Notes Comp. Sci. 2988, Springer (2004), 168--176.Google ScholarCross Ref
- Cordeiro, L. C. and Fischer, B. and Marques-Silva, J.: "SMT-based bounded model checking for embedded ANSI-C software"; IEEE Trans. Software Eng., IEEE, 38, 4 (2012), 957--974. Google ScholarDigital Library
- Cordeiro, L. C. and Morse, J. and Nicole, D. and Fischer, B.: "Context-Bounded Model Checking with ESBMC 1.17 - (Competition Contribution)"; Lect. Notes Comp. Sci. 7214, Springer (2012), 534--537.Google ScholarDigital Library
- Cormen, T. H. and Stein, C. and Rivest, R. L. and Leiserson, C. E.: "Introduction to Algorithms"; McGraw-Hill Higher Education (2001). Google ScholarDigital Library
- de Lucena Jr., V. F. and Viana, N. S. and Maia, O. B. and Chaves Filho, J. E. and da Silva Junior, W. S.: "Designing an extension API for bridging Ginga iDTV applications and home services"; IEEE Trans. Consumer Electronics, v.58, n.2 (2012), 1077--1085.Google ScholarCross Ref
- de Melo Brandão, R. R. and de Souza Filho, G. L. and Batista, C. E. C. F. and Gomes Soares, L. F.: "Extended features for the Ginga-NCL environment: introducing the LuaTV API"; Proc. of the 19th International Conference on Computer Communications and Networks, IEEE (2010), 1--6.Google Scholar
- Deitel, H. M. and Deite, P. J.: "Java: How to Program"; Prentice Hall: Upper Saddle River (2010), 315--336. Google ScholarDigital Library
- Dirk Beyer, M. Erkan Keremoglu.: "CPAchecker: A Tool for Configurable Software Veri cation"; CAV (2011), 184--190. Google ScholarDigital Library
- Fleutot, F. and L. Tratt, L.: "Contrasting compile-time meta-programming in Metalua and Converge"; Proc. of the 3rd Workshop on Dynamic Languages and Applications, ACM (2007), 1--10.Google Scholar
- Friedman, D. P. and Wand, M.: "Essentials of Programming Languages, 3rd Edition"; The MIT Press. (2008), 55--65. Google ScholarDigital Library
- Garcia M. P., Monteiro F. R., Cordeiro L. C., de Lima Filho E. B. ESBMCQtOM: A Bounded Model Checking Tool to Verify Qt Applications. SPIN 2016; 97--103.Google Scholar
- Havelund, K. and Pressburger, T.: "Model checking JAVA programs using JAVA PathFinder"; International Journal on Software Tools for Technology Transfer, Springer, 2, 4 (2000), 366--381.Google ScholarCross Ref
- Havelund, K and Skakkebæk, J U.: "Applying Model Checking in Java Verification"; In Proceedings of the 5th and 6th International SPIN Workshops on Theoretical and Practical Aspects of SPIN Model Checking, Dennis Dams, Rob Gerth, Stefan Leue, and Mieke Massink (Eds.). Springer-Verlag, London, UK (1999), 216--231. Google ScholarDigital Library
- Heineman, G. and Pollice, G. and Selkow, S.: "Algorithms in a Nutshell"; O'Reilly Media, Inc. (2008), 160--164. Google ScholarDigital Library
- Hiischi, A.: "Traveling Light, the Lua way"; IEEE Software, IEEE, 24, 5 (2007), 31--38. Google ScholarDigital Library
- Januário, F. A. P. and Cordeiro, L. C. and de Lucena Jr., V. F. and de Lima Filho, E. B.: "BMCLua: verification of Lua programs in digital TV interactive applications"; Proc. of the 3rd Global Conference on Consumer Electronics, IEEE (2014), 707--708.Google Scholar
- Januário, F. A. P., Cordeiro, L. C., Lima Filho, E. B. ; Lucena Jr., V. F.: "BMCLua: Verificação de Programas Lua em Aplicações Interativas de TV Digital"; Proc. of the 4th Simpósio Brasileiro de Engenharia de Sistemas Computacionais, SBESC (2014), 1--6.Google Scholar
- Jung, K. and Brown, A.: "Beginning Lua Programming"; Wiley (2007), 35--42. Google ScholarDigital Library
- Klint, P. and Roosendaal, L. and van Rozen, R.: "Game developers need Lua air: static analysis of Lua using interface models"; Proc. of the 11th International Conference on Entertainment Computing, Springer (2012), Berlin / Heidelberg, 530--535. Google ScholarDigital Library
- Knuth, D. E.: "Backus Normal Form vs. Backus Naur Form"; Commun. ACM, ACM, 7, 12 (Dec 1964), New York / NY, 735--736. Google ScholarDigital Library
- Lerusalimschy, R.: "Programming in Lua, Second Edition"; Lua.Org (2006). Google ScholarDigital Library
- Manura, D.: "Lua To Cee"; (2012); available at: http://lua-users.org/wiki/LuaToCeeGoogle Scholar
- Falke, S. and Merz, F. and Sinz, C.: "LLBMC: Improved bounded model checking of C programs using LLVM"; Proc. of the International Conference on Tools and Algorithms for the Construction and Analysis of Systems; Notes Comp. Sci. 7795, Springer (2013), 623--626. Google ScholarDigital Library
- Monteiro F. R., Cordeiro L. C., de Lima Filho E. B. Bounded Model Checking of C++ Programs Based on the Qt Framework. GCCE 2015; 179--447.Google Scholar
- Monteiro F. R., Garcia M. P., Cordeiro L. C., de Lima Filho E. B. Bounded Model Checking of C++ Programs based on the Qt Cross-Platform Framework, Softw Test Verif Reliab. 27 (2017) e1632.Google ScholarCross Ref
- Morse, J. and Cordeiro, L. C. and Nicole, D. and Fischer, B.: "Handling Unbounded Loops with ESBMC 1.20 - (Competition Contribution)"; Lect. Notes Comp. Sci. 7795, Springer (2013), 619--622. Google ScholarDigital Library
- Morse, J. and Ramalho, M. and Cordeiro, L. C. and Nicole, D. and Fischer, B.: "Handling Unbounded Loops with ESBMC 1.22 - (Competition Contribution)"; Lect. Notes Comp. Sci. 8413, Springer (2014), 405--407.Google ScholarCross Ref
- Moura, L. M. and Bjørner, N.: "Z3: An Efficient SMT Solver"; Lect. Notes Comp. Sci. 4963, Springer (2008), 337--340. Google ScholarDigital Library
- Moura, L. M. and Bjørner, N.: "Satisfiability modulo theories: an appetiser"; Proc. of the 12th Brazilian Symposium on Formal Methods, Springer (2009), 23--36. Google ScholarDigital Library
- Moura, L. M. and Bjørner, N.: "Satisfiability modulo theories: introduction and applications"; Commun. ACM, ACM, 54, 9 (2011), 69--77. Google ScholarDigital Library
- Parr, T.: "The Definitive ANTLR Reference: Building Domain-Specific Languages"; Pragmatic Bookshelf (2007). Google ScholarDigital Library
- Pereira P, Albuquerque H, Marques H, Silva I, Carvalho C, Santos V, Ferreira R, Cordeiro L. Verificação de Kernels em Programas CUDA usando Bounded Model Checking. WSCAD-SSC 2015; 24--35.Google Scholar
- Pereira P, Albuquerque H, Marques H, Silva I, Carvalho C, Santos V, Ferreira R, Cordeiro L. Verifying CUDA Programs using SMT-Based Context-Bounded Model Checking. SAC SVT track 2016; 1648--1653. Google ScholarDigital Library
- Pereira P., Albuquerque H., Silva I., Marques H., Monteiro F. R., Ferreira R., Cordeiro L. C., SMT-Based Context-Bounded Model Checking for CUDA Programs, Concurrency Computat.: Pract. Exper. (2016)Google Scholar
- Ramalho M, Freitas M, Sousa F, Marques H, Cordeiro L, Fischer B. SMT-Based Bounded Model Checking of C++ Programs. ECBS 2013; 147--156. Google ScholarDigital Library
- Salviato, T. P. and Costa, P. D. and Filho, J. G. P. and Vale, I. M.: "Framework for Context-Aware Applications on the Brazilian Digital TV"; Proc. of the 4th International Conference on Ubi-Media Computing, IEEE (2011), 112--117. Google ScholarDigital Library
- Schildt, H.: "Java: The Complete Reference (Complete Reference Series)"; Oracle Press. (2014). Google ScholarDigital Library
- Sedgewick, R.: "Algorithms in C++, Parts 1-4: Fundamentals, Data Structure, Sorting, Searching, Third Edition"; Addison-Wesley (1998), 273--274. Google ScholarDigital Library
- Soares, L. F. G. and Rodrigues, R. F. and Moreno, M. F.: "Ginga-NCL: The Declarative Environment of the Brazilian Digital TV System"; Journal of the Brazilian Computer Society, Springer, 12, 4 (2007), 37--46.Google ScholarCross Ref
- Stroustrup, B.: "The C++ Programming Language - Special Edition"; Addison Wesley (2007).Google Scholar
- Stump, A. and Barrett, C. W. and Dill, D. L.: "CVC: a cooperating validity checker"; Proc. of the 14th International Conference on Computer-Aided Verification, Springer-Verlag (2002), 500--504. Google ScholarDigital Library
Index Terms
- BMCLua: A Translator for Model Checking Lua Programs
Recommendations
Efficient Verification of Sequential and Concurrent C Programs
There has been considerable progress in the domain of software verification over the last few years. This advancement has been driven, to a large extent, by the emergence of powerful yet automated abstraction techniques such as predicate abstraction. ...
Action Language verifier: an infinite-state model checker for reactive software specifications
Action Language is a specification language for reactive software systems. In this paper, we present the syntax and the semantics of the Action Language and we also present an infinite-state symbolic model checker called Action Language Verifier (ALV) ...
Layout-sensitive language extensibility with SugarHaskell
Haskell '12: Proceedings of the 2012 Haskell SymposiumProgrammers need convenient syntax to write elegant and concise programs. Consequently, the Haskell standard provides syntactic sugar for some scenarios (e.g., do notation for monadic code), authors of Haskell compilers provide syntactic sugar for more ...
Comments