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
18bf0f3c
Commit
18bf0f3c
authored
Feb 02, 2017
by
POTTIER Francois
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement [avoid].
parent
22f30ea5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
2 deletions
+33
-2
TODO
TODO
+2
-2
demos/system-F-type/F.cppo.ml
demos/system-F-type/F.cppo.ml
+7
-0
src/AlphaLibMacros.cppo.ml
src/AlphaLibMacros.cppo.ml
+19
-0
src/Toolbox.cppo.ml
src/Toolbox.cppo.ml
+3
-0
src/Toolbox.mli
src/Toolbox.mli
+1
-0
src/alphaLib.mlpack
src/alphaLib.mlpack
+1
-0
No files found.
TODO
View file @
18bf0f3c
...
...
@@ -7,8 +7,8 @@ Relax ba so as to not require well-formedness?
Global uniqueness, or uniqueness along a branch?
Which wf criterion do we want? both?
Implement a
void, which renames the bound names of a term so as to
avoid a certain set of names.
Implement a
subst that does not copy the grafted term?
Or parameterize subst over the copy operation that needs to be performed when grafting?
Implement fused copy/subst, fused avoid/subst?
Implement a kit that composes two kits, so as to easily implement fused operations.
...
...
demos/system-F-type/F.cppo.ml
View file @
18bf0f3c
...
...
@@ -69,6 +69,9 @@ type nominal_term =
(* Operations based on visitors. *)
(* We create more operations than we actually need in this demo.
This is just a way of testing that everything works. *)
#
include
"AlphaLibMacros.cppo.ml"
__FA
...
...
@@ -87,6 +90,10 @@ __COPY
COPY
(
typ
)
COPY
(
term
)
__AVOID
AVOID
(
typ
)
AVOID
(
term
)
__SHOW
SHOW
(
typ
)
SHOW
(
term
)
...
...
src/AlphaLibMacros.cppo.ml
View file @
18bf0f3c
...
...
@@ -119,6 +119,25 @@
(* -------------------------------------------------------------------------- *)
(* [avoid_term bad] returns a copy of its argument where some bound names have
been replaced with a fresh copy, so as to ensure that no bound name is in
the set [bad]. *)
#
define
AVOID_CLASS
__avoid
#
define
AVOID_FUN
(
term
)
CONCAT
(
avoid_
,
term
)
#
define
__AVOID
\
class
[
'
self
]
AVOID_CLASS
bad
=
object
(
_
:
'
self
)
\
inherit
[
_
]
map
\
inherit
[
_
]
KitAvoid
.
map
bad
\
end
\
#
define
AVOID
(
term
)
\
let
AVOID_FUN
(
term
)
bad
t
=
\
(
new
AVOID_CLASS
bad
)
#
VISIT
(
term
)
KitAvoid
.
empty
t
\
(* -------------------------------------------------------------------------- *)
(* [show_term] converts its argument to a raw term, in a NONHYGIENIC manner,
using [Atom.show] both at free name occurrences and bound name occurrences.
It is a debugging tool. *)
...
...
src/Toolbox.cppo.ml
View file @
18bf0f3c
...
...
@@ -44,6 +44,9 @@ module Make (Term : ToolboxInput.INPUT) = struct
__COPY
COPY
(
term
)
__AVOID
AVOID
(
term
)
__SHOW
SHOW
(
term
)
...
...
src/Toolbox.mli
View file @
18bf0f3c
...
...
@@ -32,6 +32,7 @@ module Make (Term : ToolboxInput.INPUT) : sig
val
wf_terms
:
nominal_term
list
->
bool
val
copy_term
:
nominal_term
->
nominal_term
val
avoid_term
:
Atom
.
Set
.
t
->
nominal_term
->
nominal_term
val
show_term
:
nominal_term
->
raw_term
...
...
src/alphaLib.mlpack
View file @
18bf0f3c
...
...
@@ -3,6 +3,7 @@ Abstraction
Bn
KitBa
KitCopy
KitAvoid
KitEquiv
KitExport
KitFa
...
...
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