DiffMu / DiffPrivacyInferenceHs

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

do not allow mutating dmterms on matrices #280

Closed ooovi closed 2 years ago

ooovi commented 2 years ago

at the moment this is only ensured by the julia typesystem

julia> typecheck_from_string("module L
       function noise_grad!(g::MetricMatrix(Data, LInf), eps) :: Priv()
           clip!(L2,g)
           undisc_container!(g)
           laplacian_mechanism!(2, eps, g)
           return
       end
       end")

---------------------------------------------------------------------------
Type:
{
|   - Matrix<n: LInf, c: C>[1 × n]{Data}
|       @ (s, 0)
|   
|   - τ₇[s ©]@(0, 0)
|   --------------------------
|    ->* Matrix<n: LInf, c: U>[1 × n]{Real}
}

---------------------------------------------------------------------------
Constraints:
constr : 0 < s