https://kotlinlang.org logo
#getting-started
Title
# getting-started
s

Sam Stone

10/06/2023, 3:04 AM
Is there a tool for verifying that a statement like
day == 28 && leapYear || day == 29 && !leapYear
is equivalent to
day == if(leapYear) 28 else 29
?
a

Alejandro Serrano.Mena

10/06/2023, 7:34 AM
You can use a SMT solver (Z3 is one of the best) to perform such kind of reasoning
a

Adam S

10/06/2023, 8:27 AM
Perhaps property based testing could help https://kotest.io/docs/proptest/property-based-testing.html
2 Views