I need to partially expand the scheme code without fully evaluating. It takes something like:
'(my number 8) (my-function (lambda args' value))] (cond ((my number 10) (myfunction' X 'y' z) ((= my number 10) (myfunction 'a' b 'c)) (and my number))) 8/10) value ) (Second = '8') 'value' (and 8)) / code> other words , I need something that extends the definitions, let, latex, etc. without any dangerous assessment. I am planning to do some statistical analysis on a few different scheme codes, and it would be good if all the codes are in a relatively normalized form. I want to extend as much as possible without the risk of any I / O.
Anything that is basically a scheme evaluator is writing I probably will not. Is there any plan work that helps me out of the box?
I should clarify that I do not have control over input. I have been given as input and I have to analyze it; I like to generalize it before analyzing it. This is what I am trying to achieve here.
I am using the racket, but unfortunately, my code must be run with the #group scheme .
What do you want? It will produce not as a question, but it will be: Expand all non-initial syntax in the top-level-form, and one > (define '(define' (My number 8) (my-function (lambda elgs' vine U))] (Condo ((my number 10) (My-function 'x' y 'z)) ((= my number 10) (my-function' a 'b' c)) (other my-number)) ) (Syntax-> Datum (Paramerize ([Current-namespace] (extension (DataM-> syntax #f src)))) With this output:
(value-value (my number) '8) ((my-function) (Lambda elgs' value)) (if (#% app & gt; ; My number '10) (two-value () (#% app my-function 'x' y 'z)) (if (#% App = my-number '10) (let-values) ( #% App my-function 'a' b 'c (let-values)))) Note that if we use syntax- & gt; The value given by DataM conversion, Extended will be one, which can be more useful for analyzing keeping you in mind.
No comments:
Post a Comment