Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inox
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
inox
Commits
44a031bb
Commit
44a031bb
authored
9 years ago
by
Manos Koukoutos
Browse files
Options
Downloads
Plain Diff
Merge pull request #193 from larsrh/topic/dump
Merged, thanks
parents
3943ee91
0416bd8d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/isabelle/stateful_ops.ML
+20
-5
20 additions, 5 deletions
src/main/isabelle/stateful_ops.ML
with
20 additions
and
5 deletions
src/main/isabelle/stateful_ops.ML
+
20
−
5
View file @
44a031bb
...
@@ -33,12 +33,13 @@ fun err_timeout msg f x =
...
@@ -33,12 +33,13 @@ fun err_timeout msg f x =
|
Exn
.
Exn
exn
=>
reraise
exn
|
Exn
.
Exn
exn
=>
reraise
exn
datatype
report
=
datatype
report
=
Function
of
{
name
s
:
string
list
,
raws
:
string
list
,
specs
:
string
list
,
inducts
:
(
string
*
string
)
list
}
|
Function
of
{
head
s
:
(
string
*
string
)
list
,
raws
:
string
list
,
specs
:
string
list
,
inducts
:
(
string
*
string
)
list
}
|
Datatype
of
string
|
Datatype
of
string
|
Theory
of
{
import
:
string
,
scripts
:
(
string
*
string
)
list
}
|
Theory
of
{
import
:
string
,
scripts
:
(
string
*
string
)
list
}
|
Equivalence
of
string
|
Equivalence
of
string
|
Lemma
of
{
name
:
string
,
prop
:
string
}
|
Lemma
of
{
name
:
string
,
prop
:
string
}
|
Oracle
Oracle
|
End
structure
Reports
=
Theory_Data
structure
Reports
=
Theory_Data
(
(
...
@@ -363,6 +364,12 @@ fun functions raw_funs =
...
@@ -363,6 +364,12 @@ fun functions raw_funs =
Exn
.
Res
(
thms
,
lthy
)
=>
Exn
.
Res
(
thms
,
lthy
)
=>
let
let
val
names
=
map
#
1
raw_funs
val
names
=
map
#
1
raw_funs
val
get_typ
=
Thm
.
prop_of
#>
HOLogic
.
dest_Trueprop
#>
HOLogic
.
dest_eq
#>
fst
#>
strip_comb
#>
fst
#>
fastype_of
#>
print_typ
lthy
val
typs
=
map
get_typ
thms
val
lthy'
=
Local_Theory
.
restore
lthy
val
lthy'
=
Local_Theory
.
restore
lthy
val
thms
=
Proof_Context
.
export
lthy
lthy'
thms
val
thms
=
Proof_Context
.
export
lthy
lthy'
thms
val
simpss
=
thms
val
simpss
=
thms
...
@@ -375,7 +382,7 @@ fun functions raw_funs =
...
@@ -375,7 +382,7 @@ fun functions raw_funs =
val
binding
=
Binding
.
qualified
true
"spec"
(
Binding
.
make
(
hd
names
,
@
{
here
}))
val
binding
=
Binding
.
qualified
true
"spec"
(
Binding
.
make
(
hd
names
,
@
{
here
}))
val
report
=
val
report
=
Function
Function
{
name
s
=
names
,
{
head
s
=
names
~~
typs
,
inducts
=
map_filter
print_induct
specs
,
inducts
=
map_filter
print_induct
specs
,
specs
=
map
(
print_thm
lthy'
)
simps
,
specs
=
map
(
print_thm
lthy'
)
simps
,
raws
=
map
(
print_thm
lthy'
)
thms
}
raws
=
map
(
print_thm
lthy'
)
thms
}
...
@@ -547,11 +554,19 @@ fun dump () =
...
@@ -547,11 +554,19 @@ fun dump () =
|
print_report
(
Lemma
{
prop
,
...
})
=
([]
,
"lemma [simp]: "
^
quote
prop
^
"
\n
sorry"
)
|
print_report
(
Lemma
{
prop
,
...
})
=
([]
,
"lemma [simp]: "
^
quote
prop
^
"
\n
sorry"
)
|
print_report
(
Datatype
spec
)
=
([]
,
spec
)
|
print_report
(
Datatype
spec
)
=
([]
,
spec
)
|
print_report
Oracle
=
([]
,
""
)
|
print_report
Oracle
=
([]
,
""
)
|
print_report
(
Function
{
names
,
specs
,
...
})
=
|
print_report
End
=
([]
,
"
\n
end
\n
"
)
([]
,
"fun "
^
space_implode
" and "
names
^
" where
\n
"
^
space_implode
"|
\n
"
(
map
quote
specs
))
|
print_report
(
Function
{
heads
,
specs
,
...
})
=
let
fun
mk_head
(
name
,
typ
)
=
quote
name
^
" :: "
^
quote
typ
val
head
=
"fun "
^
space_implode
" and "
(
map
mk_head
heads
)
^
" where
\n
"
val
body
=
space_implode
"|
\n
"
(
map
quote
specs
)
in
([]
,
head
^
body
)
end
in
in
Proof_Context
.
theory_of
lthy
Proof_Context
.
theory_of
lthy
|>
Reports
.
get
|>
Reports
.
get
|>
cons
End
|>
rev
|>
rev
|>
map
print_report
|>
map
print_report
|>
split_list
|>
split_list
...
...
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