-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix typing of attributes in nested binders + tests
- Loading branch information
Showing
9 changed files
with
214 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
; File auto-generated by gentests.ml | ||
|
||
; Auto-generated part begin | ||
; Test for let_seq.smt2 | ||
; Incremental test | ||
|
||
(rule | ||
(target let_seq.incremental) | ||
(deps (:input let_seq.smt2)) | ||
(package dolmen_bin) | ||
(action (chdir %{workspace_root} | ||
(with-outputs-to %{target} | ||
(with-accepted-exit-codes (or 0 (not 0)) | ||
(run dolmen --mode=incremental --color=never %{input} %{read-lines:flags.dune})))))) | ||
(rule | ||
(alias runtest) | ||
(package dolmen_bin) | ||
(action (diff let_seq.expected let_seq.incremental))) | ||
|
||
; Full mode test | ||
|
||
(rule | ||
(target let_seq.full) | ||
(deps (:input let_seq.smt2)) | ||
(package dolmen_bin) | ||
(action (chdir %{workspace_root} | ||
(with-outputs-to %{target} | ||
(with-accepted-exit-codes (or 0 (not 0)) | ||
(run dolmen --mode=full --color=never %{input} %{read-lines:flags.dune})))))) | ||
(rule | ||
(alias runtest) | ||
(package dolmen_bin) | ||
(action (diff let_seq.expected let_seq.full))) | ||
|
||
|
||
; Test for nest_pattern.smt2 | ||
; Incremental test | ||
|
||
(rule | ||
(target nest_pattern.incremental) | ||
(deps (:input nest_pattern.smt2)) | ||
(package dolmen_bin) | ||
(action (chdir %{workspace_root} | ||
(with-outputs-to %{target} | ||
(with-accepted-exit-codes (or 0 (not 0)) | ||
(run dolmen --mode=incremental --color=never %{input} %{read-lines:flags.dune})))))) | ||
(rule | ||
(alias runtest) | ||
(package dolmen_bin) | ||
(action (diff nest_pattern.expected nest_pattern.incremental))) | ||
|
||
; Full mode test | ||
|
||
(rule | ||
(target nest_pattern.full) | ||
(deps (:input nest_pattern.smt2)) | ||
(package dolmen_bin) | ||
(action (chdir %{workspace_root} | ||
(with-outputs-to %{target} | ||
(with-accepted-exit-codes (or 0 (not 0)) | ||
(run dolmen --mode=full --color=never %{input} %{read-lines:flags.dune})))))) | ||
(rule | ||
(alias runtest) | ||
(package dolmen_bin) | ||
(action (diff nest_pattern.expected nest_pattern.full))) | ||
|
||
|
||
; Test for simple_pattern.smt2 | ||
; Incremental test | ||
|
||
(rule | ||
(target simple_pattern.incremental) | ||
(deps (:input simple_pattern.smt2)) | ||
(package dolmen_bin) | ||
(action (chdir %{workspace_root} | ||
(with-outputs-to %{target} | ||
(with-accepted-exit-codes (or 0 (not 0)) | ||
(run dolmen --mode=incremental --color=never %{input} %{read-lines:flags.dune})))))) | ||
(rule | ||
(alias runtest) | ||
(package dolmen_bin) | ||
(action (diff simple_pattern.expected simple_pattern.incremental))) | ||
|
||
; Full mode test | ||
|
||
(rule | ||
(target simple_pattern.full) | ||
(deps (:input simple_pattern.smt2)) | ||
(package dolmen_bin) | ||
(action (chdir %{workspace_root} | ||
(with-outputs-to %{target} | ||
(with-accepted-exit-codes (or 0 (not 0)) | ||
(run dolmen --mode=full --color=never %{input} %{read-lines:flags.dune})))))) | ||
(rule | ||
(alias runtest) | ||
(package dolmen_bin) | ||
(action (diff simple_pattern.expected simple_pattern.full))) | ||
|
||
|
||
; Auto-generated part end |
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 @@ | ||
--debug |
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,20 @@ | ||
[logic][parsed][0-15] set-logic: ALL | ||
[logic][typed][0-15] other_1[0-15]: | ||
set-logic: ALL = | ||
{ theories: core, arrays, bitv, floats, string, | ||
int+real; | ||
features: { free_sorts : true; | ||
free_functions : true; | ||
datatypes : true; | ||
quantifiers : true; | ||
arithmetic : regular; | ||
arrays : all; }; }]} | ||
|
||
[logic][parsed][16-79] antecedent: (let (x : 5) in (= x x){(:foo bar)}) | ||
File "tests/typing/pass/smtlib/v2.6/attribute/let_seq.smt2", line 5, character 5-13: | ||
5 | :foo bar | ||
^^^^^^^^ | ||
Warning Unknown attribute (the attribtue was ignored): `:foo` | ||
[logic][typed][16-79] hyp_1[16-79]: | ||
hyp: let x/160 = 5/159 in x/160 = x/160 | ||
|
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,8 @@ | ||
(set-logic ALL) | ||
(assert | ||
(let ((x 5)) | ||
(! (= x x) | ||
:foo bar | ||
) | ||
) | ||
) |
21 changes: 21 additions & 0 deletions
21
tests/typing/pass/smtlib/v2.6/attribute/nest_pattern.expected
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,21 @@ | ||
[logic][parsed][0-15] set-logic: ALL | ||
[logic][typed][0-15] other_1[0-15]: | ||
set-logic: ALL = | ||
{ theories: core, arrays, bitv, floats, string, | ||
int+real; | ||
features: { free_sorts : true; | ||
free_functions : true; | ||
datatypes : true; | ||
quantifiers : true; | ||
arithmetic : regular; | ||
arrays : all; }; }]} | ||
|
||
[logic][parsed][16-125] antecedent: | ||
(∀ (x : Int) . | ||
(∀ (y : Int) . (= x y)){(:pattern (sexpr x))}) | ||
[logic][typed][16-125] hyp_1[16-125]: | ||
hyp: | ||
∀ x/159 : int/4. | ||
{ multi-trigger int/4 x/159; } | ||
(∀ y/160 : int/4. x/159 = y/160) | ||
|
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 @@ | ||
(set-logic ALL) | ||
(assert | ||
(forall ((x Int)) | ||
(! (forall ((y Int)) | ||
(= x y) | ||
) | ||
:pattern (x) | ||
) | ||
) | ||
) |
20 changes: 20 additions & 0 deletions
20
tests/typing/pass/smtlib/v2.6/attribute/simple_pattern.expected
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,20 @@ | ||
[logic][parsed][0-15] set-logic: ALL | ||
[logic][typed][0-15] other_1[0-15]: | ||
set-logic: ALL = | ||
{ theories: core, arrays, bitv, floats, string, | ||
int+real; | ||
features: { free_sorts : true; | ||
free_functions : true; | ||
datatypes : true; | ||
quantifiers : true; | ||
arithmetic : regular; | ||
arrays : all; }; }]} | ||
|
||
[logic][parsed][16-88] antecedent: | ||
(∀ (x : Int) . (= x x){(:pattern (sexpr x))}) | ||
[logic][typed][16-88] hyp_1[16-88]: | ||
hyp: | ||
∀ x/159 : int/4. | ||
{ multi-trigger int/4 x/159; } | ||
(x/159 = x/159) | ||
|
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,8 @@ | ||
(set-logic ALL) | ||
(assert | ||
(forall ((x Int)) | ||
(! (= x x) | ||
:pattern (x) | ||
) | ||
) | ||
) |