Why is it called C# Syntax Graph (but not C# Syntax Tree) in the Syntax Visualizer tool?










-2















Here is an image of the Roslyn Syntax Visualizer tool (part of Visual Studio):



Roslyn Syntax Visualizer Graph



As I can see we can use the View Directed Syntax Graph command to display this syntax tree window:



Roslyn Syntax Graph



My question is: Why this window is called Syntax Graph but not Syntax Tree?



Is it because every tree is a graph, but then why didn't they choose the name Syntax Tree as more convenient? Why generalize with the Graph term?



If the syntax tree can be cyclic then can you provide me with an example of C# syntax being a Syntax Graph?










share|improve this question



















  • 3





    This sounds like a great question for the IDE team, but... as a coding question here - I'm unclear what you want us to do expect speculate.

    – Marc Gravell
    Nov 13 '18 at 9:18











  • Can also downvoters explain their votes :) If you can't provide an example of C# syntax tree having cycles therefor being a graph, please do not downvote so others can answer this :)

    – Nikolay Kostov
    Nov 13 '18 at 9:29











  • I'm wondering whether it would be possible to construct a graph with a node having multiple parents. This wouldn't be a cycle (per se) unless we ignore the directedness. And I doubt any normal C# code represented as source files could produce such a graph either.

    – Damien_The_Unbeliever
    Nov 13 '18 at 9:32






  • 1





    I think it's a matter of picking your battles/consistency. When you select that menu option, it spits out a .dgml file and opens them in the "Graph Document Editor" (Or, presumably, the "Graph Document Viewer". Which one you have depends on VS edition, I can only see the editor, your screenshot is showing the viewer). DGML files are generic and can contain any type of graph, not just trees. If it's open in the editor, you can add and remove nodes and links, so can easily end up with something that isn't a tree.

    – Damien_The_Unbeliever
    Nov 13 '18 at 10:14











  • Thank you, @Damien_The_Unbeliever it does make sense.

    – Nikolay Kostov
    Nov 14 '18 at 8:48















-2















Here is an image of the Roslyn Syntax Visualizer tool (part of Visual Studio):



Roslyn Syntax Visualizer Graph



As I can see we can use the View Directed Syntax Graph command to display this syntax tree window:



Roslyn Syntax Graph



My question is: Why this window is called Syntax Graph but not Syntax Tree?



Is it because every tree is a graph, but then why didn't they choose the name Syntax Tree as more convenient? Why generalize with the Graph term?



If the syntax tree can be cyclic then can you provide me with an example of C# syntax being a Syntax Graph?










share|improve this question



















  • 3





    This sounds like a great question for the IDE team, but... as a coding question here - I'm unclear what you want us to do expect speculate.

    – Marc Gravell
    Nov 13 '18 at 9:18











  • Can also downvoters explain their votes :) If you can't provide an example of C# syntax tree having cycles therefor being a graph, please do not downvote so others can answer this :)

    – Nikolay Kostov
    Nov 13 '18 at 9:29











  • I'm wondering whether it would be possible to construct a graph with a node having multiple parents. This wouldn't be a cycle (per se) unless we ignore the directedness. And I doubt any normal C# code represented as source files could produce such a graph either.

    – Damien_The_Unbeliever
    Nov 13 '18 at 9:32






  • 1





    I think it's a matter of picking your battles/consistency. When you select that menu option, it spits out a .dgml file and opens them in the "Graph Document Editor" (Or, presumably, the "Graph Document Viewer". Which one you have depends on VS edition, I can only see the editor, your screenshot is showing the viewer). DGML files are generic and can contain any type of graph, not just trees. If it's open in the editor, you can add and remove nodes and links, so can easily end up with something that isn't a tree.

    – Damien_The_Unbeliever
    Nov 13 '18 at 10:14











  • Thank you, @Damien_The_Unbeliever it does make sense.

    – Nikolay Kostov
    Nov 14 '18 at 8:48













-2












-2








-2








Here is an image of the Roslyn Syntax Visualizer tool (part of Visual Studio):



Roslyn Syntax Visualizer Graph



As I can see we can use the View Directed Syntax Graph command to display this syntax tree window:



Roslyn Syntax Graph



My question is: Why this window is called Syntax Graph but not Syntax Tree?



Is it because every tree is a graph, but then why didn't they choose the name Syntax Tree as more convenient? Why generalize with the Graph term?



If the syntax tree can be cyclic then can you provide me with an example of C# syntax being a Syntax Graph?










share|improve this question
















Here is an image of the Roslyn Syntax Visualizer tool (part of Visual Studio):



Roslyn Syntax Visualizer Graph



As I can see we can use the View Directed Syntax Graph command to display this syntax tree window:



Roslyn Syntax Graph



My question is: Why this window is called Syntax Graph but not Syntax Tree?



Is it because every tree is a graph, but then why didn't they choose the name Syntax Tree as more convenient? Why generalize with the Graph term?



If the syntax tree can be cyclic then can you provide me with an example of C# syntax being a Syntax Graph?







c# .net syntax roslyn visualizer






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 10:04







Nikolay Kostov

















asked Nov 13 '18 at 9:16









Nikolay KostovNikolay Kostov

8,8141861107




8,8141861107







  • 3





    This sounds like a great question for the IDE team, but... as a coding question here - I'm unclear what you want us to do expect speculate.

    – Marc Gravell
    Nov 13 '18 at 9:18











  • Can also downvoters explain their votes :) If you can't provide an example of C# syntax tree having cycles therefor being a graph, please do not downvote so others can answer this :)

    – Nikolay Kostov
    Nov 13 '18 at 9:29











  • I'm wondering whether it would be possible to construct a graph with a node having multiple parents. This wouldn't be a cycle (per se) unless we ignore the directedness. And I doubt any normal C# code represented as source files could produce such a graph either.

    – Damien_The_Unbeliever
    Nov 13 '18 at 9:32






  • 1





    I think it's a matter of picking your battles/consistency. When you select that menu option, it spits out a .dgml file and opens them in the "Graph Document Editor" (Or, presumably, the "Graph Document Viewer". Which one you have depends on VS edition, I can only see the editor, your screenshot is showing the viewer). DGML files are generic and can contain any type of graph, not just trees. If it's open in the editor, you can add and remove nodes and links, so can easily end up with something that isn't a tree.

    – Damien_The_Unbeliever
    Nov 13 '18 at 10:14











  • Thank you, @Damien_The_Unbeliever it does make sense.

    – Nikolay Kostov
    Nov 14 '18 at 8:48












  • 3





    This sounds like a great question for the IDE team, but... as a coding question here - I'm unclear what you want us to do expect speculate.

    – Marc Gravell
    Nov 13 '18 at 9:18











  • Can also downvoters explain their votes :) If you can't provide an example of C# syntax tree having cycles therefor being a graph, please do not downvote so others can answer this :)

    – Nikolay Kostov
    Nov 13 '18 at 9:29











  • I'm wondering whether it would be possible to construct a graph with a node having multiple parents. This wouldn't be a cycle (per se) unless we ignore the directedness. And I doubt any normal C# code represented as source files could produce such a graph either.

    – Damien_The_Unbeliever
    Nov 13 '18 at 9:32






  • 1





    I think it's a matter of picking your battles/consistency. When you select that menu option, it spits out a .dgml file and opens them in the "Graph Document Editor" (Or, presumably, the "Graph Document Viewer". Which one you have depends on VS edition, I can only see the editor, your screenshot is showing the viewer). DGML files are generic and can contain any type of graph, not just trees. If it's open in the editor, you can add and remove nodes and links, so can easily end up with something that isn't a tree.

    – Damien_The_Unbeliever
    Nov 13 '18 at 10:14











  • Thank you, @Damien_The_Unbeliever it does make sense.

    – Nikolay Kostov
    Nov 14 '18 at 8:48







3




3





This sounds like a great question for the IDE team, but... as a coding question here - I'm unclear what you want us to do expect speculate.

– Marc Gravell
Nov 13 '18 at 9:18





This sounds like a great question for the IDE team, but... as a coding question here - I'm unclear what you want us to do expect speculate.

– Marc Gravell
Nov 13 '18 at 9:18













Can also downvoters explain their votes :) If you can't provide an example of C# syntax tree having cycles therefor being a graph, please do not downvote so others can answer this :)

– Nikolay Kostov
Nov 13 '18 at 9:29





Can also downvoters explain their votes :) If you can't provide an example of C# syntax tree having cycles therefor being a graph, please do not downvote so others can answer this :)

– Nikolay Kostov
Nov 13 '18 at 9:29













I'm wondering whether it would be possible to construct a graph with a node having multiple parents. This wouldn't be a cycle (per se) unless we ignore the directedness. And I doubt any normal C# code represented as source files could produce such a graph either.

– Damien_The_Unbeliever
Nov 13 '18 at 9:32





I'm wondering whether it would be possible to construct a graph with a node having multiple parents. This wouldn't be a cycle (per se) unless we ignore the directedness. And I doubt any normal C# code represented as source files could produce such a graph either.

– Damien_The_Unbeliever
Nov 13 '18 at 9:32




1




1





I think it's a matter of picking your battles/consistency. When you select that menu option, it spits out a .dgml file and opens them in the "Graph Document Editor" (Or, presumably, the "Graph Document Viewer". Which one you have depends on VS edition, I can only see the editor, your screenshot is showing the viewer). DGML files are generic and can contain any type of graph, not just trees. If it's open in the editor, you can add and remove nodes and links, so can easily end up with something that isn't a tree.

– Damien_The_Unbeliever
Nov 13 '18 at 10:14





I think it's a matter of picking your battles/consistency. When you select that menu option, it spits out a .dgml file and opens them in the "Graph Document Editor" (Or, presumably, the "Graph Document Viewer". Which one you have depends on VS edition, I can only see the editor, your screenshot is showing the viewer). DGML files are generic and can contain any type of graph, not just trees. If it's open in the editor, you can add and remove nodes and links, so can easily end up with something that isn't a tree.

– Damien_The_Unbeliever
Nov 13 '18 at 10:14













Thank you, @Damien_The_Unbeliever it does make sense.

– Nikolay Kostov
Nov 14 '18 at 8:48





Thank you, @Damien_The_Unbeliever it does make sense.

– Nikolay Kostov
Nov 14 '18 at 8:48












1 Answer
1






active

oldest

votes


















0














That's mostly cause Tree is a Graph ... that is A tree is a graph that has no cycles






share|improve this answer























  • Yeah that's true, but then why not use the Syntax Tree term?

    – Nikolay Kostov
    Nov 13 '18 at 9:27










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53277540%2fwhy-is-it-called-c-sharp-syntax-graph-but-not-c-sharp-syntax-tree-in-the-synta%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














That's mostly cause Tree is a Graph ... that is A tree is a graph that has no cycles






share|improve this answer























  • Yeah that's true, but then why not use the Syntax Tree term?

    – Nikolay Kostov
    Nov 13 '18 at 9:27















0














That's mostly cause Tree is a Graph ... that is A tree is a graph that has no cycles






share|improve this answer























  • Yeah that's true, but then why not use the Syntax Tree term?

    – Nikolay Kostov
    Nov 13 '18 at 9:27













0












0








0







That's mostly cause Tree is a Graph ... that is A tree is a graph that has no cycles






share|improve this answer













That's mostly cause Tree is a Graph ... that is A tree is a graph that has no cycles







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 13 '18 at 9:25









RahulRahul

62.1k124481




62.1k124481












  • Yeah that's true, but then why not use the Syntax Tree term?

    – Nikolay Kostov
    Nov 13 '18 at 9:27

















  • Yeah that's true, but then why not use the Syntax Tree term?

    – Nikolay Kostov
    Nov 13 '18 at 9:27
















Yeah that's true, but then why not use the Syntax Tree term?

– Nikolay Kostov
Nov 13 '18 at 9:27





Yeah that's true, but then why not use the Syntax Tree term?

– Nikolay Kostov
Nov 13 '18 at 9:27

















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53277540%2fwhy-is-it-called-c-sharp-syntax-graph-but-not-c-sharp-syntax-tree-in-the-synta%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

How to read a connectionString WITH PROVIDER in .NET Core?

In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

Museum of Modern and Contemporary Art of Trento and Rovereto