samedi 10 juin 2017

implement Symbol Table and DFS

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'},...}

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?

Aucun commentaire:

Enregistrer un commentaire