Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
George Pirlea
Iris
Commits
6ca015ff
Commit
6ca015ff
authored
Jan 29, 2017
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify introduction pattern parser.
parent
16b514a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
14 deletions
+9
-14
theories/proofmode/intro_patterns.v
theories/proofmode/intro_patterns.v
+7
-7
theories/proofmode/tactics.v
theories/proofmode/tactics.v
+2
-7
No files found.
theories/proofmode/intro_patterns.v
View file @
6ca015ff
...
...
@@ -16,7 +16,8 @@ Inductive intro_pat :=
|
ISimpl
:
intro_pat
|
IForall
:
intro_pat
|
IAll
:
intro_pat
|
IClear
:
list
(
bool
*
string
)
→
intro_pat
.
(* true = frame, false = clear *)
|
IClear
:
string
→
intro_pat
|
IClearFrame
:
string
→
intro_pat
.
Module
intro_pat
.
Inductive
token
:
=
...
...
@@ -140,15 +141,14 @@ Fixpoint parse_go (ts : list token) (k : stack) : option stack :=
|
TSimpl
::
ts
=>
parse_go
ts
(
SPat
ISimpl
::
k
)
|
TAll
::
ts
=>
parse_go
ts
(
SPat
IAll
::
k
)
|
TForall
::
ts
=>
parse_go
ts
(
SPat
IForall
::
k
)
|
TClearL
::
ts
=>
parse_clear
ts
[]
k
|
TClearL
::
ts
=>
parse_clear
ts
k
|
_
=>
None
end
with
parse_clear
(
ts
:
list
token
)
(
ss
:
list
(
bool
*
string
))
(
k
:
stack
)
:
option
stack
:
=
with
parse_clear
(
ts
:
list
token
)
(
k
:
stack
)
:
option
stack
:
=
match
ts
with
|
TFrame
::
TName
s
::
ts
=>
parse_clear
ts
(
(
true
,
s
)
::
ss
)
k
|
TName
s
::
ts
=>
parse_clear
ts
(
(
false
,
s
)
::
ss
)
k
|
TClearR
::
ts
=>
parse_go
ts
(
SPat
(
IClear
(
reverse
ss
))
::
k
)
|
TFrame
::
TName
s
::
ts
=>
parse_clear
ts
(
SPat
(
IClearFrame
s
)
::
k
)
|
TName
s
::
ts
=>
parse_clear
ts
(
SPat
(
IClear
s
)
::
k
)
|
TClearR
::
ts
=>
parse_go
ts
k
|
_
=>
None
end
.
...
...
theories/proofmode/tactics.v
View file @
6ca015ff
...
...
@@ -780,13 +780,8 @@ Tactic Notation "iIntros" constr(pat) :=
|
ISimpl
::
?pats
=>
simpl
;
go
pats
|
IForall
::
?pats
=>
repeat
iIntroForall
;
go
pats
|
IAll
::
?pats
=>
repeat
(
iIntroForall
||
iIntro
)
;
go
pats
|
IClear
?cpats
::
?pats
=>
let
rec
clr
cpats
:
=
match
cpats
with
|
[]
=>
go
pats
|
(
false
,
?H
)
::
?cpats
=>
iClear
H
;
clr
cpats
|
(
true
,
?H
)
::
?cpats
=>
iFrame
H
;
clr
cpats
end
in
clr
cpats
|
IClear
?H
::
?pats
=>
iClear
H
;
go
pats
|
IClearFrame
?H
::
?pats
=>
iFrame
H
;
go
pats
|
IAlwaysElim
?pat
::
?pats
=>
let
H
:
=
iFresh
in
iIntro
#
H
;
iDestructHyp
H
as
pat
;
go
pats
|
?pat
::
?pats
=>
...
...
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