-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from hansjoergschurr/devel/fix-step-no-proven
Fix nary stuff
- Loading branch information
Showing
5 changed files
with
59 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,61 @@ | ||
; Tests for the gerneral programs. | ||
|
||
(include "../theories/Core.smt2") | ||
|
||
; Proof rule to test if the parameter `test` evaluates to `reference` | ||
(declare-rule is_equals ((T Type) (test T) (reference T)) | ||
:args (test reference) | ||
:requires ((test reference)) | ||
:conclusion true | ||
) | ||
|
||
(include "../programs/Nary.smt2") | ||
|
||
(declare-const c1 Bool) | ||
(declare-const c2 Bool) | ||
(declare-const c3 Bool) | ||
|
||
; Test removeRight | ||
(step rr1 :rule is_equals :args ((removeRight c1 (or c2 c1)) c2)) | ||
(step rr2 :rule is_equals :args ((removeRight c1 (or c1 c2)) c2)) | ||
(step rr3 :rule is_equals :args ((removeRight c1 (or c1 (or c2 c3))) (or c2 c3))) | ||
(step rr4 :rule is_equals :args ((removeRight c1 (or c2 (or c1 c3))) (or c2 c3))) | ||
(step rr5 :rule is_equals :args ((removeRight c1 (or c2 (or c3 c2))) (or c2 c3))) | ||
(declare-rule check_removeRight((x Bool) (in Bool) (out Bool)) | ||
:args (x in out) | ||
:requires (((removeRight x in) out)) | ||
:conclusion true | ||
) | ||
(step rr1 :rule check_removeRight :args (c1 (or c2 c1) c2)) | ||
(step rr2 :rule check_removeRight :args (c1 (or c1 c2) c2)) | ||
(step rr3 :rule check_removeRight :args (c1 (or c1 (or c2 c3)) (or c2 c3))) | ||
(step rr4 :rule check_removeRight :args (c1 (or c2 (or c1 c3)) (or c2 c3))) | ||
(step rr5 :rule check_removeRight :args (c1 (or c2 (or c3 c2)) (or c2 (or c3 c2)))) | ||
|
||
; Test appendRight | ||
(step ar1 :rule is_equals :args ((appendRight or c1 c2) (or c1 c2))) | ||
(step ar2 :rule is_equals :args ((appendRight or c3 (or c1 c2)) (or c1 (or c2 c3)))) | ||
(step ar3 :rule is_equals :args ((appendRight or c3 (or (or c1 c1) c2)) (or (or c1 c1) (or c2 c3)))) | ||
(step ar4 :rule is_equals :args ((appendRight or c3 (or c1 (or c1 c2))) (or c1 (or c1 (or c2 c3))))) | ||
(declare-rule check_appendRight((t1 Bool) (t2 Bool) (out Bool)) | ||
:args (t1 t2 out) | ||
:requires (((appendRight or t1 t2) out)) | ||
:conclusion true | ||
) | ||
(step ar1 :rule check_appendRight :args (c1 c2 (or c1 c2))) | ||
(step ar2 :rule check_appendRight :args (c3 (or c1 c2) (or c3 (or c1 c2)))) | ||
(step ar3 :rule check_appendRight :args (c3 (or (or c1 c1) c2) (or c3 (or (or c1 c1) c2)))) | ||
(step ar4 :rule check_appendRight :args (c3 (or c1 (or c1 c2)) (or c3 (or c1 (or c1 c2))))) | ||
(step ar5 :rule check_appendRight :args ((or c1 c2) c3 (or c1 (or c2 c3)))) | ||
(step ar6 :rule check_appendRight :args ((or (or c1 c1) c2) c3 (or (or c1 c1) (or c2 c3)))) | ||
(step ar7 :rule check_appendRight :args ((or c1 (or c1 c2)) c3 (or c1 (or c1 (or c2 c3))))) | ||
|
||
; Test removeLeft | ||
(step rl1 :rule is_equals :args ((removeLeft c1 (or c2 c1)) c2)) | ||
(step rl2 :rule is_equals :args ((removeLeft c1 (or c1 c2)) c2)) | ||
(step rl3 :rule is_equals :args ((removeLeft c1 (or (or c1 c2) c3)) (or c2 c3))) | ||
(step rl4 :rule is_equals :args ((removeLeft c1 (or (or c2 c1) c3)) (or c2 c3))) | ||
(step rl5 :rule is_equals :args ((removeLeft c1 (or (or c2 c3) c2)) (or c2 c3))) | ||
(declare-rule check_removeLeft((x Bool) (in Bool) (out Bool)) | ||
:args (x in out) | ||
:requires (((removeLeft x in) out)) | ||
:conclusion true | ||
) | ||
(step rl1 :rule check_removeLeft :args (c1 (or c2 c1) c2)) | ||
(step rl2 :rule check_removeLeft :args (c1 (or c1 c2) c2)) | ||
(step rl3 :rule check_removeLeft :args (c1 (or (or c1 c2) c3) (or c2 c3))) | ||
(step rl4 :rule check_removeLeft :args (c1 (or (or c2 c1) c3) (or c2 c3))) | ||
(step rl5 :rule check_removeLeft :args (c1 (or (or c2 c3) c2) (or (or c2 c3) c2))) | ||
|
||
; Test appendLeft | ||
(step al1 :rule is_equals :args ((appendLeft or c1 c2) (or c1 c2))) | ||
(step al2 :rule is_equals :args ((appendLeft or c3 (or c1 c2) ) (or (or c3 c1) c2))) | ||
(step al3 :rule is_equals :args ((appendLeft or c3 (or (or c1 c1) c2)) (or (or (or c3 c1) c1) c2))) | ||
(step al4 :rule is_equals :args ((appendLeft or c3 (or c1 (or c1 c2))) (or (or c3 (or c1 c1)) c2))) | ||
(declare-rule check_appendLeft((t1 Bool) (t2 Bool) (out Bool)) | ||
:args (t1 t2 out) | ||
:requires (((appendLeft or t1 t2) out)) | ||
:conclusion true | ||
) | ||
(step al1 :rule check_appendLeft :args (c1 c2 (or c1 c2))) | ||
(step al2 :rule check_appendLeft :args (c3 (or c1 c2) (or (or c3 c1) c2))) | ||
(step al3 :rule check_appendLeft :args (c3 (or (or c1 c1) c2) (or (or (or c3 c1) c1) c2))) | ||
(step al4 :rule check_appendLeft :args (c3 (or c1 (or c1 c2)) (or (or c3 c1) (or c1 c2)))) | ||
(step al5 :rule check_appendLeft :args ((or c1 c2) c3 (or (or c1 c2) c3))) | ||
(step al6 :rule check_appendLeft :args ((or (or c1 c1) c2) c3 (or (or (or c1 c1) c2) c3))) | ||
(step al7 :rule check_appendLeft :args ((or c1 (or c1 c2)) c3 (or (or c1 (or c1 c2)) c3))) | ||
|
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