caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Vincent Jacques <vincent@vincent-jacques.net>
To: caml-list@inria.fr
Subject: [Caml-list] Test coverage of generated lexers/parsers
Date: Sun, 6 Mar 2016 20:53:04 +0100	[thread overview]
Message-ID: <CAEnGa7CztvqAk3NdGmit697hcpjc2eJiy2N9piLxb0AyZ_KciQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 838 bytes --]

Hello,

Does somebody have experience measuring test coverage of generated
lexers/parsers?

I'm using ocamllex/ocamlyacc [1] (but I can switch to Menhir [2]) to
generate a lexer/parser. In my tests, I simply check that some input
strings give the ASTs I expect.

I usually use Bisect [3] to make sure that my tests cover the code I
intended to cover, but in that configuration, Bisect is lost between the
.mll/.mly files and the generated .ml files and produces useless reports.

How would you measure test coverage in that case?

Thanks,

[1] http://caml.inria.fr/pub/docs/manual-ocaml/lexyacc.html
[2] http://gallium.inria.fr/~fpottier/menhir/
[3] http://bisect.x9c.fr/
-- 
Vincent Jacques
http://vincent-jacques.net

"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème"
            Devise Shadock

[-- Attachment #2: Type: text/html, Size: 1278 bytes --]

             reply	other threads:[~2016-03-06 19:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-06 19:53 Vincent Jacques [this message]
2016-03-06 22:53 ` Gabriel Scherer
2016-03-06 22:59   ` Anton Bachin
2016-03-07  8:20     ` Vincent Jacques
2016-03-08 12:43   ` François Pottier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEnGa7CztvqAk3NdGmit697hcpjc2eJiy2N9piLxb0AyZ_KciQ@mail.gmail.com \
    --to=vincent@vincent-jacques.net \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).