Preview

Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS)

Advanced search

Approach to detecting types inconsistency errors in a program code in dynamic languages

Abstract

The paper deals with detection of defects in a program code written in dynamic languages. At first, overview of static analyzers for programs in Python, Ruby and JavaScript is done. After this, the paper shows that most of existing tools are not able to detect entire class of defects: types inconsistency errors. Such errors are defined, the paper proves that the errors are prevailing and rather critical in the opinion of software developers. It presents an approach to type inference for dynamic languages and to implementation of checkers based on output from type inference. Concept of defect trace is introduced and construction of such trace is described then.

About the Author

I. E. Bronshteyn
ISP RAS, Moscow
Russian Federation


References

1. L. D. Paulson. Developers shift to dynamic programming languages. IEEE Comp vol. 40, issue 2, February 2007, pp. 12–15.

2. I. E. Bronstein Type inferrence for Python prigramming language. rudy ISP RAN [The Proceedings of ISP RAS], 2013, vol 24, pp. 161-190 (in Russian)

3. TIOBE Programming Community Index for August 2013: http://tinyurl.com/tiobe-201308

4. V. O. Savitsky, D. V. Sidorov, Inkremental'nyj analiz iskhodnogo koda na yazykakh C/C++[Incremental source code analysis for C/C++ languages] Trudy ISP RAN [The Proceedings of ISP RAS], 2012, vol 22, pp. 119-129 (in Russian)

5. A. Avetisyan, A. Belevantsev, A. Borodin, V. Nesov Ispol'zovanie staticheskogo analiza dlya poiska uyazvimostej i kriticheskikh oshibok v iskhodnom kode programm[Using static analysis for finding security vulnerabilities and critical errors in source code] Trudy ISP RAN [The Proceedings of ISP RAS], 2012, vol 21, pp. 23-38 (in Russian)

6. Pyflakes: https://launchpad.net/pyflakes

7. Pylint - code analysis for Python: http://www.pylint.org

8. reek: https://github.com/troessner/reek

9. ruby-lint: http://code.yorickpeterse.com/ruby-lint/latest

10. JSLint: http://www.jslint.com

11. JSHint, a JavaScript Code Quality Tool: http://www.jshint.com

12. PEP 8 – Style Guide for Python Code: http://www.python.org/dev/peps/pep-000

13. R. Chillarege, I. Bhandari, J. Chaar, M. Halliday, D. Moebus, B. Ray, M. Y. Wo Orthogonal Defect Classification — A Concept of In-Process Measurements (19 [14] W. Humprey. A discipline for software engineering (1997).

14. W. Humprey. A discipline for software engineering (1997).

15. M. Reingart. Rad2py: Plataforma de Trabajo para el Desarrollo Rápido de Aplicaciones bajo un Proceso de Software Personal, pp. 152–153: http://code.google.com/p/rad2py/wiki/DefectTypeStandard

16. Bugs : Exaile: https://bugs.launchpad.net/exaile

17. Bugs : calibre: https://bugs.launchpad.net/calibre

18. sqlalchemy: http://www.sqlalchemy.org/trac

19. Bugs : Bazaar: https://bugs.launchpad.net/bzr

20. Twisted: http://twistedmatrix.com/trac

21. The Trac Project: http://trac.edgewall.org

22. Django: https://code.djangoproject.com

23. DRuby - Home: http://www.cs.umd.edu/projects/PL/druby

24. Type Analysis for JavaScript: http://www.brics.dk/TAJS

25. Michael Furr, Jong-hoon (David) An, Jeffrey S. Foster, Michael Hicks. Static type inference for Ruby. SAC ’09 Proceedings of the 2009 ACM symposium on Applied Computing, pp. 1859–1866.

26. jruby-parser: https://github.com/jruby/jruby-parser

27. esprima: https://github.com/ariya/esprima

28. tirpan: https://github.com/bronikkk/tirpan

29. Gramps Bug Report 005023: http://www.gramps-project.org/bugs/view.php?id=5023


Review

For citations:


Bronshteyn I.E. Approach to detecting types inconsistency errors in a program code in dynamic languages. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2013;25:67-84. (In Russ.)



Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.


ISSN 2079-8156 (Print)
ISSN 2220-6426 (Online)