summaryrefslogtreecommitdiff
path: root/Source/VCGeneration/VC.cs
diff options
context:
space:
mode:
authorGravatar wuestholz <unknown>2014-09-23 11:32:04 +0200
committerGravatar wuestholz <unknown>2014-09-23 11:32:04 +0200
commitfb226b8b4b9315a0ad2df1fcd1b4a7f12e118791 (patch)
tree9245479972ed887b26b013ba4fb6c05862767846 /Source/VCGeneration/VC.cs
parent2031fb15596b2a114f7b3e0bb85ff838507051a0 (diff)
Did some refactoring.
Diffstat (limited to 'Source/VCGeneration/VC.cs')
-rw-r--r--Source/VCGeneration/VC.cs14
1 files changed, 5 insertions, 9 deletions
diff --git a/Source/VCGeneration/VC.cs b/Source/VCGeneration/VC.cs
index 3735388c..758430bd 100644
--- a/Source/VCGeneration/VC.cs
+++ b/Source/VCGeneration/VC.cs
@@ -2600,7 +2600,7 @@ namespace VC {
// where clauses of global variables
lock (program.TopLevelDeclarations)
{
- foreach (var gvar in program.TopLevelDeclarations.OfType<GlobalVariable>())
+ foreach (var gvar in program.GlobalVariables())
{
if (gvar != null && gvar.TypedIdent.WhereExpr != null)
{
@@ -2755,15 +2755,11 @@ namespace VC {
{
// Construct the set of inlined procs in the original program
var inlinedProcs = new HashSet<string>();
- foreach (var decl in program.TopLevelDeclarations)
+ foreach (var proc in program.Procedures)
{
- if (decl is Procedure)
- {
- if (!(decl is LoopProcedure))
- {
- var p = decl as Procedure;
- inlinedProcs.Add(p.Name);
- }
+ if (!(proc is LoopProcedure))
+ {
+ inlinedProcs.Add(proc.Name);
}
}