summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/Core/InterProceduralReachabilityGraph.cs8
-rw-r--r--Source/Predication/UniformityAnalyser.cs2
2 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/InterProceduralReachabilityGraph.cs b/Source/Core/InterProceduralReachabilityGraph.cs
index 63084d99..ccf4b153 100644
--- a/Source/Core/InterProceduralReachabilityGraph.cs
+++ b/Source/Core/InterProceduralReachabilityGraph.cs
@@ -142,7 +142,7 @@ namespace Microsoft.Boogie
newProcedureExitNodes[impl.Name] = newExit;
foreach (Block b in impl.Blocks)
{
- List<List<Cmd>> partition = PartitionCmds(b.Cmds);
+ List<List<Cmd>> partition = PartitionCmdsAccordingToPredicate(b.Cmds, Item => Item is CallCmd);
Block prev = null;
int i = 0;
foreach (List<Cmd> cmds in partition)
@@ -190,12 +190,12 @@ namespace Microsoft.Boogie
#endregion
}
- private List<List<Cmd>> PartitionCmds(List<Cmd> cmds) {
+ public static List<List<Cmd>> PartitionCmdsAccordingToPredicate(List<Cmd> Cmds, Func<Cmd, bool> Predicate) {
List<List<Cmd>> result = new List<List<Cmd>>();
List<Cmd> current = new List<Cmd>();
result.Add(current);
- foreach(Cmd cmd in cmds) {
- if(cmd is CallCmd && current.Count > 0) {
+ foreach(Cmd cmd in Cmds) {
+ if(Predicate(cmd) && current.Count > 0) {
current = new List<Cmd>();
result.Add(current);
}
diff --git a/Source/Predication/UniformityAnalyser.cs b/Source/Predication/UniformityAnalyser.cs
index 3c8f4cd9..040cb227 100644
--- a/Source/Predication/UniformityAnalyser.cs
+++ b/Source/Predication/UniformityAnalyser.cs
@@ -37,7 +37,7 @@ namespace Microsoft.Boogie
/// Simplifies the CFG of the given implementation impl by merging each
/// basic block with a single predecessor into that predecessor if the
/// predecessor has a single successor. If a uniformity analyser is
- /// being used then block will only be merged if they are both uniform
+ /// being used then blocks will only be merged if they are both uniform
/// or both non-uniform
/// </summary>
public static void MergeBlocksIntoPredecessors(Program prog, Implementation impl, UniformityAnalyser uni)