4.22 Global situation

Proof status for the current component PO

Syntax

  gs
  gs (k)
  gs (o,e)
  gs (o,e,f)

with

Use

This command enables to select and display the proof status (proved, unproved) and the goal (without hypotheses) of proof obligations.

The o argument enables to select the proof obligations corresponding to the specified clause (if it is given), e identifies the proof obligations status, and at last, f their goal form.

The k argument enables to select all the proof obligations of the current component that are in the specified proof status, if k equals Proved or Unproved. If k has the Patt(g) form, all the proof obligations of the current component whose goal matches g are selected and if k is a clause name of the current component, all the proof obligations corresponding to that clause are selected.

By default, gs, gs(o,e) respectively represents gs(_all,_all,_all) and gs(o,e,_all).

If k equals Proved or Unproved, gs(k) means gs(_all,k,_all), if k has the Patt(g) form, gs(k) points out gs(_all,_all,(g)) and in all other cases, gs(k) means gs(k,_all,_all).

Example 1

For the following component, we can remark the presence of the (Initialisation clause and of the op0) operation. The goal form of each proof obligation is given at the end of the line.


 
PRI> gs  
State of all PO  
    Initialisation  
        PO1 Unproved xx = 3  
        PO2 Unproved {0|->TRUE}: NAT +-> BOOL  
        PO3 Unproved xx+1: INTEGER  
        PO4 Proved 0<=xx+1  
        PO5 Unproved xx+1<=2147483647  
    op0  
        PO1 Unproved zz+2: INTEGER  
        PO2 Unproved 0<=zz+2  
        PO3 Proved zz+2<=2147483647  
        PO4 Unproved zz+2 = 3  
End  
 


Example 2

Now let us select the proof obligations of operation op0:


 
PRI> gs(op0)  
State of All PO of operation op0  
        PO1 Unproved    zz+2: INTEGER  
        PO2 Unproved    0<=zz+2  
        PO3 Proved      zz+2<=2147483647  
        PO4 Unproved    zz+2 = 3  
End  
 


Example 3

We choose to display only the unproved proof obligations of operation op0:


 
PRI> gs(op0,Unproved)  
Unproved PO of operation op0  
        PO1 Unproved    zz+2: INTEGER  
        PO2 Unproved    0<=zz+2  
        PO4 Unproved    zz+2 = 3  
End  
 


Example 4

We are looking for the unproved proof obligations of the Initialisation clause whose goal matches {x} : y   →↦  BOOL:


 
PRI> gs(Initialisation,Unproved,({x}: y +-> BOOL))  
 
Unproved PO of operation Initialisation  
Matching with {x}: y +-> BOOL  
        PO2 Unproved    {0|->TRUE}: NAT +-> BOOL  
End  
 


Example 5

We are looking for proved proof obligations among all the proof obligations of current component:


 
PRI> gs(Proved)  
 
All Proved PO  
    Initialisation  
        PO4 Proved 0<=xx+1  
    op0  
        PO3 Proved zz+2<=2147483647  
End  
 


Example 6

We are looking for all the proof obligations of the current component whose goal matches the x = y formula:


 
PRI> gs(Patt(x = y))  
 
State of all PO  
Matching with x = y  
    Initialisation  
        PO1 Unproved xx = 3  
    op0  
        PO4 Unproved zz+2 = 3  
End