summaryrefslogtreecommitdiff
path: root/Source/Houdini
diff options
context:
space:
mode:
authorGravatar qadeer <qadeer@microsoft.com>2011-11-23 11:26:34 -0800
committerGravatar qadeer <qadeer@microsoft.com>2011-11-23 11:26:34 -0800
commitdf1cd695daffb01a590a7310dbee1b6594de2ecd (patch)
treee35d6d49291a2a89ba62647c23fd354ccbb81e25 /Source/Houdini
parent01c3e8e8045cfa8a2b5f0746897441ebf027749d (diff)
fixed bug in the inlineDepth option for houdini
small clean up in the inlining implementation
Diffstat (limited to 'Source/Houdini')
-rw-r--r--Source/Houdini/Houdini.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/Houdini/Houdini.cs b/Source/Houdini/Houdini.cs
index 2c202022..ed3d1afc 100644
--- a/Source/Houdini/Houdini.cs
+++ b/Source/Houdini/Houdini.cs
@@ -261,6 +261,7 @@ namespace Microsoft.Boogie.Houdini {
this.callGraph = BuildCallGraph();
this.continueAtError = continueAtError;
this.houdiniConstants = CollectExistentialConstants();
+ Inline();
this.vcgen = new VCGen(program, CommandLineOptions.Clo.SimplifyLogFilePath, CommandLineOptions.Clo.SimplifyLogFileAppend);
this.checker = new Checker(vcgen, program, CommandLineOptions.Clo.SimplifyLogFilePath, CommandLineOptions.Clo.SimplifyLogFileAppend, CommandLineOptions.Clo.ProverKillTime);
@@ -277,6 +278,22 @@ namespace Microsoft.Boogie.Houdini {
this.houdiniSessions = new ReadOnlyDictionary<Implementation, HoudiniSession>(houdiniSessions);
}
+ private void Inline() {
+ if (CommandLineOptions.Clo.InlineDepth < 0)
+ return;
+ foreach (Implementation impl in callGraph.Nodes) {
+ impl.OriginalBlocks = impl.Blocks;
+ impl.OriginalLocVars = impl.LocVars;
+ }
+ foreach (Implementation impl in callGraph.Nodes) {
+ Inliner.ProcessImplementationForHoudini(program, impl);
+ }
+ foreach (Implementation impl in callGraph.Nodes) {
+ impl.OriginalBlocks = null;
+ impl.OriginalLocVars = null;
+ }
+ }
+
private ReadOnlyDictionary<string, IdentifierExpr> CollectExistentialConstants() {
Dictionary<string, IdentifierExpr> existentialConstants = new Dictionary<string, IdentifierExpr>();
foreach (Declaration decl in program.TopLevelDeclarations) {