No abstract
During the 80's and early 90's, high-level programming languages supported two different type-checking philosophies: static typing, and dynamic typing. Statically typed programming languages ensured that all programs conformed to a set of typing rules, which implied that programs could not "go wrong". Non-conforming programs were rejected. Dynamically typed programming languages, in contrast, did not reject programs, but rather checked for "type errors" during program execution. ML and Scheme were the prototypical respresentatives of the static and dynamic approachs to typing.Each typing philosophy had distinct advantages and disadvantages. Static typing does not require as much run-time type checking, and the detection of non-conformance supplies programmers with potentially valuable debugging information. The disadvantage of static typing, however, is that are some well-written, meaningful programs that never generate type errors at run time but do not conform to a given system of static typing rules. Semantic typecorrectness is undecidable. As a result, a programmer must rewrite such a program to conform to the type rules.In contrast, dynamic typing permits all programs to be executed, but fails to detect obvious type errors at compile time. Dynamic typing is more flexible at the cost of failing to detect type errors statically.Soft typing seeks to combine the advantages of static typing with the flexibility of dynamic typing. In other words, it provides the expressiveness of a dynamically typed language but it detects and flags potential type errors statically.In our paper, we focused on a core functional language similar to the functional core of both ML and Scheme, presuming that the non-functional features could be handled by extensions to our type system similar to those used in ML. Our key observation was that a type inference engine could be used to insert dynamic run-time checks where needed and inform a programmer that such checks were necessary. The inference engine, however, did not reject programs.At this stage, we noted that the standard ML Hindley-Milner type inference algorithm could be used as a soft type engine for a Scheme-like functional language. After trying the idea on some typical example programs, however, we noted that many typical Scheme programs would need unnecessary run-time checks. The troublesome programs we considered used union types and recursive types. Consequently, we next investigated ways to include true 20 union types (not discriminated union types as in ML) and recursive types in our soft typing system.The second phase of our soft typing research concerned our effort to add union types and recursive types to a Hindley-Milner type inference engine. Recursive types could be added by using circular unification instead of classical unification. Union types, however, have a subtype relation that seems to be inconsistent with the disjoint class assumption of traditional unification methods. Using a classical mathematical technique called slack variables, we could convert subty...
The Open/ADF tool allows the evaluation of derivatives of functions defined by a Fortran program. The derivative evaluation is performed by a Fortran code resulting from the analysis and transformation of the original program that defines the function of interest. Open/ADF has been designed with a particular emphasis on modularity, flexibility, and the use of open source components. While the code transformation follows the basic principles of automatic differentiation, the tool implements new algorithmic approaches at various levels, for example, for basic block preaccumulation and call graph reversal. Unlike most other automatic differentiation tools, Open/ADF uses components provided by the Open/AD framework, which supports a comparatively easy extension of the code transformations in a language-independent fashion. It uses code analysis results implemented in the OpenAnalysis component. The interface to the language-independent transformation engine is an XML-based format, specified through an XML schema. The implemented transformation algorithms allow efficient derivative computations using locally optimized cross-country sequences of vertex, edge, and face elimination steps. Specifically, for the generation of adjoint codes, Open/ADF supports various code reversal schemes with hierarchical checkpointing at the subroutine level. As an example from geophysical fluid dynamics, a nonlinear time-dependent scalable, yet simple, barotropic ocean model is considered. OpenAD/F's reverse mode is applied to compute sensitivities of some of the model's transport properties with respect to gridded fields such as bottom topography as independent (control) variables.
This report describes preliminary results obtained using an automated adjoint code generator for Fortran to augment a widely-used computational fluid dynamics flow sol\-er to compute deri\-ati\-es. These preliminary results with this augmented code suggest that: e\-en in its infancy: tlie automated adjoint code generator can accurately and efficiently deli\-er deri\-ati\-es for use in transonic Euler-based aerodynamic shape optimization problems with hundreds to thousands of independent design \-ariables.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
hi@scite.ai
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.