9,982 research outputs found

    Finding The Lazy Programmer's Bugs

    Get PDF
    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

    Get PDF
    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

    Full text link
    We give a new proof of the classical Central Limit Theorem, in the Mallows (LrL^r-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 33-uniform hypergraph

    Get PDF
    We prove that any 33-uniform hypergraph whose minimum vertex degree is at least (59+o(1))(n2)\left(\frac{5}{9} + o(1) \right)\binom{n}{2} admits an almost-spanning tight cycle, that is, a tight cycle leaving o(n)o(n) 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

    Full text link
    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 10−8Jy10^{-8} Jy, 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

    Get PDF
    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.
    • 

    corecore