Package: NoPOGAnnotation

NoPOGAnnotation

nameinstructionbranchcomplexitylinemethod
NoPOGAnnotation()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
isBracketed()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
noArgs()
M: 13 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
poAfter(AModuleModules, IProofObligationList, IPOContextStack)
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
poAfter(PDefinition, IProofObligationList, IPOContextStack)
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
poAfter(PExp, IProofObligationList, IPOContextStack)
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
poAfter(PStm, IProofObligationList, IPOContextStack)
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
poAfter(SClassDefinition, IProofObligationList, IPOContextStack)
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
poBefore(AModuleModules, IPOContextStack)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
poBefore(PDefinition, IPOContextStack)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
poBefore(PExp, IPOContextStack)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
poBefore(PStm, IPOContextStack)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
poBefore(SClassDefinition, IPOContextStack)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
tcAfter(AModuleModules, TypeCheckInfo)
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%
tcAfter(PDefinition, TypeCheckInfo)
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%
tcAfter(PExp, TypeCheckInfo)
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%
tcAfter(PStm, TypeCheckInfo)
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%
tcAfter(SClassDefinition, TypeCheckInfo)
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%
tcBefore(AModuleModules, TypeCheckInfo)
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
tcBefore(PDefinition, TypeCheckInfo)
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
tcBefore(PExp, TypeCheckInfo)
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
tcBefore(PStm, TypeCheckInfo)
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
tcBefore(SClassDefinition, TypeCheckInfo)
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
typecheckArgs()
M: 2 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) 2019 Nick Battle.
4: *
5: *        Author: Nick Battle
6: *
7: *        This file is part of Overture
8: *
9: ******************************************************************************/
10:
11: package org.overture.annotations.provided;
12:
13: import org.overture.ast.definitions.PDefinition;
14: import org.overture.ast.definitions.SClassDefinition;
15: import org.overture.ast.expressions.PExp;
16: import org.overture.ast.modules.AModuleModules;
17: import org.overture.ast.statements.PStm;
18: import org.overture.parser.annotations.ASTAnnotationAdapter;
19: import org.overture.pog.annotations.POAnnotation;
20: import org.overture.pog.obligation.ProofObligationList;
21: import org.overture.pog.pub.IPOContextStack;
22: import org.overture.pog.pub.IProofObligationList;
23: import org.overture.typechecker.TypeCheckInfo;
24: import org.overture.typechecker.TypeChecker;
25: import org.overture.typechecker.annotations.TCAnnotation;
26:
27: public class NoPOGAnnotation extends ASTAnnotationAdapter implements TCAnnotation, POAnnotation
28: {
29:         public NoPOGAnnotation()
30:         {
31:                 super();
32:         }
33:         
34:         @Override
35:         public boolean typecheckArgs()
36:         {
37:                 return false;
38:         }
39:
40:         @Override
41:         public boolean isBracketed()
42:         {
43:                 return true;
44:         }
45:         
46:         /**
47:          * Type checker...
48:          */
49:
50:         @Override
51:         public void tcBefore(PDefinition node, TypeCheckInfo question)
52:         {
53:                 noArgs();
54:         }
55:
56:         @Override
57:         public void tcBefore(PExp node, TypeCheckInfo question)
58:         {
59:                 noArgs();
60:         }
61:
62:         @Override
63:         public void tcBefore(PStm node, TypeCheckInfo question)
64:         {
65:                 noArgs();
66:         }
67:
68:         @Override
69:         public void tcBefore(AModuleModules node, TypeCheckInfo question)
70:         {
71:                 noArgs();
72:         }
73:
74:         @Override
75:         public void tcBefore(SClassDefinition node, TypeCheckInfo question)
76:         {
77:                 noArgs();
78:         }
79:         
80:         private void noArgs()
81:         {
82:•                if (!ast.getArgs().isEmpty())
83:                 {
84:                         TypeChecker.report(6000, "@NoPOG has no arguments", ast.getName().getLocation());
85:                 }
86:         }
87:
88:         @Override
89:         public void tcAfter(PDefinition node, TypeCheckInfo question)
90:         {
91:                 // Nothing
92:         }
93:
94:         @Override
95:         public void tcAfter(PExp node, TypeCheckInfo question)
96:         {
97:                 // Nothing
98:         }
99:
100:         @Override
101:         public void tcAfter(PStm node, TypeCheckInfo question)
102:         {
103:                 // Nothing
104:         }
105:
106:         @Override
107:         public void tcAfter(AModuleModules node, TypeCheckInfo question)
108:         {
109:                 // Nothing
110:         }
111:
112:         @Override
113:         public void tcAfter(SClassDefinition node, TypeCheckInfo question)
114:         {
115:                 // Nothing
116:         }
117:         
118:         /**
119:          * POG...
120:          */
121:         
122:         @Override
123:         public IProofObligationList poBefore(PDefinition node, IPOContextStack question)
124:         {
125:                 return new ProofObligationList();
126:         }
127:
128:         @Override
129:         public void poAfter(PDefinition node, IProofObligationList list, IPOContextStack question)
130:         {
131:                 list.clear();
132:         }
133:         
134:         @Override
135:         public IProofObligationList poBefore(PExp node, IPOContextStack question)
136:         {
137:                 return new ProofObligationList();
138:         }
139:
140:         @Override
141:         public void poAfter(PExp node, IProofObligationList list, IPOContextStack question)
142:         {
143:                 list.clear();
144:         }
145:         
146:         @Override
147:         public IProofObligationList poBefore(PStm node, IPOContextStack question)
148:         {
149:                 return new ProofObligationList();
150:         }
151:
152:         @Override
153:         public void poAfter(PStm node, IProofObligationList list, IPOContextStack question)
154:         {
155:                 list.clear();
156:         }
157:         
158:         @Override
159:         public IProofObligationList poBefore(AModuleModules node, IPOContextStack question)
160:         {
161:                 return new ProofObligationList();
162:         }
163:
164:         @Override
165:         public void poAfter(AModuleModules node, IProofObligationList list, IPOContextStack question)
166:         {
167:                 list.clear();
168:         }
169:         
170:         @Override
171:         public IProofObligationList poBefore(SClassDefinition node, IPOContextStack question)
172:         {
173:                 return new ProofObligationList();
174:         }
175:
176:         @Override
177:         public void poAfter(SClassDefinition node, IProofObligationList list, IPOContextStack question)
178:         {
179:                 list.clear();
180:         }
181: }