CSC/ECE 517 Fall 2009/wiki2pthelm: Difference between revisions
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
'''Reflection-Oriented Programming''' (ROP) is defined as a programming model design with the intent to analyze and improve it's structure, performance or other implementation aspects during runtime, as opposed to compile time. Two key concepts of ROP are meta-information, which is the state of the program at execution time, and metaprogramming, which is the idea that a language can act as it's own reflection. In other words, a language can reflect (modify) itself. More precisely, we define reflection-oriented programming to be a programming style that uses any means available (reflection or otherwise) to extend the meta-information in order to avoid situations in which a local program's requirements leads to non-local rewriting of said program [4]. | '''Reflection-Oriented Programming''' (ROP) is defined as a programming model design with the intent to analyze and improve it's structure, performance or other implementation aspects during runtime, as opposed to compile time. Two key concepts of ROP are meta-information, which is the state of the program at execution time, and metaprogramming, which is the idea that a language can act as it's own reflection. In other words, a language can reflect (modify) itself. More precisely, we define reflection-oriented programming to be a programming style that uses any means available (reflection or otherwise) to extend the meta-information in order to avoid situations in which a local program's requirements leads to non-local rewriting of said program [4]. | ||
'''''Reflection vs. ROP''''' | '''''Reflection vs. ROP''''' | ||
Reflection is the process by which a computer program can observe and modify it's own structure and behavior[1]. It allows an executing program to examine or "introspect" upon itself, and manipulate internal properties of the program[2]. Java, Ruby and .NET are among the most popular reflective languages, however there are many others[3]. Although reflection is the primary concept behind ROP, it does not necessarily preclude the existence of ROP. ROP is a concept of design; as with most designs, it is not necessarily dependent on the implementation. Computational programming can also be used, and does not assume the presence of source code at runtime, something that is essential to the concept of reflection[4]. | Reflection is the process by which a computer program can observe and modify it's own structure and behavior[1]. It allows an executing program to examine or "introspect" upon itself, and manipulate internal properties of the program[2]. Java, Ruby and .NET are among the most popular reflective languages, however there are many others[3]. Although reflection is the primary concept behind ROP, it does not necessarily preclude the existence of ROP. ROP is a concept of design; as with most designs, it is not necessarily dependent on the implementation. Computational programming can also be used, and does not assume the presence of source code at runtime, something that is essential to the concept of reflection[4]. | ||
'''''Meta-Information''''' | '''''Meta-Information''''' | ||
Meta-Information is the state of the program at execution time. | Meta-Information is the state of the program at execution time. | ||
'''''Metaprogramming''''' | '''''Metaprogramming''''' | ||
Metaprogramming introduces the concept of "programs that write programs". Reflection is one type of metaprogramming, and therefore can be considered as an option when attempting to design based on ROP. | Metaprogramming introduces the concept of "programs that write programs". Reflection is one type of metaprogramming, and therefore can be considered as an option when attempting to design based on ROP. | ||
'''''Examples''''' | '''''Examples''''' |
Revision as of 01:15, 6 October 2009
Reflection-Oriented Programming
Reflection-Oriented Programming (ROP) is defined as a programming model design with the intent to analyze and improve it's structure, performance or other implementation aspects during runtime, as opposed to compile time. Two key concepts of ROP are meta-information, which is the state of the program at execution time, and metaprogramming, which is the idea that a language can act as it's own reflection. In other words, a language can reflect (modify) itself. More precisely, we define reflection-oriented programming to be a programming style that uses any means available (reflection or otherwise) to extend the meta-information in order to avoid situations in which a local program's requirements leads to non-local rewriting of said program [4].
Reflection vs. ROP
Reflection is the process by which a computer program can observe and modify it's own structure and behavior[1]. It allows an executing program to examine or "introspect" upon itself, and manipulate internal properties of the program[2]. Java, Ruby and .NET are among the most popular reflective languages, however there are many others[3]. Although reflection is the primary concept behind ROP, it does not necessarily preclude the existence of ROP. ROP is a concept of design; as with most designs, it is not necessarily dependent on the implementation. Computational programming can also be used, and does not assume the presence of source code at runtime, something that is essential to the concept of reflection[4].
Meta-Information
Meta-Information is the state of the program at execution time.
Metaprogramming
Metaprogramming introduces the concept of "programs that write programs". Reflection is one type of metaprogramming, and therefore can be considered as an option when attempting to design based on ROP.
Examples
Rather than show examples of reflection,
References
[1] Reflection (Computer Science), Wikipedia: http://en.wikipedia.org/wiki/Reflection_%28computer_science%29 [2] Using Java Reflection, Sun: http://java.sun.com/developer/technicalArticles/ALT/Reflection/ [3] List of reflective programming languages and platforms, Wikipedia: http://en.wikipedia.org/wiki/List_of_reflective_programming_languages_and_platforms [4] An Introduction to Reflection-Oriented Programming, Sobel & Friedman: http://www2.parc.com/csl/groups/sda/projects/reflection96/docs/sobel/sobel.pdf