]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/library/assembly/vm.ma
This test shows one of the few cases were Matita is able to infer a dependent
[helm.git] / matita / library / assembly / vm.ma
index 239146a07526445c12d662592117e32c26358b2e..30d073144c486c8040f37d170f09673490cab525 100644 (file)
@@ -14,7 +14,7 @@
 
 set "baseuri" "cic:/matita/assembly/vm/".
 
-include "byte.ma".
+include "assembly/byte.ma".
 
 definition addr ≝ nat.
 
@@ -95,6 +95,12 @@ definition byte_of_opcode : opcode → byte ≝
   in
    aux opcodemap.
 
+notation "hvbox(# break a)"
+  non associative with precedence 80
+for @{ 'byte_of_opcode $a }.
+interpretation "byte_of_opcode" 'byte_of_opcode a =
+ (cic:/matita/assembly/vm/byte_of_opcode.con a).
+
 record status : Type ≝ {
   acc : byte;
   pc  : addr;
@@ -105,12 +111,31 @@ record status : Type ≝ {
   clk : nat
 }.
 
+notation "{hvbox('Acc' ≝ acc ; break 'Pc' ≝ pc ; break 'Spc' ≝ spc ; break 'Fz' ≝ fz ; break 'Fc' ≝ fc ; break  'M' ≝ m ; break 'Clk' ≝ clk)}"
+non associative with precedence 80 for
+ @{ 'mkstatus $acc $pc $spc $fz $fc $m $clk }.
+interpretation "mk_status" 'mkstatus acc pc spc fz fc m clk =
+ (cic:/matita/assembly/vm/status.ind#xpointer(1/1/1) acc pc spc fz fc m clk).
+
 definition update ≝
  λf: addr → byte.λa.λv.λx.
   match eqb x a with
    [ true ⇒ v
    | false ⇒ f x ].
 
+notation "hvbox(m break {a ↦ break v})" non associative with precedence 80 for 
+ @{ 'update $m $a $v }.
+notation "hvbox(m break {a ↦ break v} \nbsp x)" non associative with precedence 80 for 
+ @{ 'update4 $m $a $v $x }.
+interpretation "update" 'update m a v =
+  (cic:/matita/assembly/vm/update.con m a v).
+
+interpretation "update4" 'update4 m a v x =
+  (cic:/matita/assembly/vm/update.con m a v x).
+
 lemma update_update_a_a:
  ∀s,a,v1,v2,b.
   update (update s a v1) a v2 b = update s a v2 b.