[m-users.] Automated testing of Mercury code

Julien Fischer jfischer at opturion.com
Fri Sep 28 14:20:29 AEST 2018


Hi Ben,

Good to head from you.

On Fri, 28 Sep 2018, Benjamin Schmidt wrote:

> I'm enjoying reviving my interest in Mercury at the moment.
>
> I'm wondering if you know or are associated with any test frameworks for 
> Mercury?
>
> I came across this:
>
> https://sourceforge.net/projects/mercurytest/
>
> which is related to this paper:
>
> https://arxiv.org/abs/1009.3765
>
> but it seems to have gone stale (not compatible with the current release of 
> the day, I suspect due to changes in the standard library). I'll probably see 
> if I can fix it, but thought I'd ask as well, just in case you know of 
> anything else.

Taking a quick look at that code, the main issue compiling it with the
current ROTD is that the argument ordering of the predicates
set.insert/3 and map.det_insert/4 has changed in the interim.  More
signficantly, it appears to work by reading the HLDS dumps -- there's no
guarantee that the contents of those will have remained stable.

(The Mercury system itself, has a test coverage capability, which I
think could be used to replace a chunk of what is discussed in the
latter part of the linked paper.)

Julien.


More information about the users mailing list