Sceraert, Vincent
[UCL]
Mens, Kim
[UCL]
This work builds upon a scientific paper which describes an approach and tool which allow programmers of object-oriented frameworks or applications to declare and verify structural constraints — called uContracts or usage contracts — on the source code of classes or methods in the object-oriented language Smalltalk. In this thesis we study how to port the approach to the Ruby programming language. The approach used to develop such a tool for Ruby is to build a Domain Specific Language (DSL) on top of the Ruby language. The advantage of a DSL is that it could reduce the learning period of the tool. Indeed, it would make the product more difficult to use if the user must first learn a new language in order to apply it on his code. With a DSL however, the language remains close to the Ruby syntax. The user of our tool just has to declare the constraints in the DSL. The Ruby interpreter will then execute them to verify that his code respects the constraints declared. To validate the tool, it was tested on itself and on a small database scenario, and its relevance was discussed with professional programmers in the Ruby community. Strengths, limitations and possible improvements of the tool are discussed to assess the quality of the tool. Our tool is also a validation of the usage contract concept and tries to determine if the concept of uContracts is generic enough to be added in other object-oriented languages.
Référence bibliographique |
Sceraert, Vincent. A tool for offering immediate feedback on violations of structural regularities in ruby source code. Ecole polytechnique de Louvain, Université catholique de Louvain, 2015. Prom. : Mens, Kim. |
Permalien |
http://hdl.handle.net/2078.1/thesis:447 |