
  * Implement the global functions required by the shell . 
  * 
  * ---------------------------------------------------------------- 
  * 
  * This file is part of MetaPRL , a modular , higher order 
  * logical framework that provides a logical programming 
  * environment for OCaml and other languages . 
  * 
  * See the file doc / htmlman / default.html or visit / 
  * for more information . 
  * 
  * Copyright ( C ) 1999   , Cornell University 
  * 
  * This program is free software ; you can redistribute it and/or 
  * modify it under the terms of the GNU General Public License 
  * as published by the Free Software Foundation ; either version 2 
  * of the License , or ( at your option ) any later version . 
  * 
  * This program is distributed in the hope that it will be useful , 
  * but WITHOUT ANY WARRANTY ; without even the implied warranty of 
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE .   See the 
  * GNU General Public License for more details . 
  * 
  * You should have received a copy of the GNU General Public License 
  * along with this program ; if not , write to the Free Software 
  * Foundation , Inc. , 675 Mass Ave , Cambridge ,   , USA . 
  * 
  * Author :   <  > 
  * Modified By :   <  > 
 
 * Implement the global functions required by the shell.
 *
 * ----------------------------------------------------------------
 *
 * This file is part of MetaPRL, a modular, higher order
 * logical framework that provides a logical programming
 * environment for OCaml and other languages.
 *
 * See the file doc/htmlman/default.html or visit /
 * for more information.
 *
 * Copyright (C) 1999 Jason Hickey, Cornell University
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 * Author: Jason Hickey <>
 * Modified By: Aleksey Nogin <>
 *)
open Refiner.Refiner.TermType

open Dform

(*
 * Client functions called somewhere within a toploop.
 * Client functions are global, and they are only valid
 * within a toploop call.  These functions usually fail if the
 * toploop is not active.
 *)
val term_printer : term -> unit  (* uses Format library *)
val print_term_fp : Lm_printf.out_channel -> term -> unit
val set_tactic : string -> MLast.expr -> unit
val get_term : int -> term

(****************************************
 * TOPLOOP FUNCTIONS
 *)

val set_package : Package_info.package option -> unit

(* Scan (lazily) terms for SO variable contexts and use that for SO var parsing *)
val set_so_var_context : term list option -> unit

(*
 * Set the current module.
 *)
val set_module : string -> unit

(*
 * Current display form base.
 *)
val set_dfbase : dform_base option -> unit
val get_dfbase : unit -> dform_base

(*
 * Get the tactic used in the last refinement.
 *)
val get_tactic : unit -> string * MLast.expr
val get_toploop : unit -> Mptop.top_table

(*
 * Printers.
 *)
val print_term : term -> unit

(*
 * Flag for whether currently in interactive mode.
 *)
val is_interactive : unit -> bool
val set_interactive : bool -> unit

val reset_terms : unit -> unit
val synchronize : ('a -> 'b) -> 'a -> 'b

(****************************************
 * FILE PARSING
 *)

val stream_of_channel : in_channel -> char Stream.t
val stream_of_string : string -> char Stream.t
val set_prompt : string -> unit
val set_prompt2 : string -> unit
val stdin_stream : unit -> char Stream.t * (unit -> unit)
val get_text : MLast.loc -> string
val wrap : (Lexing.lexbuf -> 'a) -> Lexing.lexbuf -> 'a
val set_file : string -> unit

(****************************************
 * ADDITIONAL FUNCTIONS
 *)

(*
 * Include directory list.
 *)
val get_includes : unit -> string list
val get_input_files : unit -> string list

(*
 * We may start this as a command-line interface, or as a web service.
 *)
val cli_flag : unit -> bool
val batch_flag : bool ref

val protocol_name     : string

val browser_port_name : string
val browser_port      : int ref

val browser_name     : string
val browser_string   : string option ref

val challenge_name   : string
val challenge_string : string option ref


  * -*- 
  * Local Variables : 
  * Caml - master : " nl " 
  * End : 
  * -*- 
 
 * -*-
 * Local Variables:
 * Caml-master: "nl"
 * End:
 * -*-
 *)


 * Client functions called somewhere within a toploop.
 * Client functions are global, and they are only valid
 * within a toploop call.  These functions usually fail if the
 * toploop is not active.
 
 uses Format library 
***************************************
 * TOPLOOP FUNCTIONS
 
 Scan (lazily) terms for SO variable contexts and use that for SO var parsing 

 * Set the current module.
 

 * Current display form base.
 

 * Get the tactic used in the last refinement.
 

 * Printers.
 

 * Flag for whether currently in interactive mode.
 
***************************************
 * FILE PARSING
 
***************************************
 * ADDITIONAL FUNCTIONS
 

 * Include directory list.
 

 * We may start this as a command-line interface, or as a web service.
 

  * Implement the global functions required by the shell . 
  * 
  * ---------------------------------------------------------------- 
  * 
  * This file is part of MetaPRL , a modular , higher order 
  * logical framework that provides a logical programming 
  * environment for OCaml and other languages . 
  * 
  * See the file doc / htmlman / default.html or visit / 
  * for more information . 
  * 
  * Copyright ( C ) 1999   , Cornell University 
  * 
  * This program is free software ; you can redistribute it and/or 
  * modify it under the terms of the GNU General Public License 
  * as published by the Free Software Foundation ; either version 2 
  * of the License , or ( at your option ) any later version . 
  * 
  * This program is distributed in the hope that it will be useful , 
  * but WITHOUT ANY WARRANTY ; without even the implied warranty of 
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE .   See the 
  * GNU General Public License for more details . 
  * 
  * You should have received a copy of the GNU General Public License 
  * along with this program ; if not , write to the Free Software 
  * Foundation , Inc. , 675 Mass Ave , Cambridge ,   , USA . 
  * 
  * Author :   <  > 
  * Modified By :   <  > 
 
 * Implement the global functions required by the shell.
 *
 * ----------------------------------------------------------------
 *
 * This file is part of MetaPRL, a modular, higher order
 * logical framework that provides a logical programming
 * environment for OCaml and other languages.
 *
 * See the file doc/htmlman/default.html or visit /
 * for more information.
 *
 * Copyright (C) 1999 Jason Hickey, Cornell University
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 * Author: Jason Hickey <>
 * Modified By: Aleksey Nogin <>
 *)
open Refiner.Refiner.TermType

open Dform

val print_term_fp : Lm_printf.out_channel -> term -> unit
val set_tactic : string -> MLast.expr -> unit
val get_term : int -> term


val set_package : Package_info.package option -> unit

val set_so_var_context : term list option -> unit

val set_module : string -> unit

val set_dfbase : dform_base option -> unit
val get_dfbase : unit -> dform_base

val get_tactic : unit -> string * MLast.expr
val get_toploop : unit -> Mptop.top_table

val print_term : term -> unit

val is_interactive : unit -> bool
val set_interactive : bool -> unit

val reset_terms : unit -> unit
val synchronize : ('a -> 'b) -> 'a -> 'b


val stream_of_channel : in_channel -> char Stream.t
val stream_of_string : string -> char Stream.t
val set_prompt : string -> unit
val set_prompt2 : string -> unit
val stdin_stream : unit -> char Stream.t * (unit -> unit)
val get_text : MLast.loc -> string
val wrap : (Lexing.lexbuf -> 'a) -> Lexing.lexbuf -> 'a
val set_file : string -> unit


val get_includes : unit -> string list
val get_input_files : unit -> string list

val cli_flag : unit -> bool
val batch_flag : bool ref

val protocol_name     : string

val browser_port_name : string
val browser_port      : int ref

val browser_name     : string
val browser_string   : string option ref

val challenge_name   : string
val challenge_string : string option ref


  * -*- 
  * Local Variables : 
  * Caml - master : " nl " 
  * End : 
  * -*- 
 
 * -*-
 * Local Variables:
 * Caml-master: "nl"
 * End:
 * -*-
 *)
