6 research outputs found

    Parsers funcionales genéricos

    Get PDF
    En este trabajo se propone el uso de técnicas avanzadas de programación funcional para ofrecer una solución genérica al problema de parsing. Este problema consiste en que, dada una lista de tokens que representan una estructura, debe obtenerse una representación elaborada de la misma. La solución propuesta es genérica en dos sentidos. Primero, la técnica de diseño utilizada consiste en dar una biblioteca de combinadores, los cuales pueden combinarse para escribir soluciones a problemas complejos (instanciando la técnica de programación modular). Segundo, el uso de mónadas y overloading permite independizar la biblioteca de una implementación específica. La solución propuesta incluye como instancias a varias propuestas distintas de combinadores de parsing, siendo éstas implementaciones en el modelo aquí presentado.Eje: Lenguajes de programaciónRed de Universidades con Carreras en Informática (RedUNCI

    Parsers funcionales genéricos

    Get PDF
    En este trabajo se propone el uso de técnicas avanzadas de programación funcional para ofrecer una solución genérica al problema de parsing. Este problema consiste en que, dada una lista de tokens que representan una estructura, debe obtenerse una representación elaborada de la misma. La solución propuesta es genérica en dos sentidos. Primero, la técnica de diseño utilizada consiste en dar una biblioteca de combinadores, los cuales pueden combinarse para escribir soluciones a problemas complejos (instanciando la técnica de programación modular). Segundo, el uso de mónadas y overloading permite independizar la biblioteca de una implementación específica. La solución propuesta incluye como instancias a varias propuestas distintas de combinadores de parsing, siendo éstas implementaciones en el modelo aquí presentado.Eje: Lenguajes de programaciónRed de Universidades con Carreras en Informática (RedUNCI

    Parsers funcionales genéricos

    Get PDF
    En este trabajo se propone el uso de técnicas avanzadas de programación funcional para ofrecer una solución genérica al problema de parsing. Este problema consiste en que, dada una lista de tokens que representan una estructura, debe obtenerse una representación elaborada de la misma. La solución propuesta es genérica en dos sentidos. Primero, la técnica de diseño utilizada consiste en dar una biblioteca de combinadores, los cuales pueden combinarse para escribir soluciones a problemas complejos (instanciando la técnica de programación modular). Segundo, el uso de mónadas y overloading permite independizar la biblioteca de una implementación específica. La solución propuesta incluye como instancias a varias propuestas distintas de combinadores de parsing, siendo éstas implementaciones en el modelo aquí presentado.Eje: Lenguajes de programaciónRed de Universidades con Carreras en Informática (RedUNCI

    Ramasse-miettes générationnel et incémental gérant les cycles et les gros objets en utilisant des frames délimités

    Get PDF
    Ces dernières années, des recherches ont été menées sur plusieurs techniques reliées à la collection des déchets. Plusieurs découvertes centrales pour le ramassage de miettes par copie ont été réalisées. Cependant, des améliorations sont encore possibles. Dans ce mémoire, nous introduisons des nouvelles techniques et de nouveaux algorithmes pour améliorer le ramassage de miettes. En particulier, nous introduisons une technique utilisant des cadres délimités pour marquer et retracer les pointeurs racines. Cette technique permet un calcul efficace de l'ensemble des racines. Elle réutilise des concepts de deux techniques existantes, card marking et remembered sets, et utilise une configuration bidirectionelle des objets pour améliorer ces concepts en stabilisant le surplus de mémoire utilisée et en réduisant la charge de travail lors du parcours des pointeurs. Nous présentons aussi un algorithme pour marquer récursivement les objets rejoignables sans utiliser de pile (éliminant le gaspillage de mémoire habituel). Nous adaptons cet algorithme pour implémenter un ramasse-miettes copiant en profondeur et améliorer la localité du heap. Nous améliorons l'algorithme de collection des miettes older-first et sa version générationnelle en ajoutant une phase de marquage garantissant la collection de toutes les miettes, incluant les structures cycliques réparties sur plusieurs fenêtres. Finalement, nous introduisons une technique pour gérer les gros objets. Pour tester nos idées, nous avons conçu et implémenté, dans la machine virtuelle libre Java SableVM, un cadre de développement portable et extensible pour la collection des miettes. Dans ce cadre, nous avons implémenté des algorithmes de collection semi-space, older-first et generational. Nos expérimentations montrent que la technique du cadre délimité procure des performances compétitives pour plusieurs benchmarks. Elles montrent aussi que, pour la plupart des benchmarks, notre algorithme de parcours en profondeur améliore la localité et augmente ainsi la performance. Nos mesures de la performance générale montrent que, utilisant nos techniques, un ramasse-miettes peut délivrer une performance compétitive et surpasser celle des ramasses-miettes existants pour plusieurs benchmarks. ______________________________________________________________________________ MOTS-CLÉS DE L’AUTEUR : Ramasse-Miettes, Machine Virtuelle, Java, SableVM

    Garbage Collection, and Memory Efficiency, in Lazy Functional Languages

    No full text
    Automatic memory management is an important concept in many high order languages. It improves productivity by abstracting away from memory management, but it is not free! The cost can sometimes be much higher than the programmer thought. This is especially true for lazy functional languages where it is not always obvious when things are evaluated. This thesis describes two ways to decrease the overhead. Faster garbage collectors and tools to aid programmers writing more efficient programs.<p /> The first two papers are examples of improved garbage collectors. One is intended for a parallel machine, the other is for sequential machines. Both use generational garbage collectors to decrease the garbage collection time. Neither of them need the usual test-before-update used in other generational collectors. The test could be avoided by taking advantage of the fact that only redexes are updated in functional languages, and then only after they have been evaluated.<p /> The third paper describes an extended version of heap profiling. This is a tool that helps programmers produce more memory efficient programs. In the extended version not only static information can be profiled, but also some dynamic properties can be observed. This aids the programmer in writing even faster and more space efficient programs. The gain in speed can be higher than using an infinitely fast garbage collector, since also the time to allocate the memory goes away.<p /> The last two papers are examples of memory efficient implementations. The first of these papers describes a fast and space efficient implementation of parsing combinators, the second gives an overview of a Haskell compiler. This Haskell compiler is not only written in a memory efficient manner, it also tries to produce space efficient code. Some of the methods to decrease memory usage in the compiler can be used in other lazy functional programs, not only compilers

    Hybrid eager and lazy evaluation for efficient compilation of Haskell

    Get PDF
    Thesis (Ph. D.)--Massachusetts Institute of Technology, Dept. of Electrical Engineering and Computer Science, 2002.Includes bibliographical references (p. 208-220).This electronic version was submitted by the student author. The certified thesis is available in the Institute Archives and Special Collections.The advantage of a non-strict, purely functional language such as Haskell lies in its clean equational semantics. However, lazy implementations of Haskell fall short: they cannot express tail recursion gracefully without annotation. We describe resource-bounded hybrid evaluation, a mixture of strict and lazy evaluation, and its realization in Eager Haskell. From the programmer's perspective, Eager Haskell is simply another implementation of Haskell with the same clean equational semantics. Iteration can be expressed using tail recursion, without the need to resort to program annotations. Under hybrid evaluation, computations are ordinarily executed in program order just as in a strict functional language. When particular stack, heap, or time bounds are exceeded, suspensions are generated for all outstanding computations. These suspensions are re-started in a demand-driven fashion from the root. The Eager Haskell compiler translates Ac, the compiler's intermediate representation, to efficient C code. We use an equational semantics for Ac to develop simple correctness proofs for program transformations, and connect actions in the run-time system to steps in the hybrid evaluation strategy.(cont.) The focus of compilation is efficiency in the common case of straight-line execution; the handling of non-strictness and suspension are left to the run-time system. Several additional contributions have resulted from the implementation of hybrid evaluation. Eager Haskell is the first eager compiler to use a call stack. Our generational garbage collector uses this stack as an additional predictor of object lifetime. Objects above a stack watermark are assumed to be likely to die; we avoid promoting them. Those below are likely to remain untouched and therefore are good candidates for promotion. To avoid eagerly evaluating error checks, they are compiled into special bottom thunks, which are treated specially by the run-time system. The compiler identifies error handling code using a mixture of strictness and type information. This information is also used to avoid inlining error handlers, and to enable aggressive program transformation in the presence of error handling.by Jan-Willem Maessen.Ph.D
    corecore