CS 394P: Views and Graphical Programming in GLISP

Due: April 18, 2005.

The goals of this exercise are to try GLISP facilities for automatic programming using views, and to try construction of programs from graphical specifications.

Automatic Programming Server

Use the Automatic Programming Server (APS) program demo (available via http://www.cs.utexas.edu/users/novak) to do the following:

  1. Read the web documentation associated with APS.
  2. Design a data structure that could be viewed as a linked list; it should include a pointer to data of the same type. Make a view of your data as a sorted-linked-list. The system will ask for choices of what to sort on and whether to sort ascending or descending. Obtain some specialized functions and see whether they work for your data, either by testing or by inspection of the generated code. You may use the language of your choice for the output language.
  3. Design a data structure that represents a line segment. Use the APS to view your data as a line-segment. Obtain some specialized programs involving the line segment, including leftof-distance of a point from the line segment (you will need to also define a vector object and make a view of it as a vector). Do these programs work?
  4. Give your evaluation of this system. Was it easy to get the programs you wanted? Did they work? What things about the system were unclear, hard to use, or caused trouble?

VIP Program

  1. Read the web documentation associated with VIP.
  2. Use vip to produce a program to answer the following physics problem: ``If a stone hits the ground at 60 mph, from what height was it dropped?''

    In response to the first menu, select New Program; this will bring up a larger window in which a program can be specified. Next, select Physics from the command menu, and then KINEMATICS and FALLING; move the rectangle into position and click the mouse. Next, select Type-in from the command menu and enter the velocity in the text area as 60 mph; move the rectangle into position and click. Next, click on the v button of the FALLING diagram and then click on the 60 mph box. Connect the h button to the OUTPUT. Select the Specify Type command, click on the OUTPUT box, and enter the units of the answer in the text area, e.g. ft. Then select Done. The program that was created from your specifiecation will be displayed.

  3. Use vip to produce a program to answer the following problem: ``If a stone hits the ground at velocity v, from what height was it dropped?''

    Restart VIP; click in the top line of the Input Data area and enter the following, followed by Return:

    (v (units real (/ meter second)))
    
    Then select New Program and proceed as before. You may change the units for the input velocity and output if you wish.
  4. Use vip to write another program to solve a scientific or engineering problem of your choice. Note that vip is not able to solve simultaneous equations.
  5. Give your evaluation of this system.

Graphical Programming Server

  1. Read the web documentation associated with GPS.
  2. An assembly is a data structure that has a name and a list of parts. A part has a name, size, weight, a pretty boolean, and a next pointer to a part; it also has a view spec to view it as a linked-list.

    Make two programs that operate on an assembly. You may choose the output language (if it is not Lisp, use assemblyc as the input type). Some data for testing is available in the files assembly.lsp, assembly.c, and Assemblyc.java.

  3. Enter one or more data structures and make a program over your data.
  4. Give your evaluation of this system.