-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issues with missing well-formedness checks
Make sure numeric type synonyms with arguments are expanded correctly
- Loading branch information
Showing
19 changed files
with
94 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[93mType error[0m: | ||
[96mfail/wf_assign_type.sail[0m:9.10-17: | ||
9[96m |[0m var Y : bits(X) = 0b00; | ||
[91m |[0m [91m^-----^[0m | ||
[91m |[0m Well-formedness check failed for type | ||
[91m |[0m | ||
[91m |[0m [93mCaused by [0m[96mfail/wf_assign_type.sail[0m:9.15-16: | ||
[91m |[0m 9[96m |[0m var Y : bits(X) = 0b00; | ||
[91m |[0m [91m |[0m [91m^[0m | ||
[91m |[0m [91m |[0m Undefined type synonym X |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
default Order dec | ||
|
||
$include <prelude.sail> | ||
|
||
type bar : Int = 10 | ||
|
||
function foo() -> bits(bar) = { | ||
let X = sizeof(bar); | ||
var Y : bits(X) = 0b00; | ||
Y | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
default Order dec | ||
|
||
$include <prelude.sail> | ||
|
||
type x : Int = 8 | ||
|
||
type operator /('n : Int, 'm : Int) -> Int = div('n, 'm) | ||
|
||
register r : bits(x / 2) = 0x0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[93mType error[0m: | ||
[96mpass/wf_register_type/v1.sail[0m:7.13-24: | ||
7[96m |[0mregister r : bits(x / 2) = 0x0 | ||
[91m |[0m [91m^---------^[0m | ||
[91m |[0m Well-formedness check failed for type | ||
[91m |[0m | ||
[91m |[0m [93mCaused by [0m[96mpass/wf_register_type/v1.sail[0m:7.18-23: | ||
[91m |[0m 7[96m |[0mregister r : bits(x / 2) = 0x0 | ||
[91m |[0m [91m |[0m [91m^---^[0m | ||
[91m |[0m [91m |[0m Unknown type level operator or function (operator /) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
default Order dec | ||
|
||
$include <prelude.sail> | ||
|
||
type x : Int = 8 | ||
|
||
register r : bits(x / 2) = 0x0 |