public class Theory extends Object implements Serializable
Prolog,
Serialized Form| Constructor and Description |
|---|
Theory(InputStream is)
Creates a theory getting its source text from an input stream
|
Theory(String theory)
Creates a theory from its source text
|
Theory(Struct clauseList)
Creates a theory from a clause list
|
public Theory(InputStream is) throws IOException
is - the input stream acting as sourceIOExceptionpublic Theory(String theory) throws InvalidTheoryException
theory - the source texts - InvalidTheoryException if theory is nullInvalidTheoryExceptionpublic Theory(Struct clauseList) throws InvalidTheoryException
clauseList - the source texts - InvalidTheoryException if clauseList is null or is not a prolog listInvalidTheoryExceptionpublic Theory getParsed(Prolog engine)
Convert the theory from textual to a parsed form. If it is already in a parsed form
(i.e. consisting of a clause list) then this instance itself is return, otherwise
a new Theory is created out of the list of parsed clauses.
engine - public void append(Theory th) throws InvalidTheoryException
th - is the theory to be appendeds - InvalidTheoryException if the theory object are not compatibles (they are
compatibles when both have been built from texts or both from clause lists)InvalidTheoryExceptionCopyright © 2015. All rights reserved.