[PATCH 0/5] cex: display the rule numbers

Akim Demaille <[email protected]>
Newsgroups gmane.comp.parsers.bison.patches
Message-ID <[email protected]>
This is a bit exploratory, I'm not sure about the format.  The point
is to include the rule numbers in the counterexamples.  I'd be happy
to read comments about this.

From

    Example: "if" expr "then" "if" expr "then" stmt • "else" stmt
    Shift derivation
      if_stmt
      ↳ "if" expr "then" stmt
                         ↳ if_stmt
                           ↳ "if" expr "then" stmt • "else" stmt
    Reduce derivation
      if_stmt
      ↳ "if" expr "then" stmt                        "else" stmt
                         ↳ if_stmt
                           ↳ "if" expr "then" stmt •

to

    Example: "if" expr "then" "if" expr "then" stmt • "else" stmt
    Shift derivation
      if_stmt
      ↳ 3: "if" expr "then" stmt
                            ↳ 2: if_stmt
                                 ↳ 4: "if" expr "then" stmt • "else" stmt
    Example: "if" expr "then" "if" expr "then" stmt • "else" stmt
    Reduce derivation
      if_stmt
      ↳ 4: "if" expr "then" stmt                              "else" stmt
                            ↳ 2: if_stmt
                                 ↳ 3: "if" expr "then" stmt •

Cheers!

Akim Demaille (5):
  cex: style: prefer FOO_print to print_FOO
  cex: style: prefer "res" for the returned value
  cex: style: comment changes
  cex: style: prefer counterexample_print to print_counterexample
  cex: display the rule numbers

 src/counterexample.c    |  19 ++-
 src/derivation.c        |  40 ++++-
 src/derivation.h        |   7 +-
 src/lssi.c              |   2 +-
 src/parse-simulation.c  |  36 ++--
 src/state-item.c        |  12 +-
 src/state-item.h        |   4 +-
 tests/conflicts.at      |  44 ++---
 tests/counterexample.at | 370 ++++++++++++++++++++--------------------
 tests/diagnostics.at    |  66 +++----
 tests/report.at         |  88 +++++-----
 11 files changed, 362 insertions(+), 326 deletions(-)

-- 
2.27.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.