randltl: gracefully handle the absence of unary or binary operators.

* src/ltlvisit/randomltl.cc: Fix generation of formulas when unary or
binary operators are missing.
* src/ltlvisit/apcollect.cc, src/ltlvisit/apcollect.hh
(destroy_atomic_prop_set): New function.
* src/bin/randltl.cc: Use it, and also honnor --boolean-priorities
when generating SEREs.
* src/ltltest/rand.test: New file.
* src/ltltest/Makefile.am: Add it.
This commit is contained in:
Alexandre Duret-Lutz 2014-02-05 18:10:48 +01:00
parent 4911e7dc1f
commit 50bdc24514
6 changed files with 154 additions and 20 deletions

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2012, 2013 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2012, 2013, 2014 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie.
@ -40,6 +40,11 @@ namespace spot
typedef std::set<const atomic_prop*,
formula_ptr_less_than> atomic_prop_set;
/// \brief Destroy all the atomic propositions in an
/// atomic_prop_set.
SPOT_API void
destroy_atomic_prop_set(atomic_prop_set& as);
/// \brief Return the set of atomic propositions occurring in a formula.
///
/// \param f the formula to inspect