org: work around issue with Org 9.2

See the following email
http://lists.gnu.org/archive/html/emacs-orgmode/2019-01/msg00226.html

* doc/org/tut24.org, doc/org/tut51.org: Export the output of
noweb-based block without ':export results' or ':export both'.
* doc/org/spot.css: Add style for src-text.
This commit is contained in:
Alexandre Duret-Lutz 2019-01-16 12:33:16 +01:00
parent 3908cc1bca
commit 476a874c71
3 changed files with 48 additions and 105 deletions

View file

@ -408,64 +408,40 @@ check whether the output is empty. If it is not, that means we have
found a counterexample. Here is some code that would show this
counterexample:
#+NAME: demo-2-aux
#+BEGIN_SRC C++ :exports none :noweb strip-export
<<headers>>
<<demo-state>>
<<demo-iterator>>
<<demo-kripke>>
<<demo-succ-iter-2>>
#+NAME: demo-2
#+BEGIN_SRC C++ :exports code :noweb strip-export :results verbatim
#include <spot/tl/parse.hh>
#include <spot/twaalgos/translate.hh>
#include <spot/twa/twaproduct.hh>
#include <spot/twaalgos/emptiness.hh>
<<demo-1-aux>>
int main()
{
auto d = spot::make_bdd_dict();
// Parse the input formula.
spot::parsed_formula pf = spot::parse_infix_psl("GF(odd_x) -> GF(odd_y)");
if (pf.format_errors(std::cerr))
return 1;
// Translate its negation.
spot::formula f = spot::formula::Not(pf.f);
spot::twa_graph_ptr af = spot::translator(d).run(f);
// Find a run of or demo_kripke that intersects af.
auto k = std::make_shared<demo_kripke>(d);
if (auto run = k->intersecting_run(af))
std::cout << "formula is violated by the following run:\n" << *run;
else
std::cout << "formula is verified\n";
}
#+END_SRC
#+NAME: demo-2
#+BEGIN_SRC C++ :exports both :noweb strip-export :results verbatim
#include <spot/tl/parse.hh>
#include <spot/twaalgos/translate.hh>
#include <spot/twa/twaproduct.hh>
#include <spot/twaalgos/emptiness.hh>
<<demo-2-aux>>
int main()
{
auto d = spot::make_bdd_dict();
// Parse the input formula.
spot::parsed_formula pf = spot::parse_infix_psl("GF(odd_x) -> GF(odd_y)");
if (pf.format_errors(std::cerr))
return 1;
// Translate its negation.
spot::formula f = spot::formula::Not(pf.f);
spot::twa_graph_ptr af = spot::translator(d).run(f);
// Find a run of or demo_kripke that intersects af.
auto k = std::make_shared<demo_kripke>(d);
if (auto run = k->intersecting_run(af))
std::cout << "formula is violated by the following run:\n" << *run;
else
std::cout << "formula is verified\n";
}
#+END_SRC
#+RESULTS: demo-2
#+begin_example
formula is violated by the following run:
Prefix:
(x = 0, y = 0)
| !odd_x & !odd_y
(x = 1, y = 0)
| odd_x & !odd_y
(x = 1, y = 1)
| odd_x & odd_y
(x = 1, y = 2)
| odd_x & !odd_y
Cycle:
(x = 2, y = 2)
| !odd_x & !odd_y
(x = 0, y = 2)
| !odd_x & !odd_y
(x = 1, y = 2)
| odd_x & !odd_y
#+end_example
# temporary fix for an issue in Org 9.2, see
# http://lists.gnu.org/archive/html/emacs-orgmode/2019-01/msg00226.html
#+BEGIN_SRC text :noweb yes
<<demo-2()>>
#+END_SRC
With a small variant of the above code, we could also display the
counterexample on the state space, but only because our state space is