Accessing Proof Obligations

From Event-B
Revision as of 11:33, 16 September 2008 by imported>Maria (New page: ==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. *...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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 sequent

  • 1. Find the IPOFile that contains sequent: IPOFile ipoFile = sequent.getAncestor(IPOFile.ELEMENT_TYPE);
  • 2. Find the matching IPSFile: IPSFile ipsFile = ipoFile.getPSFile();
  • 3. Find the machting status: IPSStatus status = ipsFile.getStatus(sequent.getElementName);

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