123 research outputs found

    An Experiment Combining Specialization with Abstract Interpretation

    Get PDF
    It was previously shown that control-flow refinement can be achieved by a program specializer incorporating property-based abstraction, to improve termination and complexity analysis tools. We now show that this purpose-built specializer can be reconstructed in a more modular way, and that the previous results can be achieved using an off-the-shelf partial evaluation tool, applied to an abstract interpreter. The key feature of the abstract interpreter is the abstract domain, which is the product of the property-based abstract domain with the concrete domain. This language-independent framework provides a practical approach to implementing a variety of powerful specializers, and contributes to a stream of research on using interpreters and specialization to achieve program transformations.Comment: In Proceedings VPT/HCVS 2020, arXiv:2008.0248

    Maya: multiple-dispatch syntax extension in Java

    Get PDF
    technical reportWe have designed and implemented Maya, a version of Java that allows programmers to extend and reinterpret its syntax. Maya generalizes macro systems by treating grammar productions as generic functions, and semantic actions on productions as multimethods on the corresponding generic functions. Programmers can write new generic functions (i.e., grammar productions) and new multimethods (i.e., semantic actions), through which they can extend the grammar of the language and change the semantics of its syntactic constructs, respectively. Maya?s multimethods are compile-time metaprograms that transform abstract syntax: they execute at program compile-time, because they are semantic actions executed by the parser. Maya?s multimethods can be dispatched on the syntactic structure of the input, as well as the static, source-level types of expressions in the input. In this paper we describe what Maya can do and how it works. We describe how its novel parsing techniques work and how Maya can statically detect certain kinds of errors such as hygiene violations. Finally, to demonstrate Maya's expressiveness, we describe how Maya can be used to implement the MultiJava language, which was described by Clifton et al. at OOPSLA 2000

    Is dynamic compilation possible for embedded systems ?

    Get PDF
    International audienceJIT compilation and dynamic compilation are powerful techniques allowing to delay the final code generation to the run-time. There is many benefits : improved portability, virtual machine security, etc. Unforturnately the tools used for JIT compilation and dynamic compilation does not met the classical requirement for embedded platforms: memory size is huge and code generation has big overheads. In this paper we show how dynamic code specialization (JIT) can be used and be beneficial in terms of execution speed and energy consumption with memory footprint kept under control. We based our approaches on our tool de-Goal and on LLVM, that we extended to be able to produce lightweight runtime specializers from annotated LLVM programs. Benchmarks are manipulated and transformed into templates and a specialization routine is build to instantiate the routines. Such approach allows to produce efficient special-izations routines, with a minimal energy consumption and memory footprint compare to a generic JIT application. Through some benchmarks, we present its efficiency in terms of speed, energy and memory footprint. We show that over static compilation we can achieve a speed-up of 21 % in terms of execution speed but also a 10 % energy reduction with a moderate memory footprint

    Essays on the Economics of Education

    Get PDF
    Le résumé en français n'a pas été communiqué par l'auteur.This thesis is composed of three chapters. The first two chapters consider specific aspects of the educational path and how these relate to, in the first case, earnings and occupation choice and, in the second, progress through school. The third chapter studies how variations in municipal finance affect investments in education. The first chapter of this thesis estimates the importance of two aspects of human capital accumulation: the acquisition of job-related skills, and the student's discovery of his relative abilities across disciplines. Specifically, we measure whether additional years of multi-disciplinary education help students make a better choice of specialization, and at what cost in foregone specialized human capital. We document that, in the cross section, students who choose their major later are more likely to change fields on the labor market. We then build and estimate a dynamic model of college education which captures the tradeoff between discovering comparative advantage and acquiring occupation-specific skills. Estimates suggest that delaying specialization is informative, although noisy. Working in the field of comparative advantage accounts for up to 20% of a well-matched worker's earnings. While education is transferable across fields with only a 10% penalty, workers who wish to change fields incur a large, one-time cost. The second chapter considers the impact of automatically promoting young children from one grade level to the next on retention and grade progression in primary school. Exploiting variation in grade repetition practices in Brazil, we study the effect of automatic promotion cycles on grade attainment and academic persistence of primary school children. The dynamic policy environment allows us to estimate the impact of the policy when applied at different times during schooling, both in the short term and as children exposed to the policy progress through primary school. We find that automatic promotion increases grade attainment: one year of exposure to the policy is associated with 3 students out of 100 studying one grade level above where they would be absent the policy. This effect persists over time, and cumulates with further exposure to the policy. The third chapter moves away from students to focus on education infrastructure. In the paper we seek to answer the question of how transfers from the federal government in Brazil affect both education spending and the resources available for education at the municipal level. We find that increased transfers lead to an immediate rise in current and capital spending. These increases are focused on education and welfare expenditure in poorer municipalities, while richer municipalities expand capital spending in the transport and housing sectors. Furthermore, particularly in wealthier municipalities, increases in transfers cause a short-term increase in local tax revenues. Positive transfer shocks are associated with increases in the number of teachers and, to a lesser extent, the number of classrooms. Transfers are also associated with substantial re-allocation of resources across schools offering classes at different levels, with secondary schools and schools teaching senior primary grades expanding at the expense of junior primary schools

    Specialization of applications using shared libraries

    Get PDF
    Ph.DDOCTOR OF PHILOSOPH

    Generalizers: New Metaobjects for Generalized Dispatch

    Get PDF
    This paper introduces a new metaobject, the generalizer, which complements the existing specializer metaobject. With the help of examples, we show that this metaobject allows for the efficient implementation of complex non-class-based dispatch within the framework of existing metaobject protocols. We present our modifications to the generic function invocation protocol from the Art of the Metaobject Protocol; in combination with previous work, this produces a fully-functional extension of the existing mechanism for method selection and combination, including support for method combination completely independent from method selection. We discuss our implementation, within the SBCL implementation of Common Lisp, and in that context compare the performance of the new protocol with the standard one, demonstrating that the new protocol can be tolerably efficient

    Custom specializers in Object-oriented Lisp

    Get PDF
    We describe in this paper the implementation and use of custom specializers in two current dialects of Lisp: Skill and Common Lisp. We motivate the need for such specializers by appealing to clarity of expression, referring to experience in existing industrial applications. We discuss the implementation details of such user-defined specializers in both dialects of Lisp, detailing open problems with those implementations, and we sketch ideas for solving the
    corecore