Skip to content

Bug: Type dependencies not resolved #357

@ssyram

Description

@ssyram

Now Eurydice might generate codes having a wrong order in the types. I.e., there might be cases:

typedef struct Option_hash { Option_hash_tags tag; InternalTyp f0; }

But the internal type InternalTyp is defined below this type Option_hash.

This becomes obvious and troublesome to handle when translating large scale programs.

We suggest the following plan for handling type declarations:

  • Firstly, collect all the possible types, and have them all declared forwardly;
  • Then, we collect the actual type dependencies in the types and print the types in topological order by the dependency tree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions