11,207 research outputs found

    A principled approach to programming with nested types in Haskell

    Get PDF
    Initial algebra semantics is one of the cornerstones of the theory of modern functional programming languages. For each inductive data type, it provides a Church encoding for that type, a build combinator which constructs data of that type, a fold combinator which encapsulates structured recursion over data of that type, and a fold/build rule which optimises modular programs by eliminating from them data constructed using the buildcombinator, and immediately consumed using the foldcombinator, for that type. It has long been thought that initial algebra semantics is not expressive enough to provide a similar foundation for programming with nested types in Haskell. Specifically, the standard folds derived from initial algebra semantics have been considered too weak to capture commonly occurring patterns of recursion over data of nested types in Haskell, and no build combinators or fold/build rules have until now been defined for nested types. This paper shows that standard folds are, in fact, sufficiently expressive for programming with nested types in Haskell. It also defines buildcombinators and fold/build fusion rules for nested types. It thus shows how initial algebra semantics provides a principled, expressive, and elegant foundation for programming with nested types in Haskell

    Foundations for structured programming with GADTs

    Get PDF
    GADTs are at the cutting edge of functional programming and become more widely used every day. Nevertheless, the semantic foundations underlying GADTs are not well understood. In this paper we solve this problem by showing that the standard theory of data types as carriers of initial algebras of functors can be extended from algebraic and nested data types to GADTs. We then use this observation to derive an initial algebra semantics for GADTs, thus ensuring that all of the accumulated knowledge about initial algebras can be brought to bear on them. Next, we use our initial algebra semantics for GADTs to derive expressive and principled tools — analogous to the well-known and widely-used ones for algebraic and nested data types — for reasoning about, programming with, and improving the performance of programs involving, GADTs; we christen such a collection of tools for a GADT an initial algebra package. Along the way, we give a constructive demonstration that every GADT can be reduced to one which uses only the equality GADT and existential quantification. Although other such reductions exist in the literature, ours is entirely local, is independent of any particular syntactic presentation of GADTs, and can be implemented in the host language, rather than existing solely as a metatheoretical artifact. The main technical ideas underlying our approach are (i) to modify the notion of a higher-order functor so that GADTs can be seen as carriers of initial algebras of higher-order functors, and (ii) to use left Kan extensions to trade arbitrary GADTs for simpler-but-equivalent ones for which initial algebra semantics can be derive

    Perception is Everything: Repairing the Image of American Drone Warfare

    Get PDF
    This thesis will trace the United States’ development of unmanned warfare from its initial use in the World Wars through the Cold War to its final maturation in the War on Terror. The examination will provide a summary of unmanned warfare’s history, its gradual adoption, and concerns regarding the proliferation of drones use to understand the emphasis on unmanned weapons in the American Military. In each phase of development, a single program will be focused on to highlight special areas of interest in the modern day. Finally, the modern era of unmanned systems will focus on the growing integration of new weapon systems which no longer fulfill niche roles in the armory but act as fully vetted frontline combatants. Brought together, this examination will show drones have earned their place as integral tools in the American military inventory as faithful defenders of democracy

    Reasoning about modular datatypes with Mendler induction

    Full text link
    In functional programming, datatypes a la carte provide a convenient modular representation of recursive datatypes, based on their initial algebra semantics. Unfortunately it is highly challenging to implement this technique in proof assistants that are based on type theory, like Coq. The reason is that it involves type definitions, such as those of type-level fixpoint operators, that are not strictly positive. The known work-around of impredicative encodings is problematic, insofar as it impedes conventional inductive reasoning. Weak induction principles can be used instead, but they considerably complicate proofs. This paper proposes a novel and simpler technique to reason inductively about impredicative encodings, based on Mendler-style induction. This technique involves dispensing with dependent induction, ensuring that datatypes can be lifted to predicates and relying on relational formulations. A case study on proving subject reduction for structural operational semantics illustrates that the approach enables modular proofs, and that these proofs are essentially similar to conventional ones.Comment: In Proceedings FICS 2015, arXiv:1509.0282

    Corruption in Cities: Graft and Politics in American Cities at the Turn of the Twentieth Century

    Get PDF
    The essay is an exploration of corruption as practiced by city politicians in the United States at the turn of the twentieth century. Corruption is generally considered to be bad for the performance of governments and for the growth and development of economies, but American cities grew rapidly and were, as far as tangible evidence suggests, relatively well governed. I propose the answer to this conundrum lies in the exact types of graft which were possible. Skimming from city contracts and manipulating local real estate markets encouraged politicians to pursue growth enhancing policies. Many of the most damaging forms of government interference - closing borders and pursuing input-substituting policies - are not possible in cities. Patronage politics made corruption more likely by insulating politicians from (some) voter wrath, but the ability of the tax base to depart the city provided some constraints on rent-extraction. The city Boss did not want to kill the goose that laid the golden eggs. The analysis of urban graft is based on contemporary reports, especially the very detailed reports in Shame of the Cities' by Lincoln Steffens. The analysis also answers other important questions raised by the experience of Progressive Era cities: Why did businessmen back reform? And why did machine politics rise, and fall, between 1890 and 1930?

    Multinationals in Developing Communities: how EU Multinationals build Social Capital in Poland

    Get PDF
    Corporate Social Responsibility (CSR) is usually an area that does not lend itself easily to inter-company or cross-country analysis. This paper is an attempt to provide some metrics of multinational CSR drawing on the recent literature on social capital. We look at the self-reporting of social engagement in Poland by European multinational firms with operations there, mapping the configurations of declared engagement. Such social engagements are an important component of how these companies contribute to social capital in the communities within which they operate. We find high performance by some firms, with stronger performance depending upon the multinational’s country of origin. Two case studies - on Bayer and Danone - detailing different but successful approaches to social capital building are given.Social Capital, Corporate Social Responsibility, Business Ethics, Poland, Multinational companies.

    RELIGION ESCALATES SOCIAL AND ETHICAL DIVERSITY IN KENYA

    Get PDF
    The world perceives religion as the maxim that can define human destiny in terms of eternal bliss. However, in Kenya, it is obvious that religion is expressed through many denominations and religious beliefs. The implication is that religion has influenced social and ethical diversity either positively or negatively such that the outcome has configured or disfigured the existential destiny of individuals in Kenya. As a result, philosophical questions arise as an attempt to understand why erroneous interpretations of religion and religious beliefs negatively influence social and ethical outlook in Kenya. An existential slant portrays how different forms of religion and religious perspectives have facilitated even extreme notions such as militia activities. In addition, reasonable progress towards a solution requires an appropriate existential basis of what can be done to control unnecessary influence of religion in social and ethical diversities that can exploit the society, instill negative interpretation of reality, and culminates at distorting the society.  Article visualizations

    Monadic fold, Monadic build, Monadic Short Cut Fusion

    Get PDF
    Abstract: Short cut fusion improves the efficiency of modularly constructed programs by eliminating intermediate data structures produced by one program component and immediately consumed by another. We define a combinator which expresses uniform production of data structures in monadic contexts, and is the natural counterpart to the well-known monadic fold which consumes them. Like the monadic fold, our new combinator quantifies over monadic algebras rather than standard ones. Together with the monadic fold, it gives rise to a new short cut fusion rule for eliminating intermediate data structures in monadic contexts. This new rule differs significantly from previous short cut fusion rules, all of which are based on combinators which quantify over standard, rather than monadic, algebras. We give examples illustrating the benefits of quantifying over monadic algebras, prove our new fusion rule correct, and show how it can improve programs. We also consider its coalgebraic dual

    Regimes and Resilience in the Modern Global Food System

    Full text link
    Much public discourse surrounding the modern global food system operates on the assumption of the primary agency of individual consumers in ensuring an equitable and sustainable food supply. However, this approach fails to account for the larger structural forces of the system which frame the limits of how we interact with and are affected by our food system. Taking a closer look at the global economic, political, cultural, and environmental forces that have collectively shaped historical food regimes reveals the deeper structural patterns that currently determine how we produce, distribute, and consume food around the world. Due to the underlying structural processes of increasing distancing and standardization, we have become highly disembedded from our food system and will need to look for clues from past periods of transition between food regimes to better position ourselves to work towards a global restructuring of, and human reembedding in, the modern global food system
    corecore