Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
alphaLib
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
POTTIER Francois
alphaLib
Commits
a5b3a04d
Commit
a5b3a04d
authored
Feb 01, 2017
by
POTTIER Francois
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Macros for [fa].
parent
d920b8a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
12 deletions
+20
-12
src/AlphaLibMacros.cppo.ml
src/AlphaLibMacros.cppo.ml
+17
-0
src/Toolbox.cppo.ml
src/Toolbox.cppo.ml
+3
-12
No files found.
src/AlphaLibMacros.cppo.ml
View file @
a5b3a04d
...
...
@@ -5,6 +5,23 @@
(* -------------------------------------------------------------------------- *)
(* [fa_term] computes the set of the free atoms of a term. *)
#
define
FA_CLASS
__fa
#
define
FA_FUN
(
term
)
CONCAT
(
fa_
,
term
)
#
define
__FA
\
class
FA_CLASS
=
object
\
inherit
[
_
]
reduce
\
inherit
[
_
]
KitFa
.
reduce
\
end
\
#
define
FA
(
term
)
\
let
FA_FUN
(
term
)
t
=
\
new
FA_CLASS
#
VISIT
(
term
)
()
t
\
(* -------------------------------------------------------------------------- *)
(* [filter_term p t] returns a free atom of the term [t] that satisfies the
predicate [p], if such an atom exists. *)
...
...
src/Toolbox.cppo.ml
View file @
a5b3a04d
...
...
@@ -84,6 +84,9 @@ type nominal_term =
#
include
"AlphaLibMacros.cppo.ml"
__FA
FA
(
term
)
__FILTER
FILTER
(
term
)
...
...
@@ -113,16 +116,4 @@ SUBST(term, term)
(* -------------------------------------------------------------------------- *)
(* [fa] computes the free atoms of a term. *)
class
fa
=
object
inherit
[
_
]
reduce
inherit
[
_
]
KitFa
.
reduce
end
let
fa
:
nominal_term
->
Atom
.
Set
.
t
=
new
fa
#
visit_term
()
(* -------------------------------------------------------------------------- *)
end
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