diff options
author | gareuselesinge <gareuselesinge@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-08-09 06:09:52 +0000 |
---|---|---|
committer | gareuselesinge <gareuselesinge@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-08-09 06:09:52 +0000 |
commit | 6410e8c242d50eb0571d0e6feea4526979c8b0b2 (patch) | |
tree | 2eac7acf7ba6008b45727742f33cc0ef60c65e99 /lib/stateid.mli | |
parent | dc6c9c950700a9707ff1f473ef687f0bda597eb3 (diff) |
state_id data type
(this should have been the first commit of Paral-ITP)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16688 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/stateid.mli')
-rw-r--r-- | lib/stateid.mli | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/stateid.mli b/lib/stateid.mli new file mode 100644 index 000000000..978f12691 --- /dev/null +++ b/lib/stateid.mli @@ -0,0 +1,31 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010 *) +(* \VV/ **************************************************************) +(* // * This file is distributed under the terms of the *) +(* * GNU Lesser General Public License Version 2.1 *) +(************************************************************************) + +open Xml_datatype + +type state_id +val initial_state_id : state_id +val dummy_state_id : state_id +val fresh_state_id : unit -> state_id +val string_of_state_id : state_id -> string +val state_id_of_int : int -> state_id +val int_of_state_id : state_id -> int +val newer_than : state_id -> state_id -> bool + +(* XML marshalling *) +val of_state_id : state_id -> xml +val to_state_id : xml -> state_id + +(* Attaches to an exception the concerned state id, plus an optional + * state id that is a valid state id before the error. + * Backtracking to the valid id is safe. + * The initial_state_id is assumed to be safe. *) +val add_state_id : exn -> ?valid:state_id -> state_id -> exn +val get_state_id : exn -> (state_id * state_id) option + +module StateidOrderedType : Map.OrderedType with type t = state_id |