]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/ng_assembly/emulator/opcodes/RS08_table_tests.ma
(no commit message)
[helm.git] / helm / software / matita / contribs / ng_assembly / emulator / opcodes / RS08_table_tests.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 (* ********************************************************************** *)
16 (*                          Progetto FreeScale                            *)
17 (*                                                                        *)
18 (*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
19 (*   Sviluppo: 2008-2010                                                  *)
20 (*                                                                        *)
21 (* ********************************************************************** *)
22
23 include "emulator/opcodes/opcode.ma".
24 include "emulator/opcodes/RS08_table.ma".
25
26 (* ***************** *)
27 (* TABELLA DELL'RS08 *)
28 (* ***************** *)
29
30 (* RS08: opcode non implementati come da manuale *)
31 ndefinition RS08_not_impl_byte ≝
32  [〈x3,x2〉;〈x3,x3〉;〈x3,xD〉
33  ;〈x4,x0〉;〈x4,x7〉;〈x4,xD〉
34  ;〈xA,x3〉;〈xA,x5〉;〈xA,x7〉
35  ;〈xB,x3〉;〈xB,x5〉
36  ].
37
38 (* test bytecode non implementati *)
39 nlemma ok_byte_table_RS08 : forall_b8 (λb.
40  (test_not_impl_byte b RS08_not_impl_byte     ⊙ eq_w16 (get_byte_count RS08 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08) 〈〈x0,x0〉:〈x0,x1〉〉) ⊗
41  (⊖ (test_not_impl_byte b RS08_not_impl_byte) ⊙ eq_w16 (get_byte_count RS08 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08) 〈〈x0,x0〉:〈x0,x0〉〉))
42  = true.
43  napply refl_eq.
44 nqed.
45
46 (* tutti op implementati *)
47 nlemma ok_pseudo_table_RS08 :
48  forall_op RS08 (λo.
49   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_pseudo_count RS08 o 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08)) = true.
50  napply refl_eq.
51 nqed.
52
53 (* tutte im implementate *)
54 nlemma ok_mode_table_RS08 :
55  forall_im RS08 (λi.
56   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_mode_count RS08 i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08)) = true.
57  napply refl_eq.
58 nqed.
59
60 (* nessuna ripetizione di combinazione op + imm *)
61 nlemma ok_OpIm_table_RS08 :
62  forall_im RS08 (λi.
63   forall_op RS08 (λo.
64    le_w16 (get_OpIm_count RS08 o i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08) 〈〈x0,x0〉:〈x0,x1〉〉)) = true.
65  napply refl_eq.
66 nqed.