-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 28842ef
Showing
297 changed files
with
17,061 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.settings/ | ||
target/ | ||
.idea/ | ||
|
||
.DS_Store | ||
.project | ||
.classpath | ||
*~ | ||
*.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# NESTML - The NEST Modelling Language |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,235 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<!-- == PROJECT COORDINATES ============================================= --> | ||
|
||
<groupId>nestml</groupId> | ||
<artifactId>nestml-core</artifactId> | ||
<version>0.0.3-SNAPSHOT</version> | ||
|
||
<properties> | ||
|
||
<!-- .. Libraries ..................................................... --> | ||
<guava.version>18.0</guava.version> | ||
<commons.cli.version>1.3</commons.cli.version> | ||
<junit.version>4.11</junit.version> | ||
|
||
<!-- Monticore versions and dependencies --> | ||
<antlr.version>4.5</antlr.version> | ||
<monticore.runtime>4.1.6</monticore.runtime> | ||
<mc4.maven.generator>4.1.6</mc4.maven.generator> | ||
|
||
<!-- .. Plugins ....................................................... --> | ||
<compiler.plugin>3.2</compiler.plugin> | ||
<release.plugin>2.5.1</release.plugin> | ||
<source.plugin>2.4</source.plugin> | ||
|
||
<!-- Classifiers --> | ||
<grammars.classifier>grammars</grammars.classifier> | ||
<symbols.classifier>symbols</symbols.classifier> | ||
<models.classifier>models</models.classifier> | ||
|
||
<!-- .. Misc .......................................................... --> | ||
<java.version>1.8</java.version> | ||
<wagon.provider.version>2.6</wagon.provider.version> | ||
<logback.version>1.1.2</logback.version> | ||
<groovy.version>2.3.7</groovy.version> | ||
|
||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
</properties> | ||
|
||
<!-- == PROJECT METAINFORMATION ========================================= --> | ||
|
||
<name>nestml-core</name> | ||
<url>http://lab11.se.rwth-aachen.de/nexus/service/local/repositories/se-sites/content/monticore/${project.version}/</url> | ||
<inceptionYear>2013</inceptionYear> | ||
|
||
<organization> | ||
<name>Department of Software Engineering, RWTH Aachen University</name> | ||
<url>http://www.se-rwth.de/</url> | ||
</organization> | ||
|
||
<mailingLists> | ||
<mailingList> | ||
<name>Developer</name> | ||
<post>monticore-dev@se-rwth.de</post> | ||
</mailingList> | ||
</mailingLists> | ||
|
||
<issueManagement> | ||
<system>Trac</system> | ||
<url>https://sselab.de/lab2/private/trac/MontiCore/</url> | ||
</issueManagement> | ||
|
||
<!-- == DEFAULT BUILD SETTINGS =========================================== --> | ||
|
||
<!-- == DEFAULT BUILD SETTINGS =========================================== --> | ||
|
||
<build> | ||
|
||
<plugins> | ||
<!-- MontiCore Configuration --> | ||
|
||
<!-- MontiCore Generation --> | ||
<plugin> | ||
<groupId>de.monticore.mojo</groupId> | ||
<artifactId>monticore-maven-plugin</artifactId> | ||
<version>${mc4.maven.generator}</version> | ||
<configuration> | ||
<skip>false</skip> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>generate</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<!-- Other Configuration --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>${compiler.plugin}</version> | ||
<configuration> | ||
<source>${java.version}</source> | ||
<target>${java.version}</target> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-release-plugin</artifactId> | ||
<version>${release.plugin}</version> | ||
<configuration> | ||
<tagNameFormat>monticore-@{project.version}</tagNameFormat> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>${source.plugin}</version> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>jar-no-fork</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<!-- Create jar with all dependencies --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>2.6</version> | ||
<configuration> | ||
|
||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<version>2.5.4</version> | ||
<configuration> | ||
<descriptorRefs> | ||
<descriptorRef>jar-with-dependencies</descriptorRef> | ||
</descriptorRefs> | ||
<archive> | ||
<manifest> | ||
<addClasspath>true</addClasspath> | ||
<mainClass>org.nest.cli.NESTMLFrontend</mainClass> | ||
</manifest> | ||
</archive> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>assemble-all</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
|
||
</build> | ||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-classic</artifactId> | ||
<version>${logback.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.google.guava</groupId> | ||
<artifactId>guava</artifactId> | ||
<version>${guava.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>commons-cli</groupId> | ||
<artifactId>commons-cli</artifactId> | ||
<version>${commons.cli.version}</version> | ||
</dependency> | ||
|
||
|
||
<!-- MontiCore Dependencies --> | ||
<dependency> | ||
<groupId>org.antlr</groupId> | ||
<artifactId>antlr4-runtime</artifactId> | ||
<version>${antlr.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>de.monticore</groupId> | ||
<artifactId>monticore-runtime</artifactId> | ||
<version>${monticore.runtime}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>de.monticore</groupId> | ||
<artifactId>monticore-grammar</artifactId> | ||
<version>${monticore.runtime}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>de.monticore</groupId> | ||
<artifactId>monticore-grammar</artifactId> | ||
<version>${monticore.runtime}</version> | ||
<classifier>${grammars.classifier}</classifier> | ||
</dependency> | ||
|
||
<!-- .. Test Libraries ............................................... --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>${junit.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>de.monticore</groupId> | ||
<artifactId>monticore-runtime</artifactId> | ||
<version>${monticore.runtime}</version> | ||
<type>test-jar</type> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.codehaus.groovy</groupId> | ||
<artifactId>groovy</artifactId> | ||
<version>${groovy.version}</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
/* | ||
* Copyright (c) 2015 RWTH Aachen. All rights reserved. | ||
* | ||
* http://www.se-rwth.de/ | ||
*/ | ||
package org.nest; | ||
|
||
grammar NESTML extends org.nest.SPL { | ||
|
||
/** ASTNESTMLCompilationUnit represents the complete entire file with neuron and component models. | ||
@attribute packageName The qualified name to artifact | ||
@attribute Import List of imported elements | ||
@attribute Neuron The neuron representation | ||
@attribute Component The component representation | ||
*/ | ||
NESTMLCompilationUnit = "package" packageName:QualifiedName | ||
BLOCK_OPEN | ||
(Import | NEWLINE)* | ||
(Neuron | Component | NEWLINE)* | ||
BLOCK_CLOSE; | ||
|
||
/** ASTImport represents the import line. Can be the qualified name oder a wirldcard import. | ||
@attribute qualifiedName The qualified name to artifact | ||
@attribute star Optional wildcard | ||
*/ | ||
Import = "import" QualifiedName ([star:".*"])? (";")?; | ||
|
||
Neuron = "neuron" Name Body; | ||
|
||
Component = "component" Name Body; | ||
|
||
interface BodyElement; | ||
|
||
Body = BLOCK_OPEN ( NEWLINE | BodyElement)* BLOCK_CLOSE; | ||
|
||
USE_Stmt implements BodyElement = "use" name:QualifiedName "as" alias:Name; | ||
|
||
Var_Block implements BodyElement = | ||
(["state"]|["parameter"]|["internal"]) | ||
BLOCK_OPEN | ||
(AliasDecl (";" AliasDecl)* (";")? | NEWLINE)* | ||
BLOCK_CLOSE; | ||
|
||
AliasDecl = ([hide:"-"])? (["alias"])? Declaration ("[" invariants:Expr (";" invariants:Expr)* "]")?; | ||
|
||
Input implements BodyElement = "input" | ||
BLOCK_OPEN | ||
(InputLine | NEWLINE)* | ||
BLOCK_CLOSE; | ||
|
||
InputLine = | ||
Name | ||
("<" sizeParameter:Name ">")? | ||
"<-" InputType* | ||
(["spike"] | ["current"]); | ||
|
||
InputType = (["inhibitory"] | ["excitatory"]); | ||
|
||
Output implements BodyElement = | ||
"output" BLOCK_OPEN (["spike"] | ["current"]) ; | ||
|
||
Structure implements BodyElement = "structure" | ||
BLOCK_OPEN | ||
(StructureLine | NEWLINE)* | ||
BLOCK_CLOSE; | ||
|
||
StructureLine = compartments:QualifiedName ("-" compartments:QualifiedName)*; | ||
|
||
// TODO model it better | ||
Function implements BodyElement = | ||
"function" Name "(" Parameters? ")" (returnType:QualifiedName | PrimitiveType)? | ||
BLOCK_OPEN | ||
Block | ||
BLOCK_CLOSE; | ||
|
||
// e.g. first: current time, second: min delay in ms | ||
// e.g. first: current time, second: timestep in ms | ||
Dynamics implements BodyElement = "dynamics" (MinDelay | TimeStep) | ||
"(" Parameters? ")" | ||
BLOCK_OPEN // Todo remove me. It is not the way for modular extension | ||
Block | ||
BLOCK_CLOSE; | ||
|
||
|
||
MinDelay = "minDelay"; | ||
|
||
TimeStep = "timestep"; | ||
|
||
Parameters = Parameter ("," Parameter)*; | ||
|
||
Parameter = Name type:QualifiedName; | ||
|
||
} |
Oops, something went wrong.