Centrifuge
Parse GraphML, crunch with Alga, pretty-print to VHDL
Install / Use
/learn @tuura/CentrifugeREADME
Centrifuge
Let's put these networks through our centrifuge? Sure, will do!
The "Centrifuge" DSL is a modelling tool for networks.
Features
- Import networks from GraphML files with
readNetworkfunction. Supply a parser function for network nodes. - Split, merge or remove vertices.
- Induce subnetworks.
- Generate VHDL circuit descriptions for simulation.
Try "Centrifuge" interactively in GHCi
Module Centrifuge.DSL.Protein contains a trivial instantiation of the "Centrifuge" DSL tied up to protein networks (valuable for drug discovery). Here is an example session.
Run GHCi with stack:
> stack ghci
Enable the OverloadedStrings extension to use ByteString literals
> :set -XOverloadedStrings
Import the network from GraphML file
> g1 <- readProteinNetwork "examples/graphs/fdl_17.graphml"
> print g1
[("A","B"), ("B","C"), ("B","D"), ("C","E"), ("D","E")]
Vertex merging
> g2 = mergeVertices ["C","D"] "CD" g1
> print g2
[("A","B"), ("B","CD"), ("CD","E")]
Vertex splitting
> g3 = splitVertex "CD" ["C","D"] g2
> print g3
[("A","B"), ("B","C"), ("B","D"), ("C","E"), ("D","E")]
Subgraph induction
> relevantProtein p = p ‘notElem‘ ["A","D","CD"]
> induce relevantProtein g3
[("B","C"), ("C","E")]
VHDL outout
> writeVHDL g3 "circuit.vhdl"
More info
This repo is meant to be an accompanying material for "Language and Hardware Acceleration Backend for Graph Processing" FDL'17 paper.
VHDL code generation is a port of a corresponding pangraph module.
Graph manipulation and transformation are performed be means of Algebraic graphs.
Related Skills
node-connect
348.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
348.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
348.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
