]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/library/freescale/table_RS08_tests.ma
fixed deps
[helm.git] / helm / software / matita / library / freescale / table_RS08_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:                                                         *)
19 (*   Cosimo Oliboni, oliboni@cs.unibo.it                                  *)
20 (*                                                                        *)
21 (* Questo materiale fa parte della tesi:                                  *)
22 (*   "Formalizzazione Interattiva dei Microcontroller a 8bit FreeScale"   *)
23 (*                                                                        *)
24 (*                    data ultima modifica 15/11/2007                     *)
25 (* ********************************************************************** *)
26
27 include "freescale/table_RS08.ma".
28
29 (* CORRETTEZZA *)
30
31 (* RS08: opcode non implementati come da manuale *)
32 definition RS08_not_impl_byte ≝
33  [〈x3,x2〉;〈x3,x3〉;〈x3,xD〉
34  ;〈x4,x0〉;〈x4,x7〉;〈x4,xD〉
35  ;〈xA,x3〉;〈xA,x5〉;〈xA,x7〉
36  ;〈xB,x3〉;〈xB,x5〉
37  ].
38
39 lemma ok_byte_table_RS08 : forall_byte8 (λb.
40  (test_not_impl_byte b RS08_not_impl_byte     ⊙ eqb (get_byte_count RS08 b 0 opcode_table_RS08) 1) ⊗
41  (⊖ (test_not_impl_byte b RS08_not_impl_byte) ⊙ eqb (get_byte_count RS08 b 0 opcode_table_RS08) 0))
42  = true.
43  reflexivity.
44 qed.
45
46 (* RS08: pseudocodici non implementati come da manuale *)
47 definition RS08_not_impl_pseudo ≝
48  [ AIS ; AIX ; ASR ; BGE ; BGT ; BHCC ; BHCS ; BHI ; BIH ; BIL ; BIT ; BLE ; BLS
49  ; BLT ; BMC ; BMI ; BMS ; BPL ; BRN ; CBEQX ; CLI ; CPHX ; CPX ; DAA ; DIV
50  ; LDHX ; LDX ; MUL ; NEG ; NSA ; PSHA ; PSHH ; PSHX ; PULA ; PULH ; PULX ; RSP  
51  ; RTI ; SEI ; STHX ; STX ; SWI ; TAP ; TAX ; TPA ; TST ; TSX ; TXA ; TXS ].
52
53 lemma ok_pseudo_table_RS08 : forall_opcode (λo.
54  (test_not_impl_pseudo o RS08_not_impl_pseudo     ⊙ leb 1 (get_pseudo_count RS08 o 0 opcode_table_RS08)) ⊗
55  (⊖ (test_not_impl_pseudo o RS08_not_impl_pseudo) ⊙ eqb (get_pseudo_count RS08 o 0 opcode_table_RS08) 0))
56  = true.
57  reflexivity.
58 qed.
59
60 (* RS08: modalita' non implementate come da manuale *)
61 definition RS08_not_impl_mode ≝
62  [ MODE_INHX ; MODE_INHH ; MODE_IMM2 ; MODE_IX0 ; MODE_IX1 ; MODE_IX2 ; MODE_SP1 ; MODE_SP2
63  ; MODE_IX0p_to_DIR1 ; MODE_DIR1_to_IX0p ; MODE_INHX_and_IMM1 ; MODE_IX0_and_IMM1
64  ; MODE_IX0p_and_IMM1 ; MODE_IX1_and_IMM1 ; MODE_IX1p_and_IMM1 ; MODE_SP1_and_IMM1 ].
65
66 lemma ok_mode_table_RS08 : forall_instr_mode (λi.
67  (test_not_impl_mode i RS08_not_impl_mode     ⊙ leb 1 (get_mode_count RS08 i 0 opcode_table_RS08)) ⊗
68  (⊖ (test_not_impl_mode i RS08_not_impl_mode) ⊙ eqb (get_mode_count RS08 i 0 opcode_table_RS08) 0))
69  = true.
70  reflexivity.
71 qed.
72
73 lemma ok_OpIm_table_RS08 :
74  forall_instr_mode (λi:instr_mode.
75  forall_opcode     (λop:opcode.
76   leb (get_OpIm_count RS08 (anyOP RS08 op) i 0 opcode_table_RS08) 1)) = true.
77  reflexivity.
78 qed.
79