Skip to content

Welcome to the official repository for NeuroScript, a beginner-friendly programming language designed specifically for neural network development. Made by AAU 4th semester CS students

Notifications You must be signed in to change notification settings

p42024/NeuroScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setting up the enviroment

Pre-requisites

For using the compiler:
Java JDK 17
Python 3.12

Python packages
  1. torch - 2.3.0
  2. pandas - 2.2.2
  3. torchvision - 0.18.0

Can be installed using the following command:

pip install torch==2.3.0 torchvision==0.18.0 pandas==2.2.2

Additional requirement which only necessary if wanting to build or test the compiler

Maven 3.9.6
It's important to add Maven to the path in the system environment variable.

Antlr 4.13.1
It's important to add Antlr to the classpath in the environment variable.

Either to the system variable by adding the path to the CLASSPATH.

Alternative a local classpath for this shell session can be set using the following command:

CLASSPATH=$CLASSPATH:<path_to_current_directory>/antlr-4.13.1-complete.jar

Using the compiler

A pre-built jar file can be found here: example/NeuroScript.jar.
To use the compiler use this command in the same folder as NeuroScript.jar:

java -jar NeuroScript.jar <file path>

Running example

To run the example go into the ´example´ folder and run the following command:

java -jar NeuroScript.jar example

It should generate a Python file with the name example.py in the same folder. The file should contain the same code as expected_outcome.py. The example can then be run using the following command:

python example.py

If it fails, test the python environment using the following command:

python expected_outcome.py

Building and testing the compiler

Firstly the Antlr files has to be generated using the following command in the root folder:

java -Xmx500M org.antlr.v4.Tool Grammar.g4 -o src/main/java/org/g5/parser -package org.g5.parser -visitor

Building

Once the project is setup it can be build into a usable jar file using maven:

mvn clean package

Which should generate a jar file on the path:

  • With dependencies: target\NeuroScript-jar-with-dependencies.jar
  • Without dependencies: target\NeuroScript.jar

For use in compilation it's recommended to use NeuroScript-jar-with-dependencies.jar as it contains all the dependencies. Remember to change the name of the jar file when using the compilation command.

Testing

To run all tests use the following command in the project root:

mvn test

About

Welcome to the official repository for NeuroScript, a beginner-friendly programming language designed specifically for neural network development. Made by AAU 4th semester CS students

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published