Solving the snake cube puzzle in Haskell

2013 ◽  
Vol 23 (2) ◽  
pp. 145-160
Author(s):  
MARK P. JONES

AbstractWe describe a concise and elegant functional program, written in Haskell, that computes solutions for a classic puzzle known as the “snake cube.” The program reflects some of the fundamental characteristics of the functional style, identifying key abstractions, and defining a small collection of operators for manipulating and working with the associated values. Well-suited for an introductory course on functional programming, this example highlights the use of visualization tools to explain and demonstrate the choices of data structures and algorithms that are used in the development.

1997 ◽  
Vol 7 (5) ◽  
pp. 557-589 ◽  
Author(s):  
S. B. LASSEN

This paper develops the functional part of a theory of action semantics for reasoning about programs. Action notation, the specification language of action semantics, is given an evaluation semantics, and operational techniques from process theory and functional programming are applied in the development of a versatile action theory. The power of the theory is demonstrated by means of action semantic proofs of functional program equivalences.


Author(s):  
V. Chandru ◽  
M. Manivannan ◽  
S. Manohar

Abstract Feature-based design has evolved as a fundamental paradigm for present-day CAD systems. Voxel-based modeling has many advantages over traditional representation schemes but lacks structural information which is lost in voxelization of the objects. In this paper, we propose to augment voxel models with features by a) storing the sequence of modeling operations along with voxel models and b) by defining feature operators. We have implemented these ideas in our prototype system Sirpi as regularised Minkowski operators using simple data structures and algorithms.


Sign in / Sign up

Export Citation Format

Share Document