The second condition is met when you write a transformer with no input language that may or may not have an output language. For instance:
(define-pass foo : L0 (x) -> L1 ()
---
(Expr : * () -> Expr ()
(cond
[e0 `(---)]
[e1 `(---)]
[else `(---)]))
---)
--
Regards
Simon
You received this message because you are subscribed to the Google Groups "nanopass-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nanopass-framew...@googlegroups.com .
To post to this group, send email to nanopass-...@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/nanopass-framework/57f73a09-5ea7-4b57-a21f-5664a2156737%40googlegroups.com .
For more options, visit https://groups.google.com/d/optout .
Forgot to mention, also, that the documentation won't build, missing scheme.sty and a few bits of makefile stuff.
Thanks for the note. This is because until very recently stex, the system I used to write this, was not readily available. You will notice there is a user-guide.pdf in the doc directory, this is generated from the user-guilde.stex file.
Now that stex is available (github.com/dybvig/stex) along with Chez Scheme (github.com/cisco/ChezScheme) for that matter, it should be possible to get this working, though there is a bit of clean-up that needs to be done to make this easy, since there are a handful of prerequisites and it would be nice to have a configure script to determine if there are any missing pieces.
I’ve added an issue in the github issue tracker for this. Thanks again!
-andy:)
--
You received this message because you are subscribed to the Google Groups "nanopass-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nanopass-framew...@googlegroups.com.
To post to this group, send email to nanopass-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nanopass-framework/6eeb83ae-5b65-497c-8a2e-22786fa95d61%40googlegroups.com.
> It seems like it should be possible to write a macro that makes use of the compile-time record representation of the language to generate a new language and a set of passes for going between the original language and the labeled language and vice versa, especially if the labelling can be done systematically.
>
> Is that something like what you had in mind?
Not entirely, I was hoping to avoid having to make a labelled language entrely, keeping the labelling implicit. That said, explicitly labelling is probably a far more sensible way to go.
It depends a bit on what you’re looking for in implicit labelling. If you simply want to differentiate expression A from expression B, each expression is “implicitly labelled” by its position in memory, and you can use eq? to determine when two expressions are the same or different. Potentially you could even use this to recover some of the explicit properties you are looking for by using an eq-hashtable to map expressions in your language to explicit labels. You can get ordering and properties like that from building your hash table. One caveat with this approach is that if you have terminals that would be eq to each other without representing the same “labelled” position you’d need to come up with some way to handle this (potentially by wrapping your terminal in a record or only using nonterminals to represent it.
As I mentioned, I think it should be possible to write a macro to make some of the explicit labelling work easier, with one caveat: if you are hoping to know that expression A will be evaluated before expression B, it will be necessary to tell the macro what the order of things are. As a for instance, if the language has the following forms:
(call e0 e* …)
(if e0 e1 e2)
(begin e* … e)
(my-awesome-production a b c d e)
What order should it be labelled? The nanopass framework understands the grammar, but doesn’t know anything about the order the things happen, so we’d need a way to communicate that additional information.
> As a side node, you can do live-analysis without any need for labels. Have a look at the Chez Scheme (github.com/cisco/ChezScheme ) liveness passes to see how we compute the conflict graph without it.
Funnily enough, I’ve got my nose buried in that at the moment...
It is fun that this is out there now :)
-andy:)