Skip to main content

Non-discriminating Arguments and Their Uses

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5649))

Abstract

We present a technique for identifying predicate arguments that play no role in determining the control flow of a logic program with respect to goals satisfying given mode and sharing restrictions. We call such arguments non-discriminating arguments. We show that such arguments can be detected by an automatic analysis. Following this, we define a transformation procedure, called discriminator slicing, that removes the non-discriminating arguments, resulting in a program whose computation trees are isomorphic to those of the original program. Finally, we show how the results of the original program can be reconstructed from trace of the transformed program with the original arguments. Thus the overall result is a two-stage execution of a program, which can be applied usefully in several contexts; we describe a case study in optimising computations in the probabilistic logic program language PRISM, and discuss applications in tabling and partial evaluation. We also discuss briefly other possible ways of exploiting the non-discriminating arguments.

This work is supported by the project “Logic-statistic modelling and analysis of biological sequence data” funded by the NABIIT programme of the Danish Strategic Research Council.

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

Buying options

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 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

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Christiansen, H.: Efficient Viterbi for PRISM models with annotations (2009), Website with source code, http://www.ruc.dk/~henning/PRISMannotations

  2. Debray, S.K., López-García, P., Hermenegildo, M.V.: Non-failure analysis for logic programs. In: Naish, L. (ed.) Proceedings of the Fourteenth International Conference on Logic Programming, ICLP 1997, pp. 48–62. MIT Press, Cambridge (1997)

    Google Scholar 

  3. Gallagher, J.P., Lafave, L.: Regular approximation of computation paths in logic and functional languages. In: Danvy, O., Glück, R., Thiemann, P. (eds.) Dagstuhl Seminar 1996. LNCS, vol. 1110, pp. 115–136. Springer, Heidelberg (1996)

    Chapter  Google Scholar 

  4. Jacobs, D., Langen, A.: Accurate and efficient approximation of variable aliasing in logic programs. In: Lusk, E.L., Overbeek, R.A. (eds.) Logic Programming, Proceedings of the North American Conference 1989, NACLP 1989, pp. 154–165. MIT Press, Cambridge (1989)

    Google Scholar 

  5. Jhala, R., Majumdar, R.: Path slicing. In: Sarkar, V., Hall, M.W. (eds.) Proceedings of the ACM SIGPLAN 2005 Conference on Programming Language Design and Implementation. PLDI 2005, Chicago, IL, USA, June 12-15, pp. 38–47 (2005)

    Google Scholar 

  6. King, A., Martin, J.C.: Control generation by program transformation. Fundam. Inform. 69(1-2), 179–218 (2006)

    MathSciNet  MATH  Google Scholar 

  7. Leuschel, M.: Advanced logic program specialisation. In: Hatcliff, J., Mogensen, T.Æ., Thiemann, P. (eds.) DIKU 1998. LNCS, vol. 1706, pp. 271–292. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  8. Leuschel, M., Sørensen, M.H.: Redundant argument filtering of logic programs. In: Gallagher, J.P. (ed.) LOPSTR 1996. LNCS, vol. 1207, pp. 83–103. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  9. Leuschel, M., Vidal, G.: Forward slicing by conjunctive partial deduction and argument filtering. In: Sagiv, M. (ed.) ESOP 2005. LNCS, vol. 3444, pp. 61–76. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  10. Lloyd, J.: Foundations of Logic Programming, 2nd edn. Springer, Heidelberg (1987)

    Book  MATH  Google Scholar 

  11. López-García, P., Bueno, F., Hermenegildo, M.V.: Determinacy analysis for logic programs using mode and type information. In: Etalle, S. (ed.) LOPSTR 2004. LNCS, vol. 3573, pp. 19–35. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  12. Martens, B., Gallagher, J.P.: Ensuring global termination of partial deduction while allowing flexible polyvariance. In: Sterling, L. (ed.) Proc. International Conference on Logic Progrmaming (ICLP 1995), Tokyo, MIT Press, Cambridge (1995)

    Google Scholar 

  13. Muthukumar, K., Hermenegildo, M.: Determination of Variable Dependence Information at Compile-Time Through Abstract Interpretation. In: Lusk, E.L., Overbeek, R.A. (eds.) Logic Programming, Proceedings of the North American Conference 1989, NACLP 1989, October 1989, pp. 166–189. MIT Press, Cambridge (1989)

    Google Scholar 

  14. Rabiner, L.R.: A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE 77(2), 257–286 (1989)

    Article  Google Scholar 

  15. Ronsse, M., Bosschere, K.D., Christiaens, M., de Kergommeaux, J.C., Kranzlmüller, D.: Record/replay for nondeterministic program executions. Commun. ACM 46(9), 62–67 (2003)

    Article  Google Scholar 

  16. Sagonas, K.F., Warren, D.S.: A portable compiler for integrating HiLog into Prolog systems. In: Bruynooghe, M. (ed.) Logic Programming, Proceedings of the 1994 International Symposium, p. 682. MIT Press, Cambridge (1994)

    Google Scholar 

  17. Sato, T.: PRISM, Programming in Statistical Modeling (PRISM web site) (checked 2009), http://mi.cs.titech.ac.jp/prism/

  18. Sato, T., Kameya, Y.: Parameter learning of logic programs for symbolic-statistical modeling. Journal of Artificial Intelligence Research (JAIR) 15, 391–454 (2001)

    MathSciNet  MATH  Google Scholar 

  19. Søndergaard, H.: An application of abstract interpretation of logic programs: Occur check reduction. In: Robinet, B., Wilhelm, R. (eds.) ESOP 1986. LNCS, vol. 213, pp. 327–338. Springer, Heidelberg (1986)

    Chapter  Google Scholar 

  20. Stärk, R.F.: A direct proof for the completeness of SLD-resolution. In: Börger, E., Büning, H.K., Richter, M.M. (eds.) CSL 1989. LNCS, vol. 440, pp. 382–383. Springer, Heidelberg (1990)

    Chapter  Google Scholar 

  21. Tarjan, R.E.: Depth-first search and linear graph algorithms. SIAM Journal of Computing 1(2), 146–160 (1972)

    Article  MathSciNet  MATH  Google Scholar 

  22. Tip, F.: A survey of program slicing techniques. J. Prog. Lang. 3(3) (1995)

    Google Scholar 

  23. Vanhoof, W.: Searching semantically equivalent code fragments in logic programs. In: Etalle, S. (ed.) LOPSTR 2004. LNCS, vol. 3573, pp. 1–18. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  24. Weiser, M.: Program slicing. IEEE Trans. Software Eng. 10(4), 352–357 (1984)

    Article  MATH  Google Scholar 

  25. Zhou, N.-F.: B-Prolog web site (1994–2009), http://www.probp.com/

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Christiansen, H., Gallagher, J.P. (2009). Non-discriminating Arguments and Their Uses. In: Hill, P.M., Warren, D.S. (eds) Logic Programming. ICLP 2009. Lecture Notes in Computer Science, vol 5649. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-02846-5_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-02846-5_10

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-02845-8

  • Online ISBN: 978-3-642-02846-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics