New SCOOP hands-on tutorial

48 views
Skip to first unread message

Bertrand Meyer

unread,
Jan 19, 2019, 11:56:30 AM1/19/19
to eiffel...@googlegroups.com, me...@inf.ethz.ch

I have uploaded to eiffel.org a new tutorial on concurrent programming with SCOOP:

 

                https://www.eiffel.org/doc/solutions/SCOOP_tutorial

 

It corresponds to my ACM Webinar of November 15, which is available at https://learning.acm.org/webinars/coop.

 

The tutorial is hand-on: it goes with an example software system, a small simulated email client, which the reader is invited to download. The system has two versions. The first is sequential, meaning the user cannot download and read messages at the same time. The tutorial walks you through the transformation of the sequential version into a concurrent one. The transformation is actually very simple, consisting mostly of adding a few “separate” declarations and make the corresponding instructions also “separate”. In this process, the error messages of the compiler play a key role, guiding you step by step until you get a version that compiles – and, surprise!, also executes correctly.

 

(This general feature of Eiffel is probably not new to readers of this group: the type system and validity rules of Eiffel provide a systematic guide to getting things right, step by step, so that it is often the case that getting stuff to compile is harder than in other approaches – but then when it compiles it often is correct. Unless you like spending your nights with a debugger, better sweat over compilation than over an execution that runs but crashes or produces a mix of right and wrong results.)

 

Beyond corrections of any typos or oversights that I may have missed, the text should not change much.

 

SCOOP in my opinion is not used widely enough, including by Eiffel users, and I hope this tutorial helps spread the knowledge. There are many more SCOOP documents and examples at https://eiffel.org and http://cme.ethz.ch, but as far as I know this is the first hands-on, step-by-step introduction.

 

-- Bertrand Meyer

 

Volkan Arslan

unread,
Jan 20, 2019, 6:27:51 AM1/20/19
to eiffel...@googlegroups.com
A very nice and useful tutorial, and as always well written and understandable.
 
Just a few small typos:
 
Page 7
    "Looking at the body of the loop (after loop), we see that at each iteratio the generator successively:"
should be
    "Looking at the body of the loop (after loop), we see that at each iteration the generator successively:"

Page 9:
   "a processors are strictly sequential;"
shoud be
   "processors are strictly sequential;"
 
Page 15:
    "Consider the function i_th in DOWNLOADER"
should be
    "Consider the function i_th in VIEWER"
(also, on the right margin, DOWNLOADER should be replaced by VIEWER)
 
Regards
Volkan
 
PS: It would be excellent to have a small tutorial application (maybe this email application or something else) using SCOOP in connection with EiffelVision and EiffelStore (preferably ABEL) to demonstrate the interplay of concurrency and graphical user interfaces and persistence.
 
 
 
Gesendet: Samstag, 19. Januar 2019 um 17:55 Uhr
Von: "Bertrand Meyer" <Bertran...@inf.ethz.ch>
An: eiffel...@googlegroups.com
Cc: me...@inf.ethz.ch
Betreff: [eiffel-users] New SCOOP hands-on tutorial
--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/eiffel-users.
For more options, visit https://groups.google.com/d/optout.

Bertrand Meyer

unread,
Jan 20, 2019, 7:00:42 AM1/20/19
to eiffel...@googlegroups.com, me...@inf.ethz.ch

Dear Volkan,

 

Thank you very much! I will fix the text today.

 

-- BM

Bertrand Meyer

unread,
Jan 20, 2019, 7:58:00 AM1/20/19
to Bertran...@inf.ethz.ch, eiffel...@googlegroups.com, me...@inf.ethz.ch

Fixed. I also corrected a few graphical pimples due to screen capture.

 

> should be "Consider the function i_th in VIEWER"

 

Wow! You actually read the code!

 

> It would be excellent to have a small tutorial ... using SCOOP in connection with EiffelVision and EiffelStore (preferably ABEL)

 

Just when I thought I was done. You are right, though.

 

-- BM

Larry Rix

unread,
Jan 20, 2019, 4:43:03 PM1/20/19
to Eiffel Users
I have created a version of the project(s) as a single ECF file and placed it in GitHub here.

1. When you open the ECF, select the target you want (Concurrent, Sequential, or Scratchpad). You may open each target in its own independent instance of Eiffel Studio.
2. Take note of the class Note clauses at the top of each class. They have expanded descriptions as well as EIS links to appropriate pages within the PDF documentation produced and linked by Bertrand.
3. Also note that I have utilized the automatic feature of the Info tool to allow you to press F1 on any class and be given the opportunity to open one or more instances of related documentation.

My next chore will be to clean up remaining items presently indicated as needing attention in the Code Analyzer tool of Eiffel Studio for each target of each project.


Cheers!

Bertrand Meyer

unread,
Jan 20, 2019, 5:07:10 PM1/20/19
to eiffel...@googlegroups.com, me...@inf.ethz.ch

Dear Larry,

 

Thanks a lot!

 

For lack of time in the coming days I think I will leave things as they are for the moment. (If you want to edit the eiffel.org page to mention the github variant please go ahead.) I would gladly let you update the text but you would need to have FrameMaker.

 

-- BM

--

Larry Rix

unread,
Jan 20, 2019, 5:08:13 PM1/20/19
to Eiffel Users, me...@inf.ethz.ch
You are quite welcome!


Larry Rix
Moonshot Software
Rocket science for everyone!
Savannah, GA

Larry Rix

unread,
Jan 20, 2019, 5:09:05 PM1/20/19
to Eiffel Users, me...@inf.ethz.ch
I do not have access to edit Eiffel.org, so I will leave that to others. :-)

Larry Rix
Moonshot Software
Rocket science for everyone!
Savannah, GA

On Sun, Jan 20, 2019 at 5:07 PM Bertrand Meyer <Bertran...@inf.ethz.ch> wrote:

Larry Rix

unread,
Jan 20, 2019, 5:18:40 PM1/20/19
to Eiffel Users
From the point of view of GitHub, here are the changes you will make if you perform the steps outlined by Bertrand in the linked paper.

CLIENT:
image.png

DOWNLOADER:
image.png

PARAMETERS:
image.png

VIEWER:
image.png

Eric Bezault

unread,
Jan 20, 2019, 8:01:27 PM1/20/19
to eiffel...@googlegroups.com, Larry Rix
On 20/01/2019 23:18, Larry Rix wrote:
> From the point of view of GitHub, here are the changes you will make if
> you perform the steps outlined by Bertrand in the linked paper.

This view is excellent. It shows how simple the
modifications are. It should probably be added
as a summary at the end of the paper.

--
Eric Bezault
mailto:er...@gobosoft.com
http://www.gobosoft.com

Larry Rix

unread,
Jan 20, 2019, 8:06:03 PM1/20/19
to Eiffel Users
So—I want to switch to using SCOOP. My ereport project uses my framework library. The framework library was using Thread concurrency. The ereport library project was the same.

The following manual hack of the ECF does not ultimately work.
  • Changed Concurrency:
    • From: <concurrency support="thread" use="thread"/>
    • To: <concurrency support="scoop" use="thread"/>
What I really need and want to know is: What is the difference between "support" and "use"?

How does support help me? What does it do precisely?

The question apply to "use".

How do "support" and "use" work together?

Larry Rix

unread,
Jan 20, 2019, 10:27:24 PM1/20/19
to Eric Bezault, Eiffel Users
Thanks for the feedback! 


Chris Tillman

unread,
Jan 20, 2019, 11:46:50 PM1/20/19
to eiffel...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/eiffel-users.
For more options, visit https://groups.google.com/d/optout.


--
Chris Tillman
Developer

Jocelyn Fiat

unread,
Jan 21, 2019, 5:53:54 AM1/21/19
to Eiffel Users, me...@inf.ethz.ch
Hi Larry,

I confirm that you already have edit permissions on eiffel.org documentation.
I sent a message .. months, or years ago to notify you and a few others about that.
If ever you need any help to edit documentation, or find issue, please let me know.

Also, as eiffel.org is the Eiffel community website, any active Eiffel users can ask for such edit permissions.
Quite often, for user adding comments on documentation page, after a period, we can usually consider them as potential editor, so we ask them if they want to get editing permission.
And for now, most known and trusted Eiffel users (that have account on eiffel.org) also have edit permissions. Regularly we have new active Eiffel users that joins that "editors" group.

Regards,
-- Jocelyn for the eiffel.org website.





Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

Anders Persson

unread,
Jan 21, 2019, 6:05:23 AM1/21/19
to Eiffel Users
Thanks for your reminder. I checked and I have access and will try to contribute when I see something that needs update.

Larry Rix

unread,
Jan 21, 2019, 11:06:36 AM1/21/19
to Eiffel Users, me...@inf.ethz.ch
Oh, sorry. I don't recall getting such permissions. No worries.
Reply all
Reply to author
Forward
0 new messages