<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Spec Explorer Team Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/specexplorer/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/specexplorer/feed.xml</link>
    <description>A Model-Based Testing tool from Microsoft</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:27:18 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Spec Explorer 2010 Release 3.5.3146.0 now available!</title>
      <link>https://docs.microsoft.com/archive/blogs/specexplorer/spec-explorer-2010-release-3-5-3146-0-now-available</link>
      <pubDate>Mon, 08 Jul 2013 16:26:15 GMT</pubDate>
      <dc:creator><![CDATA[Spec Explorer Team]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/specexplorer/2013/07/08/spec-explorer-2010-release-3-5-3146-0-now-available/</guid>
      <description><![CDATA[Spec Explorer 2012 release 3.5.3146.0 is now available!
This release adds support to Visual Studio...]]></description>
      <content:encoded><![CDATA[<p><strong>Spec Explorer 2012 release 3.5.3146.0 is now available!</strong></p>
<p>This release adds support to Visual Studio 2012 Professional to previous 3.5 release.&nbsp;</p>
<p>&nbsp;<strong>Where can you get it?</strong></p>
<ul>
<li>&nbsp;The Spec Explorer download can be found on the Spec Explorer&nbsp;<a href="https://go.microsoft.com/fwlink/?LinkID=166911">home page</a>&nbsp;on Visual Studio Gallery.</li>
<li>See the on-line&nbsp;<a href="https://msdn.microsoft.com/en-us/library/hh781546.aspx">Release Notes</a>&nbsp;for the latest, more detailed description of installation requirements, major features, bug fixes and known issues. Further information can also be found on&nbsp;<a href="https://social.msdn.microsoft.com/Forums/en-US/vstest/threads">Test Tools in Visual Studio 2010 and 2012</a> (<a href="https://social.msdn.microsoft.com/Forums/en-US/specexplorer/threads">The Spec Explorer Forum</a> has been retired), <a href="https://blogs.msdn.com/SpecExplorer">The Spec Explorer Team Blog</a>, and the latest Spec Explorer&nbsp;<a href="https://msdn.microsoft.com/en-us/library/ee620411.aspx">Help Documentation</a>&nbsp;is always available in the MSDN library.</li>
<li>Please note that Spec Explorer 2012 Release 3.5 runs only on Visual Studio 2012 and 2010. The 90 day trial version of Visual Studio can be found at&nbsp;<a href="https://www.microsoft.com/visualstudio/en-us/download">here</a>.</li>
</ul>
<p><strong>&nbsp;</strong></p>
<p>We hope you enjoy this release and look forward to hearing feedback from the Spec Explorer community.</p>
<p>The Spec Explorer Team</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>How to initialize the initial state from an external source</title>
      <link>https://docs.microsoft.com/archive/blogs/specexplorer/how-to-initialize-the-initial-state-from-an-external-source</link>
      <pubDate>Tue, 02 Aug 2011 00:10:59 GMT</pubDate>
      <dc:creator><![CDATA[Xiang Li]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/specexplorer/2011/08/02/how-to-initialize-the-initial-state-from-an-external-source/</guid>
      <description><![CDATA[We received several emails to ask how to initialize the initial state from an external source...]]></description>
      <content:encoded><![CDATA[<p>We received several emails to ask how to initialize the initial state from an external source recently, this post introduces a good pattern to do it.</p>  <p>We can implement our own data loader to load data from external source, and use this loader to initialize the state. Note that since data loading method might involve native invocation, we’d better set our loader to native (more details can be found at <a title="https://msdn.microsoft.com/en-us/library/ee620483.aspx" href="https://msdn.microsoft.com/en-us/library/ee620483.aspx">https://msdn.microsoft.com/en-us/library/ee620483.aspx</a>).</p>  <p>Here is an example:</p>  <p>Model.cs</p>  <p>using System;    <br />using System.Collections.Generic;     <br />using System.Text;     <br />using System.Linq;     <br />using Microsoft.Modeling;     <br />using Microsoft.Xrt.Runtime;     <br />using System.IO;</p>  <p>[assembly: NativeType(typeof(Sample.MyLoader))]    <br />namespace Sample     <br />{     <br />&#160;&#160;&#160; static class MyLoader     <br />&#160;&#160;&#160; {     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; internal static Sequence&lt;UserData&gt; Load()     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; int i;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; UserData data;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Sequence&lt;UserData&gt; dataSequence = new Sequence&lt;UserData&gt;();     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; string[] contents = File.ReadAllLines(&quot;c:\\temp\\data.txt&quot;);     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; for (i = 0; i &lt; contents.Length; i=i+2)     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; data.Name = contents[i];     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; data.Address = contents[i + 1];     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; dataSequence = dataSequence.Add(data);     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return dataSequence;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }     <br />&#160;&#160;&#160; }</p>  <p>&#160;&#160;&#160; public struct UserData    <br />&#160;&#160;&#160; {     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; public string Name;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; public string Address;     <br />&#160;&#160;&#160; }</p>  <p>&#160;&#160;&#160; static class ModelProgram    <br />&#160;&#160;&#160; {     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; static Sequence&lt;UserData&gt; Data = MyLoader.Load();</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Rule]    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; static Sequence&lt;UserData&gt; ShowData()     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return Data;     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>  <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; [Rule]    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; static void Clear()     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Data = new Sequence&lt;UserData&gt;();     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }     <br />&#160;&#160;&#160; }     <br />}</p>  <p>Config.cord</p>  <p>using Sample;    <br />using Microsoft.Modeling;</p>  <p>config Main    <br />{     <br />&#160;&#160;&#160; action abstract static Sequence&lt;UserData&gt; Adapter.ShowData();     <br />&#160;&#160;&#160; action abstract static void Adapter.Clear();</p>  <p>&#160;&#160;&#160; switch StepBound = 128;    <br />&#160;&#160;&#160; switch PathDepthBound = 128;     <br />}</p>  <p>machine ModelProgram() : Main    <br />{     <br />&#160;&#160;&#160; construct model program from Main     <br />}     <br /></p>  <p>And the data under c:\temp</p>  <p>Lisa    <br />#5, Danling Street     <br />Bob     <br />Queen Square</p>  <p>Then we explore the ModelProgram machine, and get the exploration graph like:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/04/metablogapi/8802.image_49FC4170.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-04-metablogapi/8802.image_5F00_49FC4170.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/30/04/metablogapi/8836.image_thumb_7AAF491B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-30-04-metablogapi/8836.image_5F00_thumb_5F00_7AAF491B.png" width="631" height="111" /></a></p>  <p>Of course the data source is not limited to text files, you can design your own loader to make your model more powerful.</p>  <p>Please feel free to share your thoughts or other good approaches to initialize initial state.</p>]]></content:encoded>
    </item>
    <item>
      <title>Spec Explorer 2010 Release 3.5 now available!</title>
      <link>https://docs.microsoft.com/archive/blogs/specexplorer/spec-explorer-2010-release-3-5-now-available</link>
      <pubDate>Mon, 18 Apr 2011 08:03:00 GMT</pubDate>
      <dc:creator><![CDATA[Xiang Li]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/specexplorer/2011/04/18/spec-explorer-2010-release-3-5-now-available/</guid>
      <description><![CDATA[Spec Explorer 2010, Release 3.5 Now Available!
Spec Explorer 2010 Release 3.5
Hello!&nbsp; We are...]]></description>
      <content:encoded><![CDATA[<p><b>Spec Explorer 2010, Release 3.5 Now Available!</b></p>
<p><i>Spec Explorer 2010 Release 3.5</i></p>
<p>Hello!&nbsp; We are delighted to announce the newest version of Spec Explorer 2010, Release 3.5.</p>
<p>Spec Explorer 2010 Release 3.5 contains new features, improved documentation, plus over 60 bug fixes. It runs on the Visual Studio 2010 Professional level product and above.</p>
<p><b>What&rsquo;s New in Spec Explorer?</b></p>
<p>This release contains new / enhanced features including:</p>
<p>&middot; <b>Model change detecting</b>:</p>
<p>The model change detecting feature detects all model changes and decides if Spec Explorer needs to re-explore the model. For specific machines, if Spec Explorer detects any change in the model code, cord script files, or other inputs, or detects a tool version change, Spec Explorer will start a new exploration; otherwise, Spec Explorer will use existing exploration result files for current exploration viewing, test code generation, and user customized post processing. The UI has been updated to allow you to force Spec Explorer to re-explore the machines.</p>
<p>&middot; <b>Multiple machine processing</b>:</p>
<p>Now you can select multiple machines in Exploration Manager and explore, generate test code, or perform post processing tasks on them. For multiple machine processing, Spec Explorer generates a summary including all information of the batch-processing.</p>
<p>&middot; <b>Cord context menu</b>:</p>
<p>Spec Explorer adds a new context menu item &ldquo;Go To Definition&rdquo; in the Cord editor, which enables users to navigate to specific configurations and machines. This is part of an ongoing effort to improve the Cord editing user experience and the general integration of the tool with Visual Studio.</p>
<p><b>Where can you get it?</b></p>
<ul>
<li>The Spec Explorer download can be found on the Spec Explorer <a href="https://go.microsoft.com/fwlink/?LinkID=166911">home page</a> on Visual Studio Gallery.</li>
<li>See the on-line <a href="https://msdn.microsoft.com/en-us/library/hh781546.aspx">Release Notes</a> for the latest, more detailed description of installation requirements, major features, bug fixes and known issues. Further information can also be found on <a href="https://social.msdn.microsoft.com/Forums/en-US/specexplorer/threads">The Spec Explorer Forum</a>, <a href="https://blogs.msdn.com/SpecExplorer">The Spec Explorer Team Blog</a>, and the latest Spec Explorer <a href="https://msdn.microsoft.com/en-us/library/ee620411.aspx">Help Documentation</a> is always available in the MSDN library.</li>
<li>Please note that Spec Explorer 2010 Release 3.5 runs only on Visual Studio 2010. The 90 day trial version of Visual Studio 2010 can be found at <a href="https://www.microsoft.com/visualstudio/en-us/download">here</a>.</li>
</ul>
<p>We hope you enjoy this release and look forward to hearing feedback from the Spec Explorer community.</p>
<p>The Spec Explorer Team</p>]]></content:encoded>
    </item>
    <item>
      <title>Spec Explorer 2010 Release 3.4 now available!</title>
      <link>https://docs.microsoft.com/archive/blogs/specexplorer/spec-explorer-2010-release-3-4-now-available</link>
      <pubDate>Thu, 06 Jan 2011 23:38:04 GMT</pubDate>
      <dc:creator><![CDATA[Xiang Li]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/specexplorer/2011/01/06/spec-explorer-2010-release-3-4-now-available/</guid>
      <description><![CDATA[Spec Explorer 2010, Release 3.4 Now Available!  Spec Explorer 2010 Release 3.4  Hello!&#160; We are...]]></description>
      <content:encoded><![CDATA[<p><b>Spec Explorer 2010, Release 3.4 Now Available!</b></p>  <p><i>Spec Explorer 2010 Release 3.4</i></p>  <p>Hello!&#160; We are delighted to announce the newest version of Spec Explorer 2010, Release 3.4.</p>  <p>Spec Explorer 2010 Release 3.4 contains new features, improved documentation, plus over 50 bug fixes. It runs on the Visual Studio 2010 Professional level product and above.</p>  <p><b>What’s New in Spec Explorer?</b></p>  <p>This release contains new / enhanced features including:</p>  <ul>   <li><b>Dynamic traversal</b>: Dynamic traversal provides a new test case generation mechanism. It works by traversing the exploration result (with a user-customizable strategy) while invoking the corresponding actions on the system under test at test runtime. </li>    <li><b>Validation performance improvement</b>: The performance of Cord validation has been greatly improved. </li>    <li><b>Exploration cleanup</b>: This enhanced feature provides a post-exploration process to remove redundant states/steps.</li>    <li><b>Getting partial exploration result:</b> If exploration time exceeds the value of switch ExplorationTimeout or you click the “Stop” button during exploration, a partially explored / cleaned-up result will be displayed.</li>    <li><b>Model program construct from multiple namespaces / types:</b><b> </b>This feature allows a model program to be constructed from a list of comma-separated model namespaces / types.<b></b></li>    <li><b>Fully-qualified-name support for static action invocations:</b><b> </b>Fully qualified names are used to distinguish different static action invocations with the same method name.<b></b></li>    <li><b>Validation task in SpecExplorer.exe:</b><b> </b>New task “Validate” has been added as a task in SpecExplorer.exe<b></b></li> </ul>  <p><b>Where can you get it?</b></p>  <ul>   <li>The Spec Explorer download can be found on the Spec Explorer <a href="https://go.microsoft.com/fwlink/?LinkID=166911" target="_blank">home page</a> on Visual Studio Gallery. </li>    <li>See the on-line <a href="https://go.microsoft.com/fwlink/?LinkID=166135" target="_blank">Release Notes</a> for the latest, more detailed description of installation requirements, major features, bug fixes and known issues. Further information can also be found on <a href="https://social.msdn.microsoft.com/Forums/en-US/specexplorer/threads" target="_blank">The Spec Explorer Forum</a>, <a href="https://blogs.msdn.com/SpecExplorer" target="_blank">The Spec Explorer Team Blog</a>, and the latest Spec Explorer <a href="https://msdn.microsoft.com/en-us/library/ee620411.aspx" target="_blank">Help Documentation</a> is always available in the MSDN library. </li>    <li>Please note that Spec Explorer 2010 Release 3.4 runs only on Visual Studio 2010. The 90 day trial version of Visual Studio 2010 can be found at <a href="https://www.microsoft.com/visualstudio/en-us/download" target="_blank">here</a>. </li> </ul>  <p>We hope you enjoy this release and look forward to hearing feedback from the Spec Explorer community.</p>  <p>The Spec Explorer Team</p>]]></content:encoded>
    </item>
    <item>
      <title>Spec Explorer 2010 Release 3.3 now available as a Visual Studio Power Tool!</title>
      <link>https://docs.microsoft.com/archive/blogs/specexplorer/spec-explorer-2010-release-3-3-now-available-as-a-visual-studio-power-tool</link>
      <pubDate>Thu, 30 Sep 2010 13:22:00 GMT</pubDate>
      <dc:creator><![CDATA[Rob DuWors]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/specexplorer/2010/09/30/spec-explorer-2010-release-3-3-now-available-as-a-visual-studio-power-tool/</guid>
      <description><![CDATA[Spec Explorer 2010 Release 3.3
Hello again!&nbsp; We are proudly announcing the newest version of...]]></description>
      <content:encoded><![CDATA[<p><i>Spec Explorer 2010 Release 3.3</i></p>
<p>Hello again!&nbsp; We are proudly announcing the newest version of Spec Explorer 2010, Release 3.3. The next step has been taken from being resident on DevLabs to being a Power Tool on Visual Studio gallery where you can find the new <a target="_blank" href="https://go.microsoft.com/fwlink/?LinkID=166911" title="Spec Explorer home page in VS Gallery">home page</a> for Spec Explorer.</p>
<p>Spec Explorer 2010 Release 3.3 contains new features, continued improvement in documentation, plus over 100 bug fixes.</p>
<h3>What&rsquo;s New in Spec Explorer?</h3>
<p>New features added in Release 3.3 include:</p>
<ul>
<li>
<p><strong>On-The-Fly (OTF) testing</strong>: On-The-Fly testing provides a new means to use Spec Explorer to create and run tests directly from models (machines). In On-The-Fly testing, the selection and evaluation of model actions (including events) is alternated with execution by the System Under Test/adapter. </p>
</li>
<li>
<p><strong>Visual state search</strong>: This new feature in the Spec Explorer view enables the search for and highlighting of specific states. </p>
</li>
<li>
<p><strong>Probe logging:</strong> Newly provided recording of probe values in states enhances analysis of test logs. </p>
</li>
<li>
<p><strong>Test method customization:</strong> New control of test attributes in generated test code offers expanded support for other test frameworks in addition to the default one provided by Visual Studio.</p>
</li>
</ul>
<p>Additionally, a Spec Explorer extension for UML is also being released at this time that is <strong>not</strong> included in the main Spec Explorer MSI and must be downloaded separately. Documentation for the UML extension can be found <a target="_blank" href="https://go.microsoft.com/fwlink/?LinkID=202596" title="Separately installable extension to Spec Explorer for UML model testing">here</a>.</p>
<h3>Where can you get it?</h3>
<ul>
<li>
<p>The Spec Explorer downloads can be found on the Spec Explorer <a target="_blank" href="https://go.microsoft.com/fwlink/?LinkID=166911" title="Spec Explorer 2010 home page">home page</a> on Visual Studio Gallery. </p>
</li>
<li>
<p>See the on-line <a target="_blank" href="https://go.microsoft.com/fwlink/?LinkID=166135" title="Spec Explorer 3.3 Release Notes">Release Notes</a> for the latest, more detailed description of installation requirements, major features, bug fixes and known issues. Further information can also be found on <a target="_blank" href="https://social.msdn.microsoft.com/Forums/en-US/specexplorer/threads" title="Spec Explorer's MSDN forum">The Spec Explorer Forum</a>, <a target="_blank" href="https://blogs.msdn.com/SpecExplorer" title="Spec Explorer's MSDN Blog">The Spec Explorer Team Blog</a>, and the latest Spec Explorer <a target="_blank" href="https://msdn.microsoft.com/en-us/library/ee620411.aspx" title="Spec Explorer's on-line MSDN documentation">Help Documentation</a> is always available in the MSDN library. </p>
</li>
<li>
<p>Please note that Spec Explorer 2010 Release 3.3 runs only on Visual Studio 2010 Professional Edition or higher. The 90 day trial version of Visual Studio 2010 can be found at <a target="_blank" href="https://www.microsoft.com/visualstudio/en-us/download" title="Try driving VS 2010 before you buy it!">here</a>. </p>
</li>
</ul>
<p>We hope you enjoy this release and look forward to your help by feedback and community involvement to continue making Spec Explorer better and better.</p>
<p>The Spec Explorer Team</p>]]></content:encoded>
    </item>
    <item>
      <title>The Controlled Calculator: An example of combining models while showing other features of Spec Explorer</title>
      <link>https://docs.microsoft.com/archive/blogs/specexplorer/the-controlled-calculator-an-example-of-combining-models-while-showing-other-features-of-spec-explorer</link>
      <pubDate>Tue, 06 Jul 2010 14:16:06 GMT</pubDate>
      <dc:creator><![CDATA[Rob DuWors]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/specexplorer/2010/07/06/the-controlled-calculator-an-example-of-combining-models-while-showing-other-features-of-spec-explorer/</guid>
      <description><![CDATA[The Calculator       The core calculator model is a simple four function calculator. But infix...]]></description>
      <content:encoded><![CDATA[<p style="text-align: center; margin-bottom: 2pt" class="MsoNormal" align="center"><b style="mso-bidi-font-weight: normal"><span style="color: #0070c0"></span></b></p>  <p></p>  <h2>The Calculator    <p></p> </h2>  <p class="MsoNormal">The core calculator model is a simple four function calculator. But infix calculators aren't entirely simple, because calculators demonstrate rich variations in outputs depending upon the exact order of input sequences of numbers, operations, and pressing the Equals keys. This implementation (and model) emulates the Windows Calculator. It is similar to but is slightly different from most store-bought calculators, especially in how the Equals key first repeats upon multiple key pushes and how an operation is done when only one operand has been provided. The model and implementation provided, however, should match up with the Windows calculator found under Accessories in the Windows Start menu. The Visual Studio 2010 solution for this example can be found <a title="Controller Calculator Solution" href="https://cid-d75b985f44923001.office.live.com/self.aspx/MyBlogFiles/TheControlledCalculator.zip" target="_blank">here</a>.</p>  <p></p>  <h2>The Scenario    <p></p> </h2>  <p class="MsoNormal">For the purposes of this sample, first the calculator functionality was created as a standalone product. This was then integrated with connection access that allowed the calculator to be used as a service. These were then modeled together as single integrated service. The calculator service model can be explored by itself and its implementation can optionally be tested standalone. The security authorization model controls access to the calculator via a simple minded Access Control List (ACL) consisting of a list of authorized users.<span style="mso-spacerun: yes">&#160; </span>(Note that the full ACL target resources and operations were not of interest for testing purposes so were not modeled). This simplified ACL was modeled on its own and can be explored on its own. Testing the ACL implementation requires the calculator service only for its connection capabilities. </p>  <p></p>  <p></p>  <h2>How the Two Model Program Rule Sets Work Together    <p></p> </h2>  <p class="MsoNormal">The ACL (authorization) model and the calculator service model actually synchronize on only a few actions, specifically connection and disconnection. They interleave the rest. The two model programs use the |?| operator to achieve this.<span style="mso-spacerun: yes">&#160; </span>Thus the authorization model can manage its ACL,<span style="mso-spacerun: yes">&#160; </span>allow and release user authorization on its own, as shown by exploring machine AuthorizationSlice, while the calculator model independently can do all of its calculator functionality (actions and events) .<span style="mso-spacerun: yes">&#160; </span>The vast majority of the all-important security related sequencing is done by transition modes in the authorization model. By carefully controlling when the synchronized actions (connect and disconnect) can occur the authorization model imposes the majority of inter-model sequencing constraints expressed by the joint model. <span style="mso-spacerun: yes">&#160;</span>Internally within the calculator service, however, the rules are generally aware that they must be connected to be enabled but have no knowledge at all of the authorization rules. </p>  <p></p>  <p class="MsoNormal">The end-to end-control is shown, not surprisingly, by machine EndToEndControl (Slice and Test) in the Cord file. It specifies that between ACL creations and disposals, users can be authorized multiple times, and between multiple authorizations the current user can connect multiple times, and within a connection multiple operations can be performed.<span style="mso-spacerun: yes">&#160; </span>This models the functionality of the core authorization sequences. Multiple simultaneous users and connections were not modeled. Had this been a test objective, likely instance based modeling would have been used and the implementation would be have been multithreaded. The current model (and the current implementation) adequately tests basic end-to-end functionality. </p>  <p></p>  <h2>How the Implementation Does This    <p></p> </h2>  <p class="MsoNormal">The implementation is written as four layers. The top level static class acts as the interface that implements the controllable and event actions declared in Cord. Thus it can be considered to be an adapter layer. The rest of the implementation is written as three layers, each of which is represented by a single object. There is an object that implements all of the calculator functionality, one that manages the connection to the calculator object, and finally one that represents the ACL control logic. In principle, the calculator object could be replaced by the real Windows calculator, but that has not been attempted. </p>  <p></p>  <h2>Things to look for    <p></p> </h2>  <p class="MsoNormal">In addition to modeling the active (behavioral) joining of two rule sets, this sample illustrates several important features of using Spec Explorer. </p>  <p></p>  <h3>Cord    <p></p> </h3>  <p class="MsoNormal">The Cord file is structured around logical groups of configurations, which of course is what configs are supposed to do for a living. The use of parameters in machines is shown by the DoubleOperand machine. The machines related to test purposes are built up from scenarios to model slices to test cases. For example, <span style="mso-spacerun: yes">&#160;</span>BigLongScenario to BigLongSlice to BigLongTest. There are a number of helper machines such as FullStart, CloseDown, SingleOperation. Fairly rigorous testing of calculator key sequences is shown by all the scenarios that <span style="mso-spacerun: yes">&#160;</span>are included in AllOperationsTogetherSlice (and Test). </p>  <p></p>  <p class="MsoNormal">But in many ways the most interesting machines deal with constructing and joining the two rule sets. The machine called AuthorizationSlice builds the (sliced) <stockticker w:st="on">ACL</stockticker> model program and CalculatorService constructs the model program of the calculator service. These two model programs are actually independent of each other and use their own rule sets kept for convenience in separate name spaces and files. They make no assumptions about each other. </p>  <p></p>  <p class="MsoNormal">Machine JointModel is the one that joins the two by means of the partially synchronizing |?| operator, aka the “<a href="https://msdn.microsoft.com/en-us/library/ee620450.aspx">synchronized-interleaved parallel composition operator</a>”.<span style="mso-spacerun: yes">&#160; </span><span style="mso-spacerun: yes">&#160;</span>This synchronizes when both machines try to produce the same action just like the parallel synchronization operator ||-- in this case the connection and disconnection related actions--but interleaves otherwise when either machine produces an action unique to itself, just like the ||| operator. It may be that |?| is one of the more underappreciated operators in Cord.<span style="mso-spacerun: yes">&#160; </span>There are subtleties in its definition, but it is behaviorally powerful as shown. </p>  <p></p>  <p class="MsoNormal">Machine SimpleDirectSlice (and Test) deserves quick mention. If uncommented in CalculatorService.Connect (file Calculator.cs), the implementation will allow the calculator service to be tested on its own by automatically creating an ACL and authorizing a fictitious user. (The users defined for model slicing in configuration Authorize are neither fictitious nor necessarily innocent but that's another story.) This implementation short circuit would ordinarily be a security hole, since the ACL logic is being neutered, but is useful for testing and illustrates one way to get around the layering of the implementation code. Note that no changes were necessary in the CalculatorServiceModel rules to make this test generation work correctly because those rules by themselves do not depend on the ACL logic to which they are later composed only by the |?| operator </p>  <p></p>  <h3>Model and Implementation Code    <p></p> </h3>  <p class="MsoNormal">The model and implementation code is heavily commented and largely self-explanatory.<span style="mso-spacerun: yes">&#160; </span>The model code uses helper functions extensively. In both the model code and the implementation, state data is initialized actively in a constructor or other method. This promotes consistency and successful re-running of the same code in a test sequence or between test case executions. </p>  <p></p>  <p class="MsoNormal">Note that a rule may be blocked from producing a step in a helper function such as in CalculatorServiceModel.RequiresConnected (in file ArithmeticRules.cs). <span style="mso-spacerun: yes">&#160;</span>A rule method must reach all the way to an exit point without violating any Condition class constraints in order for any step(s) to be produced. Otherwise that rule execution is completely discarded during exploration and no step is produced outgoing from the current state by that rule. </p>  <p></p>  <p class="MsoNormal">In the same model rule set, the rule for the Divide action shows how a special condition, often an exception, can be converted into the expectation of a following event. Spec Explorer actions are indivisible which means they cannot suddenly be stopped and switched to another one. But at model evaluation time, the new state can reflect that a condition has occurred in the prior step (from a prior rule firing). In this case, the rule for OperationError will pick up on that fact that previously Divide had found and marked that the denominator was zero. A quick look at the configuration called Operation in Cord shows that the OperationError action is to be treated as an event. This is the only place to find out that the OperationError rule described an event, as it does not matter to the rule itself whether it is an input or output action to the SUT. Rather, the rule just knows under what conditions that the step can be seen externally to the SUT.<span style="mso-spacerun: yes">&#160; </span>It does matter, of course, to exploration and test code generation both of which will treat the event appropriately (which is why the Cord code tells them). </p>  <p></p>  <p class="MsoNormal">The actual implementation of the OperationError event can be found in CalculatorService (in file Calculator.cs). Notice it requires an instance of the correct name (OperationError) of a correct kind of delegate type. In this case it happens to be called OperationErrorHandler, but the type name may be chosen at will. The event is actually raised in this sample by helper method CalculatorService.RaiseError which is a callback used by the calculator object if it encounters a problem with divide by zero. The event will be placed on Spec Explorer's run time event queue for future consideration and the Divide action will run to completion, returning a zero value if a problem occurred as tested by scenario DividebyZero in Cord. When the model indicated the event would be eligible for consideration the queue will be examined and in the two cases of the ZeroDivide scenario it will be found. The third case does not look for the event and shows that a test may conclude successfully in an accepting state even if there are events left on the event queue. </p>  <p></p>  <p class="MsoNormal">Part of the moral of this story is that controllable actions (that is, inputs to the SUT) in the implementation are simple methods, but observable actions <span style="mso-spacerun: yes">&#160;</span>(that is, events) are implemented quite differently (as described above). <span style="mso-spacerun: yes">&#160;</span>Whereas in the rules, such actions are indistinguishable. <span style="mso-spacerun: yes">&#160;</span>And only in Cord, as the bridge in between, does Spec Explorer learn which is supposed to be which. </p>]]></content:encoded>
    </item>
    <item>
      <title>Actions, Step and Rules</title>
      <link>https://docs.microsoft.com/archive/blogs/specexplorer/actions-step-and-rules</link>
      <pubDate>Wed, 21 Apr 2010 18:33:27 GMT</pubDate>
      <dc:creator><![CDATA[Rob DuWors]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/specexplorer/2010/04/21/actions-step-and-rules/</guid>
      <description><![CDATA[These are key concepts in Spec Explorer. Unfortunately sometimes they are used almost...]]></description>
      <content:encoded><![CDATA[<p>These are key concepts in Spec Explorer. Unfortunately sometimes they are used almost interchangeably. For now, let's clear up what they are and how they differ. To be fair, our documentation does a good job of using the correct terms but even so it pays to keep in mind their particular meaning. </p>  <h2>Actions </h2>  <p>In the most general notion, an action describes an interaction with the System Under Test (SUT) as seen from the tester's (or test system's) perspective. Spec Explorer recognizes three kinds of atomic actions that are discrete and indivisible: events, call actions, and return actions. Events represent autonomous messages coming from the SUT. A call action represents a stimulus from the test system to the SUT (as originally decided in the model). A return action must always follow after a call action without any intervening actions. The return actions capture the response (if any) from the SUT. </p>  <p>For further reference see <a href="https://msdn.microsoft.com/en-us/library/ee620493(v=SpecExplorer.10).aspx">Actions</a> in the on-line documentation. </p>  <h2>Action Declarations </h2>  <p>Actions are declared in Cord configs using definitions that are like C# signatures preceded by the keyword &quot;action&quot;. Cord expects the target SUT assemblies, or the adapter assemblies that wrap access to the SUT, to provide the .Net code that corresponds to each action. Put another way, the code to implement actions ultimately belongs not to the model but rather to the implementation to be invoked at test run time only. </p>  <p>An action declaration in Cord is always one of two kinds: a synchronous action declaration, which is the default, or an explicitly stated event action declaration. A synchronous action declaration actually forms the indivisible pair of an atomic call action followed by the corresponding atomic return action. The target of a call/return pair is implemented by a single method in the SUT, or the adapter to the SUT. Tests generated from Spec Explorer models invoke these methods on the SUT, and block waiting for them to return. </p>  <p>Event action declarations describe a single atomic action that indicates the SUT has sent a message on its own in keeping with the .Net event model. Events are implemented as standard C# events in the SUT (or adapter). Tests generated from Spec Explorer models subscribe to these events and add them to a queue as they arrive. Events from this queue are consumed when the test reaches a point where one or more events are expected. </p>  <h2>Action Invocations </h2>  <p>In Cord the use of an action in a behavioral (regular) expression is called an invocation, e.g. Add(1,2)/3.&#160; The arguments of an invocation can be variables or literals. Action invocation arguments, if specified, must always match in type and position with the signature provided by the action declaration in the applicable Cord config. Cord allows for polymorphic overloading of action declarations and Spec Explorer will chose the correct action declaration accordingly. </p>  <p>Note: action invocations do not directly call the implementation because they belong to the modeling. The implementation only becomes available at test execution time. Action invocations are also used to annotate rules, which are the other major part of modeling. </p>  <p>For further reference see <a href="https://msdn.microsoft.com/en-us/library/ee620463(v=SpecExplorer.10).aspx">Invocation</a> in the on-line documentation. </p>  <h2>Steps </h2>  <p>Steps are the transitions in the graph. Step labels are action invocations that appear as transition (edge) labels in the exploration result graph. </p>  <p>At test run time, these step labels are translated into either method calls to the SUT (or adapter) that implement the call/return pair, or expected events. For call/return pairs, the generated test code will call the implementation (or adapter) method (call action step). The test code then will note the response with the actual out and result values given by the SUT (return action step). For events coming from the SUT (or adapter), all parameters will be considered as outputs. The actual values found at run time (for out parameters, results and event parameters) will be compared to the expected values from the model (&quot;the oracle&quot;). Only if these values meet all corresponding conditions will the test case succeed. </p>  <p>Like all behavioral modeling, Spec Explorer is ultimately interested in what can actually be seen in terms of inputs and outputs to the System Under Test (SUT), i.e. the actions. Everything else in Spec Explorer exists just to determine the legal sequence of steps (behavior) that a compliant SUT will be expected to follow in a test case. Even Spec Explorer's advanced notion of &quot;state&quot; is used only at modeling (exploration) time by a rule (see below) to determine if a particular step label would be permitted at that point in the sequence, but state does not partake in the actual test execution. Only step labels interpreted as invocations to the SUT (or adapter) and events are relevant to testing, as just described above. </p>  <h2>Rules </h2>  <p>Rules determine what steps can be produced leading from the current state in the model program. All rules are tried out by exploration from each state. </p>  <p>In Spec Explorer, rules are represented by model program methods that have been marked with the Rule attribute. The Rule attribute has an optional Action argument that specifies the action invocation. </p>  <p>Since rules exist to specify what steps the model program allows from a given state, the true output of a rule is zero or more step labels representing possible next actions from that state. Because of advanced features in Spec Explorer such as domains and parameter generation, it quite possible for a single rule to yield multiple instances of step labels for a given state. Of course a particular rule method always produces the same kind of step label in keeping with the Cord action declaration that matches the action invocation of its Rule attribute, but each step label will have a different combination of parameter values. </p>  <p>When a rule method is explored in order to generate step<span style="text-decoration: line-through"> </span>labels, the action invocation contained in its Rule attribute is used to map the exploration supplied input values to the rule method and to map back out/result values after the rule method has executed (as discussed below). A step label that cannot be produced by a rule due to violating a constraint in a Condition class method (e.g., Condition.Istrue) is simply discarded and will not appear in the exploration graph. </p>  <p>The action invocation in the Rule attribute is used to establish the correspondence between the Cord action declaration signature and the potentially different rule method signature in a way that is quite unique to Spec Explorer: </p>  <ol>   <li>The name of the action invocation annotating a rule does not need to match the name of the rule method. It must however match the name of an action declaration in the Cord config that the model program is constructed from (e.g. &quot;construct model from MyConfig&quot;).</li>    <li>Remember that action invocation arguments must always match in position and type compatibility with the corresponding action declaration signature in Cord. </li>    <li>If an action invocation argument is a literal value (for example, a number) it is not mapped at all to the rule method parameters! The rule method may simply assume what it wants when the action invocation parameter has that value without having to explicitly test for it. </li>    <li>If an action invocation argument is a variable rather than a literal value, it is mapped by name only, not by position, to the corresponding rule method parameter. If no such mapping is possible a validation error occurs. The type of the rule method parameter must agree with the corresponding type in the Cord definition. This includes the special names that can be used as action invocation arguments: &quot;this&quot; (represents the receiver of an instance-based rule method) and &quot;result&quot; (represents the return value of a non-void rule method). Note that the apparent return value of a C# rule method simply maps to the &quot;result&quot; output parameter. </li>    <li>     <div>All parameters of a rule method must appear in the action invocation annotating it. If one or more of the rule parameters do not appear in the corresponding action invocation, a validation error will result. This includes the special parameters &quot;this&quot; (for instance-based rules) and &quot;result&quot; (for non-void rules). For Example, </div>      <p style="margin-left: 18pt">In Cord: </p>      <p style="margin-left: 58pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: blue">action</span> <span style="color: blue">abstract</span> Sum(<span style="color: blue">int</span> x); </span></p>      <p style="margin-left: 58pt">&#160;</p>      <p style="margin-left: 18pt">In Model Program: </p>      <p style="margin-left: 58pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: blue">static</span> <span style="color: blue">int</span> stateTotal; </span></p>      <p style="margin-left: 27pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="font-family: consolas; font-size: 9pt">[<span style="color: #2b91af">Rule</span>(Action = <span style="color: #a31515">&quot;this.Sum(op) / result&quot;</span>)] </span></p>      <p style="margin-left: 36pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: blue">&#160;&#160; int</span> AddtoTotal(<span style="color: blue">int</span> op) { </span></p>      <p style="margin-left: 36pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: blue">&#160;&#160; return</span> stateTotal += op;} </span></p>   </li>    <li>If the Action keyword is not specified in the rule annotation (e.g. &quot;[Rule]&quot;), Spec Explorer will automatically construct an invocation based on the rule method signature. The method name of the rule will be used as the action name (which must then match an action declaration in the corresponding Cord config), and the method's parameter names will be used as the action invocation parameters. For example, if the method signature is &quot;<span style="font-family: consolas; font-size: 9pt"><span style="color: blue">int</span> MyMethod(<span style="color: blue">string</span> name, <span style="color: blue">float</span> age)</span>&quot;, the constructed action invocation will be &quot;<span style="font-family: consolas; font-size: 9pt">Action = <span style="color: #a31515">&quot;this.MyMethod(name,age)/result&quot;</span></span>. </li> </ol>  <p>Summary: The action invocation in the Rule attribute must match in type and position (but not necessarily in name) the signature of the Cord action declaration. Rule method parameters must match the action invocation in the Rule attribute in name and type, but not necessarily position. </p>  <h2>An Example </h2>  <blockquote>   <p>&#160; <span style="color: #4f81bd"><strong>Action Declaration in Cord: </strong></span></p> </blockquote>  <p></p>  <p style="margin-left: 36pt"><span style="font-family: consolas; color: blue; font-size: 9pt">action</span><span style="font-family: courier new"> </span><span style="font-family: consolas; color: blue; font-size: 9pt">abstract</span><span style="font-family: courier new"> </span><span style="font-family: consolas; color: blue; font-size: 9pt">static</span><span style="font-family: courier new">&#160;</span><span style="font-family: consolas; color: blue; font-size: 9pt">bool</span><span style="font-family: courier new"> </span><span style="font-family: consolas; font-size: 9pt">Login(<span style="color: blue">string</span></span><span style="font-family: courier new"> </span><span style="font-family: consolas; font-size: 9pt">user,<span style="color: blue">int</span></span><span style="font-family: courier new"> </span><span style="font-family: consolas; font-size: 9pt">securityLevel);</span><span style="font-family: courier new">&#160;</span>&#160;</p>  <p style="margin-left: 36pt"><span style="color: #4f81bd"><strong>Rules in the Model Program </strong></span></p>  <ol style="margin-left: 72pt">   <li>The rule for a power user at security level 1 to login successfully (if unknown user, the rule itself fails, i.e. the action label will not be produced). </li>    <li>The rule for a power user at security level 1 to login unsuccessfully (if unknown user, the rule fails). </li>    <li>The rule for a normal user at any other security level allows login only if the user is already known and legal security levels also must be a positive integer value. </li> </ol>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: blue">public</span> <span style="color: blue">static</span> <span style="color: blue">class</span> <span style="color: #2b91af">MyModel</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">{ </span></p>  <p style="margin-left: 54pt">&#160;&#160;&#160; <span style="font-family: consolas; font-size: 9pt"><span style="color: blue">static</span> <span style="color: blue">bool</span> loggedIn; <span style="color: green">// State variable for Login status</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: blue">&#160; static</span> <span style="color: blue">string</span> userName; <span style="color: green">// current user id with prefix</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: blue">&#160; static</span> <span style="color: blue">int</span> securityRing; <span style="color: green">// current security level</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: blue">&#160; static</span> <span style="color: #2b91af">Set</span>&lt;<span style="color: blue">string</span>&gt; PowerUsers; <span style="color: green">// Level 1 people (initialized elsewhere)</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: blue">&#160; static</span> <span style="color: #2b91af">Set</span>&lt;<span style="color: blue">string</span>&gt; NormalUsers;<span style="color: green">// Normal users (initialized elsewhere)</span> </span></p>  <p style="margin-left: 54pt">&#160;</p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: green">// Rule for successful login at security level 1</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">[<span style="color: #2b91af">Rule</span>(Action=<span style="color: #a31515">&quot;Login(userId, 1) / true&quot;</span>)]&#160;&#160;&#160;&#160; </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: blue">static</span> <span style="color: blue">void</span> LoginLevel1Worked(<span style="color: blue">string</span> userId) </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">{ </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: #2b91af">&#160; Condition</span>.IsTrue(PowerUsers.Contains(userId)); <span style="color: green">//Unknown-step fails</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">&#160; userName=<span style="color: #a31515">&quot;P.&quot;</span>+userId; <span style="color: green">// Step possible; add Power User Prefix</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">&#160; securityRing=1;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: green">// Assumed due to Action label</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">&#160; loggedIn=<span style="color: blue">true</span>;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: green">// Already know this login is good</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: green">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // result==true assumed due to Action label</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">} </span></p>  <p style="margin-left: 54pt">&#160;</p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: green">// Rule for failed login at security Level 1</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">[<span style="color: #2b91af">Rule</span>(Action=<span style="color: #a31515">&quot;Login(string userId, 1)/ false&quot;</span>)] </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: blue">static</span> <span style="color: blue">void</span> LoginLevel2Failed(<span style="color: blue">string</span> userId) </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">{ </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: #2b91af">&#160; Condition</span>.IsFalse(PowerUsers.Contains(userId)); <span style="color: green">//Unknown-step fails</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">&#160; loggedIn=<span style="color: blue">false</span>; <span style="color: green">// Still in rule; so assumed due to Action label</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">&#160; securityRing=0; <span style="color: green">// Logged out default state values</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">&#160; userName=<span style="color: #a31515">&quot;&quot;</span>; </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: green">// result==false assumed due to Action label </span></span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">} </span></p>  <p style="margin-left: 54pt">&#160;</p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: green">// Rule for login attempt at any level except security level 1</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">[<span style="color: #2b91af">Rule</span>(Action=<span style="color: #a31515">&quot;Login(userId, securityCode) / result&quot;</span>)] </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: blue">static</span> <span style="color: blue">bool</span> LoginNotLevel1(<span style="color: blue">string</span> userId, <span style="color: blue">int</span> securityCode) </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">{ </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: #2b91af">&#160; Condition</span>.IsTrue(securityCode &gt; 1); <span style="color: green">// Rule only for legal non-level 1</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: blue">&#160; if</span> (NormalUsers.Contains(userId)) <span style="color: green">// Step OK; check if user known</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">&#160; { </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">&#160; userName=<span style="color: #a31515">&quot;U.&quot;</span>+userId; <span style="color: green">// User known, so login succeeds</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">&#160; securityRing=securityCode; </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">&#160; loggedIn=<span style="color: blue">true</span>; </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">&#160; } </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: blue">&#160; else</span> <span style="color: green">// User unknown, so login fails</span> </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">{&#160;&#160;&#160;&#160; </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">&#160; loggedIn=<span style="color: blue">false</span>; </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">&#160; securityRing=0; </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">&#160; userName=<span style="color: #a31515">&quot;&quot;</span>; </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">&#160; } </span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"><span style="color: blue">&#160; return</span> loggedIn; <span style="color: green">// result == returned value</span></span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt">}</span></p>  <p style="margin-left: 54pt"><span style="font-family: consolas; font-size: 9pt"></span><span style="font-family: consolas; font-size: 9pt">}</span></p>  <p>&#160;</p>  <p>Rob DuWors </p>]]></content:encoded>
    </item>
    <item>
      <title>Spec Explorer 2010, Release 3.2 Now Available!</title>
      <link>https://docs.microsoft.com/archive/blogs/specexplorer/spec-explorer-2010-release-3-2-now-available</link>
      <pubDate>Mon, 19 Apr 2010 17:08:27 GMT</pubDate>
      <dc:creator><![CDATA[Rob DuWors]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/specexplorer/2010/04/19/spec-explorer-2010-release-3-2-now-available/</guid>
      <description><![CDATA[Spec Explorer 2010 Release 3.2  Hello!&#160; We are delighted to announce the newest version of Spec...]]></description>
      <content:encoded><![CDATA[<p><i>Spec Explorer 2010 Release 3.2</i></p>  <p>Hello!&#160; We are delighted to announce the newest version of Spec Explorer 2010, Release 3.2.</p>  <p>Spec Explorer 2010 Release 3.2 contains new and enhanced features, improved documentation, plus over 110 bug fixes. It runs on the Visual Studio 2010 Professional level product and above.</p>  <p><b>What’s New in Spec Explorer?</b></p>  <p>This release also contains new features including:</p>  <ul>   <li><b>New Model Wizard:</b> The new Model Wizard conveniently consolidates solution and project creation by unifying the previously separate Spec Explorer Model Project and Spec Explorer Base Solution templates.       <p></p>   </li>    <li><b>Choice API:</b> The new Choice feature has been added to assist support where the System Under Test may provide one of several compliant responses to a single action. While Spec Explorer previously supported such non-determinism the new feature makes it simpler to model.       <p></p>   </li>    <li><b>SpecExplorer.exe:</b> The automation version of Spec Explorer has been updated to support the newest standard format for exploration results and to provide better automation support for custom-written post processor extensions.       <p></p>   </li>    <li><b>Improved Documentation:</b> While continuing to improve the overall quality of the Spec Explorer documentation the description of the Cord Scripting Language has been extensively revised in particular, and every page of the documentation now has a version header to clearly indicate the version of Spec Explorer that the documentation describes. </li> </ul>  <p><b>Where can you get it?</b></p>  <ul>   <li>The Spec Explorer downloads can be found on the Spec Explorer <a href="https://msdn.microsoft.com/en-us/devlabs/ee692301.aspx">home page</a> on DevLabs.       <p></p>   </li>    <li>See the on-line <a href="https://go.microsoft.com/fwlink/?LinkID=166135">Release Notes</a> for the latest, more detailed description of installation requirements, major features, bug fixes and known issues. Further information can also be found on <a href="https://social.msdn.microsoft.com/Forums/en-US/specexplorer/threads">The Spec Explorer Forum</a>, <a href="https://blogs.msdn.com/SpecExplorer">The Spec Explorer Team Blog</a>, and the latest Spec Explorer <a href="https://msdn.microsoft.com/en-us/library/ee620411.aspx">Help Documentation</a> is always available in the MSDN library.       <p></p>   </li>    <li>Please note that Spec Explorer 2010 Release 3.2 now runs only on the released version of Visual Studio 2010. It does not work with Beta 1 or 2 or the Release Candidate versions of Visual Studio 2010, nor with Visual Studio 2008. The 90 day trial version of Visual Studio 2010 can be found at <a href="https://www.microsoft.com/visualstudio/en-us/download" target="_blank">here</a>. </li> </ul>  <p></p>  <p>We hope you enjoy this release and look forward to hearing feedback from the Spec Explorer community.</p>  <p>The Spec Explorer Team</p>]]></content:encoded>
    </item>
    <item>
      <title>Effective Model-Based Testing with Spec Explorer Full Class</title>
      <link>https://docs.microsoft.com/archive/blogs/specexplorer/effective-model-based-testing-with-spec-explorer-full-class</link>
      <pubDate>Wed, 31 Mar 2010 11:51:50 GMT</pubDate>
      <dc:creator><![CDATA[Nico Kicillof - Microsoft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/specexplorer/2010/03/31/effective-model-based-testing-with-spec-explorer-full-class/</guid>
      <description><![CDATA[The full video series for the modeling class is available on Channel 9! It’s the recording of a...]]></description>
      <content:encoded><![CDATA[<p>The <a href="https://channel9.msdn.com/tags/SpecExplorerClass" target="_blank">full video series</a> for the modeling class is available on Channel 9! It’s the recording of a two-half-day course Wolfgang and I gave on the Microsoft Redmond campus.</p>  <p>The training is long (about 8 hours), but we have split it for your viewing convenience into 4 lectures (sessions). Each session has in turn 4 parts. </p>  <div align="center">   <table border="0" cellspacing="0" cellpadding="2" width="424" align="center"><tbody>       <tr>         <td width="247">           <p><a href="https://channel9.msdn.com/tags/SpecExplorerClassSession1/" target="_blank">Session 1</a></p>            <p><a href="https://channel9.msdn.com/tags/SpecExplorerClassSession2/" target="_blank">Session 2</a></p>            <p><a href="https://channel9.msdn.com/tags/SpecExplorerClassSession3/" target="_blank">Session 3</a></p>            <p><a href="https://channel9.msdn.com/tags/SpecExplorerClassSession4/" target="_blank">Session 4</a></p>         </td>          <td valign="top" width="175"><object id="ctl00_mainContentContainer_ctl02_SVP_Player_cea3f88b_35ce_45ef_896e_a5f0c92de5bb" data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="340px;" height="340px;"><param name="source" value="https://i3.msdn.microsoft.com/platform/controls/silverlightsupport/Microsoft.Mtps.Silverlight.App.VideoPlayer-bn20100217.xap"></param><param name="initParams" value="ApplicationName=SingleVideoPlayerControl_bafb0c80_10a9_4e31_84d7_9d22874ae908,VideoUri=https://ecn.channel9.msdn.com/o9/ch9/6/7/1/0/4/5/SpecExplorerClassSession1Part1_ch9.wmv,ThumbUri=https://ecn.channel9.msdn.com/o9/ch9/6/7/1/0/4/5/SpecExplorerClassSession1Part1_320_ch9.png,EmbedEnabled=false,EmbedXapUri=https://msdn.microsoft.com/objectforward/default.aspx,EmbedCssWidth=400,EmbedCssHeight=320,StartMode=AutoLoad,Persistence=None,Title=,Texts=NormalSize=Default Size;FullBrowser=Full Browser Size;FullScreen=Full Screen Size,HideFullBrowser=True,Bn=20100217,FontMappings=Segoe UI:Segoe UI;1,FontsToLoad=https://i3.msdn.microsoft.com/platform/controls/silverlightsupport/Microsoft.Mtps.Silverlight.Fonts.SegoeUI-bn20100217.xap;Segoe UI#Segoe UI,OmnitureParameters=,HighlightColor=#FF27aee4,LoadingColor=#FF27aee4,GetUri=https://msdn.microsoft.com/platform/controls/SilverlightSupport/VideoCaptionService.asmx,MSNVideoUUID=,PTID="></param><param name="windowless" value="false"></param><param name="background" value="#00FFFFFF"></param><param name="minRuntimeVersion" value="3.0.40624.0"></param><param name="autoUpgrade" value="false"></param><param name="enableHtmlAccess" value="true"></param><div id="ctl00_mainContentContainer_ctl02_ctl08" class="Mtps_SVP_NoSilverLight"> 			<a id="ctl00_mainContentContainer_ctl02_ctl09" title="Get Microsoft Silverlight!" href="https://go.microsoft.com/fwlink/?LinkID=124807" onclick="javascript:Track('ctl00_mainContentContainer_ctl02_ctl08|ctl00_mainContentContainer_ctl02_ctl09',this);"> <img border="0" src="https://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight!" /> </a> 		</div></object></td>       </tr>     </tbody></table> </div>  <p></p>  <p><a href="https://channel9.msdn.com/tags/SpecExplorerClassSession4/" target="_blank"></a></p> Enjoy!   <p></p>  <p><strong>Caveat</strong>: The quality of the screen captures makes them hard to read. These videos will be replaced with new ones recorded with a better quality in the future. Please, forgive any inconvenience this might cause you.</p>]]></content:encoded>
    </item>
    <item>
      <title>Announcing Spec Explorer 2010, Release 3.1!</title>
      <link>https://docs.microsoft.com/archive/blogs/specexplorer/announcing-spec-explorer-2010-release-3-1</link>
      <pubDate>Mon, 15 Feb 2010 21:38:00 GMT</pubDate>
      <dc:creator><![CDATA[Rob DuWors]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/specexplorer/2010/02/15/announcing-spec-explorer-2010-release-3-1/</guid>
      <description><![CDATA[&#160;                          &#160;                 Spec Explorer 2010...]]></description>
      <content:encoded><![CDATA[<span style="font-family: &#39;Calibri&#39;,&#39;sans-serif&#39;"><font size="3">     <p>       <p style="margin: 0in 0in 0pt" class="MsoNormal">         <p>&#160;</p>       </p>        <p style="margin: 0in 0in 0pt" class="MsoNormal"><span style="color: #1f497d; mso-themecolor: dark2; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-bidi">           <p>&#160;</p>         </span></p>        <p style="text-align: center; margin: 0in 0in 16pt" class="MsoNormal" align="center"><i><span style="font-size: 26pt">Spec Explorer 2010 Release 3.1</span></i></p>        <p style="text-align: center; margin: 0in 0in 16pt" class="MsoNormal" align="center"><i><span style="font-size: 26pt"><font color="#ff0000"><strong>Note: Now obsolete. Please use</strong></font> <a href="https://blogs.msdn.com/specexplorer/archive/2010/04/19/spec-explorer-2010-release-3-2-now-available.aspx" target="_blank">Release 3.2</a>.</span></i></p>        <p style="margin: 0in 0in 0pt" class="MsoNormal">Greetings!&#160; Today we are proud to announce of the newest version of Spec Explorer 2010, Release 3.1.         <p></p>       </p>        <p style="margin: 0in 0in 0pt" class="MsoNormal">         <p>&#160;</p>       </p>        <p style="margin: 0in 0in 0pt" class="MsoNormal">Running only on Visual Studio 2010 Release Candidate (RC), Spec Explorer 2010 Release 3.1 contains major enhancements, new features, and over 220 bug fixes.          <p></p>       </p>        <p style="margin: 16pt 0in 6pt" class="MsoNormal"><b><span style="font-size: 14pt">What’s New in Spec Explorer?             <p></p>           </span></b></p>        <p style="margin: 0in 0in 0pt" class="MsoNormal">Please note that core modeling attributes and classes have been renamed and revised to make them more consistent and clear. Spec Explorer users should be aware that the continued use of these deprecated items in this release will generate warning messages. Usage of the new attributes and classes is highly encouraged, as is migration of prior models and scripts from the older usage.         <p></p>       </p>        <p style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class="MsoNormal">This release also contains significant new features including:         <p></p>       </p>        <p style="line-height: 115%; text-indent: -0.25in; margin: 0in 0in 4pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraph"><span style="font-family: symbol; mso-bidi-font-family: symbol; mso-fareast-font-family: symbol"><span style="mso-list: ignore">·<span style="font: 7pt &#39;Times New Roman&#39;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><b>Flexible test naming and attributes:</b> New and revised switches allow finer control over test case naming and attributes including the ability to construct switch values using system environment variables and newly provided Spec Explorer built-in variables.          <p></p>       </p>        <p style="line-height: 115%; text-indent: -0.25in; margin: 0in 0in 4pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraph"><span style="font-family: symbol; mso-bidi-font-family: symbol; mso-fareast-font-family: symbol"><span style="mso-list: ignore">·<span style="font: 7pt &#39;Times New Roman&#39;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><b>Bounded repetition machine:</b> Cord now supports additional ways to specify a repeating behavior for a specific number of times or a range of repetitions.          <p></p>       </p>        <p style="line-height: 115%; text-indent: -0.25in; margin: 0in 0in 4pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraph"><span style="font-family: symbol; mso-bidi-font-family: symbol; mso-fareast-font-family: symbol"><span style="mso-list: ignore">·<span style="font: 7pt &#39;Times New Roman&#39;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><b>New project creation:</b> The Spec Explorer model project template can now be used to create a new project within an existing or a new solution whereas only solutions could be created before.          <p></p>       </p>        <p style="line-height: 115%; text-indent: -0.25in; margin: 0in 0in 4pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraph"><span style="font-family: symbol; mso-bidi-font-family: symbol; mso-fareast-font-family: symbol"><span style="mso-list: ignore">·<span style="font: 7pt &#39;Times New Roman&#39;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><b>Construct tag and switch completion:</b> Cord now supports automatic completion of tags in the Construct statement and for switch names.          <p></p>       </p>        <p style="line-height: 115%; text-indent: -0.25in; margin: 0in 0in 4pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraph"><span style="font-family: symbol; mso-bidi-font-family: symbol; mso-fareast-font-family: symbol"><span style="mso-list: ignore">·<span style="font: 7pt &#39;Times New Roman&#39;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><b>F1 help:</b> the built-in Help Viewer of Visual Studio 2010 will display top level information for each type of window in Spec Explorer using the F1 key.          <p></p>       </p>        <p style="line-height: 115%; text-indent: -0.25in; margin: 0in 0in 4pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraph"><span style="font-family: symbol; mso-bidi-font-family: symbol; mso-fareast-font-family: symbol"><span style="mso-list: ignore">·<span style="font: 7pt &#39;Times New Roman&#39;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><b>Help integration:</b> Spec Explorer documentation is now fully integrated with the Help Manager to support both online MSDN Library viewing of help information and locally stored help content. The Help Manager can also be used to update the local copy of help documentation.          <p></p>       </p>        <p style="line-height: 115%; text-indent: -0.25in; margin: 0in 0in 4pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraph"><span style="font-family: symbol; mso-bidi-font-family: symbol; mso-fareast-font-family: symbol"><span style="mso-list: ignore">·<span style="font: 7pt &#39;Times New Roman&#39;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><b>Exploration progress:</b> Spec Explorer provides updated status to give a better indication of the progress being made during lengthy explorations and related algorithms.          <p></p>       </p>        <p style="line-height: 115%; text-indent: -0.25in; margin: 0in 0in 4pt 0.5in; mso-list: l0 level1 lfo2" class="MsoListParagraph"><span style="font-family: symbol; mso-bidi-font-family: symbol; mso-fareast-font-family: symbol"><span style="mso-list: ignore">·<span style="font: 7pt &#39;Times New Roman&#39;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><b>User-customized post processing:</b> User-defined post-exploration processing task can now be launched from within Visual Studio to generate additional artifacts.          <p></p>       </p>        <p style="margin: 16pt 0in 0pt" class="MsoNormal"><b><span style="font-size: 14pt">Where can you get it?             <p></p>           </span></b></p>        <p style="margin: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class="MsoListBulletCxSpFirst"><span style="font-family: symbol; mso-bidi-font-family: symbol; mso-fareast-font-family: symbol"><span style="mso-list: ignore">·<span style="font: 7pt &#39;Times New Roman&#39;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span>The Spec Explorer downloads can be found on the Spec Explorer <a href="https://msdn.microsoft.com/en-us/devlabs/ee692301.aspx" mce_href="https://msdn.microsoft.com/en-us/devlabs/ee692301.aspx"><span style="color: windowtext">home page</span></a> on DevLabs          <p></p>       </p>        <p style="margin: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class="MsoListBulletCxSpMiddle"><span style="font-family: symbol; font-size: 12pt; mso-bidi-font-family: symbol; mso-fareast-font-family: symbol"><span style="mso-list: ignore">·<span style="font: 7pt &#39;Times New Roman&#39;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span>See the on-line <a href="https://go.microsoft.com/fwlink/?LinkID=166135" mce_href="https://go.microsoft.com/fwlink/?LinkID=166135"><span style="color: windowtext">Release Notes</span></a> for the latest, more detailed description of installation requirements, major features, bug fixes and known issues<span style="font-family: wingdings; font-size: 12pt">           <p></p>         </span></p>        <p style="margin: 0in 0in 2pt 0.5in; mso-list: l1 level1 lfo1" class="MsoListBulletCxSpLast"><span style="font-family: symbol; font-size: 12pt; mso-bidi-font-family: symbol; mso-fareast-font-family: symbol"><span style="mso-list: ignore">·<span style="font: 7pt &#39;Times New Roman&#39;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span>Further information can also be found on <a href="https://social.msdn.microsoft.com/Forums/en-US/specexplorer/threads" mce_href="https://social.msdn.microsoft.com/Forums/en-US/specexplorer/threads"><span style="color: windowtext">The Spec Explorer Forum</span></a>, <a href="https://blogs.msdn.com/SpecExplorer" mce_href="https://blogs.msdn.com/SpecExplorer"><span style="color: windowtext">The Spec Explorer Team Blog</span></a>, and the latest Spec Explorer <a href="https://msdn.microsoft.com/en-us/library/ee620411.aspx" mce_href="https://msdn.microsoft.com/en-us/library/ee620411.aspx"><span style="color: windowtext">Help Documentation</span></a> is always available for the MSDN library.<span style="font-family: wingdings; font-size: 12pt">           <p></p>         </span></p>        <p><span style="font-family: &#39;Calibri&#39;,&#39;sans-serif&#39;">We hope you enjoy this release,           <br />The Spec Explorer Team             <p></p>         </span></p>        <p style="text-align: center; margin: 0in 0in 16pt" class="MsoNormal" align="center"></p>     </p>   </font></span>]]></content:encoded>
    </item>
  </channel>
</rss>