Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
Programming with Variable Functions
Martin Odersky, University of South Australia
Proc. ICFP'98
What is a good method to specify and derive imperative programs? This
paper argues that a new form of functional programming fits the bill,
where {\em variable functions} can be updated at specified points in
their domain.
Traditional algebraic specification and functional programming are a
powerful pair of tools for specifying and implementing domains of
discourse and operations on them. Recent work on evolving algebras has
introduced the function update in algebraic specifications, and has
applied it with good success in the modelling of reactive systems. We
show that similar concepts allow one to derive efficient programs in a
systematic way from functional specifications. The final outcome of
such a derivation can be made as efficient as a traditional imperative
program with pointers, but can still be reasoned about at a high
level.
Variable functions can also play an important role in the structuring
of large systems. They can subsume object-oriented programming
languages, without incurring the latter's problems with pointer
aliasing and modularity.