Skip to content

Failed requires give unhelpful (and uncaught) errors #110

@sankalpgambhir

Description

@sankalpgambhir

Failed requires currently give rather unhelpful errors. Eg:

val x = variable
val y = variable
val g = function(2)
val Z = LambdaTermTerm(Seq(x), g(x, y)) // notice this has arity 1

// followed by a proof
   ...
   'P('x); 'Q('h('x, 'y)) |- 'R('y)      by Magic
   'P('x); 'Q('g('x, 'y)) |- 'R('y)      by InstFunSchema(Map(h -> Z))

is improper, since Z has arity 1 while h, 2. However, this simply returns the error:

[info]   java.lang.IllegalArgumentException: requirement failed
[info]   at scala.Predef$.require(Predef.scala:324)
[info]   at lisa.kernel.fol.Substitutions.instantiateTermSchemas(Substitutions.scala:131)
[info]   at lisa.kernel.fol.Substitutions.instantiateTermSchemas$(Substitutions.scala:130)
[info]   at lisa.kernel.fol.FOL$.instantiateTermSchemas(FOL.scala:10)
[info]   at lisa.utils.tactics.BasicStepTactic$InstFunSchema$.apply$$anonfun$7(BasicStepTactic.scala:1064)
[info]   at scala.collection.StrictOptimizedIterableOps.map(StrictOptimizedIterableOps.scala:100)
[info]   at scala.collection.StrictOptimizedIterableOps.map$(StrictOptimizedIterableOps.scala:87)
[info]   at scala.collection.immutable.Set$Set2.map(Set.scala:183)
[info]   at lisa.utils.tactics.BasicStepTactic$InstFunSchema$.apply(BasicStepTactic.scala:1064)
[info]   at lisa.utils.BasicTacticTest.testFun$proxy46$1$$anonfun$1(BasicTacticTest.scala:1219)
[info]   ...

We could probably stand to improve these errors for easier proof debugging.

Metadata

Metadata

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions