question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AssertionException when using things which in the library

See original GitHub issue

Aya Version: commit 5e317b38ea27dbe878a1f13369102ca94e6044eb JRE: Liberica JDK 19

Code (using library base/src/test/resources/success/common):

open import Data::List
-- In order to compute the expr
open import Paths

open data Unit | unit

def what : (unit :< nil) >>= pure = (unit :< nil) => idp
java.lang.AssertionError

java.lang.AssertionError
	at org.aya.core.pat.PatMatcher.visitList(PatMatcher.java:113)
	at org.aya.core.pat.PatMatcher.match(PatMatcher.java:62)
	at org.aya.core.pat.PatMatcher.match(PatMatcher.java:118)
	at org.aya.core.pat.PatMatcher.tryBuildSubstTerms(PatMatcher.java:47)
	at org.aya.core.pat.PatMatcher.tryBuildSubstArgs(PatMatcher.java:37)
	at org.aya.core.visitor.DeltaExpander.tryUnfoldClauses(DeltaExpander.java:74)
	at org.aya.core.visitor.DeltaExpander.tryUnfoldClauses(DeltaExpander.java:87)
	at org.aya.core.visitor.DeltaExpander.lambda$post$4(DeltaExpander.java:47)
	at kala.control.Either$Right.fold(Either.java:332)
	at org.aya.core.visitor.DeltaExpander.post(DeltaExpander.java:45)
	at org.aya.core.visitor.Expander.post(Expander.java:17)
	at org.aya.core.visitor.EndoFunctor.apply(EndoFunctor.java:34)
	at org.aya.core.visitor.Expander$WHNFer.apply(Expander.java:27)
	at org.aya.core.visitor.DeltaExpander.lambda$post$2(DeltaExpander.java:46)
	at kala.control.Either$Left.fold(Either.java:190)
	at org.aya.core.visitor.DeltaExpander.post(DeltaExpander.java:45)
	at org.aya.core.visitor.Expander.post(Expander.java:17)
	at org.aya.core.visitor.EndoFunctor.apply(EndoFunctor.java:34)
	at org.aya.core.visitor.Expander$WHNFer.apply(Expander.java:27)
	at org.aya.core.visitor.Expander$WHNFer.apply(Expander.java:22)
	at org.aya.generic.Arg.descent(Arg.java:26)
	at org.aya.core.term.Term.descent(Term.java:82)
	at org.aya.core.visitor.EndoFunctor.apply(EndoFunctor.java:34)
	at org.aya.core.visitor.Expander$WHNFer.apply(Expander.java:27)
	at org.aya.core.visitor.Expander$WHNFer.apply(Expander.java:22)
	at org.aya.core.term.Term.descent(Term.java:81)
	at org.aya.core.visitor.EndoFunctor.apply(EndoFunctor.java:34)
	at org.aya.core.visitor.Expander$WHNFer.apply(Expander.java:27)
	at org.aya.core.term.Term.normalize(Term.java:220)
	at org.aya.tyck.unify.TermComparator.compare(TermComparator.java:138)
	at org.aya.tyck.unify.TermComparator.compare(TermComparator.java:131)
	at org.aya.tyck.ExprTycker.unifyTy(ExprTycker.java:696)
	at org.aya.tyck.ExprTycker.unifyTyMaybeInsert(ExprTycker.java:726)
	at org.aya.tyck.ExprTycker.doInherit(ExprTycker.java:445)
	at org.aya.tyck.ExprTycker.inherit(ExprTycker.java:556)
	at org.aya.tyck.StmtTycker.doSimpleFn(StmtTycker.java:161)
	at org.aya.tyck.StmtTycker.lambda$simpleFn$7(StmtTycker.java:154)
	at org.aya.tyck.StmtTycker.traced(StmtTycker.java:55)
	at org.aya.tyck.StmtTycker.simpleFn(StmtTycker.java:154)
	at org.aya.tyck.order.AyaSccTycker.checkSimpleFn(AyaSccTycker.java:154)
	at org.aya.tyck.order.AyaSccTycker.checkUnit(AyaSccTycker.java:122)
	at org.aya.tyck.order.AyaSccTycker.tyckSCC(AyaSccTycker.java:64)
	at org.aya.util.tyck.OrgaTycker.tyckSCC(OrgaTycker.java:25)
	at kala.collection.immutable.ImmutableVectors$Vector1.forEach(ImmutableVectors.java:440)
	at org.aya.resolve.module.ModuleLoader.tyckModule(ModuleLoader.java:41)
	at org.aya.cli.library.LibraryModuleLoader.load(LibraryModuleLoader.java:79)
	at org.aya.resolve.module.CachedModuleLoader.lambda$load$0(CachedModuleLoader.java:32)
	at kala.collection.mutable.MutableTreeMap.getOrPut(MutableTreeMap.java:483)
	at org.aya.resolve.module.CachedModuleLoader.load(CachedModuleLoader.java:32)
	at org.aya.resolve.module.ModuleLoader.load(ModuleLoader.java:63)
	at org.aya.cli.library.LibraryCompiler$LibrarySccTycker.tyckOne(LibraryCompiler.java:316)
	at org.aya.cli.library.LibraryCompiler$LibrarySccTycker.tyckSCC(LibraryCompiler.java:305)
	at org.aya.util.tyck.OrgaTycker.tyckSCC(OrgaTycker.java:25)
	at kala.function.CheckedConsumer.accept(CheckedConsumer.java:46)
	at kala.collection.immutable.ImmutableVectors.forEachRec(ImmutableVectors.java:745)
	at kala.collection.immutable.ImmutableVectors$BigVector.forEach(ImmutableVectors.java:567)
	at kala.collection.base.Traversable.forEachChecked(Traversable.java:705)
	at org.aya.cli.library.LibraryCompiler.make(LibraryCompiler.java:208)
	at org.aya.cli.library.LibraryCompiler.make(LibraryCompiler.java:178)
	at org.aya.cli.utils.AyaCompiler.catching(AyaCompiler.java:30)
	at org.aya.cli.library.LibraryCompiler.start(LibraryCompiler.java:143)
	at org.aya.cli.library.LibraryCompiler.compile(LibraryCompiler.java:89)
	at org.aya.test.LibraryTest.compile(LibraryTest.java:110)
	at org.aya.test.LibraryTest.testOnDisk(LibraryTest.java:35)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
	at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
	at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
	at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:62)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
	at jdk.proxy2/jdk.proxy2.$Proxy5.stop(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
	at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
	at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
	at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)

This is must not the minimum version, I will try my best to simplify it.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
imkivacommented, Oct 6, 2022

Out of topic: This code also causes an InternalException:

open import Data::List
open import Arith::Nat
open import Paths

def what : join (fmap (\ _x => 1 :< nil) (0 :< nil)) = (1 :< nil) => idp

org.aya.generic.util.InternalException: _x

Fixed in https://github.com/aya-prover/aya-dev/commit/0a86a2995b60cca2496494ff6ab1e3077ecf668a

0reactions
imkivacommented, Oct 6, 2022

dataArgs were mistakenly inserted to conArgs during (de)serialization

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Catching AssertionException fails tests since 3.10. · Issue #2758
I use the mechanism when things are still flaky. ... so I either need to stop using nunit exceptions (or Assert, within the...
Read more >
Getting NUnit AssertionException when verifying list is sorted ...
I'm getting NUnit.Framework.AssertionException Expected:collection ordered. When trying to verify the sorting is ascending with the next code:
Read more >
Cleaning Up Test Failure Noise - · Los Techies
NUnit simplifies its own output when exceptions are thrown by its own assertion library infrastructure. For instance, when NUnit's Assert.
Read more >
Entities 0.17 windows build error: "The scene catalog has not ...
I get the following error in a windows build: WindowsPlayer(DESKTOP-JIBIIEB) AssertionException: The scene catalog has not been loaded yet ...
Read more >
Assertions and assertion libraries — Matthias Noback - Blog
A RuntimeException is a failure caused by external, unpredictable things: the database, the filesystem, the network, etc. A LogicException is a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found