org.ggp.base.util.ruleengine.StdTranslator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alloy-ggp-base Show documentation
Show all versions of alloy-ggp-base Show documentation
A modified version of the GGP-Base library for Alloy.
The newest version!
package org.ggp.base.util.ruleengine;
import java.util.Set;
import org.ggp.base.util.gdl.grammar.GdlSentence;
import org.ggp.base.util.gdl.grammar.GdlTerm;
import org.ggp.base.util.statemachine.MachineState;
import org.ggp.base.util.statemachine.Move;
public class StdTranslator implements Translator {
public static final StdTranslator INSTANCE = new StdTranslator();
@Override
public GdlTerm getGdlMove(Move move) {
return move.getContents();
}
@Override
public Move getNativeMove(MachineState state, int roleIndex, GdlTerm move) {
return new Move(move);
}
@Override
public Set getGdlState(MachineState state) {
return state.getContents();
}
@Override
public MachineState getNativeState(Set state) {
return new MachineState(state);
}
}