Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed vector clock for ReceiveEvent, fixed naming consistency #637

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Src/PChecker/CheckerCore/Actors/Logging/JsonWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,10 @@ public void HandleLogEntry(LogEntry logEntry)
_unhandledSendRequests.Add(hashedSendReqId, CopyVcMap(_contextVcMap[machine]));
break;

// On dequeue event, has the string containing information about the current machine that dequeued (i.e. received the event),
// On dequeue OR receive event, has the string containing information about the current machine that dequeued (i.e. received the event),
// the event name, and payload. This is used to find the corresponding SendReqId from the machine that sent it in order to retrieve
// the vector clock of the sender machine during that time when it was sent.
case "ReceiveEvent":
case "DequeueEvent":
var correspondingSendReqId = GetSendReceiveId(machine, logDetails.Event, logDetails.Payload);
var hashedGeneralCorrespondingSendReqId = HashString(correspondingSendReqId);
Expand Down
5 changes: 3 additions & 2 deletions Src/PRuntimes/PCSharpRuntime/PJsonFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public override void OnCreateStateMachine(ActorId id, string creatorName, string
Writer.AddLogType(JsonWriter.LogType.CreateStateMachine);
Writer.LogDetails.Id = id.ToString();
Writer.LogDetails.CreatorName = creatorName;
Writer.LogDetails.CreatorType = creatorType;
Writer.LogDetails.CreatorType = GetShortName(creatorType);
Writer.AddLog(log);
Writer.AddToLogs(updateVcMap: true);
}
Expand Down Expand Up @@ -532,8 +532,9 @@ public override void OnMonitorProcessEvent(string monitorType, string stateName,
public override void OnMonitorRaiseEvent(string monitorType, string stateName, Event e)
{
stateName = GetShortName(stateName);
monitorType = GetShortName(monitorType);
string eventName = GetEventNameWithPayload(e);
var log = $"Monitor '{GetShortName(monitorType)}' raised event '{eventName}' in state '{stateName}'.";
var log = $"Monitor '{monitorType}' raised event '{eventName}' in state '{stateName}'.";

Writer.AddLogType(JsonWriter.LogType.MonitorRaiseEvent);
Writer.LogDetails.Monitor = monitorType;
Expand Down
Loading