spot
1.1.4
|
Namespaces | |
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. More... | |
struct | formula_ptr_less_than |
Strict Weak Ordering for const formula* . More... | |
struct | formula_ptr_hash |
Hash Function for 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 visitor. More... | |
class | declarative_environment |
A declarative environment. More... | |
class | default_environment |
A laxist environment. 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. More... | |
class | language_containment_checker |
class | unabbreviate_logic_visitor |
Clone and rewrite a formula to remove most of the abbreviated logical operators. More... | |
class | mark_tools |
class | postfix_visitor |
Apply an algorithm on each node of an AST, during a postfix traversal. More... | |
class | random_formula |
Base class for random formula generators. More... | |
class | random_ltl |
Generate random LTL formulae. More... | |
class | random_boolean |
Generate random Boolean formulae. More... | |
class | random_sere |
Generate random SERE. More... | |
class | random_psl |
Generate random PSL formulae. 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. More... | |
Typedefs | |
typedef std::pair < ltlyy::location, std::string > | parse_error |
A parse diagnostic with its location. More... | |
typedef std::list< parse_error > | parse_error_list |
A list of parser diagnostics, as filled by parse. More... | |
typedef std::set< const atomic_prop *, formula_ptr_less_than > | atomic_prop_set |
Set of atomic propositions. More... | |
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. More... | |
const binop * | is_binop (const formula *f, binop::type op) |
Cast f into a binop if it has type op. More... | |
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. More... | |
const binop * | is_U (const formula *f) |
Cast f into a binop if it is a U. More... | |
const binop * | is_M (const formula *f) |
Cast f into a binop if it is a M. More... | |
const binop * | is_R (const formula *f) |
Cast f into a binop if it is a R. More... | |
const binop * | is_W (const formula *f) |
Cast f into a binop if it is a W. More... | |
const bunop * | is_bunop (const formula *f) |
Cast f into a bunop. More... | |
const bunop * | is_bunop (const formula *f, bunop::type op) |
Cast f into a bunop if it has type op. More... | |
const bunop * | is_Star (const formula *f) |
Cast f into a bunop if it is a Star. More... | |
const bunop * | is_KleenStar (const formula *f) |
Cast f into a bunop if it is a Star[0..]. More... | |
const constant * | is_constant (const formula *f) |
Cast f into a constant. More... | |
std::ostream & | print_formula_props (std::ostream &out, const formula *f, bool abbreviated=false) |
Print the properties of formula f on stream out. More... | |
std::list< std::string > | list_formula_props (const formula *f) |
List the properties of formula f. More... | |
const multop * | is_multop (const formula *f) |
Cast f into a multop. More... | |
const multop * | is_multop (const formula *f, multop::type op) |
Cast f into a multop if it has type op. More... | |
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. More... | |
const multop * | is_And (const formula *f) |
Cast f into a multop if it is an And. More... | |
const multop * | is_AndRat (const formula *f) |
Cast f into a multop if it is an AndRat. More... | |
const multop * | is_AndNLM (const formula *f) |
Cast f into a multop if it is an AndNLM. More... | |
const multop * | is_Or (const formula *f) |
Cast f into a multop if it is an Or. More... | |
const multop * | is_OrRat (const formula *f) |
Cast f into a multop if it is an OrRat. More... | |
const multop * | is_Concat (const formula *f) |
Cast f into a multop if it is a Concat. More... | |
const multop * | is_Fusion (const formula *f) |
Cast f into a multop if it is a Fusion. More... | |
const unop * | is_unop (const formula *f) |
Cast f into a unop. More... | |
const unop * | is_unop (const formula *f, unop::type op) |
Cast f into a unop if it has type op. More... | |
const unop * | is_Not (const formula *f) |
Cast f into a unop if it is a Not. More... | |
const unop * | is_X (const formula *f) |
Cast f into a unop if it is a X. More... | |
const unop * | is_F (const formula *f) |
Cast f into a unop if it is a F. More... | |
const unop * | is_G (const formula *f) |
Cast f into a unop if it is a G. More... | |
const unop * | is_GF (const formula *f) |
Cast f into a unop if has the form GF(...). More... | |
const unop * | is_FG (const formula *f) |
Cast f into a unop if has the form FG(...). More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | fix_utf8_locations (const std::string &input_string, parse_error_list &error_list) |
Fix location of diagnostics assuming the input is utf8. More... | |
atomic_prop_set * | atomic_prop_collect (const formula *f, atomic_prop_set *s=0) |
Return the set of atomic propositions occurring in a formula. More... | |
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. More... | |
const formula * | clone (const formula *f) |
Clone a formula. More... | |
const formula * | reduce_tau03 (const formula *f, bool stronger=true) |
Reduce a formula using language containment relationships. More... | |
void | destroy (const formula *f) |
Destroys a formula. More... | |
std::ostream & | dotty (std::ostream &os, const formula *f) |
Write a formula tree using dot's syntax. More... | |
std::ostream & | dump (std::ostream &os, const formula *f) |
Dump a formula tree. More... | |
std::ostream & | to_lbt_string (const formula *f, std::ostream &os) |
Output an LTL formula as a string in LBT's format. More... | |
std::string | to_lbt_string (const formula *f) |
Output an LTL formula as a string in LBT's format. More... | |
int | length (const formula *f) |
Compute the length of a formula. More... | |
int | length_boolone (const formula *f) |
Compute the length of a formula, squashing Boolean formulae. More... | |
const formula * | unabbreviate_logic (const formula *f) |
Clone and rewrite a formula to remove most of the abbreviated logical operators. More... | |
const formula * | negative_normal_form (const formula *f, bool negated=false) |
Build the negative normal form of f. More... | |
const formula * | reduce (const formula *f, int opt=Reduce_All) |
Reduce a formula f. More... | |
bool | is_eventual (const formula *f) |
Check whether a formula is a pure eventuality. More... | |
bool | is_universal (const formula *f) |
Check whether a formula is purely universal. More... | |
const formula * | relabel (const formula *f, relabeling_style style) |
Relabel the atomic proposition in a formula. More... | |
const formula * | remove_x (const formula *f) |
Rewrite a stutter-insensitive formula f without using the X operator. More... | |
bool | is_stutter_insensitive (const formula *f) |
Whether an LTL formula f is stutter-insensitive. More... | |
const formula * | simplify_f_g (const formula *f) |
Replace true U f and false R g by F f and G g . More... | |
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). More... | |
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). More... | |
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). More... | |
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). More... | |
std::ostream & | to_spin_string (const formula *f, std::ostream &os, bool full_parent=false) |
Output a formula as a string parsable by Spin. More... | |
std::string | to_spin_string (const formula *f, bool full_parent=false) |
Convert a formula into a string parsable by Spin. More... | |
std::ostream & | to_wring_string (const formula *f, std::ostream &os) |
Output a formula as a string parsable by Wring. More... | |
std::string | to_wring_string (const formula *f) |
Convert a formula into a string parsable by Wring. More... | |
const formula * | unabbreviate_ltl (const formula *f) |
Clone and rewrite a formula to remove most of the abbreviated LTL and logical operators. More... | |
const formula * | unabbreviate_wm (const formula *f) |
Rewrite a formula to remove the W and M operators. More... | |
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().
bool spot::ltl::is_stutter_insensitive | ( | const formula * | f) |
Whether an LTL formula f is stutter-insensitive.
This is simply achieved by checking whether the output of remove_x(f)
is equivalent to f. This only works for LTL formulas, not PSL formulas.
@Article{ etessami.00.ipl, author = {Kousha Etessami}, title = {A note on a question of {P}eled and {W}ilke regarding stutter-invariant {LTL}}, journal = {Information Processing Letters}, volume = {75}, number = {6}, year = {2000}, pages = {261--263} }
|
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
@TechReport{ 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 stronger is set, additional rules are used to further reduce some U, R, and X usages.
const formula* spot::ltl::remove_x | ( | const formula * | f) |
Rewrite a stutter-insensitive formula f without using the X operator.
This function may also be applied to stutter-sensitive formulas, but in that case the resulting formula is not equivalent.
@Article{ etessami.00.ipl, author = {Kousha Etessami}, title = {A note on a question of {P}eled and {W}ilke regarding stutter-invariant {LTL}}, journal = {Information Processing Letters}, volume = {75}, number = {6}, year = {2000}, pages = {261--263} }
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.
@Article{ 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} }
sere | the SERE to rewrite |
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.