Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Running the pipeline in reverse #355

Open
dennwc opened this issue Feb 7, 2019 · 1 comment
Open

Running the pipeline in reverse #355

dennwc opened this issue Feb 7, 2019 · 1 comment
Assignees

Comments

@dennwc
Copy link
Member

dennwc commented Feb 7, 2019

The DSL was designed and implemented to run in both forward (AST->UAST) and reverse (UAST->AST) modes. This allows converting the native AST returned by drivers to a canonical form (UAST) and back to the native AST. Assuming #352 is solved this will allows us to render UAST into the source files.

However, to make this possible all operations defined by the DSL are required to be reversible (ast == RevOp(Op(ast))). SDK closely follows this requirement, but some drivers don't.

We should revisit the drivers and make sure we can always run the transformation pipelines in reverse.

This will also allow us to have a better test coverage for drivers by runing the pipeline in both directions..

@dennwc dennwc self-assigned this Feb 7, 2019
@sxiii
Copy link

sxiii commented Nov 18, 2019

@dennwc I wonder if current implementation of bblfsh are capable of doing something like:

Go -> Go native AST -> UAST -> C native AST -> C.

So in result that would allow do a Go to C code transpiling.

As I understood well if all drivers will allow to run pipelines in reverse than it would be possible?

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants