Skip to content

Commit

Permalink
Move C# runtime (#735)
Browse files Browse the repository at this point in the history
* Moved the CSharpRuntime for P into the CheckerCore

* Removed the code for CSharpRuntime

* Revert "Auxiliary commit to revert individual files from 78d9088"

This reverts commit 75b489f8212378e219e7f63849a2695a3a750d1d.
  • Loading branch information
ankushdesai authored May 23, 2024
1 parent db59bac commit 8fb54a7
Show file tree
Hide file tree
Showing 39 changed files with 48 additions and 96 deletions.
9 changes: 0 additions & 9 deletions P.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30011.22
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Runtime", "Runtime", "{D641DC13-F2F0-4365-963A-DCFC80BABCAA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{31FBBC4D-8756-4D60-B8D5-ED9E0FC8D4C1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests", "Tst\UnitTests\UnitTests.csproj", "{71691381-D3C9-478C-BA37-A94032A536DF}"
Expand All @@ -15,8 +13,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PCommandLine", "Src\PCompil
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompilerCore", "Src\PCompiler\CompilerCore\CompilerCore.csproj", "{41F39ADD-B75F-473F-AC41-D1A9CDA9A9CD}"
EndProject
Project("{9344BDBB-3E7F-41FC-A0DD-8665D75EE146}") = "CSharpRuntime", "Src\PRuntimes\PCSharpRuntime\CSharpRuntime.csproj", "{27E011B3-3995-454A-B200-57800CC941DA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PChecker", "PChecker", "{F7D2A6F5-841A-4E22-9ECD-2E1CF736F7EA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CheckerCore", "Src\PChecker\CheckerCore\CheckerCore.csproj", "{37778F65-BDBF-4AEA-BA34-01026A223083}"
Expand All @@ -41,10 +37,6 @@ Global
{41F39ADD-B75F-473F-AC41-D1A9CDA9A9CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41F39ADD-B75F-473F-AC41-D1A9CDA9A9CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{41F39ADD-B75F-473F-AC41-D1A9CDA9A9CD}.Release|Any CPU.Build.0 = Release|Any CPU
{27E011B3-3995-454A-B200-57800CC941DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{27E011B3-3995-454A-B200-57800CC941DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27E011B3-3995-454A-B200-57800CC941DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27E011B3-3995-454A-B200-57800CC941DA}.Release|Any CPU.Build.0 = Release|Any CPU
{37778F65-BDBF-4AEA-BA34-01026A223083}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{37778F65-BDBF-4AEA-BA34-01026A223083}.Debug|Any CPU.Build.0 = Debug|Any CPU
{37778F65-BDBF-4AEA-BA34-01026A223083}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -56,7 +48,6 @@ Global
GlobalSection(NestedProjects) = preSolution
{71691381-D3C9-478C-BA37-A94032A536DF} = {31FBBC4D-8756-4D60-B8D5-ED9E0FC8D4C1}
{41F39ADD-B75F-473F-AC41-D1A9CDA9A9CD} = {1B21372A-3030-4532-8B30-2A1A3E74527A}
{27E011B3-3995-454A-B200-57800CC941DA} = {D641DC13-F2F0-4365-963A-DCFC80BABCAA}
{37778F65-BDBF-4AEA-BA34-01026A223083} = {F7D2A6F5-841A-4E22-9ECD-2E1CF736F7EA}
{C1A8AF94-F550-4EC7-889A-9D0CCA259502} = {8BAB6184-8545-4E17-8199-86110AC5228F}
EndGlobalSection
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Runtime.Serialization;

namespace Plang.CSharpRuntime.Exceptions
namespace PChecker.PRuntime.Exceptions
{
public class PFrozenMutationException : Exception

Check warning on line 5 in Src/PChecker/CheckerCore/PRuntime/Exceptions/PFrozenMutationException.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-MacOS

Missing XML comment for publicly visible type or member 'PFrozenMutationException'

Check warning on line 5 in Src/PChecker/CheckerCore/PRuntime/Exceptions/PFrozenMutationException.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-Ubuntu

Missing XML comment for publicly visible type or member 'PFrozenMutationException'

Check warning on line 5 in Src/PChecker/CheckerCore/PRuntime/Exceptions/PFrozenMutationException.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-Windows

Missing XML comment for publicly visible type or member 'PFrozenMutationException'
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Runtime.Serialization;

namespace Plang.CSharpRuntime.Exceptions
namespace PChecker.PRuntime.Exceptions
{
public class PIllegalCoercionException : Exception

Check warning on line 5 in Src/PChecker/CheckerCore/PRuntime/Exceptions/PIllegalCoercionException.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-MacOS

Missing XML comment for publicly visible type or member 'PIllegalCoercionException'

Check warning on line 5 in Src/PChecker/CheckerCore/PRuntime/Exceptions/PIllegalCoercionException.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-Ubuntu

Missing XML comment for publicly visible type or member 'PIllegalCoercionException'

Check warning on line 5 in Src/PChecker/CheckerCore/PRuntime/Exceptions/PIllegalCoercionException.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-Windows

Missing XML comment for publicly visible type or member 'PIllegalCoercionException'
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Runtime.Serialization;

namespace Plang.CSharpRuntime.Exceptions
namespace PChecker.PRuntime.Exceptions
{
public class PInternalException : Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Runtime.Serialization;

namespace Plang.CSharpRuntime.Exceptions
namespace PChecker.PRuntime.Exceptions
{
public enum NonStandardReturn
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Runtime.Serialization;

namespace Plang.CSharpRuntime.Exceptions
namespace PChecker.PRuntime.Exceptions
{
public class PUnreachableCodeException : Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Runtime.Serialization;

namespace Plang.CSharpRuntime.Exceptions
namespace PChecker.PRuntime.Exceptions
{
public class PrtInhabitsTypeException : Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;

namespace Plang.CSharpRuntime.Exceptions
namespace PChecker.PRuntime.Exceptions
{
public class UnknownNamedTupleFieldAccess : Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using PChecker.Actors;
using PChecker.Actors.Events;

namespace Plang.CSharpRuntime
namespace PChecker.PRuntime
{
public class _GodMachine : StateMachine
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;
using PChecker.Actors.Events;
using Plang.CSharpRuntime.Values;
using PChecker.PRuntime.Values;

namespace Plang.CSharpRuntime
namespace PChecker.PRuntime
{
public class PEvent : Event, IPrtValue
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Collections.Generic;
using System.Linq;
using Plang.CSharpRuntime.Exceptions;
using Plang.CSharpRuntime.Values;
using PChecker.PRuntime.Exceptions;
using PChecker.PRuntime.Values;

namespace Plang.CSharpRuntime
namespace PChecker.PRuntime
{
public class PInterfaces
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
using PChecker.Actors;
using PChecker.Actors.Events;
using PChecker.Actors.Logging;
using Plang.CSharpRuntime.Exceptions;
using PChecker.PRuntime.Exceptions;

namespace Plang.CSharpRuntime
namespace PChecker.PRuntime
{
/// <summary>
/// This class implements IActorRuntimeLog and generates log output in an XML format.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
using PChecker.Actors;
using PChecker.Actors.Events;
using PChecker.Actors.Logging;
using Plang.CSharpRuntime.Exceptions;
using PChecker.PRuntime.Exceptions;

namespace Plang.CSharpRuntime
namespace PChecker.PRuntime
{
/// <summary>
/// Formatter for the runtime log.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
using PChecker.Actors.Events;
using PChecker.Actors.Exceptions;
using PChecker.Actors.Logging;
using Plang.CSharpRuntime.Exceptions;
using Plang.CSharpRuntime.Values;
using PChecker.PRuntime.Exceptions;
using PChecker.PRuntime.Values;

namespace Plang.CSharpRuntime
namespace PChecker.PRuntime
{
public class PMachine : StateMachine
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using PChecker.Actors;

namespace Plang.CSharpRuntime
namespace PChecker.PRuntime
{
public class PModule
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using PChecker.Actors.Logging;
using PChecker.Specifications.Monitors;

namespace Plang.CSharpRuntime
namespace PChecker.PRuntime
{
public class PMonitor : Monitor
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Diagnostics;
using System.Linq;

namespace Plang.CSharpRuntime
namespace PChecker.PRuntime
{
public abstract class PrtType
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Plang.CSharpRuntime.Values;
using PChecker.PRuntime.Values;

namespace Plang.CSharpRuntime
namespace PChecker.PRuntime
{
public static class PrtValues
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;

namespace Plang.CSharpRuntime.Values
namespace PChecker.PRuntime.Values
{
public class HashHelper
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Plang.CSharpRuntime.Values
namespace PChecker.PRuntime.Values
{
public interface IPrtMutableValue : IPrtValue
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Plang.CSharpRuntime.Values
namespace PChecker.PRuntime.Values
{
public interface IPrtValue : IEquatable<IPrtValue>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Plang.CSharpRuntime.Values
namespace PChecker.PRuntime.Values
{
public static class MutabilityHelper
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Linq;
using PChecker.Actors;

namespace Plang.CSharpRuntime.Values
namespace PChecker.PRuntime.Values
{
public class I_Main : PMachineValue
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Runtime.CompilerServices;

namespace Plang.CSharpRuntime.Values
namespace PChecker.PRuntime.Values
{
[Serializable]
public readonly struct PrtBool : IPrtValue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;

namespace Plang.CSharpRuntime.Values
namespace PChecker.PRuntime.Values
{
public class PrtEnum
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Runtime.CompilerServices;

namespace Plang.CSharpRuntime.Values
namespace PChecker.PRuntime.Values
{
[Serializable]
public readonly struct PrtFloat : IPrtValue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Runtime.CompilerServices;

namespace Plang.CSharpRuntime.Values
namespace PChecker.PRuntime.Values
{
[Serializable]
public readonly struct PrtInt : IPrtValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Plang.CSharpRuntime.Exceptions;
using PChecker.PRuntime.Exceptions;

namespace Plang.CSharpRuntime.Values
namespace PChecker.PRuntime.Values
{
public sealed class PrtMap : IPrtMutableValue, IDictionary<IPrtValue, IPrtValue>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Plang.CSharpRuntime.Exceptions;
using PChecker.PRuntime.Exceptions;

namespace Plang.CSharpRuntime.Values
namespace PChecker.PRuntime.Values
{
public sealed class PrtSeq : IPrtMutableValue, IReadOnlyList<IPrtValue>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Plang.CSharpRuntime.Exceptions;
using PChecker.PRuntime.Exceptions;

namespace Plang.CSharpRuntime.Values
namespace PChecker.PRuntime.Values
{
public sealed class PrtSet : IPrtMutableValue, IReadOnlyList<IPrtValue>, ICollection<IPrtValue>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Runtime.CompilerServices;

namespace Plang.CSharpRuntime.Values
namespace PChecker.PRuntime.Values
{
[Serializable]
public readonly struct PrtString : IPrtValue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Plang.CSharpRuntime.Exceptions;
using PChecker.PRuntime.Exceptions;

namespace Plang.CSharpRuntime.Values
namespace PChecker.PRuntime.Values
{
[Serializable]
public class PrtTuple : IPrtValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ private void WriteSourcePrologue(CompilationContext context, StringWriter output
context.WriteLine(output, "using System.Collections.Generic;");
context.WriteLine(output, "using System.Linq;");
context.WriteLine(output, "using System.IO;");
context.WriteLine(output, "using Plang.CSharpRuntime;");
context.WriteLine(output, "using Plang.CSharpRuntime.Values;");
context.WriteLine(output, "using Plang.CSharpRuntime.Exceptions;");
context.WriteLine(output, "using PChecker.PRuntime.Values;");
context.WriteLine(output, "using PChecker.PRuntime;");
context.WriteLine(output, "using PChecker.PRuntime.Exceptions;");
context.WriteLine(output, "using System.Threading;");
context.WriteLine(output, "using System.Threading.Tasks;");
context.WriteLine(output);
Expand Down
3 changes: 0 additions & 3 deletions Src/PCompiler/CompilerCore/Backend/CSharp/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ internal class Constants
</PropertyGroup>
-foreign-include-
<ItemGroup>
<Reference Include=""PCSharpRuntime"">
<HintPath>-assembly-path-/PCSharpRuntime.dll</HintPath>
</Reference>
<Reference Include=""PCheckerCore"">
<HintPath>-assembly-path-/PCheckerCore.dll</HintPath>
</Reference>
Expand Down
1 change: 0 additions & 1 deletion Src/PCompiler/PCommandLine/PCommandLine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\PChecker\CheckerCore\CheckerCore.csproj" />
<ProjectReference Include="..\..\PRuntimes\PCSharpRuntime\CSharpRuntime.csproj" />
<ProjectReference Include="..\CompilerCore\CompilerCore.csproj" />
<None Include="../../../Icon/icon.png" Pack="true" PackagePath="" />
<None Include="../../../README.md" Pack="true" PackagePath="" />
Expand Down
27 changes: 0 additions & 27 deletions Src/PRuntimes/PCSharpRuntime/CSharpRuntime.csproj

This file was deleted.

Loading

0 comments on commit 8fb54a7

Please sign in to comment.