Skip to content

Commit

Permalink
Added PSharp as a submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
akashlal committed Mar 24, 2017
1 parent e879699 commit 434dcac
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Expand Up @@ -5,3 +5,6 @@
[submodule "Ext/Formula"]
path = Ext/Formula
url = https://github.com/Microsoft/formula.git
[submodule "Ext/PSharp"]
path = Ext/PSharp
url = https://github.com/p-org/PSharp.git
11 changes: 10 additions & 1 deletion Bld/build.bat
Expand Up @@ -117,6 +117,15 @@ for %%i in (zc\bin\%Platform%\Release\zc.exe

cd ..\..

REM Build PSharp
cd ext\PSharp
..\..\Bld\nuget restore PSharp.sln
echo devenv PSharp.sln /Build %Configuration%
devenv PSharp.sln /Build %Configuration%
if ERRORLEVEL 1 goto :exit

cd ..\..

if "%NoClean%"=="true" goto :build
echo msbuild P.sln /p:Platform=%Platform% /p:Configuration=%Configuration% /t:Clean
msbuild P.sln /p:Platform=%Platform% /p:Configuration=%Configuration% /t:Clean
Expand Down Expand Up @@ -161,4 +170,4 @@ echo Elapsed: %TookTime:~0,-2%.%TookTimePadded:~-2% seconds
goto :EOF

:exit
popd
popd
1 change: 1 addition & 0 deletions Ext/PSharp
Submodule PSharp added at 52feea
10 changes: 6 additions & 4 deletions Src/PTester/PTester/PTester.csproj
Expand Up @@ -141,11 +141,13 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.PSharp">
<HintPath>..\..\..\..\PSharp\Binaries\Microsoft.PSharp.dll</HintPath>
<Reference Include="Microsoft.PSharp, Version=1.1.0.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Ext\PSharp\Binaries\Microsoft.PSharp.dll</HintPath>
</Reference>
<Reference Include="Microsoft.PSharp.TestingServices">
<HintPath>..\..\..\..\PSharp\Binaries\Microsoft.PSharp.TestingServices.dll</HintPath>
<Reference Include="Microsoft.PSharp.TestingServices, Version=1.1.0.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Ext\PSharp\Binaries\Microsoft.PSharp.TestingServices.dll</HintPath>
</Reference>
<Reference Include="System">
<Name>System</Name>
Expand Down
8 changes: 7 additions & 1 deletion Src/PTester/PTester/PTesterCommandLine.cs
Expand Up @@ -198,6 +198,12 @@ public static void Main(string[] args)
Environment.Exit((int)TestResult.InvalidParameters);
}

if (options.UsePSharp && options.isRefinement)
{
Console.WriteLine("Error: Refinement checking isn't yet supported with /psharp flag");
Environment.Exit((int)TestResult.InvalidParameters);
}

if (options.isRefinement)
{
var refinementCheck = new RefinementChecking(options);
Expand Down Expand Up @@ -294,7 +300,7 @@ public static void RunPSharpTester(StateImpl s)
configuration.MaxUnfairSchedulingSteps = 100;
configuration.MaxFairSchedulingSteps = configuration.MaxUnfairSchedulingSteps * 10;
configuration.LivenessTemperatureThreshold = configuration.MaxFairSchedulingSteps / 3;

var engine = Microsoft.PSharp.TestingServices.TestingEngineFactory.CreateBugFindingEngine(
configuration, PSharpWrapper.Execute);
engine.Run();
Expand Down

0 comments on commit 434dcac

Please sign in to comment.