Most real-world programs must produce output. If a deductive database is used to implement database application programs, it should be possible to specify the output declaratively. There is no generally accepted, completely satisfying solution for this. In this paper we propose to specify an output document by defining the position of text pieces (building blocks of the document). These text pieces are then ordered by their position and concatenated. This way of specifying output fits well to the bottom-up way of thinking about rules (from right to left) which is common in deductive databases. Of course, when evaluating such programs, one wants to avoid sorting operations as far as possible. We show how rules involving ordering can be efficiently implemented.
@InProceedings{brass:LIPIcs.ICLP.2011.151, author = {Brass, Stefan}, title = {{Declarative Output by Ordering Text Pieces}}, booktitle = {Technical Communications of the 27th International Conference on Logic Programming (ICLP'11)}, pages = {151--161}, series = {Leibniz International Proceedings in Informatics (LIPIcs)}, ISBN = {978-3-939897-31-6}, ISSN = {1868-8969}, year = {2011}, volume = {11}, editor = {Gallagher, John P. and Gelfond, Michael}, publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik}, address = {Dagstuhl, Germany}, URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ICLP.2011.151}, URN = {urn:nbn:de:0030-drops-31770}, doi = {10.4230/LIPIcs.ICLP.2011.151}, annote = {Keywords: Deductive Databases, Logic Programming, Declarative Output, Bottom-Up Evaluation, Order, Sorting, Implementation} }
Feedback for Dagstuhl Publishing