Functional programming languages bring a set of benefits, programmability and lack of state to name a few, that are missing on typical procedural languages. In recent years efforts have been made to introduce a set of the functional concepts into procedural languages (like C++11 or python). Research projects, such as POLCA, have develop means to introduce functional-like semantics to procedural code that describe the algorithmic behavior of the application. This allows compilers to perform aggressive code transformations that increase performance and allow portability across different architectures. In this work we describe how the static analysis of functional semantics directives can be used to determine the algorithmic complexity.
Rubio Bonilla, D., & Glass, C. W. (2018). Using functional directives to analyze code complexity. In Communications in Computer and Information Science (Vol. 779, pp. 163–169). Springer Verlag. https://doi.org/10.1007/978-3-319-71734-0_14