Wrap generated graphs to ensure entry and exit nodes have no extra edges

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
2024-05-09 21:08:32 -07:00
parent 69d1ecebae
commit 734e82ff6d
3 changed files with 14 additions and 18 deletions

View File

@@ -55,16 +55,16 @@ record Program : Set where
rootStmt : Stmt
graph : Graph
graph = buildCfg rootStmt
graph = wrap (buildCfg rootStmt)
State : Set
State = Graph.Index graph
initialState : State
initialState = proj₁ (buildCfg-input rootStmt)
initialState = proj₁ (wrap-input (buildCfg rootStmt))
finalState : State
finalState = proj₁ (buildCfg-output rootStmt)
finalState = proj₁ (wrap-output (buildCfg rootStmt))
private
vars-Set : StringSet