data Tree m tag v x t = Tree
{ sID :: Sid
, sState :: SynthesisState m tag v x t
, sDecision :: SynthesisDecision (SynthesisState m tag v x t) m
, sSubForestVar :: TMVar [Tree m tag v x t]
-- ^ lazy mutable field with different synthesis options and sub nodes
}
Which allow to represent the following synthesis tree, where sSubForestVar will evaluated on request:
- - A
-1 - B
-1-1 - C
-1-2 - D
-2 - E
-2-1 - F
-2-2 - G
What to need to change here (naming and detail may variate, also we need to estimate what is better: Map or HashMap for our task):
data Tree m tag v x t = TVar (Map Sid Node)
data Node = Node
{ sID :: Sid
, sState :: SynthesisState m tag v x t
, sDecision :: SynthesisDecision (SynthesisState m tag v x t) m
}
Which represent the same tree in the following way:
Motivation:
Current:
Which allow to represent the following synthesis tree, where
sSubForestVar
will evaluated on request:-
- A-1
- B-1-1
- C-1-2
- D-2
- E-2-1
- F-2-2
- GWhat to need to change here (naming and detail may variate, also we need to estimate what is better: Map or HashMap for our task):
Which represent the same tree in the following way: