Abstract

The Haskell language allows you to efficiently implement computational algorithms. Higher-order functions, composition of functions, lazy calculations allow you to create functional programs with a clear structure that most fully reflect the logic of the algorithm being implemented. This allows you to get programs that are more compact and more flexible to make changes. Also, the use of pure functions allows you to avoid errors associated with the influence of the “side effect”. The I / O operations required for user interaction use special constructs and functions with a “side effect”, which violates the functional purity of the Haskell language. The approach considered in the article involves the allocation of two parts in an interactive application: interface (front-end) and computing (back-end), interacting with each other by exchanging parameters. The interface part of the application organizes the interaction with the user through the graphical user interface, and the computational part provides the algorithm implementation. To implement front-end is proposed to use the Qt Creator framework with C++ language, and to implement the back-end – the Haskell language. Using a shared address space (files) for data exchange minimizes the impact of the “outside world” on the Haskell program. We also consider a possible way of the software implementation of this approach and example of its applying to develop an application for solve the k-shortest path problem in a graph.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call