cornell-zhang / heterocl

HeteroCL: A Multi-Paradigm Programming Infrastructure for Software-Defined Heterogeneous Computing
https://cornell-zhang.github.io/heterocl/
Apache License 2.0
322 stars 92 forks source link

[Fix] Add name string legalizer and test case for #454 #455

Closed zzzDavid closed 2 years ago

zzzDavid commented 2 years ago

Fix issue #454

Fixed issue: #454

Detailed description:

This issue is fixed by adding a name legalization process for all the API functions. When an illegal name is set from user, the legalizer changes the name to legal ones and also throws out a warning. Specifically:

A-A  -->  A_A
A A  -->  A_A
A.A  -->  A_A
A/A  -->  A_A

Test case: tests/issues/test_issue_454.py