@@ -94,31 +94,35 @@ std::optional<exprt> negate_property_node(const exprt &expr)
9494 }
9595 else if (expr.id () == ID_sva_until)
9696 {
97- // ¬(φ W ψ) ≡ (¬φ strongR ¬ψ)
98- auto &W = to_sva_until_expr (expr);
99- return strong_R_exprt{not_exprt{W.lhs ()}, not_exprt{W.rhs ()}};
97+ // ¬(φ weakU ψ) ≡ (¬φ strongR ¬ψ) ≡ (¬ψ strongU (¬ψ ∧ ¬φ)) ≡ (¬ψ s_until_with ¬φ)
98+ // Note that LHS and RHS are swapped.
99+ auto &until = to_sva_until_expr (expr);
100+ return sva_s_until_with_exprt{
101+ not_exprt{until.rhs ()}, not_exprt{until.lhs ()}};
100102 }
101103 else if (expr.id () == ID_sva_s_until)
102104 {
103- // ¬(φ U ψ) ≡ (¬φ R ¬ψ)
104- auto &U = to_sva_s_until_expr (expr);
105- return R_exprt{not_exprt{U.lhs ()}, not_exprt{U.rhs ()}};
105+ // ¬(φ strongU ψ) ≡ (¬φ weakR ¬ψ) ≡ (¬ψ weakU (¬ψ ∧ ¬φ)) ≡ (¬ψ until_with ¬φ)
106+ // Note that LHS and RHS are swapped.
107+ auto &s_until = to_sva_s_until_expr (expr);
108+ return sva_until_with_exprt{
109+ not_exprt{s_until.rhs ()}, not_exprt{s_until.lhs ()}};
106110 }
107111 else if (expr.id () == ID_sva_until_with)
108112 {
109- // ¬(φ R ψ) ≡ (¬φ U ¬ψ )
113+ // ¬(φ until_with ψ) ≡ ¬(φ until (φ ∧ ψ)) ≡ ¬(ψ weakR φ) ≡ (¬ψ strongU ¬φ )
110114 // Note LHS and RHS are swapped.
111115 auto &until_with = to_sva_until_with_expr (expr);
112- auto R = R_exprt{until_with. rhs (), until_with. lhs ()};
113- return sva_until_exprt{ not_exprt{R. lhs ()}, not_exprt{R. rhs ()}};
116+ return sva_s_until_exprt{
117+ not_exprt{until_with. rhs ()}, not_exprt{until_with. lhs ()}};
114118 }
115119 else if (expr.id () == ID_sva_s_until_with)
116120 {
117- // ¬(φ strongR ψ) ≡ (¬φ W ¬ψ)
121+ // ¬(φ s_until_with ψ) ≡ ¬(φ s_until (φ ∧ ψ)) ≡ ¬(ψ strongR φ) ≡ (¬φ weakU ¬ψ)
118122 // Note LHS and RHS are swapped.
119123 auto &s_until_with = to_sva_s_until_with_expr (expr);
120- auto strong_R = strong_R_exprt{s_until_with. rhs (), s_until_with. lhs ()};
121- return weak_U_exprt{ not_exprt{strong_R. lhs ()}, not_exprt{strong_R. rhs ()}};
124+ return sva_until_exprt{
125+ not_exprt{s_until_with. rhs ()}, not_exprt{s_until_with. lhs ()}};
122126 }
123127 else if (expr.id () == ID_sva_overlapped_followed_by)
124128 {
0 commit comments