Граф коммитов

500 Коммитов

Автор SHA1 Сообщение Дата
Chris Lovett d49598b53c Merged PR 1477: new text only icon from Wende
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
2020-03-12 21:34:33 +00:00
Pantazis Deligiannis 41813f62b6 Merged PR 1417: added lock built on resources
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
2020-03-12 19:59:48 +00:00
Akash Lal a9eab2ebcc Merged PR 1437: Testing requirements (docs)
Testing requirements

Related work items: #2537
2020-03-12 19:00:56 +00:00
Chris Lovett 09a71ec714 Merged PR 1472: remove temporary press release
remove temporary press release
2020-03-12 18:52:08 +00:00
Chris Lovett 22d42efd81 Merged PR 1469: remove coyote icon.
remove coyote icon.

Related work items: #2685
2020-03-12 06:20:44 +00:00
Pantazis Deligiannis 2a66860fc6 Merged PR 1453: simplifying testing engine
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).
2020-03-12 03:10:01 +00:00
Chris Lovett 5eb96e9251 Merged PR 1460: make use of class level handler for the TerminateEvent in CoffeeMachineActors
make use of class level handler for the TerminateEvent in CoffeeMachineActors sample.
2020-03-11 21:07:49 +00:00
Chris Lovett 5b662e28b2 Merged PR 1452: Support inheritance of action handlers defined on Actor subclasses.
Support inheritance of action handlers defined on Actor subclasses.

Related work items: #1871
2020-03-11 20:48:21 +00:00
Chris Lovett 605bf0349e Merged PR 1459: fix website (_config.yml needs to be in the docs folder).
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
2020-03-11 20:38:48 +00:00
Pantazis Deligiannis bebe6c0e5e Merged PR 1445: attach debugger in test mode
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.
2020-03-10 03:25:03 +00:00
Chris Lovett 0b1cda83e0 Merged PR 1449: Fix command line parsing bug and make some hidden options public.
Fix command line parsing bug and make some hidden options public.

Related work items: #2476
2020-03-10 03:00:31 +00:00
Chris Lovett fb1f9ec1ad Merged PR 1451: Fix bug 2473: Log seems to incorrectly mention popping out of a state.
Fix bug 2473: Log seems to incorrectly mention popping out of a state.

Related work items: #2473
2020-03-10 02:42:42 +00:00
Damon Kiley 7c83d6f5c5 Merged PR 1436: Navigation updates
updates to footer & contact pages per legal & compliance
2020-03-10 02:35:19 +00:00
Chris Lovett 10d79aa7e3 Merged PR 1448: snapshot the array to reduce risk of InvalidOperationException
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
2020-03-10 02:08:35 +00:00
Pantazis Deligiannis a91ff8387d Merged PR 1434: refactoring to simplify testing engine
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.
2020-03-08 18:50:32 +00:00
Pantazis Deligiannis c8e580c36b Merged PR 1422: updated default timeout value during testing
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.
2020-03-08 18:25:50 +00:00
Pantazis Deligiannis 53aae6342d Merged PR 1429: dead code cleanup
This PR removes dead code.
2020-03-08 17:32:29 +00:00
Pantazis Deligiannis 1ff411ec7e Merged PR 1430: added missing net47
This PR adds a bunch of missing `NET47`.
2020-03-08 17:25:25 +00:00
Chris Lovett cc947642d6 Merged PR 1418: Finish CloudMessaging tutorials.
Finish CloudMessaging tutorials.
Fix coverage report involving Actors.
Add "category" to distinguish Actor, Monitor and StateMachine on the DGML diagrams.
2020-03-06 21:20:01 +00:00
Akash Lal 0338cda588 Merged PR 1428: Publications in reversed chronological order.
Publications should be in reversed chronological order.
2020-03-06 18:44:44 +00:00
Chris Lovett 95aba13847 Merged PR 1413: Make some stuff more debuggable.
Make some stuff more debuggable.
2020-03-06 07:10:09 +00:00
Chris Lovett b7dc8d5ee7 Merged PR 1403: More bug fixes for documentation.
More bug fixes for documentation.
Some from Dimitre's PR
More broken links found with a link checking tool.
Fixes to Case Studies TOC.
2020-03-04 23:19:08 +00:00
Chris Lovett b7ce8f6b28 Merged PR 1386: fix layout switching bugs.
fix layout switching bugs found using the super cool Chrome built in mobile device testing tool.
2020-03-04 02:06:58 +00:00
Pantazis Deligiannis 6d85600400 Merged PR 1401: documentation updates
This PR ports the documentation edits and fixes from Dimitre's PR, and also applies rewrap from VS Code.
2020-03-04 01:44:34 +00:00
Chris Lovett 65e9f29a5f Merged PR 1376: Simplify static initialization locking logic for actor and state machine.
Simplify static initialization locking logic for actor and state machine.
2020-03-02 22:59:32 +00:00
Chris Lovett 4552368f3c Merged PR 1368: Fix website TOC and related bugs
- 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.
2020-03-02 18:42:15 +00:00
Pantazis Deligiannis 16c1762faa Merged PR 1367: reference section navigation improvements, some code cleanup
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
2020-02-29 06:39:07 +00:00
Pantazis Deligiannis e76ed82d4b added website 2020-02-28 21:34:19 -08:00
Chris Lovett 85cfca2e2d Merged PR 1289: Fix the state machine coverage report bug related to push/pop states.
And unify GotoStateTransition, PushStateTransition with EventHandlerDeclaration to simplify book keeping inside StateMachine and Monitor.  Also, reduced memory allocations during push/pop state operations.
2020-02-28 19:32:29 -08:00
Chris Lovett a1d545f08a Merged PR 1344: Add new tests for push/pop states.
Add new tests for push/pop states.
2020-02-28 19:32:29 -08:00
Pantazis Deligiannis 5f18ba5e9b Merged PR 1338: goto and push benchmarks
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).
2020-02-28 19:32:29 -08:00
Chris Lovett 64169331dd Merged PR 1327: add unit tests to better cover how goto and push are not inherited by PushState.
add unit tests to better cover how goto and push are not inherited by PushState.
2020-02-28 19:32:29 -08:00
Chris Lovett 605f13c560 Merged PR 1290: Fix bugs related to having Actors in a state machine diagram.
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.
2020-02-28 19:32:29 -08:00
Pantazis Deligiannis 08a81f19f9 Merged PR 1307: Make a log API consistent
This PR renames the log API `OnPopUnhandledEvent` to `OnPopStateWithUnhandledEvent` for consistency (e.g. we name `OnPopState` and not `OnPop`).
2020-02-28 19:32:29 -08:00
Pantazis Deligiannis 37e0ea5c9e Merged PR 1280: minor cleanup and typo fix
Fixing `RasiePushStateEvent` to `RaisePushStateEvent` and removing some unnecessary qualified namespaces.
2020-02-28 19:32:29 -08:00
Chris Lovett df93919485 Merged PR 1265: hide Transition, but keep the same contract.
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.
2020-02-28 19:32:29 -08:00
Chris Lovett c47b504154 Merged PR 1180: Add stack trace to the assertion failure log.
Add stack trace to the assertion failure log.
2020-02-28 19:32:29 -08:00
Chris Lovett fb2296ce08 Merged PR 1229: Track dangling Transitions and report them as a failed assert
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
2020-02-28 19:32:29 -08:00
Pantazis Deligiannis 736f48e083 Merged PR 1199: Simplifying task namespace
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).
2020-02-28 19:32:29 -08:00
Chris Lovett bf3fc026de Merged PR 1198: Implement optional custom Event type for timers
Implement Dimitre's great idea of having an optional custom Event type for timer elapsed events.
See how this cleans up the [CoffeeMachine sample](https://dev.azure.com/foundry99/Coyote/_git/CoyoteSamples/pullrequest/1200?_a=overview) eliminating a switch statement on timer events.
2020-02-28 19:32:29 -08:00
Pantazis Deligiannis ea821f04f3 Merged PR 1214: Cleanup in command line infrastructure for coyote tool
This PR does some cleanup in the command line infrastructure for the `coyote` tool.
2020-02-28 19:32:29 -08:00
Pantazis Deligiannis 47f92b2835 Merged PR 1215: fix in coverage file merger
This PR fixes a bug in coverage file merger.
2020-02-28 19:32:29 -08:00
Pantazis Deligiannis 42813787e1 Merged PR 1185: Refactoring to reuse random generator in runtime
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.
2020-02-28 19:32:29 -08:00
Pantazis Deligiannis fee001e2b5 Merged PR 1172: Removing leftover ignore and defer from actor type
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.
2020-02-28 19:32:28 -08:00
Chris Lovett 77fdb26abe Merged PR 1159: Add generated API documentation.
Add generated API documentation.

Related work items: #1990
2020-02-28 19:32:28 -08:00
Pantazis Deligiannis a3331d7d5f Merged PR 1146: Cleanup in testing related code
The PR also does cleanup related to strategies and command line options.
2020-02-28 19:32:28 -08:00
Pantazis Deligiannis 2cb8002902 Merged PR 1158: Reducing array allocations in the testing runtime and cleanup
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.
2020-02-28 19:32:28 -08:00
Pantazis Deligiannis 20c21bde7c Merged PR 1156: Removing some string allocations in debug calls
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.
2020-02-28 19:32:28 -08:00
Pantazis Deligiannis e46ad31829 Merged PR 1154: Simplify actor id output towards perf PR
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 `''`).
2020-02-28 19:32:28 -08:00
Chris Lovett 7c5f17b96d Merged PR 1148: Use /// <inheritdoc/>
Use  /// <inheritdoc/>
2020-02-28 19:32:28 -08:00