comp.lang.ada
 help / color / mirror / Atom feed
* specification languages and TSL
@ 1989-10-03 20:26 Doug Bryan
  0 siblings, 0 replies; only message in thread
From: Doug Bryan @ 1989-10-03 20:26 UTC (permalink / raw)



A few issues back, David Guaspari wrote that though TSL can be used
to specify the order of rendezvous, it doesn't allow for specifying
the data exchanged during a rendezvous.  This is not true.

TSL (Task Sequencing Language) has been around since 1985.  It is an
annotation languages designed specifically for the tasking constructs
of Ada.  TSL allows you to state the intended interactions between
tasks, e.g.:

	task type Semaphore is
	  entry Seize;
	  entry Release;
	  --+ when ?S accepts ?U at Seize then
	  --+   ?S accepts ?U at Release
	  --+ until ?S accepts any;
	end Semaphore;

This specifies that when a semaphore task starts a rendezvous at
Seize with some user ?U, then its next rendezvous must be with
that same user at Release.

The intended data exchanged during rendezvous can also be specified:

	task type Queue is
	  entry Enqueue (I : Item);
	  entry Dequeue (I : out Item);
	  --+ when ?Q accepts any at Enqueue (?I) then
	  --+    ?Q releases any from Deqeueu (?I);
	end Queue;

Here we specify that when a value ?I is enqueued to the task ?Q, the
value must be dequeued before the queue task ?Q terminates.

TSL also has features for abstracting program state and abstracting
actions performed by tasks.

doug

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1989-10-03 20:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1989-10-03 20:26 specification languages and TSL Doug Bryan

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