Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8675643
fixed bug
rkrishnasanka Jul 1, 2021
ebd69ff
Created the interfaces and the base classes for the graph matcher
rkrishnasanka Mar 2, 2021
7b58df0
Modified the whole distribute-annotation thing
rkrishnasanka Mar 5, 2021
52c507e
added hash methods for fignode and annotations
rkrishnasanka Mar 5, 2021
27c8909
modified the get constraints interface for the fluid interaction graph
rkrishnasanka Mar 5, 2021
5975274
Updated State Table to have a control matrix and print out the fully …
rkrishnasanka Apr 6, 2021
8b77a78
Everything seems to be working without too much of a hassle. #TODO - …
rkrishnasanka Apr 6, 2021
2716b60
Updated imports to prevent cyclic import
rkrishnasanka Apr 7, 2021
5dd7bf0
Updated the annotations datastructure and changed the field to have t…
rkrishnasanka Apr 8, 2021
3f0967c
Reduced problems from pylance
rkrishnasanka Apr 8, 2021
66a76dd
Updated the statetable<->annotation interface and its now updated to …
rkrishnasanka Apr 8, 2021
504dc93
Updated to reduce the problems
rkrishnasanka Apr 14, 2021
285e06a
Reduced more errors in the problems
rkrishnasanka Jun 21, 2021
a050e49
Fixed a couple of things that should make this work more smoothly
rkrishnasanka Jun 22, 2021
f339301
Updated the lfr antlrgen compiler generation
rkrishnasanka Jun 22, 2021
86008dd
Moved reggie into lfr project folder
rkrishnasanka Jun 22, 2021
8103bac
Moved everything out of v2
rkrishnasanka Jun 22, 2021
54aeb17
Updating the code to reduce problems from pylance
rkrishnasanka Jun 23, 2021
1090e56
Just documentation
rkrishnasanka Jun 25, 2021
10de096
Renamed construction node property to ID (from id) since id is used t…
rkrishnasanka Jun 25, 2021
dacde5e
Add a bunch more check for none and modified ID
rkrishnasanka Jul 12, 2021
38026e4
Fixed yet another error
rkrishnasanka Jul 12, 2021
33f50a0
Added additional test infrastructure for imported designs
rkrishnasanka Jul 14, 2021
6cc798c
Incorrect listtification problem
rkrishnasanka Jul 14, 2021
929956a
Fixed:
rkrishnasanka Jul 14, 2021
6eda7b1
Modified a couple of error scenarios
rkrishnasanka Jul 15, 2021
19f4ad2
Added check to make sure that the pre-processor would ensure that if …
rkrishnasanka Jul 15, 2021
7866d35
Fixed the renaming of the figannotations that was throwing an error
rkrishnasanka Jul 16, 2021
ec33b89
Added art for generating ASCII Art, fixed post-rebase errors, fixed i…
rkrishnasanka Jul 16, 2021
1cf177b
Some more error throwing for fluid number
rkrishnasanka Jul 16, 2021
caab50b
Updated docs
rkrishnasanka Jul 16, 2021
d1ecb4d
- Fixed issue where nodefilter was not being initialized properly
rkrishnasanka Jul 21, 2021
48cb82c
Updated check on node constriant matching logic to ensure that matchi…
rkrishnasanka Jul 21, 2021
22e9320
Updated the dist-relation matching algorithm to consider various case…
rkrishnasanka Jul 27, 2021
d1f6e86
Changed how we return the mathes
rkrishnasanka Aug 31, 2021
400ab25
Update with full refactor for ScripSlate (#50)
rkrishnasanka Oct 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .deepsource.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version = 1

exclude_patterns = ["**/antlrgen/*","**/BitVector.py"]
exclude_patterns = ["lfr/antlrgen/**.*","**/BitVector.py"]

[[analyzers]]
name = "python"
Expand Down
47 changes: 16 additions & 31 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,44 +1,29 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.166.1/containers/ubuntu/.devcontainer/base.Dockerfile
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.194.3/containers/ubuntu/.devcontainer/base.Dockerfile

# [Choice] Ubuntu version: bionic, focal
# [Choice] Ubuntu version: hirsute, bionic, focal
ARG VARIANT="focal"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
# FROM ubuntu:20.04

ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
PYTHONHASHSEED=random \
PIP_NO_CACHE_DIR=off \
# PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_VERSION=1.0.0
POETRY_VERSION=1.2.0


# [Optional] Uncomment this section to install additional OS packages.
RUN export DEBIAN_FRONTEND=noninteractive \
&& sudo apt-get update \
&& apt-get -y install --no-install-recommends build-essential curl software-properties-common \
python3-pip git make build-essential python-dev libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl libffi-dev \
graphviz libgraphviz-dev \
libcairo2-dev pkg-config python3-dev
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends curl build-essential \
software-properties-common python3-pip make build-essential \
python-dev libssl-dev zlib1g-dev libbz2-dev libreadline-dev \
libsqlite3-dev curl libffi-dev redis-server openjdk-8-jre-headless \
graphviz libgraphviz-dev libcairo2-dev pkg-config python3-dev python3.8-venv \
python3-setuptools liblzma-dev \
python3-pygraphviz apt-utils

# RUN poetry config virtualenvs.create false
RUN pip install --upgrade pip
RUN pip install setuptools pygraphviz

# Things that didn't install - make python3-dev

# Install and setup pyenv
RUN git clone git://github.com/yyuu/pyenv.git .pyenv
RUN git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv

ENV HOME /
ENV PYENV_ROOT $HOME/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH

RUN pyenv install 3.8.0
RUN pyenv global 3.8.0

RUN pip install pygraphviz

RUN pip install "poetry==$POETRY_VERSION"

RUN poetry config virtualenvs.create false
ENV PYTHONPATH=${PYTHONPATH}:${PWD}
36 changes: 24 additions & 12 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,35 @@
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Ubuntu version: focal, bionic
"args": { "VARIANT": "focal" }
"args": {
"VARIANT": "focal"
}
},

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": ["ms-python.vscode-pylance", "ms-python.python","njpwerner.autodocstring","bungcip.better-toml", "rkrishnasanka.lfr", "rkrishnasanka.uf"]

"customizations": {
"vscode": {
"extensions": [
"ms-python.vscode-pylance",
"ms-python.python",
"njpwerner.autodocstring",
"bungcip.better-toml",
"rkrishnasanka.lfr",
"rkrishnasanka.uf",
"LittleFoxTeam.vscode-python-test-adapter"
]
}
},
"features": {
"ghcr.io/devcontainers-contrib/features/black:2": {},
"ghcr.io/devcontainers-contrib/features/isort:2": {},
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
"ghcr.io/devcontainers-contrib/features/pylint:2": {}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
}
"remoteUser": "root"
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pdf binary
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,11 @@ dmypy.json

# Output
out/
output/

.idea/
.antlr/
Verilog2001.g4

*.old
pre_processor_dump.lfr
pre_processor_dump.lfr
15 changes: 12 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[submodule "test"]
path = test
url = https://github.com/CIDARLAB/LFR-TestCases.git
[submodule "pymint"]
path = pymint
url = https://github.com/cidarlab/pymint
branch = master
[submodule "pyparchmint"]
path = pyparchmint
url = https://github.com/cidarlab/pyparchmint
branch = master
[submodule "dafd"]
path = dafd
url = https://github.com/rkrishnasanka/dafd
branch = master
17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
"args": [
"--outpath",
"./out/",
"--technology",
"dropx",
"${file}"
],
"console": "integratedTerminal"
Expand All @@ -91,6 +93,21 @@
],
"console": "integratedTerminal"
},
{
"name": "Debug - Customfile, NO GEN (with distribute library)",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/lfr/cmdline.py",
"args": [
"--no-gen",
"--outpath",
"./out/",
"--pre-load",
"../LFR-Testcases/distribute-library",
"${file}"
],
"console": "integratedTerminal"
},
{
"name": "Debug - CLI TEST",
"type": "python",
Expand Down
18 changes: 13 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
{
"python.linting.flake8Enabled": true,
"python.linting.flake8Enabled": false,
"python.linting.enabled": true,
"python.linting.flake8Args": ["--max-line-length=88", "--ignore=E203"],
"python.linting.flake8Args": [
"--max-line-length=88",
"--ignore=E203"
],
"python.formatting.provider": "black",
"editor.formatOnSave": true,
"python.linting.pylintEnabled": false,
"python.linting.pylintEnabled": true,
"python.formatting.blackArgs": [
"--line-length=88",
"--experimental-string-processing"
]
}
],
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
}
Binary file added LFR-Logo-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# LFR
# LFR <img align="right" src="LFR-Logo-01.png" width="250">

## Dependencies

Expand All @@ -8,8 +8,16 @@ LFR requires the user to install graphviz onto the system for the pygraphviz dep

We need ANTLR for generating the listener. Install ANTLR4 from the [website](https://www.antlr.org/index.html)

### LFR Grammar

```
antlr4 -o ./lfr/antlrgen/lfr -listener -visitor -Dlanguage=Python3 -lib . ./lfrX.g4
```

### Reggie(Graph Match) Grammar

```
antlr4 -o ./lfr/antlrgen -listener -visitor -Dlanguage=Python3 -lib . ./lfrX.g4
antlr4 -o ./lfr/antlrgen/reggie -listener -visitor -Dlanguage=Python3 -lib . ./reggie.g4
```

### Graphviz
Expand Down
1 change: 1 addition & 0 deletions dafd
Submodule dafd added at 3c60c9
File renamed without changes.
Loading