Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

Changeset [04ffccc1b5572d80415bac200d0544576e8078b9] by Douglas Creager

Revision 04ffccc1b5572d80415bac200d0544576e8078b9, committed by Douglas Creager · April 15th, 2008 @ 10:09 PM

Adding counterexamples to the traces refinement check

Instead of just giving a yes/no answer for a traces refinement, we now

provide a counterexample when the refinement fails. The

counterexample consists of a trace of visible events, after which the

IMPL process can perform some event that SPEC cannot perform. (This

event is provided in the counterexample, as well.) There will often

me many possible counterexamples for a particular failed refinement;

the current implementation uses a breadth-first search, so we know

that the returned counterexample will be one with the smallest trace.

If there are many counterexamples of this length, an arbitrary one

will be returned.

The csp0 utility has also been modified to display this

counterexample, as have the traces refinement test cases.

As currently defined, the counterexample might not be especially

useful, since it only includes visible events. If the high-level SPEC

and IMPL processes involve a lot of hiding, then you won't actually be

able to see any useful detail in the counterexample trace. We'll need

to add some logic for drilling down into the syntax tree of a CSP

process to fix this.

http://github.com/dcreager/hst/c...

14 changed files

  • A tests/refinement/00-basic1.traces
  • A tests/refinement/00-basic2.traces
  • A tests/refinement/00-basic3.traces
  • A tests/refinement/00-basic4.traces
  • A tests/refinement/80-roscoe-p40-a.traces
  • A tests/refinement/80-roscoe-p40-b.traces
  • A tests/refinement/80-roscoe-p52-a.traces
  • A tests/refinement/80-roscoe-p52-b.traces
  • M include/hst/assertions.hh
  • M include/hst/types.hh
  • M src/assertions/refine.cc
  • M src/bin/csp0.cc
  • M tests/refinement/CMakeLists.txt
  • M tests/refinement/test-traces-refinement.cc