| 1 | (************************************************************************) |
| 2 | (* * The Rocq Prover / The Rocq Development Team *) |
| 3 | (* v * Copyright INRIA, CNRS and contributors *) |
| 4 | (* <O___,, * (see version control and CREDITS file for authors & dates) *) |
| 5 | (* \VV/ **************************************************************) |
| 6 | (* // * This file is distributed under the terms of the *) |
| 7 | (* * GNU Lesser General Public License Version 2.1 *) |
| 8 | (* * (see LICENSE file for the text of the license) *) |
| 9 | (************************************************************************) |
| 10 | |
| 11 | type char_loc = { |
| 12 | start_char : int; |
| 13 | stop_char : int; |
| 14 | } |
| 15 | |
| 16 | type source_loc = { |
| 17 | chars : char_loc; |
| 18 | line : int; |
| 19 | text : string; |
| 20 | } |
| 21 | |
| 22 | (** A measurement, with the original printed string and an exact rational representation *) |
| 23 | type measure = { str: string; q: Q.t; } |
| 24 | |
| 25 | val dummy_measure : measure |
| 26 | |
| 27 | type memory = { |
| 28 | major_words : string; |
| 29 | minor_words : string; |
| 30 | major_collect : int; |
| 31 | minor_collect : int; |
| 32 | } |
| 33 | |
| 34 | type data = { time : measure; memory : memory option; instructions : int option } |
| 35 | |
| 36 | val dummy_data : data |
| 37 | |
| 38 | val combine_related_data : (string * (char_loc * 'a) array) array -> (char_loc * 'a array) array |
| 39 | (** Combine data from multiple files about the same source, ensuring |
| 40 | that the locations do not have inconsistencies. *) |
| 41 | |
| 42 | val read_whole_file : string -> string |