# Advanced Redex Trails

# Redex Trail Browser:

### bugs and wish-list

This is a fuller list of bugs and wishes for the prototype tracing system Hat's redex trail browser, hat-trail-in-java. (There is also an overview page, and a more detailed page for the trail-building compiler.) Please mail us at ART-team@cs.york.ac.uk with any other bugs or wishes.

### Bugs

- (FIXED) Exiting the trace browser does not implicitly disconnect from any connected residual computation. This leaves the socket/port in an unusable state.
- (FIXED) Related to above: If the browser chrashes because of ony of the other bugs listed here, then it leaves the socket/port in an unusable state. Only after about 10 minutes the operating system frees it and then the browser can be used again.
- Concerning scripts:
  - In script recording, every object the mouse passes over on the screen results in a recorded selection -- only the last such selection before a specific action should be recorded.
  - (FIXED) In script playback, synchronisation between the explanatory messages and the actions in the browser is poor. Either the action happens before the description, or vice versa. It would be better to ensure that action and description happen simultaneously. On some occasions, actions should happen independently from the description, but this is a less-common mode of use.
  - In script playback, often the cursor position is not correctly displayed: for a large red box, the cursor is shown in the centre of the box, but this is not where it would need to be (in normal use) to cause that box.
  - In script playback, hiding visible trails by collapsing them (denoted by dotted underlining) doesn't work - they stay visible.
- If a complete sequence of parents up to the root is shown by the browser, then left clicking on any of the redexes leads to the incorrect error message "The selected component has no trace".
- Left clicking on any redex of an incomplete sequence of parents shows the next parent. This behaviour contradicts the html-description. Furthermore it means that it is currently only possible to fold a complete sequence of parents by left clicking on the child that starts the sequence (and which is a subexpression of some other application). It is not possible to partially fold such a sequence.
- If the shown trace is longer than the trace window, then expansion of any trace causes a jump to somewhere in the middle of the trace. This hopping is very annoying.
- (FIXED) A string is always displayed as a single unit. That makes it impossible to select a substring which may have a different parent.
- Single element lists are (always?) shown as `(:) 1 []` instead of `1:[]`. In fact, `[1]` seems desirable if all subexpressions of the list have the same parent as the list (and hence selection of subexpressions is useless).
- A section `(2:)` is printed as `((:) 2)`. First, section is shorter. Second, original program structure should be preserved.
- The `fromInteger` in front of numeric constants that are introduced by the compiler are annoying. Problem of browser or of redex trails?
- A faulty program might not output anything, that is, execute `putStr ""`. Then there is nothing to select in the output window and no way to look at the trace!
- (FIXED) Linking to the source code does not always work: the browser states that it loads the program source, but then just stops. Probably the bug is in the tracing runtime system. Nonetheless, the browser should give up after a short period and show an error message. No way to reliably reproduce the bug has been found yet. It is unclear under which circumstances loading a program source does not work.
- To change the font size the user currently has to hit `enter` in the dialogue box, just clicking ok doesn't make the change. Also the standard font size seems to be too big. Maybe the browser can determine the standard font size used by the user for other programs and that is used at the beginning?
- The siblings of the selected expression are shown in blue. If the selected expression is only a simple name, then it is not shown in blue. However, if it is a more complex expression, then it is shown in blue for all subexpressions that have the same parent. This behaviour is inconsistent. A single name should be shown in blue as well.
- More a problem than a bug: The siblings of the selected expression are shown in blue. However, subexpressions of siblings which have a different parent are not shown in blue. So if the sibling is just an application whose function and argument have different parents, than there is nothing which can be marked in blue.

### Wishes

- In script playback, to show mouse-clicks in the original session it would be nice to display a small mouse diagram near the cursor with the relevant button shaded.
- The various colour highlightings in the tracer window are confusing for beginners. Hence the option menu should permit to turn some features off. These include highlighting of parents and siblings. Both these features are not necessary, only helpful. When the trace browser is run for the first time the default setting should be that all these features are turned off.
- It should be possible to save the options.
- Options that are not for the user but for the development of the trace browser should be moved to a separate place.
- In the program source only the beginning of an expression is marked. The marking should indicate where the expression in question ends.
- The program source should be linked closer to the browsing of the trace. So the currently selected expression should be marked in the source code, if it happens to be visible at the moment (maybe the whole function definition should be marked). Maybe there should be an optional mode where the source window follows all selections in the trace window.
- Many subexpressions e of a redex have the same parent. If all subexpressions of e have the same parent as e, then it should not be possible to select e. This restricts the user from performing some rather fruitless operations. (General goal: restrict the number of choices the user has to avoid confusion).
- (FIXED) should order in a case redex be reversed? Write `f 4 |> True` instead of `True <| f 4`
- (FIXED) The source code window should give the name of the module it shows.

This page last modified: 2002-03-08.