soundasleep / iaml

Automatically exported from code.google.com/p/iaml
3 stars 1 forks source link

Prevent generation of Operations and Conditions that can never be used #169

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What new or enhanced feature are you proposing?
As a simple optimization step, operations that can never be called should
not be generated. For example, 'is set?' is often not called so its
generation can be safely ignored.

However, the decisions used to select operations that are never called
should be documented, for example, operations (and conditions) that do not
satisfy any of these condtions:
1. An incoming Action
2. An incoming Wire
3. An incoming OperationCallNode

Perhaps the suite of completed test models should be investigated as well.

What goal would this enhancement help you achieve?
Faster execution of test cases, and better generated code.

Original issue reported on code.google.com by soundasleep on 15 Apr 2010 at 2:53

GoogleCodeExporter commented 9 years ago
Started in r.

The semantics of what is defined as "not used" is defined in
GenerationExtensions.ext:
http://code.google.com/p/iaml/source/browse/trunk/org.openiaml.model.codegen.php
/src/template/GeneratorExtensions.ext?spec=svn1904&r=1904#609

LoginHandlerInstanceMultiple codegen test case went from 144 sec to 62 sec.

However, this current approach only looks at direct references; for example, if 
A
calls B but nothing calls A, then B is still generated.

Original comment by soundasleep on 16 Apr 2010 at 3:00

GoogleCodeExporter commented 9 years ago
Revision r1904.

Original comment by soundasleep on 16 Apr 2010 at 3:00