149 research outputs found

    Dependently typed array programs don't go wrong

    Get PDF
    AbstractThe array programming paradigm adopts multidimensional arrays as the fundamental data structures of computation. Array operations process entire arrays instead of just single elements. This makes array programs highly expressive and introduces data parallelism in a natural way. Array programming imposes non-trivial structural constraints on ranks, shapes, and element values of arrays. A prominent example where such constraints are violated are out-of-bound array accesses. Usually, such constraints are enforced by means of run time checks. Both the run time overhead inflicted by dynamic constraint checking and the uncertainty of proper program evaluation are undesirable.We propose a novel type system for array programs based on dependent types. Our type system makes dynamic constraint checks obsolete and guarantees orderly evaluation of well-typed programs. We employ integer vectors of statically unknown length to index array types. We also show how constraints on these vectors are resolved using a suitable reduction to integer scalars. Our presentation is based on a functional array calculus that captures the essence of the paradigm without the legacy and obfuscation of a fully-fledged array programming language

    DDC: un depurador declarativo para C++

    Get PDF
    Trabajo Fin de Máster en Métodos Formales en Ingeniería Informática, Facultad de Informática UCM, Departamento de Sistemas Informáticos y Computación, Curso 2021/2022.A declarative debugger for C++ is presented, called DDC. A declarative debugger receives as input an incorrect computation, builds a debugging tree based on the execution of the program and, after asking questions to an oracle (typically the user), points out a fragment of code that is the cause of the failure. We present the debugger’s main features, such as three different navigation strategies, using test cases as oracles, support for nonterminating programs and a tree transformation.Presentamos un depurador declarativo para C++, llamado DDC. Un depurador declarativo recibe como argumento de entrada una computación incorrecta, construye un árbol de depuración basado en la ejecución del programa y, después de preguntar a un oráculo (típicamente el usuario), indica el fragmento de código causante del fallo. Presentamos las principales características del depurador, tales como tres estrategias de navegación, el uso de casos de prueba como oráculo, capacidad de depurar programas que no terminan y una transformación de árbol.Depto. de Sistemas Informáticos y ComputaciónFac. de InformáticaTRUEunpu

    Practical implementation of a dependently typed functional programming language

    Get PDF
    Types express a program's meaning, and checking types ensures that a program has the intended meaning. In a dependently typed programming language types are predicated on values, leading to the possibility of expressing invariants of a program's behaviour in its type. Dependent types allow us to give more detailed meanings to programs, and hence be more confident of their correctness. This thesis considers the practical implementation of a dependently typed programming language, using the Epigram notation defined by McBride and McKinna. Epigram is a high level notation for dependently typed functional programming elaborating to a core type theory based on Lu๙s UTT, using Dybjer's inductive families and elimination rules to implement pattern matching. This gives us a rich framework for reasoning about programs. However, a naive implementation introduces several run-time overheads since the type system blurs the distinction between types and values; these overheads include the duplication of values, and the storage of redundant information and explicit proofs. A practical implementation of any programming language should be as efficient as possible; in this thesis we see how the apparent efficiency problems of dependently typed programming can be overcome and that in many cases the richer type information allows us to apply optimisations which are not directly available in traditional languages. I introduce three storage optimisations on inductive families; forcing, detagging and collapsing. I further introduce a compilation scheme from the core type theory to G-machine code, including a pattern matching compiler for elimination rules and a compilation scheme for efficient run-time implementation of Peano's natural numbers. We also see some low level optimisations for removal of identity functions, unused arguments and impossible case branches. As a result, we see that a dependent type theory is an effective base on which to build a feasible programming language

    Sandspur, Vol 104 No 16, March 12, 1998

    Get PDF
    Rollins College student newspaper, written by the students and published at Rollins College. The Sandspur started as a literary journal.https://stars.library.ucf.edu/cfm-sandspur/1094/thumbnail.jp

    The Cord Weekly (March 26, 2008)

    Get PDF

    Design and optimisation of scientific programs in a categorical language

    Get PDF
    This thesis presents an investigation into the use of advanced computer languages for scientific computing, an examination of performance issues that arise from using such languages for such a task, and a step toward achieving portable performance from compilers by attacking these problems in a way that compensates for the complexity of and differences between modern computer architectures. The language employed is Aldor, a functional language from computer algebra, and the scientific computing area is a subset of the family of iterative linear equation solvers applied to sparse systems. The linear equation solvers that are considered have much common structure, and this is factored out and represented explicitly in the lan-guage as a framework, by means of categories and domains. The flexibility introduced by decomposing the algorithms and the objects they act on into separate modules has a strong performance impact due to its negative effect on temporal locality. This necessi-tates breaking the barriers between modules to perform cross-component optimisation. In this instance the task reduces to one of collective loop fusion and array contrac

    The BG News May 2, 1978

    Get PDF
    The BGSU campus student newspaper May 2, 1978. Volume 62 - Issue 93https://scholarworks.bgsu.edu/bg-news/4489/thumbnail.jp

    Against a Universal Definition of 'Type'

    Get PDF
    What is the definition of 'type'? Having a clear and precise answer to this question would avoid many misunderstandings and prevent meaningless discussions that arise from them. But having such clear and precise answer to this question would also hurt science, "hamper the growth of knowledge" and "deflect the course of investigation into narrow channels of things already understood". In this essay, I argue that not everything we work with needs to be precisely defined. There are many definitions used by different communities, but none of them applies universally. A brief excursion into philosophy of science shows that this is not just tolerable, but necessary for progress. Philosophy also suggests how we can think about this imprecise notion of type

    The Pacifican, November 3, 1978

    Get PDF
    https://scholarlycommons.pacific.edu/pacifican/2516/thumbnail.jp
    • …
    corecore