Compilers: principles, techniques, and tools
Compilers: principles, techniques, and tools
Report on the Larch shared language
Science of Computer Programming
Copy elimination in functional languages
POPL '89 Proceedings of the 16th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Integrating functional and imperative programming
LFP '86 Proceedings of the 1986 ACM conference on LISP and functional programming
Formal software engineering for computational modelling
Nordic Journal of Computing
Proceedings of an ACM conference on Language design for reliable software
Casl Reference Manual: The Complete Documentation Of The Common Algebraic Specification Language (LECTURE NOTES IN COMPUTER SCIENCE)
An algebraic programming style for numerical software and its optimization
Scientific Programming
LCSD '07 Proceedings of the 2007 Symposium on Library-Centric Software Design
Axiom-Based Transformations: Optimisation and Testing
Electronic Notes in Theoretical Computer Science (ENTCS)
CC'05 Proceedings of the 14th international conference on Compiler Construction
Yet another language extension scheme
SLE'09 Proceedings of the Second international conference on Software Language Engineering
Proceedings of the Twelfth Workshop on Language Descriptions, Tools, and Applications
Hi-index | 0.00 |
A concept (or signature) describes the interface of a set of abstract types by listing the operations that should be supported for those types. When implementing a generic operation, such as sorting, we may then specify requirements such as ''elements must be comparable'' by requiring that the element type models the Comparable concept. We may also use axioms to describe behaviour that should be common to all models of a concept. However, the operations specified by the concept are not always the ones that are best suited for the implementation. For example, numbers and matrices may both be addable, but adding two numbers is conveniently done by using a return value, whereas adding a sparse and a dense matrix is probably best achieved by modifying the dense matrix. In both cases, though, we may want to pretend we're using a simple function with a return value, as this most closely matches the notation we know from mathematics. This paper presents two simple concepts to break the notational tie between implementation and use of an operation: functionalisation, which derives a set of canonical pure functions from a procedure; and mutification, which translates calls using the functionalised declarations into calls to the implemented procedure.