use of de.bmoth.backend.SubstitutionOptions in project bmoth by hhu-stups.
the class MachineTranslatorTest method testOperationsGeneration.
@Test
public void testOperationsGeneration() {
assertEquals(1, translator.getOperationConstraints().size());
assertEquals(translator.getOperationConstraints(), translator.getOperationConstraints(new SubstitutionOptions(TranslationOptions.PRIMED_0, TranslationOptions.UNPRIMED)));
assertEquals("[(and (< x 50) (= |x'0| (+ x 1)))]", translator.getOperationConstraints().toString());
assertEquals("[(and (< |x'128| 50) (= |x'512| (+ |x'128| 1)))]", translator.getOperationConstraints(new SubstitutionOptions(new TranslationOptions(512), new TranslationOptions(128))).toString());
}
use of de.bmoth.backend.SubstitutionOptions in project bmoth by hhu-stups.
the class MachineTranslatorTest method testCombinedOperationsGeneration.
@Test
public void testCombinedOperationsGeneration() {
assertEquals(translator.getCombinedOperationConstraint(), translator.getCombinedOperationConstraint(new SubstitutionOptions(TranslationOptions.PRIMED_0, TranslationOptions.UNPRIMED)));
assertEquals("(and (< x 50) (= |x'0| (+ x 1)))", translator.getCombinedOperationConstraint().toString());
assertEquals("(and (< |x'128| 50) (= |x'512| (+ |x'128| 1)))", translator.getCombinedOperationConstraint(new SubstitutionOptions(new TranslationOptions(512), new TranslationOptions(128))).toString());
}
Aggregations