maul-esel / ssharp

S# is a formal modeling and safety analysis framework for safety-critical systems. It provides a domain specific modeling language and fully automated formal safety analysis tools based on C# and .NET.
http://safetysharp.isse.de/wiki
MIT License
0 stars 1 forks source link

Missing key in dictionary exception in SimulateProfileBased #33

Open maul-esel opened 6 years ago

maul-esel commented 6 years ago

Bug

SimulateProfileBased > FewAgentsHighRedundancy (Coalition) test fails with Key was not present in dictionary exception in SafetySharp.Odp.Reconfiguration.CoalitionFormation.Coalition.ReceiveInvitationResponse(CoalitionReconfigurationAgent invitedAgent) in ssharp\Source\Odp\Reconfiguration\CoalitionFormation\Coalition.cs:Line 194, in step 331.

Reproduce

Run SimulateProfileBased > FewAgentsHighRedundancy (Coalition) test with seed 270108453. Discovered on commit 3e034f9.

Cause

Apparently an uninvited agent accepts an invitation. May be caused by information loss during merge? Are invitations canceled properly?

maul-esel commented 6 years ago

Actually, an agent was invited twice, causing the inviting coalition to try and merge with itself. During this process, the invitation causing the merge (the 2nd invitation) was meant to be resolved, but had been resolved together with the first invitation already. Hence the exception.

Should be fixed by ca4f9685.

maul-esel commented 6 years ago

The following seeds still cause this exception: