Search in sources :

Example 86 with DeclarationNode

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());
}
Also used : FormulaNode(de.bmoth.parser.ast.nodes.FormulaNode) DeclarationNode(de.bmoth.parser.ast.nodes.DeclarationNode) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 87 with DeclarationNode

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());
}
Also used : FormulaNode(de.bmoth.parser.ast.nodes.FormulaNode) DeclarationNode(de.bmoth.parser.ast.nodes.DeclarationNode) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 88 with DeclarationNode

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());
}
Also used : FormulaNode(de.bmoth.parser.ast.nodes.FormulaNode) DeclarationNode(de.bmoth.parser.ast.nodes.DeclarationNode) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 89 with DeclarationNode

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());
}
Also used : FormulaNode(de.bmoth.parser.ast.nodes.FormulaNode) DeclarationNode(de.bmoth.parser.ast.nodes.DeclarationNode) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 90 with DeclarationNode

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());
}
Also used : FormulaNode(de.bmoth.parser.ast.nodes.FormulaNode) DeclarationNode(de.bmoth.parser.ast.nodes.DeclarationNode) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

DeclarationNode (de.bmoth.parser.ast.nodes.DeclarationNode)93 Test (org.junit.Test)92 FormulaNode (de.bmoth.parser.ast.nodes.FormulaNode)91 Ignore (org.junit.Ignore)27 MachineNode (de.bmoth.parser.ast.nodes.MachineNode)2 ParserException (de.bmoth.parser.ParserException)1 AnySubstitutionNode (de.bmoth.parser.ast.nodes.AnySubstitutionNode)1 OperationNode (de.bmoth.parser.ast.nodes.OperationNode)1 HashMap (java.util.HashMap)1