263 research outputs found

    The Lean mathematical library

    Full text link
    This paper describes mathlib, a community-driven effort to build a unified library of mathematics formalized in the Lean proof assistant. Among proof assistant libraries, it is distinguished by its dependently typed foundations, focus on classical mathematics, extensive hierarchy of structures, use of large- and small-scale automation, and distributed organization. We explain the architecture and design decisions of the library and the social organization that has led us here

    Sized Types for low-level Quantum Metaprogramming

    Full text link
    One of the most fundamental aspects of quantum circuit design is the concept of families of circuits parametrized by an instance size. As in classical programming, metaprogramming allows the programmer to write entire families of circuits simultaneously, an ability which is of particular importance in the context of quantum computing as algorithms frequently use arithmetic over non-standard word lengths. In this work, we introduce metaQASM, a typed extension of the openQASM language supporting the metaprogramming of circuit families. Our language and type system, built around a lightweight implementation of sized types, supports subtyping over register sizes and is moreover type-safe. In particular, we prove that our system is strongly normalizing, and as such any well-typed metaQASM program can be statically unrolled into a finite circuit.Comment: Presented at Reversible Computation 2019. Final authenticated publication is available online at https://doi.org/10.1007/978-3-030-21500-2_

    Formalizing the Ring of Witt Vectors

    Full text link
    The ring of Witt vectors WR\mathbb{W} R over a base ring RR is an important tool in algebraic number theory and lies at the foundations of modern pp-adic Hodge theory. WR\mathbb{W} R has the interesting property that it constructs a ring of characteristic 00 out of a ring of characteristic p>1p > 1, and it can be used more specifically to construct from a finite field containing Z/pZ\mathbb{Z}/p\mathbb{Z} the corresponding unramified field extension of the pp-adic numbers Qp\mathbb{Q}_p (which is unique up to isomorphism). We formalize the notion of a Witt vector in the Lean proof assistant, along with the corresponding ring operations and other algebraic structure. We prove in Lean that, for prime pp, the ring of Witt vectors over Z/pZ\mathbb{Z}/p\mathbb{Z} is isomorphic to the ring of pp-adic integers Zp\mathbb{Z}_p. In the process we develop idioms to cleanly handle calculations of identities between operations on the ring of Witt vectors. These calculations are intractable with a naive approach, and require a proof technique that is usually skimmed over in the informal literature. Our proofs resemble the informal arguments while being fully rigorous

    ECOOP'97 - Object-Oriented Programming

    Get PDF

    A Generative Programming Framework for Adaptive Middleware

    Get PDF
    Historically, many distributed real-time and embedded (DRE) systems were developed manually from scratch, leading to stove-piped solutions that while correct in both functional and QoS properties were very expensive to develop and difficult to maintain and extend. First-generation middleware technologies such as CORBA 2.x [1], XML [2], and SOAP [3], served to shield application developers from low-level platform details, thus raising the level of abstraction at which distributed systems are developed and supporting reuse of infrastructure to amortize development costs over the lifetime of a system. However, interdependencies between services and object interfaces resulting from these programming models significantly limited the degree of reuse that could be achieved in practice. Component middleware technologies such as the CORBA Component Model (CCM) [4], J2EE [5], and .NET [6], were developed to address many of these limitations. In CCM, for example, standardization of component containers, ports, and homes offered a framework within which reuse of server as well as client infrastructure was facilitated. Component-oriented middleware has addressed a wide range of application domains, but unfortunately for DRE systems, the focus of these technologies has been primarily on functional and not QoS properties. For example, although CCM supports configuration of functional component attributes like their interconnections, key QoS attributes for DRE systems, such as execution times and invocation rates are inadequately configurable through conventional CCM [7]. Research on QoS-aware component models such as the CIAO project [8, 7] is showing significant promise in making QoS configuration a first-class part of the component pro-gramming model, thus further reducing accidental complex-ities of building DRE systems. However, it is important to note a fundamental difference between configuration of functional and QoS properties even within such a unified compo-nent model: the dominant decomposition of functional properties is essentially object-oriented, while the dominant decomposition of QoS properties is essentially aspect-oriented. That is, functional properties tend to be stable with respect to component boundaries and configuration lifecycle stages, while QoS properties tend to cross-cut component boundaries, and may be revised as more information is known in later configuration stages [7]. In this paper, we describe how a focus on aspect frameworks for configuring QoS properties both com-plements and extends QoS-aware component models. This paper makes three main contributions to the state of the art in DRE systems middleware. First, it describes a simple but representative problem for configuring QoS aspects that cross-cut both architectural layers and system lifecycle boundaries, which motivates our focus on aspect frameworks. Second, it provides a formalization of that problem using first order logic, which both guides the design of aspect configuration infrastructure, and offers a way to connect these techniques with model-integrated computing [9] approaches to further reduce the programming burden on DRE system developers. Third, it describes alternative mechanisms to ensure correct configuration of the aspects involved, and notes the phases of the DRE system lifecycle at which each such configuration mechanism is most appropriate

    ContextErlang: A language for distributed context-aware self-adaptive applications

    Get PDF
    Self-adaptive software modifies its behavior at run time to satisfy changing requirements in a dynamic environment. Context-oriented programming (COP) has been recently proposed as a specialized programming paradigm for context-aware and adaptive systems. COP mostly focuses on run time adaptation of the application’s behavior by supporting modular descriptions of behavioral variations. However, self-adaptive applications must satisfy additional requirements, such as distribution and concurrency, support for unforeseen changes and enforcement of correct behavior in the presence of dynamic change. Addressing these issues at the language level requires a holistic design that covers all aspects and takes into account the possibly cumbersome interaction of those features, for example concurrency and dynamic change. We present ContextErlang, a COP programming language in which adaptive abstractions are seamlessly integrated with distribution and concurrency. We define ContextErlang’s formal semantics, validated through an executable prototype, and we show how it supports formal proofs that the language design ensures satisfaction of certain safety requirements. We provide empirical evidence that ContextErlang is an effective solution through case studies and a performance assessment. We also show how the same design principles that lead to the development of ContextErlang can be followed to systematically design contextual extensions of other languages. A concrete example is presented concerning ContextScala
    corecore