blarify icon indicating copy to clipboard operation
blarify copied to clipboard

Support for analyzing relationships between variables

Open whichxjy opened this issue 8 months ago • 6 comments

Hi, thank you for this amazing project! I was wondering if it would be possible to add support for analyzing the relationships between variables?

whichxjy avatar Mar 26 '25 09:03 whichxjy

Could you elaborate a bit more? Are you suggesting that we should add each variable as an individual node so that we can establish relationships between variables—such as when one variable is used to define another or passed as a parameter in a function?

berrazuriz1 avatar Apr 01 '25 21:04 berrazuriz1

Could you elaborate a bit more? Are you suggesting that we should add each variable as an individual node so that we can establish relationships between variables—such as when one variable is used to define another or passed as a parameter in a function?

yes,its useful,do you have any plan or any suggestion.

impreza2022 avatar Apr 01 '25 23:04 impreza2022

Mmm if the LSP have the references, and I think they usually have, it's totally doable. Respecting on if it is useful or not, I think it depends what you want to achieve. But in general terms it is, I would be worried about not over complicate things for the LLM tho.

@v4rgas feel free to comment

berrazuriz1 avatar Apr 10 '25 12:04 berrazuriz1

A use case occurs when a function uses a global variable from another file. In this scenario, the relationship between FUNCTION (or LOCAL_VARIABLE) and GLOBAL_VARIABLE would be helpful.

whichxjy avatar Apr 11 '25 09:04 whichxjy

That is an interesting use case. Let me check

berrazuriz1 avatar Apr 14 '25 12:04 berrazuriz1

Mmm if the LSP have the references, and I think they usually have, it's totally doable. Respecting on if it is useful or not, I think it depends what you want to achieve. But in general terms it is, I would be worried about not over complicate things for the LLM tho.

@v4rgas feel free to comment

lsp have the references, but before we lookup the ref through lsp server ,we should create and append the variable node in the create node stage.

impreza2022 avatar Apr 15 '25 07:04 impreza2022