5 research outputs found

    Linguistic Reflection in Java

    Get PDF
    Reflective systems allow their own structures to be altered from within. Here we are concerned with a style of reflection, called linguistic reflection, which is the ability of a running program to generate new program fragments and to integrate these into its own execution. In particular we describe how this kind of reflection may be provided in the compiler-based, strongly typed object-oriented programming language Java. The advantages of the programming technique include attaining high levels of genericity and accommodating system evolution. These advantages are illustrated by an example taken from persistent programming which shows how linguistic reflection allows functionality (program code) to be generated on demand (Just-In-Time) from a generic specification and integrated into the evolving running program. The technique is evaluated against alternative implementation approaches with respect to efficiency, safety and ease of use.Comment: 25 pages. Source code for examples at http://www-ppg.dcs.st-and.ac.uk/Java/ReflectionExample/ Dynamic compilation package at http://www-ppg.dcs.st-and.ac.uk/Java/DynamicCompilation

    Linguistic reflection in Java

    Get PDF

    Delivering the benefits of persistence to system construction and execution

    Get PDF
    In an orthogonally persistent programming system the longevity of data is independent of its other attributes. The advantages of persistence may be seen primarily in the areas of data modelling and protection resulting from simpler semantics and reduced complexity. These have been verified by the first implementations of persistent languages, typically consisting of a persistent store, a run-time system and a compiler that produces programs that may access and manipulate the persistent environment. This thesis demonstrates that persistence can deliver many further benefits to the programming process when applied to software construction and execution. To support the thesis, a persistent environment has been extended with all the components necessary to support program construction and execution entirely within the persistent environment. This is the first known example of a strongly-typed integrated persistent programming environment. The keystone of this work is the construction of a compiler that operates entirely within the persistent environment. During its construction, persistence has been exploited in the development of a new methodology for the construction of applications from components and in the optimisation of the widespread use of type information throughout the environment. Further enhancements to software construction and execution have been developed that can only be supported within an integrated persistent programming environment. It is shown how persistence forms the basis of a new methodology for dynamic optimisation of code and data. In addition, new interfaces to the compiler are described that offer increased functionality over traditional compilers. Extended by the ability to manipulate structured values within the persistent environment, the interfaces increase the simplicity, flexibility and efficiency of software construction and execution. Reflective and hyper-programming techniques are also supported. The methodologies and compilation facilities evolved together as the compiler was developed and so the first uses of both were applied to one another. It is these applications that have been described in this thesis as examples of its validity. However, the methodologies and the compilation facilities need not be inter-twined. The benefits derived from each of them are general and they may be used in many areas of the persistent environment

    Types and polymorphism in persistent programming systems

    Get PDF

    An Ad-Hoc Approach to the Implementation of Polymorphism

    No full text
    types have existential type". 12th ACM Symposium on Principles of Programming Languages, New Orleans, (January 1985), 37-51. [SFS90] Stemple, D., Fegaras, L., Sheard, T. & Socorro, A. "Exceeding the Limits of Polymorphism in Database Programming Languages". Advances in Database Technology - EDBT90, Venice. In Lecture Notes in Computer Science. 416. Springer-Verlag (1990), pp. 269-285. [Str67] Strachey, C. "Fundamental concepts in programming languages". Oxford University, Oxford (1967). [Tur79] Turner, D.A. SASL language manual. University of St.Andrews CS/79/3 (1979). [Tur87] Turner, D.A. Miranda System Manual. Research Software Ltd. Canterbury, England. (1987). [VG85] van Vliet, J.C. & Gladney, H.M. "An evaluation of tagging". Software, Practice & Experience, 15, 9 (1985), 823-827. 28 [DD79] Demers, A. & Donahue, J. "Revised report on Russell". Technical report TR79389, (1979), Cornell University. [DM82] Damas. L & Milner, R. "Principal Type Schemes for Functional Programs". 9th AC..
    corecore