sv_remonter.miaou
← Le code · src/outil/miaou/sv_remonter.miaou · 25 lignes
(node sv_remonter
(params (ss Ss) (nd Nat) (i Nat))
(returns Rv)
(intent "le nœud ite(c, f(a1), f(a2)) quand l'opérande i (0 ou 1) de la forme binaire nd est ite(c, a1, a2), comme q_remonter de l'outil inter ; les trois nœuds neufs ajoutés à la table")
(origin "phase 8f6 : notre solveur en miaou, d'après le solveur (q_…) de l'outil inter")
(effects)
(uses sv_nd sv_ajouter)
(requires
true)
(ensures
true)
(examples
(ex ((record Ss (sp (record Sp (reste "") (nds (list (record Nd (k 9) (s 1) (a 3) (b 1) (c 0) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0)) (record Nd (k 11) (s 1) (a 0) (b 1) (c 2) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0)) (record Nd (k 1) (s 1) (a 0) (b 0) (c 0) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0)) (record Nd (k 1) (s 1) (a 0) (b 0) (c 0) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0)) (record Nd (k 2) (s 2) (a 0) (b 0) (c 0) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0)))) (n 5) (noms (list)) (nf 0) (nint 0) (nbool 0) (cmds (list)) (err ""))) (tvs (list)) (ntv 0) (monos (list)) (lins (list))) 4 0)
(record Rv
(ss (record Ss (sp (record Sp (reste "") (nds (list (record Nd (k 11) (s 1) (a 0) (b 5) (c 6) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0)) (record Nd (k 9) (s 1) (a 2) (b 1) (c 0) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0)) (record Nd (k 9) (s 1) (a 1) (b 1) (c 0) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0)) (record Nd (k 9) (s 1) (a 3) (b 1) (c 0) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0)) (record Nd (k 11) (s 1) (a 0) (b 1) (c 2) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0)) (record Nd (k 1) (s 1) (a 0) (b 0) (c 0) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0)) (record Nd (k 1) (s 1) (a 0) (b 0) (c 0) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0)) (record Nd (k 2) (s 2) (a 0) (b 0) (c 0) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0)))) (n 8) (noms (list)) (nf 0) (nint 0) (nbool 0) (cmds (list)) (err ""))) (tvs (list)) (ntv 0) (monos (list)) (lins (list))))
(v 7))))
(equivalence exact)
(body.high
(let ((d (sv_nd (get ss sp) nd)))
(let ((it (sv_nd (get ss sp) (if (eq i 1) (get d b) (get d a)))))
(let ((r1 (sv_ajouter (get ss sp) (if (eq i 1) (record Nd (k (get d k)) (s 1) (a (get d a)) (b (get it b)) (c 0) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0)) (record Nd (k (get d k)) (s 1) (a (get it b)) (b (get d b)) (c 0) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0))))))
(let ((r2 (sv_ajouter (get r1 sp) (if (eq i 1) (record Nd (k (get d k)) (s 1) (a (get d a)) (b (get it c)) (c 0) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0)) (record Nd (k (get d k)) (s 1) (a (get it c)) (b (get d b)) (c 0) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0))))))
(let ((r3 (sv_ajouter (get r2 sp) (record Nd (k 11) (s 1) (a (get it a)) (b (get r1 nd)) (c (get r2 nd)) (args (list)) (val (record Grand (neg false) (mots (list)))) (num 0)))))
(record Rv (ss (with ss (sp (get r3 sp)))) (v (get r3 nd)))))))))
(end node sv_remonter))