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
fef6c3fa
Commit
fef6c3fa
authored
9 years ago
by
Lars Hupel
Browse files
Options
Downloads
Patches
Plain Diff
remove unused ML file
parent
08004aa3
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/term_codec.ML
+0
-75
0 additions, 75 deletions
src/main/isabelle/term_codec.ML
with
0 additions
and
75 deletions
src/main/isabelle/term_codec.ML
deleted
100644 → 0
+
0
−
75
View file @
08004aa3
datatype
(
'
a
,
'
b
)
either
=
Left
of
'
a
|
Right
of
'
b
structure
Codec
=
struct
open
Codec
fun
triple
a
b
c
=
tuple
a
(
tuple
b
c
)
|>
transform
(
fn
(
a
,
(
b
,
c
))
=>
(
a
,
b
,
c
))
(
fn
(
a
,
b
,
c
)
=>
(
a
,
(
b
,
c
)))
fun
either
a
b
=
let
fun
enc
(
Left
l
)
=
(
0
,
encode
a
l
)
|
enc
(
Right
r
)
=
(
1
,
encode
b
r
)
fun
dec
0
=
SOME
(
decode
a
#>
map_result
Left
)
|
dec
1
=
SOME
(
decode
b
#>
map_result
Right
)
|
dec
_
=
NONE
in
Codec
.
variant
enc
dec
"either"
end
end
signature
TERM_CODEC
=
sig
val
typ
:
typ
codec
val
term
:
term
codec
end
structure
Term_Codec
:
TERM_CODEC
=
struct
val
sort
:
sort
codec
=
Codec
.
list
Codec
.
string
val
indexname
:
indexname
codec
=
Codec
.
tuple
Codec
.
string
Codec
.
int
fun
typ
()
=
let
fun
typ_type
()
=
Codec
.
tuple
Codec
.
string
(
Codec
.
list
(
typ
()
))
val
typ_tfree
=
Codec
.
tuple
Codec
.
string
sort
val
typ_tvar
=
Codec
.
tuple
indexname
sort
fun
enc
(
Type
arg
)
=
(
0
,
Codec
.
encode
(
typ_type
()
)
arg
)
|
enc
(
TFree
arg
)
=
(
1
,
Codec
.
encode
typ_tfree
arg
)
|
enc
(
TVar
arg
)
=
(
2
,
Codec
.
encode
typ_tvar
arg
)
fun
dec
0
=
SOME
(
Codec
.
decode
(
typ_type
()
)
#>
Codec
.
map_result
Type
)
|
dec
1
=
SOME
(
Codec
.
decode
typ_tfree
#>
Codec
.
map_result
TFree
)
|
dec
2
=
SOME
(
Codec
.
decode
typ_tvar
#>
Codec
.
map_result
TVar
)
|
dec
_
=
NONE
in
Codec
.
variant
enc
dec
"Pure.typ"
end
val
typ
=
typ
()
fun
term
()
=
let
val
term_const
=
Codec
.
tuple
Codec
.
string
typ
val
term_free
=
Codec
.
tuple
Codec
.
string
typ
val
term_var
=
Codec
.
tuple
indexname
typ
val
term_bound
=
Codec
.
int
fun
term_abs
()
=
Codec
.
triple
Codec
.
string
typ
(
term
()
)
fun
term_app
()
=
Codec
.
tuple
(
term
()
)
(
term
()
)
fun
enc
(
Const
arg
)
=
(
0
,
Codec
.
encode
term_const
arg
)
|
enc
(
Free
arg
)
=
(
1
,
Codec
.
encode
term_free
arg
)
|
enc
(
Var
arg
)
=
(
2
,
Codec
.
encode
term_var
arg
)
|
enc
(
Bound
arg
)
=
(
3
,
Codec
.
encode
term_bound
arg
)
|
enc
(
Abs
arg
)
=
(
4
,
Codec
.
encode
(
term_abs
()
)
arg
)
|
enc
(
op
$
arg
)
=
(
5
,
Codec
.
encode
(
term_app
()
)
arg
)
fun
dec
0
=
SOME
(
Codec
.
decode
term_const
#>
Codec
.
map_result
Const
)
|
dec
1
=
SOME
(
Codec
.
decode
term_free
#>
Codec
.
map_result
Free
)
|
dec
2
=
SOME
(
Codec
.
decode
term_var
#>
Codec
.
map_result
Var
)
|
dec
3
=
SOME
(
Codec
.
decode
term_bound
#>
Codec
.
map_result
Bound
)
|
dec
4
=
SOME
(
Codec
.
decode
(
term_abs
()
)
#>
Codec
.
map_result
Abs
)
|
dec
5
=
SOME
(
Codec
.
decode
(
term_app
()
)
#>
Codec
.
map_result
op
$
)
|
dec
_
=
NONE
in
Codec
.
variant
enc
dec
"Pure.term"
end
val
term
=
term
()
end
\ No newline at end of file
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