274,452 research outputs found

    JMatch: Java plus Pattern Matching

    Full text link
    The JMatch language extends Java with \emph{iterable abstract pattern matching}, pattern matching that is compatible with the data abstraction features of Java and makes iteration abstractions convenient. JMatch has ML-style deep pattern matching, but patterns can be abstract; they are not tied to algebraic data constructors. A single JMatch method may be used in several modes; modes may share a single implementation as a boolean formula. Modal abstraction simplifies specification and implementation of abstract data types. This paper describes the JMatch language and its implementation. (updated April 20, 2005)

    Boxes Go Bananas: Encoding Higher-Order Abstract Syntax With Parametric Polymorphism (Extended Version)

    Get PDF
    Higher-order abstract syntax is a simple technique for implementing languages with functional programming. Object variables and binders are implemented by variables and binders in the host language. By using this technique, one can avoid implementing common and tricky routines dealing with variables, such as capture-avoiding substitution. However, despite the advantages this technique provides, it is not commonly used because it is difficult to write sound elimination forms (such as folds or catamorphisms) for higher-order abstract syntax. To fold over such a datatype, one must either simultaneously define an inverse operation (which may not exist) or show that all functions embedded in the datatype are parametric. In this paper, we show how first-class polymorphism can be used to guarantee the parametricity of functions embedded in higher-order abstract syntax. With this restriction, we implement a library of iteration operators over data-structures containing functionals. From this implementation, we derive fusion laws that functional programmers may use to reason about the iteration operator. Finally, we show how this use of parametric polymorphism corresponds to the Schürmann, Despeyroux and Pfenning method of enforcing parametricity through modal types. We do so by using this library to give a sound and complete encoding of their calculus into System Fω. This encoding can serve as a starting point for reasoning about higher-order structures in polymorphic languages

    Type-Based Termination, Inflationary Fixed-Points, and Mixed Inductive-Coinductive Types

    Full text link
    Type systems certify program properties in a compositional way. From a bigger program one can abstract out a part and certify the properties of the resulting abstract program by just using the type of the part that was abstracted away. Termination and productivity are non-trivial yet desired program properties, and several type systems have been put forward that guarantee termination, compositionally. These type systems are intimately connected to the definition of least and greatest fixed-points by ordinal iteration. While most type systems use conventional iteration, we consider inflationary iteration in this article. We demonstrate how this leads to a more principled type system, with recursion based on well-founded induction. The type system has a prototypical implementation, MiniAgda, and we show in particular how it certifies productivity of corecursive and mixed recursive-corecursive functions.Comment: In Proceedings FICS 2012, arXiv:1202.317

    Cyclic Datatypes modulo Bisimulation based on Second-Order Algebraic Theories

    Full text link
    Cyclic data structures, such as cyclic lists, in functional programming are tricky to handle because of their cyclicity. This paper presents an investigation of categorical, algebraic, and computational foundations of cyclic datatypes. Our framework of cyclic datatypes is based on second-order algebraic theories of Fiore et al., which give a uniform setting for syntax, types, and computation rules for describing and reasoning about cyclic datatypes. We extract the "fold" computation rules from the categorical semantics based on iteration categories of Bloom and Esik. Thereby, the rules are correct by construction. We prove strong normalisation using the General Schema criterion for second-order computation rules. Rather than the fixed point law, we particularly choose Bekic law for computation, which is a key to obtaining strong normalisation. We also prove the property of "Church-Rosser modulo bisimulation" for the computation rules. Combining these results, we have a remarkable decidability result of the equational theory of cyclic data and fold.Comment: 38 page

    Instructor perspectives on iteration during upper-division optics lab activities

    Full text link
    Although developing proficiency with modeling is a nationally endorsed learning outcome for upper-division undergraduate physics lab courses, no corresponding research-based assessments exist. Our longterm goal is to develop assessments of students' modeling ability that are relevant across multiple upper-division lab contexts. To this end, we interviewed 19 instructors from 16 institutions about optics lab activities that incorporate photodiodes. Interviews focused on how those activities were designed to engage students in some aspects of modeling. We find that, according to many interviewees, iteration is an important aspect of modeling. In addition, interviewees described four distinct types of iteration: revising apparatuses, revising models, revising data-taking procedures, and repeating data collection using existing apparatuses and procedures. We provide examples of each type of iteration, and discuss implications for the development of future modeling assessments.Comment: 4 pages, 1 figure; under revie

    An architecture-based dependability modeling framework using AADL

    Full text link
    For efficiency reasons, the software system designers' will is to use an integrated set of methods and tools to describe specifications and designs, and also to perform analyses such as dependability, schedulability and performance. AADL (Architecture Analysis and Design Language) has proved to be efficient for software architecture modeling. In addition, AADL was designed to accommodate several types of analyses. This paper presents an iterative dependency-driven approach for dependability modeling using AADL. It is illustrated on a small example. This approach is part of a complete framework that allows the generation of dependability analysis and evaluation models from AADL models to support the analysis of software and system architectures, in critical application domains
    • …
    corecore