+(***********************************************************************)
+(* *)
+(* TAToo *)
+(* *)
+(* Kim Nguyen, LRI UMR8623 *)
+(* Université Paris-Sud & CNRS *)
+(* *)
+(* Copyright 2010-2013 Université Paris-Sud and Centre National de la *)
+(* Recherche Scientifique. All rights reserved. This file is *)
+(* distributed under the terms of the GNU Lesser General Public *)
+(* License, with the special exception on linking described in file *)
+(* ../LICENSE. *)
+(* *)
+(***********************************************************************)
+
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:09:57 CET by Kim Nguyen>
+*)
+
open Ocamlbuild_plugin
open Command
open Myocamlbuild_config
+(***********************************************************************)
+(* *)
+(* TAToo *)
+(* *)
+(* Kim Nguyen, LRI UMR8623 *)
+(* Université Paris-Sud & CNRS *)
+(* *)
+(* Copyright 2010-2013 Université Paris-Sud and Centre National de la *)
+(* Recherche Scientifique. All rights reserved. This file is *)
+(* distributed under the terms of the GNU Lesser General Public *)
+(* License, with the special exception on linking described in file *)
+(* ../LICENSE. *)
+(* *)
+(***********************************************************************)
+
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:10:05 CET by Kim Nguyen>
+*)
+
let ocaml_inline = "1000";;
let include_path = "include";;
let src_path = "src";;
+(***********************************************************************)
+(* *)
+(* TAToo *)
+(* *)
+(* Kim Nguyen, LRI UMR8623 *)
+(* Université Paris-Sud & CNRS *)
+(* *)
+(* Copyright 2010-2013 Université Paris-Sud and Centre National de la *)
+(* Recherche Scientifique. All rights reserved. This file is *)
+(* distributed under the terms of the GNU Lesser General Public *)
+(* License, with the special exception on linking described in file *)
+(* ../LICENSE. *)
+(* *)
+(***********************************************************************)
+
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:09:27 CET by Kim Nguyen>
+*)
+
open Format
type t = {
(* ../LICENSE. *)
(* *)
(***********************************************************************)
+
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:09:01 CET by Kim Nguyen>
+*)
+
INCLUDE "utils.ml"
include Sigs.FINITECOFINITE
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:08:57 CET by Kim Nguyen>
+*)
+
(** Implementation of hashconsed finite or cofinite sets.
*)
(* Kim Nguyen, LRI UMR8623 *)
(* Université Paris-Sud & CNRS *)
(* *)
-(* Copyright 2010-2012 Université Paris-Sud and Centre National de la *)
+(* Copyright 2010-2013 Université Paris-Sud and Centre National de la *)
(* Recherche Scientifique. All rights reserved. This file is *)
(* distributed under the terms of the GNU Lesser General Public *)
(* License, with the special exception on linking described in file *)
(* ../LICENSE. *)
(* *)
(***********************************************************************)
+
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:04:05 CET by Kim Nguyen>
+*)
+
INCLUDE "utils.ml"
open Format
+
+
type move = [ `Left | `Right | `Epsilon | `Up1 | `Up2 ]
type 'formula expr =
| False
| True
| Or of 'formula * 'formula
| And of 'formula * 'formula
- | Move of move * bool * State.t
+ | Atom of move * bool * State.t
type 'hcons node = {
pos : 'hcons expr;
and Data : Hashtbl.HashedType with type t = Node.t node =
struct
type t = Node.t node
- let equal x y = (*x.size == y.size &&*)
+ let equal x y =
match x.pos, y.pos with
| a,b when a == b -> true
| Or(xf1, xf2), Or(yf1, yf2)
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:08:52 CET by Kim Nguyen>
+*)
+
(** Implementation of hashconsed Boolean formulae *)
type move = [ `Left | `Right | `Epsilon | `Up1 | `Up2 ]
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:08:47 CET by Kim Nguyen>
+*)
+
include Sigs.HCONS
module type TableBuilder =
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:08:42 CET by Kim Nguyen>
+*)
+
(** Implementation of generic hashconsing. *)
include module type of Sigs.HCONS
%{
+(***********************************************************************)
+(* *)
+(* TAToo *)
+(* *)
+(* Kim Nguyen, LRI UMR8623 *)
+(* Université Paris-Sud & CNRS *)
+(* *)
+(* Copyright 2010-2012 Université Paris-Sud and Centre National de la *)
+(* Recherche Scientifique. All rights reserved. This file is *)
+(* distributed under the terms of the GNU Lesser General Public *)
+(* License, with the special exception on linking described in file *)
+(* ../LICENSE. *)
+(* *)
+(***********************************************************************)
+
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:08:27 CET by Kim Nguyen>
+*)
open XPath.Ast
let f () = ()
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:08:11 CET by Kim Nguyen>
+*)
+
open Format
exception InvalidUtf8Codepoint of int
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:08:06 CET by Kim Nguyen>
+*)
+
exception InvalidUtf8Codepoint of int
val subscript : int -> string
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:07:53 CET by Kim Nguyen>
+*)
+
(* Modified by Kim Nguyen *)
(* The Patricia trees are themselves deeply hash-consed. The module
provides a Make (and Weak) functor to build hash-consed patricia
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:07:42 CET by Kim Nguyen>
+*)
include module type of Sigs.PTSET
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:07:38 CET by Kim Nguyen>
+*)
+
include Hcons.Make (struct
include String
let hash s = Hashtbl.hash s
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:07:34 CET by Kim Nguyen>
+*)
+
(** Implementation of qualified names as hashconsed strings *)
include Sigs.HCONS.S with type data = string
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:07:29 CET by Kim Nguyen>
+*)
+
include FiniteCofinite.Make(Ptset.Make(QName))
let print_finite fmt e conv =
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:07:23 CET by Kim Nguyen>
+*)
(** Implementation of sets of Qualified Names that can be finite
or cofinite *)
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:07:19 CET by Kim Nguyen>
+*)
+
(** This module contains all the signatures of the project, to avoid
code duplication. Each toplevel module (HCONS, PTSET, ...)
corresponds to an existing module in the project. The AUX modules
val inj_negative : set -> t
end
end
+
+module FORMULA =
+struct
+ module type ATOM =
+ sig
+ type t
+ type ctx
+ val eval : ctx -> t -> bool
+ val neg : t -> t
+ include HCONS.S with type t := t
+ include AUX.Printable with type t := t
+ end
+ module type S =
+ sig
+ module Atom : ATOM
+ include HCONS.S
+ include AUX.Printable with type t := t
+ val of_bool : bool -> t
+ val true_ : t
+ val false_ : t
+ val or_ : t -> t -> t
+ val and_ : t -> t -> t
+ val not_ : t -> t
+ val diff_ : t -> t -> t
+ val eval : Atom.ctx -> t -> bool
+ end
+
+end
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:07:15 CET by Kim Nguyen>
+*)
+
open Format
type t = int
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:07:11 CET by Kim Nguyen>
+*)
+
(** Implementation of states *)
include Sigs.AUX.Type with type t = int
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:07:06 CET by Kim Nguyen>
+*)
+
open Format
include Ptset.Make (Hcons.PosInt)
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:07:02 CET by Kim Nguyen>
+*)
+
(** Implementation of sets of states *)
include Ptset.S with type elt = int
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:06:57 CET by Kim Nguyen>
+*)
(** use: xml_file "XPath querie"
or : xml_file -f XPath_querie_file
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:06:51 CET by Kim Nguyen>
+*)
+
type node = {
tag : QName.t;
preorder : int;
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:06:46 CET by Kim Nguyen>
+*)
+
(** Implementation of documents as binary trees *)
type node
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:06:39 CET by Kim Nguyen>
+*)
+
type t = int
exception Overflow
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:06:33 CET by Kim Nguyen>
+*)
+
(** This modules implements unique identifiers represented by integers *)
type t = private int
-(******************************************************************************)
-(* SXSI : XPath evaluator *)
-(* Kim Nguyen (Kim.Nguyen@nicta.com.au) *)
-(* Copyright NICTA 2008 *)
-(* Distributed under the terms of the LGPL (see LICENCE) *)
-(******************************************************************************)
+(***********************************************************************)
+(* *)
+(* TAToo *)
+(* *)
+(* Kim Nguyen, LRI UMR8623 *)
+(* Université Paris-Sud & CNRS *)
+(* *)
+(* Copyright 2010-2013 Université Paris-Sud and Centre National de la *)
+(* Recherche Scientifique. All rights reserved. This file is *)
+(* distributed under the terms of the GNU Lesser General Public *)
+(* License, with the special exception on linking described in file *)
+(* ../LICENSE. *)
+(* *)
+(***********************************************************************)
+
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:06:07 CET by Kim Nguyen>
+*)
+
open Parser
module L = Ulexing
+(***********************************************************************)
+(* *)
+(* TAToo *)
+(* *)
+(* Kim Nguyen, LRI UMR8623 *)
+(* Université Paris-Sud & CNRS *)
+(* *)
+(* Copyright 2010-2013 Université Paris-Sud and Centre National de la *)
+(* Recherche Scientifique. All rights reserved. This file is *)
+(* distributed under the terms of the GNU Lesser General Public *)
+(* License, with the special exception on linking described in file *)
+(* ../LICENSE. *)
+(* *)
+(***********************************************************************)
+
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:06:20 CET by Kim Nguyen>
+*)
let xpath (f : Ulexing.lexbuf -> Parser.token) (l: Ulexing.lexbuf) =
Parser.xpath (fun _ -> f l) (Lexing.from_string "!!dummy!!")
(* *)
(***********************************************************************)
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:05:20 CET by Kim Nguyen>
+*)
+
(** Various generic signatures and generic module and functor definitions
*)
INCLUDE "utils.ml"
(* ../LICENSE. *)
(* *)
(***********************************************************************)
+
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:05:13 CET by Kim Nguyen>
+*)
+
module Ast =
struct
(* Kim Nguyen, LRI UMR8623 *)
(* Université Paris-Sud & CNRS *)
(* *)
-(* Copyright 2010-2012 Université Paris-Sud and Centre National de la *)
+(* Copyright 2010-2013 Université Paris-Sud and Centre National de la *)
(* Recherche Scientifique. All rights reserved. This file is *)
(* distributed under the terms of the GNU Lesser General Public *)
(* License, with the special exception on linking described in file *)
(* ../LICENSE. *)
(* *)
(***********************************************************************)
+
+(*
+ Time-stamp: <Last modified on 2013-01-30 19:05:02 CET by Kim Nguyen>
+*)
+
+
+
module Ast :
sig
type path = single_path list