Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lisa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LARA
lisa
Commits
e13332be
Commit
e13332be
authored
2 years ago
by
Katja Goltsova
Committed by
Viktor Kunčak
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add a test to make sure that the path to the first invalid proof step is reported correctly
parent
00ca4fbf
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lisa-utils/src/test/scala/lisa/kernel/InvalidProofPathTests.scala
+32
-0
32 additions, 0 deletions
...ls/src/test/scala/lisa/kernel/InvalidProofPathTests.scala
with
32 additions
and
0 deletions
lisa-utils/src/test/scala/lisa/kernel/InvalidProofPathTests.scala
0 → 100644
+
32
−
0
View file @
e13332be
package
lisa.kernel
import
lisa.kernel.proof.SCProofCheckerJudgement.SCInvalidProof
import
lisa.kernel.proof.SequentCalculus.
*
import
lisa.kernel.proof._
import
lisa.test.ProofCheckerSuite
import
lisa.utils.Helpers.
{
_
,
given
}
class
InvalidProofPathTests
extends
ProofCheckerSuite
{
def
checkPath
(
invalidProof
:
SCProof
,
expectedPath
:
Seq
[
Int
])
:
Unit
=
{
val
proofCheckResult
=
SCProofChecker
.
checkSCProof
(
invalidProof
)
assert
(!
proofCheckResult
.
isValid
,
"expected invalid proof"
)
assert
(
proofCheckResult
.
isInstanceOf
[
SCInvalidProof
],
"invalid proof but valid proof checker judgement"
)
assert
(
proofCheckResult
.
asInstanceOf
[
SCInvalidProof
].
path
===
expectedPath
)
}
test
(
"incorrect step at top level"
)
{
val
eq0
=
RightRefl
(()
|-
s
===
s
,
s
===
s
)
val
eq1
=
RightRefl
(()
|-
t
===
t
,
t
===
t
)
val
wrongStep2
=
Weakening
(
s
===
s
|-
s
===
t
,
0
)
val
wrongStep3
=
RightImplies
(()
|-
(
s
===
s
)
==>
(
s
===
t
),
1
,
s
===
s
,
s
===
t
)
checkPath
(
SCProof
(
eq0
,
eq1
,
wrongStep2
,
wrongStep3
),
Seq
(
2
))
}
test
(
"nested incorrect step"
)
{
val
eq0
=
RightRefl
(()
|-
s
===
s
,
s
===
s
)
val
wrongStep1
=
Weakening
(
s
===
s
|-
s
===
t
,
0
)
val
erroneousSubproof
=
SCSubproof
(
SCProof
(
eq0
,
wrongStep1
))
val
nestedSubproof
=
SCSubproof
(
SCProof
(
erroneousSubproof
,
eq0
))
checkPath
(
SCProof
(
eq0
,
eq0
,
eq0
,
nestedSubproof
),
Seq
(
3
,
0
,
1
))
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment