jpl::JPL Class Reference

List of all members.

Static Public Member Functions

static String[] getActualInitArgs ()
static String[] getDefaultInitArgs ()
static void halt ()
static boolean init ()
static boolean init (String[] args)
static boolean isTag (String s)
static void loadNativeLibrary ()
static void main (String[] args)
static Term newJRef (Object obj)
static void setDefaultInitArgs (String[] args)
static void setDTMMode (boolean dtm)
static String setNativeLibraryDir (String newDir)
static String setNativeLibraryName (String newName)
static String setNativeLibraryPath (String newPath)
static Version version ()
static String version_string ()

Static Public Attributes

static final Term JFALSE = new Compound("@", new Term[] {new Atom("false")})
static final Term JNULL = new Compound("@", new Term[] {new Atom("null")})
static final Term JTRUE = new Compound("@", new Term[] {new Atom("true")})
static final Term JVOID = new Compound("@", new Term[] {new Atom("void")})

Static Protected Attributes

static final boolean DEBUG = false
static boolean modeDontTellMe = true

Static Private Attributes

static String nativeLibraryDir = null
static String nativeLibraryName = "jpl"
static String nativeLibraryPath = null
static final Version version_ = new Version()

Detailed Description

The jpl.JPL class contains methods which allow (i) inspection and alteration of the "default" initialisation arguments (ii) explicit initialisation (iii) discovery of whether the Prolog engine is already initialised, and if so, with what arguments. The Prolog engine must be initialized before any queries are made, but this will happen automatically (upon the first call to a Prolog FLI routine) if it has not already been done explicitly.


Copyright (C) 2004 Paul Singleton

Copyright (C) 1998 Fred Dushin

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library 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 Library Public License for more details.


Author:
Fred Dushin <fadushin@syr.edu>
Version:
$Revision$

Definition at line 62 of file JPL.java.


Member Function Documentation

static String [] jpl::JPL::getActualInitArgs (  )  [inline, static]

Returns, in an array of String, the sequence of command-line arguments that were actually used when the Prolog engine was formerly initialised.

This method returns null if the Prolog engine has not yet been initialised, and thus may be used to test this condition.

Returns:
actual initialization arguments

Definition at line 157 of file JPL.java.

static String [] jpl::JPL::getDefaultInitArgs (  )  [inline, static]

Returns, in an array of String, the sequence of command-line arguments that would be used if the Prolog engine were to be initialised now. Returns null if the Prolog VM has already been initialised (in which case the default init args are irrelevant and the actual init args are of interest)

See also:
jpl.JPL::getActualInitArgs
Returns:
current default initialisation arguments, or null if already initialised

Definition at line 132 of file JPL.java.

static void jpl::JPL::halt (  )  [inline, static]

Terminates the Prolog session.

Note. This method calls the FLI halt() method with a status of 0, but the halt method currently is a no-op in SWI.

Deprecated:

Definition at line 213 of file JPL.java.

static boolean jpl::JPL::init (  )  [inline, static]

Initialises the Prolog engine using the current default initialisation parameters, and returns 'true' (or 'false' if already initialised).

Definition at line 185 of file JPL.java.

static boolean jpl::JPL::init ( String[]  args  )  [inline, static]

Initializes the Prolog engine, using the String argument parameters passed. This method need be called only if you want to both (i) initialise the Prolog engine with parameters other than the default ones and (ii) force initialisation to occur (rather than allow it to occur automatically at the first query). For parameter options, consult your local Prolog documentation. The parameter values are passed directly to initialization routines for the Prolog environment.

This method must be called before making any queries.

Parameters:
args Initialization parameter list

Definition at line 176 of file JPL.java.

static boolean jpl::JPL::isTag ( String  s  )  [inline, static]

whether the String arg is a plausible tag, e.g. "J#0123456789".

Definition at line 193 of file JPL.java.

static void jpl::JPL::loadNativeLibrary (  )  [inline, static]

Definition at line 94 of file JPL.java.

static void jpl::JPL::main ( String[]  args  )  [inline, static]

Definition at line 238 of file JPL.java.

static Term jpl::JPL::newJRef ( Object  obj  )  [inline, static]

returns a new Term instance which represents the given object

Definition at line 201 of file JPL.java.

static void jpl::JPL::setDefaultInitArgs ( String[]  args  )  [inline, static]

Specifies, in an array of String, the sequence of command-line arguments that should be used if the Prolog engine is subsequently initialised.

Parameters:
args new default initialization arguments

Definition at line 143 of file JPL.java.

static void jpl::JPL::setDTMMode ( boolean  dtm  )  [inline, static]

Sets the global "dont-tell-me" mode (default value: true). When 'true', bindings will *not* be returned for any variable (in a Query's goal) whose name begins with an underscore character (except for "anonymous" variables, i.e. those whose name comprises just the underscore character, whose bindings are never returned). When 'false', bindings are returned for *all* variables except anonymous ones; this mode may be useful when traditional top-level interpreter behaviour is wanted, e.g. in a Java-based Prolog IDE or debugger.

This method should be regarded as experimental, and may subsequently be deprecated in favour of some more general mechanism for setting options, perhaps per-Query and per-call as well as globally.

Parameters:
dtm new "dont-tell-me" mode value

Definition at line 118 of file JPL.java.

static String jpl::JPL::setNativeLibraryDir ( String  newDir  )  [inline, static]

Definition at line 84 of file JPL.java.

static String jpl::JPL::setNativeLibraryName ( String  newName  )  [inline, static]

Definition at line 75 of file JPL.java.

static String jpl::JPL::setNativeLibraryPath ( String  newPath  )  [inline, static]

Definition at line 89 of file JPL.java.

static Version jpl::JPL::version (  )  [inline, static]

Returns (as a Version) an identification of this version of JPL.

Returns:
the running version of JPL.

Definition at line 225 of file JPL.java.

static String jpl::JPL::version_string (  )  [inline, static]

Returns a String (eg "3.0.0-alpha") identifying this version of JPL.

Returns:
a String (eg "3.0.0-alpha") identifying this version of JPL.

Definition at line 234 of file JPL.java.


Member Data Documentation

final boolean jpl::JPL::DEBUG = false [static, protected]

Definition at line 63 of file JPL.java.

final Term jpl::JPL::JFALSE = new Compound("@", new Term[] {new Atom("false")}) [static]

Definition at line 65 of file JPL.java.

final Term jpl::JPL::JNULL = new Compound("@", new Term[] {new Atom("null")}) [static]

Definition at line 67 of file JPL.java.

final Term jpl::JPL::JTRUE = new Compound("@", new Term[] {new Atom("true")}) [static]

Definition at line 66 of file JPL.java.

final Term jpl::JPL::JVOID = new Compound("@", new Term[] {new Atom("void")}) [static]

Definition at line 68 of file JPL.java.

boolean jpl::JPL::modeDontTellMe = true [static, protected]

Definition at line 70 of file JPL.java.

String jpl::JPL::nativeLibraryDir = null [static, private]

Definition at line 73 of file JPL.java.

String jpl::JPL::nativeLibraryName = "jpl" [static, private]

Definition at line 72 of file JPL.java.

String jpl::JPL::nativeLibraryPath = null [static, private]

Definition at line 74 of file JPL.java.

final Version jpl::JPL::version_ = new Version() [static, private]

Definition at line 218 of file JPL.java.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Defines


jpl
Author(s): Lorenz Moesenlechner
autogenerated on Fri Jan 11 09:40:31 2013