From cc1b518fa9b145fff673126c36bb4afa84e20735 Mon Sep 17 00:00:00 2001 From: Adalberto Farias Date: Wed, 24 Sep 2014 09:46:46 -0300 Subject: [PATCH] Merged with origin/development (release 0.3.6) and handled bug #303. --- .../modelchecker/MCUnsupportedCollector.java | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/ide/plugins/modelchecker/src/main/java/eu/compassresearch/ide/modelchecker/MCUnsupportedCollector.java b/ide/plugins/modelchecker/src/main/java/eu/compassresearch/ide/modelchecker/MCUnsupportedCollector.java index a43af94ef..631bd1a95 100644 --- a/ide/plugins/modelchecker/src/main/java/eu/compassresearch/ide/modelchecker/MCUnsupportedCollector.java +++ b/ide/plugins/modelchecker/src/main/java/eu/compassresearch/ide/modelchecker/MCUnsupportedCollector.java @@ -1,5 +1,7 @@ package eu.compassresearch.ide.modelchecker; +import java.util.LinkedList; + import org.overture.ast.analysis.AnalysisException; import org.overture.ast.definitions.AAssignmentDefinition; import org.overture.ast.definitions.ABusClassDefinition; @@ -152,6 +154,7 @@ import org.overture.ast.types.AUnresolvedType; import org.overture.ast.types.AVoidReturnType; import org.overture.ast.types.AVoidType; +import org.overture.ast.types.PType; import eu.compassresearch.ast.actions.AAlphabetisedParallelismParallelAction; import eu.compassresearch.ast.actions.AAlphabetisedParallelismReplicatedAction; @@ -250,6 +253,9 @@ import eu.compassresearch.ast.statements.AUnresolvedStateDesignator; import eu.compassresearch.ast.types.AChannelType; import eu.compassresearch.ast.types.AProcessType; +import eu.compassresearch.core.analysis.modelchecker.ast.auxiliary.ExpressionEvaluator; +import eu.compassresearch.core.analysis.modelchecker.ast.types.MCAChannelType; +import eu.compassresearch.core.analysis.modelchecker.ast.types.MCPCMLType; import eu.compassresearch.ide.core.unsupported.UnsupportedCollector; import eu.compassresearch.ide.core.unsupported.UnsupportedElementInfo; import eu.compassresearch.ide.core.unsupported.UnsupportingFeatures; @@ -590,12 +596,24 @@ public void caseAChannelRenamingProcess(AChannelRenamingProcess node) @Override public void caseAChannelType(AChannelType arg0) throws AnalysisException { - unsupported=false; - // TODO Uncomment the above line to signal support for this node - // Do not remove the super call below. - super.caseAChannelType(arg0); + //channel types that have more than one communication type are not allowed + UnsupportedElementInfo uei = new UnsupportedElementInfo() { + }; + + if(arg0.getParameters().size() > 1){ + uei.setLocation(arg0.getLocation()); + uei.setMessage(arg0.getClass().getSimpleName().toString() + + " nodes with more than one parameter are not supported by the " + this.getFeature().toString()); + this.getUnsupporteds().add(uei); + unsupported = true; + }else{ + unsupported = false; + } + // Do not remove the super call below. + //super.caseAChannelType(arg0); } + @Override public void caseAChansetDefinition(AChansetDefinition node) throws AnalysisException {