Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Why3
why3
Commits
7cbe147e
Commit
7cbe147e
authored
May 31, 2011
by
Andrei Paskevich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename t_subst_term into t_replace and t_occurs_term into t_occurs
parent
ed26051a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
17 deletions
+17
-17
src/core/term.ml
src/core/term.ml
+12
-12
src/core/term.mli
src/core/term.mli
+4
-4
src/transform/simplify_formula.ml
src/transform/simplify_formula.ml
+1
-1
No files found.
src/core/term.ml
View file @
7cbe147e
...
...
@@ -1232,27 +1232,27 @@ let rec t_match s t1 t2 =
(* occurrence check *)
let
rec
t_occurs
_term
r
t
=
t_equal
r
t
||
t_any
(
t_occurs
_term
r
)
t
let
rec
t_occurs
r
t
=
t_equal
r
t
||
t_any
(
t_occurs
r
)
t
let
rec
t_occurs_
term_
alpha
r
t
=
t_equal_alpha
r
t
||
t_any
(
t_occurs_
term_
alpha
r
)
t
let
rec
t_occurs_alpha
r
t
=
t_equal_alpha
r
t
||
t_any
(
t_occurs_alpha
r
)
t
(* substitutes term [t2] for term [t1] in term [t] *)
let
rec
t_
subst_term
t1
t2
t
=
if
t_equal
t
t1
then
t2
else
t_map
(
t_
subst_term
t1
t2
)
t
let
rec
t_
replace
t1
t2
t
=
if
t_equal
t
t1
then
t2
else
t_map
(
t_
replace
t1
t2
)
t
let
t_
subst_term
t1
t2
t
=
let
t_
replace
t1
t2
t
=
t_ty_check
t2
t1
.
t_ty
;
t_
subst_term
t1
t2
t
t_
replace
t1
t2
t
let
rec
t_
subst_term
_alpha
t1
t2
t
=
if
t_equal_alpha
t
t1
then
t2
else
t_map
(
t_
subst_term
_alpha
t1
t2
)
t
let
rec
t_
replace
_alpha
t1
t2
t
=
if
t_equal_alpha
t
t1
then
t2
else
t_map
(
t_
replace
_alpha
t1
t2
)
t
let
t_
subst_term
_alpha
t1
t2
t
=
let
t_
replace
_alpha
t1
t2
t
=
t_ty_check
t2
t1
.
t_ty
;
t_
subst_term
_alpha
t1
t2
t
t_
replace
_alpha
t1
t2
t
(* constructors with propositional simplification *)
...
...
src/core/term.mli
View file @
7cbe147e
...
...
@@ -401,11 +401,11 @@ module Hterm_alpha : Hashtbl.S with type key = term
(** Subterm occurrence check and replacement *)
val
t_occurs
_term
:
term
->
term
->
bool
val
t_occurs_
term_
alpha
:
term
->
term
->
bool
val
t_occurs
:
term
->
term
->
bool
val
t_occurs_alpha
:
term
->
term
->
bool
val
t_
subst_term
:
term
->
term
->
term
->
term
val
t_
subst_term
_alpha
:
term
->
term
->
term
->
term
val
t_
replace
:
term
->
term
->
term
->
term
val
t_
replace
_alpha
:
term
->
term
->
term
->
term
(** Binder-free term matching *)
...
...
src/transform/simplify_formula.ml
View file @
7cbe147e
...
...
@@ -201,7 +201,7 @@ let rec fmla_cond_subst filter f =
for
j
=
0
to
subl
-
1
do
if
j
<>
i
then
let
(
f
,
s
)
=
subf
.
(
j
)
in
subf
.
(
j
)
<-
(
t_
subst_term
t1
t2
f
,
s
);
subf
.
(
j
)
<-
(
t_
replace
t1
t2
f
,
s
);
done
in
let
(
f
,
s
)
=
subf
.
(
i
)
in
match
f
.
t_node
with
...
...
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