Previous
Top
Next
Table of Contents
I Introduction
1 Programming by combination
2 Combinator libraries replace tools
3 Declarative programming and input/output
4 I/O in functional languages?
5 What is a Fudget?
6 Contributions of the thesis
7 Road-map
II Programming with Fudgets
8 A brief introduction to Haskell
9 Your first 8 Fudget programs
9.1 "Hello, world!"
9.2 The factorial function
9.3 The factorial function, with improved layout
9.4 An up counter
9.5 An up/down counter
9.6 An up/down/reset counter
9.7 A loadable up/down counter
9.8 A simple calculator
10 Fudget library GUI elements
10.1 Functions used on the top level of programs
10.2 Displaying values
10.3 Buttons
10.4 Menus and scrollable lists
10.5 Entering values
10.5.1 More detailed information on user input
10.6 Displaying and editing text
10.7 Scroll bars
11 Specifying layout
11.1 Boxes, placers and spacers
11.2 Name layout
11.3 Pros and cons of the different layout methods.
12 Abstract fudgets
13 Fudget plumbing
13.1 Serial compositions
13.2 Parallel compositions
13.3 Loops
13.4 Dynamic fudget creation
14 Fudgets for non-GUI I/O
14.1 Standard I/O fudgets
14.2 Accessing the file system
14.3 The timer fudget
15 Parameters for customisation
15.1 Customisers
15.2 Sample customisers
III Stream processors -- the essence of Fudgets
16 Stream processors
16.1 The stream-processor type
16.2 Atomic stream processors in continuation style
16.3 Stream processors with encapsulated state
16.4 Sequential composition of stream processors
16.5 Stream-processor monads
17 Plumbing: composing stream processors
17.1 Serial composition
17.2 Parallel compositions
17.3 Circular connections
18 Pragmatic aspects of plumbing
18.1 Handling multiple input and output streams
18.2 Stream processors and software reuse
18.3 Dynamic process creation
19 Application programming with plain stream processors
19.1 An adding machine
19.2 A stream processor for input line editing
19.3 Running two programs in parallel on a split screen
IV Design and implementation
20 Implementing stream processors
20.1 Design goals for stream processors
20.2 Intuitive ideas--what is the problem?
20.3 Parallel implementations
20.3.1 Oracles
20.4 Sequential implementations
20.4.1 Synthetic oracles
20.4.2 Continuation-based representation
20.5 Continuations vs list functions
21 Fudgets as stream processors
21.1 Synchronised stream I/O
21.2 The tagged low-level streams
21.3 Writing synchronous atomic fudgets
21.4 Fudget kernels
21.5 Alternative implementations using monadic I/O
22 Fudget I/O: the gory details
22.1 GUI Fudgets
22.1.1 Data types for the X Windows interface
22.1.2
groupF
: the primitive window creation fudget
22.2 Synchronous versus asynchronous I/O
22.2.1 Fudgets for asynchronous I/O
22.2.2 The asynchronous
fudlogue
22.3 The interfaces to Xlib
22.3.1 A compiler independent interface
22.3.2 The interface for HBC
22.3.3 The interface for NHC
22.3.3.1 Support for two-pass heap profiling
22.3.4 The interface for GHC
23 Automatic layout
23.1 The historic steps of fudget layout
24 Filter fudgets
24.1 The cache filter
24.1.1 Implementation
24.2 The focus filter
24.2.1 Implementation
24.3 Pros and cons of filters
25 Moving stream processors
25.1 Problems with dragging windows in X Windows
26 Typed sockets for client/server applications
26.1 Clients
26.2 Servers
26.3 Typed sockets
26.4 Avoiding type errors between client and server
26.5 Example: a group calendar
26.5.1 The calendar server
27 Displaying and manipulating graphical objects
27.1 The class
Graphic
27.2 Primitive drawing operations
27.3 Types for simple graphical objects
27.3.1
BitmapFile
27.3.2
FlexibleDrawing
27.3.3 Fixed size drawings
27.4 Types for structured graphical objects
27.4.1 Manipulating drawings
27.4.2 Mixing graphical objects of different types in one drawing
27.4.3 Drawing attributes
27.4.4 Specifying fonts and colors
27.4.5 Allocating colors and fonts in advance
27.5 Implementation
27.5.1 The capabilities of
graphicsF
27.5.2 Implementation of
graphicsF
27.5.3 Efficiency issues in the implementation of
graphicsF
27.6 Extended layout mechanisms
27.6.1 Reference points
27.6.2 Line breaking
27.6.3 Conditional spacers and placers
27.7 Concluding remarks
28 Combinators for syntax-oriented manipulation
28.1 The
SOM
combinators
28.2 Example: manipulating arithmetic expressions
28.3 Non-local manipulation
28.3.1 Extended example: manipulating variables
28.4 The implementation of the
SOM
combinators
29 Type directed GUI generation
29.1 Introduction
29.2 The
FormElement
class
29.3 Some suggestions for improvements
30 Parameters for customisation
30.1 A mechanism for default values
30.2 Naming conventions for the customisable GUI fudgets
30.3 Dynamic customisation
30.4 Discussion
31 Gadgets in Fudgets
31.1 Wires and processes in Gadget Gofer
31.1.1 Connecting processes to the world
31.1.2 Manipulating the process state
31.2 A functional process implementation
31.2.1 The stream-processor monad with state
31.2.2 Processes without state
31.2.3 Gadgets processes with state
31.2.4 Simulating Gadget input/output
31.3 Discussion
V Applications
32 WWWBrowser -- a WWW client
32.1 Overall structure of the current WWW browser implementation
32.2 Implementing Internet protocols
32.3 Displaying HTML
32.4 Fetching images in parallel
32.5 Discussion
33 Alfa -- a proof editor for type theory
34 Humake -- a distributed and parallel make tool for Haskell
34.1 Implementation
35 Space Invaders -- real-time and simulation
35.1 Space Invaders
35.2 Structure of the Space-Invaders implementation
35.3 About the efficiency of the Space-Invaders implementation
35.4 Replacing fudgets with stream processors for efficiency
36 FunGraph
37 A mobile data communication protocol prototyping tool
38 Two board games
38.1 The Explode Game
38.1.1 The Fudgets implementation of the Explode game
38.1.2 A comparison of the Fudgets and Gadgets versions of the Exlode Game
38.2 The Othello Game
VI Discussion
39 Efficiency and program transformations
39.1 Execution efficiency
39.1.1 Efficiency of the interface to the window system
39.1.2 Efficiency of the Fudget combinators
39.1.2.1 Efficiency of different representations of stream processors
39.1.2.2 Program transformations for efficiency
39.1.2.3 A practical semi-automatic transformation
39.1.2.4 Performance measurements
39.1.3 Space efficiency
40 Comments on Haskell and other language design issues
40.1 The annoying monomorphism restriction
40.2 The Haskell string + class system anomaly
40.3 Existentially quantified types
40.4 Dependent types
41 Related work
41.1 Combinators for sequential I/O
41.1.1 Dialogues
41.1.2 Interactions
41.1.3 Monads
41.2 Streams and process programming
41.3 Functional GUI toolkits
41.3.1 Gadgets
41.3.2 Haggis
41.3.3 BriX
41.3.4 eXene
41.4 Interfaces to existing toolkits
41.4.1 Concurrent Clean
41.5 Functional interactive graphics
41.5.1 Pidgets
41.5.2 Fran
41.6 Imperative toolkits
41.6.1 Java
41.6.2 Pizza
41.6.3 C and Motif
42 Evaluation and conclusions
42.1 Frequently Asked Questions
43 Future work
43.1 Towards a calculus for stream processors
43.1.1 Basic stream processors
43.1.2 Congruence rules
43.1.3 Reaction rules
43.1.4 The \-calculus embedded
43.1.5 Equivalent stream processors
43.1.6 Future work
43.2 Stream processors as Internet agents
A Online resources
A.1 The Fudgets Home Page
A.2 Supported platforms, downloading and installation
A.3 Compiling Fudget programs
B Fudget library quick reference guide
B.1 Top level, main program
B.2 GUI building blocks (widgets)
B.3 Combinators, plumbing
B.4 Adding application-specific code
B.5 Layout
B.6 Graphics
B.7 Alphabetical list
Production notes
Previous
Top
Next