Partager via


Combination.KeepUnexpanded Method

Indicates that Spec Explorer should not expand a set of values within the scope of the model program.

Namespace: Microsoft.Modeling
Assembly: Microsoft.Xrt.Runtime (in Microsoft.Xrt.Runtime.dll)

Usage

'Usage

Syntax

'Declaration
public static void KeepUnexpanded (
    params Object[] values
)

Parameters

  • values
    The value that Spec Explorer should exclude from expansion.

Example

The following example declares a number of actions in Cord script, and defines rules for these actions in a C# model program. When Spec Explorer generates a transition system for a model based on these actions, the sessionID parameter of the Connected event is kept symbolic, which in turn, keeps symbolic the sessionID state variable and the sessionID parameter of the Command action call.

action abstract static void Adapter.Connect();
action abstract event static void Adapter.Connected(int sessionID);
action abstract static void Adapter.Command(int sessionID, int commandID);
static int sessionID;

[Rule]
static void Connect() { }

[Rule]
static void Connected(int id)
{
    Combination.KeepUnexpanded(id);
    sessionID = id;
}

[Rule]
static void Command(int id, int commandID)
{
    Condition.IsTrue(id == sessionID);
}

Remarks

The KeepUnexpanded method indicates that Spec Explorer should keep a set of values symbolic. Spec Explorer does not expand a value that depends on any of the values that it is keeping symbolic.

To indicate that Spec Explorer should not expand a set of values within the scope of the enclosing method, use the ExcludeFromExpansion method.

If within the same model program, a value is included as a parameter to the KeepUnexpanded method and to the Expand method, then Spec Explorer does not expand the value.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Microsoft Windows 7, Microsoft Windows Vista, Microsoft Windows XP SP2 or later, Microsoft Windows Server 2008, Microsoft Windows Server 2003

Change History

See Also

Reference

Combination Class
Combination Members
Microsoft.Modeling Namespace
Combination.ExcludeFromExpansion Method
Combination.Expand Method

Other Resources

Parameter Expansion Points