Wed Feb 20 00:32:12 CET 2013

C arrays

The interesting thing is that mixing * and [] types in C is actually
useful for what I'm trying to accomplish..

Anyways, got an imperative form in s-expressions:

  ((v10 v11) (v15 v19))
  ((v0) (v1 v2 v3 v4 v5) (v30 v31))
   (t ?)
    (v26 (p_copy 0))
    (v27 (p_copy 0))
     (i N)
      (v6 (p_copy i))
      (v7 (p_copy N))
      (v20 (p_copy 0))
      (v21 (p_copy 0))
       (j M)
        (v8 (p_copy j))
        (v9 (p_copy M))
        (v12 (p_mul (@ v10 i j) (@ v2 i j)))
        (v13 (p_mul (@ v11 i j) (@ v3 i j)))
        (v14 (p_add v12 v13))
        ((! v15 i j) (p_add v14 (@ v0 i j t)))
        (v16 (p_mul (@ v10 i j) (@ v4 i j)))
        (v17 (p_mul (@ v11 i j) (@ v5 i j)))
        (v18 (p_add v16 v17))
        ((! v19 i j) (p_add v18 (@ v1 i j)))
        (v22 (p_add v20 (@ v15 i j)))
        (v23 (p_add v21 (@ v19 i j)))
        (p_set v20 v22)
        (p_set v21 v23)))
      (v24 (p_copy v20))
      (v25 (p_copy v21))
      (v28 (p_add v26 v24))
      (v29 (p_add v27 v25))
      (p_set v26 v28)
      (p_set v27 v29)))
    ((! v30 t) (p_copy v26))
    ((! v31 t) (p_copy v27)))))