Trivially reduce 'a[*1]' to 'a'.
* src/ltlast/bunop.cc (bunop::instance): Here. * src/ltlast/bunop.hh, doc/tl/tl.tex: Document it. * src/ltltest/equals.test: Test it.
This commit is contained in:
parent
abaf102746
commit
a4353d3985
4 changed files with 13 additions and 5 deletions
|
|
@ -211,6 +211,10 @@ namespace spot
|
|||
return constant::empty_word_instance();
|
||||
}
|
||||
|
||||
// - Exp[*1] = Exp
|
||||
if (min == 1 && max == 1)
|
||||
return child;
|
||||
|
||||
// - Exp[*i..j][*min..max] = Exp[*i(min)..j(max)]
|
||||
// if i*(min+1)<=j(min)+1.
|
||||
if (child->kind() == BUnOp)
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ namespace spot
|
|||
/// - [*0][*min..max] = [*0]
|
||||
/// - Exp[*0] = [*0]
|
||||
/// - Exp[*i..j][*k..l] = Exp[*ik..jl] if i*(k+1)<=jk+1.
|
||||
/// - Exp[*1] = Exp
|
||||
///
|
||||
/// These rewriting rules imply that it is not possible to build
|
||||
/// an LTL formula object that is SYNTACTICALLY equal to one of
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue