-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathnotes.txt
59 lines (35 loc) · 1.5 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
= Notes on ranking of spatches =
There have been discussion as to whether we would like to provide a language
(or other mechanism) for expressing the ranking we want to do on the returned
spatches.
There's a distinction we have so far not made: there's a difference between a
ranking property and a pruning property. A pruning property is used to
completely discard a result (and it can be optimizing if it closed/preserved
under extension). A ranking property is a property that allows one to decide
when a certain pattern is more desirable than another.
It would be nice to design a simple language for expressing pruning/ranking
properties.
Pros:
- The notion of what a "useful spatch" is becomes clearly evident to others
- One can come up with other notions of usefulness and rapidly try it out
- spdiff should be able to take use "optimizing pruning properties" to speed up
running time
-
Cons:
- If there really only is *one* good specification of "useful", we have created
additional complexity for no apparent good reason
-
= Example specifications =
"Any sp should have a context size > 1"
reject:
|sp| = 1
Uses: "length of list denoted "|sp|" and '=' and number
"There should be some sharing in a context"
???
"Any sp containing a completely abstract node-pattern is useless"
reject:
exists s in sp : csize s = 0
Uses: 'exists s in sp' + prop. csize and '=' and number
"It's pretty rare that one wants to require something to be a locally declared variable"
reject:
exists s in sp : is_decl s