TRIP REPORT: Kiel, Germany, 17-22 December 2001. ART Memo 27 (Version 0, 14 January 2002) Olaf Chitil INTRODUCTION I was invited to Kiel by Michael Hanus and Frank Huch. We discussed several issues and I gave a talk on Hat on Thursday. HAT Only 10 people attended my talk, hopefully only because of it being shortly before Christmas. The main point of discussion was that data structures can become large and even with pretty printing these data structures may be hard to understand. We could see the problem in practise with a program that handled graphs, a graph being represented as list of edges (a pair of nodes). First, a drawn graph might(!) have been easier to comprehend. Second, the user was often only interested in which parts of mostly equal graphs differed. It would have been useful if the system had highlighted the differences. Possibly, logical equivalence might be more useful than syntactical equivalence: two lists with the same edges in different order are actually the same. Frank's graph program used many local constants. The fact that the parent of a caf is not one of its callers was confusing and made it impossible to reach desired parts of the computation. Hat-trail was also used on a version of my pretty printer with a black hole. Only a small part of the computation was reachable and no cycle could be found. A bug in trace-generation or hat-trail? The precompiled binary of version 1.10 for Linux accessible from our web pages doesn't work: hat-detect and hat-observe lose the last character of every identifier and both tools abort with strange error messages. Hence we could not use these tools and the whole demonstration (separate from talk) was not convincing. TRACING MORE GENERALLY Prof Berghammer showed me a tool that visualises the stepwise reduction of an expression. It handles a first-order subset of ML, allows different reduction strategies, and allows going backwards. The current term is shown as tree. He uses the tool in teaching reduction strategies. Michael Hanus showed me a similar tool for Curry. It supports full Curry, using its reduction strategy. It is an extension of the Curry compiler. Michael Hanus is currently planing a project on debugging logic-functional languages with people from Valencia. OPERATING ON GRAPHS IN FUNCTIONAL LANGUAGES A number of people (Michael Hanus, Frank Huch, Prof Berghammer) are interested in this area. The main point of interest is in a nice interface to graphs, less the efficient implementation. The interest of Michael and Frank was sparked by implementing finite automata, constructing NFAs from regular expressions and the power set construction for NFA -> DFA. The main issue actually seems to be that they want anonymous nodes, avoid renaming nodes, but also avoid confusing nodes of different graphs. They have various implementations, in particular one in Curry using logical variables for new nodes. The question arose if there is actually a single good interface for all applications of graphs. A NEW VERSION OF MY PRETTY PRINTING LIBRARY I discussed with Michael if an implementation of my library in Curry could replace the lazy dequeues by normal dequeues and some usage of logical variables. We agreed that it is possible, but it requires starting two concurrent processes with the parallel & constraint operator. So the world of concurrency with the danger of dead- and life-locks needs to be entered. In the discussion I realised that already the purely functional implementation could be split into two pseudo-processes communicating via lazy lists. That implementation would be more modular than the current one. It would still use lazy dequeues, but not be complicated by non-determinism and the danger of life-locks. However, there is still the danger of non-termination and black holes (~ dead-locks), and the last version I have still has a black hole. The source of the problem could not be located with hat-trail as mentioned in the section on Hat. The Curry version still has to be written. DESIGN PATTERNS Michael and Sergio Antoy have a draft of a paper on design patterns for Curry, in particular making use of its logical features. MISC I participated in the Christmas party of the group. Frank and Michael have 17'' LCD displays...