Package: PDefinitionAssistantPOG

PDefinitionAssistantPOG

nameinstructionbranchcomplexitylinemethod
PDefinitionAssistantPOG(ITypeCheckerAssistantFactory)
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%
getProofObligations(LinkedList, QuestionAnswerAdaptor, IPOContextStack)
M: 0 C: 37
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 7
100%
M: 0 C: 1
100%

Coverage

1: package org.overture.pog.utility;
2:
3: import java.util.LinkedList;
4:
5: import org.overture.ast.analysis.AnalysisException;
6: import org.overture.ast.analysis.QuestionAnswerAdaptor;
7: import org.overture.ast.assistant.IAstAssistant;
8: import org.overture.ast.definitions.PDefinition;
9: import org.overture.pog.contexts.PONameContext;
10: import org.overture.pog.obligation.ProofObligationList;
11: import org.overture.pog.pub.IPOContextStack;
12: import org.overture.pog.pub.IProofObligationList;
13: import org.overture.typechecker.assistant.ITypeCheckerAssistantFactory;
14: import org.overture.typechecker.assistant.definition.PDefinitionAssistantTC;
15:
16: public class PDefinitionAssistantPOG extends PDefinitionAssistantTC implements IAstAssistant
17: {
18:
19:         public PDefinitionAssistantPOG(ITypeCheckerAssistantFactory af)
20:         {
21:                 super(af);
22:         }
23:
24:         public IProofObligationList getProofObligations(
25:                         LinkedList<? extends PDefinition> defs,
26:                         QuestionAnswerAdaptor<IPOContextStack, ? extends IProofObligationList> pogVisitor,
27:                         IPOContextStack ctxt) throws AnalysisException
28:         {
29:                 IProofObligationList obligations = new ProofObligationList();
30:
31:•                for (PDefinition d : defs)
32:                 {
33:                         ctxt.push(new PONameContext(getVariableNames(d)));
34:                         obligations.addAll(d.apply(pogVisitor, ctxt));
35:                         ctxt.pop();
36:                 }
37:
38:                 return obligations;
39:         }
40:
41: }