From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_40,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Xref: utzoo comp.edu:2873 comp.lang.ada:3138 comp.lang.misc:3837 Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!inria!irisa!mbenveni From: mbenveni@irisa.irisa.fr (Marc Benveniste,lsp) Newsgroups: comp.edu,comp.lang.ada,comp.lang.misc Subject: Re: Teaching Concurrency Message-ID: <1904@irisa.irisa.fr> Date: 9 Jan 90 16:41:57 GMT References: <7588@hubcap.clemson.edu> Sender: news@irisa.irisa.fr List-Id: >From article <7588@hubcap.clemson.edu>, by wtwolfe@hubcap.clemson.edu (Bill Wolfe): > The students were each assigned a project for which they > were required to write two Ada programs which involved at > least two tasks. In general, the tasks involved some simple > idea that the students were very familiar with, at least in > the case of sequential programs. Thus, the difficulty was > in understanding the concurrency and not in the computation > performed by the individual task. [...] > [...] Students were required to run their programs four times with > the same input. [...] The sudden shock when THEIR program > showed this behavior put the point across better than any lecture > could. In the same direction, I developed a toy concurrent language adopting the robot metaphor R. Pattis introduced with "Karel the Robot". Students have to program simple tasks and assign them to various independent robots that share a so called world and communicate by asynchronous message passing. Dynamical creation of robots is possible with lexical nesting and recursive task activations. The main advantage, besides the ones already stated by the previous posting, is DIRECT OBSERVABILITY of running processes. The main disadvantages are an anthropomorphic view of processes and an interleaved interpretation of parallelism. I wrote a system called LPC (for Concurrent Programming Laboratory in Spanish) that integrates a compiler for the language, a world editor and an interactive interpreter. The interpreter allows the student (or the teacher) to run programs in a stepping mode and to select different speeds for each robot (any running robot may be stopped). This interactive feature enables the operator to force certain scenarios to arise. Besides, a formal semantics of LPC's toy language was written at the design stage of its development. A proof system could be derived without to much effort. I think LPC can be very useful to teach concurrency, particularly in an introductory course. References: Benveniste, M., "LPC: A Concurrent Programming Laboratory", in proc. of STACS'88, R. Cori and M. Wirsing Eds., February'88, LNCS #294, pp. 391-392. Benveniste, M., "LPC: un Paradigma de la Programaci'on Concurrente", M.Sc. Thesis, IIMAS-UNAM, Technical report #526, Orange series, August'88. Mexico D.F., Mexico. Pattis, R. "Karel the Robot: a Gentle Introduction to the Art of Programming", John Wiley & Sons Inc., New York, 1981. Marc Benveniste mbenveni@irisa.irisa.fr IRISA Campus de Beaulieu 35042 Rennes FRANCE