History.md
July 16, 2024 ยท View on GitHub
vNext
- Upgraded the
System.Text.Jsonpackage tov8.0.4for thenetstandard2.0target framework, due to a vulnerability. - Dropped support for the
netcoreapp3.1target framework, which reached end of life.
v1.7.11
- Added support for the
net8.0target framework. - Added support to optionally explore a race condition when using the
AutoResetEvent.Resetmethod.
v1.7.10
- Fixed an issue with
Actornot halting as expected in certain scenarios after explicitly raising aHaltEventevent.
v1.7.9
- Added the
Microsoft.Coyote.Rewriting.SkipRewritingattribute that allows skipping the rewriting of a user-specified type. - The
coyotecommand line tool can now invoke non-static xUnit tests that have no parameters and their declaring type has a constructor without parameters or only has theXunit.Abstractions.ITestOutputHelperas parameter. - Fixed a bug with not reporting correctly actor coverage.
v1.7.8
- Added rewriting support for fine-grained race-checking at memory-access and
control-flow branching locations. Race-checking at memory-access locations can
be enabled during testing by setting the
Configuration.WithMemoryAccessRaceCheckingEnabledoption, whereas race-checking at control-flow branching locations can be enabled during testing by setting theConfiguration.WithControlFlowRaceCheckingEnabledoption. Rewriting is enabled by default to support both features, which adds extra instructions in the rewritten DLLs, but this can be disabled by setting theIsRewritingMemoryLocationsrewriting option tofalse.
v1.7.7
- Added rewriting support for
System.Threading.SpinWaitmethods.
v1.7.6
- Exposed the
ConsoleLoggeras public so that users can conveniently use it to write runtime logs to the console. - Implemented more fake methods in the
ActorTestKitclass. - Added a method for setting a custom logger when using the
ActorTestKitclass. - Added rewriting support for
System.Threading.Volatilemethods. - Fixed a bug where merging coverage info could result in a rare race condition.
v1.7.5
- Added support for controlling user-created
Threadinstances during testing. - Added support for controlling
WaitHandleand related APIs during testing. - Added the
ActorTestKitclass for unit-testing actors and state machines in isolation. - Disabled the automated fallback to randomized fuzzing during testing, if systematic testing fails.
- Fixed a bug in bug trace reporting.
v1.7.4
- Added support for visualizing traces from testing task-based programs in DGML format.
- Implemented various runtime optimizations for more efficient coverage during testing.
- Optimized the modeling of various lock APIs during testing.
- Fixed a rewriting bug occurring when methods return task arrays.
v1.7.3
- Added support for the
net7.0target framework.
v1.7.2
- Added support for fully controlling the
SemaphoreSlimtype during testing. - Added support for detecting the
System.GuidandSystem.DateTimeAPIs as sources of uncontrolled data non-determinism during testing. - Added the
Configuration.WithPartiallyControlledDataNondeterminismAllowedAPI (and--partial-control <MODE>CLI option) for configuring how uncontrolled data non-determinism should be handled during testing. - Added the
Configuration.WithScheduleCoverageReportedAPI (and--schedule-coverageCLI option) for dumping coverage statistics and stack traces for scheduling decisions. - Added the
Specification.RegisterStateHashingFunctionAPI for registering custom program state hashing functions, which can be used to compute an approximation of the program state during testing, as well as reporting it in the test statistics. - Improved replay traces by registering the scheduling point type alongside each scheduling decision.
- Fixed missing
net462dependency in theMicrosoft.Coyote.ToolNuGet package.
v1.7.1
- Added support for operation grouping for
Taskcontinuations. - Added support for the delay-bounding exploration strategy.
- Added support for rewriting the
Thread.YieldandInterlockedAPIs. - Updated the runtime to not fail with a potential deadlock when the debugger is attached, and instead add a breakpoint, to avoid spurious failures when debugging.
- Hardened the
SchedulingPoint.SuppressandSchedulingPoint.Resumemethods so that they do not resume scheduling earlier than expected when they are used in a nested manner. - Fixed a runtime memory leak when test iterations terminated early.
- Fixed a rare stack-overflow exception when popping states during a
StateMachineexecution. - Fixed a few cases of internally spawned tasks considered to be uncontrolled by the runtime.
v1.7.0
- Updated the default
randomexploration strategy with aportfoliotesting mode that uses a tuned set of different exploration strategies to increase coverage for different bug patterns. The portfolio will be transparently enhanced over time as new exploration strategies become available inside Coyote. The Portfolio can be set to fair or unfair usingConfiguration.WithPortfolioModeor the--portfolio-modecommand-line option. The portfolio mode can be disabled and explicitly set to one of the available exploration strategies by setting a strategy-related option such asConfiguration.WithRandomStrategyor-s <STRATEGY>. - Refactored the NuGet packages, by moving
Microsoft.Coyote.Actorsto its own dedicated package, introducing a newMicrosoft.Coyote.Toolpackage that contains the self-containedcoyotecommand-line tool (for users that do not want to managecoyotevia theMicrosoft.Coyote.CLI.NET tool), introducing a newMicrosoft.Coyote.Corepackage that only contains the core runtime library of Coyote, and converting theMicrosoft.CoyoteNuGet package into a meta-package that pulls all non-tool packages. - Moved the actor
Eventtype under theMicrosoft.Coyote.Actorsnamespace. - Introduced a
Monitor.Eventtype (nested in theMicrosoft.Coyote.Specifications.Monitorclass), which must now be used for declaring specification monitor events, instead of the originalEventtype above. - Enhanced and streamlined the logging API and built-in loggers, which are now
available in the
Microsoft.Coyote.Loggingnamespace, instead ofMicrosoft.Coyote.IO. - Removed support for the end-of-life
net5.0target framework.
v1.6.2
- Exposed new
IActorRuntime.GetCurrentActorIds()API that returns theActorIdfor each active actor managed by the runtime, as well as anIActorRuntime.GetCurrentActorTypes()API that returns theTypeof each active actor managed by the runtime. These APIs are not thread-safe and should only be used for gathering statistics and debugging purposes.
v1.6.1
- Exposed new
IActorRuntime.GetActorExecutionStatus(id)API that enables querying the actor runtime for the current execution status of the actor with the specified id, as well as anIActorRuntime.GetCurrentActorCount()API that returns the number of active actors managed by the runtime. These APIs are not thread-safe and should only be used for gathering statistics and debugging purposes. - Exposed new
IActorRuntime.OnActorHaltedcallback which is triggered when an actor has halted and the runtime has stopped managing it.
v1.6.0
- Exposed new
OperationAPI that enables instrumenting, controlling and scheduling custom concurrent operations. - Exposed new
SchedulingPoint.SetCheckpointAPI that allows to capture all non-deterministic decisions in the currently explored execution path and try replay them in subsequent test iterations to optimize coverage of a subset of the state space. - Added support for intercepting and controlling asynchronous locks.
- Added support for rewriting the
SemaphoreSlimtype. - The
Configuration.WithReplayStrategymethod was renamed toConfiguration.WithReproducibleTraceto make it more explicit that setting this option allows reproducing the specified trace. - Various runtime improvements and bug fixes.
v1.5.9
- Improved the runtime to try enforce atomicity when invoking a specification
Monitor.
v1.5.8
- Fixed a bug in
coyote rewriterelated to rewriting nested types.
v1.5.7
- Fixed a bug where a thrown exception was not propagating properly when
invoking
Task.WaitAllduring systematic testing. - Fixed a bug in
coyote rewriterelated to return types with nested generics.
v1.5.6
- Fixed a bug in
coyote rewritewhen checking uncontrolled tasks from methods with a nested generic return type.
v1.5.5
- Added support in
coyote rewritefor rewriting types with a required modifier (modreq).
v1.5.4
- Significantly improved runtime performance during partially-controlled concurrency testing.
v1.5.3
- Improved the assembly loading logic when using the
coyotetool. - Fixed rare deadlock in test execution paths that exhibit partially-controlled concurrency.
- Various other runtime improvements.
v1.5.2
- Introduced new command-line interface for the
coyotetool that builds on top of theSystem.CommandLinelibrary. This brings an improved and more robust user experience (e.g. better CLI error messages), as well as other enhancements such as CLI option grouping. - The
--coverage codeCLI option is not supported anymore as it was only supported on Windows and has been superseded by the official .NET cross-platform code coverage infrastructure. See here and here. The--coverage(or-c) CLI option is now used to enable activity coverage (replacing--coverage activity), as discussed here. - The
--parallel NCLI option is not supported anymore to bring thecoyotetool experience in line with the programmatic way of running Coyote tests (via theTestingEngineAPI), which did not support built-in parallel testing. If needed, running parallel tests can still be achieved by invoking multiple Coyote testing processes in parallel (e.g. via a script).
v1.5.1
- Simplified the
coyotetool ASP.NET dependency. - Partially controlled concurrency is now allowed by default during systematic
testing. Disable via the
--no-partial-controlcommand line option (orConfiguration.WithPartiallyControlledConcurrencyAllowed(false)). - Added support for schedule space reduction based on read and write operations.
Enable via the
--reduce-shared-statecommand line option (orConfiguration.WithSharedStateReductionEnabled). - Improved support for detecting potential deadlocks during partially controlled concurrency.
- Binary rewriting improvements and fixes.
v1.5.0
- Added runtime and rewriting support for testing ASP.NET controllers in the presence of partially-controlled concurrency.
- Added support for rewriting the
HttpClienttype targeting ASP.NET controllers. - Improved runtime support for partially-controlled concurrency during testing.
- New option for skipping potential deadlocks in the presence of partially-controlled concurrency.
- The actor logging method
LogExceptionThrownis now only called if the exception was not handled. TheLogExceptionHandledmethod can be used instead for handled exceptions. - Various other runtime improvements and fixes.
v1.4.3
- Added support for the
netstandard2.0target framework. - Added support for rewriting the non-generic
TaskCompletionSourcetype. - Added support for rewriting the
ValueTasktype (butIValueTaskSourceis not supported). - Improvements to systematic fuzzing, especially for actor-based programs.
- Improvements to how thread interrupts are handled at the end of each test iteration.
- Tests now report the degree of concurrency and number of controlled operations.
v1.4.2
- Added support for the
net6.0target framework. - The
TestingEngineis now giving a warning if the DLL being tested has not been rewritten. - The number of controlled operations are now reported as part of test statistics.
- Improvements, optimizations and bug-fixes in binary rewriting.
- Added support for dumping the rewritten IL diff to a file through
--dump-il-diff.
v1.4.1
- Enabled automated fallback to systematic fuzzing upon detecting uncontrolled
concurrency during testing to increase usability. This feature is enabled by
default and can be disabled via the
no-fuzzing-fallbackcommand line option (orConfiguration.WithSystematicFuzzingFallbackEnabled). - Added a new JSON test report that lists any detected invocations of uncontrolled methods.
- The
TestingEngine.TryEmitTracesmethod was renamed toTestingEngine.TryEmitReportsto reflect that the reports do not include only traces. - The
IActorRuntimeLog.OnStrategyDescriptionmethod was removed.
v1.4.0
- Redesigned the systematic testing runtime to significantly improve its performance and simplicity.
- An
ActorIdof a halted actor can now be reused. - The
coyotetool can now resolveaspnet.
v1.3.1
- Added rewriting support for testing race conditions with several
System.Collections.Concurrentdata structures. - Added rewriting support for testing
System.Collections.Generic.HashSet<T>data races. - Added the
SchedulingPoint.SuppressandSchedulingPoint.Resumemethods for suppressing and resuming interleavings of enabled operations, accordingly. - Fixed a memory leak in the testing engine.
v1.3.0
- Improved the binary rewriting engine and fixed various rewriting bugs.
- Removed the deprecated
Microsoft.Coyote.Tasksnamespace. Testing task-based code should now only be done via binary rewriting, instead of using a custom task type. - Removed the
net48target framework, can instead just use thenet462target framework for legacy .NET Framework projects.
v1.2.8
- Improved the strategies used for systematic fuzzing.
- Fixed a rewriting bug related to the
TaskAwaitertype.
v1.2.7
- Added the
--no-reprocommand line option (enabled also viaConfiguration.WithNoBugTraceRepro), which disables the ability to reproduce buggy traces to allow skipping errors due to uncontrolled concurrency, for example when the program is only partially rewritten, or there is external concurrency that is not mocked, or when the program uses an API that is not yet supported. - The uncontrolled concurrency errors have been updated to be more informative and point to the documentation for further reading.
v1.2.6
- Added an experimental rewriting pass that adds assertion checks to find data
races in uses of the
System.Collections.Generic.List<T>andSystem.Collections.Generic.Dictionary<TKey, TValue>collections. - Added support for the
net462target framework.
v1.2.5
- Added the
SchedulingPointstatic class that exposes methods for adding manual scheduling points during systematic testing. - Added an experimental systematic testing strategy that uses reinforcement
learning. This is enabled using the
--sch-rlcommand line option or theConfiguration.WithRLStrategymethod. - Added an experimental systematic fuzzing testing mode that uses delay
injection instead of systematic testing to find bugs. This can be enabled
using the
--systematic-fuzzingcommand line option or theConfiguration.WithSystematicFuzzingEnabledmethod. - Added the
IActorRuntimeLog.OnEventHandlerTerminatedactor log callback that is called when an event handler terminates. - Fixed a bug where the
IActorRuntimeLog.OnHandleRaisedEventactor log callback was not invoked in production.
v1.2.4
- Improved how
coyote testresolves ambiguous test method names. - Fixed a bug where awaiting a task from a previous test iteration that was
canceled due to
ExecutionCanceledExceptionwould hang the tester.
v1.2.3
- Exposed the
TextWriterLoggertype. - Fixed a configuration bug where the
fairpctstrategy would be picked instead ofprobabilistic.
v1.2.2
- Added the
Specification.IsEventuallyCompletedSuccessfullyAPI for checking if a task eventually completes successfully. - Added the
Configuration.WithTestingTimeoutAPI for specifying a systematic testing timeout instead of iterations. - Optimized state space exploration in programs using
Task.Delay. - Added support for the
net5.0target framework. - Removed the
net47target framework.
v1.2.1
- Added the
OnEventIgnoredandOnEventDeferredcallbacks in theActortype.
v1.2.0
- Added support for systematically testing actors and tasks together using rewriting.
- Hardened the systematic testing runtime.
v1.1.5
- Improved detection of uncontrolled tasks during systematic testing.
- Added detection of invoking unsupported APIs during systematic testing.
v1.1.4
- Added missing
coyote rewritedependencies in theMicrosoft.Coyote.Testpackage.
v1.1.3
- Optimizations and fixes in binary rewriting.
v1.1.2
- Added basic support for the
System.Threading.Tasks.Paralleltype during rewriting. - Fixed a bug in
coyote rewritethat was incorrectly copying dependencies after rewriting.
v1.1.1
- Renamed
TestingEngine.ReproducibleTraceto fix typo in the API name. - Fixed some bugs in
coyote rewrite.
v1.1.0
- Added experimental support for testing unmodified task-based programs using binary rewriting.
- Added support for log severity in the logger and converted to an
ILoggerinterface. - Optimized various internals of the task testing runtime.
v1.0.17
- Fixed a bug in the
Actorlogic related to event handlers. - Fixed a bug in
Microsoft.Coyote.Task.WhenAny.
v1.0.16
- Added support for cancellations in
Task.RunAPIs. - Optimized various internals of the task testing runtime.
v1.0.15
- Fixed the
Task.WhenAnyandTask.WhenAllAPIs so that they execute asynchronously during systematic testing. - Fixed the
Task.WhenAnyandTask.WhenAllAPIs so that they throw the proper argument exceptions during systematic testing.
v1.0.14
- Added missing
Task<TResult>.UncontrolledTaskAPI. - Fixed a bug in the testing runtime for controlled tasks.
v1.0.13
- Fixed a bug in the testing runtime for controlled tasks that could lead to a stack overflow.
- Optimized various internals of the testing runtime.
v1.0.12
- Introduced a new
EventGroupAPI for actors, which replaces operation groups, that allows improved tracing and awaiting of long running actor operations. - The
Task.YieldAPI can now be used to de-prioritize the executing operation during testing. - Added missing APIs in the
Microsoft.Coyote.Tasks.Semaphoretype. - Fixed two bugs in the systematic testing scheduler.
v1.0.11
- Fixed an issue that did not allow systematic and non-systematic unit tests to run on the same process.
- Fixed a bug in the
TestingEnginelogger.
v1.0.10
- Fixed the NuGet symbol packages.
v1.0.9
- Introduced a new
Microsoft.Coyote.Testpackage that contains theTestattribute and theTestingEnginetype for writing unit tests. - The core
Microsoft.Coyotedoes not contain anymoreTestandTestingEngine, which were moved to theMicrosoft.Coyote.Testpackage. - Added support for optional anonymized telemetry in the
TestingEngine. - Optimized various internals of the systematic testing scheduler.
- Fixed some issues in the scripts.
v1.0.8
- The core
Microsoft.Coyoteproject is now targeting only .NET Standard, allowing it to be consumed by any project that supportsnetstandard2.0and above. - Removed the
net46target. - Fixed bug in using the global dotnet tool.
v1.0.7
- Added support for building Coyote on Linux and macOS.
- Building Coyote locally now ignores .NET targets that are not installed.
- Added optional anonymized telemetry in the
coyotetool. - Fixed a bug in the
SynchronizedBlocktype.
v1.0.6
- Added a
SynchronizedBlocktype to model the semantics of the C#lockstatement. - Simplified the
ConfigurationAPIs for setting max-steps and liveness related heuristics. - Fixed code coverage and added support for code coverage on
netcoreapp3.1.
v1.0.5
- Added a --version argument to the
coyotecommand line tool. - Added a dotnet tool package called
Microsoft.Coyote.CLIto install thecoyotecommand line tool and running it without an explicit path. - Exposed the
ReadableTraceandReproducibleTracemembers ofMicrosoft.Coyote.SystematicTesting.TestingEngineas public. - Fixed a bug in activity coverage reporting for
netcoreapp3.1. - Fixed some bugs in parallel testing.
v1.0.4
- Added new
Microsoft.Coyote.Configuration.WithReplayStrategymethod for programmatically assigning a trace to replay. - Added support for the
netstandard2.1,netcoreapp3.1andnet48targets. - Removed support for the
netcoreapp2.2target, which reached end of life. - Fixed various bugs in the documentation.
v1.0.3
- Fixed an issue when invoking
Microsoft.Coyote.Tasks.Task.ExploreContextSwitchduring a production run.
v1.0.2
- Made ActorRuntimeLogGraphBuilder public.
- Added CreateStateMachine to IActorRuntimeLog.
v1.0.1
- Fixed an issue in the runtime (there should always be a default task runtime instance).
v1.0.0
- The initial release of the Coyote set of libraries and test tools.