Commit ee12b521 authored by Svetlana Pavlitskaya's avatar Svetlana Pavlitskaya

Fixed a problem with strings for layer values.

parent 83da7562
Pipeline #68155 failed with stages
in 10 minutes and 50 seconds
......@@ -37,7 +37,7 @@
<properties>
<!-- .. SE-Libraries .................................................. -->
<monticore.version>5.0.0</monticore.version>
<monticore.version>5.0.1</monticore.version>
<se-commons.version>1.7.8</se-commons.version>
<mc.grammars.assembly.version>0.0.6</mc.grammars.assembly.version>
<SIUnit.version>0.0.11</SIUnit.version>
......
package de.monticore.lang.monticar;
grammar CNNArch extends de.monticore.lang.Math, de.monticore.lang.monticar.Common2,
de.monticore.CommonExpressions, de.monticore.SetExpressions {
grammar CNNArch extends de.monticore.CommonExpressions, de.monticore.lang.Math, de.monticore.lang.monticar.Common2 {
token NEWLINETOKEN =
('\r' '\n' |
......@@ -115,7 +114,7 @@ de.monticore.CommonExpressions, de.monticore.SetExpressions {
Expressions for variable values.
*/
ArchSimpleExpression = (arithmeticExpression:Expression
| booleanExpression:Expression
| booleanExpression:BooleanExpression
| tupleExpression:TupleExpression
| string:StringLiteral);
......
......@@ -65,7 +65,7 @@ public class CheckVariableName implements CNNArchASTVariableCoCo {
String name = node.getName();
if (variableNames.contains(name)){
if (node instanceof ASTLayerParameter){
Collection<Symbol> allParametersWithSameName = node.getEnclosingScope().get().getLocalSymbols().get(name);
Collection<Symbol> allParametersWithSameName = node.getEnclosingScopeOpt().get().getLocalSymbols().get(name);
if (allParametersWithSameName.size() > 1){
duplicationError(node);
}
......
......@@ -64,11 +64,11 @@ public class AllPredefinedLayers {
//possible String values
public static final String PADDING_VALID = "\"valid\"";
public static final String PADDING_SAME = "\"same\"";
public static final String PADDING_NO_LOSS = "\"no_loss\"";
public static final String POOL_MAX = "\"max\"";
public static final String POOL_AVG = "\"avg\"";
public static final String PADDING_VALID = "valid";
public static final String PADDING_SAME = "same";
public static final String PADDING_NO_LOSS = "no_loss";
public static final String POOL_MAX = "max";
public static final String POOL_AVG = "avg";
//list with all predefined layers
......
......@@ -47,7 +47,6 @@ public class SymtabTest extends AbstractSymtabTest {
assertTrue(parser.parse("src/test/resources/architectures/Alexnet.cnna").isPresent());
}
@Ignore
@Test
public void testAlexnet(){
Scope symTab = createSymTab("src/test/resources/architectures");
......@@ -59,7 +58,6 @@ public class SymtabTest extends AbstractSymtabTest {
a.getArchitecture().getBody().getOutputTypes();
}
@Ignore
@Test
public void testResNeXt(){
Scope symTab = createSymTab("src/test/resources/architectures");
......@@ -71,7 +69,6 @@ public class SymtabTest extends AbstractSymtabTest {
a.getArchitecture().getBody().getOutputTypes();
}
@Ignore
@Test
public void test3(){
Scope symTab = createSymTab("src/test/resources/valid_tests");
......
architecture MissingMerge(inputs=10, classes=2){
def input Q(-oo:+oo)^{10} in1
def output Q(0:1)^{2} out1
def input Q(-oo:+oo)^{inputs} in1
def output Q(0:1)^{classes} out1
in1 ->
(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment