Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding functionality to generate DOT string format from expression tree topology #154

Merged
merged 3 commits into from
Jan 20, 2018

Conversation

hkaiser
Copy link
Member

@hkaiser hkaiser commented Jan 18, 2018

This also adds the name of the tree as an argument to the existing newick_tree() function

@hkaiser
Copy link
Member Author

hkaiser commented Jan 18, 2018

@khuck, @kisaacs Currently, the generated output is very simplistic as it only describes the tree topology, for instance:

graph read_x {
    "/phylanx/block#0/0#16" -- "/phylanx/define-function#0#read_x/0#1";
    "/phylanx/define-function#0#read_x/0#1" -- "/phylanx/file_read_csv#0/0#8";
    "/phylanx/file_read_csv#0/0#8" -- "/phylanx/argument#0#filepath/0#7";
    "/phylanx/define-function#0#read_x/0#1" -- "/phylanx/argument#1#row_start/0#9";
    "/phylanx/define-function#0#read_x/0#1" -- "/phylanx/argument#2#row_stop/0#10";
    "/phylanx/define-function#0#read_x/0#1" -- "/phylanx/argument#3#col_start/0#11";
    "/phylanx/define-function#0#read_x/0#1" -- "/phylanx/argument#4#col_stop/0#12";
    "/phylanx/block#0/0#16" -- "/phylanx/function#0#read_x/0#15";
}

This was generated from the PhySL expression:

std::string const read_x_code = R"(block(
    //
    // Read X-data from given CSV file
    //
    define(read_x, filepath, row_start, row_stop, col_start, col_stop,
        slice(file_read_csv(filepath), row_start, row_stop, col_start, col_stop)
    ),
    read_x
))";

The node names can be used to identify the primitive instances implementing the corresponding functionality.

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

Successfully merging this pull request may close these issues.

Generate expression tree topology in DOT format
1 participant