use of de.bmoth.parser.ast.nodes.DeclarationNode in project bmoth by hhu-stups.
the class FunctionsTest method totalInjectionTest.
@Test
@Ignore
public void totalInjectionTest() throws ParserException {
String formula = "x = {2,3} >-> {1,4}";
FormulaNode formulaNode = Parser.getFormulaAsSemanticAst(formula);
assertEquals(PREDICATE_FORMULA, formulaNode.getFormulaType());
DeclarationNode declarationNode = formulaNode.getImplicitDeclarations().get(0);
assertEquals("x", declarationNode.getName());
assertEquals(POW_INTEGER_INTEGER, declarationNode.getType().toString());
}
use of de.bmoth.parser.ast.nodes.DeclarationNode in project bmoth by hhu-stups.
the class FunctionsTest method partialFunctionTest.
@Test
@Ignore
public void partialFunctionTest() throws ParserException {
String formula = "x = {2,3} +-> {1,4}";
FormulaNode formulaNode = Parser.getFormulaAsSemanticAst(formula);
assertEquals(PREDICATE_FORMULA, formulaNode.getFormulaType());
DeclarationNode declarationNode = formulaNode.getImplicitDeclarations().get(0);
assertEquals("x", declarationNode.getName());
assertEquals(POW_INTEGER_INTEGER, declarationNode.getType().toString());
}
use of de.bmoth.parser.ast.nodes.DeclarationNode in project bmoth by hhu-stups.
the class FunctionsTest method partialSurjectionTest.
@Test
@Ignore
public void partialSurjectionTest() throws ParserException {
String formula = "x = {2,3} +->> {1,4}";
FormulaNode formulaNode = Parser.getFormulaAsSemanticAst(formula);
assertEquals(PREDICATE_FORMULA, formulaNode.getFormulaType());
DeclarationNode declarationNode = formulaNode.getImplicitDeclarations().get(0);
assertEquals("x", declarationNode.getName());
assertEquals(POW_INTEGER_INTEGER, declarationNode.getType().toString());
}
use of de.bmoth.parser.ast.nodes.DeclarationNode in project bmoth by hhu-stups.
the class FunctionsTest method totalSurjectionTest.
@Test
@Ignore
public void totalSurjectionTest() throws ParserException {
String formula = "x = {2,3} -->> {1,4}";
FormulaNode formulaNode = Parser.getFormulaAsSemanticAst(formula);
assertEquals(PREDICATE_FORMULA, formulaNode.getFormulaType());
DeclarationNode declarationNode = formulaNode.getImplicitDeclarations().get(0);
assertEquals("x", declarationNode.getName());
assertEquals(POW_INTEGER_INTEGER, declarationNode.getType().toString());
}
use of de.bmoth.parser.ast.nodes.DeclarationNode in project bmoth by hhu-stups.
the class FunctionsTest method partialInjectionTest.
@Test
@Ignore
public void partialInjectionTest() throws ParserException {
String formula = "x = {2,3} >+> {1,4}";
FormulaNode formulaNode = Parser.getFormulaAsSemanticAst(formula);
assertEquals(PREDICATE_FORMULA, formulaNode.getFormulaType());
DeclarationNode declarationNode = formulaNode.getImplicitDeclarations().get(0);
assertEquals("x", declarationNode.getName());
assertEquals(POW_INTEGER_INTEGER, declarationNode.getType().toString());
}
Aggregations