Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Attribute resolution and intermediate representation

Đang mở
#3 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
compilers

Hướng nghiên cứu

Bắt đầu bằng cách xác định AST đã được phân tích cú pháp, điểm vào của renderer và pass lowering AST-to-IR được mô tả trong issue. Xem xét cách các statement, subgraph, attribute và chuỗi edge được biểu diễn trước khi thiết kế IR. Công việc được hoàn tất khi pass lowering phân giải các attribute kế thừa, loại bỏ các node trùng lặp, mở rộng các edge và tạo ra các cấu trúc graph, node, edge và cluster được chỉ định.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

The parsed AST is a syntactic representation of the DOT file. The renderer needs a semantic intermediate representation (IR) that resolves attribute inheritance, deduplicates nodes, and builds an adjacency structure suitable for layout algorithms.

The IR consists of IrGraph (nodes, edges, clusters, graph-level attributes), IrNode (id, label, resolved attributes, position/size slots for layout to fill), IrEdge (from/to indices, label, resolved attributes, routed points for layout to fill), and IrCluster (node indices, sub-clusters, bounding box for layout to fill). Attributes are stored as a string map with typed accessor methods for known attributes like shape, color, and fontsize; unknown attributes are silently ignored.

The AST-to-IR lowering pass walks statements in order, maintaining a scope stack with default attribute maps for graph, node, and edge targets. AttributeStatement updates the current scope's defaults. Nodes are deduplicated by ID, with later attribute declarations merged in. Edge chains like A -> B -> C are expanded into individual edges. Subgraphs whose IDs start with cluster_ produce IrCluster entries. Subgraph edge targets are expanded to edges from/to all nodes in the subgraph.

Ngôn ngữ chính
Rust
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của terror/dotgraph

Tất cả issue của terror/dotgraph

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.