You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+47-68Lines changed: 47 additions & 68 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,18 @@
1
-
EdgeFlow Compiler with Semantic Analysis
2
-
==========================================
1
+
# EdgeFlow Compiler with Semantic Analysis
3
2
4
3
EdgeFlow is a domain-specific language (DSL) and compiler for optimizing TensorFlow Lite models for edge deployment. Users write simple `.ef` configuration files that describe optimization strategies (e.g., INT8 quantization), target devices, and goals like latency or size. The CLI parses these configs and runs the optimization pipeline.
5
4
6
5
**NEW: Comprehensive Semantic Analysis System** - The compiler now includes a sophisticated semantic analyzer that validates DSL models for shape compatibility, parameter ranges, resource constraints, and device compatibility before code generation.
7
6
8
7
Project Status: CLI with semantic analysis, tests, and CI. Parser and optimizer integration points ready.
9
8
10
-
Overview
11
-
--------
9
+
## Overview
12
10
13
11
- Language: EdgeFlow `.ef` configuration files
14
12
- Targets: TFLite models on edge devices (e.g., Raspberry Pi)
@@ -105,13 +97,12 @@ Generate Python parser/lexer into the `parser/` package:
105
97
106
98
After generation, `parser/` contains `EdgeFlowLexer.py`, `EdgeFlowParser.py`, `EdgeFlowVisitor.py`, etc. The CLI automatically uses them when present; otherwise it falls back to a simple line-based parser.
107
99
108
-
Running the Compiler
109
-
--------------------
100
+
## Running the Compiler
110
101
111
102
Parse a `.ef` config and run the (placeholder) optimization pipeline:
│ ├── reporting/ # Error reporting and explainability
169
+
│ ├── benchmarking/ # Performance benchmarking
170
+
│ ├── config/ # Configuration handling
171
+
│ ├── ir/ # Intermediate Representation
172
+
│ ├── pipeline/ # Pipeline orchestration
173
+
│ ├── utils/ # Utility functions
174
+
│ ├── parser/ # Parser logic
175
+
│ ├── backend/ # Backend API
176
+
│ └── frontend/ # Frontend application
177
+
├── scripts/ # Helper scripts
178
+
├── tests/ # Unit and integration tests
179
+
├── docs/ # Documentation
180
+
├── .github/workflows/ # CI/CD workflows
192
181
├── requirements.txt # Runtime dependencies
193
182
├── requirements-dev.txt # Dev/test dependencies
194
183
├── README.md # This file
195
-
└── .pre-commit-config.yaml# Pre-commit hooks
184
+
└── Makefile# Build automation
196
185
```
197
186
198
-
Integration Points
199
-
------------------
187
+
## Integration Points
200
188
201
189
- Parser (`parser.parse_ef(path)`): `edgeflowc.load_config` tries to import and call this. If not found yet, it falls back to returning a minimal config with raw text.
202
190
- Optimizer (`optimizer.optimize(config)`): `edgeflowc.optimize_model` tries to import and call this. If not found yet, it logs a message and continues.
GitHub Actions runs on pushes and PRs for Python 3.11:
232
218
@@ -235,14 +221,13 @@ GitHub Actions runs on pushes and PRs for Python 3.11:
235
221
- Tests with coverage (fail below 90%)
236
222
- Coverage badge artifact generated via `genbadge`
237
223
238
-
Web Interface
239
-
-------------
224
+
## Web Interface
240
225
241
226
Backend (FastAPI):
242
227
243
-
- App entry: `backend/app.py`
228
+
- App entry: `src/edgeflow/backend/app.py`
244
229
- Endpoints with strict CLI parity:
245
-
-`POST /api/compile` (maps to `python edgeflowc.py config.ef`)
230
+
-`POST /api/compile` (maps to `python -m edgeflow.compiler.edgeflowc config.ef`)
246
231
-`POST /api/compile/verbose` (maps to `--verbose`)
247
232
-`POST /api/optimize` (optimization phase)
248
233
-`POST /api/benchmark` (benchmarking)
@@ -264,8 +249,7 @@ docker-compose up --build
264
249
# Frontend: http://localhost:3000
265
250
```
266
251
267
-
Production (CD + Reverse Proxy)
268
-
-------------------------------
252
+
## Production (CD + Reverse Proxy)
269
253
270
254
- Continuous Deployment builds/pushes GHCR images, then deploys over SSH with Docker Compose on the server.
271
255
- Public site: <https://edgeflow.pointblank.club/>
@@ -274,29 +258,24 @@ Production (CD + Reverse Proxy)
274
258
- Frontend: `13000` (container 3000)
275
259
- Recommended: bind services to `127.0.0.1` and expose via Nginx with TLS (Certbot). Frontend proxies `/api/*` to backend inside the Docker network; backend need not be directly exposed.
276
260
277
-
Contributing
278
-
------------
261
+
## Contributing
279
262
280
263
- Open a PR with a focused set of changes
281
264
- Ensure `black`, `isort`, `flake8`, and `mypy` pass
282
265
- Add/Update tests to maintain ≥90% coverage
283
266
- Clearly document changes in docstrings and README where relevant
284
267
285
-
Security Notes
286
-
--------------
268
+
## Security Notes
287
269
288
270
- The CLI validates that the input path is a regular file with a `.ef` extension.
289
271
- Paths are normalized and resolved; the CLI does not follow any network or remote sources.
290
272
- Future work: sandbox model handling and ensure safe file operations during optimization.
291
273
292
-
License
293
-
-------
274
+
## License
294
275
295
276
TBD (add the appropriate license file for your project).
296
277
297
-
298
-
Compatibility Check (CLI)
299
-
-------------------------
278
+
## Compatibility Check (CLI)
300
279
301
280
-`--check-only`: run device compatibility check and exit
0 commit comments