POV-Ray : Newsgroups : povray.off-topic : The other OS : Re: The other OS Server Time
30 Jul 2024 10:19:15 EDT (-0400)
  Re: The other OS  
From: Darren New
Date: 7 Aug 2011 11:59:38
Message: <4e3eb66a$1@news.povray.org>
On 8/7/2011 8:00, Warp wrote:
>    "In computer science, a predicate is called an invariant to a sequence
> of operations


Oh, and yes, if you're talking about DbC, You're basically talking about 
OOP, so an "invariant" applies at the class level. Basically, any time the 
constructor has finished and you're not inside a method of the instance in 
question, that class's invariants should all be true. So a class invariant 
is a predicate that applies at the end of the constructor and at the end of 
each method and (ideally) at the start of each method. The only reason it 
wouldn't apply at the start of each method is if someone changed one of the 
objects that instance references. (E.g., your invariant is 
this.mystorage.capacity > 100 and someone else goes around your back to set 
mystorage.capacity = 50 because they have a reference to the same 
"mystorage" instance.)

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.