comp.lang.ada
 help / color / mirror / Atom feed
From: "Alejandro R. Mosteo" <alejandro@mosteo.com>
Subject: Re: Ada-Oriented GUI
Date: Fri, 23 Mar 2018 13:31:01 +0100
Date: 2018-03-23T13:31:01+01:00	[thread overview]
Message-ID: <p92s25$87i$1@dont-email.me> (raw)
In-Reply-To: <p91fae$3fs$1@franka.jacob-sparre.dk>

On 23/03/18 00:47, Randy Brukardt wrote:
> (...)
> 
> No, a correct program is one that can be reasoned about. And one cannot
> reason about programs that contain race conditions ("unavoidable" or not).
> One has to impose some sort of structure to avoid race conditions/dead
> locks/live locks, lest the program be unanalyzable. And to have any chance
> of believing a program is correct requires analysis.
 >
> (...) 
 >
> One has to architect the application so
> that there is very limited interaction between tasks, and that interaction
> has to be carefully controlled (usually via rendezvous or protected
> objects). 

That's one strong point of Rx precisely.

> This has nothing to do with the UI or IO or any other "events".
> It's probably easiest for most to just manage the UI in the single task,
> because that gets the mess of "events" away from the bulk of the processing.
> (Ada is wildly inappropriate for applications that are mostly GUI - use some
> web-based langauge for that and use Ada for the heavy-duty processing.)
 >
> (...)
> 
> For sequential programs, Ada is pretty much there. I've been working on
> Janus/Ada infrastructure improvements without even trying to find the code
> that needs to be modified -- the compiler/run-time tells me where changes
> are needed far quicker than trying to look for them by hand. (One has to
> design their code to enable this sort of thing in the first place, but that
> pays off many times if the program has any sort of lifetime.)
> 
> One of the goals of Ada 2020 is to bring that level of reliability to
> parallel programming. That means the compiler has to (conservatively)
> diagnose and reject data races between separately executed code.

Matlab has some of what is planned and I'm counting the time until Ada 
will too. It's fantastic.

> A system that decides to just ignore race conditions as "unavoidable" is
> going in the wrong direction. Most likely, it will kill us all when it's
> running self-driving cars and autopilots.

I think the argument about race conditions has derailed. Rx does not 
embrace the idea that race conditions (in the sense of real bugs) are 
unavoidable. If correct execution is guaranteed independently of the 
particular interleaving of events I'd say that's not a real race 
condition, and that's what Rx abstracts away (or helps you to, safely).

I (humbly) think that people not knowing Rx but arguing against it are 
barking at the wrong tree. It's not something that can do everything 
better. It's just a tool (paradigm if you wish) that precisely 
simplifies handling a certain kind of systems that with traditional 
techniques are prone to difficult to diagnose bugs and uncomfortable 
code (as the discussion on GUI libraries show). It goes in the direction 
of "this can't cause a race condition", not the contrary.

To me, Rx vs imperative [for suitable problems] it's like tasking in Ada 
vs other languages. Ada is in entirely another league wrt simplicity and 
safety. Still, you can misdesign spaguetti code that deadlocks, 
livelocks, that calls blocking operations from blocking operations, 
raises Tasking_Error... but Ada makes things easy if you know the Ada 
way, and enables some kinds of analysis, sure, if you adhere to some 
practices.

I'm really not an Rx expert, so I'm not sure what kind of research is 
being done on it that could be relevant for safety-minded people. What I 
know is that the principles are simple and elegant, and my instinct says 
that it would interact very well with Ada protected objects, so I would 
be surprised if nothing good could be deducted starting from there.


  parent reply	other threads:[~2018-03-23 12:31 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-18 13:33 Ada-Oriented GUI Jeffrey R. Carter
2018-03-19  2:03 ` Dan'l Miller
2018-03-19 14:10   ` Dan'l Miller
2018-03-21  9:49     ` Alejandro R. Mosteo
2018-03-21 13:58       ` Dan'l Miller
2018-03-21 18:43         ` briot.emmanuel
2018-03-21 19:17           ` Shark8
2018-03-21 22:40             ` Randy Brukardt
2018-03-21 23:52               ` Shark8
2018-03-22  6:50                 ` briot.emmanuel
2018-03-22 16:56                   ` Shark8
2018-03-23 16:29               ` Shark8
2018-03-23 22:59                 ` Randy Brukardt
2018-03-23 23:43                   ` Mehdi Saada
2018-03-26 22:09                     ` Randy Brukardt
2018-03-27  7:27                       ` Dmitry A. Kazakov
2018-03-27 23:58                         ` Randy Brukardt
2018-03-28  7:09                           ` Dmitry A. Kazakov
2018-03-22 17:34         ` Alejandro R. Mosteo
2018-03-22 17:50           ` Dan'l Miller
2018-03-22 18:58             ` Shark8
2018-03-23 12:06             ` Alejandro R. Mosteo
2018-03-20 16:41 ` Dan'l Miller
2018-03-20 21:34   ` Randy Brukardt
2018-03-21  2:22     ` Dan'l Miller
2018-03-21 21:50       ` Randy Brukardt
2018-03-22  8:45         ` Dmitry A. Kazakov
2018-03-22 10:58         ` Bojan Bozovic
2018-03-22 11:03           ` Bojan Bozovic
2018-03-21  8:25 ` Dmitry A. Kazakov
2018-03-21 14:30   ` Dan'l Miller
2018-03-21 15:57     ` vincent.diemunsch
2018-03-21 17:33       ` Dan'l Miller
2018-03-21 16:27     ` Dmitry A. Kazakov
2018-03-21 17:04       ` Dan'l Miller
2018-03-21 17:42         ` Dmitry A. Kazakov
2018-03-21 18:19           ` Dan'l Miller
2018-03-21 19:11             ` Simon Wright
2018-03-21 19:51               ` Dan'l Miller
2018-03-21 20:11                 ` Dmitry A. Kazakov
2018-03-21 20:33                   ` Dan'l Miller
2018-03-21 22:16                   ` Dan'l Miller
2018-03-22  9:12                     ` Dmitry A. Kazakov
2018-03-22 14:57                       ` Dan'l Miller
2018-03-22 15:46                         ` Bojan Bozovic
2018-03-22 14:00                     ` Dan'l Miller
2018-03-22 17:29                   ` Alejandro R. Mosteo
2018-03-21 21:58             ` Randy Brukardt
2018-03-26 21:20               ` G. B.
2018-03-21 22:33             ` Randy Brukardt
2018-03-22  1:43               ` Dan'l Miller
2018-03-22 23:47                 ` Randy Brukardt
2018-03-23  2:37                   ` Dan'l Miller
2018-03-23 22:42                     ` Randy Brukardt
2018-03-24  7:47                       ` Simon Wright
2018-03-23  9:05                   ` Jeffrey R. Carter
2018-03-23  9:48                     ` Bojan Bozovic
2018-03-23 10:20                     ` Alejandro R. Mosteo
2018-03-27 18:32                     ` Killing software and certification (was: Ada-Oriented GUI) Alejandro R. Mosteo
2018-03-27 19:25                       ` Killing software and certification Dmitry A. Kazakov
2018-03-28 13:54                         ` Alejandro R. Mosteo
2018-03-28 14:23                           ` Dmitry A. Kazakov
2018-03-28 17:06                             ` Alejandro R. Mosteo
2018-03-28 19:35                               ` Dmitry A. Kazakov
2018-03-28 15:47                           ` Jeffrey R. Carter
2018-03-28 17:02                             ` Dennis Lee Bieber
2018-03-28 17:59                             ` Dan'l Miller
2018-03-27 19:41                       ` Killing software and certification (was: Ada-Oriented GUI) Dan'l Miller
2018-03-28  0:04                         ` Randy Brukardt
2018-03-28  2:27                           ` Dan'l Miller
2018-03-28 13:54                           ` Killing software and certification Alejandro R. Mosteo
2018-03-28  0:21                       ` Killing software and certification (was: Ada-Oriented GUI) Jere
2018-03-28 13:54                         ` Killing software and certification Alejandro R. Mosteo
2018-03-23 12:31                   ` Alejandro R. Mosteo [this message]
2018-03-23 12:59                     ` Ada-Oriented GUI Dmitry A. Kazakov
2018-03-23 16:16                       ` Dan'l Miller
2018-03-23 17:18                         ` Dmitry A. Kazakov
2018-03-23 18:31                           ` Dan'l Miller
2018-03-23 20:06                             ` Dmitry A. Kazakov
2018-03-23 20:48                               ` Mehdi Saada
2018-03-23 21:18                                 ` Dmitry A. Kazakov
2018-03-24 11:36                       ` Alejandro R. Mosteo
2018-03-24 13:12                         ` Dmitry A. Kazakov
2018-03-28 14:09                           ` Alejandro R. Mosteo
2018-03-28 15:02                             ` Dmitry A. Kazakov
2018-03-28 18:07                               ` Alejandro R. Mosteo
2018-03-29  7:58                                 ` Dmitry A. Kazakov
2018-04-02 22:13                               ` Robert I. Eachus
2018-04-03  8:31                                 ` Dmitry A. Kazakov
2018-04-03 22:32                                   ` Robert I. Eachus
2018-04-04  7:30                                     ` Dmitry A. Kazakov
2018-03-25 12:57                         ` Jeffrey R. Carter
2018-03-24 16:33                   ` Dan'l Miller
2018-03-26 22:29                     ` Randy Brukardt
2018-03-27  0:15                       ` Dan'l Miller
2018-03-27  6:08                       ` Dennis Lee Bieber
2018-03-27  7:52                         ` Simon Wright
2018-03-27 14:48                           ` Dennis Lee Bieber
2018-04-01 17:37                       ` Robert I. Eachus
2018-03-25 19:19 ` Andrew Shvets
  -- strict thread matches above, loose matches on Subject: below --
2018-03-23 22:48 Randy Brukardt
2018-03-24  7:51 ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox