Sunday 1 January 2017

OpenC: Extending C with Computational Reflection

Vol. 8  Issue 3
Year:2014
Issue:Apr-Jun
Title:OpenC: Extending C with Computational Reflection
Author Name:Songqing Yue
Synopsis:
Computational Reflection has shown much promise for improving the quality of software by providing programming language techniques to address issues of modularity, reusability, maintainability, and extensibility. The Meta-Object Protocol (MOP) is a powerful tool to provide the capability of computational reflection by means of object oriented and reflective techniques to organize a meta-level architecture. It provides a set of interfaces for developers to access the underlying implementation of programs in order to automate the source-to-source program translations. In this paper, the author describes how to bring the power of computational reflection to C through a MOP, named OpenC, which offers a framework to build arbitrary source-to-source program transformation libraries for large software systems written in C. The design focus of OpenC is to automate program transformations in a straightforward and transparent way through techniques of code generation, so that client users only need to add a simple annotation to their code to be manipulated, while removing the need to know the details on how the transformations are performed. The paper provides a general motivation for using reflection and explains briefly the design and implementation of the OpenC framework. In addition, this paper will show an example, how OpenC can be used to build a simple profiling library that can be employed to analyse the distribution of execution time among all functions in a project by recording the amount of time spent on executing each function.

No comments:

Post a Comment