80 likes | 194 Views
Explore the innovative approach of Tendril Software Inc. in automating code generation using sequence graphs, a unique diagram-like structure. This document provides a comprehensive overview and implementation details of how sequence graphs facilitate object transportation and code generation. Discover the mechanisms behind the function calls and the generated code patterns that enhance software development efficiency while ensuring reliability and ease of use. Learn how Tendril's solution streamlines the process of coding within complex systems through sequence graph structures.
E N D
Ongoing Work • Structure Builder (Tendril Software Inc., www.tendril.com) • Code generation from sequence diagram-like structures, called sequence graphs • Sequence graphs: overview part / implementation part • Object-transportation automatic
Sequence Graph with generated code A get_c() B get_d() C f() D 1 2 3 get_c(): in b:B; out c:C get_d(): in c:C; out d:D f(): in d:D; out x:X code in A: this.b.get_c().get_d().f() bad
Sequence Graph with generated code A get_b() B get_c() C D get_d() 1 2 3 get_c(): in b:B; out c:C get_d(): in c:C; out d:D f(): in d:D; out x:X code in A: this.get_b().get_c().get_d().f() 4 f() X better
2 A get_c() B get_d() C f() D 1 4 3 get_e() C g() 5 get_c(): in b:B; out c:C get_d(): in c:C; out d:D get_e(): in c:C; out e:E f(): in d:D; out x:X g(): in e:E; out y:Y code in A: C c1 = b.get_c(); X x = c1.get_d().f(); Y y = c1.get_e().g(); E bad
1 2 A get_c() B get_d() C D f() get_q() 5 3 4 get_e() Q g() get_c(): in b:B; out c:C get_d(): in c:C; out d:D get_q(): in c:B; out q:Q f(): in d:D; out x:X g(): in e:E; out y:Y code in A: X x = get_b().get_c().get_d().f(); Y y = get_b().get_q().get_e().g(); 6 E Bad, not allowed
1 2 A get_c() B get_d() C D f() get_q() 5 3 B 4 get_e() Q g() get_c(): in b:B; out c:C get_d(): in c:C; out d:D get_q(): in c:B; out q:Q f(): in d:D; out x:X g(): in e:E; out y:Y code in A: X x = get_b().get_c().get_d().f(); Y y = get_b().get_q().get_e().g(); 6 E bad
2 A get_b() B get_c() C D get_d() 4 1 X 5 3 f() get_q() Q get_e() get_c(): in b:B; out c:C get_d(): in c:C; out d:D get_q(): in c:B; out q:Q f(): in d:D; out x:X g(): in e:E; out y:Y code in A: X x = get_b().get_c().get_d().f(); Y y = get_b().get_q().get_e().g(); 6 E 7 g() Y better Shift right one edge