In computer science , reflective programming or reflection is the ability of a process to examine, introspect , and modify its own structure and behavior.
32-509: Poplog is a reflective , incrementally compiled software development computer programming integrated development environment and system platform for the programming languages POP-11 , Common Lisp , Prolog , and Standard ML . It was created originally in the United Kingdom for teaching and research in artificial intelligence , at the University of Sussex , and later marketed as
64-693: A TFoo class has been declared in a unit called Unit1 : The following is an example in eC: The following is an example in Go : The following is an example in Java : The following is an example in JavaScript : The following is an example in Julia : The following is an example in Objective-C , implying either the OpenStep or Foundation Kit framework is used: The following
96-495: A PhD at the University of Manchester before moving to the University of Leeds . His project was to develop a program for automated theorem proving , but he got caught up in using the university computer to design a boat. He built the boat and set sail for the University of Edinburgh , where he had been offered a research position. A storm hit while crossing the North Sea , and the boat sank. A widely believed story about Popplestone
128-483: A commercial package for software development, teaching, and research. It was one of the initiatives supported for a time by the UK government-funded Alvey Programme . It was licensed originally from 1982 to 1999, as proprietary software , then released in 1999 as open-source software , under a mix of MIT and then XFree86 licenses. After an incremental compiler for Prolog had been added to an implementation of POP-11 ,
160-466: A language to provide new abilities that cannot be added via standard macros that merely allow new text to be equivalent to a longer portion of old text. For some time after 1983, Poplog was sold and supported internationally as a commercial product, on behalf of the University of Sussex by Systems Designers Ltd (SDL), whose name changed as ownership changed. The main development work continued to be done by
192-569: A map of a database or entity relations. Reflection makes a language more suited to network-oriented code. For example, it assists languages such as Java to operate well in networks by enabling libraries for serialization, bundling and varying data formats. Languages without reflection such as C are required to use auxiliary compilers for tasks like Abstract Syntax Notation to produce code for serialization and bundling. Reflection can be used for observing and modifying program execution at runtime . A reflection-oriented program component can monitor
224-506: A more platform neutral version of Poplog, including Windows. The most recent development by this project includes a web server component for integrating into Poplog applications, and the OpenPoplog Widget Collection for supporting client user interfaces running in a web browser. A more narrowly focused open source Poplog project, restricted to the 64-bit AMD64/X86-64 architecture was set up on GitHub by Waldek Hebisch: [1] . This
256-421: A non-public property. It is also possible to find non-public methods of classes and types and manually invoke them. This works for project-internal files as well as external libraries such as .NET 's assemblies and Java's archives. A language supporting reflection provides a number of features available at runtime that would otherwise be difficult to accomplish in a lower-level language. Some of these features are
288-480: A small team at Sussex University until 1998, while marketing, sales, and support (except for UK academic users, who dealt directly with the Sussex team) was done by SDL and its successors (SD, then SD-Scicon then Electronic Data Systems (EDS)) until 1991. At that time a management buy-out produced a spin-off company Integral Solutions Ltd (ISL), to sell and support Poplog in collaboration with Sussex University, who retained
320-472: A user to create unexpected control flow paths through an application, potentially bypassing security measures. This may be exploited by attackers. Historical vulnerabilities in Java caused by unsafe reflection allowed code retrieved from potentially untrusted remote machines to break out of the Java sandbox security mechanism. A large scale study of 120 Java vulnerabilities in 2013 concluded that unsafe reflection
352-459: A version of Scheme . Poplog has been used both for academic research and teaching in artificial intelligence and also to develop several commercial products, apart from Clementine. In 1992, ISL and Sussex University won an ICP Million Dollar award in recognition of Poplog exceeding sales of US$ 5 million. POP-11 was at first implemented on a DEC PDP-11 computer in 1976, and was ported to VAX / VMS in 1980. It became Poplog around 1982. Although
SECTION 10
#1733093880997384-404: Is a list of the methods by which the current verb was eventually called, performing tests on callers ()[0] (the command invoked by the original user) allows the verb to protect itself against unauthorised use. Compiled languages rely on their runtime system to provide information about the source code. A compiled Objective-C executable, for example, records the names of all methods in a block of
416-782: Is an example in Perl : The following is an example in PHP : The following is an example in Python : The following is an example in R : The following is an example in Ruby : The following is an example using Xojo : Robin Popplestone Robin John Popplestone (9 December 1938 in Bristol – 14 April 2004 in Glasgow ) was a pioneer in the fields of machine intelligence and robotics . He
448-656: Is known for developing the POP programming languages COWSEL (renamed POP-1), POP-2 , POP-11 , the related multi-language integrated development environment Poplog , and for his work on the Freddy II robot with Pat Ambler at the University of Edinburgh Artificial Intelligence laboratory. Robin Popplestone was born in Bristol in 1938. After World War II his family moved to Belfast . He received an honours degree in mathematics from Queen's University Belfast in 1960. He started
480-504: Is now marketed and supported as SPSS Modeler . Poplog's core language is POP-11 . It is used to implement the other languages, all of them incrementally compiled , with an integrated common editor. In the Linux/Unix versions, POP-11 provides support for 2-D graphics via X . Poplog supports incrementally compiled versions of Common Lisp , POP-11 , Prolog , and Standard ML . A separate package implemented by Robin Popplestone supports
512-426: Is now the basis of Poplog Version 16 hosted at the University of Birmingham [2] . Additional information about the history and features of Poplog can be found in the entries for POP-2 and POP-11 . The chief architect of Poplog, responsible for many innovations related to making an incrementally compiled system portable, and providing support for a collection of languages was John Gibson, at Sussex University, though
544-410: Is often used as part of software testing , such as for the runtime creation/instantiation of mock objects . Reflection is also a key strategy for metaprogramming . In some object-oriented programming languages such as C# and Java , reflection can be used to bypass member accessibility rules. For C#-properties this can be achieved by writing directly onto the (usually invisible) backing field of
576-623: Is the most common vulnerability in Java, though not the most exploited. The following code snippets create an instance foo of class Foo and invoke its method PrintHello . For each programming language , normal and reflection-based call sequences are shown. The following is an example in Common Lisp using the Common Lisp Object System : The following is an example in C# : This Delphi and Object Pascal example assumes that
608-515: The X Window System . Clementine was so successful that in 1998 ISL was bought by SPSS Inc who had been selling the statistics and data-mining package SPSS for which they needed a better graphical interface suited to expert and non-expert users. SPSS did not wish to sell and support Poplog as such, so Poplog then became available as a free open source software package, hosted at the University of Birmingham , which had also been involved in development after 1991. Later IBM bought SPSS and Clementine
640-542: The Linux version, including porting to 64-bit Linux. A partial port to Mac OS X on PowerPC was done in 2005. There is a version for Windows , originally developed to support Clementine, but the Unix/Linux graphical subsystem does not work on Windows Poplog. The Windows version of Clementine depended on a commercial package that supported X functionality on Windows. There is also an open source project which aimed to produce
672-613: The Prolog trail (recording undoable variable bindings), and Prolog terms. The implementation was constrained by the need to allow data-structures to be shared with the other Poplog languages, especially POP-11 and Common Lisp , thereby providing support for a mixture of programming styles. Reflective programming The earliest computers were programmed in their native assembly languages , which were inherently reflective, as these original architectures could be programmed by defining instructions as data and using self-modifying code . As
SECTION 20
#1733093880997704-442: The abilities to: These features can be implemented in different ways. In MOO , reflection forms a natural part of everyday programming idiom. When verbs (methods) are called, various variables such as verb (the name of the verb being called) and this (the object on which the verb is called) are populated to give the context of the call. Security is typically managed by accessing the caller stack programmatically: Since callers ()
736-401: The bulk of programming moved to higher-level compiled languages such as Algol , Cobol , Fortran , Pascal , and C , this reflective ability largely disappeared until new programming languages with reflection built into their type systems appeared. Brian Cantwell Smith 's 1982 doctoral dissertation introduced the notion of computational reflection in procedural programming languages and
768-620: The earliest work was done by Steve Hardy. Chris Mellish helped with the initial Prolog implementation in POP-11. John Williams, working under supervision of Jonathan Cunningham implemented the Common Lisp subsystem. Robert Duncan and Simon Nichols added Standard ML. Between about 1980 and 1991, the project was managed by Aaron Sloman , until he went to the University of Birmingham , though he continued to collaborate with Sussex and ISL on Poplog development after that. Since 1999, he has been responsible for
800-480: The executable, providing a table to correspond these with the underlying methods (or selectors for these methods) compiled into the program. In a compiled language that supports runtime creation of functions, such as Common Lisp , the runtime environment must include a compiler or an interpreter. Reflection can be implemented for languages without built-in reflection by using a program transformation system to define automated source-code changes. Reflection may allow
832-501: The execution of an enclosure of code and can modify itself according to a desired goal of that enclosure. This is typically accomplished by dynamically assigning program code at runtime. In object-oriented programming languages such as Java , reflection allows inspection of classes, interfaces, fields and methods at runtime without knowing the names of the interfaces, fields, methods at compile time . It also allows instantiation of new objects and invocation of methods. Reflection
864-455: The first commercial sales were for VAX/VMS, from the mid-1980s, the main Poplog development work was done on Sun SPARC computers running Solaris , although several different versions were sold, including versions for HP-UX and a 64-bit version of Poplog for DEC Alpha running Digital UNIX . After about 1999, when Poplog became available as free, open source, most development work was done on
896-509: The main Poplog web site, as well as some of the extensions to be found there, listed under POP-11. The Prolog subset of Poplog is implemented using the extendable incremental compiler of POP-11 , the core language of Poplog, which is a general purpose Lisp-like language with a more conventional syntax. The implementation required the Poplog Virtual Machine to be extended to provide support for Prolog continuations , Prolog variables,
928-515: The name POPLOG was adopted, to reflect that the expanded system supported programming in both languages. The name was retained, as a trade mark of the University of Sussex , when the system was later (mid 1980s) extended with incremental compilers for Common Lisp and Standard ML based on a set of tools for implementing new languages in the Poplog Virtual Machine. The user-accessible incremental-compiler tools that allow compilers for all these languages to be added also allow extensions to be made within
960-461: The notion of the meta-circular interpreter as a component of 3-Lisp . Reflection helps programmers make generic software libraries to display data, process different formats of data, perform serialization and deserialization of data for communication, or do bundling and unbundling of data for containers or bursts of communication. Effective use of reflection almost always requires a plan: A design framework, encoding description, object library,
992-427: The rights to the name 'Poplog' and were responsible for the core software development while it was a commercial product. In 1992 ISL and Sussex University won a "Smart Award" in recognition of Poplog sales worth $ 5M. ISL and its clients used Poplog for many development projects, especially ISL's data-mining system Clementine, mostly implemented in POP-11, using powerful graphical tools implemented also in POP-11 running on
Poplog - Misplaced Pages Continue
1024-584: Was that he never completed his PhD in mathematics because he lost his thesis manuscript in the boat, although Popplestone refused to corroborate this. The early part of his professional career was spent at the University of Edinburgh (1965–1985) and the later part at the University of Massachusetts Amherst (1985–2001). In 1990, he was elected a Founding Fellow of the Association for the Advancement of Artificial Intelligence . Due to illness, he retired in 2001 to
#996003