Created
May 20, 2015 14:23
-
-
Save crubier/dfb74ffdb3e1cd879ebb to your computer and use it in GitHub Desktop.
SMT2 Description of the vietnamese problem
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
;Nous déclarons 10 nombres entiers nommés a,b,c,...,i : | |
(declare-const a Int) | |
(declare-const b Int) | |
(declare-const c Int) | |
(declare-const d Int) | |
(declare-const e Int) | |
(declare-const f Int) | |
(declare-const g Int) | |
(declare-const h Int) | |
(declare-const i Int)</code> | |
;Ces nombres doivent etre distincts : | |
(assert (distinct a b c d e f g h i)) | |
;Ces nombres doivent etre compris entre 0 et 10 exclus : | |
(assert (and (> a 0) (< a 10))) (assert (and (> b 0) (< b 10))) (assert (and (> c 0) (< c 10))) (assert (and (> d 0) (< d 10))) (assert (and (> e 0) (< e 10))) (assert (and (> f 0) (< f 10))) (assert (and (> g 0) (< g 10))) (assert (and (> h 0) (< h 10))) (assert (and (> i 0) (< i 10))) | |
;Ces nombres doivent vérifier l'equation donnee par le schema : | |
; a + 13 * b / c + d + 12 * e - f - 11 + g * h / i - 10 = 66 | |
(assert (= (- (+(-(- (+ (+ (+ a (div (* 13 b) c)) d) (* 12 e)) f) 11) (div (* g h) i)) 10) 66)) | |
;Enfin nous demandons au programme de trouver une solution et de l'afficher | |
(check-sat) | |
(get-model) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment