Skip to main content

Design and Implementation of a Context-Sensitive, Flow-Sensitive Activity Analysis Algorithm for Automatic Differentiation

  • Conference paper
Book cover Advances in Automatic Differentiation

Summary

Automatic differentiation (AD) has been expanding its role in scientific computing. While several AD tools have been actively developed and used, a wide range of problems remain to be solved. Activity analysis allows AD tools to generate derivative code for fewer variables, leading to a faster run time of the output code. This paper describes a new contextsensitive, flow-sensitive (CSFS) activity analysis, which is developed by extending an existing context-sensitive, flow-insensitive (CSFI) activity analysis. Our experiments with eight benchmarks show that the new CSFS activity analysis is more than 27 times slower but reduces 8 overestimations for the MIT General Circulation Model (MITgcm) and 1 for an ODE solver (c2) compared with the existing CSFI activity analysis implementation. Although the number of reduced overestimations looks small, the additionally identified passive variables may significantly reduce tedious human effort in maintaining a large code base such as MITgcm.

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 139.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 179.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. Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools. Addison-Wesley (1986)

    Google Scholar 

  2. Bischof, C., Carle, A., Khademi, P., Mauer, A.: ADIFOR 2.0: Automatic differentiation of Fortran 77 programs. IEEE Computational Science & Engineering 3(3), 18–32 (1996)

    Article  Google Scholar 

  3. Cormen, T., Leiserson, C., Rivest, R.: Introduction to Algorithms, 2nd edn. McGraw Hill (1990)

    Google Scholar 

  4. Fagan, M., Carle, A.: Activity analysis in ADIFOR: Algorithms and effectiveness. Technical Report TR04-21, Department of Computational and Applied Mathematics, Rice University, Houston, TX (2004)

    Google Scholar 

  5. Fagan, M., Hascoët, L., Utke, J.: Data representation alternatives in semantically augmented numerical models. In: Proceedings of the Sixth IEEE International Workshop on Source Code Analysis and Manipulation (SCAM 2006), pp. 85–94. IEEE Computer Society, Los Alamitos, CA (2006)

    Chapter  Google Scholar 

  6. Griewank. A. Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation.No. 19 in Frontiers in Appl. Math. SIAM, Philadelphia, PA (2000)

    Google Scholar 

  7. Hascoët, L., Naumann, U., Pascual, V.: “To be recorded” analysis in reverse-mode automatic differentiation. Future Generation Computer Systems 21(8), 1401–1417 (2005)

    Article  Google Scholar 

  8. Kreaseck, B., Ramos, L., Easterday, S., Strout, M., Hovland, P.: Hybrid static/dynamic activity analysis. In: Proceedings of the 3rd International Workshop on Automatic Differentiation Tools and Applications (ADTA’04). Reading, England (2006)

    Google Scholar 

  9. Lakhotia, A.: Rule-based approach to computing module cohesion. In: Proceedings of the 15th International Conference on Software Engineering, pp. 35–44. Baltimore, MD (1993)

    Google Scholar 

  10. Reps, T., Rosay, G.: Precise interprocedural chopping. In: Proceedings of the 3rd ACM SIGSOFT Symposium on Foundations of Software Engineering, pp. 41–52 (1995)

    Google Scholar 

  11. Shin, J., Hovland, P.D.: Comparison of two activity analyses for automatic differentiation: Context-sensitive flow-insensitive vs. context-insensitive flow-sensitive. In: ACM Symposium on Applied Computing, pp. 1323–1329. Seoul, Korea (2007)

    Google Scholar 

  12. Strout, M.M., Mellor-Crummey, J., Hovland, P.D.: Representation-independent program analysis. In: Proceedings of The Sixth ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering (2005)

    Google Scholar 

  13. Utke, J.: Open AD: Algorithm implementation user guide. Technical Memorandum ANL/MCS–TM–274, Mathematics and Computer Science Division, Argonne National Laboratory, Argonne, IL (2004). http://info.mcs.anl.gov/pub/tech_reports/reports/ TM-274.pdf

  14. Weiser, M.: Program slicing. In: Proceedings of the 5th International Conference on Software Engineering, pp. 439–449 (1981)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Shin, J., Malusare, P., Hovland, P.D. (2008). Design and Implementation of a Context-Sensitive, Flow-Sensitive Activity Analysis Algorithm for Automatic Differentiation. In: Bischof, C.H., Bücker, H.M., Hovland, P., Naumann, U., Utke, J. (eds) Advances in Automatic Differentiation. Lecture Notes in Computational Science and Engineering, vol 64. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-68942-3_11

Download citation

Publish with us

Policies and ethics