Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
languages
CNNArchLang
Commits
ee12b521
Commit
ee12b521
authored
Aug 13, 2018
by
Svetlana Pavlitskaya
Browse files
Fixed a problem with strings for layer values.
parent
83da7562
Pipeline
#68155
failed with stages
in 10 minutes and 50 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pom.xml
View file @
ee12b521
...
...
@@ -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>
...
...
src/main/grammars/de/monticore/lang/monticar/CNNArch.mc4
View file @
ee12b521
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
:
Boolean
Expression
|
tupleExpression
:
TupleExpression
|
string
:
StringLiteral
);
...
...
src/main/java/de/monticore/lang/monticar/cnnarch/_cocos/CheckVariableName.java
View file @
ee12b521
...
...
@@ -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
.
getEnclosingScope
Opt
().
get
().
getLocalSymbols
().
get
(
name
);
if
(
allParametersWithSameName
.
size
()
>
1
){
duplicationError
(
node
);
}
...
...
src/main/java/de/monticore/lang/monticar/cnnarch/predefined/AllPredefinedLayers.java
View file @
ee12b521
...
...
@@ -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
...
...
src/test/java/de/monticore/lang/monticar/cnnarch/SymtabTest.java
View file @
ee12b521
...
...
@@ -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"
);
...
...
src/test/resources/invalid_tests/MissingMerge.cnna
View file @
ee12b521
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 ->
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment