Package: IRSettings

IRSettings

nameinstructionbranchcomplexitylinemethod
IRSettings()
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
addStateInvToModule()
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%
generateConc()
M: 0 C: 13
100%
M: 1 C: 5
83%
M: 1 C: 3
75%
M: 0 C: 1
100%
M: 0 C: 1
100%
generateInvariants()
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%
generatePostCondChecks()
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%
generatePostConds()
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%
generatePreCondChecks()
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%
generatePreConds()
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%
generateTraces()
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%
getCharSeqAsString()
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%
makePostCondsPublic()
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%
makePreCondsPublic()
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%
setAddStateInvToModule(boolean)
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%
setCharSeqAsString(boolean)
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%
setGenerateConc(boolean)
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%
setGenerateInvariants(boolean)
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%
setGeneratePostCondChecks(boolean)
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%
setGeneratePostConds(boolean)
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%
setGeneratePreCondChecks(boolean)
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%
setGeneratePreConds(boolean)
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%
setGenerateTraces(boolean)
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%
setMakePostCondsPublic(boolean)
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%
setMakePreCondsPublic(boolean)
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%

Coverage

1: /*
2: * #%~
3: * VDM Code Generator
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.codegen.ir;
23:
24: import org.overture.ast.lex.Dialect;
25: import org.overture.config.Settings;
26:
27: public class IRSettings
28: {
29:         private boolean charSeqAsString;
30:         private boolean generateConc;
31:
32:         private boolean generatePreConds;
33:         private boolean generatePreCondChecks;
34:         private boolean makePreCondsPublic;
35:
36:         private boolean generatePostConds;
37:         private boolean generatePostCondChecks;
38:         private boolean makePostCondsPublic;
39:
40:         private boolean generateTraces;
41:
42:         private boolean generateInvariantChecks;
43:         private boolean addStateInvToModule = true;
44:
45:         public IRSettings()
46:         {
47:         }
48:
49:         public boolean generateConc()
50:         {
51:•                return generateConc && (Settings.dialect == Dialect.VDM_PP
52:                                 || Settings.dialect == Dialect.VDM_RT);
53:         }
54:
55:         public void setGenerateConc(boolean generateConc)
56:         {
57:                 this.generateConc = generateConc;
58:         }
59:
60:         public boolean getCharSeqAsString()
61:         {
62:                 return charSeqAsString;
63:         }
64:
65:         public void setCharSeqAsString(boolean charSeqAsString)
66:         {
67:                 this.charSeqAsString = charSeqAsString;
68:         }
69:
70:         public boolean generatePreConds()
71:         {
72:                 return generatePreConds;
73:         }
74:
75:         public void setGeneratePreConds(boolean generatePreConds)
76:         {
77:                 this.generatePreConds = generatePreConds;
78:         }
79:
80:         public boolean generatePreCondChecks()
81:         {
82:                 return generatePreCondChecks;
83:         }
84:
85:         public void setGeneratePreCondChecks(boolean generatePreCondChecks)
86:         {
87:                 this.generatePreCondChecks = generatePreCondChecks;
88:         }
89:
90:         public boolean makePreCondsPublic()
91:         {
92:                 return makePreCondsPublic;
93:         }
94:
95:         public void setMakePreCondsPublic(boolean makePreCondsPublic)
96:         {
97:                 this.makePreCondsPublic = makePreCondsPublic;
98:         }
99:
100:         public boolean generatePostConds()
101:         {
102:                 return generatePostConds;
103:         }
104:
105:         public void setGeneratePostConds(boolean generatePostConds)
106:         {
107:                 this.generatePostConds = generatePostConds;
108:         }
109:
110:         public boolean generatePostCondChecks()
111:         {
112:                 return generatePostCondChecks;
113:         }
114:
115:         public void setGeneratePostCondChecks(boolean generatePostCondChecks)
116:         {
117:                 this.generatePostCondChecks = generatePostCondChecks;
118:         }
119:
120:         public boolean makePostCondsPublic()
121:         {
122:                 return makePostCondsPublic;
123:         }
124:
125:         public void setMakePostCondsPublic(boolean makePostCondsPublic)
126:         {
127:                 this.makePostCondsPublic = makePostCondsPublic;
128:         }
129:
130:         public boolean generateTraces()
131:         {
132:                 return generateTraces;
133:         }
134:
135:         public void setGenerateTraces(boolean generateTraces)
136:         {
137:                 this.generateTraces = generateTraces;
138:         }
139:
140:         public boolean generateInvariants()
141:         {
142:                 return generateInvariantChecks;
143:         }
144:
145:         public void setGenerateInvariants(boolean generateInvariantChecks)
146:         {
147:                 this.generateInvariantChecks = generateInvariantChecks;
148:         }
149:
150:         public boolean addStateInvToModule() {
151:                 return addStateInvToModule;
152: }
153:
154:         public void setAddStateInvToModule(boolean addStateInvToModule) {
155:                 this.addStateInvToModule = addStateInvToModule;
156:         }
157: }