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:
Alexandre Duret-Lutz 2016-07-19 21:55:12 +02:00
parent abff7eba8e
commit dd6875d5fe
22 changed files with 119 additions and 54 deletions

View file

@ -421,9 +421,9 @@ For instance here is a complex command that will
1. generate an infinite stream of random LTL formulas with [[file:randltl.org][=randltl=]],
2. use [[file:ltlfilt.org][=ltlfilt=]] to rewrite the W and M operators away (=--remove-wm=),
simplify the formulas (=-r=), remove duplicates (=u=) as well as
formulas that have a size less then 3 (=--size-min=3=),
3. use =head= to keep only 10 of such formula
4. loop to process each of these formula:
formulas that have a size less then 3 (=--size-min=3=), and
keep only the 10 first formulas (=-n 10=)
3. loop to process each of these formula:
- print it
- then convert the formula into =ltl2dstar='s input format, process
it with =ltl2dstar= (using =ltl2tgba= as the actual LTL->BA
@ -438,8 +438,7 @@ deterministic, and =%p= whether the automaton is complete.
#+BEGIN_SRC sh :results verbatim :exports both
randltl -n -1 --tree-size=10..14 a b c |
ltlfilt --remove-wm -r -u --size-min=3 |
head -n 10 |
ltlfilt --remove-wm -r -u --size-min=3 -n 10 |
while read f; do
echo "$f"
ltlfilt -l -f "$f" |