Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Boogie 2.9.5 #165

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

env:
SOLUTION: source/Corral.sln
BOOGIESOLUTION: boogie/Source/Boogie.sln

jobs:
job0:
Expand All @@ -20,6 +21,7 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: 'true'
- name: Build Corral, package Corral
run: |
# Find version from tag info
Expand All @@ -29,6 +31,8 @@ jobs:
cd $GITHUB_WORKSPACE
# Restore dotnet tools
dotnet tool restore
# Build custom Boogie
dotnet build ${BOOGIESOLUTION}
# Build Corral
dotnet build -p:Version=$VERSION -c Release ${SOLUTION}
# Create packages
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on: [push, pull_request, workflow_dispatch]
env:
SOLUTION: source/Corral.sln
AVSOLUTION: source/av.sln
BOOGIESOLUTION: boogie/Source/Boogie.sln
Z3URL: https://github.com/Z3Prover/z3/releases/download/z3-4.8.8/z3-4.8.8-x64-ubuntu-16.04.zip

jobs:
Expand All @@ -23,6 +24,7 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: 'true'
- name: Install tools, build Corral, build Angelic Verifier
run: |
# Download a Z3 release
Expand All @@ -32,6 +34,8 @@ jobs:
cd $GITHUB_WORKSPACE
# Restore dotnet tools
dotnet tool restore
# Build custom Boogie
dotnet build ${BOOGIESOLUTION}
# Build Corral
dotnet build -c ${{ matrix.configuration }} ${SOLUTION}
# Build Angelic Verifier
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "boogie"]
path = boogie
url = https://github.com/boogie-org/boogie.git
branch = corral
1 change: 1 addition & 0 deletions boogie
Submodule boogie added at a740d2
4 changes: 4 additions & 0 deletions source/AliasAnalysis/AliasAnalysis.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@
<ProjectReference Include="..\Util\CorralUtil.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Boogie.ExecutionEngine" Version="2.9.5" />
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions source/AngelicVerifier/AngelicVerifier.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@
<ProjectReference Include="..\propinstutils\PropInstUtils.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Boogie.ExecutionEngine" Version="2.9.5" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@
<ProjectReference Include="..\Corral\Corral.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Boogie.ExecutionEngine" Version="2.9.5" />
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions source/AvUtil/AvUtil.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
<AssemblyName>AvUtil</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Update="Boogie.ExecutionEngine" Version="2.9.5" />
</ItemGroup>

</Project>
7 changes: 4 additions & 3 deletions source/CoreLib/AbstractHoudini.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public AbstractHoudini(Program program)
this.impl2Summary = new Dictionary<string, ISummaryElement>();
this.name2Impl = BoogieUtil.nameImplMapping(program);

this.vcgen = new VCGen(program, CommandLineOptions.Clo.ProverLogFilePath, CommandLineOptions.Clo.ProverLogFileAppend, new List<Checker>());
var checkerPool = new CheckerPool(CommandLineOptions.Clo);
this.vcgen = new VCGen(program, checkerPool);
this.prover = ProverInterface.CreateProver(program, CommandLineOptions.Clo.ProverLogFilePath, CommandLineOptions.Clo.ProverLogFileAppend, CommandLineOptions.Clo.TimeLimit);
this.reporter = new AbstractHoudiniErrorReporter();

Expand Down Expand Up @@ -312,13 +313,13 @@ private void attachEnsures(Implementation impl)
private void GenVC(Implementation impl)
{
ModelViewInfo mvInfo;
Dictionary<int, Absy> label2absy;
ControlFlowIdMap<Absy> label2absy = new ControlFlowIdMap<Absy>();

vcgen.ConvertCFG2DAG(impl);
vcgen.PassifyImpl(impl, out mvInfo);

var gen = prover.VCExprGen;
var vcexpr = vcgen.GenerateVC(impl, null, out label2absy, prover.Context);
var vcexpr = vcgen.GenerateVC(impl, null, label2absy, prover.Context);

// Create a macro so that the VC can sit with the theorem prover
Macro macro = new Macro(Token.NoToken, impl.Name + "Macro", new List<Variable>(), new Formal(Token.NoToken, new TypedIdent(Token.NoToken, "", Bpl.Type.Bool), false));
Expand Down
4 changes: 4 additions & 0 deletions source/CoreLib/CoreLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
<ProjectReference Include="..\Util\CorralUtil.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Boogie.ExecutionEngine" Version="2.9.5" />
</ItemGroup>

</Project>
13 changes: 6 additions & 7 deletions source/CoreLib/StratifiedInlining.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public void RunInitialAnalyses(Program prog)
}

public StratifiedInlining(Program program, string logFilePath, bool appendLogFile, Action<Implementation> PassiveImplInstrumentation) :
base(program, logFilePath, appendLogFile, new List<Checker>(), PassiveImplInstrumentation)
base(program, logFilePath, appendLogFile, new CheckerPool(CommandLineOptions.Clo), PassiveImplInstrumentation)
{
stats = new Stats();

Expand Down Expand Up @@ -1304,7 +1304,7 @@ public List<Tuple<StratifiedVC, Block>> AssertMustReach(StratifiedVC svc, HashSe
var ret = new List<Tuple<StratifiedVC, Block>>();

// This is most likely redundant
prover.Assert(svc.MustReach(svc.info.impl.Blocks[0]), true);
prover.Assert(svc.MustReach(svc.info.impl.Blocks[0], svc.info.absyIds), true);

if (!attachedVCInv.ContainsKey(svc))
return ret;
Expand All @@ -1318,12 +1318,12 @@ public List<Tuple<StratifiedVC, Block>> AssertMustReach(StratifiedVC svc, HashSe
var key = Tuple.Create(vc, callblock);
if (prevAsserted != null && !prevAsserted.Contains(key))
{
prover.Assert(vc.MustReach(callblock), true);
prover.Assert(vc.MustReach(callblock, svc.info.absyIds), true);
ret.Add(key);
}
iter = parent[iter];
}
prover.Assert(mainVC.MustReach(mainVC.callSites.First(tup => tup.Value.Contains(iter)).Key), true);
prover.Assert(mainVC.MustReach(mainVC.callSites.First(tup => tup.Value.Contains(iter)).Key, svc.info.absyIds), true);
return ret;
}

Expand Down Expand Up @@ -1867,7 +1867,7 @@ private Outcome CheckVC(ProverInterface.ErrorHandler reporter)
var stopwatch = Stopwatch.StartNew();
prover.Check();
stats.time += stopwatch.ElapsedTicks;
ProverInterface.Outcome outcome = prover.CheckOutcomeCore(reporter);
ProverInterface.Outcome outcome = prover.CheckOutcomeCore(reporter, 1);
return ConditionGeneration.ProverInterfaceOutcomeToConditionGenerationOutcome(outcome);
}

Expand Down Expand Up @@ -4110,8 +4110,7 @@ public override int StartingProcId()
private Absy Label2Absy(string procName, string label)
{
int id = int.Parse(label);
var l2a = si.implName2StratifiedInliningInfo[procName].label2absy;
return (Absy)l2a[id];
return si.implName2StratifiedInliningInfo[procName].absyIds.GetValue(id);
}

public override void OnProverError(string message)
Expand Down
4 changes: 4 additions & 0 deletions source/Corral/Corral.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@
<PackageReference Include="System.Resources.Extensions" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="../../boogie/Source/ExecutionEngine/ExecutionEngine.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion source/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<!-- Boogie dependency -->
<ItemGroup>
<PackageReference Include="Boogie.ExecutionEngine" Version="2.9.1" />
<ProjectReference Include="../../boogie/Source/ExecutionEngine/ExecutionEngine.csproj" />
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions source/ExplainError/ExplainError.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
<ProjectReference Include="..\Util\CorralUtil.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Boogie.ExecutionEngine" Version="2.9.5" />
</ItemGroup>

</Project>
12 changes: 4 additions & 8 deletions source/ExplainError/program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ private static bool CheckSanity(Implementation impl)
private static void CreateProver()
{
//create vcgen/proverInterface
vcgen = new VCGen(prog, CommandLineOptions.Clo.ProverLogFilePath, CommandLineOptions.Clo.ProverLogFileAppend, new List<Checker>());
vcgen = new VCGen(prog, new CheckerPool(CommandLineOptions.Clo));
proverInterface = ProverInterface.CreateProver(prog, CommandLineOptions.Clo.ProverLogFilePath, CommandLineOptions.Clo.ProverLogFileAppend, CommandLineOptions.Clo.TimeLimit);
translator = proverInterface.Context.BoogieExprTranslator;
exprGen = proverInterface.Context.ExprGen;
Expand Down Expand Up @@ -1352,8 +1352,8 @@ public static VC.ConditionGeneration.Outcome MyVerifyImplementation(Implementati
ref List<Counterexample> cexList)
{
//this creates a z3 process per vcgen
var checkers = new List<Checker>();
VC.VCGen vcgen = new VC.VCGen(prog, CommandLineOptions.Clo.ProverLogFilePath, CommandLineOptions.Clo.ProverLogFileAppend, checkers);
var checkers = new CheckerPool(CommandLineOptions.Clo);
VC.VCGen vcgen = new VC.VCGen(prog, checkers);
//make deep copy of the blocks
var tmpBlocks = new List<Block>();
foreach (Block b in i.Blocks)
Expand All @@ -1372,11 +1372,7 @@ public static VC.ConditionGeneration.Outcome MyVerifyImplementation(Implementati
var outcome = vcgen.VerifyImplementation((Implementation)i, out cexList);
var reset = new ResetVerificationState();
reset.Visit(i);
foreach (Checker checker in checkers)
{
//Contract.Assert(checker != null);
checker.Close();
}
checkers.Dispose();
vcgen.Close();
i.Blocks = tmpBlocks;
i.LocVars = tmpLocVars;
Expand Down
4 changes: 4 additions & 0 deletions source/FastAvn/FastAvn.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@
<ProjectReference Include="..\Corral\Corral.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Boogie.ExecutionEngine" Version="2.9.5" />
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions source/ProgTransformation/ProgTransformation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@
<ProjectReference Include="..\Util\CorralUtil.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Boogie.ExecutionEngine" Version="2.9.5" />
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions source/PropInst/PropInst.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
<ProjectReference Include="..\propinstutils\PropInstUtils.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Boogie.ExecutionEngine" Version="2.9.5" />
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions source/Util/CorralUtil.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
<AssemblyName>CorralUtil</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Update="Boogie.ExecutionEngine" Version="2.9.5" />
</ItemGroup>

</Project>
3 changes: 1 addition & 2 deletions source/Util/Duplicator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,7 @@ public override Variable VisitVariable(Variable node)
public override Function VisitFunction(Function node)
{
node = (Function)node.Clone();
node.Attributes = CopyAttr(node.Attributes);
node.doingExpansion = false;
node.Attributes = CopyAttr(node.Attributes);
return base.VisitFunction(node);
}

Expand Down
4 changes: 4 additions & 0 deletions source/propinstutils/PropInstUtils.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@
<ProjectReference Include="..\Util\CorralUtil.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Boogie.ExecutionEngine" Version="2.9.5" />
</ItemGroup>

</Project>
1 change: 0 additions & 1 deletion test/fwdbck/Files
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
12/simp12.bpl b
13/simp13.bpl b
14/simp14.bpl b
15/simp15.bpl c
16/simp16.bpl b
17/simp17.bpl c
18/simp18.bpl b
Expand Down
1 change: 0 additions & 1 deletion test/regression/Files
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
024\f.bpl b
loop\seq.bpl b
loop\conc.bpl b
loop\assert.bpl b
smack\a.bpl b
stackdepth\f1.bpl c
cex\twoasserts.bpl b
Expand Down