118 research outputs found

    Formal Language Recognition with the Java Type Checker

    Get PDF
    This paper is a theoretical study of a practical problem: the automatic generation of Java Fluent APIs from their specification. We explain why the problem\u27s core lies with the expressive power of Java generics. Our main result is that automatic generation is possible whenever the specification is an instance of the set of deterministic context-free languages, a set which contains most "practical" languages. Other contributions include a collection of techniques and idioms of the limited meta-programming possible with Java generics, and an empirical measurement demonstrating that the runtime of the "javac" compiler of Java may be exponential in the program\u27s length, even for programs composed of a handful of lines and which do not rely on overly complex use of generics

    Fling - A Fluent API Generator

    Get PDF
    We present the first general and practical solution of the fluent API problem - an algorithm, that given a deterministic language (equivalently, LR(k), k >= 0 language) encodes it in an unbounded parametric polymorphism type system employing only a polynomial number of types. The theoretical result is accompanied by an actual tool Fling - a fluent API compiler-compiler in the venue of YACC, tailored for embedding DSLs in Java

    Fluent APIs in Functional Languages (full version)

    Full text link
    Fluent API is an object-oriented pattern for smart and elegant embedded DSLs. As fluent API designs typically rely on function overloading, they are hard to realize in functional programming languages. We show how to write functional fluent APIs using parametric polymorphism and unification instead of overloading. Our designs support all regular and deterministic context-free DSLs and beyond

    Fling - A Fluent API Generator (Artifact)

    Get PDF
    The first general and practical solution of the fluent API problem is presented. We give an algorithm that given a deterministic context free language (equivalently, LR(k), k >= 0 language) encodes it in an unbounded parametric polymorphism type system employing only a polynomial number of types. The theoretical result is employed in an actual tool Fling - a fluent API compiler-compiler in the style of YACC, tailored for embedding DSLs in Java

    JAMOOS - A Domain-Specific Language for Language Processing

    Get PDF
    JAMOOS is a cohesive suite for quick definition of attribute grammars and generation of compilers, interpreters and other language processing tools. As a programming language, JAMOOS brings a new tree computing metaphor which unifies the notions of object creation, procedure call and reduction of rules in an attribute context-free grammar. JAMOOS has a rich object oriented-type system, with features such as genericity, lists, union and unit types. This type system serves also as a language for specifying context-free grammars

    The Use of Overloading in JAVA Programs

    Get PDF
    Abstract. Method overloading is a controversial language feature, especially in the context of Object Oriented languages, where its interaction with overriding may lead to confusing semantics. One of the main arguments against overloading is that it can be abused by assigning the same identity to conceptually different methods. This paper describes a study of the actual use of overloading in JAVA. To this end, we developed a taxonomy of classification of the use of overloading, and applied it to a large JAVA corpus comprising more than 100,000 user defined types. We found that more than 14% of the methods in the corpus are overloaded. Using sampling and evaluation by human raters we found that about 60% of overloaded methods follow one of the "non ad hoc use of overloading patterns" and that additional 20% can be easily rewritten in this form. The most common pattern is the use of overloading as an emulation of default arguments, a mechanism which does not exist in JAVA

    Enhanced Astrocytic Nitric Oxide Production and Neuronal Modifications in the Neocortex of a NOS2 Mutant Mouse

    Get PDF
    BACKGROUND: It has been well accepted that glial cells in the central nervous system (CNS) produce nitric oxide (NO) through the induction of a nitric oxide synthase isoform (NOS2) only in response to various insults. Recently we described rapid astroglial, NOS2-dependent, NO production in the neocortex of healthy mice on a time scale relevant to neuronal activity. To explore a possible role for astroglial NOS2 in normal brain function we investigated a NOS2 knockout mouse (B6;129P2-Nos2(tm1Lau)/J, Jackson Laboratory). Previous studies of this mouse strain revealed mainly altered immune responses, but no compensatory pathways and no CNS abnormalities have been reported. METHODOLOGY/PRINCIPAL FINDINGS: To our surprise, using NO imaging in brain slices in combination with biochemical methods we uncovered robust NO production by neocortical astrocytes of the NOS2 mutant. These findings indicate the existence of an alternative pathway that increases basal NOS activity. In addition, the astroglial mutation instigated modifications of neuronal attributes, shown by changes in the membrane properties of pyramidal neurons, and revealed in distinct behavioral abnormalities characterized by an increase in stress-related parameters. CONCLUSIONS/SIGNIFICANCE: The results strongly indicate the involvement of astrocytic-derived NO in modifying the activity of neuronal networks. In addition, the findings corroborate data linking NO signaling with stress-related behavior, and highlight the potential use of this genetic model for studies of stress-susceptibility. Lastly, our results beg re-examination of previous studies that used this mouse strain to examine the pathophysiology of brain insults, assuming lack of astrocytic nitrosative reaction

    Loss-of-function mutations in SLC30A8 protect against type 2 diabetes.

    Get PDF
    Neðst á síðunni er hægt að nálgast greinina í heild sinni með því að smella á hlekkinn View/OpenLoss-of-function mutations protective against human disease provide in vivo validation of therapeutic targets, but none have yet been described for type 2 diabetes (T2D). Through sequencing or genotyping of ~150,000 individuals across 5 ancestry groups, we identified 12 rare protein-truncating variants in SLC30A8, which encodes an islet zinc transporter (ZnT8) and harbors a common variant (p.Trp325Arg) associated with T2D risk and glucose and proinsulin levels. Collectively, carriers of protein-truncating variants had 65% reduced T2D risk (P = 1.7 × 10(-6)), and non-diabetic Icelandic carriers of a frameshift variant (p.Lys34Serfs*50) demonstrated reduced glucose levels (-0.17 s.d., P = 4.6 × 10(-4)). The two most common protein-truncating variants (p.Arg138* and p.Lys34Serfs*50) individually associate with T2D protection and encode unstable ZnT8 proteins. Previous functional study of SLC30A8 suggested that reduced zinc transport increases T2D risk, and phenotypic heterogeneity was observed in mouse Slc30a8 knockouts. In contrast, loss-of-function mutations in humans provide strong evidence that SLC30A8 haploinsufficiency protects against T2D, suggesting ZnT8 inhibition as a therapeutic strategy in T2D prevention.US National Institutes of Health (NIH) Training 5-T32-GM007748-33 Doris Duke Charitable Foundation 2006087 Fulbright Diabetes UK Fellowship BDA 11/0004348 Broad Institute from Pfizer, Inc. NIH U01 DK085501 U01 DK085524 U01 DK085545 U01 DK085584 Swedish Research Council Dnr 521-2010-3490 Dnr 349-2006-237 European Research Council (ERC) GENETARGET T2D GA269045 ENGAGE 2007-201413 CEED3 2008-223211 Sigrid Juselius Foundation Folkh lsan Research Foundation ERC AdG 293574 Research Council of Norway 197064/V50 KG Jebsen Foundation University of Bergen Western Norway Health Authority Lundbeck Foundation Novo Nordisk Foundation Wellcome Trust WT098017 WT064890 WT090532 WT090367 WT098381 Uppsala University Swedish Research Council and the Swedish Heart- Lung Foundation Academy of Finland 124243 102318 123885 139635 Finnish Heart Foundation Finnish Diabetes Foundation, Tekes 1510/31/06 Commission of the European Community HEALTH-F2-2007-201681 Ministry of Education and Culture of Finland European Commission Framework Programme 6 Integrated Project LSHM-CT-2004-005272 City of Kuopio and Social Insurance Institution of Finland Finnish Foundation for Cardiovascular Disease NIH/NIDDK U01-DK085545 National Heart, Lung, and Blood Institute (NHLBI) National Institute on Minority Health and Health Disparities N01 HC-95170 N01 HC-95171 N01 HC-95172 European Union Seventh Framework Programme, DIAPREPP Swedish Child Diabetes Foundation (Barndiabetesfonden) 5U01DK085526 DK088389 U54HG003067 R01DK072193 R01DK062370 Z01HG000024info:eu-repo/grantAgreement/EC/FP7/20201
    • …
    corecore