105 research outputs found

    A Proposed Categorical Semantics for ML Modules

    Get PDF
    We present a simple categorical semantics for ML signatures, structures and functors. Our approach relies on realizablity semantics in the category of assemblies. Signatures and structures are modelled as objects in slices of the category of assemblies. Instantiation of signatures to structures and hence functor application is modelled by pullback. 1 Introduction Building on work on the semantics of programming languages in realizability models, in particular that of Wesley Phoa [Pho90] and John Longley [Lon95], we sketch a simple approach to elements of the ML modules system, such as signatures, structures and functors. Once the basic machinery is set up, we will need only quite basic category theory. This paper is an updated and completely revised version of an earlier paper by Michael Fourman and Wesley Phoa [PF92]. The construction of "generic" (in a sense to be defined below) elements and types presented here is essentially the same as in that paper. However, our presentation is ..

    Scoped and Typed Staging by Evaluation

    Full text link
    Using a dependently typed host language, we give a well scoped-and-typed by construction presentation of a minimal two level simply typed calculus with a static and a dynamic stage. The staging function partially evaluating the part of a term that are static is obtained by a model construction inspired by normalisation by evaluation. We then go on to demonstrate how this minimal language can be extended to provide additional metaprogramming capabilities, and to define a higher order functional language evaluating to digital circuit descriptions.Comment: As accepted for publication at PEPM 202

    Syntactically and semantically regular languages of lambda-terms coincide through logical relations

    Full text link
    A fundamental theme in automata theory is regular languages of words and trees, and their many equivalent definitions. Salvati has proposed a generalization to regular languages of simply typed λ\lambda-terms, defined using denotational semantics in finite sets. We provide here some evidence for its robustness. First, we give an equivalent syntactic characterization that naturally extends the seminal work of Hillebrand and Kanellakis connecting regular languages of words and syntactic λ\lambda-definability. Second, we show that any finitary extensional model of the simply typed λ\lambda-calculus, when used in Salvati's definition, recognizes exactly the same class of languages of λ\lambda-terms as the category of finite sets does. The proofs of these two results rely on logical relations and can be seen as instances of a more general construction of a categorical nature, inspired by previous categorical accounts of logical relations using the gluing construction.Comment: The proofs on "finitely pointable" CCCs in versions 1 and 2 were wrong; we now make slightly weaker claims on well-pointed locally finite CCCs. New in this version: added reference [3] and official DOI (proceedings of CSL 2024

    Rethinking Digital Inequalities: The Experience of the Marginalized in Community Technology Centers

    Get PDF
    Thesis (Ph.D.) - Indiana University, Informatics and Computing, 2015Information and communication technologies (ICTs) have emerged as symbols of modernity in the developing world, and currently policy makers and popular press perceived them as bridges to promote social and digital equalities. However, scholars have regularly demonstrated that digital inclusion projects have often failed to meet expectations related to human development objectives. Some postulate that the problem may not be entirely one of project failure, but rather of our limited understanding of the value that technology provides. Hence, this dissertation emphasizes the socio-cultural aspects of digital inclusion projects aimed at favela residents and attempts to understand ICTs aspects and practices from their perspective. Favelas, urban slums in Brazil, are considered marginalized areas due to the absence of State social and physical investments. As a consequence of this, such areas lack proper infrastructure, sanitation and road systems and provide their residents, the marginalized, with a low quality of life. Favela residents are deprived not only of proper services for their basic needs, such as health and education, but also of access to technology and Internet. Most of them rely on community technology centers (CTCs) to access ICTs. Based on an over eight-month ethnography in the favelas of Vitória, Brazil, this dissertation focuses on the motivations, engagements, and adoption of ICTs by favela residents in CTCs. It asks the following questions: (1) What is their experience using CTCs? (2) How does their experience inform the ways we should think about what constitutes empowerment and disempowerment vis-à-vis ICTs? It argues that theoretical positions stemming from technology utilitarianism need expanding, because mundane and non-instrumental practices observed in the favelas shed light on the importance of technology in a variety of dimensions within people’s lives. Encompassing such practices contributes to a broader comprehension of the engagements and strategies that help shape the daily use of technology by people who suffer the consequences of being poor and marginalized

    Normalization by evaluation for call-by-push-value and polarized lambda calculus

    Get PDF
    We observe that normalization by evaluation for simply-typed lambda-calculus with weak coproducts can be carried out in a weak bi-cartesian closed category of presheaves equipped with a monad that allows us to perform case distinction on neutral terms of sum type. The placement of the monad influences the normal forms we obtain: for instance, placing the monad on coproducts gives us eta-long beta-pi normal forms where pi refers to permutation of case distinctions out of elimination positions. We further observe that placing the monad on every coproduct is rather wasteful, and an optimal placement of the monad can be determined by considering polarized simple types inspired by focalization. Polarization classifies types into positive and negative, and it is sufficient to place the monad at the embedding of positive types into negative ones. We consider two calculi based on polarized types: pure call-by-push-value (CBPV) and polarized lambda-calculus, the natural deduction calculus corresponding to focalized sequent calculus. For these two calculi, we present algorithms for normalization by evaluation. We further discuss different implementations of the monad and their relation to existing normalization proofs for lambda-calculus with sums. Our developments have been partially formalized in the Agda proof assistant

    POPLMark reloaded: Mechanizing proofs by logical relations

    Get PDF
    We propose a new collection of benchmark problems in mechanizing the metatheory of programming languages, in order to compare and push the state of the art of proof assistants. In particular, we focus on proofs using logical relations (LRs) and propose establishing strong normalization of a simply typed calculus with a proof by Kripke-style LRs as a benchmark. We give a modern view of this well-understood problem by formulating our LR on well-typed terms. Using this case study, we share some of the lessons learned tackling this problem in different dependently typed proof environments. In particular, we consider the mechanization in Beluga, a proof environment that supports higher-order abstract syntax encodings and contrast it to the development and strategies used in general-purpose proof assistants such as Coq and Agda. The goal of this paper is to engage the community in discussions on what support in proof environments is needed to truly bring mechanized metatheory to the masses and engage said community in the crafting of future benchmarks

    A Typing Discipline for Hardware Interfaces

    Get PDF
    Modern Systems-on-a-Chip (SoC) are constructed by composition of IP (Intellectual Property) Cores with the communication between these IP Cores being governed by well described interaction protocols. However, there is a disconnect between the machine readable specification of these protocols and the verification of their implementation in known hardware description languages. Although tools can be written to address such separation of concerns, the tooling is often hand written and used to check hardware designs a posteriori. We have developed a dependent type-system and proof-of-concept modelling language to reason about the physical structure of hardware interfaces using user provided descriptions. Our type-system provides correct-by-construction guarantees that the interfaces on an IP Core will be well-typed if they adhere to a specified standard

    Everybody's got to be somewhere

    Get PDF
    The key to any nameless representation of syntax is how it indicates the variables we choose to use and thus, implicitly, those we discard. Standard de Bruijn representations delay discarding maximally till the leaves of terms where one is chosen from the variables in scope at the expense of the rest. Consequently, introducing new but unused variables requires term traversal. This paper introduces a nameless 'co-de-Bruijn' representation which makes the opposite canonical choice, delaying discarding minimally, as near as possible to the root. It is literate Agda: dependent types make it a practical joy to express and be driven by strong intrinsic invariants which ensure that scope is aggressively whittled down to just the support of each subterm, in which every remaining variable occurs somewhere. The construction is generic, delivering a universe of syntaxes with higher-order metavariables, for which the appropriate notion of substitution is hereditary. The implementation of simultaneous substitution exploits tight scope control to avoid busywork and shift terms without traversal. Surprisingly, it is also intrinsically terminating, by structural recursion alone

    Scoped and typed staging by evaluation

    Get PDF
    Using a dependently typed host language, we give a well scoped-and-typed by construction presentation of a minimal two level simply typed calculus with a static and a dynamic stage. The staging function partially evaluating the parts of a term that are static is obtained by a model construction inspired by normalisation by evaluation. We then go on to demonstrate how this minimal language can be extended to provide additional metaprogramming capabilities, and to define a higher order functional language evaluating to digital circuit descriptions
    corecore