ltlsynt: improve error message in case of missing --ins and --outs
* bin/ltlsynt.cc: Here. * tests/core/ltlsynt.test: Test the error.
This commit is contained in:
parent
c43712682f
commit
074678416f
2 changed files with 12 additions and 1 deletions
|
|
@ -592,6 +592,14 @@ namespace
|
|||
{
|
||||
res = solve_formula(f, input_aps_, unknown_aps(f, input_aps_));
|
||||
}
|
||||
else if (output_aps_.empty() && input_aps_.empty())
|
||||
{
|
||||
for (const std::string& ap: unknown_aps(f, input_aps_, &output_aps_))
|
||||
error_at_line(2, 0, filename, linenum,
|
||||
"one of --ins or --outs should list '%s'",
|
||||
ap.c_str());
|
||||
res = solve_formula(f, input_aps_, output_aps_);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const std::string& ap: unknown_aps(f, input_aps_, &output_aps_))
|
||||
|
|
|
|||
|
|
@ -541,4 +541,7 @@ grep "'a' appears both" stderr
|
|||
|
||||
ltlsynt --ins=a --outs=c -f 'GFa | FGb | GFc' 2>stderr && :
|
||||
test $? -eq 2
|
||||
grep "but 'b' is unlisted" stderr
|
||||
grep "both.*but 'b' is unlisted" stderr
|
||||
ltlsynt -f 'GFa | FGb | GFc' 2>stderr && :
|
||||
test $? -eq 2
|
||||
grep "one of --ins or --outs" stderr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue