Abstract
This paper presents a tool for testing data types implemented in C++ against formal specifications written in Maude. Maude is a formal specification language based on rewriting logic that allows the specification of abstract data types in a clear and concise manner. Moreover, Maude specifications are executable, which provides two advantages: firstly, we can test our specifications and, secondly, we can obtain the results of the test cases automatically.We focus our test cases on the correctness of the obtained data values, therefore they are generated from the Maude specification based on the data type constructors and the corresponding membership axioms. On the other hand, the observation of the implementation under test is done for each data type through explicit methods defined by the user. The tool is fully integrated in the Eclipse environment and is platform-independent. We have developed an Eclipse plug-in that calls the Maude system to generate the test cases and then translates them into a sequence of C++ instructions. The C++ instructions are compiled and executed, and the results are compared with the results from the specification.The tool is being used during this academic year by the Computer Science students at the Universidad Complutense de Madrid in the data types course. They have tested typical data type implementations, like stacks, lists, and binary search trees, as well as other data types based on them. The experience is being very useful as it allows the students to test their implementations and correct their errors.
Published Version
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.