-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: christophkloeffel <[email protected]>
- Loading branch information
1 parent
91a4f33
commit 549c209
Showing
16 changed files
with
91 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package Foo | ||
|
||
type T { | ||
a optional Integer | ||
b optional Integer | ||
d optional Integer | ||
} | ||
|
||
checks T { | ||
a != null, "a is null", a | ||
a == null, "a is not null", a | ||
null == null, "null is not null" | ||
d == null, "d is not null", d | ||
} |
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,6 @@ | ||
package Foo | ||
|
||
T Test { | ||
a = 1 | ||
b = 2 | ||
} |
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,5 @@ | ||
null == null, "null is not null" | ||
^^ rbt-restricted-null-1/foo.rsl:12: issue: expression is always true [vcg-always-true] | ||
a = 1 | ||
^ rbt-restricted-null-1/foo.trlc:4: check error: a is not null | ||
Processed 1 model(s), 0 check(s) and 1 requirement file(s) and found 1 warning(s) and 1 error(s) |
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 @@ | ||
rbt-restricted-null-1/foo.trlc:4:9: trlc check error: a is not null |
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,3 @@ | ||
a = 1 | ||
^ rbt-restricted-null-1/foo.trlc:4: check error: a is not null | ||
Processed 1 model(s), 0 check(s) and 1 requirement file(s) and found 1 error(s) |
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,5 @@ | ||
null == null, "null is not null" | ||
^^ rbt-restricted-null-1/foo.rsl:12: issue: expression is always true [vcg-always-true] | ||
a = 1 | ||
^ rbt-restricted-null-1/foo.trlc:4: check error: a is not null | ||
Processed 1 model(s), 0 check(s) and 1 requirement file(s) and found 1 warning(s) and 1 error(s) |
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,2 @@ | ||
LRM.Null_Equivalence | ||
LRM.Unspecified_Optional_Components |
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,19 @@ | ||
package Foo | ||
|
||
type A { | ||
a optional Integer | ||
b optional Integer | ||
} | ||
|
||
type T { | ||
c optional Integer | ||
d optional Integer | ||
} | ||
|
||
checks A { | ||
(a + b) > null, "(a+b) < null", a | ||
} | ||
|
||
checks T { | ||
d == (if c then null else d), "not permitted" | ||
} |
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,5 @@ | ||
package Foo | ||
|
||
T Test { | ||
c = 3 | ||
} |
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,5 @@ | ||
(a + b) > null, "(a+b) < null", a | ||
^^^^ rbt-restricted-null-2/foo.rsl:14: error: null is not permitted here | ||
d == (if c then null else d), "not permitted" | ||
^^^^ rbt-restricted-null-2/foo.rsl:18: error: null is not permitted here | ||
Processed 1 model(s), 0 check(s) and 1 requirement file(s) and found 2 error(s) |
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,2 @@ | ||
rbt-restricted-null-2/foo.rsl:14:15: trlc error: null is not permitted here | ||
rbt-restricted-null-2/foo.rsl:18:21: trlc error: null is not permitted here |
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,5 @@ | ||
(a + b) > null, "(a+b) < null", a | ||
^^^^ rbt-restricted-null-2/foo.rsl:14: error: null is not permitted here | ||
d == (if c then null else d), "not permitted" | ||
^^^^ rbt-restricted-null-2/foo.rsl:18: error: null is not permitted here | ||
Processed 1 model(s), 0 check(s) and 1 requirement file(s) and found 2 error(s) |
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,5 @@ | ||
(a + b) > null, "(a+b) < null", a | ||
^^^^ rbt-restricted-null-2/foo.rsl:14: error: null is not permitted here | ||
d == (if c then null else d), "not permitted" | ||
^^^^ rbt-restricted-null-2/foo.rsl:18: error: null is not permitted here | ||
Processed 1 model(s), 0 check(s) and 1 requirement file(s) and found 2 error(s) |
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 @@ | ||
LRM.Null_Is_Invalid |
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