Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unannotated ports pass compilation check but cannot be accessed within filament #194

Open
UnsignedByte opened this issue Jun 26, 2023 · 0 comments
Labels
bug Something isn't working C: language Component: the Filament language S: available This is available to be worked on

Comments

@UnsignedByte
Copy link
Collaborator

Ports can be defined without lifetimes due to the unannotated port feature, but internally are stored differently which leads to hard-to-diagnose behavior.

The following example passes frontend parsing but doesn't compile:

comp main<G: 1>(
    in: 32
) -> (
  @[G, G+1] out: 32
) {
  out = in;
}

Error:

error: undefined port name: in
  ┌─ tests/compile/unannotated-port.fil:8:9
  │
8 │   out = in;
  │         ^^ unknown port

Compilation failed with 1 errors.
Run with --show-models to generate assignments for failing constraints.

Could possibly either add an error for defining unannotated ports or redefine behavior for better functionality (I.E. always-alive ports).

@UnsignedByte UnsignedByte added C: language Component: the Filament language C: Internals Component: Compiler internals labels Jun 26, 2023
@rachitnigam rachitnigam added bug Something isn't working S: available This is available to be worked on and removed C: Internals Component: Compiler internals labels Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working C: language Component: the Filament language S: available This is available to be worked on
Projects
None yet
Development

No branches or pull requests

2 participants