Skip to content
This repository was archived by the owner on Aug 26, 2022. It is now read-only.

Commit c91cf79

Browse files
authored
Support for .NET Core and .NET Standard (and .NET Framework v4.5) (#312)
1 parent a671835 commit c91cf79

File tree

80 files changed

+851
-848
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+851
-848
lines changed

Build/common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<PropertyGroup>
55
<Product>Microsoft PSharp</Product>
66
<Company>Microsoft Corporation</Company>
7-
<Copyright>Copyright © 2017 Microsoft Corporation</Copyright>
7+
<Copyright>Copyright © 2018 Microsoft Corporation</Copyright>
88
<RepositoryUrl>https://github.com/p-org/PSharp</RepositoryUrl>
99
<RepositoryType>git</RepositoryType>
1010
</PropertyGroup>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project>
2+
<Import Project="common.props" />
3+
<Import Project="..\bin\net46\PSharp.vs2017.targets" />
4+
<PropertyGroup>
5+
<TargetFrameworks>net46</TargetFrameworks>
6+
</PropertyGroup>
7+
<PropertyGroup>
8+
<OutputType>Exe</OutputType>
9+
<OutputPath>..\..\bin\</OutputPath>
10+
</PropertyGroup>
11+
<ItemGroup>
12+
<ProjectReference Include="..\..\..\Source\Core\Core.csproj" />
13+
</ItemGroup>
14+
</Project>

Build/common.samples.props

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Project>
2+
<Import Project="common.props" />
3+
<PropertyGroup Condition="'$(OS)'=='Windows_NT'">
4+
<TargetFrameworks>netcoreapp2.1;net46</TargetFrameworks>
5+
</PropertyGroup>
6+
<PropertyGroup Condition="'$(OS)'=='UNIX'">
7+
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
8+
</PropertyGroup>
9+
<PropertyGroup>
10+
<OutputType>Exe</OutputType>
11+
<OutputPath>..\..\bin\</OutputPath>
12+
</PropertyGroup>
13+
<ItemGroup>
14+
<ProjectReference Include="..\..\..\Source\Core\Core.csproj" />
15+
</ItemGroup>
16+
</Project>

Docs/BuildInstructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Building P# from source
22
=======================
33

44
# Prerequisites
5-
Install [Visual Studio 2017](https://www.visualstudio.com/downloads/) and [.NET Core](https://www.microsoft.com/net/core) (available as an optional component during the VS 2017 installation, or can independently install the SDK from [here](https://www.microsoft.com/net/core)).
5+
Install [Visual Studio 2017](https://www.visualstudio.com/downloads/) and [.NET Core](https://www.microsoft.com/net/core) (available as an optional component during the VS 2017 installation, or can independently install the SDK from [here](https://www.microsoft.com/net/core)). Also install all the SDK versions of the .NET Framework that P# currently supports (4.5 and 4.6) from [here](https://www.microsoft.com/net/download/archives).
66

77
Optional: Get the [Visual Studio 2017 SDK](https://www.microsoft.com/en-us/download/details.aspx?id=46850) to be able to compile the P# visual studio extension (syntax highlighting). Only for the high-level P# language.
88

PSharp.sln

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Compilation", "Compilation"
2121
EndProject
2222
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Testing", "Testing", "{DF864130-1926-4B4E-92AF-B5D5C3AB152D}"
2323
EndProject
24-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Visualization", "Visualization", "{7F2B5F90-3922-43FD-A0F0-81D7C7DB92C0}"
25-
EndProject
2624
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataFlowAnalysis", "Source\AddOns\DataFlowAnalysis\DataFlowAnalysis.csproj", "{E7E05651-1177-46C6-9878-C509C6887595}"
2725
EndProject
2826
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core", "Source\Core\Core.csproj", "{E75DB9C9-7842-4AE4-A29D-624F6B49F607}"
@@ -33,8 +31,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StaticAnalysis", "Source\St
3331
EndProject
3432
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestingServices", "Source\TestingServices\TestingServices.csproj", "{C28B3E1F-A955-49A1-8CAE-2B0374F9444A}"
3533
EndProject
36-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TraceViewer", "Tools\Visualization\TraceViewer\TraceViewer.csproj", "{17DD1184-C1F7-41B6-8DFD-F159CE7D78CC}"
37-
EndProject
3834
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoverageReportMerger", "Tools\Testing\CoverageReportMerger\CoverageReportMerger.csproj", "{AB7728CE-164F-4D09-82DB-3CE6389D897C}"
3935
EndProject
4036
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Replayer", "Tools\Testing\Replayer\Replayer.csproj", "{82BA322D-C3E2-493E-8BEE-BB48414C34DF}"
@@ -47,7 +43,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SyntaxRewriter", "Tools\Com
4743
EndProject
4844
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SyntaxRewriterProcess", "Tools\Compilation\SyntaxRewriterProcess\SyntaxRewriterProcess.csproj", "{942CBB98-CA0F-437F-B9C8-AB744DE03938}"
4945
EndProject
50-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core.Tests.Performance", "Tests\Core.Tests.Performance\Core.Tests.Performance.csproj", "{3F8C726A-6466-4421-94E3-F106B7C8E113}"
46+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.PSharp.Core.Tests.Performance", "Tests\Core.Tests.Performance\Microsoft.PSharp.Core.Tests.Performance.csproj", "{3F8C726A-6466-4421-94E3-F106B7C8E113}"
5147
EndProject
5248
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core.Tests.Unit", "Tests\Core.Tests.Unit\Core.Tests.Unit.csproj", "{911F1779-3558-4590-836C-C75112D65FD8}"
5349
EndProject
@@ -93,10 +89,6 @@ Global
9389
{C28B3E1F-A955-49A1-8CAE-2B0374F9444A}.Debug|Any CPU.Build.0 = Debug|Any CPU
9490
{C28B3E1F-A955-49A1-8CAE-2B0374F9444A}.Release|Any CPU.ActiveCfg = Release|Any CPU
9591
{C28B3E1F-A955-49A1-8CAE-2B0374F9444A}.Release|Any CPU.Build.0 = Release|Any CPU
96-
{17DD1184-C1F7-41B6-8DFD-F159CE7D78CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
97-
{17DD1184-C1F7-41B6-8DFD-F159CE7D78CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
98-
{17DD1184-C1F7-41B6-8DFD-F159CE7D78CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
99-
{17DD1184-C1F7-41B6-8DFD-F159CE7D78CC}.Release|Any CPU.Build.0 = Release|Any CPU
10092
{AB7728CE-164F-4D09-82DB-3CE6389D897C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
10193
{AB7728CE-164F-4D09-82DB-3CE6389D897C}.Debug|Any CPU.Build.0 = Debug|Any CPU
10294
{AB7728CE-164F-4D09-82DB-3CE6389D897C}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -165,13 +157,11 @@ Global
165157
{65338B9B-4990-4C3A-9BB1-2B9E30115157} = {83369B7E-5C21-4D49-A14C-E8A6A4892807}
166158
{DE643885-060D-4CF0-A5F2-5065AD97E22C} = {9BC0914F-3068-4148-B778-4CA27D828D39}
167159
{DF864130-1926-4B4E-92AF-B5D5C3AB152D} = {9BC0914F-3068-4148-B778-4CA27D828D39}
168-
{7F2B5F90-3922-43FD-A0F0-81D7C7DB92C0} = {9BC0914F-3068-4148-B778-4CA27D828D39}
169160
{E7E05651-1177-46C6-9878-C509C6887595} = {65338B9B-4990-4C3A-9BB1-2B9E30115157}
170161
{E75DB9C9-7842-4AE4-A29D-624F6B49F607} = {83369B7E-5C21-4D49-A14C-E8A6A4892807}
171162
{ADC2EC6E-E62E-4F23-A284-E586D6C6F317} = {83369B7E-5C21-4D49-A14C-E8A6A4892807}
172163
{6C2F2903-AE81-46C4-AA98-4E847CD4211C} = {83369B7E-5C21-4D49-A14C-E8A6A4892807}
173164
{C28B3E1F-A955-49A1-8CAE-2B0374F9444A} = {83369B7E-5C21-4D49-A14C-E8A6A4892807}
174-
{17DD1184-C1F7-41B6-8DFD-F159CE7D78CC} = {7F2B5F90-3922-43FD-A0F0-81D7C7DB92C0}
175165
{AB7728CE-164F-4D09-82DB-3CE6389D897C} = {DF864130-1926-4B4E-92AF-B5D5C3AB152D}
176166
{82BA322D-C3E2-493E-8BEE-BB48414C34DF} = {DF864130-1926-4B4E-92AF-B5D5C3AB152D}
177167
{E6C9AF6D-091C-4DAF-BCB6-BFFB0CF12843} = {DF864130-1926-4B4E-92AF-B5D5C3AB152D}
@@ -188,4 +178,7 @@ Global
188178
{4240DE34-A775-4B3E-A67A-37E50AC9850B} = {2012300C-6E5D-47A0-9D57-B3F0A73AA1D4}
189179
{2A3D4399-787C-4F97-8591-6A8021775AE0} = {83369B7E-5C21-4D49-A14C-E8A6A4892807}
190180
EndGlobalSection
181+
GlobalSection(ExtensibilityGlobals) = postSolution
182+
SolutionGuid = {B9407046-CB24-4B07-8031-2749696EC7D8}
183+
EndGlobalSection
191184
EndGlobal

Samples/BoundedAsync/BoundedAsync.PSharpLanguage/BoundedAsync.PSharpLanguage.csproj

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="..\..\..\Build\common.props" />
3-
<Import Project="..\..\..\bin\net46\PSharp.vs2017.targets" />
2+
<Import Project="..\..\..\Build\common.samples.language.props" />
43
<PropertyGroup>
5-
<AssemblyName>BoundedAsync.PSharpLanguage</AssemblyName>
64
<Description>The BoundedAsync P# sample.</Description>
7-
<AssemblyTitle>BoundedAsync.PSharpLanguage</AssemblyTitle>
8-
<TargetFrameworks>net46</TargetFrameworks>
9-
<OutputType>Exe</OutputType>
10-
</PropertyGroup>
11-
<PropertyGroup>
12-
<OutputPath>..\..\bin\</OutputPath>
5+
<AssemblyName>BoundedAsync.PSharpLanguage</AssemblyName>
6+
<RootNamespace>BoundedAsync.PSharpLanguage</RootNamespace>
137
</PropertyGroup>
14-
<ItemGroup>
15-
<ProjectReference Include="..\..\..\Source\Core\Core.csproj" />
16-
</ItemGroup>
178
<ItemGroup>
189
<PSharp Include="Process.psharp" />
1910
<PSharp Include="Scheduler.psharp" />
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="..\..\..\Build\common.props" />
2+
<Import Project="..\..\..\Build\common.samples.props" />
33
<PropertyGroup>
4-
<AssemblyName>BoundedAsync.PSharpLibrary</AssemblyName>
54
<Description>The BoundedAsync P# sample.</Description>
6-
<AssemblyTitle>BoundedAsync.PSharpLibrary</AssemblyTitle>
7-
<TargetFrameworks>net46</TargetFrameworks>
8-
<OutputType>Exe</OutputType>
9-
</PropertyGroup>
10-
<PropertyGroup>
11-
<OutputPath>..\..\bin\</OutputPath>
5+
<AssemblyName>BoundedAsync.PSharpLibrary</AssemblyName>
6+
<RootNamespace>BoundedAsync.PSharpLibrary</RootNamespace>
127
</PropertyGroup>
13-
<ItemGroup>
14-
<ProjectReference Include="..\..\..\Source\Core\Core.csproj" />
15-
</ItemGroup>
168
</Project>

Samples/CacheCoherence/CacheCoherence.PSharpLanguage/CacheCoherence.PSharpLanguage.csproj

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="..\..\..\Build\common.props" />
3-
<Import Project="..\..\..\bin\net46\PSharp.vs2017.targets" />
2+
<Import Project="..\..\..\Build\common.samples.language.props" />
43
<PropertyGroup>
5-
<AssemblyName>CacheCoherence.PSharpLanguage</AssemblyName>
64
<Description>The CacheCoherence P# sample.</Description>
7-
<AssemblyTitle>CacheCoherence.PSharpLanguage</AssemblyTitle>
8-
<TargetFrameworks>net46</TargetFrameworks>
9-
<OutputType>Exe</OutputType>
10-
</PropertyGroup>
11-
<PropertyGroup>
12-
<OutputPath>..\..\bin\</OutputPath>
5+
<AssemblyName>CacheCoherence.PSharpLanguage</AssemblyName>
6+
<RootNamespace>CacheCoherence.PSharpLanguage</RootNamespace>
137
</PropertyGroup>
14-
<ItemGroup>
15-
<ProjectReference Include="..\..\..\Source\Core\Core.csproj" />
16-
</ItemGroup>
178
<ItemGroup>
189
<PSharp Include="Client.psharp" />
1910
<PSharp Include="CPU.psharp" />
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="..\..\..\Build\common.props" />
2+
<Import Project="..\..\..\Build\common.samples.props" />
33
<PropertyGroup>
4-
<AssemblyName>CacheCoherence.PSharpLibrary</AssemblyName>
54
<Description>The CacheCoherence P# sample.</Description>
6-
<AssemblyTitle>CacheCoherence.PSharpLibrary</AssemblyTitle>
7-
<TargetFrameworks>net46</TargetFrameworks>
8-
<OutputType>Exe</OutputType>
9-
</PropertyGroup>
10-
<PropertyGroup>
11-
<OutputPath>..\..\bin\</OutputPath>
5+
<AssemblyName>CacheCoherence.PSharpLibrary</AssemblyName>
6+
<RootNamespace>CacheCoherence.PSharpLibrary</RootNamespace>
127
</PropertyGroup>
13-
<ItemGroup>
14-
<ProjectReference Include="..\..\..\Source\Core\Core.csproj" />
15-
</ItemGroup>
168
</Project>
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="..\..\..\Build\common.props" />
2+
<Import Project="..\..\..\Build\common.samples.props" />
33
<PropertyGroup>
4-
<AssemblyName>ChainReplication.PSharpLibrary</AssemblyName>
54
<Description>The ChainReplication P# sample.</Description>
6-
<AssemblyTitle>ChainReplication.PSharpLibrary</AssemblyTitle>
7-
<TargetFrameworks>net46</TargetFrameworks>
8-
<OutputType>Exe</OutputType>
9-
</PropertyGroup>
10-
<PropertyGroup>
11-
<OutputPath>..\..\bin\</OutputPath>
5+
<AssemblyName>ChainReplication.PSharpLibrary</AssemblyName>
6+
<RootNamespace>ChainReplication.PSharpLibrary</RootNamespace>
127
</PropertyGroup>
13-
<ItemGroup>
14-
<ProjectReference Include="..\..\..\Source\Core\Core.csproj" />
15-
</ItemGroup>
168
</Project>

0 commit comments

Comments
 (0)