CVS difference for ais/ai-00345.txt

Differences between 1.3 and version 1.4
Log of other versions for file ais/ai-00345.txt

--- ais/ai-00345.txt	2003/10/29 22:54:13	1.3
+++ ais/ai-00345.txt	2003/12/07 05:00:33	1.4
@@ -356,3 +356,92 @@
 
 ****************************************************************
 
+From: Alan Burns
+Sent: Monday, October 27, 2003  4:07 AM
+
+The last meeting of ARG asked for some further examples
+of the use of protected interfaces and task interfaces.
+
+In general there is no current way of giving more than one
+body to a PO or task. This would be useful even if no
+further components are added.  Clients can link
+to an interface for a Server; actual Server can be
+one of many types. But also in a client server
+relation, it can be useful to ensure all server tasks
+provide a basic service:
+
+
+task type interface Basic_Server is
+  entry basic server() is abstract;
+end Basic_Server;
+
+this could lead to many server components such as:
+
+task type interface Degraded_Server is new Basic_Server;
+
+or
+
+task type Fuller_Server is new Basic_Server with
+  entry basic_service();
+  entry full service();
+end Fuller_Server;
+
+For POs to ensure all POs have a mode change operation could be done
+with a suitable interface. Also to control visability over entries:
+
+The usual buffer:
+
+protected type Buffer is
+  entry put(X: in Element);
+  entry get(X : out Element);
+private
+  ...
+end Buffer;
+
+
+Problem: Can't separate producer and consumer interface, but
+
+
+protected interface Producer is
+  entry Put(X: in Element) is abstract;
+end producer;
+
+protected interface Consumer is
+  entry Get(X : out Element) is abstract;
+end Consumer;
+
+then
+
+protected type Buffer is new Producer and Consumer with
+  entry put(X: in Element);
+  entry get(X : out Element);
+private
+  ...
+end Buffer;
+
+or
+
+protected type ForwardingBuffer is new Producer and Consumer with
+  entry put(X: in Element);
+  entry get(X : out Element);
+private
+  ...
+end Buffer;
+
+
+A further example comes from the use of a PO as a resource controller.
+Here the specification is often of the form:
+
+protected interface Resource_Controller is
+  entry Get() is abstract;
+  procedure Release() is abstract;
+private
+  ...
+end Resource_Controller;
+
+
+This would allow many different implementations; also allow entries
+and procedures to be added (such as Release_All).
+
+****************************************************************
+

Questions? Ask the ACAA Technical Agent