Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Iris
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
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Abhishek Anand
Iris
Commits
6ca015ff
Commit
6ca015ff
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Simplify introduction pattern parser.
parent
16b514a8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/proofmode/intro_patterns.v
+7
-7
7 additions, 7 deletions
theories/proofmode/intro_patterns.v
theories/proofmode/tactics.v
+2
-7
2 additions, 7 deletions
theories/proofmode/tactics.v
with
9 additions
and
14 deletions
theories/proofmode/intro_patterns.v
+
7
−
7
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
.
...
...
This diff is collapsed.
Click to expand it.
theories/proofmode/tactics.v
+
2
−
7
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
=>
...
...
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