summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Peter Collingbourne <peter@pcc.me.uk>2012-06-20 13:14:13 +0100
committerGravatar Peter Collingbourne <peter@pcc.me.uk>2012-06-20 13:14:13 +0100
commitcc8f20fc8dae385a54a8b3609398e824e6c8a0b6 (patch)
treefb46570b8a7934abdca15cd40dd02c6eb5f2668e
parent59126d0c00b34ce759d02e8947108606c150accc (diff)
Block predicator: handle StateCmd
-rw-r--r--Source/VCGeneration/BlockPredicator.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/VCGeneration/BlockPredicator.cs b/Source/VCGeneration/BlockPredicator.cs
index f4e82182..987574be 100644
--- a/Source/VCGeneration/BlockPredicator.cs
+++ b/Source/VCGeneration/BlockPredicator.cs
@@ -114,6 +114,13 @@ public class BlockPredicator {
var cCmd = (CallCmd)cmd;
cCmd.Ins.Insert(0, p);
cmdSeq.Add(cCmd);
+ } else if (cmd is StateCmd) {
+ var sCmd = (StateCmd)cmd;
+ var newCmdSeq = new CmdSeq();
+ foreach (Cmd c in sCmd.Cmds)
+ PredicateCmd(newCmdSeq, c);
+ sCmd.Cmds = newCmdSeq;
+ cmdSeq.Add(sCmd);
} else {
Console.WriteLine("Unsupported cmd: " + cmd.GetType().ToString());
}