crowlogic / arb4j

arb4j is a Java API for the arbitrary precision ball arithmetic library found at http://arblib.org
Other
1 stars 0 forks source link

Product: initializer not being called #337

Closed crowlogic closed 8 months ago

crowlogic commented 8 months ago
java.lang.NullPointerException: Cannot invoke "arb.Real.get(arb.Integer)" because "this.α" is null
    at factorℝ1.evaluate(Unknown Source)
    at arb4j/arb.functions.Function.evaluate(Function.java:111)
    at F.evaluate(Unknown Source)
    at arb4j/arb.functions.Function.evaluate(Function.java:111)
    at arb4j/arb.expressions.nodes.nary.ProductTest.testProductNumerator(ProductTest.java:44)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
    at java.base/java.lang.reflect.Method.invoke(Method.java:580)
    at junit@4.13.2/junit.framework.TestCase.runTest(TestCase.java:177)
    at junit@4.13.2/junit.framework.TestCase.runBare(TestCase.java:142)
    at junit@4.13.2/junit.framework.TestResult$1.protect(TestResult.java:122)
    at junit@4.13.2/junit.framework.TestResult.runProtected(TestResult.java:142)
    at junit@4.13.2/junit.framework.TestResult.run(TestResult.java:125)
    at junit@4.13.2/junit.framework.TestCase.run(TestCase.java:130)
    at junit@4.13.2/junit.framework.TestSuite.runTest(TestSuite.java:241)
    at junit@4.13.2/junit.framework.TestSuite.run(TestSuite.java:236)
    at junit@4.13.2/org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
crowlogic commented 8 months ago
  public boolean needsInitializer()
  {
    String onlyReferencedFunctionName = null;

    if (referencedFunctions.size() == 1)
    {
      onlyReferencedFunctionName = referencedFunctions.entrySet().iterator().next().getKey();
    }

    return (!referencedFunctions.isEmpty()
                  && (functionName != null && !functionName.equals(onlyReferencedFunctionName))) || recursive;
  }

in Expression

crowlogic commented 8 months ago
java.lang.VerifyError: Expecting a stackmap frame at branch target 17
Exception Details:
  Location:
    F.initialize()V @4: ifeq
  Reason:
    Expected stackmap frame at this location.
  Bytecode:
    0000000: 2ab4 005f 9900 0dbb 0061 5912 63b7 0066
    0000010: bf2a b400 2fc7 000d bb00 6159 1268 b700
    0000020: 66bf 2a2a b400 0e2a b400 2fb5 0069 2ab4
    0000030: 000e 2ab4 006b b500 6c2a b400 0e2a b400
    0000040: 6eb5 006f 2ab4 000e 2ab4 0071 b500 722a
    0000050: 04b5 005f b1                           

    at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3549)
    at java.base/java.lang.Class.getConstructor0(Class.java:3754)
    at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2930)
    at arb4j/arb.expressions.Expression.constructNewInstance(Expression.java:1128)
    at arb4j/arb.expressions.Expression.instantiate(Expression.java:1116)
    at arb4j/arb.expressions.Expression.instantiate(Expression.java:142)
    at arb4j/arb.functions.Function.express(Function.java:154)
    at arb4j/arb.expressions.nodes.nary.ProductTest.testProductNumerator(ProductTest.java:36)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
    at java.base/java.lang.reflect.Method.invoke(Method.java:580)
    at junit@4.13.2/junit.framework.TestCase.runTest(TestCase.java:177)
    at junit@4.13.2/junit.framework.TestCase.runBare(TestCase.java:142)
    at junit@4.13.2/junit.framework.TestResult$1.protect(TestResult.java:122)
    at junit@4.13.2/junit.framework.TestResult.runProtected(TestResult.java:142)
    at junit@4.13.2/junit.framework.TestResult.run(TestResult.java:125)
    at junit@4.13.2/junit.framework.TestCase.run(TestCase.java:130)
    at junit@4.13.2/junit.framework.TestSuite.runTest(TestSuite.java:241)
    at junit@4.13.2/junit.framework.TestSuite.run(TestSuite.java:236)
    at junit@4.13.2/org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)