     (pointcutdefinition|concrete ?pointcutdefinition)
     (equals ?pointcut (.getPointcut ?pointcutdefinition))))
 
-
 (clojure.core/declare pointcutdefinition-name)
+
+(clojure.core/declare method-name)
+
+
+;only a heuristic ...
+(defn-
+  methodnamedaspointcut
+  [methodname pointcutname]
+  (let [mangled (str "ajc$pointcut$$" pointcutname)]
+    (.startsWith methodname mangled)))
+    
+
+(defn
+  pointcutdefinition-method|ajsynthetic
+  "Relation between pointcutdefinition and the AJ synthetic method it is compiled to."
+  [?pointcutdefinition ?method]
+  (fresh [?type ?pdname ?mname]
+         (type-pointcutdefinition ?type ?pointcutdefinition)
+         (pointcutdefinition-name ?pointcutdefinition ?pdname)
+         (type-method ?type ?method)
+         (member|synthetic ?method)
+         (method-name ?method ?mname)
+         (succeeds (methodnamedaspointcut ?mname ?pdname)))) 
+
+;note: no need to include in annotation/1, as already included in method-annotation/2
+(defn
+  pointcutdefinition-annotation
+  "Relation between a pointcut definition and one of its annotations."
+  [?pointcutdefinition ?annotation]
+  (fresh [?method]
+         (pointcutdefinition-method|ajsynthetic ?pointcutdefinition ?method)
+         (method-annotation ?method ?annotation)))
+
+
 
 (defn
   pointcutdefinition-concretizedby


(defn
  class-pointcutdefinition
  "Relation between an aspect and one of the pointcuts it declares."
  [?class ?pointcutdefinition]
  (fresh [?pointcutdefinitions] 
         (class-pointcutdefinitions ?class ?pointcutdefinitions)

  (all (intertype|method ?intertype)
       (equals ?name (.toString (.getSignature (.getMunger ?intertype))))))

(defn
  method-name
  "Relation between method and its name."
  [?method ?name]
  (all 
    (method ?method)
    (equals ?name (.getName ?method))))


