Reputation: 71
I want to implement symbolic execution engine
for a language. I need to store type, value, etc. of variables in Symbol Table
. I have global and local variables in for statements and operations.
if I don't have local variables it seems such this Sequence also appropriate:
Sequence {Map{name->'a', value <- 'A', type <- 'Member'}, Map {name->'b', value <- 'B', type <- 'Family'},...}
but in general and local scopes, I don't have an idea.
Also, I want to do Depth First Search (DFS)
in a graph of program instructions. I wanna to fork execution in conditional statements and consider both true and false paths.
I want to know with which structure should I create such a Symbol Table
and DFS
.
e.g., Does Stack
is a good structure for DFS?
Edit: I implement Symbol Table with Stack. However, for the DFS part I find stack
as a good structure. but yet I have no idea about the implementing such DFS.
Upvotes: 1
Views: 98