Browsing by Author "Cartwright, Robert S."
Now showing 1 - 20 of 22
Results Per Page
Sort Options
Item A first-class approach to genericity(2003) Allen, Eric Ethan; Cartwright, Robert S.This thesis describes how to add first-class generic types---including mixins---to strongly-typed object-oriented languages with nominal subtyping such as Java and C#. A generic type system is "first-class" if generic types can appear in any context where conventional types can appear. In this context, a mixin is simply a generic class that extends one of its type parameters, e.g., a class C<T> that extends T. Although mixins of this form are widely used in C++ (via templates), they are clumsy and error-prone because C++ treats mixins as syntactic abbreviations (macros), forcing each mixin instantiation to be separately compiled and type-checked. The abstraction embodied in a mixin is never separately analyzed. Our formulation of mixins using first-class genericity accommodates sound local (class-by-class) type checking. A mixin can be fully type-checked given symbol tables for each of the classes that it directly references---the same context in which Java performs incremental class compilation. To our knowledge, no previous formal analysis of first-class genericity in languages with nominal type systems has been conducted, which is surprising because nominal type systems have become predominant in mainstream object-oriented programming languages. What makes our treatment of first-class genericity particularly interesting and important is the fact that it can be added to the existing Java language without any change to the underlying Java Virtual Machine. Moreover, the extension is backward compatible with legacy Java source and class files. Although our discussion of implementation issues focuses on Java, the same implementation techniques could be applied to other object-oriented languages such as C# or Eiffel that support incremental compilation, dynamic class loading, and a static type system with nominal subtyping.Item A framework for building pedagogic Java programming environments(2002) Stoler, Brian Richard; Cartwright, Robert S.Java has become the dominant language for teaching introductory computer science at both the high school and college levels. Yet Java's development tools and syntax often distract beginning students from the programming concepts being taught. To combat this problem, we have implemented DrJava, a pedagogic programming environment, and devised a sequence of language levels for Java, which partition the language into pieces that can be more easily taught at one time. DrJava is a lightweight, yet powerful, Java development environment suitable both for beginners and more advanced developers. The environment provides a simple interface based on a "read-eval-print loop" that enables a programmer to develop, test, and debug Java programs interactively and incrementally. DrJava is freely available under an open source license. This thesis describes DrJava and an implementation framework and conceptual design for language levels in Java.Item A Framework for Testing Concurrent Programs(Rice University, 2011) Ricken, Mathias; Cartwright, Robert S.This study proposes a new framework that can effectively apply unit testing to concurrent programs, which are difficult to develop and debug. Test-driven development, a practice enabling developers to detect bugs early by incorporating unit testing into the development process, has become wide-spread, but it has only been effective for programs with a single thread of control. The order of operations in different threads is essentially non-deterministic, making it more complicated to reason about program properties in concurrent programs than in single-threaded programs. Because hardware, operating systems, and compiler optimizations influence the order in which operations in different threads are executed, debugging is problematic since a problem often cannot be reproduced on other machines. Multicore processors, which have replaced older single-core designs, have exacerbated these problems because they demand the use of concurrency if programs are to benefit from new processors. The existing tools for unit testing programs are either flawed or too costly. JUnit, for instance, assumes that programs are single-threaded and therefore does not work for concurrent programs; ConTest and rstest predate the revised Java memory model and make incorrect assumptions about the operations that affect synchronization. Approaches such as model checking or comprehensive schedule- based execution are too costly to be used frequently. All of these problems prevent software developers from adopting the current tools on a large scale. The proposed framework (i) improves JUnit to recognize errors in all threads, a necessary development without which all other improvements are futile, (ii) places some restrictions on the programs to facilitate automatic testing, (iii) provides tools that reduce programmer mistakes, and (iv) re-runs the unit tests with randomized schedules to simulate the execution under different conditions and on different ma- chines, increasing the probability that errors are detected. The improvements and restrictions, shown not to seriously impede programmers, reliably detect problems that the original JUnit missed. The execution with randomized schedules reveals problems that rarely occur under normal conditions. With an effective testing tool for concurrent programs, developers can test pro- grams more reliably and decrease the number of errors in spite of the proliferation of concurrency demanded by modern processors.Item A Framework for Testing Concurrent Programs(2011) Ricken, Mathias Guenter; Cartwright, Robert S.This study proposes a new framework that can effectively apply unit testing to concurrent programs, which are difficult to develop and debug. Test-driven development, a practice enabling developers to detect bugs early by incorporating unit testing into the development process, has become wide-spread, but it has only been effective for programs with a single thread of control. The order of operations in different threads is essentially non-deterministic, making it more complicated to reason about program properties in concurrent programs than in single-threaded programs. Because hardware, operating systems, and compiler optimizations influence the order in which operations in different threads are executed, debugging is problematic since a problem often cannot be reproduced on other machines. Multi-core processors, which have replaced older single-core designs, have exacerbated these problems because they demand the use of concurrency if programs are to benefit from new processors. The existing tools for unit testing programs are either flawed or too costly. JUnit , for instance, assumes that programs are single-threaded and therefore does not work for concurrent programs; ConTest and rstest predate the revised Java memory model and make incorrect assumptions about the operations that affect synchronization. Approaches such as model checking or comprehensive schedule-based execution are too costly to be used frequently. All of these problems prevent software developers from adopting the current tools on a large scale. The proposed framework (i) improves JUnit to recognize errors in all threads, a necessary development without which all other improvements are futile, (ii) places some restrictions on the programs to facilitate automatic testing, (iii) provides tools that reduce programmer mistakes, and (iv) re-runs the unit tests with randomized schedules to simulate the execution under different conditions and on different machines, increasing the probability that errors are detected. The improvements and restrictions, shown not to seriously impede programmers, reliably detect problems that the original JUnit missed. The execution with randomized schedules reveals problems that rarely occur under normal conditions. With an effective testing tool for concurrent programs, developers can test programs more reliably and decrease the number of errors in spite of the proliferation of concurrency demanded by modern processors.Item A pedagogic programming environment for Java that scales to production programming(2003) Reis, Charles S.; Cartwright, Robert S.This thesis describes extensions to the DrJava development environment that make it suitable for production programming. DrJava is an effective tool for teaching introductory programming skills in Java, and its simplicity is a desirable characteristic for projects of any size. To better support the development of large projects in DrJava, a carefully selected suite of features has been added to the environment. To facilitate interoperation with professional development environments, a plug-in supporting the DrJava interface has been written for the Eclipse environment. As a result of this work, DrJava has become an appropriate tool for teaching production programming skills in an academic environment, without sacrificing its original goals.Item A preliminary evaluation of a manually controlled computer(1982) Kelley, Robert S. (b. 1831); Tuggle, Francis D.; Cartwright, Robert S.; Gorry, G. AnthonyWe have developed a novel display control for interactive computer systems. This permits users to make a single displayed file scroll up or down by moving a hand control in the appropriate direction. The rate at which the system scrolls depends on the degree of control displacement; consequently it is more flexible than conventional keyboard systems. We further developed a two file version which displays files side by side, with their motion controlled in a similar manner. We evaluated the system's effect on task performance in two experiments, one dealing with computer programming, the other with word processing. The results are generally favorable. Subjects reported that they liked the controls and would find them useful in their work. The controls significantly reduced the number of keystrokes required in both experiments; in addition, in the first experiment, subjects who used the controls the most were significantly faster in completing the tasks.Item Adding support for language levels to DrJava(2005) Hsia, James I.; Cartwright, Robert S.This thesis describes the design and implementation of language levels, a pedagogic tool that helps students progressively learn object-oriented programming concepts in discrete stages. While Java is widely used in academia, its complex syntax and large array of constructs are difficult for beginning students to learn. The language levels facility supports a hierarchy of progressively sophisticated subsets of the language. This progression minimizes the clerical burden involved in learning to write Java programs and reinforces the specific abstractions taught at each stage of Rice introductory programming curriculum. In addition, the hierarchy of language levels reduces code clutter by automatically generating routine methods. This language levels facility has been implemented as an extension of DrJava, a pedagogic programming environment for Java developed at Rice University. We anticipate that this extension will enable more students to learn Java and master the principles of object-oriented programming.Item Analyzing robustness of models of chaotic dynamical systems learned from data with Echo state networks(2019-11-21) Abdelrahman, Mohamed Mahmoud Hafez Mahmoud; Subramanian, Devika; Cartwright, Robert S.Large scale engineering as well as natural systems, such as weather, often have high-dimensional state spaces and exhibit chaotic dynamics. To model the behavior of such systems, sets of coupled Partial Differential Equations (PDEs) are formulated and solved using high-performance computing systems. More recently, significant attention has grown toward the use of Artificial Intelligence (AI) and Machine Learning (ML) techniques, in particular, using data-driven modeling to learn fast and accurate surrogate process models trained on high-resolution data obtained from simulations, or observations of chaotic systems. Echo state networks (ESN), a family of recurrent neural network algorithms, have emerged as one of the most promising techniques to learn predictive models of chaotic dynamical systems directly from data. In spite of their success in learning chaotic dynamical systems from data, there are many open questions. Some of them are practical engineering concerns such as: how to choose training parameters (reservoir size, spectral radius, length of training sequence) for specific problems, how robust the learned models are to variations in data, and in training parameters (initialization of random weights, reservoir size, spectral radius). Others are open theoretical questions such as: why do ESNs work at all, in particular, which aspects of the underlying dynamical systems are captured by the learned reservoirs, and which factors determine the prediction horizon of the learned models. In this thesis, we study these practical and theoretical questions in the context of two models of chaotic dynamical systems, Lorenz63 and Lorenz96, which are prototypes of more complex weather models. We show that the predictive performance of the learned models is highly sensitive to initial conditions — i.e., for different training sequences all of the same lengths but with different initial states, there is considerable variation in prediction horizon from 0.1 MTU to 3.8 MTU in Lorenz63 and from 0.4 MTU to 2.8 MTU in Lorenz96. We also show that variations in the initialization of (random) input weights and (random) reservoir weights at the start of the training phase yields models with varying prediction horizon for the very same training sequence. We discuss the implications of these findings in the construction of robust ESN models for Lorenz systems. To help explain the observed variations in predictive performance with initial conditions, and to understand when and why ESNs work, we use dimensionality reduction and clustering algorithms to visualize the evolution of high-dimensional reservoir states during training and prediction. Our main finding is that, in a well-trained model, reservoir states mirror the dynamics of the chaotic system from which the data is derived. In particular, we can infer the number of dynamical components from the non-linear clustering of the reservoir states. In the context of Lorenz63, we show that the sensitivity to initial conditions stems from the locations of the initial condition relative to the two components of the underlying system.Item Component NextGen: A sound and expressive component framework for Java(2007) Sasitorn, James; Cartwright, Robert S.Java has transformed mainstream software development by supporting clean object-oriented design, comprehensive static type checking, safe program execution, and an unprecedented degree of portability. Despite these significant achievements, the Java language has been handicapped as a vehicle for writing large applications by the absence of a component system for decomposing applications into independent units with statically checked interfaces. Developing a general component system for an object-oriented language, such as Java, is a challenging design problem because inheritance across component boundaries can cause accidental method overrides. In addition, mutually recursive references across components are common in object-oriented programs---an issue that has proven troublesome in the context of component systems for functional and procedural languages. This thesis discusses how a component framework can be constructed for a nominally typed object-oriented language supporting first-class generic types simply by adding appropriate annotations and syntactic sugar. The fundamental semantic building blocks for constructing, type-checking and manipulating components are provided by the underlying first-class generic type system. To demonstrate the simplicity and utility of this approach we have designed and implemented an extension of Java called Component N EXTGEN (CGEN). CGEN, which is based on the Sun Java 5.0 javac compiler, is backwards compatible with existing Java binary code and generates code that can be executed on current Java Virtual Machines.Item Designing type inference for typed object-oriented languages(2010) Smith, Daniel; Cartwright, Robert S.Type-checked object-oriented languages have typically been designed with extremely simple type systems. However, there has recently been intense interest in extending such languages with more sophisticated types and subtyping relationships. JAVA and C# are mainstream languages that have been successfully extended with generic classes and methods; SCALA, FORTRESS, and X10 are new languages that adopt more advanced typing features, such as arrows, tuples, unions, intersections, dependent types, and existentials. Presently, the type inference performed by these languages is unstable and evolving. This thesis explores problems arising in the design of a type inference specification for such languages. We first present a formal description of subtyping in the context of a variety of advanced typing features. We then demonstrate how our formal subtyping algorithm can be easily re-expressed to produce a type inference algorithm, and observe that this algorithm is general enough to address a variety of important type-checking problems. Finally, we apply this theory to a case study of the JAVA language's type system. We express JAVA'S types and inference algorithm in terms of our formal theory and note a variety of opportunities for improvement. We then describe the results of applying an improved type inference implementation to a selection of existing JAVA code, noting that, without introducing significant backwards-incompatibility problems for these programs, we've managed to significantly reduce the need for annotated method invocations.Item Dr. C#: A pedagogic IDE for C# featuring a read-eval-print-loop(2003) Lu, Dennis Iee; Cartwright, Robert S.As the primary programming language of the Microsoft .NET platform, C# will play a significant role in software development for the foreseeable future. As the language rapidly gains popularity in industry, tools made for C# development focus on the professional programmer, while leaving the beginning computer science student behind. To address this problem, we introduce Dr. C#, a simple lightweight development environment with an integrated, interactive Read-Eval-Print-Loop (REPL). Dr. C# helps flatten the learning curve of both the environment and the language, enabling students to quickly learn key elements of the language and focus more easily on concepts. Dr. C# thus serves not only as a learning tool for beginner students but also as a teaching tool for instructors. The editor is based on an open source IDE called SharpDevelop. This thesis describes the implementation of Dr. C# focusing primarily on building the REPL and integrating with SharpDevelop.Item Efficient implementation of first-class polymorphic methods in Java(2005) Sasitorn, James; Cartwright, Robert S.This thesis describes a new implementation architecture for polymorphic methods in Generic Java using the NEXTGEN compiler framework. The standard Generic Java (Java 1.5) compiler erases generic types at compilation. This transformation prohibits type-dependent operations, limiting generic expressivity. Type erasure causes unchecked warnings at compilation, and unexpected behavior or exceptions at runtime. Alternative reflection-based implementations of Generic Java support type-dependent operations at the cost of significant execution overhead. In contrast, this work presents an efficient implementation of polymorphic methods using NEXTG EN. An extended NEXTGEN compiler generates snippet environment template classes to encode type-dependent operations for polymorphic methods. A customized class-loader generates specialized template instantiations on demand. This demand-driven code specialization provides an efficient mechanism to propagate runtime type information, while maintaining backwards compatibility with existing libraries and Java Virtual Machines. Benchmarks show runtime support for polymorphic methods in NEXTG EN outperforms reflection-based approaches, with runtime overhead comparable to erasure-based Generic Java.Item Efficient implementation of run-time generic types for Java(2002) Allen, Eric Ethan; Cartwright, Robert S.One of the most significant limitations of the Java Programming Language is its lack of support for generic types. This thesis describes an efficient compiler and run-time type system for NextGen, a compatible extension of Java that supports generic types, including type dependent operations. The NextGen compiler is implemented as an extension to the existing compiler for GJ, a limited generic extension of Java that does not support run-time generic types. Our implementation is homogeneous, with one major exception: Instantiations of generic classes are constructed on demand. This exception is necessary to support polymorphic recursion. The NextGen compiler generates templates for such instantiation classes and relies on a customized class loader to construct instantiations at run-time. A suite of benchmarks on the Java, GJ, and NextGen compilers shows that the additional code required to support run-time generic types has little or no overhead compared to ordinary Java and GJ.Item Growing DrJava to cope with language extensions carried out in Java 5.0(2006) Jensen, Michael Dyrby; Cartwright, Robert S.While Java continues to gain popularity in both industry and academia, few Java programming environments enable the user to directly interact with the code. Professional environments require developers to use a command line interface to execute Java code. In contrast, our DrJava programming environment supports a read-eval-print-loop (REPL) incorporating a Java interpreter called DynamicJava---enabling developers to execute arbitrary fragments of Java code on-the-fly. DynamicJava was developed at the University of Nice, but development ceased in 2002 with DynamicJava supporting Java 1.3. In 2004, the Java language was extended in the Java 1.5 (renamed 5.0) release. To support Java 5.0 in DrJava, we were confronted with the task of extending DynamicJava to support the new language features. This dissertation describes the new features in Java 5.0---including generic types, autoboxing, variable arguments, static import, foreach, enumeration types and metadata---and explains how we extended the existing DynamicJava code base to support them.Item Habanero-Scala: A Hybrid Programming model integrating Fork/Join and Actor models(2013-07-24) Imam, Shams; Sarkar, Vivek; Cartwright, Robert S.; Chaudhuri, SwaratThis study presents a hybrid concurrent programming model combining the previously developed Fork-Join model (FJM) and Actor model (AM). With the advent of multi-core computers, there is a renewed interest in programming models that reduce the burden of reasoning about and writing efficient concurrent programs. The proposed hybrid model shows how the divide-and-conquer approach of the FJM and the no-shared mutable state and event-driven philosophy of the AM can be combined to solve certain classes of problems more efficiently and productively than either of the aforementioned models individually. The hybrid model adds actor creation and coordination to into the FJM, while also enabling parallelization within actors. This study uses the Habanero-Java and Scala programming languages as the base for the FJM and AM respectively, and provides an implementation of the hybrid model as an extension of the Scala language called Habanero-Scala. The hybrid model adds to the foundations of parallel programs, and to the tools available for the programmer to aid in productivity and performance while developing parallel software.Item NOOP: A mathematical model of object-oriented programming(2012) AbdelGawad, Moez A.; Cartwright, Robert S.Computer software is ubiquitous. More than 35 × 10 18 computer instructions are executed around the globe each second. As computers dominate more aspects of our lives, there is a growing need to reason more accurately about computer software. Most contemporary computer software is written using object-oriented (OO) programming languages, such as J AVA, C#, and C++. How should we mathematically characterize object-oriented software? This is the question this thesis addresses by presenting an accurate domain-theoretic model of mainstream object-oriented programming. Mainstream object-oriented languages are class-based. In such languages, the name of a class is part of the meaning of an object, a property often called "nominality". Most mainstream OO languages also conform to a static type discipline. Hence, the focus of this thesis is the construction of an accurate model of nominal, statically-typed OO languages. In statically-typed nominal OO languages, class names are also part of the meaning of corresponding class types, and class inheritance (subclassing) is explicitly declared; one class is a subclass of another only if it is declared as such. When static type systems are formulated to describe sets of objects, subtyping is defined so that subclassing is consistent with subtyping. Nevertheless, some programming languages (PL) theoreticians dismiss this identification as a design error because the only published models of OO languages exclude nominal information from objects and define subtyping in a way that ignores nominality. In nominal OO languages, program behavior depends on the nominal information embedded in objects. This thesis builds a model of OO languages called NOOP that includes nominal information and defines static types in accord with mainstream OO language designs. In NOOP , the meaning of every object includes its class name. Similarly, types are defined such that objects belong to a particular class type if and only if they are members of classes that inherit from the class corresponding to the class type. To demonstrate the utility of the model, we show that in NOOP inheritance and OO subtyping coincide. This work shows that mainstream OO languages are not technically defective in identifying inheritance and subtyping. In models that include nominal information and define types that respect nominal information, this identification is mathematically correct. The folklore among OO programming language researchers that "inheritance is not subtyping" is incorrect.Item Practical soft typing(1995) Wright, Andrew Kevin; Cartwright, Robert S.; Felleisen, MatthiasSoft typing is an approach to type checking for dynamically typed languages. Like a static type checker, a soft type checker infers syntactic types for identifiers and expressions. But rather than reject programs containing untypable fragments, a soft type checker inserts explicit run-time checks to ensure safe execution. Soft typing was first introduced in an idealized form by Cartwright and Fagan. This thesis investigates the issues involved in designing a practical soft type system. A soft type system for a purely functional, call-by-value language is developed by extending the Hindley-Milner polymorphic type system with recursive types and limited forms of union types. The extension adapts Remy's encoding of record types with subtyping to union types. The encoding yields more compact types and permits more efficient type inference than Cartwright and Fagan's early technique. Correctness proofs are developed by employing a new syntactic approach to type soundness. As the type inference algorithm yields complex internal types that are difficult for programmers to understand, a more familiar language of presentation types is developed along with translations between internal and presentation types. To address realistic programming languages like Scheme, the soft type system is extended to incorporate assignment, continuations, pattern matching, data definition, records, modules, explicit type annotations, and macros. Imperative features like assignment and continuations are typed by a new, simple method of combining imperative features with Hindley-Milner polymorphism. The thesis shows soft typing to be practical by illustrating a prototype soft type system for Scheme. Type information determined by the prototype is sufficiently precise to provide useful diagnostic aid to programmers and to effectively minimize run-time checking. The type checker typically eliminates 90% of the run-time checks that are necessary for safe execution with dynamic typing. This reduction in run-time checking leads to significant speedup for some bench marks. Through several examples, the thesis shows how prototypes, developed using a purely semantic understanding of types as sets of values, can be transformed into robust maintainable, and efficient programs by rewriting them to accommodate better syntactic type assignment.Item Programming the Web with high-level programming languages(2001) Graunke, Paul Thorsen; Felleisen, Matthias; Cartwright, Robert S.Concepts from high-level languages can greatly simplify the design and implementation of CGI programs. This dissertation develops two systems for implementing these programs. The first technique* relies on a custom Web server that dynamically loads CGI programs using the operating system-style services of MrEd, an extension of Scheme. The server implements programming mechanisms using continuations that allow the CGI program to interact with the user in a natural manner. The second technique relies on program transformations from functional language compilation.† It allows the use of standard servers and alleviates most of the memory consumption on the server. In my thesis I discuss the advantages and disadvantages of each approach. I conclude with suggestions for further investigations into this topic. *The first technique previously appeared at the European Symposium on Programming, 2001 A.D., in a paper with the same title as this dissertation, coauthored with Shriram Krishnamurthi, Steve van der Hoeven, and Matthias Felleisen. †The compilation based technique was submitted to the International Conference on Functional Programming in a paper titled, "How to Design and Generate CGI Programs: Applying Functional Compiler Techniques to the Real World," coauthored with Robert Bruce Findler, Shriram Krishnamurthi, and Matthias Felleisen.Item Reasoning About Multi-stage Programs(2013-07-24) Inoue, Jun; Cartwright, Robert S.; Taha, Walid; Sarkar, Vivek; O'Malley, Marcia K.Multi-stage programming (MSP) is a style of writing program generators---programs which generate programs---supported by special annotations that direct construction, combination, and execution of object programs. Various researchers have shown MSP to be effective in writing efficient programs without sacrificing genericity. However, correctness proofs of such programs have so far received limited attention, and approaches and challenges for that task have been largely unexplored. In this thesis, I establish formal equational properties of the multi-stage lambda calculus and related proof techniques, as well as results that delineate the intricacies of multi-stage languages that one must be aware of. In particular, I settle three basic questions that naturally arise when verifying multi-stage functional programs. Firstly, can adding staging MSP to a language compromise the interchangeability of terms that held in the original language? Unfortunately it can, and more care is needed to reason about terms with free variables. Secondly, staging annotations, as the term ``annotations'' suggests, are often thought to be orthogonal to the behavior of a program, but when is this formally guaranteed to be the case? I give termination conditions that characterize when this guarantee holds. Finally, do multi-stage languages satisfy extensional facts, for example that functions agreeing on all arguments are equivalent? I develop a sound and complete notion of applicative bisimulation, which can establish not only extensionality but, in principle, any other valid program equivalence as well. These results improve our general understanding of staging and enable us to prove the correctness of complicated multi-stage programs.Item Semantic program dependence graphs(1992) Parsons, Rebecca Jane; Felleisen, Matthias; Cartwright, Robert S.Semantic program dependence graphs, or semantic pdgs, are an attractive intermediate program representation for use in advanced optimizing and parallelizing compilers. The semantic pdg, which is based on the program dependence graph, has a compositional semantics that provides an elegant characterization of the types of dependences that arise in imperative programming languages. In addition, the semantic pdg has a simple operational semantics which serves as the basis of an equational calculus reasoning about semantic pdgs. Finally, the algorithms for creating the semantic pdg are efficient enough to allow the use of this program representation in actual compilers. The semantic pdg is the result of a study, using denotational semantics, into the notions of data and control dependence in imperative programming languages. Semantic pdgs include a new component, the valve node, which ensures the data flow character of the semantic pdg, even in the presence of conditional assignments, and provides the control information necessary to perform many important program optimizations. The valve node is a natural result of the derivation step that addresses the data dependence relation. The semantic pdg utilizes the new concept of a partial array to allow for optimizations of array accesses while maintaining the mathematical elegance of the data flow semantics of the pdg. The semantic pdg is not only an elegant representation from a mathematical perspective, but it is also a useful representation from a practical perspective. This structure is particularly well-suited for use in optimizing and parallelizing compilers since it explicates the important relationships among the different statements in a program. We have developed a program representation that is powerful enough to represent the behavior of a program, that provides the information needed to optimize the program, and that has a precise mathematical description. The development of the semantic pdg reconciles the often contradictory requirements of mathematical elegance and practicality.