Commit cd9369c1 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

Fix universal and eventual rules for M and W.

* src/ltlast/binop.cc: a M b is eventual if both a and b are
eventual, or if b == 1.  a W b is universal if both a and b
are universal or if b == 0.
* src/ltltest/kind.test: New test case.
parent c9a659c8
......@@ -49,12 +49,16 @@ namespace spot
// universality and eventuality.
props = first->get_props() & second->get_props();
// The matter can be further refined because:
// (f U g) and (g M f) are pure eventualities if
// g is a pure eventuality (regardless of f)
// or f == 1
// (f W g) and (g R f) are purely universal if
// f is purely universal (regardless of g)
// or g == 0
// (f U g) is a pure eventuality if
// g is a pure eventuality (regardless of f),
// or f == 1
// (g M f) is a pure eventuality if f and g are,
// or f == 1
// (g R f) is purely universal if
// f is purely universal (regardless of g)
// or g == 0
// (f W g) is purely universal if f and g are
// or g == 0
switch (op)
{
case Xor:
......@@ -177,8 +181,7 @@ namespace spot
// is.syntactic_persistence = Persistence U Persistance
break;
case W:
// f W g is universal if f is universal, or if g == 0.
is.universal = first->is_universal();
// f W g is universal if f and g are, or if g == 0.
is.universal |= (second == constant::false_instance());
is.boolean = false;
is.eltl_formula = false;
......@@ -217,8 +220,7 @@ namespace spot
break;
case M:
// g M f is universal if g is eventual, or if f == 1.
is.eventual = first->is_eventual();
// g M f is eventual if both g and f are eventual, or if f == 1.
is.eventual |= (second == constant::true_instance());
is.boolean = false;
is.eltl_formula = false;
......
......@@ -104,6 +104,8 @@ check 'Fa M GFb' '&!xLPer'
check 'GFa W GFb' '&!xLPeur'
check 'FGa W FGb' '&!xLPeu'
check 'Ga W FGb' '&!xLPup'
check 'Ga W b' '&!xLPsopr'
check 'Fa M b' '&!xLPgopr'
check '{a;b*;c}' '&!xfPsopr'
check '{a;b*;c}!' '&!xfPgopr'
check '!{a;b*;c}!' '&xfPsopr' # The negative normal form is {a;b*;c}[]->0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment