Reflection is a common mechanism for accessing and changing the structure of a program at run-time, found in many dynamic programming languages such as Smalltalk, Ruby and Python, and in impoverished form in Java and (hence) Scala. Functional languages such as LISP and Scheme also support a good reflect framework.

Modern languages support concurrency, either by adding threads on top of the existing language constructs, or by designing from the ground up with concurrency in mind.

My question is:

What models of reflection for the concurrency aspects in concurrent languages (multi-threaded, actor-based, active-object-based) exist?

  • $\begingroup$ I am unsure about what you are aiming at. Are you interested in concurrent/parallel implementations of reflection or do you want to influence behaviour of threads using reflection? $\endgroup$
    – Raphael
    Mar 12 '12 at 17:35
  • 3
    $\begingroup$ The latter. Question has been rephrased. $\endgroup$ Mar 12 '12 at 17:40
  • $\begingroup$ All things considered this question is very broad. I see at least four questions: what you can get in well-known languages; what you can get if you take your pick of language with a practical implementation (Erlang, Polyphonic C#, JoCaml, …); what has been studied in theory and implemented as a proof-of-concept (Acute, …); what calculi have been published in theory papers. Please clarify or restrict this question. $\endgroup$ Mar 12 '12 at 18:44
  • 1
    $\begingroup$ @Gilles: few of the languages you point to have a reflective layer. In any case, I've made the question less broad. $\endgroup$ Mar 12 '12 at 19:35

The closest I can think of is the MetaKlaim language. Klaim is a process calculus with asynchronous communication via tuple spaces. MetaKlaim is an extension of Klaim that integrates the meta-programming features of MetaML, namely multi-stage programming with types. (You may be more familiar with the syntax of MetaOCaml)

I am not an expert in any of these fields, so I don't really know if multi-stage programming fit in this definition of reflection. (I know this does not capture all aspects of reflection anyway so that's at most a partial answer).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.