compilateur-projet-prog-1/genlab.ml

32 lines
1021 B
OCaml

(*
* Copyright (c) 2005 by Laboratoire Spécification et Vérification (LSV),
* CNRS UMR 8643 & ENS Cachan.
* Written by Jean Goubault-Larrecq. Not derived from licensed software.
*
* Permission is granted to anyone to use this software for any
* purpose on any computer system, and to redistribute it freely,
* subject to the following restrictions:
*
* 1. Neither the author nor its employer is responsible for the consequences of use of
* this software, no matter how awful, even if they arise
* from defects in it.
*
* 2. The origin of this software must not be misrepresented, either
* by explicit claim or by omission.
*
* 3. Altered versions must be plainly marked as such, and must not
* be misrepresented as being the original software.
*
* 4. This software is restricted to non-commercial use only. Commercial
* use is subject to a specific license, obtainable from LSV.
*)
open Printf
let counter = ref 0
let rec genlab func =
incr counter;
sprintf ".%s_%d" func (!counter)