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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools. Addison-Wesley (1986)
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)
Cormen, T., Leiserson, C., Rivest, R.: Introduction to Algorithms, 2nd edn. McGraw Hill (1990)
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)
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)
Griewank. A. Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation.No. 19 in Frontiers in Appl. Math. SIAM, Philadelphia, PA (2000)
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)
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)
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)
Reps, T., Rosay, G.: Precise interprocedural chopping. In: Proceedings of the 3rd ACM SIGSOFT Symposium on Foundations of Software Engineering, pp. 41–52 (1995)
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)
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)
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
Weiser, M.: Program slicing. In: Proceedings of the 5th International Conference on Software Engineering, pp. 439–449 (1981)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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
DOI: https://doi.org/10.1007/978-3-540-68942-3_11
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-68935-5
Online ISBN: 978-3-540-68942-3
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)