Advertisement

Type-Based XML Processing in Logic Programming

  • Jorge Coelho
  • Mário Florido
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2562)

Abstract

In this paper we propose a type-based framework for using logic programming for XML processing. We transform XML documents into terms and DTDs into regular types. We implemented a standard type inference algorithm for logic programs and use the types corresponding to the DTDs as additional type declarations for logic programs for XML processing. Due to the correctness of the type inference this makes it possible to use logic programs as an implicitly typed processing language for XML with static type (in this case DTDs) validation. As far as we know this is the first work adding type validation at compile time to the use of logic programming for XML processing.

Keywords

Logic Program Logic Programming Type Rule Type Inference Type Check 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Noga Alon, Tova Milo, Frank Neven, Dan Suciu, and Victor Vianu. XML with data values: Typechecking revisited. In PODS, 2001.Google Scholar
  2. 2.
    H. Boley. Relationships between logic programming and XML. In Proc. 14th Workshop Logische Programmierung, 2000.Google Scholar
  3. 3.
    Fran ois Bry and Norbert Eisinger. Data modeling with markup languages: A logic programming perspective. In 15th Workshop on Logic Programming and Constraint Systems, WLP 2000, Berlin, 2000.Google Scholar
  4. 4.
    Fran ois Bry and Sebastian Schaffert. Towards a declarative query and transformation language for XML and semistructured data: simulation unification. In Proc. of the 2002 International Conference on Logic Programming, 2002.Google Scholar
  5. 5.
    D. Cabeza and M. Hermenegildo. Distributed WWW Programming using Ciao-Prolog and the PiLLoW Library. Theory and Practice of Logic Programming, 1(3):251–282, May 2001.CrossRefGoogle Scholar
  6. 6.
    P. Dart and J. Zobel. A regular type language for logic programs. In Frank Pfenning, editor, Types in Logic Programming. The MIT Press, 1992.Google Scholar
  7. 7.
    M. Florido and L. Damas. Types as theories. In Proc. of post-conference workshop on Proofs and Types, Joint International Conference and Symposium on Logic Programming, 1992.Google Scholar
  8. 8.
    J.P. Gallagher and D.A. de Waal. Fast and precise regular approximation of logic programs. In Proceedings of the Eleventh International Conference on Logic Programming, 1993.Google Scholar
  9. 9.
    Haruo Hosoya and Benjamin Pierce. Xduce: A typed XML processing language. In Third International Workshop on the Web and Databases (WebDB2000), volume 1997 of Lecture Notes in Computer Science, 2000.Google Scholar
  10. 10.
    J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, {esecond edition}, 1987.Google Scholar
  11. 11.
    Lunjin Lu. On Dart-Zobel algorithm for testing regular type inclusion. In SIGPLAN Notices Volume 36, 2001.Google Scholar
  12. 12.
    T. Milo, D. Suciu, and V. Vianu. Typechecking for XML transformers. In ACM Symposium on Principles of Database Systems, 2000.Google Scholar
  13. 13.
    P. Mishra. Towards a theory of types in Prolog. In Proc. of the 1984 International Symposium on Logic Programming, 1984.Google Scholar
  14. 16.
    Leon Sterling and Ehud Shapiro. The Art of Prolog, 2nd edition. The MIT Press, 1994.Google Scholar
  15. 17.
    Dan Suciu. Typechecking for semistructured data. In International Workshop on Database Programming, 2001.Google Scholar
  16. 18.
    J.W. Thatcher. Tree automata: An informal survey. Prentice-Hall, 1973.Google Scholar
  17. 20.
    Malcom Wallace and Colin Runciman. Haskell and XML: Generic combinators or type-based translation? In International Conference on Functional Programming, 1999.Google Scholar
  18. 23.
    E. Yardeni and E. Shapiro. A type system for logic programs. In The Journal of Logic Programming, 1990.Google Scholar
  19. 24.
    Justin Zobel. Derivation of polymorphic types for prolog programs. In Proc. of the 1987 International Conference on Logic Programming, pages 817–838, 1987.Google Scholar
  20. 25.
    Justin Zobel. Analysis of Logic Programs. PhD thesis, Department of Computer Science, University of Melbourne, 1990.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Jorge Coelho
    • 1
  • Mário Florido
    • 2
  1. 1.Instituto Superior de Engenharia do PortoPortoPortugal
  2. 2.DCC-FC & LIACCUniversity of PortoPortoPortugal

Personalised recommendations