Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
alphaLib
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Packages
Packages
Container Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
POTTIER Francois
alphaLib
Commits
f2cb826d
Commit
f2cb826d
authored
Feb 02, 2017
by
POTTIER Francois
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge [Bn] into [Abstraction].
parent
18bf0f3c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
47 deletions
+27
-47
demos/basic/Term.ml
demos/basic/Term.ml
+5
-5
demos/system-F-type/F.cppo.ml
demos/system-F-type/F.cppo.ml
+5
-5
src/Abstraction.ml
src/Abstraction.ml
+17
-0
src/Bn.ml
src/Bn.ml
+0
-36
src/alphaLib.mlpack
src/alphaLib.mlpack
+0
-1
No files found.
demos/basic/Term.ml
View file @
f2cb826d
...
...
@@ -9,18 +9,18 @@ type ('fn, 'bn) term =
[
@@
deriving
visitors
{
variety
=
"iter"
;
public
=
[
"visit_term"
];
ancestors
=
[
"
Bn.iter"
;
"
Abstraction.iter"
]
}
ancestors
=
[
"Abstraction.iter"
]
}
,
visitors
{
variety
=
"map"
;
public
=
[
"visit_term"
];
ancestors
=
[
"
Bn.map"
;
"
Abstraction.map"
]
}
ancestors
=
[
"Abstraction.map"
]
}
,
visitors
{
variety
=
"endo"
;
public
=
[
"visit_term"
];
ancestors
=
[
"
Bn.endo"
;
"
Abstraction.endo"
]
}
ancestors
=
[
"Abstraction.endo"
]
}
,
visitors
{
variety
=
"reduce"
;
public
=
[
"visit_term"
];
ancestors
=
[
"
Bn.reduce"
;
"
Abstraction.reduce"
]
}
ancestors
=
[
"Abstraction.reduce"
]
}
,
visitors
{
variety
=
"iter2"
;
public
=
[
"visit_term"
];
ancestors
=
[
"
Bn.iter2"
;
"
Abstraction.iter2"
]
}
ancestors
=
[
"Abstraction.iter2"
]
}
]
demos/system-F-type/F.cppo.ml
View file @
f2cb826d
...
...
@@ -39,19 +39,19 @@ and ('fn, 'bn) term =
[
@@
deriving
visitors
{
variety
=
"iter"
;
public
=
[
"visit_term"
;
"visit_typ"
];
ancestors
=
[
"
Bn.iter"
;
"
Abstraction.iter"
]
}
ancestors
=
[
"Abstraction.iter"
]
}
,
visitors
{
variety
=
"map"
;
public
=
[
"visit_term"
;
"visit_typ"
];
ancestors
=
[
"
Bn.map"
;
"
Abstraction.map"
]
}
ancestors
=
[
"Abstraction.map"
]
}
,
visitors
{
variety
=
"endo"
;
public
=
[
"visit_term"
;
"visit_typ"
];
ancestors
=
[
"
Bn.endo"
;
"
Abstraction.endo"
]
}
ancestors
=
[
"Abstraction.endo"
]
}
,
visitors
{
variety
=
"reduce"
;
public
=
[
"visit_term"
;
"visit_typ"
];
ancestors
=
[
"
Bn.reduce"
;
"
Abstraction.reduce"
]
}
ancestors
=
[
"Abstraction.reduce"
]
}
,
visitors
{
variety
=
"iter2"
;
public
=
[
"visit_term"
;
"visit_typ"
];
ancestors
=
[
"
Bn.iter2"
;
"
Abstraction.iter2"
]
}
ancestors
=
[
"Abstraction.iter2"
]
}
]
...
...
src/Abstraction.ml
View file @
f2cb826d
type
void
(* -------------------------------------------------------------------------- *)
(* A universal, concrete type of single-name abstractions. *)
...
...
@@ -38,6 +40,9 @@ type ('bn, 'term) abstraction =
class
virtual
[
'
self
]
map
=
object
(
self
:
'
self
)
method
private
visit_'bn
:
void
->
void
->
void
=
fun
_
_
->
assert
false
method
private
virtual
extend
:
'
bn1
->
'
env
->
'
bn2
*
'
env
method
private
visit_abstraction
:
'
term1
'
term2
.
...
...
@@ -52,6 +57,9 @@ end
class
virtual
[
'
self
]
endo
=
object
(
self
:
'
self
)
method
private
visit_'bn
:
void
->
void
->
void
=
fun
_
_
->
assert
false
method
private
virtual
extend
:
'
bn
->
'
env
->
'
bn
*
'
env
method
private
visit_abstraction
:
'
term
.
...
...
@@ -70,6 +78,9 @@ end
class
virtual
[
'
self
]
reduce
=
object
(
self
:
'
self
)
method
private
visit_'bn
:
void
->
void
->
void
=
fun
_
_
->
assert
false
method
private
virtual
extend
:
'
bn
->
'
env
->
'
env
method
private
virtual
restrict
:
'
bn
->
'
z
->
'
z
...
...
@@ -94,6 +105,9 @@ end
class
virtual
[
'
self
]
map2
=
object
(
self
:
'
self
)
method
private
visit_'bn
:
void
->
void
->
void
->
void
=
fun
_
_
_
->
assert
false
method
private
virtual
extend
:
'
bn1
->
'
bn2
->
'
env
->
'
bn3
*
'
env
method
private
visit_abstraction
:
'
term1
'
term2
'
term3
.
...
...
@@ -108,6 +122,9 @@ end
class
virtual
[
'
self
]
reduce2
=
object
(
self
:
'
self
)
method
private
visit_'bn
:
void
->
void
->
void
->
void
=
fun
_
_
_
->
assert
false
method
private
virtual
extend
:
'
bn1
->
'
bn2
->
'
env
->
'
env
method
private
virtual
restrict
:
'
bn1
->
'
bn2
->
'
z
->
'
z
...
...
src/Bn.ml
deleted
100644 → 0
View file @
18bf0f3c
type
void
class
[
'
self
]
iter
=
object
method
private
visit_'bn
:
void
->
void
->
void
=
fun
_
_
->
assert
false
end
class
[
'
self
]
map
=
object
method
private
visit_'bn
:
void
->
void
->
void
=
fun
_
_
->
assert
false
end
class
[
'
self
]
endo
=
object
method
private
visit_'bn
:
void
->
void
->
void
=
fun
_
_
->
assert
false
end
class
[
'
self
]
reduce
=
object
method
private
visit_'bn
:
void
->
void
->
void
=
fun
_
_
->
assert
false
end
class
[
'
self
]
iter2
=
object
method
private
visit_'bn
:
void
->
void
->
void
->
void
=
fun
_
_
_
->
assert
false
end
class
[
'
self
]
map2
=
object
method
private
visit_'bn
:
void
->
void
->
void
->
void
=
fun
_
_
_
->
assert
false
end
class
[
'
self
]
reduce2
=
object
method
private
visit_'bn
:
void
->
void
->
void
->
void
=
fun
_
_
_
->
assert
false
end
src/alphaLib.mlpack
View file @
f2cb826d
Atom
Abstraction
Bn
KitBa
KitCopy
KitAvoid
...
...
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