1 / 13

Jesse’s proposal

Jesse’s proposal. Karl Lieberherr. Crosscut language Jesse. D ::= a set of paths [ A , B ] | paths from A to B bypassing {C, …} D . D | concatenation of paths D | D | union of paths ! D complement of paths. base language.

yon
Download Presentation

Jesse’s proposal

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Jesse’s proposal Karl Lieberherr Jesse proposal

  2. Crosscut language Jesse D ::= a set of paths [A,B] | paths from A to B bypassing {C, …} D . D | concatenation of paths D | D | union of paths !Dcomplement of paths base language Jesse actually had: exclude(D1, D2): PathSet(D1) – PathSet(D2) (set difference). But we can simulate negation: !D = exclude(all paths, D) Jesse proposal

  3. Crosscut language Jesse D ::= a set of paths [A,B] | paths from A to B bypassing {C, …} D . D | concatenation of paths D | D | union of paths !Dcomplement of paths base language Two forms of negation: EASY and HARD negation Jesse proposal

  4. Are algorithmic results of any use to AOSD tool builders/users? • YES! • Positive results: Fast algorithms lead to faster tools. • Negative results: Indicate that we need to use different kinds of algorithms or different semantics. Jesse proposal

  5. class Main { // Java Program with DJ X1 x1; Nx1 nx1; public static void main(String[] s) { ClassGraph cg = new ClassGraph(); Main m = new Main(); String strategy = "intersect(" + // union is expressed by concatenation of edges "{Main -> X1 X1 -> Target " + "Main ->Nx2 Nx2 -> Target " + "Main -> X3 X3 -> Target}," + "{Main -> Nx1 Nx1 -> Target " + "Main -> X2 X2 -> Target}," + "{Main -> X1 X1 -> Target}," + "{Main -> Nx3 Nx3 -> Target})”; cg.traverse(m, // m is the complete tree with 8 leaves strategy, new Visitor(){ public void start (){System.out.println(" start traversal");} public void finish (){System.out.println(" finish traversal");} void before (Target host){System.out.print(host + ' ');} void before (Nx3 host) {System.out.print(host + ' ');} void before (X2 host) {System.out.print(host + ' ');} void before (X1 host) {System.out.print(host + ' ');} });} } class X1 { X2 x2; Nx2 nx2; } class Nx1 { X2 x2; Nx2 nx2; } class X2 { X3 x3; Nx3 nx3; } class Nx2 { X3 x3; Nx3 nx3; } class X3 { Target t; } class Nx3 { Target t; } class Target {} Meta graph= Class graph Main Nx1 X1 X2 Nx2 X3 Nx3 Main X1 X2 X3 Target Nx3 Target … Target Instance tree Object tree Selected by strategy Jesse proposal

  6. Crosscut language SD D ::= a set of paths [A,B] | paths from A to B D . D | concatenation of paths D | D | union of paths D & D | intersection of paths !Dcomplement of paths base language Jesse proposal

  7. Computational Properties • Select-Sat: Given a strategy p and a class graph G, is there an instance tree for G for which p selects a non-empty set of nodes. • X/Y/Z • X is a problem, e.g., Select-Sat • Z is a language, e.g. SAJ or SD • Y is one of -,&,! representing a version of Z. • X/-/Z base language of Z. • X/&/Z is base language of Z plus intersection. • X/!/Z is base language of Z plus negation. Jesse proposal

  8. Select-First Select-First: Does an edge in an instance graph lead to a node selected by the strategy? Select-First is useful for guiding traversals Jesse proposal

  9. More precise Definition 8 (Select-First). Given a selector p and class graph G, compute the set of outgoing edges from a node of an instance I satisfying G that might lead to a target node selected by p. Jesse proposal

  10. both problems: Select-First and Select-Sat Results (Problem) Jesse proposal

  11. Remember Mitch Semantics • Take an edge if there is a possibility of success. • But deciding whether there is a possibility of success is now NP-complete. • What should we do? Jesse proposal

  12. Matthias semantics to the rescue The meaning of a strategy is a function that maps object graphs (og) to object graph slices (ogs): M(s,G) : (og:OG(G) -> ogs:OG(G)) There are different ways of defining this function. The standard, presented in the paper with Mitch has the property: M[Mitch](s,G) satisfies: there exists s,G and ogs: (not (Leaves(ogs) subset Instances(Targets(s)))) M[Matthias](s,G) satisfies: for all s,G and ogs: Leaves(ogs) subset Instances(Targets(s)) M[Mitch] has the advantage that during one traversal we compute the object graph slice and execute the visitor. M[Matthias] can be computed with two traversals: the first one computes the slice (using the class graph a la M[Mitch] implementations, if feasible) and the second executes the visitor. Jesse proposal

  13. Have we solved an NP-complete problem in polynomial time? • No! • Why? Jesse proposal

More Related