Skip to main content

Useless-Code Detection and Elimination for PCF with Algebraic Data Types

  • Conference paper
  • First Online:
Typed Lambda Calculi and Applications (TLCA 1999)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1581))

Included in the following conference series:

Abstract

We present a non-standard type assignment system and simplifications mappings for detecting and removing useless-code in simply typed functional programs with algebraic datatypes and recursive functions. We characterize two classes of useless-code: the dead-code, that is code that is never executed under the lazy-call-by-name evaluation, and the minimum-information-code, that is code that contributes to the computation only with a minimum amount of constant information.

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. S. Berardi. Pruning Simply Typed Lambda Terms. Journal of Logic and Computation, 6(5):663–681, 1996.

    Article  MATH  MathSciNet  Google Scholar 

  2. S. Berardi and L. Boerio. Using Subtyping in Program Optimization. In TLCA’95, LNCS 902. Springer9Verlag, 1995.

    Google Scholar 

  3. S. Berardi and L. Boerio. Minimum Information Code in a Pure Functional Language with Data Types. In TLCA’97, LNCS 1210. Springer-Verlag, 1997. 83, 83, 84, 96, 96, 96, 96, 96, 97

    Google Scholar 

  4. S. K. Biswas. A Demand-Driven Set-Based Analysis. In POPL’97, pages 372–385. ACM, 1997.

    Google Scholar 

  5. L. Boerio. Optimizing Programs Extracted from Proofs. PhD thesis, Università di Torino, 1995.

    Google Scholar 

  6. M. Coppo, F. Damiani, and P. Giannini. Refinement Types for Program Analysis. In SAS’96, LNCS 1145, pages 143–158. Springer-Verlag, 1996.

    Google Scholar 

  7. F. Damiani. Non-standard type inference for functional programs. PhD thesis, Università di Torino, February 1998.

    Google Scholar 

  8. F. Damiani and F. Prost. Detecting and Removing Dead Code using Rank 2 Intersection. In TYPES’96, LNCS 1512. Springer-Verlag, 1998.

    Google Scholar 

  9. B. Barras et al. The Coq Proof Assistant Reference Manual Version 6.2. INRIA-Rocquencourt-CNRS-ENS Lyon, may 1998.

    Google Scholar 

  10. A. D. Gordon. Bisimilarity as a Theory of Functional Programs. Mini-Course. Technical Report NS-95-3 BRICS Notes Series, Computer Science Department of Aarhus University, 1995.

    Google Scholar 

  11. G. Kahn. Natural semantics. In K. Fuchi and M. Nivat, editors, Programming Of Future Generation Computer. Elsevier Sciences B.V. (North-Holland), 1988.

    Google Scholar 

  12. C. Paulin-Mohring. Extracting Fω’s Programs from Proofs in the Calculus of Constructions. In POPL’89. ACM, 1989.

    Google Scholar 

  13. A. M. Pitts. Operationally-based theories of program equivalence. In A. M. Pitts and P. Dybjer, editors, Semantics and Logics of Computation, pages 241–298. Cambridge University Press, 1997.

    Google Scholar 

  14. G. D. Plotkin. LCF considered as a programming language. Theoretical Computer Science, 5(3):223–255, 1977.

    Article  MathSciNet  Google Scholar 

  15. G. D. Plotkin. A structural approach to operational semantics. Technical Report DAIMI FN-19, Aarhus University, 1981.

    Google Scholar 

  16. Y. Takayama. Extraction of Redundancy-free Programs from Constructive Natural Deduction Proofs. Journal of Symbolic Computation, 12:29–69, 1991.

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Damiani, F. (1999). Useless-Code Detection and Elimination for PCF with Algebraic Data Types. In: Girard, JY. (eds) Typed Lambda Calculi and Applications. TLCA 1999. Lecture Notes in Computer Science, vol 1581. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48959-2_8

Download citation

  • DOI: https://doi.org/10.1007/3-540-48959-2_8

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-65763-7

  • Online ISBN: 978-3-540-48959-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics