--
You received this message because you are subscribed to the Google Groups "ParaSail Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to parasail-programming...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/parasail-programming-language/58a2d220-2185-48bd-a136-2f6425013d42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/parasail-programming-language/CALnT6vX1vO_B6b-GF9qLTde4sxXN8Wwq2x-7xHrwzHT_Pc6ysA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/parasail-programming-language/CAPO7x1pwGOjhGMzBW_F7k3ttX38pCksXpOp9gq6W%3DMLMKqzr8w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/parasail-programming-language/CALnT6vVPT%2BZLc7HvF6w4UPyPRxrrtJ7%3DG_Ju%3D9%2Bf_pYB90U_zg%40mail.gmail.com.
The current reflection capability provides access to the PSVM (ParaSail Virtual Machine) representation of the program, which is probably not what you are looking for. Because you can overload all operators in ParaSail, another approach is to define a type or set of types that create an AST as a result of evaluation, and then you can define additional operations to do things like derivation and integration. A simple illustration of this approach is included in the examples subdirectory, called "expr_tree.psl". We'll look into providing access to a more complete reflection library. Another alternative might be to provide a library for parsing ParaSail constructs.Take care,-Tuck
On Sun, May 26, 2019 at 11:33 PM Anton Lobach <anton...@uri.edu> wrote:
Unfortunately, I do not have a detailed example yet but some high level ideas. For example, I am thinking about an automatic differentiation library, so, at a high level it would look roughly like the following. A user supplies an expression to the function, say, Differentiate (Expression => Y * (X**2), With_Respect_To => X) and then the Differentiate function would transform the input into 2 * Y * X that can be evaluated at some X and Y. So, basically, Differentiate takes an expression and returns a modified (according to differentiation rules) expression. It looks like this use case is similar in spirit to this reflective Ada approach and falls under the definition of reflection given here (Scala's reflection library) that a program can inspect and modify itself.So, I guess, to achieve such functionality I need an access to the expression's AST for inspection and modification and my understanding is that a reflection library should allow me to do that.Best,Anton
On Sun, May 26, 2019 at 11:54 AM Tucker Taft <tuc...@yaletaft.com> wrote:
The lib/reflection.psi was created to support the compiler, but could be extended further. I don't foresee the need to extend the syntax of the language to support more reflection, but it would be helpful to know which particular reflection capabilities were of most interest. Can you give some examples of use that are of interest to you?Take care,-Tuck
On Sun, May 26, 2019 at 11:37 AM Anton Lobach <entru...@gmail.com> wrote:
--Hi Tucker,I have several questions regarding reflections.1. Is it possible to make a reflection library for ParaSail similar in capabilities (including metaprogramming) to Scala's library?2. In general, does this require adding extensions to the language?I know that there is a reflection library in the lib directory but I am not sure if it is just the compiler's internals.Best,Anton
You received this message because you are subscribed to the Google Groups "ParaSail Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to parasail-programming-language+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/parasail-programming-language/58a2d220-2185-48bd-a136-2f6425013d42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ParaSail Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to parasail-programming-language+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/parasail-programming-language/CALnT6vX1vO_B6b-GF9qLTde4sxXN8Wwq2x-7xHrwzHT_Pc6ysA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
----Regards,Anton Lobach
You received this message because you are subscribed to the Google Groups "ParaSail Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to parasail-programming-language+unsub...@googlegroups.com.
I guess, an access to the PSVM instructions might work as well.Thank you for pointing to the "expr_tree.psl" it looks similar to what I am trying to achieve.By "a library for parsing ParaSail constructs" do you mean an external tool that will process a file with a source code and output a modified source code or a library that will be able to parse constructs from within like in Julia?
Best,Anton
...