bin: overhaul default input selection
If no input have been specified, and the standard input is not a tty all tools now default to reading it. If standard input is a tty, all tools display an error message. Additionally, - is now a shorthand for -F- in all tools. * NEWS: Summarize this. * bin/common_finput.cc, bin/common_finput.hh (check_no_formulas, check_no_automaton): New functions that implement the above istty() logic. * bin/autfilt.cc, bin/dstar2tgba.cc, bin/ltl2tgba.cc, bin/ltl2tgta.cc, bin/ltlcross.cc, bin/ltldo.cc, bin/ltlgrind.cc: Use these function, and recognize '-' if it was not the case. * tests/core/acc_word.test, tests/core/ltldo.test, tests/core/minusx.test, tests/core/readsave.test, tests/core/unambig.test: Adjust some tests to exercise this. * doc/org/autfilt.org, doc/org/csv.org, doc/org/dstar2tgba.org, doc/org/ltl2tgba.org, doc/org/ltlcross.org, doc/org/ltlfilt.org, doc/org/oaut.org: Adjust the documentation and simplify some examples.
This commit is contained in:
parent
abff7eba8e
commit
dd6875d5fe
22 changed files with 119 additions and 54 deletions
|
|
@ -1015,18 +1015,18 @@ using =autfilt -n5=.
|
|||
|
||||
#+BEGIN_SRC sh :results verbatim :exports both
|
||||
randltl -n -1 a b |
|
||||
ltl2tgba -F- |
|
||||
ltl2tgba |
|
||||
autfilt --states=3 --stats='!(%M)' |
|
||||
ltl2tgba -F- |
|
||||
ltl2tgba |
|
||||
autfilt --states=3 --stats=%M -n5
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: G(F!a & XF(a | G!b))
|
||||
: GFb | G(!b & FG!b)
|
||||
: !a & F((a | b) & (!a | !b))
|
||||
: !a | (b R a)
|
||||
: !b & X(!b U a)
|
||||
: G(b | F(b & Fa))
|
||||
: (!a | b | (!b & (b W Ga))) & (a | (!b & (b | (!b M F!a))))
|
||||
: (!a | (!a R b)) & (a | (a U !b))
|
||||
: !a & F((!a | FG!a) & (a | GFa))
|
||||
: X(!b W a)
|
||||
|
||||
Note that the above result can also be obtained without using
|
||||
=autfilt= and automata names. We can use the fact that =ltl2tgba
|
||||
|
|
@ -1045,13 +1045,15 @@ head -n5 | cut -d, -f2 # return the five first formulas
|
|||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: G(F!a & XF(a | G!b))
|
||||
: GFb | G(!b & FG!b)
|
||||
: !a & F((!a | !b) & (a | b))
|
||||
: !a | (b R a)
|
||||
: !b & X(!b U a)
|
||||
|
||||
: G(b | F(b & Fa))
|
||||
: (!a | b | (!b & (b W Ga))) & (a | (!b & (b | (!b M F!a))))
|
||||
: (!a | (!a R b)) & (a | (a U !b))
|
||||
: !a & F((!a | FG!a) & (a | GFa))
|
||||
: X(!b W a)
|
||||
|
||||
Note that the =-F-= argument in the first call to =ltl2tgba= is
|
||||
superfluous as the tool default to reading from its standard input.
|
||||
But we put it there for symmetry with the second call.
|
||||
|
||||
# LocalWords: num toc html syntaxes ltl tgba sed utf UTF lbtt SCCs
|
||||
# LocalWords: GraphViz's hoaf HOA LBTT's neverclaim ba SPOT's Gb cn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue