997 research outputs found

    KafKa: Gradual Typing for Objects

    Get PDF
    A wide range of gradual type systems have been proposed, providing many languages with the ability to mix typed and untyped code. However, hiding under language details, these gradual type systems embody fundamentally different ideas of what it means to be well-typed. In this paper, we show that four of the most common gradual type systems provide distinct guarantees, and we give a formal framework for comparing gradual type systems for object-oriented languages. First, we show that the different gradual type systems are practically distinguishable via a three-part litmus test. We present a formal framework for defining and comparing gradual type systems. Within this framework, different gradual type systems become translations between a common source and target language, allowing for direct comparison of semantics and guarantees

    Naïve Transient Cast Insertion Isn’t (That) Bad

    Get PDF
    Transient gradual type systems often depend on type-based cast insertion to achieve good performance: casts are inserted whenever the static checker detects that a dynamically-typed value may flow into a statically-typed context. Transient gradually typed programs are then often executed using just-in-time compilation, and contemporary just-in-time compilers are very good at removing redundant computations. In this paper we present work-in-progress to measure the ability of just-in-time compilers to remove redundant type checks. We investigate worst-case performance and so take a na'ive approach, annotating every subexpression to insert every plausible dynamic cast. Our results indicate that the Moth VM still manages to eliminate much of the overhead, by relying on the state-of-the-art SOMns substrate and Graal just-in-time compiler. We hope these results will help language implementers evaluate the tradeoffs between dynamic optimisations (which can improve the performance of both statically and dynamically typed programs) and static optimisations (which improve only statically typed code)

    Effects of Transcranial Direct Current Stimulation on Long-term Motor Learning and Retention

    Get PDF
    Programa Oficial de Doutoramento en Enxeñaría Civil . 5011V01[Abstract] Optimizing the teaching-learning process is essential throughout life. Non-invasive brain stimulation techniques such as transcranial direct current stimulation (tDCS) seem to be an option for optimizing the motor learning curve. This thesis aims to study the effects of tDCS on motor learning, including the retention of a motor. The first randomized controlled study explored the effects of applying tDCS before, during, or after motor practice on retention of the practiced skill in 100 participants. After a single session, similar performance changes were observed in all groups, with no significant differences in the choice reaction time task. In the second randomized controlled study, we examined the effects of tDCS on typing performance in 63 participants. Participants performed a structured program of 23 intervention sessions across 3.5-month: 20, 15-min typing practice and 3 evaluations (pre, middle, post). tDCS group performed better motor performance in the rapid learning phase compared to the sham and control groups. However, these differences dissipated from session 11th. In conclusion, tDCS appears to be a safe stimulation method when administered over multiple sessions in healthy young adults but failed to enhance motor skill acquisition and retention compared with a sham control group.Resumen] Optimizar el proceso de enseñanza-aprendizaje es fundamental durante la vida. La estimulación transcraneal por corriente directa (tDCS) podría optimizar la curva de aprendizaje motor. El objetivo de la tesis fue estudiar los efectos de la tDCS sobre el aprendizaje, incluyendo la fase de retención. El primer estudio controlado aleatorio exploró los efectos de la aplicación de la tDCS antes, durante, o después, de la práctica sobre la retención en 100 participantes. Después de una sesión, se observaron cambios de rendimiento similares en todos los grupos en una tarea de tiempos de reacción aleatorios. En el segundo estudio controlado aleatorio, examinamos los efectos de la tDCS sobre el rendimiento mecanográfico. Los 63 participantes realizaron un programa estructurado durante 3.5-meses que incluía 20 prácticas y 3 evaluaciones (pre-, media- y post-intervención). El grupo tDCS obtuvo un mejor rendimiento en la fase rápida del aprendizaje en comparación con el grupo placebo y el grupo control, aunque estas diferencias se disiparon desde la sesión 11 en adelante. En conclusión, la tDCS parece ser segura aplicada en sesiones múltiples en adultos jóvenes y sanos, pero no eficaz para mejorar el aprendizaje de habilidades motoras en comparación con los grupos control y placebo.[Resumo] Optimizar o proceso de ensino-aprendizaxe é fundamental durante a vida. A estimulación transcraneal de corrente continua (tDCS) podería optimizar a curva de aprendizaxe motora. O obxectivo da tese foi estudar os efectos do tDCS na aprendizaxe, incluída a fase de retención. O primeiro estudo controlado aleatorizado explorou os efectos da aplicación de tDCS antes, durante ou despois da práctica sobre a retención en 100 participantes. Despois dunha sesión, observáronse cambios de rendemento similares en todos os grupos nunha tarefa aleatoria de tempos de reacción. No segundo estudo controlado aleatorizado, examinamos os efectos do tDCS no rendemento da dixitación. Os 63 participantes completaron un programa estruturado de 3.5-meses que incluía 20 prácticas e 3 avaliacións (pre-, media- e post-intervención). O grupo tDCS funcionou mellor na fase rápida de aprendizaxe en comparación co grupo placebo e o grupo control, aínda que estas diferenzas disipáronse a partir da sesión 11. En conclusión, o tDCS parece ser seguro cando se aplica en varias sesións en adultos novos sans, pero non é efectivo para mellorar a aprendizaxe das habilidades motoras en comparación cos grupos control e placeb

    Gradual Pluggable Typing in Java

    Get PDF
    Gradual typing provides the ability to safely mix untyped or dynamically typed code with statically typed code while maintaining, within the statically typed portion, the guarantees claimed by the static typing. It is motivated by the idea that different amounts of typing are valuable at different times during a software projects development. Less typing is useful at the prototyping stage, where requirements change frequently, and rapid development is important. More typing is useful in more mature projects where maintenance, documentation, and correctness become critically important. Gradual aims to enable a project to gradually move from one side of this spectrum to the other. Pluggable typing and pluggable typing frameworks aim to allow a language to support many different type systems, that can be developed by type system designers and plugged into the existing compiler infrastructure. The Checker Framework is built on the OpenJDK➋ Java compiler, and provides a framework to develop additional type systems that can be applied to Java code. It has been tested and proven using many other type systems. However, not all code will adopt all type systems, so a developer who wishes to check their project with a given type system may still link against other components that are not checked with that type system. Additionally, a developer may wish to adopt a new type system, but be unwilling to spend the effort necessary to annotate all the existing code for the new type system. The gradual extension to the Checker Framework aims to improve type safety of partially applied Checker Framework type systems, using gradual typing techniques. A prototype was built, and the gradual nullness type system was designed to prove it. Defining the checked-unchecked boundary is crucial. Even though the use case is limited to individual files being either entirely annotated or entirely unannotated, because Java is an object-oriented language with inheritance, many different boundary conditions present themselves. This work analyses each boundary condition in detail, and presents options for runtime tests to ensure that values crossing the boundary meet the static type requirements on the other side. The nature of the tests, and the method of passing the static type to the runtime environment is discussed. This work presents the design of the prototype, implemented in the Checker Framework and OpenJDK➋. It discusses the design of the OpenJDK➋ compiler, the Checker Framework, and how they work together. It demonstrates how the abstract syntax tree can be modified in order to effect insertion of the runtime tests. It discusses the specific implementation details needed to implement each boundary condition runtime test in Java. An evaluation of the prototype is completed looking at correctness, both through a set of synthetic tests, and by inserting artificial errors into an existing real world program; performance, by running configurations of real world programs designed to model the motivating examples; and applicability, by comparing the gradual framework with other options for improving type safety in partially annotated programs. Related work on both gradual typing and pluggable typing are discussed. Final remarks and future work concludes the work
    corecore