From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,99e73f65ea2533b9 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: and then... (a curiosity) Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <18b41828-bda4-4484-8884-ad62ce1c831d@f36g2000hsa.googlegroups.com> <57qdnfULQ9tzKCHVnZ2dnUVZ_tHinZ2d@comcast.com> <48bd0003$1@news.post.ch> Date: Thu, 4 Sep 2008 09:35:43 +0200 Message-ID: <12prmxev8newf.lvc4m055okkb$.dlg@40tude.net> NNTP-Posting-Date: 04 Sep 2008 09:35:42 CEST NNTP-Posting-Host: f91259f2.newsspool1.arcor-online.net X-Trace: DXC=YX8NQVg0U`_aAeROF2PWMQic==]BZ:af^4Fo<]lROoRQdKGeD_FbX2nR>V?mP X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:7634 Date: 2008-09-04T09:35:42+02:00 List-Id: On Thu, 4 Sep 2008 08:45:03 +0200, stefan-lucks@see-the.signature wrote: >>> True. But, at the logic level, the Ada-statement >> >> What is the "logic level"? >> >> I you mean "abstract Boolean logic, like in college", then there is no >> such thing as Constraint_Error, nor side effects. So of course it >> gives you a bad understanding of programming languages. > > Actually, there is Constraint_Erorr, though under a different name. ;-) > > If your Boolean function is allowed to raise an exception, this is the > same as returning "undefined" in three-valued logic, as I pointed out in > another posting in this mail. Why "undefined", it is rather "contradictory" (in four-state Belnap logic) > This is the point I had been trying to make in all my postings to this > thread: "False and Undefined" is False, not Undefined! Thus, "if X/=0 and > Y/X<100" should go into the else-branch, instead of raising an exception. > The shortcut version "if X/=0 and then Y/X<100" does exactly the right > thing. Well, indeed 0 /\ _|_ = 0 0 /\ T = 0 Here 0 = False, 1 = True, _|_ = Uncertain, T = Contradiction. False under /\ always renders False. Nevertheless Boolean logic /= Belnap logic, though the former is contained in the latter. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de