spot
1.0
|
Namespaces | |
namespace | formula_tree |
Trees representing formulae where atomic propositions are unknown. |
Classes | |
class | atomic_prop |
Atomic propositions. More... | |
class | automatop |
Automaton operators. More... | |
class | binop |
Binary operator. More... | |
class | bunop |
Bounded unary operator. More... | |
class | constant |
A constant (True or False) More... | |
class | formula |
An LTL formula.The only way you can work with a formula is to build a spot::ltl::visitor or spot::ltl::const_visitor. More... | |
struct | formula_ptr_less_than |
Strict Weak Ordering for const formula* .This is meant to be used as a comparison functor for STL map whose key are of type const formula* . More... | |
struct | formula_ptr_hash |
Hash Function for const formula* .This is meant to be used as a hash functor for Sgi's hash_map whose key are of type const formula* . More... | |
class | multop |
Multi-operand operators. More... | |
class | nfa |
Nondeterministic Finite Automata used by automata operators. More... | |
class | succ_iterator |
class | ref_formula |
A reference-counted LTL formula. More... | |
class | unop |
Unary operators. More... | |
struct | visitor |
Formula visitorImplementing visitors is the prefered way to traverse a formula, since it does not involve any cast. More... | |
class | declarative_environment |
A declarative environment.This environment recognizes all atomic propositions that have been previously declared. It will reject other. More... | |
class | default_environment |
A laxist environment.This environment recognizes all atomic propositions. More... | |
class | environment |
An environment that describes atomic propositions. More... | |
class | ltl_file |
Read LTL formulae from a file, one by one. More... | |
class | clone_visitor |
Clone a formula.This visitor is public, because it's convenient to derive from it and override part of its methods. But if you just want the functionality, consider using spot::ltl::formula::clone instead, it is way faster. More... | |
class | language_containment_checker |
class | unabbreviate_logic_visitor |
Clone and rewrite a formula to remove most of the abbreviated logical operators.This will rewrite binary operators such as binop::Implies, binop::Equals, and binop::Xor, using only unop::Not, multop::Or, and multop::And. More... | |
class | mark_tools |
class | postfix_visitor |
Apply an algorithm on each node of an AST, during a postfix traversal.Override one or more of the postifix_visitor::doit methods with the algorithm to apply. More... | |
class | random_formula |
Base class for random formula generators. More... | |
class | random_ltl |
Generate random LTL formulae.This class recursively constructs LTL formulae of a given size. The formulae will use the use atomic propositions from the set of propositions passed to the constructor, in addition to the constant and all LTL operators supported by Spot. More... | |
class | random_boolean |
Generate random Boolean formulae.This class recursively constructs Boolean formulae of a given size. The formulae will use the use atomic propositions from the set of propositions passed to the constructor, in addition to the constant and all Boolean operators supported by Spot. More... | |
class | random_sere |
Generate random SERE.This class recursively constructs SERE of a given size. The formulae will use the use atomic propositions from the set of propositions passed to the constructor, in addition to the constant and all SERE operators supported by Spot. More... | |
class | random_psl |
Generate random PSL formulae.This class recursively constructs PSL formulae of a given size. The formulae will use the use atomic propositions from the set of propositions passed to the constructor, in addition to the constant and all PSL operators supported by Spot. More... | |
class | simplify_f_g_visitor |
Replace true U f and false R g by F f and G g . More... | |
class | ltl_simplifier_options |
class | ltl_simplifier |
Rewrite or simplify f in various ways. More... | |
class | unabbreviate_ltl_visitor |
Clone and rewrite a formula to remove most of the abbreviated LTL and logical operators.The rewriting performed on logical operator is the same as the one done by spot::ltl::unabbreviate_logic_visitor. More... |
Typedefs | |
typedef std::pair < ltlyy::location, std::string > | parse_error |
A parse diagnostic with its location. | |
typedef std::list< parse_error > | parse_error_list |
A list of parser diagnostics, as filled by parse. | |
typedef std::set< const atomic_prop *, formula_ptr_less_than > | atomic_prop_set |
Set of atomic propositions. | |
typedef Sgi::hash_map< const formula *, const formula *, ptr_hash< formula > > | snf_cache |
Enumerations | |
enum | reduce_options { Reduce_None = 0, Reduce_Basics = 1, Reduce_Syntactic_Implications = 2, Reduce_Eventuality_And_Universality = 4, Reduce_Containment_Checks = 8, Reduce_Containment_Checks_Stronger = 16, Reduce_All = -1U } |
Options for spot::ltl::reduce. More... | |
enum | relabeling_style { Abc, Pnn } |
Functions | |
const atomic_prop * | is_atomic_prop (const formula *f) |
const binop * | is_binop (const formula *f) |
Cast f into a binop. | |
const binop * | is_binop (const formula *f, binop::type op) |
Cast f into a binop if it has type op. | |
const binop * | is_binop (const formula *f, binop::type op1, binop::type op2) |
Cast f into a binop if it has type op1 or op2. | |
const binop * | is_U (const formula *f) |
Cast f into a binop if it is a U. | |
const binop * | is_M (const formula *f) |
Cast f into a binop if it is a M. | |
const binop * | is_R (const formula *f) |
Cast f into a binop if it is a R. | |
const binop * | is_W (const formula *f) |
Cast f into a binop if it is a W. | |
const bunop * | is_bunop (const formula *f) |
Cast f into a bunop. | |
const bunop * | is_bunop (const formula *f, bunop::type op) |
Cast f into a bunop if it has type op. | |
const bunop * | is_Star (const formula *f) |
Cast f into a bunop if it is a Star. | |
const bunop * | is_KleenStar (const formula *f) |
Cast f into a bunop if it is a Star[0..]. | |
const constant * | is_constant (const formula *f) |
Cast f into a constant. | |
std::ostream & | print_formula_props (std::ostream &out, const formula *f, bool abbreviated=false) |
Print the properties of formula f on stream out. | |
std::list< std::string > | list_formula_props (const formula *f) |
List the properties of formula f. | |
const multop * | is_multop (const formula *f) |
Cast f into a multop. | |
const multop * | is_multop (const formula *f, multop::type op) |
Cast f into a multop if it has type op. | |
const multop * | is_multop (const formula *f, multop::type op1, multop::type op2) |
Cast f into a multop if it has type op1 or op2. | |
const multop * | is_And (const formula *f) |
Cast f into a multop if it is an And. | |
const multop * | is_AndRat (const formula *f) |
Cast f into a multop if it is an AndRat. | |
const multop * | is_AndNLM (const formula *f) |
Cast f into a multop if it is an AndNLM. | |
const multop * | is_Or (const formula *f) |
Cast f into a multop if it is an Or. | |
const multop * | is_OrRat (const formula *f) |
Cast f into a multop if it is an OrRat. | |
const multop * | is_Concat (const formula *f) |
Cast f into a multop if it is a Concat. | |
const multop * | is_Fusion (const formula *f) |
Cast f into a multop if it is a Fusion. | |
const unop * | is_unop (const formula *f) |
Cast f into a unop. | |
const unop * | is_unop (const formula *f, unop::type op) |
Cast f into a unop if it has type op. | |
const unop * | is_Not (const formula *f) |
Cast f into a unop if it is a Not. | |
const unop * | is_X (const formula *f) |
Cast f into a unop if it is a X. | |
const unop * | is_F (const formula *f) |
Cast f into a unop if it is a F. | |
const unop * | is_G (const formula *f) |
Cast f into a unop if it is a G. | |
const unop * | is_GF (const formula *f) |
Cast f into a unop if has the form GF(...). | |
const unop * | is_FG (const formula *f) |
Cast f into a unop if has the form FG(...). | |
const formula * | parse (const std::string <l_string, parse_error_list &error_list, environment &env=default_environment::instance(), bool debug=false, bool lenient=false) |
Build a formula from an LTL string. | |
const formula * | parse_boolean (const std::string <l_string, parse_error_list &error_list, environment &env=default_environment::instance(), bool debug=false, bool lenient=false) |
Build a Boolean formula from a string. | |
const formula * | parse_lbt (const std::string <l_string, parse_error_list &error_list, environment &env=default_environment::instance(), bool debug=false) |
Build a formula from an LTL string in LBT's format. | |
const formula * | parse_sere (const std::string &sere_string, parse_error_list &error_list, environment &env=default_environment::instance(), bool debug=false, bool lenient=false) |
Build a formula from a string representing a SERE. | |
bool | format_parse_errors (std::ostream &os, const std::string &input_string, const parse_error_list &error_list) |
Format diagnostics produced by spot::ltl::parse or spot::ltl::ratexp. | |
void | fix_utf8_locations (const std::string <l_string, parse_error_list &error_list) |
Fix location of diagnostics assuming the input is utf8. | |
atomic_prop_set * | atomic_prop_collect (const formula *f, atomic_prop_set *s=0) |
Return the set of atomic propositions occurring in a formula. | |
bdd | atomic_prop_collect_as_bdd (const formula *f, const tgba *a) |
Return the set of atomic propositions occurring in a formula, as a BDD. | |
const formula * | clone (const formula *f) |
Clone a formula. | |
const formula * | reduce_tau03 (const formula *f, bool stronger=true) |
Reduce a formula using language containment relationships. | |
void | destroy (const formula *f) |
Destroys a formula. | |
std::ostream & | dotty (std::ostream &os, const formula *f) |
Write a formula tree using dot's syntax. | |
std::ostream & | dump (std::ostream &os, const formula *f) |
Dump a formula tree. | |
std::ostream & | to_lbt_string (const formula *f, std::ostream &os) |
Output an LTL formula as a string in LBT's format. | |
std::string | to_lbt_string (const formula *f) |
Output an LTL formula as a string in LBT's format. | |
int | length (const formula *f) |
Compute the length of a formula.The length of a formula is the number of atomic propositions, constants, and operators (logical and temporal) occurring in the formula. spot::ltl::multop instances with n arguments count for n-1; for instance a | b | c has length 5, even if there is only as single | node internally. | |
int | length_boolone (const formula *f) |
Compute the length of a formula, squashing Boolean formulaeThis is similar to spot::ltl::length(), except all Boolean formulae are assumed to have length one. | |
const formula * | unabbreviate_logic (const formula *f) |
Clone and rewrite a formula to remove most of the abbreviated logical operators.This will rewrite binary operators such as binop::Implies, binop::Equals, and binop::Xor, using only unop::Not, multop::Or, and multop::And. | |
const formula * | negative_normal_form (const formula *f, bool negated=false) |
Build the negative normal form of f.All negations of the formula are pushed in front of the atomic propositions. | |
const formula * | reduce (const formula *f, int opt=Reduce_All) |
Reduce a formula f. | |
bool | is_eventual (const formula *f) |
Check whether a formula is a pure eventuality.Pure eventuality formulae are defined in. | |
bool | is_universal (const formula *f) |
Check whether a formula is purely universal.Purely universal formulae are defined in. | |
const formula * | relabel (const formula *f, relabeling_style style) |
Relabel the atomic proposition in a formula. | |
const formula * | simplify_f_g (const formula *f) |
Replace true U f and false R g by F f and G g . | |
const formula * | star_normal_form (const formula *sere, snf_cache *cache=0) |
std::ostream & | to_string (const formula *f, std::ostream &os, bool full_parent=false, bool ratexp=false) |
Output a formula as a string which is parsable unless the formula contains automaton operators (used in ELTL formulae). | |
std::string | to_string (const formula *f, bool full_parent=false, bool ratexp=false) |
Output a formula as a string which is parsable unless the formula contains automaton operators (used in ELTL formulae). | |
std::ostream & | to_utf8_string (const formula *f, std::ostream &os, bool full_parent=false, bool ratexp=false) |
Output a formula as an utf8 string which is parsable unless the formula contains automaton operators (used in ELTL formulae). | |
std::string | to_utf8_string (const formula *f, bool full_parent=false, bool ratexp=false) |
Output a formula as an utf8 string which is parsable unless the formula contains automaton operators (used in ELTL formulae). | |
std::ostream & | to_spin_string (const formula *f, std::ostream &os, bool full_parent=false) |
Output a formula as a string parsable by Spin. | |
std::string | to_spin_string (const formula *f, bool full_parent=false) |
Convert a formula into a string parsable by Spin. | |
std::ostream & | to_wring_string (const formula *f, std::ostream &os) |
Output a formula as a string parsable by Wring. | |
std::string | to_wring_string (const formula *f) |
Convert a formula into a string parsable by Wring. | |
const formula * | unabbreviate_ltl (const formula *f) |
Clone and rewrite a formula to remove most of the abbreviated LTL and logical operators. | |
const formula * | unabbreviate_wm (const formula *f) |
Rewrite a formula to remove the W and M operators. |
typedef Sgi::hash_map<const formula*, const formula*, ptr_hash<formula> > spot::ltl::snf_cache |
|
inline |
Cast f into a multop if it is an And.
Return 0 otherwise.
References spot::ltl::multop::And, and is_multop().
|
inline |
Cast f into a multop if it is an AndNLM.
Return 0 otherwise.
References spot::ltl::multop::AndNLM, and is_multop().
|
inline |
Cast f into a multop if it is an AndRat.
Return 0 otherwise.
References spot::ltl::multop::AndRat, and is_multop().
|
inline |
References spot::ltl::formula::AtomicProp, and spot::ltl::formula::kind().
|
inline |
Cast f into a binop.
Cast f into a binop iff it is a binop instance. Return 0 otherwise. This is faster than dynamic_cast
.
References spot::ltl::formula::BinOp, and spot::ltl::formula::kind().
Referenced by is_binop(), is_M(), is_R(), is_U(), and is_W().
|
inline |
Cast f into a binop if it has type op.
Cast f into a binop iff it is a unop instance with operator op. Returns 0 otherwise.
References is_binop().
|
inline |
Cast f into a binop if it has type op1 or op2.
Cast f into a binop iff it is a unop instance with operator op1 or op2. Returns 0 otherwise.
References is_binop().
|
inline |
Cast f into a bunop.
Cast f into a bunop iff it is a bunop instance. Return 0 otherwise. This is faster than dynamic_cast
.
References spot::ltl::formula::BUnOp, and spot::ltl::formula::kind().
Referenced by is_bunop(), and is_Star().
|
inline |
Cast f into a bunop if it has type op.
Cast f into a bunop iff it is a bunop instance with operator op. Returns 0 otherwise.
References is_bunop().
|
inline |
Cast f into a multop if it is a Concat.
Return 0 otherwise.
References spot::ltl::multop::Concat, and is_multop().
|
inline |
Cast f into a constant.
Cast f into a constant iff it is a constant instance. Return 0 otherwise. This is faster than dynamic_cast
.
References spot::ltl::formula::Constant, and spot::ltl::formula::kind().
|
inline |
|
inline |
|
inline |
Cast f into a multop if it is a Fusion.
Return 0 otherwise.
References spot::ltl::multop::Fusion, and is_multop().
|
inline |
|
inline |
|
inline |
Cast f into a bunop if it is a Star[0..].
Return 0 otherwise.
References is_Star(), and spot::ltl::bunop::unbounded.
|
inline |
Cast f into a binop if it is a M.
Return 0 otherwise.
References is_binop(), and spot::ltl::binop::M.
|
inline |
Cast f into a multop.
Cast f into a multop iff it is a multop instance. Return 0 otherwise. This is faster than dynamic_cast
.
References spot::ltl::formula::kind(), and spot::ltl::formula::MultOp.
Referenced by is_And(), is_AndNLM(), is_AndRat(), is_Concat(), is_Fusion(), is_multop(), is_Or(), and is_OrRat().
|
inline |
Cast f into a multop if it has type op.
Cast f into a multop iff it is a multop instance with operator op. Returns 0 otherwise.
References is_multop().
|
inline |
Cast f into a multop if it has type op1 or op2.
Cast f into a multop iff it is a multop instance with operator op1 or op2. Returns 0 otherwise.
References is_multop().
|
inline |
Cast f into a unop if it is a Not.
Return 0 otherwise.
References is_unop(), and spot::ltl::unop::Not.
|
inline |
Cast f into a multop if it is an Or.
Return 0 otherwise.
References is_multop(), and spot::ltl::multop::Or.
|
inline |
Cast f into a multop if it is an OrRat.
Return 0 otherwise.
References is_multop(), and spot::ltl::multop::OrRat.
|
inline |
Cast f into a binop if it is a R.
Return 0 otherwise.
References is_binop(), and spot::ltl::binop::R.
|
inline |
Cast f into a bunop if it is a Star.
Return 0 otherwise.
References is_bunop(), and spot::ltl::bunop::Star.
Referenced by is_KleenStar().
|
inline |
Cast f into a binop if it is a U.
Return 0 otherwise.
References is_binop(), and spot::ltl::binop::U.
|
inline |
Cast f into a unop.
Cast f into a unop iff it is a unop instance. Return 0 otherwise. This is faster than dynamic_cast
.
References spot::ltl::formula::kind(), and spot::ltl::formula::UnOp.
Referenced by is_F(), is_G(), is_Not(), is_unop(), and is_X().
|
inline |
Cast f into a unop if it has type op.
Cast f into a unop iff it is a unop instance with operator op. Returns 0 otherwise.
References is_unop().
|
inline |
Cast f into a binop if it is a W.
Return 0 otherwise.
References is_binop(), and spot::ltl::binop::W.
|
inline |
std::list<std::string> spot::ltl::list_formula_props | ( | const formula * | f | ) |
List the properties of formula f.
std::ostream& spot::ltl::print_formula_props | ( | std::ostream & | out, |
const formula * | f, | ||
bool | abbreviated = false |
||
) |
Print the properties of formula f on stream out.
const formula* spot::ltl::reduce_tau03 | ( | const formula * | f, |
bool | stronger = true |
||
) |
Reduce a formula using language containment relationships.
The method is taken from table 4.1 in @verbatim
///{ tauriainen.03.a83, /// author = {Heikki Tauriainen}, /// title = {On Translating Linear Temporal Logic into Alternating and /// Nondeterministic Automata}, /// institution = {Helsinki University of Technology, Laboratory for /// Theoretical Computer Science}, /// address = {Espoo, Finland}, /// month = dec, /// number = {A83}, /// pages = {132}, /// type = {Research Report}, /// year = {2003}, /// note = {Reprint of Licentiate's thesis} ///} ///
(The "dagged" cells in the tables are not handled here.) If \a stronger is set, additional rules are used to further reduce some U, R, and X usages. \xrefitem deprecated 2.
const formula* spot::ltl::star_normal_form | ( | const formula * | sere, |
snf_cache * | cache = 0 |
||
) |
Helper to rewrite a sere in Star Normal Form. This should only be called on children of a Star operator. It corresponds to the E° operation defined in the following paper. @verbatim
/// { bruggeman.96.tcs, /// author = {Anne Br{"u}ggemann-Klein}, /// title = {Regular Expressions into Finite Automata}, /// journal = {Theoretical Computer Science}, /// year = {1996}, /// volume = {120}, /// pages = {87–98} /// } ///
\param sere the SERE to rewrite \param cache an optional cache
const formula* spot::ltl::unabbreviate_ltl | ( | const formula * | f | ) |
Clone and rewrite a formula to remove most of the abbreviated LTL and logical operators.
The rewriting performed on logical operator is the same as the one done by spot::ltl::unabbreviate_logic.
This will also rewrite unary operators such as unop::F, and unop::G, using only binop::U, and binop::R.