News for hackers. Stuff that matters.

haetze

Re:A Case for Properties: Programming Language Design on Monday November 16, 2020 @05:00AM (#25110005)
You are right that SPARK tries to prove the absence of these errors. In that case you don't need these checks and turn them off. If you don't they are still run.

Ada has Dynamic_Predicate(s) which "can be any Boolean expression". [0] So, I'm guessing, you can write a pointless Predicate which does not terminate in some cases or takes unreasonably long.

[0] http://www.ada-auth.org/standards/12rat/html/Rat12-2-5.html

Re:A Case for Properties: Programming Language Design on Sunday November 15, 2020 @03:40PM (#25104613)
Doesn't Ada have a sort of arbitrary computation on assignment? I think I remember that there are rules when predicates on types are checked. (Depending on the Assertion_Policy of course) I'm not sure how that works on assignment though.