* http://cs.unibo.it/helm/.
*)
-(*
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
*)
{
* http://cs.unibo.it/helm/.
*/
-/*
+/* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
*/
%{
* http://cs.unibo.it/helm/.
*)
-(*
- *)
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
(* text linearization and parsing *******************************************)
* http://cs.unibo.it/helm/.
*)
-(******************************************************************************)
-(* *)
-(* PROJECT HELM *)
-(* *)
-(* Ferruccio Guidi <fguidi@cs.unibo.it> *)
-(* 30/04/2002 *)
-(* *)
-(* *)
-(******************************************************************************)
-
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
val text_of_query : (string -> unit) -> MathQL.query -> string -> unit
* http://www.cs.unibo.it/helm/.
*)
-(*
- *)
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
(* output data structures ***************************************************)
* http://cs.unibo.it/helm/.
*)
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
+
type uri = string
type position = string
type depth = string
| OnlyRel of position list * depth list
| Universe of position list
+type builtin_t = MainHypothesis
+ | InHypothesis
+ | MainConclusion
+ | InConclusion
+ | InBody
+ | Set
+ | Prop
+ | Type
+
let text_of_builtin s =
let ns = "http://www.cs.unibo.it/helm/schemas/schema-helm#" in
if s = ns ^ "MainHypothesis" then "$MH" else
if s = ns ^ "MainConclusion" then "$MC" else
if s = ns ^ "InConclusion" then "$IC" else
if s = ns ^ "InBody" then "$IB" else
- if s = ns ^ "Set" then "$SET" else
- if s = ns ^ "Prop" then "$PROP" else
- if s = ns ^ "Type" then "$TYPE" else s
+ if s = "Set" then "$SET" else
+ if s = "Prop" then "$PROP" else
+ if s = "Type" then "$TYPE" else s
let text_of_spec out l =
let rec iter = function
let builtin s =
let ns = "http://www.cs.unibo.it/helm/schemas/schema-helm#" in
match s with
- | "MH" -> ns ^ "MainHypothesis"
- | "IH" -> ns ^ "InHypothesis"
- | "MC" -> ns ^ "MainConclusion"
- | "IC" -> ns ^ "InConclusion"
- | "IB" -> ns ^ "InBody"
- | "SET" -> ns ^ "Set"
- | "PROP" -> ns ^ "Prop"
- | "TYPE" -> ns ^ "Type"
- | _ -> raise (Failure "MQueryGenerator.builtin")
+ | MainHypothesis -> ns ^ "MainHypothesis"
+ | InHypothesis -> ns ^ "InHypothesis"
+ | MainConclusion -> ns ^ "MainConclusion"
+ | InConclusion -> ns ^ "InConclusion"
+ | InBody -> ns ^ "InBody"
+ | Set -> "Set"
+ | Prop -> "Prop"
+ | Type -> "Type"
(* conversion functions from the old constraints ***************************)
* http://cs.unibo.it/helm/.
*)
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
+
type uri = string
type position = string
type depth = string
| OnlyRel of position list * depth list
| Universe of position list
+type builtin_t = MainHypothesis
+ | InHypothesis
+ | MainConclusion
+ | InConclusion
+ | InBody
+ | Set
+ | Prop
+ | Type
+
val locate : string -> MathQL.query
val compose : spec list -> MathQL.query
-val builtin : MathQL.vvar -> string
+val builtin : builtin_t -> string
(* interface for the old constraints ***************************************)
* http://cs.unibo.it/helm/.
*)
-(******************************************************************************)
-(* *)
-(* PROJECT HELM *)
-(* *)
-(* Ferruccio Guidi <fguidi@cs.unibo.it> *)
-(* 30/04/2002 *)
-(* *)
-(* *)
-(******************************************************************************)
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
let levels_of_term metasenv context term =
let module TC = CicTypeChecker in
* http://cs.unibo.it/helm/.
*)
-(******************************************************************************)
-(* *)
-(* PROJECT HELM *)
-(* *)
-(* Ferruccio Guidi <fguidi@cs.unibo.it> *)
-(* 30/04/2002 *)
-(* *)
-(* *)
-(******************************************************************************)
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
val out_restr: Cic.metasenv -> Cic.context -> Cic.term -> ( ((string * bool) list) list * (string * bool) list)
(* *)
(* PROJECT HELM *)
(* *)
-(* Ferruccio Guidi <fguidi@cs.unibo.it> *)
-(* 30/04/2002 *)
+(* Claudio Sacerdoti Coen <sacerdot@cs.unibo.it> *)
+(* 02/12/2002 *)
(* *)
+(* Missing description *)
(* *)
(******************************************************************************)
* http://cs.unibo.it/helm/.
*)
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
+
type flag = Postgres | Galax | Stat | Quiet | Warn | Log
type handle = {log : string -> unit; (* logging function *)
* http://cs.unibo.it/helm/.
*)
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
+
type flag = Postgres | Galax | Stat | Quiet | Warn | Log
val string_of_flags : flag list -> string
* http://cs.unibo.it/helm/.
*)
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
+
let default_connection_string =
"dbname=mowgli user=helm"
* http://cs.unibo.it/helm/.
*)
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
+
val init : unit -> Postgres.connection option
val close : Postgres.connection option -> unit
-
(* Copyright (C) 2000, HELM Team.
*
* This file is part of HELM, an Hypertextual, Electronic
* http://cs.unibo.it/helm/.
*)
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
+
module M = MathQL
module P = MQIPostgres
module C = MQIConn
* http://cs.unibo.it/helm/.
*)
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
+
open MathQL
open MQIConn
* http://cs.unibo.it/helm/.
*)
-(******************************************************************************)
-(* *)
-(* PROJECT HELM *)
-(* *)
-(* Ferruccio Guidi <fguidi@cs.unibo.it> *)
-(* 06/01/2003 *)
-(* *)
-(* *)
-(******************************************************************************)
-
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
(* boolean constants *******************************************************)
* http://cs.unibo.it/helm/.
*)
-(******************************************************************************)
-(* *)
-(* PROJECT HELM *)
-(* *)
-(* Ferruccio Guidi <fguidi@cs.unibo.it> *)
-(* 06/01/2003 *)
-(* *)
-(* *)
-(******************************************************************************)
-
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
val mql_true : MathQL.value
* http://cs.unibo.it/helm/.
*)
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
+
(* contexts *****************************************************************)
type svar_context = (MathQL.svar * MathQL.resource_set) list
* http://cs.unibo.it/helm/.
*)
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
+
val execute : MQIConn.handle -> MathQL.query -> MathQL.result
* http://cs.unibo.it/helm/.
*)
+(******************************************************************************)
+(* *)
+(* PROJECT HELM *)
+(* *)
+(* Claudio Sacerdoti Coen <sacerdot@cs.unibo.it> *)
+(* 15/01/2003 *)
+(* *)
+(* *)
+(******************************************************************************)
+
exception IllFormedUri of string;;
let string_of_cic_textual_parser_uri uri =
* http://cs.unibo.it/helm/.
*)
-(******************************************************************************)
-(* *)
-(* PROJECT HELM *)
-(* *)
-(* Ferruccio Guidi <fguidi@cs.unibo.it> *)
-(* 23/05/2002 *)
-(* *)
-(* *)
-(******************************************************************************)
+(* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
+ *)
{
open MQGTopParser
let f (x, y, z) = x
let s (x, y, z) = y
let t (x, y, z) = z
-
+
+ let builtin s =
+ let ns = "http://www.cs.unibo.it/helm/schemas/schema-helm#" in
+ match s with
+ | "MH" -> ns ^ "MainHypothesis"
+ | "IH" -> ns ^ "InHypothesis"
+ | "MC" -> ns ^ "MainConclusion"
+ | "IC" -> ns ^ "InConclusion"
+ | "IB" -> ns ^ "InBody"
+ | "SET" -> "Set"
+ | "PROP" -> "Prop"
+ | "TYPE" -> "Type"
+ | _ -> raise Parsing.Parse_error
+
module G = MQueryGenerator
%}
%token <string> ID
| STR qstr { $1 ^ $2 }
;
str:
- | STR { $1 }
- | DL ID { try G.builtin $2 with _ -> "" }
+ | STR { $1 }
+ | DL ID { builtin $2 }
;
strs:
| str CM strs { $1 :: $3 }
let mpattern n m l =
let queries = ref [] in
- let univ = Some [G.builtin "MH"; G.builtin "IH";
- G.builtin "MC"; G.builtin "IC"] in
+ let univ = Some [G.builtin G.MainHypothesis; G.builtin G.InHypothesis;
+ G.builtin G.MainConclusion; G.builtin G.InConclusion] in
let handle = get_handle () in
let rec pattern level = function
| [] -> ()
let mbackward n m l =
let queries = ref [] in
let torigth_restriction (u, b) =
- let p = if b then G.builtin "MC" else G.builtin "IC" in
+ let p = if b then G.builtin G.MainConclusion
+ else G.builtin G.InConclusion in
(u, p, None)
in
- let univ = Some [G.builtin "MC"; G.builtin "IC"] in
+ let univ = Some [G.builtin G.MainConclusion; G.builtin G.InConclusion] in
let handle = get_handle () in
let rec backward level = function
| [] -> ()