Repository logo
English
  • English
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Gàidhlig
  • Italiano
  • Latviešu
  • Magyar
  • Nederlands
  • Polski
  • Português
  • Português do Brasil
  • Suomi
  • Svenska
  • Türkçe
  • Tiếng Việt
  • Қазақ
  • বাংলা
  • हिंदी
  • Ελληνικά
  • Yкраї́нська
  • Log In
    or
    New user? Click here to register.Have you forgotten your password?
Repository logo
  • Communities & Collections
  • All of R-3
English
  • English
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Gàidhlig
  • Italiano
  • Latviešu
  • Magyar
  • Nederlands
  • Polski
  • Português
  • Português do Brasil
  • Suomi
  • Svenska
  • Türkçe
  • Tiếng Việt
  • Қазақ
  • বাংলা
  • हिंदी
  • Ελληνικά
  • Yкраї́нська
  • Log In
    or
    New user? Click here to register.Have you forgotten your password?
  1. Home
  2. Browse by Author

Browsing by Author "Taha, Walid"

Now showing 1 - 19 of 19
Results Per Page
Sort Options
  • Loading...
    Thumbnail Image
    Item
    A Graphical Multistage Calculus
    (2005-07-22) Ellner, Stephan; Taha, Walid
    While visual programming languages continue to gain popularity in domains ranging from scientific computing to real-time systems, the wealth of abstraction mechanisms, reasoning principles, and type systems developed over the last thirty years is currently available mainly for textual languages. With the goal of understanding how results in the textual languages can be mapped to the graphical setting, we develop the visual calculus PreVIEW. While this calculus visualizes computations in dataflow-style similar to languages like LabVIEW and Simulink, its formal model is based on Ariola and Blom's work on cyclic lambda calculi. We extend this model with staging constructs, establish a precise connection between textual and graphical program representations, and show how a reduction semantics for a multi-stage language can be lifted from the textual to the graphical setting.
  • Loading...
    Thumbnail Image
    Item
    A transactional compiler for E-FRP with priorities
    (2008) Kaiabachev, Roumen Nikoleav; Taha, Walid
    E-FRP is declarative language for programming resource-bounded, event-driven systems. Its original high-level semantics requires that each event handler execute atomically. This facilitates reasoning about E-FRP programs, and therefore is a desirable feature of the language. However, the original compilation strategy requires that each handler complete execution before another event can occur. This implementation treats all events equally; it forces the upper bound on the time needed to respond to any event to be the same. While acceptable for many applications, often some events are more urgent than others. We show we can improve the compilation strategy without altering the high-level semantics. Thus, the programmer has more control over responsiveness without taking away the ability to reason about programs at a high level. The programmer controls responsiveness by declaring priorities for events, and the compilation strategy produces code that uses preemption to enforce these priorities. The compilation strategy enjoys the same properties as the original, with the change being that the programmer reasons modulo permutations on the order of event arrivals.
  • Loading...
    Thumbnail Image
    Item
    Acumen: An environment for rapid prototyping of Cyber-Physical Systems
    (2009) Zhu, Yun; Taha, Walid
    Cyber-Physical Systems (CPS) combine discrete and continuous physical processes. Developing a new cyber-physical system is an iterative process that involves design, simulation, prototyping, and production. Writing simulation code using current techniques is time consuming. My thesis is that a carefully designed, domain-specific language can alleviate this difficulty. To demonstrate this thesis, I designed and implemented a prototype of a novel simulation environment called Acumen. The centerpiece of Acumen is a physical description language called PhyDL, which allows the user to directly describe dynamic equations governing the system being modeled, making the writing of simulation code much easier for engineers. A series of automatic transformations convert the high-level descriptions into a form that is directly machine executable. This thesis presents the design of PhyDL and several case studies of using PhyDL for designing CPS systems, which show that PhyDL is accurate and easy to use for domain experts.
  • Loading...
    Thumbnail Image
    Item
    C++.T Formalization in Isar
    (2005-12-16) Siek, Jeremy G.; Taha, Walid
    A formal account of C++ templates, including the compile-time and run-time semantics. The main result is a proof of type safety. The proof is written in the Isar proof language and can be mechanically verified using the Isabelle 2005 proof assistant.
  • Loading...
    Thumbnail Image
    Item
    Compiling dynamic languages via statically typed functional languages
    (2009) Bandyopadhyay, Rajarshi; Taha, Walid
    Dynamic languages enable rapid prototyping, but are generally not viewed as providing the best performance. As a result, software developers generally build a prototype in a dynamic language and then rewrite the application in C or Fortran for high performance. This costly rewriting step can be avoided by improving the performance of dynamic languages. Dynamic languages are usually interpreted for easier implementation. The traditional approach to improve their performance is to build an optimizing compiler. However, building a compiler from scratch is much more time-consuming than implementing an interpreter. Our thesis is that we can build effective compilers for dynamic languages by translating them into statically typed functional languages which have good compilers and automatic memory management. In particular, we believe that modern statically typed languages provide precise control over data representations, and come with runtime systems that have competitive performance. To investigate the viability of this approach, we have built a compiler for the dynamic language Python by translating it into the statically typed functional language OCaml. An interesting practical advantage of using modern statically typed functional languages is that they use Hindley-Milner type systems, which means that there is no need for the translation to construct type terms. We compare the performance of our implementation, Monty, with that of CPython, the reference Python implementation, and with Jython, a Java implementation of Python, using a suite of 370 benchmarks. Our experiments show that some programs compiled using our approach run up to 4.6 times faster than CPython. However, due to a number of engineering reasons, some programs also run significantly slower than CPython. We pinpoint the specific causes of performance degradation and assess the potential for removing these causes in future work. Our implementation is significantly faster than Jython, up to a factor of 100 in some cases. A by product of our research is a proposal for an improved array copying implementation in OCaml.
  • Loading...
    Thumbnail Image
    Item
    Compiling dynamic languages via typed functional languages
    (2007-10-19) Bandyopadhyay, Raj; Taha, Walid
    Dynamic languages enable rapid prototyping, while statically typed languages offer early error-detection and efficient execution. As a result, the usual practice in software development is to build a prototype in a dynamic language and then rewrite the application in C or Fortran for high performance. Our thesis is that this costly rewriting step can be avoided if we have good native code compilers for dynamic languages. To overcome the difficulties in building good native code compilers from scratch, we propose that dynamic languages can be compiled into high-performance native code executables by translating to typed functional languages and reusing existing functional language compilers. We demonstrate this approach by compiling a popular dynamic language, Python, by translating it to OCaml, a strongly typed functional language. On performing a compar tive evaluation against several available Python implementations on both Windows and Linux platforms, we obtain highly encouraging results . In this paper, we use Python as proof-of-concept to demonstrate that our approach delivers efficient native code compilers for dynamic languages. We describe how source dynamic language objects and constructs can be expressed in terms of target typed functional language data types. Finally, we present a comparative performance analysis against different Python implementations such as CPython, IronPython, PyPy and Jython to illustrate the effectiveness of our approach.
  • Loading...
    Thumbnail Image
    Item
    E-FRP With Priorities
    (2009-07-15) Inoue, Jun; Kaiabachev, Roumen; Taha, Walid; Zhu, Angela
    E-FRP is declarative language for programming resource-bounded, event-driven systems. Its original high-level semantics requires that each event handler execute atomically. This facilitates reasoning about E-FRP programs, and therefore is a desirable feature of the language. However, the original compilation strategy requires that each handler complete execution before another event can occur. This implementation treats all events equally; it forces the upper bound on the time needed to respond to any event to be the same. While acceptable for many applications, often some events are more urgent than others We show we can improve the compilation strategy without altering the high-level semantics. Thus, the programmer has more control over responsiveness without taking away the ability to reason about programs at a high level. The programmer controls responsiveness by declaring priorities for events, and the compilation strategy produces code that uses preemption to enforce these priorities. The compilation strategy enjoys the same properties as the original, with the change being that the programmer reasons modulo permutations on the order of event arrivals.
  • Loading...
    Thumbnail Image
    Item
    Gradual Typing: Isabelle/Isar Formalization
    (2006-04-07) Siek, Jeremy; Taha, Walid
    This report formalizes a gradual type system using the Isabelle/Isar proof language and proof assistant. Gradual typing combines static typing and dynamic typing in the same language, allowing a programmer to gradual migrate portions of a program between the two typing disciplines.
  • Loading...
    Thumbnail Image
    Item
    Implicitly Heterogeneous Multi-stage Programming
    (2005-04-16) Eckhardt, Jason; Kaiabachev, Roumen; Pašalić, Emir; Swadi, Kedar; Taha, Walid
    Previous work on semantics-based multi-stage programming (MSP) language design focused on homogeneous languages designs, where the generating and the generated languages are the same. Homogeneous designs simply add a hygienic quasi-quotation and evaluation mechanism to a base language. An apparent disadvantage of this approach is that the programmer is bound to both expressivity and performance characteristics of the base language. This paper proposes a practical means to show that this can be avoided by providing specialized translations from subsets of the base language to different target languages. This approach preserves the homogeneous "look" of multi-stage programs, and, more importantly, the static guarantees about the generated code. In addition, compared to an explicitly heterogeneous approach, it promotes reuse and systematic exploration of the performance characteristics of the target languages. To illustrate the proposed approach, we design and implement a translation to a subset of C suitable for numerical computation, and show that it preserves static typing. The translation is implemented, and evaluated with several benchmarks. The implementation is available in the online distribution of MetaOCaml.
  • Loading...
    Thumbnail Image
    Item
    Making Hybrid Systems Easier to Model, Simulate, and Visualize
    (2019-03-25) Zeng, Yingfu; Cartwright, Robert; Taha, Walid
    Specifying the behavior desired of hybrid systems requires analytical modeling of physical phenomena. Similarly, testing them requires simulation of continuous systems. While numerous tools support later stages of developing simulation codes, there is still a large gap between analytical modeling and running simulation code, which significantly impedes the ability of scientists and engineers to develop novel hybrid systems. The support for partial derivative, in particular, is limited in present mainstream modeling and simulation languages as well as reachability analysis tools for hybrid systems. Either they do not provide such language construct, requiring the modeler to manually transform the model or its correctness is unclear. In this thesis, we demonstrate that compile-time transformations can improve hybrid system formalisms by supporting partial derivatives and equational constraints. These improvements allow the user to express, among other things, the Euler-Lagrangian equation, and to capture practically relevant constraints that arise naturally in mechanical systems. Achieving this level of expressivity requires using a binding time-analysis (BTA), program differentiation, symbolic Gaussian elimination, and abstract interpretation using interval analysis. We give an operational semantics for the specialization process along with a declarative and algorithmic specifications of the binding-time analysis. A type safety theorem is given to show the correctness of the semantics for specialization. The declarative specification of binding-time analysis is used to prove soundness with respect to the specialization process. We also provide an open-source implementation demonstrating our approach.
  • Loading...
    Thumbnail Image
    Item
    Mixing Indexed Types and Hindley-Milner Type Inference
    (2006-07-28) Pašalić, Emir; Siek, Jeremy G.; Taha, Walid
    This paper addresses the question of how to extend OCaml’s Hindley-Milner type system with types indexed by logical propositions and proofs of the Coq theorem prover, thereby providing an expressive and extensible mechanism for ensuring fine-grained program invariants. We propose adopting the approached used by Shao et al. for certified binaries. This approach maintains a phase distinction between the computational and logical languages, thereby limiting effects and non-termination to the computational language, and maintaining the decidability of the type system. The extension subsumes language features such as impredicative first-class (higher-rank) polymorphism and type operators, that are notoriously difficult to integrate with the Hindley-Milner style of type inference that is used in OCaml. We make the observation that these features can be more easily integrated with type inference if the inference algorithm is free to adapt the order in which it solves typing constraints to each program. To this end we define a novel “order-free” type inference algorithm. The key enabling technology is a graph representation of constraints and a constraint solver that performs Hindley-Milner inference with just three graph rewrite rules.
  • Loading...
    Thumbnail Image
    Item
    Multi-stage Programming for Mainstream Languages
    (2009-07-27) Abdelatif, Tamer; Inoue, Jun; Ricken, Mathias; Taha, Walid; Westbrook, Edwin; Yao, Yilong
    Multi-stage programming (MSP) provides a disciplined approach to run-time code generation. In the purely functional setting, it has been shown how MSP can be used to reduce the overhead of abstractions, allowing clean, maintainable code without paying performance penalties. Unfortunately, MSP is difficult to combine with imperative features, which are prevalent in mainstream languages. The central difficulty is scope extrusion, wherein free variables can inadvertently be moved outside the scopes of their binders. This paper proposes a new approach to combining MSP with imperative features that occupies a “sweet spot” in the design space in terms of how well useful MSP applications can be expressed and how easy it is for programmers to understand. The key insight is that escapes (or “anti-quotes”) must be weakly separable from the rest of the code, i.e. the computational effects occurring inside an escape that are visible outside the escape are guaranteed to not contain code. To demonstrate the feasibility of this approach, we formalize a type system based on Lightweight Java which we prove sound, and we also provide an implementation, called Mint, to validate both the expressivity of the type system and the effect of staging on the performance of Java programs.
  • Loading...
    Thumbnail Image
    Item
    PreVIEW: An untyped graphical calculus for resource-aware programming
    (2004) Ellner, Stephan J.; Taha, Walid
    As visual programming languages become both more expressive and more popular in the domains of real-time and embedded software, the need for rigorous techniques for reasoning about programs written in these languages becomes more pressing. Indeed, due to a subtle but fundamental mismatch between graphical and textual representations of programs, semantic concepts established in the textual setting cannot be mapped to the graphical setting without a careful analysis of the connection between the two representations. Focusing on operational (as opposed to type-theoretic) aspects of Resource-aware Programming (RAP), we analyze the connection between graphical and textual representations of programs that can express both higher-order functions and staging constructs. After establishing a precise connection between the two, we illustrate how this connection can be used to lift a reduction semantics from the textual to the graphical setting.
  • Loading...
    Thumbnail Image
    Item
    Reasoning About Multi-Stage Programs
    (2011-10-15) Inoue, Jun; Taha, Walid
    We settle three basic questions that naturally arise when verifying multi-stage functional programs. Firstly, does adding staging to a language compromise any equalities that hold in the base language? Unfortunately it does, and more care is needed to reason about terms with free variables. Secondly, staging annotations, as the name “annotations” suggests, are often thought to be orthogonal to the behavior of a program, but when is this formally guaranteed to be true? We give termination conditions that characterize when this guarantee holds. Finally, do multi-stage languages satisfy useful, standard extensional facts, for example that functions agreeing on all arguments are equivalent? We provide a sound and complete notion of applicative bisimulation, which establishes such facts or, in principle, any valid program equivalence. These results greatly improve our understanding of staging, and allow us to prove the correctness of quite complicated multi-stage programs.
  • Loading...
    Thumbnail Image
    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.
  • Loading...
    Thumbnail Image
    Item
    Reasoning About Staged Programs
    (2010) Inoue, Jun; Taha, Walid
    This thesis establishes formal equational properties of multi-stage calculi and related proof techniques that support analyses of staged programs. A key promise of staging is to make programs efficient without destroying clarity, thereby reducing the likelihood of bugs. However, few publications rigorously verify that their staged programs indeed behave as intended. In fact, little is known about how staged programs can be verified, or what correctness issues staging introduces. To solve this problem, I show a reduction of the correctness of a staged program to that of an unstaged program. This reduction not only clarifies the effects of staging on program behavior but also eases verification, as unstaged programs are more susceptible to existing reasoning techniques. I also demonstrate that important single-stage reasoning techniques apply to staged programs. These techniques are useful for establishing side conditions for the reduction and for discovering or validating further reasoning principles.
  • Loading...
    Thumbnail Image
    Item
    Reasoning About Staged Programs
    (2009-07-14) Inoue, Jun; Taha, Walid
    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.
  • Loading...
    Thumbnail Image
    Item
    Static analysis for circuit families
    (2010) Salama, Cherif R.; Taha, Walid
    As predicted by Gordon Moore, the number of transistors on a chip has roughly doubled every two years. Microprocessors featuring over a billion transistors are no longer science fiction. For example, Intel's Itanium 9000 series and Intel's Xeon 7400 series of processors feature 1.7 and 1.9 billion transistors respectively. To keep up with the emerging needs of contemporary very large scale integration (VLSI) design, industrial hardware description languages (HDLs) like Verilog and VHDL must be significantly enhanced. This thesis pinpoints some of the main shortcomings of the latest Verilog standard (IEEE 1364-2005) and shows how to overcome them by extending the language in a backward compatible way. To be able to cope with more complex circuits, well-understood higher-level abstraction mechanisms are needed. Verilog is already equipped with promising generative constructs making it possible to concisely describe a family of circuits as a parameterized module; however these constructs suffer from two problems: First, their expressivity is limited and second, they are not adequately supported by current tools. For instance, there are no static guarantees about the properties of the description generated as a result of instantiating a generic description with particular parameter values. Addressing both problems while remaining backward compatible led us to select a statically typed two-level languages (STTL) formal framework. By formalizing a core subset of Verilog as an STTL, we were able to define a static type system capable of: (1) checking the realizability of a description, (2) detecting bus width mismatches and array bounds violations, and (3) providing parametric guarantees on the resources required to realize a generic description. The power of the chosen framework is once more demonstrated as it also allows us to enrich the language with a new set of constructs that are designed to be expanded away when instantiated. To experiment with these ideas we implemented VPP, a Verilog Preprocessor with a built-in type checker. VPP is an unobtrusive tool accepting extended Verilog descriptions but generating descriptions compatible with any tool compliant with the Verilog standard. Our experience throughout this research showed that STTLs present a particularly suitable framework to formalize and implement generative features of a language.
  • Loading...
    Thumbnail Image
    Item
    Static Type Inference for Specialization in a Telescoping Compiler
    (2004-09-01) Allen, Eric; Kennedy, Ken; McCosh, Cheryl; Taha, Walid
    The telescoping languages approach achieves high performance from applications encoded as high-level scripts. The core idea is to pre-compile underlying libraries to generate multiple variants optimized for use indifferent possible contexts including different argument types. This paper proposes a type inference algorithm that enables this kind of specialization. The algorithm infers types over untyped library procedures before actual inputs are known. For our Matlab compiler, the notion of type captures matrix properties such as size, sparsity pattern, and data type. Type inference is necessary both to determine the minimum number of variants needed to handle all possible uses of the library procedure as well as to statically determine, for each variant, which optimized implementations should be dispatched at each call location. A key contribution that arose from this work is a notion of mutually exclusive types. To illustrate these types, we formalize the underlying type system, constraint-collection, and solution. Finally, we prove that the algorithm is polynomial under practical conditions.
  • About R-3
  • Report a Digital Accessibility Issue
  • Request Accessible Formats
  • Fondren Library
  • Contact Us
  • FAQ
  • Privacy Notice
  • R-3 Policies

Physical Address:

6100 Main Street, Houston, Texas 77005

Mailing Address:

MS-44, P.O.BOX 1892, Houston, Texas 77251-1892