alcides / aeon

Aeon programming language
https://alcides.github.io/aeon/
8 stars 3 forks source link

Ignore should be tied to the target of synthesis, not the ignored function. #29

Closed alcides closed 5 months ago

alcides commented 6 months ago

The problematic use case is when we have a module M, which is imported from both files A and B. A wants to ignore everything in M, but B wants to ignore only a few. The current ignore decorator does not support this use case.

Inspired by Aesop, a solution is to wrap the target function in a syn_ignore decorator:

# M.ae
def c1 : Int = 1;
def c2 : Int = 2;

# A.ae
@syn_ignore(c1, c2)
def k : Int := ( ?h : Int )

# B.ae
@syn_ignore(c1)
def g : Int := ( ?g : Int )

This feature might require Metadata in decorators (#30) Namespaces can be used as ignoring keywords (#26).