] Matching patterns of two function
Thanks a lot.
But I want to test equality of two functions by comparing their call-graphs.
If you know, plz tell me?
How to construct call-graph of functions.
Racket Users list:
http://lists.racket-lang.org/users
Racket
Thanks a lot.
But I want to test equality of two functions by comparing their call-graphs.
If you know, plz tell me?
How to construct call-graph of functions.
Racket Users list:
http://lists.racket-lang.org/users
Do you mean pattern as in
-- substitution
-- unification
In this particular case, you could synthesize the pattern
> (define (FFF l)
> (cond[(empty? l)0]
>[else (+ (XXX l) (FFF (cdr l)))]))
and then claim that
-- sum = FFF with XXX = first
-- length = FFF with XXX = (K 1)
What you are asking for seems like alpha congruence, but less restrictive.
How much less restrictive? That depends on you definition of "the same
pattern". In length you have "(car l)" and in length you have "1". Do they
have the same structure? That, of course depends on the definition of car
(it
4 matches
Mail list logo