ABCL/1 - PowerPoint PPT Presentation

kathie
abcl 1 n.
Skip this Video
Loading SlideShow in 5 Seconds..
ABCL/1 PowerPoint Presentation
play fullscreen
1 / 9
Download Presentation
164 Views
Download Presentation

ABCL/1

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. ABCL/1

  2. ABCL\1 • Actor Based Concurrent Language • More pragmatic approach than ACTORS

  3. Types of Message Passing in ABCL • Message sending order from one object to another is preserved in ABCL. • Three types of message passing mechanisms • Past Non-blocking messages without a reply • Now Blocking messages with sender waiting for a reply • Future Non-blocking messages with a reply expected in the future

  4. Mode of Message Passing • Two mode of message passing • Express • Higher priority • Interrupting current message processing • Non interrupting current message processing • Ordinary

  5. The Concept of Future EObject subclass: #Future instanceVariables: ‘value semaphore’ initialize semaphore := Semaphore new value semaphore wait. ^value reply: aValue value := aValue. semaphore signal doesNotUnderstand: aMessage ^self value performMessage: aMessage Future class new ^super new initialize


  6. Eager Communication Actor subclass: #ABCLActor futureCall: aMessage | aFuture | aFuture := Future new. aMessage arguments at: aMessage arguments size put: aFuture. self asynchronousSend: aMessage. ^aFuture • The future is transmitted as the reply destination of the message • We assume that the reply destination is always specified as the last argument of the message

  7. Synchronous Communication Actor subclass: #ABCLActor nowCall: aMessage ^(self futureCall: aMessage) value

  8. Implementation of the 3 types of message passing Actor subclass: #ABCLActor doesNotUnderstand: aMessage ^aMessage isEmpty ifTrue: [self asynchronousSend: aMessage] ifFalse: [aMessage arguments last == #future ifTrue: [self futureCall: aMessage] ifFalse: [aMessage arguments last == #now] ifTrue: [self nowCall: aMessage] ifFalse: [self asynchronousSend: aMessage]]]

  9. References • Yonezawa, A., et al., Object-Oriented Concurrent Programming in ABCL/1, OOPSLA 86 Proceedings,  SIGPLAN Notices, vol. 21, no 11, pp. 258-268