Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
122
Issues
122
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
0a4ec4c2
Commit
0a4ec4c2
authored
Apr 25, 2019
by
Sylvain Dailler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
destruct: now destruct "true" and "false"
Also add tests for not, true and false
parent
06cb0f6e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
0 deletions
+69
-0
CHANGES.md
CHANGES.md
+1
-0
examples/bts/311_destruct.mlw
examples/bts/311_destruct.mlw
+20
-0
examples/bts/311_destruct/why3session.xml
examples/bts/311_destruct/why3session.xml
+44
-0
examples/bts/311_destruct/why3shapes.gz
examples/bts/311_destruct/why3shapes.gz
+0
-0
src/transform/destruct.ml
src/transform/destruct.ml
+4
-0
No files found.
CHANGES.md
View file @
0a4ec4c2
...
...
@@ -34,6 +34,7 @@ Transformations
generalize in the induction
*
`destruct`
now destruct
`not p`
into
`p -> false`
.
`destruct_rec`
is
allowed to further destruct afterwards.
`destruct`
can also destruct
`true`
and
`false`
.
IDE
*
display of counterexamples in the Task view has been improved
...
...
examples/bts/311_destruct.mlw
0 → 100644
View file @
0a4ec4c2
use list.List
use list.Length
use int.Int
constant x: int
predicate p int
axiom H: not (p 0)
axiom H1: p 0
goal g: false
axiom H2: false
goal g5: p 5
axiom H3: true
goal g6: p 5
examples/bts/311_destruct/why3session.xml
0 → 100644
View file @
0a4ec4c2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE why3session PUBLIC "-//Why3//proof session v5//EN"
"http://why3.lri.fr/why3session.dtd">
<why3session
shape_version=
"6"
>
<prover
id=
"0"
name=
"Alt-Ergo"
version=
"2.2.0"
timelimit=
"20"
steplimit=
"0"
memlimit=
"1000"
/>
<file
proved=
"true"
>
<path
name=
".."
/>
<path
name=
"311_destruct.mlw"
/>
<theory
name=
"Top"
proved=
"true"
>
<goal
name=
"g"
proved=
"true"
>
<transf
name=
"destruct"
proved=
"true"
arg1=
"H"
>
<goal
name=
"g.0"
proved=
"true"
>
<transf
name=
"destruct"
proved=
"true"
arg1=
"H"
>
<goal
name=
"g.0.0"
expl=
"destruct premise"
proved=
"true"
>
<proof
prover=
"0"
><result
status=
"valid"
time=
"0.00"
steps=
"2"
/></proof>
</goal>
<goal
name=
"g.0.1"
proved=
"true"
>
<transf
name=
"destruct"
proved=
"true"
arg1=
"H"
>
</transf>
</goal>
</transf>
</goal>
</transf>
<transf
name=
"destruct_rec"
proved=
"true"
arg1=
"H"
>
<goal
name=
"g.0"
expl=
"destruct premise"
proved=
"true"
>
<proof
prover=
"0"
><result
status=
"valid"
time=
"0.00"
steps=
"2"
/></proof>
</goal>
</transf>
</goal>
<goal
name=
"g5"
proved=
"true"
>
<transf
name=
"destruct"
proved=
"true"
arg1=
"H2"
>
</transf>
</goal>
<goal
name=
"g6"
proved=
"true"
>
<transf
name=
"destruct"
proved=
"true"
arg1=
"H3"
>
<goal
name=
"g6.0"
proved=
"true"
>
<transf
name=
"destruct"
proved=
"true"
arg1=
"H2"
>
</transf>
</goal>
</transf>
</goal>
</theory>
</file>
</why3session>
examples/bts/311_destruct/why3shapes.gz
0 → 100644
View file @
0a4ec4c2
File added
src/transform/destruct.ml
View file @
0a4ec4c2
...
...
@@ -248,6 +248,10 @@ let destruct_fmla ~recursive (t: term) =
in
match
t
.
t_node
with
|
Tfalse
->
[]
|
Ttrue
->
[[]]
|
Tbinop
(
Tand
,
t1
,
t2
)
->
let
l1
=
destruct_fmla_exception
~
toplevel
:
false
t1
in
let
l2
=
destruct_fmla_exception
~
toplevel
:
false
t2
in
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment