|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjpl.JPL
public class JPL
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) 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.
Field Summary | |
---|---|
static Term |
JFALSE
|
static Term |
JNULL
|
static Term |
JTRUE
|
static Term |
JVOID
|
Constructor Summary | |
---|---|
JPL()
|
Method Summary | |
---|---|
static java.lang.String[] |
getActualInitArgs()
Returns, in an array of String, the sequence of command-line arguments that were actually used when the Prolog engine was formerly initialised. |
static java.lang.String[] |
getDefaultInitArgs()
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. |
static void |
halt()
Deprecated. |
static boolean |
init()
Initialises the Prolog engine using the current default initialisation parameters, and returns 'true' (or 'false' if already initialised). |
static boolean |
init(java.lang.String[] args)
Initializes the Prolog engine, using the String argument parameters passed. |
static boolean |
isTag(java.lang.String s)
whether the String arg is a plausible tag, e.g. |
static void |
loadNativeLibrary()
|
static void |
main(java.lang.String[] args)
|
static Term |
newJRef(java.lang.Object obj)
returns a new Term instance which represents the given object |
static void |
setDefaultInitArgs(java.lang.String[] args)
Specifies, in an array of String, the sequence of command-line arguments that should be used if the Prolog engine is subsequently initialised. |
static void |
setDTMMode(boolean dtm)
Sets the global "dont-tell-me" mode (default value: true). |
static java.lang.String |
setNativeLibraryDir(java.lang.String newDir)
|
static java.lang.String |
setNativeLibraryName(java.lang.String newName)
|
static java.lang.String |
setNativeLibraryPath(java.lang.String newPath)
|
static java.lang.String |
version_string()
Returns a String (eg "3.0.0-alpha") identifying this version of JPL. |
static jpl.Version |
version()
Returns (as a Version) an identification of this version of JPL. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Term JFALSE
public static final Term JTRUE
public static final Term JNULL
public static final Term JVOID
Constructor Detail |
---|
public JPL()
Method Detail |
---|
public static java.lang.String setNativeLibraryName(java.lang.String newName)
public static java.lang.String setNativeLibraryDir(java.lang.String newDir)
public static java.lang.String setNativeLibraryPath(java.lang.String newPath)
public static void loadNativeLibrary()
public static void setDTMMode(boolean dtm)
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.
dtm
- new "dont-tell-me" mode valuepublic static java.lang.String[] getDefaultInitArgs()
getActualInitArgs()
public static void setDefaultInitArgs(java.lang.String[] args)
args
- new default initialization argumentspublic static java.lang.String[] getActualInitArgs()
public static boolean init(java.lang.String[] args)
This method must be called before making any queries.
args
- Initialization parameter listpublic static boolean init()
public static boolean isTag(java.lang.String s)
public static Term newJRef(java.lang.Object obj)
public static void halt()
Note. This method calls the FLI halt() method with a status of 0, but the halt method currently is a no-op in SWI.
public static jpl.Version version()
public static java.lang.String version_string()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |