|
GNU Prolog for Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gnu.prolog.vm.Environment
public class Environment
this class represent prolog processor.
Nested Class Summary | |
---|---|
static class |
Environment.DoubleQuotesValue
The possible values of the double_quotes flag |
protected static class |
Environment.PrologCodeListenerRef
|
Constructor Summary | |
---|---|
Environment()
constructor of environment, it loads buildins to database at start. |
|
Environment(InputStream stdin,
OutputStream stdout)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected OperatorSet opSet
protected PrologTextLoaderState prologTextLoaderState
protected PrologCode undefinedPredicate
protected Map<CompoundTermTag,PrologCode> tag2code
public static final AtomTerm boundedAtom
public static final AtomTerm integerRoundingFunctionAtom
public static final AtomTerm downAtom
public static final AtomTerm towardZeroAtom
public static final AtomTerm charConversionAtom
public static final AtomTerm onAtom
public static final AtomTerm offAtom
public static final AtomTerm debugAtom
public static final AtomTerm unknownAtom
public static final AtomTerm errorAtom
public static final AtomTerm warningAtom
public static final AtomTerm doubleQuotesAtom
public static final AtomTerm dialectAtom
public static final AtomTerm versionAtom
public static final IntegerTerm maxIntegerTerm
public static final IntegerTerm minIntegerTerm
public static final AtomTerm dialectTerm
public static final IntegerTerm versionTerm
public static final AtomTerm prologFlagAtom
public static final AtomTerm flagValueAtom
public static final AtomTerm modifyAtom
public static final CompoundTermTag plusTag
protected Map<AtomTerm,Term> atom2flag
protected Set<AtomTerm> changableFlags
protected Map<CompoundTermTag,List<Environment.PrologCodeListenerRef>> tag2listeners
protected ReferenceQueue<? super PrologCodeListener> prologCodeListenerReferenceQueue
protected PrologStream userInput
protected PrologStream userOutput
protected PrologStream currentInput
protected PrologStream currentOutput
protected List<PrologStream> openStreams
protected Map<AtomTerm,PrologStream> alias2stream
Constructor Detail |
---|
public Environment()
public Environment(InputStream stdin, OutputStream stdout)
Method Detail |
---|
protected void initEnvironment()
protected void createTextLoader()
@Deprecated public PrologTextLoaderState getTextLoaderState()
public boolean isInitialized()
public void runInitialization(Interpreter interpreter)
ensureLoaded(Term)
with the
Interpreter
obtained from createInterpreter()
.
interpreter
- public Map<AtomTerm,Term> getPrologFlags()
public Term getPrologFlag(AtomTerm term)
term
- the flag to get the value of
protected void createNewPrologFlag(AtomTerm flag, Term newValue, boolean changable)
flag
- the flag to addnewValue
- the value of the flagchangable
- whether the flag's value can be changedpublic void setPrologFlag(AtomTerm flag, Term newValue) throws PrologException
PrologException
public List<PrologTextLoaderError> getLoadingErrors()
public PrologTextLoaderState getPrologTextLoaderState()
public void ensureLoaded(Term term)
runInitialization(Interpreter)
after using this and
before expecting answers.
term
- Predicate_ensure_loaded
public Interpreter createInterpreter()
Interpreters
for different
threads.
public Module getModule()
public PrologCode loadPrologCode(CompoundTermTag tag) throws PrologException
tag
- the tag of the PrologCode
to load
PrologException
public PrologCode getUndefinedPredicateCode(CompoundTermTag tag)
tag
-
public PrologCode getPrologCode(CompoundTermTag tag) throws PrologException
tag
-
PrologCode
for the tag
PrologException
protected void pollPrologCodeListeners()
public void addPrologCodeListener(CompoundTermTag tag, PrologCodeListener listener)
tag
- listener
- public void removePrologCodeListener(CompoundTermTag tag, PrologCodeListener listener)
tag
- listener
- public void predicateUpdated(PredicateUpdatedEvent evt)
predicateUpdated
in interface PredicateListener
public static InputStream getDefaultInputStream()
public static void setDefaultInputStream(InputStream defaultInputStream)
defaultInputStream
- the defaultInputStream to setpublic static OutputStream getDefaultOutputStream()
public static void setDefaultOutputStream(OutputStream defaultOutputStream)
defaultOutputStream
- the defaultOutputStream to setpublic OperatorSet getOperatorSet()
protected void initStreams(InputStream stdin, OutputStream stdout)
public PrologStream getUserInput() throws PrologException
PrologException
public PrologStream getUserOutput() throws PrologException
PrologException
public PrologStream getCurrentInput() throws PrologException
PrologException
public PrologStream getCurrentOutput() throws PrologException
PrologException
public void setCurrentInput(PrologStream stream) throws PrologException
PrologException
public void setCurrentOutput(PrologStream stream) throws PrologException
PrologException
public Map<PrologStream,List<Term>> getStreamProperties() throws PrologException
PrologException
public PrologStream resolveStream(Term stream_or_alias) throws PrologException
PrologException
public Term open(AtomTerm source_sink, AtomTerm mode, PrologStream.OpenOptions options) throws PrologException
PrologException
public boolean close(PrologStream stream) throws PrologException
stream
-
PrologException
public void closeStreams()
public CharConversionTable getConversionTable()
|
GNU Prolog for Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |