用户名: 密码: 验证码:
A Tool for Testing Data Type Implementations from Maude Algebraic Specifications
详细信息查看全文 | 推荐本文 |
摘要
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.

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700