2019-06-04 02:56:38 -07:00
|
|
|
/**************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* OCaml */
|
|
|
|
/* */
|
2019-06-23 21:25:33 -07:00
|
|
|
/* KC Sivaramakrishnan, Indian Institute of Technology, Madras */
|
2019-06-24 03:37:46 -07:00
|
|
|
/* Stephen Dolan, University of Cambridge */
|
2019-06-04 02:56:38 -07:00
|
|
|
/* */
|
2019-06-23 21:25:33 -07:00
|
|
|
/* Copyright 2019 Indian Institute of Technology, Madras */
|
2019-06-24 03:37:46 -07:00
|
|
|
/* Copyright 2019 University of Cambridge */
|
2019-06-04 02:56:38 -07:00
|
|
|
/* */
|
|
|
|
/* All rights reserved. This file is distributed under the terms of */
|
|
|
|
/* the GNU Lesser General Public License version 2.1, with the */
|
|
|
|
/* special exception on linking described in the file LICENSE. */
|
|
|
|
/* */
|
|
|
|
/**************************************************************************/
|
|
|
|
|
2019-06-03 04:56:45 -07:00
|
|
|
type t =
|
|
|
|
#define DOMAIN_STATE(type, name) | Domain_##name
|
|
|
|
#include "domain_state.tbl"
|
|
|
|
#undef DOMAIN_STATE
|
|
|
|
|
|
|
|
let idx_of_field =
|
|
|
|
let curr = 0 in
|
|
|
|
#define DOMAIN_STATE(type, name) \
|
|
|
|
let idx__##name = curr in \
|
|
|
|
let curr = curr + 1 in
|
|
|
|
#include "domain_state.tbl"
|
|
|
|
#undef DOMAIN_STATE
|
|
|
|
let _ = curr in
|
|
|
|
function
|
|
|
|
#define DOMAIN_STATE(type, name) \
|
|
|
|
| Domain_##name -> idx__##name
|
|
|
|
#include "domain_state.tbl"
|
|
|
|
#undef DOMAIN_STATE
|