source: extracted/untrusted/glue.ml @ 2738

Last change on this file since 2738 was 2738, checked in by sacerdot, 8 years ago

Porting the graph colouring stuff from the untrusted prototype to the extracted
code.

File size: 268 bytes
Line 
1let int_of_bitvector v =
2  let rec aux pow v =
3    match v with
4      Vector.VEmpty -> 0
5    | Vector.VCons (_,hd,tl) ->
6        if hd = Bool.True then
7          pow + (aux (pow * 2) tl)
8        else
9          aux (pow * 2) tl
10  in
11    aux 1 (Vector.reverse0 Nat.O v)
Note: See TracBrowser for help on using the repository browser.