1,156 research outputs found

    Type Classes for Lightweight Substructural Types

    Full text link
    Linear and substructural types are powerful tools, but adding them to standard functional programming languages often means introducing extra annotations and typing machinery. We propose a lightweight substructural type system design that recasts the structural rules of weakening and contraction as type classes; we demonstrate this design in a prototype language, Clamp. Clamp supports polymorphic substructural types as well as an expressive system of mutable references. At the same time, it adds little additional overhead to a standard Damas-Hindley-Milner type system enriched with type classes. We have established type safety for the core model and implemented a type checker with type inference in Haskell.Comment: In Proceedings LINEARITY 2014, arXiv:1502.0441

    Multi-Objective Water Management in Idaho\u27s Henrys Fork Watershed: Leveraging Reservoir Operation and Groundwater Pathways to Benefit Aquatic Habitat

    Get PDF
    Multi-user water management is a challenging arena further complicated by climate change. This research is based in the Henrys Fork, Snake River, Idaho—an agricultural watershed that exemplifies those throughout the semi-arid American West. This dissertation uses an integrated approach that considers groundwater-river relationships, farm-scale decisions and basin-scale outcomes, upstream reservoir operation for downstream aquatic habitat, water rights, and collaborative stakeholder management to identify drought adaptation strategies accordingly. Chapter 2 uses an interdisciplinary approach to quantify how improvements to irrigation efficiency at the farm-scale (i.e., converting from flood to sprinkler irrigation) can add up to affect hydrology at the landscape-scale and alter groundwater-surface water relationships. Motivated to improve economic efficiency, irrigators began converting from surface to center-pivot sprinkler irrigation in the 1950s, with rapid adoption of center-pivot sprinklers through 2000. Between 1978–2000 and 2001–2022, annual surface-water diversion decreased by 2,521 acre-ft (23%) and annual return flow to the river decreased by 2,431 acre-ft. Chapter 3 uses streamflow predictions, local reservoir operation standards, and the relationship between groundwater and river flows to quantify 1) the potential to conduct aquifer recharge in the lower watershed under a warming climate and 2) resulting streamflow response from groundwater. Water for recharge was largely available in April and October, reducing peak springtime streamflow at the watershed outlet by 10–14% after accounting for groundwater return. Streamflow contribution from recharge peaked in July and November, increasing July–August streamflow by 6–14% and November–March streamflow by 9–14%. I demonstrate recharge can recover groundwater return flows when applied as flood irrigation on agricultural land with senior water rights. Chapter 4 developed relationships between streamflow and habitat for three fish species in a reach where irrigation-season flows are managed by releases from an upstream reservoir. I used these relationships to 1) quantify aquatic habitat at different streamflows and 2) assess the differences in aquatic habitat across two different streamflow management histories. Using these relationships, I demonstrated that moving the management target\u27s location and flow amount will contribute to more consistently suitable fish habitat in the reach while continuing to meet upstream management objectives

    Type-safe Linking and Modular Assembly Language

    Get PDF
    Linking is a low-level task that is usually vaguely specified, if at all, by language definitions. However, the security of web browsers and other extensible systems depends crucially upon a set of checks that must be performed at link time. Building upon the simple, but elegant ideas of Cardelli, and module constructs from high-level languages, we present a formal model of typed object files and a set of inference rules that are sufficient to guarantee that type safety is preserved by the linking process. Whereas Cardelli's link calculus is built on top of the simply-typed lambda calculus, our object files are based upon typed assembly language so that we may model important low-level implementation issues. Furthermore, unlike Cardelli, we provide support for abstract types and higher-order type constructors - features critical for building extensible systems or modern programming languages such as ML.Engineering and Applied Science

    TWAM: A Certifying Abstract Machine for Logic Programs

    Full text link
    Type-preserving (or typed) compilation uses typing derivations to certify correctness properties of compilation. We have designed and implemented a type-preserving compiler for a simply-typed dialect of Prolog we call T-Prolog. The crux of our approach is a new certifying abstract machine which we call the Typed Warren Abstract Machine (TWAM). The TWAM has a dependent type system strong enough to specify the semantics of a logic program in the logical framework LF. We present a soundness metatheorem which constitutes a partial correctness guarantee: well-typed programs implement the logic program specified by their type. This metatheorem justifies our design and implementation of a certifying compiler from T-Prolog to TWAM.Comment: 41 pages, under submission to ACM Transactions on Computational Logi
    • …
    corecore