23 research outputs found

    Phobos: A front-end approach to extensible compilers (long version)

    Get PDF
    This paper describes a practical approach for implementing certain types of domain-specific languages with extensible compilers. Given a compiler with one or more front-end languages, we introduce the idea of a "generic" front-end that allows the syntactic and semantic specification of domain-specific languages. Phobos, our generic front-end, offers modular language specification, allowing the programmer to define new syntax and semantics incrementally

    Formal Compiler Implementation in a Logical Framework

    Get PDF
    The task of designing and implementing a compiler can be a difficult and error-prone process. In this paper, we present a new approach based on the use of higher-order abstract syntax and term rewriting in a logical framework. All program transformations, from parsing to code generation, are cleanly isolated and specified as term rewrites. This has several advantages. The correctness of the compiler depends solely on a small set of rewrite rules that are written in the language of formal mathematics. In addition, the logical framework guarantees the preservation of scoping, and it automates many frequently-occurring tasks including substitution and rewriting strategies. As we show, compiler development in a logical framework can be easier than in a general-purpose language like ML, in part because of automation, and also because the framework provides extensive support for examination, validation, and debugging of the compiler transformations. The paper is organized around a case study, using the MetaPRL logical framework to compile an ML-like language to Intel x86 assembly. We also present a scoped formalization of x86 assembly in which all registers are immutable

    Piglets to the rescue Declarative User Interface Specification with Pluggable View Models

    Get PDF
    Abstract This paper introduces Pluggable Interactive GUI-lets (or Piglets, for short) as a mean for constructing reusable, reactive graphical user interfaces that can be instantiated over different view models and presentation layers. Piglets therefore provide an attractive alternative for pragmatic user interface specification that can target multiple content delivery channels from the same declarative, type-safe user interface definition, keeping programmers happy and highly productive

    Process Migration and Transactions Using a Novel Intermediate Language

    Get PDF
    [no abstract

    Phobos: A front-end approach to extensible compilers

    No full text
    This paper describes a practical approach for implementing domain-specific languages with extensible compilers. Given a compiler with one or more front-end languages, we introduce the idea of a "generic" front-end that allows the syntactic and semantic specification of domainspecific languages. Phobos, our generic front-end, offers modular language specification, allowing the programmer to define new syntax and semantics incrementally

    Expert F#

    No full text
    Expert F# is about practical programming in a beautiful language that puts the power and elegance of functional programming into the hands of .NET developers. In combination with .NET, F# achieves unrivaled levels of programmer productivity and program clarity. This books serves as •The authoritative guide to F# by the designer of F# •A comprehensive reference of F# concepts, syntax, and features •A treasury of expert F# techniques for practical, real–world programming While inspired by OCaml, F# isn't just another functional programming language. Drawing on many of the strengths of both OCaml and .NET, it's a general–purpose language ideal for real–world development. F# integrates functional, imperative, and object–oriented programming styles so you can flexibly and elegantly solve programming problems, and brings .NET development alive with interactive execution. Whatever your background, you'll find that F# is easy to learn, fun to use, and extraordinarily powerful. F# will help change the way you think about and go about programming. Written by F#’s designer and two active contributors, Expert F# is the authoritative, comprehensive, and in–depth guide to the language and its use. Designed to help others become experts, the book gives a thorough introduction to the F# language from quick essentials to in–depth advanced topics such as active pattern matching, aggregate data types and operators, sequence expressions, lazy values, mutable data and side–effects, generics, type augmentations, functional decomposition and code organization. The second half of the book is devoted to examining the practical application of F#, providing elegant solutions to common programming tasks including user interface implementation, data access, web and distributed programming, symbolic and numerical computations, concurrent programming, testing, profiling, and interoperability with other languages. The latest hot developments in F# and .NET are also addressed, including Active Patterns, implicit class construction, integration with LINQ over relational data, meta programming and useful tips for working with Visual Studio and F# command–line tools

    Expert F# 20

    No full text
    Expert F# 2.0 is about practical programming in a beautiful language that puts the power and elegance of functional programming into the hands of professional developers. In combination with .NET, F# achieves unrivaled levels of programmer productivity and program clarity. Expert F# 2.0 is * The authoritative guide to F# by the inventor of F# * A comprehensive reference of F# concepts, syntax, and features * A treasury of expert F# techniques for practical, real-world programming F# isn't just another functional programming language. It's a general-purpose language ideal for real-world develo

    Rewriting UNITY

    No full text
    In this paper we describe the implementation of the UNITY formalism as an extension of general-purpose languages and show its translation to C abstract syntax using Phobos, our generic front-end in the Mojave compiler. Phobos uses term rewriting to define the syntax and semantics of arbitrary languages, and automates their translation to an internal compiler representation. Furthermore, it provides access to formal reasoning capabilities using the integrated MetaPRL theorem prover, through which advanced optimizations and transformations can be implemented or formal proofs derived

    Compiler implementation in a formal logical framework

    No full text
    he task of designing and implementing a compiler can be a difficult and error-prone process. In this paper, we present a new approach based on the use of higher-order abstract syntax and term rewriting in a logical framework. All program transformations, from parsing to code generation, are cleanly isolated and specified as term rewrites. This has several advantages. The correctness of the compiler depends solely on a small set of rewrite rules that are written in the language of formal mathematics. In addition, the logical framework guarantees the preservation of scoping, and it automates many frequently-occurring tasks including substitution and rewriting strategies. As we show, compiler development in a logical framework can be easier than in a general-purpose language like ML, in part because of automation, and also because the framework provides extensive support for examination, validation, and debugging of the compiler transformations. The paper is organized around a case study, using the MetaPRL logical framework to compile an ML-like language to Intel x86 assembly. We also present a scoped formalization of x86 assembly in which all registers are immutable
    corecore