Package: ProofObligationList

ProofObligationList

nameinstructionbranchcomplexitylinemethod
ProofObligationList()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
renumber()
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
renumber(int)
M: 0 C: 18
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
toString()
M: 50 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 12 C: 0
0%
M: 1 C: 0
0%
trivialCheck()
M: 1 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: *
3: *        Copyright (C) 2008 Fujitsu Services Ltd.
4: *
5: *        Author: Nick Battle
6: *
7: *        This file is part of VDMJ.
8: *
9: *        VDMJ is free software: you can redistribute it and/or modify
10: *        it under the terms of the GNU General Public License as published by
11: *        the Free Software Foundation, either version 3 of the License, or
12: *        (at your option) any later version.
13: *
14: *        VDMJ is distributed in the hope that it will be useful,
15: *        but WITHOUT ANY WARRANTY; without even the implied warranty of
16: *        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17: *        GNU General Public License for more details.
18: *
19: *        You should have received a copy of the GNU General Public License
20: *        along with VDMJ. If not, see <http://www.gnu.org/licenses/>.
21: *
22: ******************************************************************************/
23:
24: package org.overture.pog.obligation;
25:
26: import java.util.Vector;
27:
28: import org.overture.pog.pub.IProofObligation;
29: import org.overture.pog.pub.IProofObligationList;
30:
31: @SuppressWarnings("serial")
32: public class ProofObligationList extends Vector<IProofObligation> implements
33:                 IProofObligationList
34: {
35:         // Convenience class to hold lists of POs.
36:
37:         @Override
38:         public String toString()
39:         {
40:                 StringBuilder sb = new StringBuilder();
41:                 renumber();
42:
43:•                for (IProofObligation po : this)
44:                 {
45:                         sb.append("Proof Obligation ");
46:                         sb.append(po.getNumber());
47:                         sb.append(": (");
48:                         sb.append(po.getStatus());
49:                         sb.append(")\n");
50:                         sb.append(po);
51:                         sb.append("\n");
52:                 }
53:
54:                 return sb.toString();
55:         }
56:
57:         public void trivialCheck()
58:         {
59:
60:                 // don't have trivial proofs anymore
61:         }
62:
63:         public void renumber()
64:         {
65:                 renumber(1);
66:         }
67:
68:         public void renumber(int from)
69:         {
70:                 int n = from;
71:
72:•                for (IProofObligation po : this)
73:                 {
74:                         po.setNumber(n++);
75:                 }
76:         }
77: }