Browsing by Author "Fagan, Mike"
Now showing 1 - 7 of 7
Results Per Page
Sort Options
Item Automatic Differentiation of Polymorphic Fortran 77 Programs Using Adifor 3.0(2003-11) Fagan, Mike; Rankin, C.Adifor 3.0 is a source-to-source transformation tool used to augment programs that compute derivatives. As part of the transformation process, Adifor analyzes certain aspects of program behaviour. Furthermore, that analysis depends on the original program being type correct. Since standard Fortran is officially monomorphic, the assumption of type correctness is not normally a difficult constraint to satisfy. There is a classof (non-standard) Fortran programs, however, that take advantage of the pass-by-reference semantics to be, in effect, polymorphic. This report details some techniques for differentiating these polymorphic programs using monomorphic Adifor 3.0. In particular, we report on our efforts to compute derivatives for the structural analysis code STAGS.Item Derivatives By-Address for Fortran 77(2006-12) Fagan, MikeFIXME. Automatic differentiation tools use 1 of 2 strategies to access derivative values. These strategies are: By-address, By-name. The by-address method is typically implemented by introducing structured types for each active scalar type. For example, scalar type 'real' will have an associated structure type 'active-real'. Using this strategy, all active variables types are changed to the associated structured type. On the other hand, the by-name method introduces an associated new variable for each active variable. For example, the derivatives associated with 'pressure' would be 'd_pressure'. Since the by-address strategy employs structured types, AD tools for Fortran 77 have not employed that strategy. In this paper, we show how to use array access to implement the by-address strategy for Fortran 77. We discuss the canonicalization issues, outline our Adifor3.0 implementation of this technique, and give a few sample performanceItem Design and Implementation of whirl2xaif and xaif2whirl(2003-11) Tallent, Nathan; Fagan, MikeIn order to connect the Open64 Fortran front end to the xaifbooster differentiation engine, we needed to develop bridging tools to translate between Open64 intermediate representation language whirl and xaifbooster intermediate representation XAIF. This report describes the design and implementation of these translation tools: whirl2xaif and xaif2whirl.Item Porting Open64 to the Cygwin Environment(2003-11) Tallent, Nathan; Fagan, MikeCygwin is a Linux-like environment for Windows. It is sufficiently complete and stable that porting even very large codes to the environment is relatively straightforward. Cygwin is easy enough to download and install that it provides a convenient platform for traveling with code and giving conference demonstrations (via laptop) -- even potentially expanding a code's audience and user base (via desktop). However, for various reasons, Cygwin is not 100% compatible with Linux. We describe the major problems we encountered porting Rice University's Open64/SL code base to Cygwin and present our solutions.Item Soft Typing: An Approach to Type Checking for Dynamically Typed Languages(1992-08) Fagan, MikeIn an effort to avoid improper use of program functions, modern programming languages employ some kind of preventative type system. These type systems can be classified as either static or dynamic. Static type systems detect "ill-typed" program phrases at compile-time, whereas dynamic type systems detect "ill-typed" phrases at run-time. Static typing systems have two important advantages over dynamically typed systems: First, they provide important feedback to the programmer by detecting a large class of program errors before execution. Second. they extract information that a compiler can exploit to produce more efficient code. The price paid for these advantages, however, is a loss of expressiveness and modularity. It is easy to prove that a static type system for an "interesting" programming language necessarily excludes some "good" programs. This paper focuses on the problem of designing programming systems that retain all the expressiveness of dynamic typing, but still offer the early error detection and improved optimization opportunities of static typing. To that end, we introduce a concept called soft typing. The key concept of soft typing is that a type checker need not reject programs containing statically "ill-typed" phrases. Instead, the soft type checker inserts explicit run-time checks. Thus, there are two issues to be addressed in the design of soft typing systems. First, the typing mechanism must provide reasonable feedback to programmers accustomed to dynamically typed languages. Current static systems fail to satisfy the programmer's intuition about correctness on many programs. Second, a soft typing system must sensibly insert run-time checks (when necessary). This paper develops a type system and checking algorithms that are suitable for soft typing a significant class of programming languages.Item Soft typing: An approach to type checking for dynamically typed languages(1991) Fagan, Mike; Cartwright, Robert S.In an effort to avoid improper use of program functions, modern programming languages employ some kind of preventative type system. These type systems can be classified as either static or dynamic. Static type systems detect "ill-typed" program phrases at compile-time, whereas dynamic type systems detect "ill-typed" phrases at run-time. Static typing systems have two important advantages over dynamically typed systems: First, they provide important feedback to the programmer by detecting a large class of program errors before execution. Second, they extract information that a compiler can exploit to produce more efficient code. The price paid for these advantages, however, is a loss of expressiveness and modularity. It is easy to prove that a static type system for an "interesting" programming language necessarily excludes some "good" programs. This paper focuses on the problem of designing programming systems that retain the all the expressiveness of dynamic typing, but still offer the early error detection and improved optimization opportunities of static typing. To that end, we introduce a concept called soft typing. The key concept of soft typing is that a type checker need not reject programs containing statically "ill-typed" phrases. Instead, the soft type checker inserts explicit run-time checks. Thus, there are two issues to be addressed in the design of soft typing systems. First, the typing mechanism must provide reasonable feedback to programmers accustomed to dynamically typed-languages. Current static systems fail to satisfy the programmer's intuition about correctness on many programs. Second, a soft typing system must sensibly insert run-time checks (when necessary). This paper develops a type system and checking algorithms that are suitable for soft typing a significant class of programming languages.Item Verifying A Runge-Kutta Solver Using ADOL-C(2003-11) Edwards, Chantal; Fagan, MikeThis report describes our effort to verify differential equation solvers using automatic differentiation (AD). In particular, the report describes the AD verification technique in general, as well as the application of the technique to a 4th order Runge-Kutta solver using the ADOL-C tool.