Skip to content

Umesh-k26/gralgo

Repository files navigation

GrAlgo

GrAlgo is a Domain Specific Language in which we aim to bring the user closer to the Graph Data Structure which is not available in the general STL library for C++.

Our programming language intuitively uses inbuilt functions and inbuilt data types which makes GrAlgo a powerful tool. Using our language the user can easily define different types of graphs and also traverse using Breadth-First and Depth-First methods using our inbuilt functions we also provide a wide range of methods to represent graphs such as Node List, Edge List along with the normal usage.

Table of Contents

SNo. Contents
1. About
2. Features
3. Screenshots
4. Installation
4. Lexer
4. Parser
4. Semantic and Code Generation
5. References For Development

About

This language Gralgo is mainly created for the user to use the Graph Algorithms directly without writing the implementation for Graphs and all the Functions from scratch for each code.


Features

In this Language, we can use functions for Traversal like BFS , DFS , Cycle Detection , Shortest Path Algorithms like Dijkstra's Algorithm etc.

For Proper usage Details, Refer Final Report.


Screenshots

1. Lexer Code Example

2. Parser Code Example

3. Semantic Code Example

4. Code Generation Example


Installation

To build the compiler, the prerequisite softwares are

flex
bison
gcc
clang++
llvm-suite
make

The above softwares can be installed by the following command

sudo apt install build-essential

sudo apt-get install flex bison clang-format clang-tidy clang-tools clang clangd libc++-dev libc++1 libc++abi-dev libc++abi1 libclang-dev libclang1 liblldb-dev libllvm-ocaml-dev libomp-dev libomp5 lld lldb llvm-dev llvm-runtime llvm python3-clang

Now, to build the compiler, we have to go to the Semantics_and_CodeGen folder and run the command

make

Now, we have build the compiler, to compile a program, write the code in input.gr and run the command

make test

To run the command, we have to use the command

./a.out

References for development


Contributors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published