Advertisement

Modes of comprehension: Mode analysis of arrays and array comprehensions

  • B. C. Massey
  • E. Tick
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 982)

Abstract

A scheme is presented to enable the mode analysis of concurrent logic programs manipulating arrays containing both ground and non-ground elements. To do this we leverage constraint-propagation mode analysis techniques. The key ideas are to restrict multiple assignments only to variables at the leaves of paths, and to extend the language family with array comprehensions. The result is a language not significantly different than generic committed-choice languages, which can be safely mode analyzed, producing useful (not overly conservative) information, even for programs that assign to unbound array elements. An implementation of the analysis is presented.

Keywords

Mode Analysis Logic Program Array Element Mode Information Functional Language 
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.
    M. Bruynooghe and G. Janssens. An Instance of Abstract Interpretation Integrating Type and Mode Inference. In International Conference and Symposium on Logic Programming, pages 669–683. University of Washington, MIT Press, August 1988. Extended version in Journal of Logic Programming, 1994.Google Scholar
  2. 2.
    S. K. Debray. Static Inference of Modes and Data Dependencies in Logic Programs. ACM Transactions on Programming Languages and Systems, 11(3):418–450, July 1989.Google Scholar
  3. 3.
    S. K. Debray and D. S. Warren. Automatic Mode Inference for Prolog Programs. Journal of Logic Programming, 5(3):207–229, September 1988.Google Scholar
  4. 4.
    P. Hudak, S. Peyton-Jones, and P. Wadler. Report on Programming Language Haskell: A Non-Strict, Purely Functional Language, Version 1.2. ACM SIGPLAN Notices, 27(5):1–164, May 1992.Google Scholar
  5. 5.
    A. King and P. Soper. Schedule Analysis of Concurrent Logic Programs. In Joint International Conference and Symposium on Logic Programming, pages 478–492. Washington D.C., MIT Press, November 1992.Google Scholar
  6. 6.
    M. Koshimura and R. Hasegawa. A Mode Analyzer for FGHC Programs in a Model Generation Theorem Prover. In Proceedings of the 47th Annual Convention IPS Japan, 1993. In Japanese.Google Scholar
  7. 7.
    J. Larson, B. Massey, and E. Tick. Super Monaco: Its Portable and Efficient Parallel Runtime System. In EURO-PAR, Stockholm, August 1995.Google Scholar
  8. 8.
    B. C. Massey and E. Tick. Sequentialization of Parallel Logic Programs with Mode Analysis. In International Conference on Logic Programming and Automated Reasoning, number 698 in Lecture Notes in Artificial Intelligence, pages 205–216, St. Petersburg, July 1993. Springer-Verlag.Google Scholar
  9. 9.
    B. C. Massey and E. Tick. Demand-Driven Execution of Concurrent Logic Programs. In International Conference on Parallel Architectures and Compilation Techniques, pages 215–224, Montreal, August 1994. North-Holland.Google Scholar
  10. 10.
    C. S. Mellish. Some Global Optimizations for a Prolog Compiler. Journal of Logic Programming, 2(1):43–66, April 1985.Google Scholar
  11. 11.
    R. S. Nikhil. Id (Version 90.0) Reference Manual. Technical Report CSG Memo 284-a, MIT Laboratory for Computer Science, 545 Technology Square, Cambridge, MA 02139, USA, July 1990.Google Scholar
  12. 12.
    A. V. S. Sastry, W. Clinger, and Z. Ariola. Order-of-Evaluation Analysis for Destructive Updates in Strict Functional Languages with Flat Aggregates. In Conference on Functional Programming Languages and Computer Architecture, pages 266–275. Copenhagen, ACM Press, June 1993.Google Scholar
  13. 13.
    R. Sundararajan. Data Flow and Control Flow Analysis of Logic Programs. PhD thesis, Department of Computer Science, University of Oregon, 1994. Also available as Technical Report CIS-TR-94-08.Google Scholar
  14. 14.
    E. Tick. Practical Static Mode Analyses of Concurrent Logic Languages. In International Conference on Parallel Architectures and Compilation Techniques, pages 205–214, Montreal, August 1994. North-Holland.Google Scholar
  15. 15.
    E. Tick and C. Banerjee. Performance Evaluation of Monaco Compiler and Runtime Kernel. In International Conference on Logic Programming, pages 757–773. Budapest, MIT Press, June 1993.Google Scholar
  16. 16.
    E. Tick and M. Koshimura. Static Mode Analyses of Concurrent Logic Languages. Journal of Programming Language Design and Implementation, 1995. Accepted. Also available as University of Oregon Technical Report CIS-TR-94-06.Google Scholar
  17. 17.
    E. Tick, B. C. Massey, F. Rakoczi, and P. Tulayathun. Concurrent Logic Programsa la Mode. In E. Tick and G. Succi, editors, Implementations of Logic Programming Systems, pages 239–244. Kluwer Academic Publishers, 1994.Google Scholar
  18. 18.
    K. Ueda. Report on the Optimization of Concurrent Logic Language Implementations, March 1994. In Japanese.Google Scholar
  19. 19.
    K. Ueda and M. Morita. Message-Oriented Parallel Implementation of Moded Flat GHC. In International Conference on Fifth Generation Computer Systems, pages 799–808, Tokyo, June 1992. ICOT.Google Scholar
  20. 20.
    K. Ueda and M. Morita. Moded Flat GHC and Its Message-Oriented Implementation Technique. New Generation Computing, 13(1):3–43, 1994.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1995

Authors and Affiliations

  • B. C. Massey
    • 1
  • E. Tick
    • 1
  1. 1.Dept. of Computer ScienceUniversity of OregonEugeneUSA

Personalised recommendations