12,589 research outputs found
Finding The Lazy Programmer's Bugs
Traditionally developers and testers created huge numbers of explicit tests, enumerating interesting cases, perhaps
biased by what they believe to be the current boundary conditions of the function being tested. Or at
least, they were supposed to.
A major step forward was the development of property testing. Property testing requires the user to write a few
functional properties that are used to generate tests, and requires an external library or tool to create test data
for the tests. As such many thousands of tests can be created for a single property. For the purely functional
programming language Haskell there are several such libraries; for example QuickCheck [CH00], SmallCheck
and Lazy SmallCheck [RNL08].
Unfortunately, property testing still requires the user to write explicit tests. Fortunately, we note there are
already many implicit tests present in programs. Developers may throw assertion errors, or the compiler may
silently insert runtime exceptions for incomplete pattern matches.
We attempt to automate the testing process using these implicit tests. Our contributions are in four main
areas: (1) We have developed algorithms to automatically infer appropriate constructors and functions needed
to generate test data without requiring additional programmer work or annotations. (2) To combine the
constructors and functions into test expressions we take advantage of Haskell's lazy evaluation semantics by
applying the techniques of needed narrowing and lazy instantiation to guide generation. (3) We keep the type
of test data at its most general, in order to prevent committing too early to monomorphic types that cause
needless wasted tests. (4) We have developed novel ways of creating Haskell case expressions to inspect elements
inside returned data structures, in order to discover exceptions that may be hidden by laziness, and to make
our test data generation algorithm more expressive.
In order to validate our claims, we have implemented these techniques in Irulan, a fully automatic tool for
generating systematic black-box unit tests for Haskell library code. We have designed Irulan to generate high
coverage test suites and detect common programming errors in the process
Bypassing the Chain of Command: The Political Origins of the RCN’s Equipment Crisis of 1943
At the behest of Angus L. Macdonald, the Minister of National Defence for Naval Services, John Joseph Connolly conducted a secret investigation in October 1943 into the state of equipment on Canadian warships. Connolly, who was Macdonald’s executive assistant, traveled to St. John’s, Londonderry and London where he discovered that the Royal Canadian Navy (RCN) was far behind its allies in the modernization of its escort fleet. Canadian ships lacked gyroscopic compasses, hedgehog, effective radar and asdic, as well as other technical gear that was essential in the Battle of the Atlantic. These deficiencies should not have come as a surprise. Inadequate equipment on RCN ships had already become obvious during the intense convoy battles of 1941, and had been confirmed yet again by those of 1942. Insufficient training and manning policies also played their part in Canadian problems at sea. However, it was to be the technical aspects that Macdonald focused upon once Connolly returned from overseas, leading not only to a disruptive feud with the naval staff, but also, in their way, to the eventual replacement of Vice Admiral Percy W. Nelles as the Chief of the Naval Staff (CNS) in January 1944
Central Limit Theorem and convergence to stable laws in Mallows distance
We give a new proof of the classical Central Limit Theorem, in the Mallows
(-Wasserstein) distance. Our proof is elementary in the sense that it does
not require complex analysis, but rather makes use of a simple subadditive
inequality related to this metric. The key is to analyse the case where
equality holds. We provide some results concerning rates of convergence. We
also consider convergence to stable distributions, and obtain a bound on the
rate of such convergence.Comment: 21 pages; improved version - one result strengthened, exposition
improved, paper to appear in Bernoull
The minimum vertex degree for an almost-spanning tight cycle in a -uniform hypergraph
We prove that any -uniform hypergraph whose minimum vertex degree is at
least admits an almost-spanning
tight cycle, that is, a tight cycle leaving vertices uncovered. The
bound on the vertex degree is asymptotically best possible. Our proof uses the
hypergraph regularity method, and in particular a recent version of the
hypergraph regularity lemma proved by Allen, B\"ottcher, Cooley and Mycroft.Comment: 10 pages. arXiv admin note: text overlap with arXiv:1411.495
Statistical constraints on the IR galaxy number counts and cosmic IR background from the Spitzer GOODS survey
We perform fluctuation analyses on the data from the Spitzer GOODS survey
(epoch one) in the Hubble Deep Field North (HDF-N). We fit a parameterised
power-law number count model of the form dN/dS = N_o S^{-\delta} to data from
each of the four Spitzer IRAC bands, using Markov Chain Monte Carlo (MCMC)
sampling to explore the posterior probability distribution in each case. We
obtain best-fit reduced chi-squared values of (3.43 0.86 1.14 1.13) in the four
IRAC bands. From this analysis we determine the likely differential faint
source counts down to , over two orders of magnitude in flux
fainter than has been previously determined.
From these constrained number count models, we estimate a lower bound on the
contribution to the Infra-Red (IR) background light arising from faint
galaxies. We estimate the total integrated background IR light in the Spitzer
GOODS HDF-N field due to faint sources. By adding the estimates of integrated
light given by Fazio et al (2004), we calculate the total integrated background
light in the four IRAC bands. We compare our 3.6 micron results with previous
background estimates in similar bands and conclude that, subject to our
assumptions about the noise characteristics, our analyses are able to account
for the vast majority of the 3.6 micron background. Our analyses are sensitive
to a number of potential systematic effects; we discuss our assumptions with
regards to noise characteristics, flux calibration and flat-fielding artifacts.Comment: 10 pages; 29 figures (Figure added); correction made to flux scale of
Fazio points in Figure
An Empirical Model of Entry Across Airline Routes with Incomplete Information and Demand Synergies
We define a model of simultaneous entry decisions for N symmetric firms across M markets with demand synergies and incomplete information on marginal costs of production.
Entry and Exchanges of Cost Information
The literature on exchanges of information has ignored firms' entry decisions. Yet, the Federal Trade Commission recently expressed concerns that exchanges of information in business-to-business electronic platforms would adversely impact entry and, thus, consumers. When entry decisions are endogenized in a competitive Cournot model with cost uncertainty, we find results that contrast sharply with current thinking on the welfare consequences of information sharing.
- …