Preface
Egison is a programming language created with the motivation of “wanting to create a language that can express human cognition without translating it for computers.” A new programming language that enables concise description of a wider range of algorithms is important because it not only simplifies the programming of known computer science problems but also has the potential to make previously daunting problems—those avoided because programming them was too difficult—more approachable, thereby expanding the scope of computer science.
Among the ideas implemented in Egison, the first feature to be implemented was pattern matching, which is the subject of Part I of this book. The distinguishing features of Egison's pattern matching are that it is user-extensible and that it efficiently handles non-linear patterns (patterns that reference values bound to pattern variables within the same pattern) through backtracking. Part I of this book was written with the goal of introducing, as compactly as possible, the programming paradigm called pattern-match-oriented programming, which is advocated through Egison. It introduces Egison's syntax related to pattern matching and programming techniques that use this syntax.
By applying this pattern matching, a computer algebra system has been implemented in Egison. This computer algebra system has the distinctive feature that tensor index notation can be applied to arbitrary user-defined functions. This capability allows computations arising in differential geometry—a field of mathematics involving particularly complex calculations—to be written as programs in a form close to mathematical notation on paper. In addition, several other experimental new features have been implemented in Egison's computer algebra system, and Part II introduces these.
I would be very happy if this book serves as an opportunity for readers to become fellow researchers in the study of programming languages, particularly pattern matching and computer algebra systems.
May 13, 2021
Satoshi Egi