A new edition of a book, written in a humorous question-and-answer style, that shows how to implement and use an elegant little programming language for logic programming. The goal of this book is to show the beauty and elegance of relational programming, which captures the essence of logic programming. The book shows how to implement a relational programming language in Scheme, or in any other functional language, and demonstrates the remarkable flexibility of the resulting relational programs. As in the first edition, the pedagogical method is a series of questions and answers, which proceed with the characteristic humor that marked The Little Schemer and The Seasoned Schemer. Familiarity with a functional language or with the first five chapters of The Little Schemer is assumed. For this second edition, the authors have greatly simplified the programming language used in the book, as well as the implementation of the language. In addition to revising the text extensively, and simplifying and revising the “Laws” and “Commandments,” they have added explicit “Translation” rules to ease translation of Scheme functions into relations.
Extending the functional language Scheme with logical constructs in order to help the functional programmer think logically and the logic programmer think functionally. The goal of The Reasoned Schemer is to help the functional programmer think logically and the logic programmer think functionally. The authors of The Reasoned Schemer believe that logic programming is a natural extension of functional programming, and they demonstrate this by extending the functional language Scheme with logical constructs—thereby combining the benefits of both styles. The extension encapsulates most of the ideas in the logic programming language Prolog. The pedagogical method of The Reasoned Schemer is a series of questions and answers, which proceed with the characteristic humor that marked The Little Schemer and The Seasoned Schemer. Familiarity with a functional language or with the first eight chapters of The Little Schemer is assumed. Adding logic capabilities required the introduction of new forms. The authors' goal is to show to what extent writing logic programs is the same as writing functional programs using these forms. In this way, the reader of The Reasoned Schemer will come to understand how simple logic programming is and how easy it is to define functions that behave like relations.
Extending the functional language Scheme with logical constructs in order to help the functional programmer think logically and the logic programmer think functionally. The goal of The Reasoned Schemer is to help the functional programmer think logically and the logic programmer think functionally. The authors of The Reasoned Schemer believe that logic programming is a natural extension of functional programming, and they demonstrate this by extending the functional language Scheme with logical constructs—thereby combining the benefits of both styles. The extension encapsulates most of the ideas in the logic programming language Prolog. The pedagogical method of The Reasoned Schemer is a series of questions and answers, which proceed with the characteristic humor that marked The Little Schemer and The Seasoned Schemer. Familiarity with a functional language or with the first eight chapters of The Little Schemer is assumed. Adding logic capabilities required the introduction of new forms. The authors' goal is to show to what extent writing logic programs is the same as writing functional programs using these forms. In this way, the reader of The Reasoned Schemer will come to understand how simple logic programming is and how easy it is to define functions that behave like relations.
A new edition of a book, written in a humorous question-and-answer style, that shows how to implement and use an elegant little programming language for logic programming. The goal of this book is to show the beauty and elegance of relational programming, which captures the essence of logic programming. The book shows how to implement a relational programming language in Scheme, or in any other functional language, and demonstrates the remarkable flexibility of the resulting relational programs. As in the first edition, the pedagogical method is a series of questions and answers, which proceed with the characteristic humor that marked The Little Schemer and The Seasoned Schemer. Familiarity with a functional language or with the first five chapters of The Little Schemer is assumed. For this second edition, the authors have greatly simplified the programming language used in the book, as well as the implementation of the language. In addition to revising the text extensively, and simplifying and revising the “Laws” and “Commandments,” they have added explicit “Translation” rules to ease translation of Scheme functions into relations.
A common application of generative programming is building high performance computational kernels highly tuned to the problem at hand. A typical linear algebra kernel is specialized to the numerical domain (rational, float, double, et cetera), loop unrolling factors, array layout and a priori knowledge (e.g., the matrix being positive definite). It is tedious and error prone to specialize by hand, writing numerous variations of the same algorithm. The widely used generators such as ATLAS and SPIRAL reliably produce highly tuned specialized code but are difficult to extend. In ATLAS, which generates code using printf, even balancing parentheses is a challenge. According to the ATLAS creator, debugging is nightmare. A typed staged programming language such as MetaOCaml lets us state a general, obviously correct algorithm and add layers of specializations in a modular way. By ensuring that the generated code always compiles and letting us quickly test it, MetaOCaml makes writing generators less daunting and more productive. The readers will see it for themselves in this hands-on tutorial. Assuming no prior knowledge of MetaOCaml and only a basic familiarity with functional programming, we will eventually implement a simple domain-specific language (DSL) for linear algebra, with layers of optimizations for sparsity and memory layout of matrices and vectors, and their algebraic properties. We will generate optimal BLAS kernels. We shall get the taste of the "Abstraction without guilt.
This will help us customize your experience to showcase the most relevant content to your age group
Please select from below
Login
Not registered?
Sign up
Already registered?
Success – Your message will goes here
We'd love to hear from you!
Thank you for visiting our website. Would you like to provide feedback on how we could improve your experience?
This site does not use any third party cookies with one exception — it uses cookies from Google to deliver its services and to analyze traffic.Learn More.