Skip to content

Commit

Permalink
Update some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
atomb committed Sep 5, 2023
1 parent 7a87d2d commit 5555600
Showing 1 changed file with 40 additions and 15 deletions.
55 changes: 40 additions & 15 deletions Source/Core/TrackedNodeComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,64 @@

namespace Microsoft.Boogie
{
// Represents an AST node, or component of a node, that is being
// tracked during the proof process to determine whether it was
// used as part of a completed proof.
/// <summary>
/// Represents an AST node, or component of a node, that is being
/// tracked during the proof process to determine whether it was
/// used as part of a completed proof.
/// </summary>
public abstract record TrackedNodeComponent()
{
/// <summary>
/// The string used to represent this component in the solver.
/// </summary>
public abstract string SolverLabel { get; }

/// <summary>
/// A human-readable description of this component in terms of
/// user-provided :id attributes.
/// </summary>
public abstract string Description { get; }

// This suffix indicates that an ID string represents the assumption of
// a specific ensures clause after a specific call.
/// <summary>
/// This suffix indicates that an ID string represents the assumption of
/// a specific ensures clause after a specific call.
/// </summary>
protected const string ensuresSuffix = "ensures";

// This suffix indicates that an ID string represents the goal of
// proving a specific requires clause before a specific call.
/// <summary>
/// This suffix indicates that an ID string represents the goal of
/// proving a specific requires clause before a specific call.
/// </summary>
protected const string requiresSuffix = "requires";

// This suffix indicates that an ID string represents the assumption
// of a specific requires clause after a specific call.
/// <summary>
/// This suffix indicates that an ID string represents the assumption
/// of a specific requires clause after a specific call.
/// </summary>
protected const string requiresAssumedSuffix = "requires_assumed";

// This suffix indicates that an ID string represents the goal of
// proving that a specific loop invariant is established.
/// <summary>
/// This suffix indicates that an ID string represents the goal of
/// proving that a specific loop invariant is established.
/// </summary>
protected const string establishedSuffix = "established";

// This suffix indicates that an ID string represents the goal of
// proving that a specific loop invariant is maintained.
/// <summary>
/// This suffix indicates that an ID string represents the goal of
/// proving that a specific loop invariant is maintained.
/// </summary>
protected const string maintainedSuffix = "maintained";

// This suffix indicates that an ID string represents the asssumption
// of a specific loop invariant in the body of the loop.
/// <summary>
/// This suffix indicates that an ID string represents the asssumption
/// of a specific loop invariant in the body of the loop.
/// </summary>
protected const string assumeInBodySuffix = "assume_in_body";

/// <summary>
/// Reverse the transformation of TrackedNodeComponent to string
/// done by the SolverLabel attribute.
/// </summary>
public static TrackedNodeComponent ParseSolverString(string idString)
{
var parts = idString.Split('$');
Expand Down

0 comments on commit 5555600

Please sign in to comment.