From: Georg Bauhaus on
On 07.06.10 14:22, Dmitry A. Kazakov wrote:
> On Mon, 07 Jun 2010 13:13:18 +0200, Georg Bauhaus wrote:
>
>> DbC, however, has to do with designing components of the ship.
>> You can have rescue clauses (exception handlers)
>> in DbC.
>
> To whom should Titanic have sent the exception? To the humpback whales?

As I said, this is not an exception raised in some
component part, the ship is damaged and is going to
sind. The frame of reference for "exceptional" is
a different one.

>> Exceptional situations is "unprogrammed" exceptional state,
>> since this is what "exceptional" is about, if anything.
>
> Any state is programmed.

In an trivial sense, yes, every exceptional state
is a state.... "Boring!", as some say.

> This includes the exceptional ones. When bug
> happens, the program is in no state.

Erh, are you sure?
From: Yannick Duchêne (Hibou57) on
Le Mon, 07 Jun 2010 16:12:38 +0200, Georg Bauhaus
<rm.dash-bauhaus(a)futureapps.de> a écrit:
>> This includes the exceptional ones. When bug
>> happens, the program is in no state.
>
> Erh, are you sure?
May be when the CPU enters a double-fault state ? (half-joking)


--
There is even better than a pragma Assert: a SPARK --# check.
--# check C and WhoKnowWhat and YouKnowWho;
--# assert Ada;
-- i.e. forget about previous premises which leads to conclusion
-- and start with new conclusion as premise.
From: Yannick Duchêne (Hibou57) on
Le Mon, 07 Jun 2010 15:27:45 +0200, Dmitry A. Kazakov
<mailbox(a)dmitry-kazakov.de> a écrit:
> They will rather distract from design in favor
> debugging.
As an old Eiffel “advocator”, I can say no, as long as you read contract
clauses before using any component holding such a contract (just like you
have to know the signature of a subprogram before being able to use it).
And whenever an error occurred, which is caught (likely early) by a clause
violation, you then have an interpretation of the error. There is nothing
like an interpretation, when in a debugger, you see this variable X has
this value Y which turns into the Z behavior. Even if a clause violation
pass control to a debugger (I had created my own in that purpose with
SmallEiffel), you still have a debugger with an interpretation of an
erroneous state.

> Ada was designed as a language of little or no debugging.
> Unfortunately it rapidly loses the ground.
Agree. But there is no magic keyword, no magic syntactic construct, this
target needs paradigm, process and construction techniques. And this is
the purpose of DbC. Ada needs something to target “little or no
debugging”, it cannot do it by-itself. I agree there are other ways, more
strict and formal ways to achieve the same, ... however, this would
unlikely meet a large community agreement (for the reasons given before)..


--
There is even better than a pragma Assert: a SPARK --# check.
--# check C and WhoKnowWhat and YouKnowWho;
--# assert Ada;
-- i.e. forget about previous premises which leads to conclusion
-- and start with new conclusion as premise.
From: Yannick Duchêne (Hibou57) on
Le Mon, 07 Jun 2010 16:09:37 +0200, Georg Bauhaus
<rm.dash-bauhaus(a)futureapps.de> a écrit:
> I still wonder why one would not want to
> specify more than the subtype constraints can achieve
Indeed, I oftenly had this in mind (what a type system will never be able
to do).

--
There is even better than a pragma Assert: a SPARK --# check.
--# check C and WhoKnowWhat and YouKnowWho;
--# assert Ada;
-- i.e. forget about previous premises which leads to conclusion
-- and start with new conclusion as premise.
From: Dmitry A. Kazakov on
On Mon, 07 Jun 2010 16:12:38 +0200, Georg Bauhaus wrote:

> On 07.06.10 14:22, Dmitry A. Kazakov wrote:

>> This includes the exceptional ones. When bug
>> happens, the program is in no state.
>
> Erh, are you sure?

Yes I am. Any program state is defined, it has some sematic interpretation
in the domain. Bug is when you have lost this synchronization. Meaningless
state is no state.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de