Skip to main content Skip to navigation

Lab 5: Illustrating construal comprehension

The kind of activities to be carried out in understanding the Pjawns construals introduced in Lab 4 are here illustrated with reference to another game construal. This can be found in the EM archive as draughtsRawles1997. This is a construal of the well-known game of draughts (or checkers) that was developed by Simon Rawles in his final year project.

For the purposes of the lab, you should first make a local copy of the directory at ~empublic/teaching/cs405/lab5 within your CS405 practical directory. Since this directory contains some symbolic links, including a link to ~empublic/projects/draughtsRawles1997, you should use a command that copies the contents of files pointed to by links:

cd cs405practical
cp -rpL ~empublic/teaching/cs405/lab5 .

The directory you have created will be called the "Lab 5" directory.

In addition to supporting the construal comprehension exercise, the lab highlights the difference between approaching software development through conventional programming and through EM construal. The interactive qualities and semantic possibilities that distinguish the draughts construal from a traditional program, which should by now be quite familiar, are discussed in the file draughts.notes in the draughtsRawles1997 directory. By looking more closely at how the construal has been made, it is possible to see how the interactive process of engineering the construal can in principle give us confidence in its behaviour in a way that is qualitatively different from a proof of functional correctness.

Setting up the construal in the EMPE environment

The following steps set up the draughts construal in the EMPE environment:

  1. Invoke the EDEN interpreter and execute the file Run.e within your local copy of draughtsRawles1997.
  2. Paste the contents of the file loadEMPE.e from the Lab 5 directory into the EDEN input window and accept.
  3. Click the '> Expand' button on the EMPE window, and press the 'Show tkeden' button.
  4. Enter the following Scout definition into the EDEN Input Window to put the draughts board in the "Interactive display" panel:
    pres_screen = screen;
  5. Adjust the %angel observables that determine the size of the 'Interactive display' and 'Input Box' e.g. setting the parameters as follows:
    pres_scoutbox.height = 360;
    pres_scoutbox.width = 560;
    pres_inputbox.width = 40;
    pres_inputbox.height = 12;

At this stage, the environment is similar to the initial environment in which the Pjawns construals were presented.

Two additional steps can be carried out: the first loads the instructions for the lab and the second introduces an inventory of observables of the kind that you will construct for the Pjawns construals:

  • Paste the contents of the file introdraughts.e in the Lab 5 directory into the EDEN Input Window and accept.
  • Load the symbol info tool by pasting the contents of the file syminfo.e in the Lab 5 directory into the EDEN Input Window and accepting. When the tool has been loaded, load the definitions in the file syminfodefns.eden.

Note that until a draughts game has been started and one of the draughts pieces has been selected many of the observables in the inventory have undefined values. This may lead to EDEN errors when you survey the inventory of observables.