Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

P# 1.6.0

Compare
Choose a tag to compare
@pdeligia pdeligia released this 02 May 17:03
· 31 commits to master since this release
a8456b6

This release contains the 1.6.0 version of the P# framework.

This is a major release containing new features and performance optimizations, as well as some minor API changes (to give us extra flexibility towards designing the below, but also planned upcoming features).

  • Support for MachineTestKit, a new built-in unit-testing API that allows to test machines (and methods of machines) in isolation. You can learn more about this here. Done in #427.
  • Improved memory consumption (and reduced GCs) in production and testing by optimizing internal string (and some other types) allocations. In our microbenchmarks, the peak working set of some scenarios is cut by half (not taking into account user code of course). Done in #425.
  • Improved messaging latency and throughput, by redesigning and optimizing the internal Machine inbox and its various operations. We are now implementing it internally using an IEventQueue interface that allows us to inject different queues for different scenarios. Done in #426.
  • Support for running an async Task test (that uses the Test attribute) with PSharpTester. Done in #430.

Changes:

  • The runtime type (returned by PSharpRuntime.Create(…) is now an interface of type IMachineRuntime. This allows us to modify the internal implementation without affecting the user by giving this interface.
  • Event has now an optional constructor that takes the Guid operationGroupId (this was used to be passed via the SendOptions optional parameter of the Machine.Send method).
  • Default event cannot be manually instantiated anymore, use Default.Event to get a static instance. This improved memory consumption in machines that use the Default event.
  • The ILogger interface exposes a few new overloads of Write and WriteLine for reducing boxing and array creations (similar to the string.Format overloads).
  • The OnWait method of the ILogger interface has changed from OnWait(MachineId machineId, string currStateName, string eventNames) to OnWait(MachineId machineId, string currStateName, Type eventType) and OnWait(MachineId machineId, string currStateName, params Type[] eventTypes).
  • Setting verbosity in the PSharp.Configuration has changed to a boolean IsVerbose property. Similarly, from command line (e.g. using PSharpTester) you have to pass /v instead of /v:N.
  • Removed deprecated timer API, which was replaced by a redesigned timer API in 1.5.0.