Hook up the new text only icon. Was easy to revert to previous code using this new svg icon, I also generated various sized png icons from it as needed for android, ios, etc.
Related work items: #2685
This PR introduces the internal concept of a `Resource`, which asynchronous operation can await to acquire or release.
Built on top of that, the PR adds `AsyncLock` and `Semaphore`, two lock types that can be controlled during testing.
The PR also does some related refactoring to simplify the namespaces and reduce coupling between previous namespaces.
Related work items: #2649, #698
This PR simplifies the testing engine code. It removes the notion of a `BugFindingEngine` and a `ReplayEngine`, as well as the `ITestingEngine` interface. There is only one `TestingEngine`, which now reuses code (and cutting down 350 lines of code).
fix website (_config.yml needs to be in the docs folder). New way to launch jekyll to match what github does is to add the "-s" option with this command line:
```
bundle exec jekyll serve -b /coyote -i -s docs
```
Related work items: #2639, #2670
This PR allows the `--break` flag to be used under `coyote test`, not just `coyote replay`. This is very useful when debugging. We are not trying to do something more sophisticated here, we leave that for a later PR.
snapshot the array to reduce risk of InvalidOperationException: Collection was modified after the enumerator was instantiated which has been observed during testing.
Related work items: #1170
This PR does a simplification in the testing engine by encapsulating the logic of loading the information regarding a test method inside a `TestMethodInfo`, which is then used by the engine (instead of having that logic thrown inside the engine).
This is one step towards simplifying the engine logic in subsequent PRs.
This PR requires to first merge !1429 and !1430.
This PR increases the default timeout value during testing to a value that makes much more sense, and works better in practice. The previous value of `1` was triggering timers too often. Users can still tweak it if needed via `--timeout-delay N` but this should stay an advanced feature.
Finish CloudMessaging tutorials.
Fix coverage report involving Actors.
Add "category" to distinguish Actor, Monitor and StateMachine on the DGML diagrams.
- Increase size of "small screen" to 640 so we can test it on a desktop using Chrome (desktop web browsers have a minimum width that is pretty big these days).
- fix responsive intent of reference content and footer when "fixed" TOC is also auto-sizing itself.
- Change scrollable TOC to "auto" so scrollbar is not always visible.
- Make "scrollintoview" of selected TOC item jump to content on the phone sized screens where TOC is not a separate scrollable panel.
- Fix auto-height setting of TOC so it does not do that on phone sized devices where TOC is not a "fixed" layout.
- Fix height calculation of "fixed" layout TOC so it is not sensitive to page scroll position.
Still debugging the active state for learn sidenav. When you click on anything under API, it should stay open. Chris, you will find some debugging code in there, but feel free to erase & start over. Current sidebar logic is directly in layouts/reference.html.
Related work items: #2164
And unify GotoStateTransition, PushStateTransition with EventHandlerDeclaration to simplify book keeping inside StateMachine and Monitor. Also, reduced memory allocations during push/pop state operations.
This PR adds two new state machine benchmarks: a goto and a push one.
Also tidying up benchmarks, by moving them to a dedicated test project (until now they were inside the `BenchmarkRunner` tool, which is ugly, tests should be in the test directory).
Fix bugs related to having Actors in a state machine diagram. Specifically the "senderState" on events is null and so we need to handle that properly, both in the DGML generation and the SVG animations. Added animation to CoffeeMachine tutorial to test it out, since CoffeeMachine MockSensors is an Actor.
There is no reason to expose Transition objects and force users to "return" a Transition. As is evidenced by the dangling Transition PR, it didn't actually improve things and the solution to dangling Transitions shows that exposing Transition is not required to ensure the same contract (namely, that only one is created per action) as shown by the internal PendingTransition member variable.
We also decided to rename some methods to make them all have a similar and therefore consistent name:
```
RaiseEvent is unchanged
Rename “GotoState” to “RaiseGotoStateEvent”
Rename “PushState” to “RaisePushStateEvent”
Rename “PopState” to “RaisePopStateEvent”
Rename “Halt” to “RaiseHaltEvent”
```
The idea being that the "Raise...Event" language more clearly communicates to the user that these operations are queuing something up to happen after the action completes and they are not processed immediately. This also makes it easier for the user to remember the idea that currently you can only do one Raise operation per action.
Track dangling Transitions and report them as a failed assert. Keep track of who created the Transition and what state the caller was in so that the error is actionable.
Related work items: #2320
This PR simplifies the task namespace from `Microsoft.Coyote.Threading.Tasks` to simply `Microsoft.Coyote.Tasks`, as we discussed the other day.
@<Chris Lovett>, I think I did the documentation correctly, but not 100% sure (as I cannot auto-generate yet from my side I think).
This PR reuses the same `IRandomValueGenerator` that systematic testing strategies use in the runtime (instead of calling `Random` directly), so things are consistent (and in the future we easily plugin different random -- not that we currently need to do that, but you never know).
Also changes the name of the public static `RandomValueGenerator` API (used by `ControlledTask` objects) to `ControlledRandomValueGenerator`, first to match the naming of `ControlledTask` APIs and second to make it clear that this is a random generator that is controlled during testing.
Also adding an internal helper for creating a new instance of the production runtime (inside the existing runtime factory class), so that we can set the random value generator in as few places as possible.
**Note:** I am not trying to reinvent or improve the `IRandomValueGenerator` interface in this PR, rather just make sure we reuse what we currently have for consistency. Any improvements to the interface are outside the scope of this PR.
This PR removes the `IgnoreEvent` and `DeverEvent` APIs from the `Actor` type. I was playing with them when originally created the `Actor` type but forgot to remove them when we merged.
Basically, these APIs should not exist on an actor (similar to how actors in other frameworks/languages do not have them), as ignoring and deferring events is a state machine concept (in the sense that an event type can be ignored or deferred on some state, and then restored on another, but base actors do not have states). If someone really wanted (say to ignore an event because the actor doesn't care about it) they could just add that in the control flow of an event handler (e.g. if type of dequeued event is foo, then return).
Another bug that this PR fixes, is that because these APIs where on the base `Actor` type, where also exposed on the `StateMachine` type which is confusing and wrong (as they cannot alter the statically typed ignoring/deferring of state machines), so they were no-ops on the subclass.
This PR reduces some array allocations in the testing runtime. Its also nukes some experimental strategies that we never really used (not even for paper evaluations) to cleanup the codebase. These strategies are in the P# codebase, so if we ever really need to bring them back and polish them, we can easily do them. I would normally clean them up in a separate PR, but doing it here as I had to change an API so they could not compile anymore due to a type difference.
This change reduced the peak working set quite a lot.
This PR removes some string allocations in debug calls (some debug calls where already doing this, this makes stuff more consistent).
E.g. on the `CoffeeMachine` sample I was able to reduce the total allocations from `708.117` to `642.253` MB for 100 iterations.
This PR makes some changes towards a PR focused on perf improvements. The way actor id is output is simplified from e.g. `'FooActor(0)'` to `FooActor(0)` (basically removing the brackets `''`).