42717421
Global variables in Haskell
Haskell today provides good support not only for a functional programming style, but also for an imperative one. Elements of imperative programming are needed in applications such as web servers, or to provide efficient implementations of well-known algorithms, such as many graph algorithms. However, one element of imperative programming, the global variable, is surprisingly hard to emulate in Haskell. We discuss several existing methods, none of which is really satisfactory, and finally propose a new approach based on implicit parameters. This approach is simple, safe, and efficient, although it does reveal weaknesses in Haskell's present type system.
27745403
Type Specialisation for the lambda-Calculus; or, A New Paradigm for Partial Evaluation Based on Type Inference
218895568
How to give a good research talk
Giving a good research talk is not easy. We try to identify some things which we have found helpful, in the hope that they may be useful to you.
8161135
Binding-Time Analysis for Polymorphic Types
Offline partial evaluators specialise programs with annotations which distinguish specialisation-time (or static) computations from run-time ones. These annotations are generated by a binding-time analyser, via type inference in a suitable type-system. Henglein and Mossin developed a type system which allows polymorphism in binding-times, so that the same code can be specialised with different computations being static at different uses. We extend their work to permit polymorphism in types as well. This is particularly important for separately compiled libraries.Following Henglein and Mossin, binding-times are passed as parameters during specialisation, but types are not. Instead, we pass coercion functions when necessary, which makes specialisation less "interpretive" than it would otherwise be. We keep track of the coercions needed by assigning qualified types to polymorphic functions.We also consider hand-annotations to provide limited user control over the binding-time analysis, which our prototype implementation showed to be necessary.
14804186
Proving the correctness of reactive systems using sized types
We have designed and implemented a type-based analysis for proving some basic properties of reactive systems. The analysis manipulates rich type expressions that contain information about the sizes of recursively defined data structures. Sized types are useful for detecting deadlocks, nontermination, and other errors in embedded programs. To establish the soundness of the analysis we have developed an appropriate semantic model of sized types.
14958709
Making choices lazily
We present a natural semantics that models the untyped, normal order A-calculus plus McCarthy’s amb in the context of call-by-need parameter passing. This results in a singular semantics for amb. Previous work on singular choice has concentrated on erratic choice, a less interesting nondeterministic choice operator, and only in relation to callby-value parameter passing, or call-by-name restricted to deterministic terms. The natural semantics contains rules for both convergent and divergent behaviour, allowing it to distinguish programs that differ only in their divergent behaviour. As a result, it is more discriminating than current domain-theoretic models. This, and the fact that it models singular amb, makes the natural semantics suitable for reasoning about lazy, functional languages containing McCarthy’s amb.
250743
WYSIWYG NPR: drawing strokes directly on 3D models
We present a system that lets a designer directly annotate a 3D model with strokes, imparting a personal aesthetic to the non-photorealistic rendering of the object. The artist chooses a "brush" style, then draws strokes over the model from one or more viewpoints. When the system renders the scene from any new viewpoint, it adapts the number and placement of the strokes appropriately to maintain the original look.
2210
Length-Based Attacks for Certain Group Based Encryption Rewriting Systems
In this note, we describe a probabilistic attack on public key cryptosystems based on the word/conjugacy problems for finitely presented groups of the type proposed recently by Anshel, Anshel and Goldfeld. In such a scheme, one makes use of the property that in the given group the word problem has a polynomial time solution, while the conjugacy problem has no known polynomial solution. An example is the braid group from topology in which the word problem is solvable in polynomial time while the only known solutions to the conjugacy problem are exponential. The attack in this paper is based on having a canonical representative of each string relative to which a length function may be computed. Hence the term length attack. Such canonical representatives are known to exist for the braid group.
14618445
Sculpting: an interactive volumetric modeling technique
We present a new interactive modeling technique based on the notion of sculpting a solid material. A sculpting tool is controlled by a 3D input device and the material is represented by voxel data; the tool acts by modifying the values in the voxel array, much as a "paint" program's "paintbrush" modifies bitmap values. The voxel data is converted to a polygonal surface using a "marching-cubes" algorithm; since the modifications to the voxel data are local, we accelerate this computation by an incremental algorithm and accelerate the display by using a special data structure for determining which polygons must be redrawn in a particular screen region. We provide a variety of tools: one that cuts away material, one that adds material, a "sandpaper" tool, a "heat gun," etc. The technique provides an intuitive direct interaction, as if the user were working with clay or wax. The models created are free-form and may have complex topology; however, they are not precise, so the technique is appropriate for modeling a boulder or a tooth but not for modeling a crankshaft.
7238760
Analyzing bounding boxes for object intersection
Heuristics that exploit bouning boxes are common in algorithms for rendering, modeling, and animation. While experience has shown that bounding boxes improve the performance of these algorithms in practice, the previous theoretical analysis has concluded that bounding boxes perform poorly in the worst case. This paper reconciles this discrepancy by analyzing intersections among <italic>n</italic> geometric objects in terms of two parameters: α an upper bound on the <italic>aspect ratio</italic> or elongatedness of each object; and &sgr; an upper bound on the <italic>scale factor</italic> or size disparity between the largest and smallest  objects. Letting <italic>K<subscrpt>o</subscrpt></italic> and <italic>K<subscrpt>b</subscrpt></italic> be the number of intersecting object       pairs and bounding box pairs, respectively, we analyze a ratio measure of the   bounding boxes'  efficiency, <inline-equation> <f> <g>r</g>=K<inf>b</inf>/<fen lp="par">n+K<inf>o</inf><rp post="par"></fen> </f> </inline-equation>. The analysis proves that <inline-equation> <f> <g>r</g>=O<fen lp="par"><g>a</g><rad><rcd><g>s</g></rcd></rad> <lim align="r"><op><rf>log</rf></op><ul>2</ul></lim><g>s</g><rp post="par"></fen> </f> </inline-equation> and <inline-equation> <f> <g>r</g>=<g>W</g><fen lp="par"><g>a</g><rad><rcd><g>s</g></rcd></rad> <rp post="par"></fen></f> </inline-equation>.
 One important consequence is that if α and &sgr; are small constants (as is often the case in practice), then<italic>K<subscrpt>b</subscrpt></italic>= <italic>O</italic>(<italic>K<subscrpt>o</subscrpt></italic>)+<italic>O</italic>(<italic>n</italic>, so an algorithm that uses bounding boxes has time complexity proportional to the number of actual object intersections. This theoretical result validates the efficiency that bounding boxes have demonstrated in practice. Another consequence of our analysis is a proof of the output-sensitivity of an algorithm for reporting all intersecting pairs in a set of <italic>n</italic> convex polyhedra with constant α and &sgr;. The algorithm takes time <italic>O</italic>(<italic>n</italic>log<supscrpt><italic>d</italic>−1</supscrpt><italic>n</italic>+<italic>K<subscrpt>o</subscrpt></italic>log<supscrpt><italic>d</italic>−1</supscrpt><italic>n</italic>) for dimension <italic>d</italic> = 2, 3. This running time improves on the performance of previous algorithms, which make no assumptions about α and &sgr;.
14187938
Smooth meshes for sketch-based freeform modeling
This paper describes a framework for introducing visually smooth surfaces into sketch-based freeform modeling systems. An existing sketch-based freeform modeling system generates rough polygonal meshes with uneven triangulations after each operation. Our approach generates a dense, visually smooth polygonal mesh by beautifying and refining the original rough mesh. A beautification process generates near-equilateral triangles with a near-uniform distribution of vertices to mask the noise and bad sampling of the uneven mesh. The vertices are distributed on a smoothed surface that approximately interpolates the original mesh. Refinement generates a smooth, dense mesh by subdividing the beautified mesh and moving the vertices to the interpolative surface. The smooth interpolative surface is computed via implicit quadratic surfaces that best fit the mesh locally in a least-squares sense.