Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion devtools/run-test-suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def compareOutputs(f, parser):
for f in glob.glob("test-suite/**/*.p"):
parser = Parser(f)

if any(out in parser.arguments for out in outputTest) :
if any(out in parser.arguments for out in outputTest) and (os.path.exists(os.path.splitext(f)[0] + ".out")) :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be great to simply check if a .out exists in this case and remove the option check!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I'm requesting the CI as I don't think any change in a .go file is needed)

compareOutputs(f, parser)
else :
runWithExpected(f, parser)
37 changes: 37 additions & 0 deletions devtools/test-suite/bugs/bug_61.p
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
% args: -otptp
% result: VALID

%------------------------------------------------------------------------------
fof(c1, axiom,
! [X] :
(q(b)
| ~ s(X))).

fof(c2, axiom,
! [X] :
(~ q(b)
| ~ p(X)
| ~ r)).

fof(c3, axiom,
(p(c)
| ~ q(c))).

fof(c4, axiom,
! [Y] :
(p(c)
| q(Y))).

fof(c5, axiom,
(q(c)
| ~ q(b))).

fof(c6, axiom,
(r
| ~ p(c))).

fof(c7, axiom,
(s(sK1)
| q(b)
| ~ p(c))).
%------------------------------------------------------------------------------
7 changes: 6 additions & 1 deletion src/Mods/tptp/proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,12 @@ func processMainFormula(form AST.Form) (*AST.FormList, AST.Form) {
case AST.And:
last := nf.FormList.Len() - 1
formList = AST.NewFormList(nf.FormList.GetElements(0, last)...)
form = nf.FormList.Get(last).(AST.Not).GetForm()
switch f := nf.FormList.Get(last).(type) {
case AST.Not:
form = f.GetForm()
default:
form = f
}
}
return formList, form
}
Expand Down