News for hackers. Stuff that matters.
Re:A Hoare Logic for Rust by catnaroek on Friday September 30, 2016 @03:11PM (#12614583)
It's not. In DbC, you have preconditions and postconditions, but no means whatsoever to actually prove that, whenever the procedure's initial state meets the precondition, its final state will meet the postcondition.
Re:A Hoare Logic for Rust by Jtsummers on Friday September 30, 2016 @03:26PM (#12614669)
Well, I've found the point disagreement.

So design by contract, based on Hoare logic, applied in languages like SPARK Ada and Eiffel, produces statements that are unverifiable.

But Hoare logic, a thing without an executable implementation, produces statements which are verifiable.

Re:A Hoare Logic for Rust by naasking on Friday September 30, 2016 @05:09PM (#12615313)
> In DbC, you have preconditions and postconditions, but no means whatsoever to actually prove that, whenever the procedure's initial state meets the precondition, its final state will meet the postcondition.

Except many implementations of design by contract execute the postcondition check and raise an exception if it's not satisfied, so I don't think your statement is correct.

Re:A Hoare Logic for Rust by catnaroek on Friday September 30, 2016 @07:26PM (#12615823)
The very reason why you need to raise the exception is because the postcondition doesn't hold. The point to verification is to make sure the postcondition holds. So I stand by my original assertion: DbC isn't verification.
Re:A Hoare Logic for Rust by nickpsecurity on Saturday October 01, 2016 @01:59PM (#12619055)
If I were to categorize it, I'd call DbC formal specification that, combined with Eiffel or SPARK tools, can be used to verify that interfaces or code maintain those specific properties. It's a partial form of formal specification and verification that's still useful.

It doesn't have to be fully specified or proven to count as formal verification. Partial verification is a thriving field.

Re:A Hoare Logic for Rust by catnaroek on Saturday October 01, 2016 @02:59PM (#12619354)
Yep, that's perfectly reasonable.