Accessing Proof Obligations
File Types
For each machine and each context there exists one of each of the following files:
- IPSFile (.bps): This file contains the statuses (IPSStatus) of the proof obligations.
- IPOFile (.bpo): This file contains the sequents (IPOSequent) of the proof obligations.
The Connection
An IPSFile, an IPOFile and an IMachineFile or IContextFile are connected through the name. For example machine m0 has IMachineFile m0.bum, IPSFile m0.bps and IPOFile m0.bpo. The name of each of these files is accessible via file.getBarName()
.
If one has any of these files, one get the others though the functions getMachineFile()
, getContextFile()
, getPSFile()
and getPOFile()
.
Accessing the sequents of an IPOFile
- All sequents of file:
IPOSequent[] sequents = file.getSequents()
- A specific sequent (e.g. INITIALISATION/inv1/INV) of file:
IPOSequent sequent = file.getSequent("INITIALISATION/inv1/INV")
Accessing the statuses of an IPSFile
- All statuses of file:
IPSStatus[] statuses = file.getStatuses()
- A specific status (e.g. INITIALISATION/inv1/INV) of file:
IPSStatus status = file.getStatus("INITIALISATION/inv1/INV")
Finding the corresponding status to a given sequent
- 1. Find the IPOFile that contains sequent:
IPOFile poFile = sequent.getAncestor(IPOFile.ELEMENT_TYPE);
- 2. Find the matching IPSFile:
IPSFile isFile = poFile.getPSFile();
- 3. Find the machting status:
IPSStatus status = psFile.getStatus(sequent.getElementName);
Finding the corresponding sequent to a given status is done basically the same way.
Accessing all proof obligations of a project
- All IPOFiles of project:
IPOFile[] pofiles = project.getChildrenOfType(IPOFile.ELEMENT_TYPE);
- All IPSFiles of project:
IPSFile[] psfiles = project.getChildrenOfType(IPSFile.ELEMENT_TYPE);
Accessing the proof obligations of a given machine or context
- 1. Find the machting IPOFile for machine (IMachineFile):
IPOFile poFile = machine.getPOFile();
- 2. Get all sequents: Accessing the sequents of an IPOFile
- 1. Find the machting IPSFile for machine:
IPSFile psFile = machine.getPSFile();
- 3. For each sequent access the status with the same name in the IPSFile: Accessing the statuses of an IPSFile
The sources of a proof obligations
The sources of a proof obligations describe where that proof obligation comes from (e.g. Invariants, Events).
They can be accessed from the IPOSequent: IPOSource[] sources = sequents[i].getSources();
An IPOSource can be an instance of IInvariant, ITheorem etc.
Finding all the proof obligations for a given Invariant
It is not possible to directly find the proof obligations for a given invariant or any other element. Instead check if the sources of the proof obligations contain the invariant.