Skip to main content

The Deductive Spreadsheet

  • Chapter
  • First Online:
The Deductive Spreadsheet

Part of the book series: Cognitive Technologies ((COGTECH))

  • 973 Accesses

Abstract

This chapter defines the deductive spreadsheet proper by adding recursion to the logical interpretation provided in Chap. 5, hence turning it into a constrained form of Datalog with negation. This step provides a substantial boost in expressiveness while requiring only small theoretical adjustments. It also enables further extensions, notably the ability to weave simple lists into the language. The added deductive power, which includes inferential closure, hypothetical reasoning and some form of aggregation, is illustrated by way of examples.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 54.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    It should be noted that this problem can also be solved in a purely functional manner by relying on the extended array operators \(\vec{\sigma }\) and \(\vec{\pi }\) introduced in Chap. 4. A purely clausal solution is also possible, but requires further extensions to our language. It will be examined in Sect. 6.5.

  2. 2.

    It should be noted that the appellation semi-naïve evaluation is usually reserved for the technique we are about to present, which reaps benefits only for recursive definitions, rather than the general approach we have been developing (which will include this technique as a subroutine). We justify broadening the use of this terminology by the fact that our previous efforts are in the same spirit as this better recognized but also more specialized application.

  3. 3.

    To be fully precise, the theoretical expressiveness will remain the same as in our current language, but in the majority of circumstances it will provide the illusion of a language with unrestricted head constraints.

  4. 4.

    In the above examples, the syntax [_ | _] is also used as a destructor in the conjunct L ′ = [Y | L ′]: it does not construct L ′ by combining Y and L ′, but instead checks that the first element of L ′ is Y. While such traditional usage of the list constructor has a simple formalization based on pattern-matching, an approach more in line with our language would introduce an operation, head, which returns the first element of its argument and express this constraint as Y = head(L ′).

  5. 5.

    See http://genealogy.math.ndsu.nodak.edu/

  6. 6.

    This simple but rather stringent restriction could be loosened by performing a form of dataflow analysis known as mode checking [DW88; Sar10]. In order for a clause to be acceptable, the mode analysis shall certify that X can always be instantiated before attempting to solve the embedded implication.

  7. 7.

    This influential paper identifies the notion of stratification as an effective approach to embedding negation in logic programming, both computationally and cognitively. It develops its general theory and fixpoint semantics, and specializes SLD-resolution to it.

  8. 8.

    This paper develops the characterization of the model semantics of logic programs consisting of Horn clauses (i.e., pure Prolog) as the least fixpoint of a continuous operator. It also observes that some forms of finite-failure (but not all) correspond to its greatest fixpoint.

  9. 9.

    This paper describes Forms/3, a conservative extension of the traditional spreadsheet with procedural abstractions such as recursion, data abstractions such as graphical values, and graphic time-based output. As it does so, it strives to maintain the usability characteristics that have made the spreadsheet popular with end-users.

  10. 10.

    This dissertation explores a principled way to extend deductive databases with hypothetical reasoning. It does so by allowing the body of a clause to mention “embedded clauses”. This adds significantly to the expressive power of the language, a fact that is thoroughly analyzed in the context of complexity theory. The model theory of this extension is investigated in [BM90] while the key insight was already present in [BMV89].

  11. 11.

    This paper develops the author’s dissertation [Bon91] by focusing on forms of hypothetical reasoning that only add temporary facts in a deductive database and create new constants dynamically. It explores its proof-theory, its model theory, and the computational complexity of the extended language.

  12. 12.

    This expanded version of [CGT89] is an excellent survey with some in-depth analysis of important concepts, in particular semantics, optimizations and the interface with actual databases. It covers the experimental deductive database system of the time at length.

  13. 13.

    This paper provides a detailed classification of the expressive powers of various fragments of relational algebra and (extensions of) Datalog. It is particularly concerned with how different forms of negation impact expressiveness.

  14. 14.

    This is the original article on negation-as-failure.

  15. 15.

    This book is a classic introductory text to Prolog. Generations of students have relied on it to learn logic programming to build applied programs.

  16. 16.

    This technical report is widely considered to be the first mention on what was to become Prolog. Its original application was the processing of natural language (French, to be precise).

  17. 17.

    This book is one of the best introductory accounts of what can be done with a deductive database. Specifically, it explores in great depth problems that combine large sets of data and require a truly deductive form of inference, above and beyond what the relational data model has to offer. It targets people who will be using a deductive database as a tool more than students interested in the underlying theory.

  18. 18.

    This paper describes a method for automatically determining correct input/output mode declarations in a Prolog program. This permits us to specialize the operational interpretation of a program, thereby achieving greater efficiency.

  19. 19.

    This is a classic paper on the foundations of logic programming. It defines top-down evaluation and the fixpoint semantics, and relates them to proof- and model-theory respectively.

  20. 20.

    This paper considers an extension of a logical language for deductive databases with embedded implication based on [Mil89]. It explores implicational stratification of programs, a model-theoretic semantics, and a fixpoint semantics, but limits the antecedent of embedded implications to universally closed formulas. In particular, there is no sharing of variables with the parent clause.

  21. 21.

    This article contains an in-depth discussion of the semi-naïve strategy.

  22. 22.

    This collection contains many of the very first papers on using logic programming in the context of data- and knowledge-bases. The seminal work on the closed world assumption and negation-as-failure first appeared in it.

  23. 23.

    This paper proposes a precise model of the run-time of a logic program that supports using logic programs for studying the execution time of algorithms.

  24. 24.

    This is an early proposal to use theorem proving for problem solving.

  25. 25.

    This paper develops the proof-theory of negation-as-failure for hereditary Harrop formulas, whose body formulas admit embedded clauses. To this effect, it defines a proof theory for non-derivability in intuitionistic logic.

  26. 26.

    This is the original paper on constraint logic programming, a paradigm that seamlessly incorporates constraints over generic domains within logic programming in the style of Prolog. The result is a family of languages, one for each specific domain and accompanying constraint-solving procedures, that retain the declarative nature of logic for programming purposes, but specializes it to domains of interest in a natural way.

  27. 27.

    This paper surveys the foundations, applications and developments of constraint logic programming since its inception in [JL87].

  28. 28.

    This paper proposes an approach to representing and retrieving data in a database that stores information not as facts (or tuples), but as a conjunction of simple constraints over a given domain. This is especially useful for applications, such as geographic databases, where objects of interest are naturally expressed as constraints, spatial constraints in this case.

  29. 29.

    This collection surveys the then-nascent field of constraint databases, with contributions by many of it pioneers. Constraint databases rely on constraints to describe some types of data, for example temporal or spatial data, and to draw inferences from them in an efficient way.

  30. 30.

    This classic book investigates the application of logic to problem solving and computer programming using Prolog.

  31. 31.

    This work refines [Kri82] and implements its design as a system called LogiCalc. Its initial goal was to “reconstruct logically, in micro-Prolog, a typical spreadsheet program”. Besides capturing most of the functionalities of early spreadsheets, it provides powerful extensions such as relational manipulations, integrity constraints, bidirectional variables, symbolic reasoning, and complex objects (e.g., lists, graphics and spreadsheets themselves). It is based on the limited teletype interface that predated the widespread availability of graphical user interfaces with windows. LogiCalc relies a lot on user input, even for non-essential tasks.

  32. 32.

    This paper models the propagation of the assertion of new facts or the retraction of old facts in the Datalog system by means of inference in linear logic. To this effect, it translates Datalog clauses into linear logic formulas that also contain specifications about how to propagate updates.

  33. 33.

    This is the classical textbook on the theory of logic programming: it collects and unifies results on SLD-resolution, unification, model and fixpoint semantics, negation-as-failure, that had appeared in separate papers. It does not consider any of the recent proof-theoretic developments, but it is a valuable reference. As such, it has been used by generations of students and scholars of logic programming.

  34. 34.

    This paper shows how Datalog can fruitfully be used to specify access control and trust management policies in order to decide authorization and access in a distributed system of computers. To this effect, it extends Datalog with constraints over signed messages. The paper explores the theoretical properties of the resulting language and relates it to other authorization and trust management languages.

  35. 35.

    This paper examines proof irrelevance, a mechanism for selectively hiding the identities of terms in type theories, and relates it to refinement types, a powerful approach to classify terms.

  36. 36.

    This paper describes a method for transforming a Datalog program into an efficient specialized implementation with guaranteed worst-case time and space complexities. The transformation exploits fixed-point computation, incremental maintenance of invariants, and combinations of indexed and linked data structures.

  37. 37.

    This paper describes a method for computing run-time complexity bounds for Datalog programs. More generally, it shows that specifying an algorithm using Datalog is beneficial for reasoning about its complexity.

  38. 38.

    This is another good textbook on mathematical logic. It is notable for its breadth of topics.

  39. 39.

    This paper explores the theory and application of a general language of Horn clauses augmented with embedded implication and quantification (hereditary Harrop formulas), which goes well beyond Datalog. It studies its proof theory, model theory and fixpoint semantics in an intuitionistic setting. It shows how embedded clauses provide a foundational justification for parametric modules in logic programming.

  40. 40.

    This book collects original articles by the main players of the then-nascent and very fertile field of deductive databases. It grew out of a workshop by the same title held in Washington, DC the year before.

  41. 41.

    This now classic paper was the first to establish top-down logic programming on solid proof-theoretic grounds. The methodology it embraced, based on the notion of uniform proofs, identified fragments of logic larger than Prolog’s Horn clauses that could be used for programming. Specifically, it shows that hereditary Harrop formulas, which extend Horn clauses with embedded implication, fit into this pattern, and so do higher-order variants of both languages.

  42. 42.

    This paper explores an efficient asynchronous algorithm to incrementally compute the changes to the states of a distributed Datalog system, as proposed in some network protocols and multi-agent systems, in response to the insertions and deletions of base facts.

  43. 43.

    This classic textbook focuses on advanced programming techniques in Prolog as well as on universal programming notions such as elegance and understanding a problem before starting to write code. It is best read after [CM87] or [SS94].

  44. 44.

    This paper describes the Elf system, which provides a type-checker, type-reconstruction support, and top-down execution in the style of Prolog to the LF type theory.

  45. 45.

    This volume brings together the principal approaches to weaving types in logic programming. Essays within describe specific techniques but also emphasize the overall benefits of types, including reduced error rates, support for modularity, and compilation assistance.

  46. 46.

    This is the original paper on local stratification.

  47. 47.

    This paper describes Twelf, a reimplementation of the Elf system [Pfe89] extended with theorem-proving capabilities for specifications written in the LF type theory.

  48. 48.

    This classic paper sets the foundations of theorem proving and introduces the resolution principle, which is one of the tenets of top-down evaluation in logic programming.

  49. 49.

    This paper reviews the state of the art of bottom-up evaluation and proposes a transformation on Datalog programs to speed up that semi-naïve evaluation. It also discusses extensions to negation, set terms, constraints and quantitative reasoning. Comparisons with numerous systems are included.

  50. 50.

    This thesis examines in great detail, among other things, mode-checking and termination in the Twelf system, which embeds a higher-order logic programming language with a top-down execution semantics.

  51. 51.

    This work proposes to combine logic programming and spreadsheets under the umbrella of the PERPLEX system. It does so by making heavy use of integrity constraints in a way that is clearly expressive, but likely to be unnatural for an entry-level user. PERPLEX supports exploratory programming and the paradigm of “query-by-example” to perform many programming tasks. While very powerful, it is not clear that this blends smoothly in the spreadsheet mindset. This is the first logical spreadsheet extension to make use of graphical input and not just output.

  52. 52.

    This paper studies in great detail to what depth it is sufficient to expand a derivation tree for a top-down evaluation of a logic program. It also leverages properties such as transitivity and subsumption, as well as characteristics of the domain to extend the class of prunable programs.

  53. 53.

    This is another classic introductory textbook on programming in Prolog that has been used by generations of students.

  54. 54.

    This two-volume set is a now classic reference to constructive logic and its applications in a variety of fields. It covers intuitionistic logic both at an introductory level and in exhaustive depth.

  55. 55.

    XSB is Prolog with a form of memoization called tabling. Declaratively, it does not differ substantially from Prolog. Procedurally, however, it substantially improves on the standard top-down SLDNF resolution strategy of this language by nearly eradicating control-induced infinite loops. In particular, an XSB query always terminates against a Datalog program. Tabling can also have a positive effect on efficiency, although this may depend on how the user writes his programs. This makes XSB a promising candidate as the underlying explanation engine of a deductive spreadsheet.

Annotated Bibliography

  1. Apt, K. R., Blair, H. A., & Walker, A. (1987). Towards a theory of declarative knowledge. In J. Minker (Ed.), Foundations of deductive databases and logic programming [Min87] (pp. 89–148). Los Altos: Morgan Kaufmann. Footnote

    This influential paper identifies the notion of stratification as an effective approach to embedding negation in logic programming, both computationally and cognitively. It develops its general theory and fixpoint semantics, and specializes SLD-resolution to it.

    Google Scholar 

  2. Apt, K. R., & van Emden, M. H. (1982). Contributions to the theory of logic programming. Journal of the ACM, 29(3), 841–862. Footnote

    This paper develops the characterization of the model semantics of logic programs consisting of Horn clauses (i.e., pure Prolog) as the least fixpoint of a continuous operator. It also observes that some forms of finite-failure (but not all) correspond to its greatest fixpoint.

    Google Scholar 

  3. Burnett, M., Atwood, J., Djang, R. W., Reichwein, J., Gottfried, H., & Yang, S. (2001). Forms/3: A first-order visual language to explore the boundaries of the spreadsheet paradigm. Journal of functional programming, 11(2), 155–206. Footnote

    This paper describes Forms/3, a conservative extension of the traditional spreadsheet with procedural abstractions such as recursion, data abstractions such as graphical values, and graphic time-based output. As it does so, it strives to maintain the usability characteristics that have made the spreadsheet popular with end-users.

    Google Scholar 

  4. Bonner, A. J. (1991). Hypothetical reasoning in deductive databases. PhD thesis, Rutgers University. Footnote

    This dissertation explores a principled way to extend deductive databases with hypothetical reasoning. It does so by allowing the body of a clause to mention “embedded clauses”. This adds significantly to the expressive power of the language, a fact that is thoroughly analyzed in the context of complexity theory. The model theory of this extension is investigated in [BM90] while the key insight was already present in [BMV89].

    Google Scholar 

  5. Bonner, A. J. (1994). Hypothetical reasoning with intuitionistic logic. In R. Demolombe & T. Imielinski (Eds.), Non-standard queries and answers (Studies in logic and computation, chapter 8, pp. 187–219). Oxford: Oxford University Press. Footnote

    This paper develops the author’s dissertation [Bon91] by focusing on forms of hypothetical reasoning that only add temporary facts in a deductive database and create new constants dynamically. It explores its proof-theory, its model theory, and the computational complexity of the extended language.

    Google Scholar 

  6. Ceri, S., Gottlob, G., & Tanca, L. (1990). Logic programming and databases. Berlin/New York: Springer. Footnote

    This expanded version of [CGT89] is an excellent survey with some in-depth analysis of important concepts, in particular semantics, optimizations and the interface with actual databases. It covers the experimental deductive database system of the time at length.

    Google Scholar 

  7. Chandra, A. K., & Harel, D. (1985). Horn clause queries and generalizations. Journal of Logic Programming, 1, 1–15. Footnote

    This paper provides a detailed classification of the expressive powers of various fragments of relational algebra and (extensions of) Datalog. It is particularly concerned with how different forms of negation impact expressiveness.

    Google Scholar 

  8. Clark, K. L. (1978). Negation as failure. In H. Gallaire & J. Minker (Eds.), Logic and data bases (pp. 293–322). New York: Plenum. Footnote

    This is the original article on negation-as-failure.

    Google Scholar 

  9. Clocksin, W. F., & Mellish, C. S. (1987). Programming in Prolog (3rd ed.). Berlin/New York: Springer. Footnote

    This book is a classic introductory text to Prolog. Generations of students have relied on it to learn logic programming to build applied programs.

    Google Scholar 

  10. Colmerauer, A. (1970). Les systèmes-Q ou un formalisme pour analyser et synthétiser des phrases sur ordinateur. Technical report, Department of Computer Science, University of Montreal, Montreal. Footnote

    This technical report is widely considered to be the first mention on what was to become Prolog. Its original application was the processing of natural language (French, to be precise).

    Google Scholar 

  11. Colomb, R. M. (1998). Deductive databases and their applications. London/Bristol: Taylor & Francis. Footnote

    This book is one of the best introductory accounts of what can be done with a deductive database. Specifically, it explores in great depth problems that combine large sets of data and require a truly deductive form of inference, above and beyond what the relational data model has to offer. It targets people who will be using a deductive database as a tool more than students interested in the underlying theory.

    Google Scholar 

  12. Debray, S. K., & Warren, D. S. (1988). Automatic mode inference for logic programs. Journal of Logic Programming, 5, 207–229. Footnote

    This paper describes a method for automatically determining correct input/output mode declarations in a Prolog program. This permits us to specialize the operational interpretation of a program, thereby achieving greater efficiency.

    Google Scholar 

  13. Van Emden, M. H., & Kowalski, R. A. (1976). The semantics of predicate logic as a programming language. Journal of the ACM, 23(4), 733–742. Footnote

    This is a classic paper on the foundations of logic programming. It defines top-down evaluation and the fixpoint semantics, and relates them to proof- and model-theory respectively.

    Google Scholar 

  14. Freitag, B. (1992). Extending deductive database languages by embedded implications. In A. Voronkov (Ed.), Proceedings of the third international conference on logic programming and automated reasoning – LPAR’92, St. Petersburg (Lecture notes in computer science, Vol. 642, pp. 84–95). Springer. Footnote

    This paper considers an extension of a logical language for deductive databases with embedded implication based on [Mil89]. It explores implicational stratification of programs, a model-theoretic semantics, and a fixpoint semantics, but limits the antecedent of embedded implications to universally closed formulas. In particular, there is no sharing of variables with the parent clause.

    Google Scholar 

  15. Güntzer, U., Kiessling, W., & Bayer, R. (1987). On the evaluation of recursion in (deductive) database systems by efficient differential fixpoint iteration. In Proceedings of the third international conference on data engineering, Los Angeles (pp. 120–129). IEEE Computer Society. Footnote

    This article contains an in-depth discussion of the semi-naïve strategy.

    Google Scholar 

  16. Gallaire, H., & Minker, J. (Eds.). (1978). Logic and data bases. New York: Plenum. Footnote

    This collection contains many of the very first papers on using logic programming in the context of data- and knowledge-bases. The seminal work on the closed world assumption and negation-as-failure first appeared in it.

    Google Scholar 

  17. Ganzinger, H., & McAllester, D. (2002). Logical algorithms. In Proceedings of the 18th international conference on logic programming – ICLP’02, London (pp. 209–223). Springer. Footnote

    This paper proposes a precise model of the run-time of a logic program that supports using logic programs for studying the execution time of algorithms.

    Google Scholar 

  18. Green, C. (1969). Application of theorem proving to problem solving. In D. E. Walker & L. M. Norton (Eds.), Proceedings of the international joint conference on artificial intelligence, Washington, DC (pp. 219–239). Footnote

    This is an early proposal to use theorem proving for problem solving.

    Google Scholar 

  19. Harland, J. (1994). Towards a sequent calculus for negation as failure. In Proceedings of the workshop on proof-theoretical extensions of logic programming, Santa Margherita Ligure (pp. 19–27). Footnote

    This paper develops the proof-theory of negation-as-failure for hereditary Harrop formulas, whose body formulas admit embedded clauses. To this effect, it defines a proof theory for non-derivability in intuitionistic logic.

    Google Scholar 

  20. Jaffar, J., & Lassez, J. -L. (1987). Constraint logic programming. In Proceedings of the 14th symposium on principles of programming languages – POPL’87, Munich (pp. 111–119). Footnote

    This is the original paper on constraint logic programming, a paradigm that seamlessly incorporates constraints over generic domains within logic programming in the style of Prolog. The result is a family of languages, one for each specific domain and accompanying constraint-solving procedures, that retain the declarative nature of logic for programming purposes, but specializes it to domains of interest in a natural way.

    Google Scholar 

  21. Jaffar, J., & Maher, M. J. (1994). Constraint logic programming: A survey. Journal of Logic Programming, 19/20, 503–581. Footnote

    This paper surveys the foundations, applications and developments of constraint logic programming since its inception in [JL87].

    Google Scholar 

  22. Kanellakis, P., Kuper, G., & Revesz, P. (1995). Constraint query languages. Journal of Computer and System Sciences, 51(1), 26–52. Footnote

    This paper proposes an approach to representing and retrieving data in a database that stores information not as facts (or tuples), but as a conjunction of simple constraints over a given domain. This is especially useful for applications, such as geographic databases, where objects of interest are naturally expressed as constraints, spatial constraints in this case.

    Google Scholar 

  23. Kuper, G., Libkin, L., & Paredaens, J. (Eds.). (2000). Constraint databases. Berlin/New York: Springer. Footnote

    This collection surveys the then-nascent field of constraint databases, with contributions by many of it pioneers. Constraint databases rely on constraints to describe some types of data, for example temporal or spatial data, and to draw inferences from them in an efficient way.

    Google Scholar 

  24. Kowalski, R. A. (1979). Logic for problem solving. Prentice Hall. Footnote

    This classic book investigates the application of logic to problem solving and computer programming using Prolog.

    Google Scholar 

  25. Kriwaczek, F. (1988). Logicalc: A Prolog spreadsheet. Machine intelligence, 11, 193–208. Footnote

    This work refines [Kri82] and implements its design as a system called LogiCalc. Its initial goal was to “reconstruct logically, in micro-Prolog, a typical spreadsheet program”. Besides capturing most of the functionalities of early spreadsheets, it provides powerful extensions such as relational manipulations, integrity constraints, bidirectional variables, symbolic reasoning, and complex objects (e.g., lists, graphics and spreadsheets themselves). It is based on the limited teletype interface that predated the widespread availability of graphical user interfaces with windows. LogiCalc relies a lot on user input, even for non-essential tasks.

    Google Scholar 

  26. Lam, E. S. L., & Cervesato, I. (2012). Modeling datalog fact assertion and retraction in linear logic. In A. King (Ed.), Proceedings of the 14th international ACM symposium on principles and practice of declarative programming – PPDP’12, Leuven. Footnote

    This paper models the propagation of the assertion of new facts or the retraction of old facts in the Datalog system by means of inference in linear logic. To this effect, it translates Datalog clauses into linear logic formulas that also contain specifications about how to propagate updates.

    Google Scholar 

  27. Lloyd, J. W. (1987). Foundations of logic programming (2nd extended ed.). Berlin/New York: Springer. Footnote

    This is the classical textbook on the theory of logic programming: it collects and unifies results on SLD-resolution, unification, model and fixpoint semantics, negation-as-failure, that had appeared in separate papers. It does not consider any of the recent proof-theoretic developments, but it is a valuable reference. As such, it has been used by generations of students and scholars of logic programming.

    Google Scholar 

  28. Li, N., & Mitchell, J. C. (2003). Datalog with constraints: A foundation for trust management languages. In Proceedings of the fifth international symposium on practical aspects of declarative languages (PADL’03), New Orleans. Footnote

    This paper shows how Datalog can fruitfully be used to specify access control and trust management policies in order to decide authorization and access in a distributed system of computers. To this effect, it extends Datalog with constraints over signed messages. The paper explores the theoretical properties of the resulting language and relates it to other authorization and trust management languages.

    Google Scholar 

  29. Lovas, W., & Pfenning, F. (2009). Refinement types as proof irrelevance. In P. -L. Curien (Ed.), Proceedings of the 9th international conference on typed lambda calculi and applications – TLCA’09, Brasilia (Lecture notes in computer science, Vol. 5608, pp. 157–171). Springer. Footnote

    This paper examines proof irrelevance, a mechanism for selectively hiding the identities of terms in type theories, and relates it to refinement types, a powerful approach to classify terms.

    Google Scholar 

  30. Liu, Y., & Stoller, S. (2009). From datalog rules to efficient programs with time and space guarantees. ACM Transactions on Programming Languages and Systems – TOPLAS, 31(6), 1–38. Footnote

    This paper describes a method for transforming a Datalog program into an efficient specialized implementation with guaranteed worst-case time and space complexities. The transformation exploits fixed-point computation, incremental maintenance of invariants, and combinations of indexed and linked data structures.

    Google Scholar 

  31. McAllester, D. (2002). On the complexity analysis of static analyses. Journal of the ACM, 49, 512–537. Footnote

    This paper describes a method for computing run-time complexity bounds for Datalog programs. More generally, it shows that specifying an algorithm using Datalog is beneficial for reasoning about its complexity.

    Google Scholar 

  32. Mendelson, E. (1997). Introduction to mathematical logic (4th ed.). Princeton: Van Nostrand-Reinhold. Footnote

    This is another good textbook on mathematical logic. It is notable for its breadth of topics.

    Google Scholar 

  33. Miller, D. (1989). A logical analysis of modules in logic programming. Journal of Logic Programming, 6(1–2), 79–108. Footnote

    This paper explores the theory and application of a general language of Horn clauses augmented with embedded implication and quantification (hereditary Harrop formulas), which goes well beyond Datalog. It studies its proof theory, model theory and fixpoint semantics in an intuitionistic setting. It shows how embedded clauses provide a foundational justification for parametric modules in logic programming.

    Google Scholar 

  34. Minker, J. (Ed.). (1987). Foundations of deductive databases and logic programming. Los Altos: Morgan Kaufmann. Footnote

    This book collects original articles by the main players of the then-nascent and very fertile field of deductive databases. It grew out of a workshop by the same title held in Washington, DC the year before.

    Google Scholar 

  35. Miller, D., Nadathur, G., Pfenning, F., & Scedrov, A. (1991). Uniform proofs as a foundation for logic programming. Annals of Pure and Applied Logic, 51, 125–157. Footnote

    This now classic paper was the first to establish top-down logic programming on solid proof-theoretic grounds. The methodology it embraced, based on the notion of uniform proofs, identified fragments of logic larger than Prolog’s Horn clauses that could be used for programming. Specifically, it shows that hereditary Harrop formulas, which extend Horn clauses with embedded implication, fit into this pattern, and so do higher-order variants of both languages.

    Google Scholar 

  36. Nigam, V., Jia, L., Loo, B. T., & Scedrov, A. (2011). Maintaining distributed logic programs incrementally. In Proceedings of the 13th international ACM symposium on principles and practice of declarative programming – PPDP’11, Odense (pp. 125–136). ACM. Footnote

    This paper explores an efficient asynchronous algorithm to incrementally compute the changes to the states of a distributed Datalog system, as proposed in some network protocols and multi-agent systems, in response to the insertions and deletions of base facts.

    Google Scholar 

  37. O’Keefe, R. A. (1990). The craft of Prolog. Cambridge: MIT. Footnote

    This classic textbook focuses on advanced programming techniques in Prolog as well as on universal programming notions such as elegance and understanding a problem before starting to write code. It is best read after [CM87] or [SS94].

    Google Scholar 

  38. Pfenning, F. (1989). Elf: A language for logic definition and verified meta-programming. In Fourth annual symposium on logic in computer science, Pacific Grove (pp. 313–322). IEEE Computer Society Press. Footnote

    This paper describes the Elf system, which provides a type-checker, type-reconstruction support, and top-down execution in the style of Prolog to the LF type theory.

    Google Scholar 

  39. Pfenning, F. (Ed.). (1992). Types in logic programming. Cambridge: MIT. Footnote

    This volume brings together the principal approaches to weaving types in logic programming. Essays within describe specific techniques but also emphasize the overall benefits of types, including reduced error rates, support for modularity, and compilation assistance.

    Google Scholar 

  40. Przymusinski, T. C. (1987). On the declarative semantics of stratified deductive databases and logic programs. In J. Minker (Ed.), Foundations of deductive databases and logic programming [Min87] (pp. 193–216). Los Altos: Morgan Kaufmann. Footnote

    This is the original paper on local stratification.

    Google Scholar 

  41. Pfenning, F., & Schürmann, C. (1999). System description: Twelf – A meta-logical framework for deductive systems. In Proceedings of the 16th international conference on automated deduction – CADE-16, Trento (Lecture notes in artificial intelligence, Vol. 1632, pp. 202–206). Springer. Footnote

    This paper describes Twelf, a reimplementation of the Elf system [Pfe89] extended with theorem-proving capabilities for specifications written in the LF type theory.

    Google Scholar 

  42. Robinson, J. A. (1965). A machine-oriented logic based on the resolution principle. Journal of the ACM, 12(1), 23–41. Footnote

    This classic paper sets the foundations of theorem proving and introduces the resolution principle, which is one of the tenets of top-down evaluation in logic programming.

    Google Scholar 

  43. Ramakrishnan, R., Srivastava, D., & Sudarshan, S. (1992). Efficient bottom-up evaluation of logic programs. In P. Dewilde & J. Vandewalle (Eds.), The state of the art in computer systems and software engineering. Kluwer Academic. Footnote

    This paper reviews the state of the art of bottom-up evaluation and proposes a transformation on Datalog programs to speed up that semi-naïve evaluation. It also discusses extensions to negation, set terms, constraints and quantitative reasoning. Comparisons with numerous systems are included.

    Google Scholar 

  44. Sarnat, J. (2010). Syntactic finitism in the metatheory of programming languages. PhD thesis, Department of Computer Science, Yale University. Footnote

    This thesis examines in great detail, among other things, mode-checking and termination in the Twelf system, which embeds a higher-order logic programming language with a top-down execution semantics.

    Google Scholar 

  45. Spenke, M., & Beilken, C. (1989). A spreadsheet interface for logic programming. In CHI’89: Proceedings of the SIGCHI conference on human factors in computing systems, Austin (pp. 75–80). ACM. Footnote

    This work proposes to combine logic programming and spreadsheets under the umbrella of the PERPLEX system. It does so by making heavy use of integrity constraints in a way that is clearly expressive, but likely to be unnatural for an entry-level user. PERPLEX supports exploratory programming and the paradigm of “query-by-example” to perform many programming tasks. While very powerful, it is not clear that this blends smoothly in the spreadsheet mindset. This is the first logical spreadsheet extension to make use of graphical input and not just output.

    Google Scholar 

  46. Smith, D. E., Genesereth, M. R., & Ginsberg, M. L. (1986). Controlling recursive inference. Artificial Intelligence, 30(3), 343–389. Footnote

    This paper studies in great detail to what depth it is sufficient to expand a derivation tree for a top-down evaluation of a logic program. It also leverages properties such as transitivity and subsumption, as well as characteristics of the domain to extend the class of prunable programs.

    Google Scholar 

  47. Sterling, L., & Shapiro, E. (1994). The art of Prolog (2nd ed.). Cambridge: MIT. Footnote

    This is another classic introductory textbook on programming in Prolog that has been used by generations of students.

    Google Scholar 

  48. Troelstra, A. S., & van Dalen, D. (Eds.). (1988). Constructivism in mathematics: An introduction. Amsterdam/New York: North-Holland. Footnote

    This two-volume set is a now classic reference to constructive logic and its applications in a variety of fields. It covers intuitionistic logic both at an introductory level and in exhaustive depth.

    Google Scholar 

  49. Warren, D. S. (1998). Programming with tabling in XSB. In D. Gries & W. P. de Roever (Eds.), Programming concepts and methods, IFIP TC2/WG2.2,2.3 international conference on programming concepts and methods (PROCOMET’98): Vol. 125 of IFIP conference proceedings, Shelter Island (pp. 5–6). Chapman & Hall. Footnote

    XSB is Prolog with a form of memoization called tabling. Declaratively, it does not differ substantially from Prolog. Procedurally, however, it substantially improves on the standard top-down SLDNF resolution strategy of this language by nearly eradicating control-induced infinite loops. In particular, an XSB query always terminates against a Datalog program. Tabling can also have a positive effect on efficiency, although this may depend on how the user writes his programs. This makes XSB a promising candidate as the underlying explanation engine of a deductive spreadsheet.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Cervesato, I. (2013). The Deductive Spreadsheet. In: The Deductive Spreadsheet. Cognitive Technologies. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-37747-1_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-37747-1_6

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-37746-4

  • Online ISBN: 978-3-642-37747-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics