Computer-Aided Refinement of Data Structures on Higher-Order Algebraic Specifications

Author(s):  
Walter Dosch ◽  
Sönke Magnussen
2012 ◽  
Vol 33 (4) ◽  
pp. 556-564 ◽  
Author(s):  
Farzad Bazdidi-Tehrani ◽  
Alireza Imanifar ◽  
Siavash Khajehhasani ◽  
Mehran Rajabi-Zargarabadi

2004 ◽  
Vol 14 (4) ◽  
pp. 429-472 ◽  
Author(s):  
BRIAN MCNAMARA ◽  
YANNIS SMARAGDAKIS

We describe the FC++ library, a rich library supporting functional programming in C++. Prior approaches to encoding higher order functions in C++ have suffered with respect to polymorphic functions from either lack of expressiveness or high complexity. In contrast, FC++ offers full and concise support for higher-order polymorphic functions through a novel use of C++ type inference. The FC++ library has a number of useful features, including a generalized mechanism to implement currying in C++, a “lazy list” class which enables the creation of “infinite data structures”, a subtype polymorphism facility, and an extensive library of useful functions, including a large part of the Haskell Standard Prelude. The FC++ library has an efficient implementation. We show the results of a number of experiments which demonstrate the value of optimizations we have implemented. These optimizations have improved the run-time performance by about an order of magnitude for some benchmark programs that make heavy use of FC++ lazy lists. We also make an informal performance comparison with similar programs written in Haskell.


Sign in / Sign up

Export Citation Format

Share Document