Open Access. Powered by Scholars. Published by Universities.®

Programming Languages and Compilers Commons™

Open Access. Powered by Scholars. Published by Universities.®

1,853 Full-Text Articles 3,371 Authors 797,974 Downloads 137 Institutions

All Articles in Programming Languages and Compilers

Faceted Search

1,853 full-text articles. Page 59 of 79.

Safe Zero-Cost Coercions For Haskell, Joachim Breitner, Richard A. Eisenberg, Simon Peyton Jones, Stephanie Weirich 2016 Bryn Mawr College

Safe Zero-Cost Coercions For Haskell, Joachim Breitner, Richard A. Eisenberg, Simon Peyton Jones, Stephanie Weirich

Computer Science Faculty Research and Scholarship

Generative type abstractions – present in Haskell, OCaml, and other languages – are useful concepts to help prevent programmer errors. They serve to create new types that are distinct at compile time but share a run-time representation with some base type. We present a new mechanism that allows for zero-cost conversions between generative type abstractions and their representations, even when such types are deeply nested. We prove type safety in the presence of these conversions and have implemented our work in GHC.


Dependent Types In Haskell: Theory And Practice, Richard A. Eisenberg 2016 Bryn Mawr College

Dependent Types In Haskell: Theory And Practice, Richard A. Eisenberg

Computer Science Faculty Research and Scholarship

Haskell, as implemented in the Glasgow Haskell Compiler (GHC), has been adding new type-level programming features for some time. Many of these features—generalized algebraic datatypes (GADTs), type families, kind polymorphism, and promoted datatypes—have brought Haskell to the doorstep of dependent types. Many dependently typed programs can even currently be encoded, but often the constructions are painful.

In this dissertation, I describe Dependent Haskell, which supports full dependent types via a backward-compatible extension to today’s Haskell. An important contribution of this work is an implementation, in GHC, of a portion of Dependent Haskell, with the rest to follow. The features I …


Data Persistence In Eiffel, Jimmy J. Johnson 2016 University of Kentucky

Data Persistence In Eiffel, Jimmy J. Johnson

Theses and Dissertations--Computer Science

This dissertation describes an extension to the Eiffel programming language that provides automatic object persistence (the ability of programs to store objects and later recreate those objects in a subsequent execution of a program). The mechanism is orthogonal to other aspects of the Eiffel language. The mechanism serves four main purposes: 1) it gives Eiffel programmers a needed service, filling a gap between serialization, which provides limited persistence functions and database-mapping, which is cumbersome to use; 2) it greatly reduces the coding burden incurred by the programmer when objects must persist, allowing the programmer to focus instead on the business …


Spest – A Tool For Specification-Based Testing, Corrigan Redford Johnson 2016 California Polytechnic State University, San Luis Obispo

Spest – A Tool For Specification-Based Testing, Corrigan Redford Johnson

Master's Theses

This thesis presents a tool for SPEcification based teSTing (SPEST). SPEST is designed to use well known practices for automated black-box testing to reduce the burden of testing on developers. The tool uses a simple formal specification language to generate highly-readable unit tests that embody best practices for thorough software testing. Because the specification language used to generate the assertions about the code can be compiled, it can also be used to ensure that documentation describing the code is maintained during development and refactoring.

The utility and effectiveness of SPEST were validated through several exper- iments conducted with students in …


Srcmx: A Gui Application For Srcml, Brian Kovacs 2016 The University of Akron

Srcmx: A Gui Application For Srcml, Brian Kovacs

Williams Honors College, Honors Research Projects

srcMX is a GUI application that utilizes the srcML command-line tool to convert and display source code using the srcML format. The goal is for srcMX to promote the manipulation and exploration of source code using srcML. I also hope that the user-friendly nature inherent to GUI applications allows srcMX to introduce a larger audience to the many features offered by srcML. The application is written in C++ using the Qt and Qt Quick frameworks.


Automated Refactoring Of Legacy Java Software To Enumerated Types, Raffi Khatchadourian 2016 CUNY Hunter College

Automated Refactoring Of Legacy Java Software To Enumerated Types, Raffi Khatchadourian

Publications and Research

Modern Java languages introduce several new features that offer significant improvements over older Java technology. In this article we consider the new enum construct, which provides language support for enumerated types. Prior to recent Java languages, programmers needed to employ various patterns (e.g., the weak enum pattern) to compensate for the absence of enumerated types in Java. Unfortunately, these compensation patterns lack several highly-desirable properties of the enum construct, most notably, type safety. We present a novel fully-automated approach for transforming legacy Java code to use the new enumeration construct. This semantics-preserving approach increases type safety, produces code that is …


An R Package For The Panel Approach Method For Program Evaluation: Pampe, Ainhoa Vega-Bayo 2015 University of the Basque Country

An R Package For The Panel Approach Method For Program Evaluation: Pampe, Ainhoa Vega-Bayo

The R Journal

The pampe package for R implements the panel data approach method for program evaluation designed to estimate the causal effects of political interventions or treatments. This procedure exploits the dependence among cross-sectional units to construct a counterfactual of the treated unit(s), and it is an appropriate method for research events that occur at an aggregate level like countries or regions and that affect only one or a small number of units. The implementation of the pampe package is illustrated using data from Hong Kong and 24 other units, by examining the economic impact of the political and economic integration of …


Toward Unification Of Explicit And Implicit Invocation-Style Programming, Yoonsik Cheon 2015 The University of Texas at El Paso

Toward Unification Of Explicit And Implicit Invocation-Style Programming, Yoonsik Cheon

Departmental Technical Reports (CS)

Subprograms like procedures and methods can be invoked explicitly or implicitly; in implicit invocation, an event implicitly causes the invocation of subprograms that are registered an interest in the event. Mixing these two styles is common in programming and often unavoidable in developing such software as GUI applications and event-based control systems. However, it isn't also uncommon for the mixed use to complicate programming logic and thus produce unclean code, code that is hard to read and understand. We show, through a small but realistic example, that the problem is not much on mixing two different styles itself but more …


A Systematic Derivation Of Loop Specifications Using Patterns, Aditi Barua, Yoonsik Cheon 2015 The University of Texas at El Paso

A Systematic Derivation Of Loop Specifications Using Patterns, Aditi Barua, Yoonsik Cheon

Departmental Technical Reports (CS)

Any non-trivial program contains loop control structures such as while, for and do statements. A formal correctness proof of code containing loop control structures is typically performed using an induction-based technique, and oftentimes the most challenging step of an inductive proof is formulating a correct induction hypothesis. An incorrectly-formulated induction hypothesis will surely lead to a failure of the proof. In this paper we propose a systematic approach for formulating and driving specifications of loop control structures for formal analysis and verification of programs. We explain our approach using while loops and a functional program verification technique in which a …


Conference Report: User! 2015, Torben Tvedebrink 2015 Aalborg University

Conference Report: User! 2015, Torben Tvedebrink

The R Journal

The11thinternational R user conference, useR! 2015, took place in Aalborg, Denmark, 1–3 July 2015. The Department of Mathematical Sciences, Aalborg University, hosted the conference, which took place in Aalborg Congress and Culture Centre.


Mmpp: A Package For Calculating Similarity And Distance Metrics For Simple And Marked Temporal Point Processes, Hideitsu Hino, Ken Takano, Noboru Murata 2015 University of Tsukuba

Mmpp: A Package For Calculating Similarity And Distance Metrics For Simple And Marked Temporal Point Processes, Hideitsu Hino, Ken Takano, Noboru Murata

The R Journal

A simple temporal point process (SPP) is an important class of time series, where the sample realization of the process is solely composed of the times at which events occur. Particular examples of point process data are neuronal spike patterns or spike trains, and a large number of distance and similarity metrics for those data have been proposed. A marked point process (MPP) is an extension of a simple temporal point process, in which a certain vector valued mark is associated with each of the temporal points in the SPP. Analyses of MPPs are of practical importance because instances of …


Abctools: An R Package For Tuning Approximate Bayesian Computation Analyses, Matthew A. Nunes, Dennis Prangle 2015 Lancaster University

Abctools: An R Package For Tuning Approximate Bayesian Computation Analyses, Matthew A. Nunes, Dennis Prangle

The R Journal

Approximate Bayesian computation (ABC) is a popular family of algorithms which perform approximate parameter inference when numerical evaluation of the likelihood function is not possible but data can be simulated from the model. They return a sample of parameter values which produce simulations close to the observed dataset. A standard approach is to reduce the simulated and observed datasets to vectors of summary statistics and accept when the difference between these is below a specified threshold. ABC can also be adapted to perform model choice.

In this article, we present a new software package for R, abctools which provides methods …


Practools: Computations For Design Of Finite Population Samples, Richard Valliant, Jill A. Dever, Frauke Kreuter 2015 Universities of Michigan and Maryland

Practools: Computations For Design Of Finite Population Samples, Richard Valliant, Jill A. Dever, Frauke Kreuter

The R Journal

PracTools is an R package with functions that compute sample sizes for various types of finite population sampling designs when totals or means are estimated. One-, two-, and three-stage designs are covered as well as allocations for stratified sampling and probability proportional to size sampling. Sample allocations can be computed that minimize the variance of an estimator subject to a budget constraint or that minimize cost subject to a precision constraint. The package also contains some specialized functions for estimating variance components and design effects. Several finite populations are included that are useful for classroom instruction.


Clustvarlv: An R Package For The Clustering Of Variables Around Latent Variables, Evelyne Vigneau, Mingkun Chen, El Mostafa Qannari 2015 National College of Veterinary Medicine

Clustvarlv: An R Package For The Clustering Of Variables Around Latent Variables, Evelyne Vigneau, Mingkun Chen, El Mostafa Qannari

The R Journal

The clustering of variables is a strategy for deciphering the underlying structure of a data set. Adopting an exploratory data analysis point of view, the Clustering of Variables around Latent Variables (CLV) approach has been proposed by Vigneau and Qannari (2003). Based on a family of optimization criteria, the CLV approach is adaptable to many situations. In particular, constraints may be introduced in order to take account of additional information about the observations and/or the variables. In this paper, the CLV method is depicted and the R package ClustVarLV including a set of functions developed so far within this framework …


Srcs: Statistical Ranking Color Scheme For Visualizing Parameterized Multiple Pairwise Comparisons With R, Pablo J. Villacorta, José A. Sáez 2015 University of Granada

Srcs: Statistical Ranking Color Scheme For Visualizing Parameterized Multiple Pairwise Comparisons With R, Pablo J. Villacorta, José A. Sáez

The R Journal

The problem of comparing a new solution method against existing ones to find statistically significant differences arises very often in sciences and engineering. When the problem instance being solved is defined by several parameters, assessing a number of methods with respect to many problem configurations simultaneously becomes a hard task. Some visualization technique is required for presenting a large number of statistical significance results in an easily interpretable way. Here we review an existing color-based approach called Statistical Ranking Color Scheme (SRCS) for displaying the results of multiple pairwise statistical comparisons between several methods assessed separately on a number of …


Zoib: An R Package For Bayesian Inference For Beta Regression And Zero/One Inflated Beta Regression, Fang Liu, Yunchuan Kong 2015 University of Notre Dame

Zoib: An R Package For Bayesian Inference For Beta Regression And Zero/One Inflated Beta Regression, Fang Liu, Yunchuan Kong

The R Journal

The beta distribution is a versatile function that accommodates a broad range of probability distribution shapes. Beta regression based on the beta distribution can be used to model a response variable y that takes values in open unit interval (0,1). Zero/one inflated beta (ZOIB) regression models can be applied when y takes values from closed unit interval [0,1]. The ZOIB model is based a piecewise distribution that accounts for the probability mass at 0 and 1, in addition to the probability density within (0,1). This paper introduces an R package– zoib that provides Bayesian inferences for a class of ZOIB …


Vsurf: An R Package For Variable Selection Using Random Forests, Robin Genuer, Jean-Michel Poggi, Christine Tuleau-Malot 2015 University of Bordeaux

Vsurf: An R Package For Variable Selection Using Random Forests, Robin Genuer, Jean-Michel Poggi, Christine Tuleau-Malot

The R Journal

This paper describes the R package VSURF. Based on random forests, and for both regression and classification problems, it returns two subsets of variables. The first is a subset of important variables including some redundancy which can be relevant for interpretation, and the second one is a smaller subset corresponding to a model trying to avoid redundancy focusing more closely on the prediction objective. The two-stage strategy is based on a preliminary ranking of the explanatory variables using the random forests permutation-based score of importance and proceeds using a stepwise forward strategy for variable introduction. The two proposals can …


Generalized Hermite Distribution Modelling With The R Package Hermite, David Moriña, Manuel Higueras, Pedro Puig, María Oliveira 2015 Universitat Pompeu Fabra, Unitat de Bioestadística

Generalized Hermite Distribution Modelling With The R Package Hermite, David Moriña, Manuel Higueras, Pedro Puig, María Oliveira

The R Journal

The Generalized Hermite distribution (and the Hermite distribution as a particular case) is often used for fitting count data in the presence of over-dispersion or multimodality. Despite this, to our knowledge, no standard software packages have implemented specific functions to compute basic probabilities and make simple statistical inference based on these distributions. We present here a set of computational tools that allows the user to face these difficulties by modelling with the Generalized Hermite distribution using the R package hermite. The package can also be used to generate random deviates from a Generalized Hermite distribution and to use basic …


Numerical Evaluation Of The Gauss Hypergeometric Function With The Hypergeo Package, Robin K. S. Hankin 2015 Auckland University of Technology

Numerical Evaluation Of The Gauss Hypergeometric Function With The Hypergeo Package, Robin K. S. Hankin

The R Journal

This paper introduces the hypergeo package of R routines for numerical calculation of hypergeometric functions. The package is focussed on efficient and accurate evaluation of the Gauss hypergeometric function over the whole of the complex plane within the constraints of fixed-precision arithmetic. The hypergeometric series is convergent only within the unit circle, so analytic continuation must be used to define the function outside the unit circle. This short document outlines the numerical and conceptual methods used in the package; and justifies the package philosophy, which is to maintain transparent and verifiable links between the software and Abramowitz and Stegun (1965). …


Treeclust: An R Package For Tree-Based Clustering Dissimilarities, Samuel E. Buttrey, Lyn R. Whitaker 2015 Naval Postgraduate School

Treeclust: An R Package For Tree-Based Clustering Dissimilarities, Samuel E. Buttrey, Lyn R. Whitaker

The R Journal

This paper describes treeClust, an R package that produces dissimilarities useful for clustering. These dissimilarities arise from a set of classification or regression trees, one with each variable in the data acting in turn as a the response, and all others as predictors. This use of trees produces dissimilarities that are insensitive to scaling, benefit from automatic variable selection, and appear to perform well. The software allows a number of options to be set, affecting the set of objects returned in the call; the user can also specify a clustering algorithm and, optionally, return only the clustering vector. The …


Digital Commons powered by bepress