comp.lang.ada
 help / color / mirror / Atom feed
* SPARK
@ 2010-05-12 22:55 Yannick Duchêne (Hibou57)
  2010-05-13  0:52 ` SPARK Yannick Duchêne (Hibou57)
                   ` (9 more replies)
  0 siblings, 10 replies; 61+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2010-05-12 22:55 UTC (permalink / raw)


Hello,

Short title, “SPARK”, as short as a subset (joking)

I wanted to start some SPARK related questions, ... “GNAT packages in  
Linux” kept apart.


Well, sorry for that, my first question gonna be about license. The GPL  
applies to SPARK-GPL (oh? really?). How does it apply ? I'm dubious about  
it in this context, because using SPARK to check an implementation does  
not implies any kind of linking to any binary or library, and I did not  
see anywhere something stating there was license restrictions on the usage  
of SPARK annotations in Ada sources.

What are the concrete restrictions so ?



Hope this first question will get a short answer, so let us jump to the  
second question, which is intended to start with one major deal of SPARK  
for people who know/use Ada : Ada subset and restrictions (not to disclaim  
or disagree with, mostly to talk and understand more).

The Praxis reference for SPARK-95 says :

[Praxis SPARK95 3]
> SPADE-Pascal was developed essentially by excising from
> ISO-Pascal those features which were considered particularly
> “dangerous”, or which could give rise to intractable validation
> problems - such as variant records,
That said, variant record can be emulated by user or program too, as  
that's just what were doing many people when there was no language support  
for that. What is different when the Pascal or Ada variant record compared  
to a user or program doing explicitly the same ? May be the answer is just  
in one of the last three words : “explicitly” ?

Does this quotation from the Praxis's reference about SPARK suggests SPARK  
has some troubles with the implicit or the underlying ?

If SPARK could know about a formalization of what's going on with variant  
records, as explicit as would be the same made by the user or program,  
would that solve the trick ?

What would possibly make this difficult or non-trustable ?



^ permalink raw reply	[flat|nested] 61+ messages in thread
* SPARK
@ 2009-06-10  9:47 Robert Matthews
  0 siblings, 0 replies; 61+ messages in thread
From: Robert Matthews @ 2009-06-10  9:47 UTC (permalink / raw)


I see there is a discussion of SPARK over at LWN:
http://lwn.net/Articles/336656/

Robert





^ permalink raw reply	[flat|nested] 61+ messages in thread
* timeouts
@ 2004-08-18 23:46 Brian May
  2004-08-19  3:40 ` timeouts Steve
  0 siblings, 1 reply; 61+ messages in thread
From: Brian May @ 2004-08-18 23:46 UTC (permalink / raw)


Hello,

I have a written a communications protocols, for Windows, in Ada,
using the GNAT compiler for Windows. This is my attempt at
implementing the MAP27 protocol (used for talking to trunk radios).

The main protocol is implemented as a separate task along the lines of
the following code. This code is simplified from my actual code, and
only shows the what I consider relevant to this bug, based on print
messages. Any mistakes in syntax are probably copy errors.

I should be able to provide full code on request, but need to confirm
this first.

task body State_Machine_Task is
     timer_enabled : Boolean := True;
     expire_time : Duration := clock + 0.1;
...
begin
   ...
   Put(Log.Debug,"----------------------------------------");
   Put(...);
   Put(timer_enabled,expire_time);
   Put(...);

   while Continue loop
       case SMT.DTE_State is
       when ... => 
            select
                accept ...
                ...
            or
                ...
            or 
               when timer_enabled =>
               delay until expire_time;
               
               print ("In.Link_Establishment_Timeout");

               expire_time := clock + 0.1;
            end select;
       
       when ... =>
            ...

       ...

       end case;                   
   end loop;
end;
   

Generally speaking, the program does all this fine, and constantly
prints the expired message, as required.

However, occasionally something goes wrong, and while it prints the
expiration time OK, it takes ages to print the "expired"
message. e.g. one occasion the event was 7 hours late. This puzzles
me, because every time the timer is incremented by 0.1 seconds, and my
understanding is that the timer should trigger if the current time is
greater then the expiration time.

To be precise, at 1:50:57 am the timer was incremented, and the select
reentered, and at 9:12:59 the timer expired. The actual log produced
is below:

1:50:57 DLL DEBUG Activity_Timer: disabled
1:50:57 DLL DEBUG Link_Failure_Detection_Timer: disabled
1:50:56 DLL DEBUG In.Link_Establishment_Timeout
1:50:56 DLL DEBUG Out.Link_Request( 14, 1, 1)
1:50:56 T50 DEBUG TX Packet Packet( 22  16  2  1  14  1  1  16  3  138  9 )
1:50:57 DLL DEBUG Out.Link_Request return
1:50:57 DLL DEBUG ----------------------------------------
1:50:57 DLL DEBUG looping state=RESET_WAIT
1:50:57 DLL DEBUG Link_Establishment_Timer time 1:50:57
1:50:57 DLL DEBUG Retry_Timer: disabled
1:50:57 DLL DEBUG Acknowledgement_Timer: disabled
1:50:57 DLL DEBUG Activity_Timer: disabled
1:50:57 DLL DEBUG Link_Failure_Detection_Timer: disabled
9:12:59 DLL DEBUG In.Link_Establishment_Timeout
9:12:59 DLL DEBUG Out.Link_Request( 14, 1, 1)
9:12:59 T50 DEBUG TX Packet Packet( 22  16  2  1  14  1  1  16  3  138  9 )
9:12:59 DLL DEBUG Out.Link_Request return
9:12:59 DLL DEBUG ----------------------------------------
9:12:59 DLL DEBUG looping state=RESET_WAIT
9:12:59 DLL DEBUG Link_Establishment_Timer time 9:12:59
9:12:59 DLL DEBUG Retry_Timer: disabled
9:12:59 DLL DEBUG Acknowledgement_Timer: disabled
9:12:59 DLL DEBUG Activity_Timer: disabled
9:12:59 DLL DEBUG Link_Failure_Detection_Timer: disabled

The fact that the time decrements from 57 seconds to 56 seconds seems
weird in itself. It could be due to some obscure round of error in my
code to print the time, but I can't imagine where this would occur. In
all cases the current value of Clock is used, and it isn't stored
anywhere. Or it could be some sort of time synchronisation tool on the
computer, I am not aware of anything like this though.

During this wait, all evidence points to the fact that the
timer_enabled and expire_time variables are correct, they cannot be
changed from other tasks, and that it was waiting in the select
statement. During this time, the task appears to respond to other
select events fine. I haven't yet tested if the timeout starts working
again after entering the select again, as the structure of the code
doesn't make this easy.

What is going on? Strict real-time behaviour is not required, but 7
hours instead of 0.1 seconds is slightly on the extreme side.


Any ideas?
Thanks in advance.


PS. In hindsight, the "timer_enabled" variable may not be required, as
I can use the state variable instead and probably simplify some of the
code, but I am skeptical this is causing the problem.
-- 
Brian May <bam@snoopy.apana.org.au>



^ permalink raw reply	[flat|nested] 61+ messages in thread
* SPARK
@ 2001-08-08  9:46 Soeren.Henssel-Rasmussen
  2001-08-08 20:04 ` SPARK McDoobie
  0 siblings, 1 reply; 61+ messages in thread
From: Soeren.Henssel-Rasmussen @ 2001-08-08  9:46 UTC (permalink / raw)
  To: comp.lang.ada

Chris,

have a look on the Anna toolset from Stanford:
	Research website	=> http://pavg.stanford.edu/
	Download		=>
ftp://pavg.stanford.edu/pub/anna/anna.intro  (remove "anna.intro" to see all
files)

I worked on the tools a couple of years ago, but has not used it since.  

regards  /soren
Søren Henssel-Rasmussen 
soeren.henssel-rasmussen@nokia.com 




^ permalink raw reply	[flat|nested] 61+ messages in thread
* SPARK
@ 2001-08-06 16:49 programmer
  2001-08-07  7:04 ` SPARK Hambut
                   ` (2 more replies)
  0 siblings, 3 replies; 61+ messages in thread
From: programmer @ 2001-08-06 16:49 UTC (permalink / raw)


I have been to various web sites like www.sparkada.com in an effort
to research the SPARK language.

Is SPARK Examiner the only SPARK language tool available?

What is the cost?

Are there any open source alternatives?

I am fascinated by the concept of verifying correctness
completely at compiler/pre-compile time.

Answers to my questions and any additional information
would be greatly appreciated.

Thanks.





^ permalink raw reply	[flat|nested] 61+ messages in thread

end of thread, other threads:[~2010-05-20 21:51 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-12 22:55 SPARK Yannick Duchêne (Hibou57)
2010-05-13  0:52 ` SPARK Yannick Duchêne (Hibou57)
2010-05-13  3:06 ` SPARK Yannick Duchêne (Hibou57)
2010-05-13  9:28   ` SPARK stefan-lucks
2010-05-13 16:48     ` SPARK Yannick Duchêne (Hibou57)
2010-05-15 13:09       ` SPARK Peter C. Chapin
2010-05-14 22:55   ` SPARK Yannick Duchêne (Hibou57)
2010-05-13  4:00 ` SPARK Yannick Duchêne (Hibou57)
2010-05-13 16:54 ` SPARK Yannick Duchêne (Hibou57)
2010-05-13 17:15   ` SPARK Rod Chapman
2010-05-13 19:43     ` SPARK Yannick Duchêne (Hibou57)
2010-05-13 20:05       ` SPARK Rod Chapman
2010-05-13 21:43         ` SPARK Yannick Duchêne (Hibou57)
2010-05-14 14:47         ` SPARK Yannick Duchêne (Hibou57)
2010-05-14  1:20 ` SPARK Yannick Duchêne (Hibou57)
2010-05-14  4:15   ` SPARK Yannick Duchêne (Hibou57)
2010-05-14  8:17     ` SPARK Phil Thornley
2010-05-14  9:32       ` SPARK Rod Chapman
2010-05-14 14:20       ` SPARK Yannick Duchêne (Hibou57)
2010-05-14  3:07 ` SPARK Yannick Duchêne (Hibou57)
2010-05-14  3:26   ` SPARK Yannick Duchêne (Hibou57)
2010-05-14  8:11   ` SPARK Phil Thornley
2010-05-14 14:28     ` SPARK Yannick Duchêne (Hibou57)
2010-05-14 21:45 ` SPARK Yannick Duchêne (Hibou57)
2010-05-15 16:41 ` SPARK Yannick Duchêne (Hibou57)
2010-05-15 18:00   ` SPARK Yannick Duchêne (Hibou57)
2010-05-15 18:14   ` SPARK Yannick Duchêne (Hibou57)
2010-05-15 19:08     ` SPARK Yannick Duchêne (Hibou57)
2010-05-15 20:23       ` SPARK Yannick Duchêne (Hibou57)
2010-05-16 18:13         ` SPARK Peter C. Chapin
2010-05-17  0:59           ` SPARK Yannick Duchêne (Hibou57)
2010-05-16 18:17         ` SPARK Phil Thornley
2010-05-17  1:24           ` SPARK Yannick Duchêne (Hibou57)
2010-05-15 18:43   ` SPARK Phil Clayton
2010-05-15 19:12     ` SPARK Yannick Duchêne (Hibou57)
2010-05-15 21:02       ` SPARK Phil Clayton
2010-05-15 22:48 ` SPARK Yannick Duchêne (Hibou57)
2010-05-16  1:48   ` SPARK Yannick Duchêne (Hibou57)
2010-05-16  1:53     ` SPARK Yannick Duchêne (Hibou57)
2010-05-16  5:28 ` SPARK Yannick Duchêne (Hibou57)
2010-05-18 18:01   ` SPARK Yannick Duchêne (Hibou57)
2010-05-19  8:09     ` SPARK Phil Thornley
2010-05-19 20:38       ` SPARK Simon Wright
2010-05-19 21:27         ` SPARK Yannick Duchêne (Hibou57)
2010-05-20  6:21           ` SPARK Simon Wright
2010-05-20  6:58             ` SPARK Yannick Duchêne (Hibou57)
2010-05-20 21:51               ` SPARK Simon Wright
2010-05-19 21:35       ` SPARK Yannick Duchêne (Hibou57)
  -- strict thread matches above, loose matches on Subject: below --
2009-06-10  9:47 SPARK Robert Matthews
2004-08-18 23:46 timeouts Brian May
2004-08-19  3:40 ` timeouts Steve
2004-08-22  4:18   ` timeouts Brian May
2004-08-22 12:54     ` timeouts Jeff C,
2004-08-26  1:28       ` timeouts Brian May
2004-08-26 13:34         ` timeouts Steve
2004-08-26 14:02           ` timeouts Georg Bauhaus
2004-08-26 23:03             ` SPARK Brian May
2004-08-27 10:11               ` SPARK Georg Bauhaus
2001-08-08  9:46 SPARK Soeren.Henssel-Rasmussen
2001-08-08 20:04 ` SPARK McDoobie
2001-08-06 16:49 SPARK programmer
2001-08-07  7:04 ` SPARK Hambut
2001-08-07  7:18 ` SPARK Hambut
2001-08-07  8:37 ` SPARK Peter Amey
2001-08-07 14:42   ` SPARK McDoobie
2001-08-09 12:36   ` SPARK Peter Amey
2001-08-14  3:14   ` SPARK Prof Karl Kleine
2001-08-14 10:25     ` SPARK Rod Chapman

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