Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
languages
EmbeddedMontiArcDL
Commits
f9cc0507
Commit
f9cc0507
authored
Apr 28, 2021
by
danielkisov
Browse files
Passing strings in place of hashmap
parent
17ae6b33
Pipeline
#456495
failed with stage
in 31 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/monticar/emadl/_symboltable/EMADLLanguage.java
View file @
f9cc0507
...
...
@@ -26,8 +26,8 @@ import java.util.*;
public
class
EMADLLanguage
extends
EmbeddingModelingLanguage
{
public
static
final
String
FILE_ENDING
=
"emadl"
;
private
HashMap
<
String
,
ArrayList
<
String
>>
customLayers
=
null
;
private
String
customPythonFilesPath
=
""
;
private
String
customFilesPath
=
""
;
private
String
backend
=
""
;
public
static
final
EmbeddedMontiArcDynamicLanguage
HOST_LANGUAGE
=
new
EmbeddedMontiArcDynamicLanguage
();
public
static
final
CNNArchLanguage
CNNARCH_LANGUAGE
=
new
CNNArchLanguage
();
...
...
@@ -40,29 +40,29 @@ public class EMADLLanguage extends EmbeddingModelingLanguage {
Arrays
.
asList
(
CNNARCH_LANGUAGE
,
MATH_LANGUAGE
));
}
public
EMADLLanguage
(
HashMap
<
String
,
ArrayList
<
String
>>
customLayers
,
String
customPythonFilesPath
)
{
public
EMADLLanguage
(
String
customFilesPath
,
String
backend
)
{
super
(
"Embedded MontiArc Deep Learning Language"
,
FILE_ENDING
,
HOST_LANGUAGE
,
Arrays
.
asList
(
CNNARCH_LANGUAGE
,
MATH_LANGUAGE
));
set
CustomLayers
(
customLayers
);
setCustom
Python
FilesPath
(
custom
Python
FilesPath
);
set
Backend
(
backend
);
setCustomFilesPath
(
customFilesPath
);
}
private
void
set
CustomLayers
(
HashMap
<
String
,
ArrayList
<
String
>>
customLayers
){
this
.
customLayers
=
customLayers
;
private
void
set
Backend
(
String
backend
){
this
.
backend
=
backend
;
}
public
HashMap
<
String
,
ArrayList
<
String
>>
getCustomLayers
(){
return
this
.
customLayers
;
public
String
getBackend
(){
return
this
.
backend
;
}
private
void
setCustom
Python
FilesPath
(
String
customPythonFilesPath
){
this
.
custom
Python
FilesPath
=
customPythonFilesPath
;
private
void
setCustomFilesPath
(
String
customPythonFilesPath
){
this
.
customFilesPath
=
customPythonFilesPath
;
}
public
String
getCustom
Python
FilesPath
(){
return
this
.
custom
Python
FilesPath
;
public
String
getCustomFilesPath
(){
return
this
.
customFilesPath
;
}
...
...
@@ -92,7 +92,7 @@ public class EMADLLanguage extends EmbeddingModelingLanguage {
@Override
public
Optional
<
EMADLSymbolTableCreator
>
getSymbolTableCreator
(
ResolvingConfiguration
resolvingConfiguration
,
MutableScope
enclosingScope
)
{
return
Optional
.
of
(
new
EMADLSymbolTableCreator
(
resolvingConfiguration
,
enclosingScope
,
getCustom
Layers
(),
getCustomPythonFilesPath
()));
resolvingConfiguration
,
enclosingScope
,
getCustom
FilesPath
(),
getBackend
()));
}
}
src/main/java/de/monticore/lang/monticar/emadl/_symboltable/EMADLSymbolTableCreator.java
View file @
f9cc0507
...
...
@@ -47,9 +47,9 @@ public class EMADLSymbolTableCreator extends de.monticore.symboltable.CommonSymb
public
EMADLSymbolTableCreator
(
final
ResolvingConfiguration
resolvingConfig
,
final
MutableScope
enclosingScope
,
HashMap
<
String
,
ArrayList
<
String
>>
customLayers
,
String
customPythonFilesPath
)
{
String
customFilesPath
,
String
backend
)
{
super
(
resolvingConfig
,
enclosingScope
);
initSuperSTC
(
resolvingConfig
,
custom
Layers
,
customPython
FilesPath
);
initSuperSTC
(
resolvingConfig
,
customFilesPath
,
backend
);
}
public
EMADLSymbolTableCreator
(
final
ResolvingConfiguration
resolvingConfig
,
final
Deque
<
MutableScope
>
scopeStack
)
{
...
...
@@ -58,9 +58,9 @@ public class EMADLSymbolTableCreator extends de.monticore.symboltable.CommonSymb
}
public
EMADLSymbolTableCreator
(
final
ResolvingConfiguration
resolvingConfig
,
final
Deque
<
MutableScope
>
scopeStack
,
HashMap
<
String
,
ArrayList
<
String
>>
customLayers
,
String
customPythonFilesPath
)
{
String
customFilesPath
,
String
backend
)
{
super
(
resolvingConfig
,
scopeStack
);
initSuperSTC
(
resolvingConfig
,
custom
Layers
,
customPython
FilesPath
);
initSuperSTC
(
resolvingConfig
,
customFilesPath
,
backend
);
}
private
void
initSuperSTC
(
final
ResolvingConfiguration
resolvingConfig
)
{
...
...
@@ -90,8 +90,8 @@ public class EMADLSymbolTableCreator extends de.monticore.symboltable.CommonSymb
visitor
.
setCommon2Visitor
(
emamSTC
);
}
private
void
initSuperSTC
(
final
ResolvingConfiguration
resolvingConfig
,
HashMap
<
String
,
ArrayList
<
String
>>
customLayers
,
String
customPythonFilesPath
)
{
this
.
cnnArchSTC
=
new
CNNArchSymbolTableCreator
(
resolvingConfig
,
scopeStack
,
custom
Layers
,
customPython
FilesPath
);
private
void
initSuperSTC
(
final
ResolvingConfiguration
resolvingConfig
,
String
customFilesPath
,
String
backend
)
{
this
.
cnnArchSTC
=
new
CNNArchSymbolTableCreator
(
resolvingConfig
,
scopeStack
,
customFilesPath
,
backend
);
this
.
emamSTC
=
new
EmbeddedMontiArcMathSymbolTableCreatorTOP
(
resolvingConfig
,
scopeStack
);
this
.
mathOptSTC
=
new
MathOptSymbolTableCreator
(
resolvingConfig
,
scopeStack
);
this
.
emadSTC
=
new
ModifiedEMADynamicSymbolTableCreator
(
resolvingConfig
,
scopeStack
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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