Prism 6.0 User's Guide

Current Pset

The command syntax described in " Defining Psets" lets you apply a command to a specific pset. If you don't use this syntax, the command is applied to the current pset; current is a predefined pset name in Prism. In addition, many graphical actions in MP Prism apply only to the members of the current set.

When a program is first loaded, the current pset is the default pset, all.

You can change the current pset via the Psets window or from the command line.

pset foo

changes the current pset to foo.

You can also use the pset command with the pset-specification syntax described in " Defining Psets". For example,

pset 0:15:3

You cannot change the current pset to one that has no members. If you try to do so, nothing happens in the Psets window, and you get a message like this one in the history region of the command window:

Cannot set current pset to running -- it
is empty.

Finding Out the Current Pset

MP Prism provides many ways of finding out the current pset:


Note -

In giving examples of MP Prism commands, the (prism) prompt is used only when necessary to show the effect of a command.


To list the processes in the current pset, issue the show pset command without arguments:

(prism foo) show pset
pset 'current' is defined as 'foo'.
The set contains the following processes: 1,2.

The Psets window also displays the processes in the current pset.

Current Pset and Dynamic Psets

" Predefined Psets" described dynamic psets--predefined sets like running, stopped, and interrupted, whose contents Prism automatically updates during the execution of the program.

If you choose a dynamic pset to be the current pset, you create a static pset that consists of the processes that are members of the dynamic set at the time you issue the pset command (or otherwise choose it to be the current set). To make this clear, the (prism) prompt changes to list the processes that are members of this static set. For example, if processes 0, 1, and 13 are the only processes that are stopped, the pset command has this effect:

(prism all) pset stopped
(prism 0:1, 13)

Output of the show pset command is explicit under these circumstances:

(prism all) pset stopped
(prism 0:1. 13) show pset
The current set was created by evaluating the pset
'stopped' once at the time when it became the current set.
The set contains the following processes: 0:1, 13.

Issuing the pset command with no arguments displays the same information.

Note that the (prism) prompt can become quite long if there are many processes in a current pset derived from a dynamic pset. By default, the prompt length is limited to 25 characters. You can change this default by issuing the set command with the $prompt_length variable, specifying the maximum number of characters to appear in the pset part of the prompt. For example, this command shortens the prompt long_pset_name to long_pset:

(prism long_pset_name) set $prompt_length=9
(prism long_pset) 

Current Pset and Variable Psets

" Defining Psets" describes how to create variable psets--user-defined psets whose membership can change in the course of program execution. You use the eval pset command to update the membership of a variable pset. If you make a variable pset your current set, its membership is determined by the most recent eval pset command you have executed for the set. If you have not executed an eval pset command to update the set's membership, the membership continues to be what it was when you created the set.