Package: VdmSymbolTable

VdmSymbolTable

nameinstructionbranchcomplexitylinemethod
VdmSymbolTable()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
getABSOLUTE()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getAND()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getCARD()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getCHARDELIM()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getCLOSEQUOTE()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getCOMPOSITION()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getCONCATENATE()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getDEF()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getDINTER()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getDISTCONC()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getDIV()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getDIVIDE()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getDOM()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getDOMRESBY()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getDOMRESTO()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getDUNION()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getELEMS()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getEQUALS()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getEQUIV()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getEXISTS()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getEXISTS1()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getFLOOR()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getFORALL()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getGE()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getGT()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getHEAD()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getIMPLIES()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getINDS()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getINSET()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getINTER()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getINVERSE()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getIOTA()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getInstance()
M: 0 C: 8
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
getLAMBDA()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getLE()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getLEN()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getLT()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getMAPLET()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getMERGE()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getMINUS()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getMOD()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getMUNION()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getNE()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getNOTINSET()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getOPENQUOTE()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getOR()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getPLUS()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getPLUSPLUS()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getPOINT()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getPOWER()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getPRED()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getPSUBSET()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getRANGE()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getRANGERESBY()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getRANGERESTO()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getREM()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getRNG()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getSEP()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getSETDIFF()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getSTARSTAR()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getSTRINGDELIM()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getSUBSET()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getTAIL()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getTIMES()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getUNION()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
static {...}
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%

Coverage

1: /*
2: * #%~
3: * New Pretty Printer
4: * %%
5: * Copyright (C) 2008 - 2014 Overture
6: * %%
7: * This program is free software: you can redistribute it and/or modify
8: * it under the terms of the GNU General Public License as
9: * published by the Free Software Foundation, either version 3 of the
10: * License, or (at your option) any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public
18: * License along with this program. If not, see
19: * <http://www.gnu.org/licenses/gpl-3.0.html>.
20: * #~%
21: */
22: package org.overture.core.npp;
23:
24: /**
25: * The VdmNsTable Class provides a default VDM-based implementation of {@link ISymbolTable}. It provides attributes for all
26: * VDM language constructs needed to print out the Overture AST. <br>
27: * Pretty Printers for language extensions may subclass VdmNsTable and override methods as necessary
28: *
29: * @author ldc
30: */
31:
32: public class VdmSymbolTable implements ISymbolTable
33: {
34:
35:         // singleton instance
36:         private static VdmSymbolTable instance = null;
37:
38:         protected VdmSymbolTable()
39:         {
40:
41:         }
42:
43:         // create initial mapping of vdm elements and attributes
44:         public static VdmSymbolTable getInstance()
45:         {
46:•                if (instance == null)
47:                 {
48:                         instance = new VdmSymbolTable();
49:                 }
50:                 return instance;
51:         }
52:
53:         @Override
54:         public String getTAIL()
55:         {
56:                 return "tl";
57:         }
58:
59:         @Override
60:         public String getAND()
61:         {
62:                 return "and";
63:         }
64:
65:         @Override
66:         public String getOR()
67:         {
68:                 return "or";
69:         }
70:
71:         @Override
72:         public String getPLUS()
73:         {
74:                 return "+";
75:         }
76:
77:         @Override
78:         public String getMINUS()
79:         {
80:                 return "-";
81:         }
82:
83:         @Override
84:         public String getDIVIDE()
85:         {
86:                 return "/";
87:         }
88:
89:         @Override
90:         public String getTIMES()
91:         {
92:                 return "*";
93:         }
94:
95:         @Override
96:         public String getLT()
97:         {
98:                 return "<";
99:         }
100:
101:         @Override
102:         public String getLE()
103:         {
104:                 return "<=";
105:         }
106:
107:         @Override
108:         public String getGT()
109:         {
110:                 return ">";
111:         }
112:
113:         @Override
114:         public String getGE()
115:         {
116:                 return ">=";
117:         }
118:
119:         @Override
120:         public String getNE()
121:         {
122:                 return "<>";
123:         }
124:
125:         @Override
126:         public String getEQUALS()
127:         {
128:                 return "=";
129:         }
130:
131:         @Override
132:         public String getEQUIV()
133:         {
134:                 return "<=>";
135:         }
136:
137:         @Override
138:         public String getIMPLIES()
139:         {
140:                 return "=>";
141:         }
142:
143:         @Override
144:         public String getSETDIFF()
145:         {
146:                 return "\\";
147:         }
148:
149:         @Override
150:         public String getPLUSPLUS()
151:         {
152:                 return "++";
153:         }
154:
155:         @Override
156:         public String getSTARSTAR()
157:         {
158:                 return "**";
159:         }
160:
161:         @Override
162:         public String getCONCATENATE()
163:         {
164:                 return "^";
165:         }
166:
167:         @Override
168:         public String getMAPLET()
169:         {
170:                 return "|->";
171:         }
172:
173:         @Override
174:         public String getRANGE()
175:         {
176:                 return "...";
177:         }
178:
179:         @Override
180:         public String getDOMRESTO()
181:         {
182:                 return "<:";
183:         }
184:
185:         @Override
186:         public String getDOMRESBY()
187:         {
188:                 return "<-:";
189:         }
190:
191:         @Override
192:         public String getRANGERESTO()
193:         {
194:                 return ":>";
195:         }
196:
197:         @Override
198:         public String getRANGERESBY()
199:         {
200:                 return ":->";
201:         }
202:
203:         @Override
204:         public String getLAMBDA()
205:         {
206:                 return "lambda";
207:         }
208:
209:         @Override
210:         public String getIOTA()
211:         {
212:                 return "iota";
213:         }
214:
215:         @Override
216:         public String getEXISTS1()
217:         {
218:                 return "exists1";
219:         }
220:
221:         @Override
222:         public String getEXISTS()
223:         {
224:                 return "exists";
225:         }
226:
227:         @Override
228:         public String getPOINT()
229:         {
230:                 return ".";
231:         }
232:
233:         @Override
234:         public String getHEAD()
235:         {
236:                 return "hd";
237:         }
238:
239:         @Override
240:         public String getFORALL()
241:         {
242:                 return "forall";
243:         }
244:
245:         @Override
246:         public String getCOMPOSITION()
247:         {
248:                 return "comp";
249:         }
250:
251:         @Override
252:         public String getINDS()
253:         {
254:                 return "inds";
255:         }
256:
257:         @Override
258:         public String getDISTCONC()
259:         {
260:                 return "conc";
261:         }
262:
263:         @Override
264:         public String getDUNION()
265:         {
266:                 return "dunion";
267:         }
268:
269:         @Override
270:         public String getFLOOR()
271:         {
272:                 return "floor";
273:         }
274:
275:         @Override
276:         public String getMERGE()
277:         {
278:                 return "merge";
279:         }
280:
281:         @Override
282:         public String getDINTER()
283:         {
284:                 return "dinter";
285:         }
286:
287:         @Override
288:         public String getABSOLUTE()
289:         {
290:                 return "abs";
291:         }
292:
293:         @Override
294:         public String getELEMS()
295:         {
296:                 return "elems";
297:         }
298:
299:         @Override
300:         public String getRNG()
301:         {
302:                 return "rng";
303:         }
304:
305:         @Override
306:         public String getPOWER()
307:         {
308:                 return "power";
309:         }
310:
311:         @Override
312:         public String getLEN()
313:         {
314:                 return "len";
315:         }
316:
317:         @Override
318:         public String getDOM()
319:         {
320:                 return "dom";
321:         }
322:
323:         @Override
324:         public String getCARD()
325:         {
326:                 return "card";
327:         }
328:
329:         @Override
330:         public String getINVERSE()
331:         {
332:                 return "inverse";
333:         }
334:
335:         @Override
336:         public String getINTER()
337:         {
338:                 return "inter";
339:         }
340:
341:         @Override
342:         public String getUNION()
343:         {
344:                 return "union";
345:         }
346:
347:         @Override
348:         public String getMUNION()
349:         {
350:                 return "munion";
351:         }
352:
353:         @Override
354:         public String getREM()
355:         {
356:                 return "rem";
357:         }
358:
359:         @Override
360:         public String getMOD()
361:         {
362:                 return "mod";
363:         }
364:
365:         @Override
366:         public String getDIV()
367:         {
368:                 return "div";
369:         }
370:
371:         @Override
372:         public String getSUBSET()
373:         {
374:                 return "subset";
375:         }
376:
377:         @Override
378:         public String getPSUBSET()
379:         {
380:                 return "psubset";
381:         }
382:
383:         @Override
384:         public String getINSET()
385:         {
386:                 return "in set";
387:         }
388:
389:         @Override
390:         public String getNOTINSET()
391:         {
392:                 return "not in set";
393:         }
394:
395:         @Override
396:         public String getPRED()
397:         {
398:                 return "&";
399:         }
400:
401:         @Override
402:         public String getSEP()
403:         {
404:                 return ";";
405:         }
406:
407:         @Override
408:         public String getDEF()
409:         {
410:                 return "==";
411:         }
412:
413:         @Override
414:         public String getOPENQUOTE()
415:         {
416:                 return "<";
417:         }
418:
419:         @Override
420:         public String getCLOSEQUOTE()
421:         {
422:                 return ">";
423:         }
424:
425:         @Override
426:         public String getCHARDELIM()
427:         {
428:                 return "'";
429:         }
430:
431:         @Override
432:         public String getSTRINGDELIM()
433:         {
434:                 return "\"";
435:         }
436:
437: }