Success and failure of programming environments - report on the design and use of a graphic abstract syntax tree editor

Reading time: 5 minute
...

📝 Original Info

  • Title: Success and failure of programming environments - report on the design and use of a graphic abstract syntax tree editor
  • ArXiv ID: 0710.2358
  • Date: 2007-10-15
  • Authors: ** - 논문에 명시된 저자 정보가 제공되지 않음 (STAPLE 프로젝트 팀) **

📝 Abstract

The STAPLE project investigated (at the end of the eighties), a persistent architecture for functional programming. Work has been done in two directions: the development of a programming environment for a functional language within a persistent system and an experiment on transferring the expertise of functional prototyping into industry. This paper is a report on the first activity. The first section gives a general description of Absynte - the abstract syntax tree editor developed within the Project. Following sections make an attempt at measuring the effectiveness of such an editor and discuss the problems raised by structured syntax editing - specially environments based on abstract syntax trees.

💡 Deep Analysis

📄 Full Content

The first section gives a general description of Absynte -the abstract syntax tree editor developed within the Project. Following sections make an attempt at measuring the effectiveness of such an editor and discuss the problems raised by structured syntax editing -specially environments based on abstract syntax trees. Although the benefits of syntax directed editors are obvious for beginners, the conclusion is that they are not very attractive for experimented users.
  1. Absynte: a graphic abstract syntax tree editor

The Staple editor is called Absynte where these letters stand for Abstract syntax tree editor. Absynte allows the edition of programs stored in a persistent database as decorated abstract syntax trees (ASTs). A program can be displayed as several views: graphics views, text views and views mixing text and graphics together. Absynte also gives access to other tools manipulating the programs stored in the database, such as a compile and run command.

Let us begin by an informal description of how a program creation is handled within the Absynte environment. First of all, absynte is a program running under the X-window System -which has been welcomed as a universal low-level, portable graphic and windowing system. Absynte starts by opening a window decorated with a title bar that distinguishes Absynte graphic windows from other windows on the screen.

At the top of the window a menu bar provides a number of items in pop up menus: Store, File, Edit, Window, Layout and Mode. A bottom bar gives the name of the program being edited and some additional information. As an example, opening the File menu and launching the new command will put the editor in creation mode. Now if the user drags the mouse pointer to the center of the window and click, a first node containing the string prog appears.

Since the node labeled prog is incomplete, the user can click on it. This will extend the prog node with two sons: an optional list of definitions labeled define*, and an optional expression* to evaluate. Since it is itself incomplete, the expression node can be expanded to another tree. A click on it will show the list of all possible ways of completing it (see figure 1 below). The user can then select an item by clicking on it. This will develop the selected subtree by replacing the incomplete typed node by a precise instance. Otherwise, clicking outside the menu will cancel the extension procedure.

At some point a terminal definition will be reached. For instance, if the user has chosen a literal in the expression menu, and then selected an integer value in the next submenu, he will be offered no further choices; instead, a little window will prompt him to enter a terminal string.

At any time new windows can be created and their content edited in any mode. The user can load programs from the persistent store or create new ones. He can cut or copy trees or subtrees selected in any window in a cut buffer. The cut buffer is not attached to a particular window but is shared by all graphic windows. The Paste and Replace commands are used to paste the contents of the shared buffer into the window from whose menu bar they have been activated. If there is a type mismatch, no replacement will occur and the editor will protest. There are several ways of modifying the view of a tree. First you can edit a specific node in graphic mode or in text mode1 . The natural situation is to have the whole program in graphic mode and some nodes displayed as text in separated windows. It is also possible to have unexpanded nodes, whose icons are associated with separated graphic windows.

Within the graphic mode the user can choose between different styles in a window: vertical centered mode, horizontal centered mode and simple horizontal mode (see figure 2). The distance between graphic nodes can be changed interactively. A node and all its descendants can also be hiden and replaced by a graphic icon; a window will automatically be associated with this icon. Clicking on the icon displays the corresponding window which shows the corresponding subtree as it was originally in the parent window (this is recursive procedure and you can have iconified nodes in it). At any time iconified nodes can be expanded in two ways: global expand (recursive) or simple expand.

To display a node in text mode, select the command Text Mode. This will iconify the selected node (and all his descendants) as a text icon and display the tree as text in an associated window. An icon corresponding to a text window will appear with a capitalized T on it. Clicking on a text icon with the left button opens the corresponding cond horizontal modes: The Parse command launches a parser checking the syntax of the text being edited. Error messages will be displayed if the text does not fit the concrete syntax. The Graphic tree command moreover performs graphic conversion of the text contained in the text window. It will put the tree back in the main window as a gr

Reference

This content is AI-processed based on open access ArXiv data.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut