@@ -93,42 +93,39 @@ Function: bmc_supports_CTL_property
9393
9494bool bmc_supports_CTL_property (const exprt &expr)
9595{
96- // We support
97- // * formulas that contain no temporal operator besides AX
98- // * GFφ, where φ contains no temporal operator besides AX
99- // * AFφ, where φ contains no temporal operator besides AX
100- // * AGAFφ, where φ contains no temporal operator besides AX
101- // * conjunctions of supported CTL properties
102- auto non_AX_CTL_operator = [](const exprt &expr)
103- { return is_CTL_operator (expr) && expr.id () != ID_AX; };
104-
105- if (!has_subexpr (expr, non_AX_CTL_operator))
96+ // We map a subset of ACTL to LTL, following
97+ // Monika Maidl. "The common fragment of CTL and LTL"
98+ // http://dx.doi.org/10.1109/SFCS.2000.892332
99+ //
100+ // Specificially, we allow
101+ // * state predicates
102+ // * conjunctions of allowed formulas
103+ // * AX φ, where φ is allowed
104+ // * AF φ, where φ is allowed
105+ // * AG φ, where φ is allowed
106+ if (!has_CTL_operator (expr))
106107 {
107108 return true ;
108109 }
109- else if (expr.id () == ID_AF)
110- {
111- return !has_subexpr (to_AF_expr (expr).op (), non_AX_CTL_operator);
112- }
113- else if (expr.id () == ID_AG)
114- {
115- auto &op = to_AG_expr (expr).op ();
116- if (op.id () == ID_AF)
117- {
118- return !has_subexpr (to_AF_expr (op).op (), non_AX_CTL_operator);
119- }
120- else
121- {
122- return !has_subexpr (op, non_AX_CTL_operator);
123- }
124- }
125110 else if (expr.id () == ID_and)
126111 {
127112 for (auto &op : expr.operands ())
128113 if (!bmc_supports_CTL_property (op))
129114 return false ;
130115 return true ;
131116 }
117+ else if (expr.id () == ID_AX)
118+ {
119+ return bmc_supports_CTL_property (to_AX_expr (expr).op ());
120+ }
121+ else if (expr.id () == ID_AF)
122+ {
123+ return bmc_supports_CTL_property (to_AF_expr (expr).op ());
124+ }
125+ else if (expr.id () == ID_AG)
126+ {
127+ return bmc_supports_CTL_property (to_AG_expr (expr).op ());
128+ }
132129 else
133130 return false ;
134131}
0 commit comments