Package: SeqInfo

SeqInfo

nameinstructionbranchcomplexitylinemethod
SeqInfo(boolean, AbstractTypeInfo, boolean)
M: 0 C: 8
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
consCollectionCheck(String)
M: 0 C: 11
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: package org.overture.codegen.vdm2jml.predgen.info;
2:
3: import org.overture.codegen.vdm2jml.runtime.V2J;
4:
5: public class SeqInfo extends AbstractSetSeqInfo
6: {
7:         public static final String IS_SEQ_METHOD = "isSeq";
8:         public static final String IS_SEQ1_METHOD = "isSeq1";
9:
10:         protected boolean isSeq1;
11:
12:         public SeqInfo(boolean optional, AbstractTypeInfo elementType,
13:                         boolean isSeq1)
14:         {
15:                 super(optional, elementType);
16:                 this.isSeq1 = isSeq1;
17:         }
18:
19:         @Override
20:         public String consCollectionCheck(String arg)
21:         {
22:                 // e.g. (V2J.isSeq(seq) && (\forall int i; 0 <= i && i < V2JL.size(seq); Utils.is_nat(V2JL.get(seq,i))));
23:•                return consSubjectCheck(V2J.class.getSimpleName(), isSeq1
24:                                 ? IS_SEQ1_METHOD : IS_SEQ_METHOD, arg);
25:         }
26: }