edu.cs.ai.kreator.logic
Interface LogicTranslator<L,S,P,A,T,V extends T,C extends T>

Type Parameters:
L - Type of the Language used in the foreign logic.
S - Type of the Sort used in the foreign logic.
P - Type of the Predicate used in the foreign logic.
A - Type of the Atom used in the foreign logic.
T - Type of the Term used in the foreign logic.
V - Type of the Variable used in the foreign logic.
C - Type of the Constant used in the foreign logic.
All Known Implementing Classes:
TweetyTranslator

public interface LogicTranslator<L,S,P,A,T,V extends T,C extends T>

This a generic interface for translating the KReator logic into another logic and vice-versa. We will call the other logic "foreign logic".

Author:
Tim Janus

Method Summary
 A fromKreatorAtom(GeneralizedAtom atom, L language)
          Creates a foreign atom from the given KReator Atom.
 C fromKreatorConstant(Constant c, L language)
           
 L fromKreatorLanguage(LanguageFactory language)
          Creates a foreign language signature of type L from the given KReator language Factory.
 P fromKreatorPredicate(GeneralizedPredicate predicate, L language)
          Creates a foreign logic Predicate of type P from the given KReator GeneralizedPredicate.
 S fromKreatorSort(Sort sort, L language)
          Creates a foreign language Sort of Type S from the given KReator Sort.
 T fromKreatorTerm(Term term, L language)
           
 V fromKreatorVariable(Variable variable, L language)
           
 GeneralizedAtom toKreatorAtom(A atom, LanguageFactory language)
          Creates a GeneralizedAtom from the given foreign logic atom
 Constant toKreatorConstant(C constant, LanguageFactory language)
           
 LanguageFactory toKreatorLanguage(L language)
          Creates a Kreator FolSignature from the given foreign logic language.
 GeneralizedPredicate toKreatorPredicate(P predicate, LanguageFactory language)
          Creates a KReator GeneralizedPredicate from the given Predicate of type P of the foreign logic.
 Sort toKreatorSort(S sort, LanguageFactory language)
          Creates a KReator Sort from the given foreign language Sort
 Term toKreatorTerm(T term, LanguageFactory language)
           
 Variable toKreatorVariable(V variable, LanguageFactory language)
           
 

Method Detail

toKreatorLanguage

LanguageFactory toKreatorLanguage(L language)
                                  throws TranslationException
Creates a Kreator FolSignature from the given foreign logic language.

Parameters:
language - The foreign language signature to "copy".
Returns:
New instance of Kreator FolSignature
Throws:
TranslationException

fromKreatorLanguage

L fromKreatorLanguage(LanguageFactory language)
                      throws TranslationException
Creates a foreign language signature of type L from the given KReator language Factory.

Parameters:
langauge - The KReator language-Factory to "copy".
Returns:
New instance of type L
Throws:
TranslationException

toKreatorSort

Sort toKreatorSort(S sort,
                   LanguageFactory language)
                   throws TranslationException
Creates a KReator Sort from the given foreign language Sort

Parameters:
sort - The Sort of the foreign logic
language - The KReator language factory representing the KReator language.
Returns:
New or available KReator Sort representing the given parameter.
Throws:
TranslationException

fromKreatorSort

S fromKreatorSort(Sort sort,
                  L language)
                  throws TranslationException
Creates a foreign language Sort of Type S from the given KReator Sort.

Parameters:
sort - The Kreator Sort
language - The language signature of the foreign language.
Returns:
The Sort of Type S representing the given KReator Sort.
Throws:
TranslationException

toKreatorPredicate

GeneralizedPredicate toKreatorPredicate(P predicate,
                                        LanguageFactory language)
                                        throws TranslationException
Creates a KReator GeneralizedPredicate from the given Predicate of type P of the foreign logic.

Parameters:
predicate - Predicate of type P from the foreign logic.
language - KReator language factory representing the KReator language.
Returns:
Throws:
TranslationException

fromKreatorPredicate

P fromKreatorPredicate(GeneralizedPredicate predicate,
                       L language)
                       throws TranslationException
Creates a foreign logic Predicate of type P from the given KReator GeneralizedPredicate.

Parameters:
predicate - KReator Generalized Predicate.
language - signature of the foreign logic.
Returns:
A predicate of type P representing the given KReator Predicate in the foreign logic.
Throws:
TranslationException

toKreatorAtom

GeneralizedAtom toKreatorAtom(A atom,
                              LanguageFactory language)
                              throws TranslationException
Creates a GeneralizedAtom from the given foreign logic atom

Parameters:
atom - foreign logic atom
language - KReator language factory
Returns:
A KReator Atom representing the foreign logic atom.
Throws:
TranslationException

fromKreatorAtom

A fromKreatorAtom(GeneralizedAtom atom,
                  L language)
                  throws TranslationException
Creates a foreign atom from the given KReator Atom.

Parameters:
atom - The Kreator atom
language - The signature of the foreign logic language.
Returns:
A atom of type A of the foreign logic representing the given KReator atom
Throws:
TranslationException

toKreatorTerm

Term toKreatorTerm(T term,
                   LanguageFactory language)
                   throws TranslationException
Throws:
TranslationException

fromKreatorTerm

T fromKreatorTerm(Term term,
                  L language)
                  throws TranslationException
Throws:
TranslationException

toKreatorVariable

Variable toKreatorVariable(V variable,
                           LanguageFactory language)
                           throws TranslationException
Throws:
TranslationException

fromKreatorVariable

V fromKreatorVariable(Variable variable,
                      L language)
                                throws TranslationException
Throws:
TranslationException

toKreatorConstant

Constant toKreatorConstant(C constant,
                           LanguageFactory language)
                           throws TranslationException
Throws:
TranslationException

fromKreatorConstant

C fromKreatorConstant(Constant c,
                      L language)
                                throws TranslationException
Throws:
TranslationException