-
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.
- Loading branch information
trdthg
committed
Jul 29, 2024
1 parent
09ac4b2
commit bd229e9
Showing
9 changed files
with
232 additions
and
5 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
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 @@ | ||
struct bool2 = { | ||
field: bool, | ||
} | ||
|
||
mapping m : bool <-> bool2 = { | ||
true <-> struct { field = true }, | ||
false <-> struct{ field = false }, | ||
} | ||
|
||
let foo = m(true) |
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,43 @@ | ||
[93mWarning[0m: Incomplete pattern match statement at [96mwarn_mapping_imcomplete.sail[0m:10.0-7: | ||
10[96m |[0mmapping imcomplete_oneside : bool <-> bool2 = { | ||
[91m |[0m[91m^-----^[0m | ||
[91m |[0m | ||
The following expression is unmatched: [93mstruct { field = true }[0m | ||
|
||
[93mWarning[0m: Incomplete pattern match statement at [96mwarn_mapping_imcomplete.sail[0m:15.0-7: | ||
15[96m |[0mmapping imcomplete_both_side : bool <-> bool2 = { | ||
[91m |[0m[91m^-----^[0m | ||
[91m |[0m | ||
The following expression is unmatched: [93mfalse[0m | ||
|
||
[93mWarning[0m: Unreachable pattern match type at [96mwarn_mapping_imcomplete.sail[0m:20.0-7: | ||
20[96m |[0mmapping forwords_unreachable : bool <-> int = { | ||
[91m |[0m[91m^-----^[0m | ||
[91m |[0m | ||
The following type is unreachable: [93mint[0m | ||
|
||
[93mWarning[0m: Unreachable pattern match type at [96mwarn_mapping_imcomplete.sail[0m:24.0-7: | ||
24[96m |[0mmapping backwords_unreachable : bool <-> int = { | ||
[91m |[0m[91m^-----^[0m | ||
[91m |[0m | ||
The following type is unreachable: [93mbool[0m | ||
|
||
[93mWarning[0m: Unreachable pattern match type at [96mwarn_mapping_imcomplete.sail[0m:28.0-7: | ||
28[96m |[0mmapping multi_warning : bool <-> int = { | ||
[91m |[0m[91m^-----^[0m | ||
[91m |[0m | ||
The following type is unreachable: [93mbool[0m | ||
|
||
[93mWarning[0m: Incomplete pattern match statement at [96mwarn_mapping_imcomplete.sail[0m:28.0-7: | ||
28[96m |[0mmapping multi_warning : bool <-> int = { | ||
[91m |[0m[91m^-----^[0m | ||
[91m |[0m | ||
The following expression is unmatched: [93m3[0m | ||
|
||
[93mWarning[0m: Unreachable pattern match type at Code generated nearby: | ||
[96mwarn_mapping_imcomplete.sail[0m:38.0-79: | ||
38[96m |[0mmapping clause encdec = true if enabled <-> struct { field = false } if enabled | ||
[91m |[0m[91m^-----------------------------------------------------------------------------^[0m | ||
[91m |[0m | ||
The following type is unreachable: [93mbool[0m | ||
|
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,40 @@ | ||
struct bool2 = { | ||
field: bool, | ||
} | ||
|
||
mapping complete : bool <-> bool2 = { | ||
true <-> struct { field = false }, | ||
false <-> struct{ field = true }, | ||
} | ||
|
||
mapping imcomplete_oneside : bool <-> bool2 = { | ||
true <-> struct { field = false }, | ||
false <-> struct { field = false }, | ||
} | ||
|
||
mapping imcomplete_both_side : bool <-> bool2 = { | ||
true <-> struct { field = false }, | ||
true <-> struct { field = false }, | ||
} | ||
|
||
mapping forwords_unreachable : bool <-> int = { | ||
forwards _ => 1, | ||
} | ||
|
||
mapping backwords_unreachable : bool <-> int = { | ||
backwards _ => false, | ||
} | ||
|
||
mapping multi_warning : bool <-> int = { | ||
backwards 2 => false, | ||
} | ||
|
||
register enabled : bool | ||
|
||
val encdec : bool <-> bool2 | ||
|
||
scattered mapping encdec | ||
|
||
mapping clause encdec = true if enabled <-> struct { field = false } if enabled | ||
|
||
end encdec |
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