Package: PExpAssistantTC

PExpAssistantTC

nameinstructionbranchcomplexitylinemethod
PExpAssistantTC(ITypeCheckerAssistantFactory)
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%
exitCheck(List, Environment)
M: 0 C: 31
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
exitCheckMultipleBindList(List, Environment)
M: 0 C: 31
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 6
100%
M: 0 C: 1
100%

Coverage

1: /**
2: *
3: */
4: package org.overture.typechecker.assistant.expression;
5:
6: import java.util.List;
7:
8: import org.overture.ast.analysis.AnalysisException;
9: import org.overture.ast.analysis.intf.IQuestionAnswer;
10: import org.overture.ast.assistant.IAstAssistant;
11: import org.overture.ast.expressions.PExp;
12: import org.overture.ast.patterns.PMultipleBind;
13: import org.overture.ast.util.PTypeSet;
14: import org.overture.typechecker.Environment;
15: import org.overture.typechecker.assistant.ITypeCheckerAssistantFactory;
16:
17: public class PExpAssistantTC implements IAstAssistant
18: {
19:         protected final ITypeCheckerAssistantFactory af;
20:
21:         public PExpAssistantTC(ITypeCheckerAssistantFactory af)
22:         {
23:                 this.af = af;
24:         }
25:
26:         public PTypeSet exitCheck(List<PExp> args, Environment env) throws AnalysisException
27:         {
28:                 PTypeSet result = new PTypeSet(af);
29:                 IQuestionAnswer<Environment, PTypeSet> checker = af.getExitTypeCollector();
30:
31:•                for (PExp exp: args)
32:                 {
33:                         result.addAll(exp.apply(checker, env));
34:                 }
35:
36:                 return result;
37:         }
38:
39:         public PTypeSet exitCheckMultipleBindList(List<PMultipleBind> bindList, Environment env) throws AnalysisException
40:         {
41:                 PTypeSet result = new PTypeSet(af);
42:                 IQuestionAnswer<Environment, PTypeSet> checker = af.getExitTypeCollector();
43:
44:•                for (PMultipleBind mbind: bindList)
45:                 {
46:                         result.addAll(mbind.apply(checker, env));
47:                 }
48:
49:                 return result;
50:         }
51: }