Skip to main content Skip to navigation

Exercises

Session 1

Objective for the activities in this session

... to give a general orientation on Making Construals


Resources

The presentation of the room model at the url:
http://jseden.dcs.warwick.ac.uk/construit/?load=347


Activities

  1. This is a list of observables from the room script:
    W, tableSW, dooropen, socket2, lampbulb, NE, lock
    
    • Give a brief description in words of each observable.
    • How well do the names of the observables correspond to the things they refer to?
    • Which of these observables are defined by a dependency?

  • Which of the following observable features of the room is initially represented in the script?
    1. the width of the door
    2. the height of the table
    3. the distance between the NW corner of the table and hinge of the door
    4. the length of the cable for the table lamp
    5. the weight of the table lamp
    6. whether the desk drawer is open
    In each case, EITHER:
    • write down the name of the observable as it appears in the script,
    • OR: write down which observables it would be defined by dependency in terms of,
    • OR: invent a suitable name for it!

  • Describe in words what it might mean to carry out each of the following definitions, who (if anyone) might be able to perform this action, and in what circumstances they would be able to carry it out:
    • dooropen = false;
      
    • doorwidth is roomwidth/3;
      
    • plug = tableNE;
    • tableNE is NE;
    • tablerefpt = Circle::(tableSW,10);
      
    • NE = tableNE;
    • lock = hinge + RPoint::(door/width,-(PI/4));
    • tableSW = SW - Point(tablelength/2, tablelength/2};

  • Imagine that you have a robot that can be programmed to carry out in sequence any realistic actions that a human room user could simulate by redefining an observable. Assume that the room is in the initial state. Specify a sequence of definitions that you might use to instruct the robot to prepare the room for a party where you put the table and desk together to put food on and place the lamp in a safe position. You should specify your instructions according to the following pattern (the text following the # is a comment that will be ignored by the interpreter):
    1. # unplug the lamp
      plug = lampcentre + Point(10,10);
      
    2. ...
    3. # open the door to welcome your friends in
      dooropen = true;