Skip to content

Commit

Permalink
Fixing warnings and errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Christine Zhou committed Oct 10, 2024
1 parent a650d57 commit 79d58da
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 257 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected PCheckerLogJsonFormatter()
}

/// <summary>
/// Removes the '<' and '>' tags for a log text.
/// Removes the "&lt;" and "&gt;" tags for a log text.
/// </summary>
/// <param name="log">The text log</param>
/// <returns>New string with the tag removed or just the string itself if there is no tag.</returns>
Expand Down
14 changes: 7 additions & 7 deletions Src/PChecker/CheckerCore/SystematicTesting/ControlledRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private static ControlledRuntime CreateWithConfiguration(CheckerConfiguration ch
/// <summary>
/// The currently executing runtime.
/// </summary>
internal static new ControlledRuntime Current => AsyncLocalInstance.Value ??
internal static ControlledRuntime Current => AsyncLocalInstance.Value ??
throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture,
"Uncontrolled task '{0}' invoked a runtime method. Please make sure to avoid using concurrency APIs " +
"(e.g. 'Task.Run', 'Task.Delay' or 'Task.Yield' from the 'System.Threading.Tasks' namespace) inside " +
Expand All @@ -71,12 +71,12 @@ private static ControlledRuntime CreateWithConfiguration(CheckerConfiguration ch
/// <summary>
/// The checkerConfiguration used by the runtime.
/// </summary>
protected internal readonly CheckerConfiguration CheckerConfiguration;
internal readonly CheckerConfiguration CheckerConfiguration;

/// <summary>
/// List of monitors in the program.
/// </summary>
protected readonly List<Monitor> Monitors;
readonly List<Monitor> Monitors;

/// <summary>
/// Monotonically increasing operation id counter.
Expand All @@ -86,7 +86,7 @@ private static ControlledRuntime CreateWithConfiguration(CheckerConfiguration ch
/// <summary>
/// Records if the runtime is running.
/// </summary>
protected internal volatile bool IsRunning;
internal volatile bool IsRunning;

/// <summary>
/// Callback that is fired when the program throws an exception which includes failed assertions.
Expand Down Expand Up @@ -137,7 +137,7 @@ private static ControlledRuntime CreateWithConfiguration(CheckerConfiguration ch
/// <summary>
/// Responsible for writing to all registered <see cref="IControlledRuntimeLog"/> objects.
/// </summary>
protected internal LogWriter LogWriter { get; private set; }
internal LogWriter LogWriter { get; private set; }

/// <summary>
/// Used to log text messages. Use <see cref="ControlledRuntime.SetLogger"/>
Expand Down Expand Up @@ -1421,7 +1421,7 @@ internal async Task WaitAsync()
/// <summary>
/// Raises the <see cref="OnFailure"/> event with the specified <see cref="Exception"/>.
/// </summary>
protected internal void RaiseOnFailureEvent(Exception exception)
internal void RaiseOnFailureEvent(Exception exception)
{
if (exception is ExecutionCanceledException ||
(exception is ActionExceptionFilterException ae && ae.InnerException is ExecutionCanceledException))
Expand All @@ -1437,7 +1437,7 @@ protected internal void RaiseOnFailureEvent(Exception exception)
/// Disposes runtime resources.
/// </summary>
[DebuggerStepThrough]
protected void Dispose(bool disposing)
void Dispose(bool disposing)
{
if (disposing)
{
Expand Down
13 changes: 6 additions & 7 deletions Src/PCompiler/CompilerCore/Backend/CSharp/CSharpCodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,19 @@ private void WriteInitializeInterfaces(CompilationContext context, StringWriter
private void WriteSourcePrologue(CompilationContext context, StringWriter output)
{
context.WriteLine(output, "using PChecker;");
context.WriteLine(output, "using PChecker.StateMachines;");
context.WriteLine(output, "using PChecker.StateMachines.Events;");
context.WriteLine(output, "using PChecker.Runtime;");
context.WriteLine(output, "using PChecker.Specifications;");
context.WriteLine(output, "using Monitor = PChecker.Specifications.Monitors.Monitor;");
context.WriteLine(output, "using PChecker.Runtime.StateMachines;");
context.WriteLine(output, "using PChecker.Runtime.Events;");
context.WriteLine(output, "using PChecker.Runtime.Exceptions;");
context.WriteLine(output, "using PChecker.Runtime.Values;");
context.WriteLine(output, "using PChecker.Runtime.Specifications;");
context.WriteLine(output, "using Monitor = PChecker.Runtime.Specifications.Monitor;");
context.WriteLine(output, "using System;");
context.WriteLine(output, "using PChecker.SystematicTesting;");
context.WriteLine(output, "using System.Runtime;");
context.WriteLine(output, "using System.Collections.Generic;");
context.WriteLine(output, "using System.Linq;");
context.WriteLine(output, "using System.IO;");
context.WriteLine(output, "using PChecker.Runtime.Values;");
context.WriteLine(output, "using PChecker.Runtime;");
context.WriteLine(output, "using PChecker.Runtime.Exceptions;");
context.WriteLine(output, "using System.Threading;");
context.WriteLine(output, "using System.Threading.Tasks;");
context.WriteLine(output);
Expand Down
2 changes: 1 addition & 1 deletion Src/PCompiler/CompilerCore/Backend/CSharp/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ internal class Constants
using System;
using System.IO;
using System.Linq;
using PChecker.StateMachines;
using PChecker.Runtime.StateMachines;
namespace PImplementation
{
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 79d58da

Please sign in to comment.