Skip to content

Commit 0d4c976

Browse files
authored
Merge pull request #1187 from diffblue/k-induction-fail-early
k-induction: fail early when there is no suitable property
2 parents 850e688 + 2e65c4d commit 0d4c976

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/ebmc/k_induction.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,22 @@ property_checker_resultt k_induction(
104104
// copy
105105
auto properties_copy = properties;
106106

107+
// Are there any properties suitable for k-induction?
108+
// Fail early if not.
109+
if(!k_inductiont::have_supported_property(properties.properties))
110+
{
111+
for(auto &property : properties_copy.properties)
112+
{
113+
if(
114+
!property.is_assumed() && !property.is_disabled() &&
115+
!property.is_proved())
116+
{
117+
property.unsupported("unsupported by k-induction");
118+
}
119+
}
120+
return property_checker_resultt{properties_copy};
121+
}
122+
107123
k_inductiont(
108124
k, transition_system, properties_copy, solver_factory, message_handler)();
109125

0 commit comments

Comments
 (0)