Skip to content

Conversation

@yiming-tang-cs
Copy link
Contributor

@yiming-tang-cs yiming-tang-cs commented Dec 19, 2017

#103 False positive regarding missing terminal operation when a stream is returned from a method

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just add a condition in here. It changes format, so the block is huge.

@yiming-tang-cs yiming-tang-cs changed the title performance improvement (slicing) for #103 Performance improvement (slicing) for #103 Dec 19, 2017
@khatchad
Copy link
Member

khatchad commented Dec 19, 2017 via email

@khatchad
Copy link
Member

@saledouble Can you please add a link to the issue in the description?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just if (cgNode....) do stuff

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that would enhance code readability.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right. I was muddle-headed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add an INFO log so that we can verify that only client nodes are being considered?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you want to pass to Logger? The processed cgNodes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please reference the bug ID here.

@khatchad
Copy link
Member

We need to verify that we are processing all of and only the client nodes, so you tell me :).

@yiming-tang-cs
Copy link
Contributor Author

Output example:

INFO: Processing Node: < Application, Lp/A, <init>()V > Context: CallStringContext: [ com.ibm.wala.FakeRootClass.fakeRootMethod()V@2 ] Dec 19, 2017 9:25:13 PM edu.cuny.hunter.streamrefactoring.core.analysis.StreamStateMachine start INFO: Processing Node: < Application, Lp/A, n()V > Context: CallStringContext: [ com.ibm.wala.FakeRootClass.fakeRootMethod()V@3 ] Dec 19, 2017 9:25:14 PM edu.cuny.hunter.streamrefactoring.core.analysis.StreamStateMachine start INFO: Adding state: [name: bottom, accepting: false] for instance: SITE_IN_NODE{< Primordial, Ljava/util/stream/StreamSupport, stream(Ljava/util/Spliterator;Z)Ljava/util/stream/Stream; >:NEW <Primordial,Ljava/util/stream/ReferencePipeline$Head>@5 in CallStringContext: [ java.util.Collection.stream()Ljava/util/stream/Stream;@7 p.A.m()Ljava/util/stream/Stream;@7 ]} for block: BB[SSA:5..5]3 - p.A.n()V for rule: ordering Dec 19, 2017 9:25:14 PM edu.cuny.hunter.streamrefactoring.core.analysis.StreamStateMachine start INFO: Processing Node: < Application, Lp/A, m()Ljava/util/stream/Stream; > Context: CallStringContext: [ p.A.n()V@1 com.ibm.wala.FakeRootClass.fakeRootMethod()V@3 ] Dec 19, 2017 9:25:14 PM edu.cuny.hunter.streamrefactoring.core.analysis.StreamStateMachine start INFO: Processing Node: < Application, Lp/A, <init>()V > Context: CallStringContext: [ com.ibm.wala.FakeRootClass.fakeRootMethod()V@2 ] Dec 19, 2017 9:25:14 PM edu.cuny.hunter.streamrefactoring.core.analysis.StreamStateMachine start INFO: Processing Node: < Application, Lp/A, n()V > Context: CallStringContext: [ com.ibm.wala.FakeRootClass.fakeRootMethod()V@3 ] Dec 19, 2017 9:25:14 PM edu.cuny.hunter.streamrefactoring.core.analysis.StreamStateMachine start INFO: Processing Node: < Application, Lp/A, m()Ljava/util/stream/Stream; > Context: CallStringContext: [ p.A.n()V@1 com.ibm.wala.FakeRootClass.fakeRootMethod()V@3 ] Dec 19, 2017 9:25:14 PM edu.cuny.hunter.streamrefactoring.core.analysis.StreamStateMachine start INFO: Processing Node: < Application, Lp/A, <init>()V > Context: CallStringContext: [ com.ibm.wala.FakeRootClass.fakeRootMethod()V@2 ] Dec 19, 2017 9:25:14 PM edu.cuny.hunter.streamrefactoring.core.analysis.StreamStateMachine start INFO: Processing Node: < Application, Lp/A, n()V > Context: CallStringContext: [ com.ibm.wala.FakeRootClass.fakeRootMethod()V@3 ] Dec 19, 2017 9:25:14 PM edu.cuny.hunter.streamrefactoring.core.analysis.StreamStateMachine start INFO: Adding state: [name: bottom, accepting: false] for instance: SITE_IN_NODE{< Primordial, Ljava/util/stream/DistinctOps, makeRef(Ljava/util/stream/AbstractPipeline;)Ljava/util/stream/ReferencePipeline; >:NEW <Primordial,Ljava/util/stream/DistinctOps$1>@0 in CallStringContext: [ java.util.stream.ReferencePipeline.distinct()Ljava/util/stream/Stream;@1 p.A.n()V@6 ]} for block: BB[SSA:5..5]3 - p.A.n()V for rule: ordering Dec 19, 2017 9:25:14 PM edu.cuny.hunter.streamrefactoring.core.analysis.StreamStateMachine start INFO: Processing Node: < Application, Lp/A, m()Ljava/util/stream/Stream; > Context: CallStringContext: [ p.A.n()V@1 com.ibm.wala.FakeRootClass.fakeRootMethod()V@3 ] Dec 19, 2017 9:25:14 PM edu.cuny.hunter.streamrefactoring.core.analysis.StreamStateMachine start INFO: Processing Node: < Application, Lp/A, <init>()V > Context: CallStringContext: [ com.ibm.wala.FakeRootClass.fakeRootMethod()V@2 ] Dec 19, 2017 9:25:14 PM edu.cuny.hunter.streamrefactoring.core.analysis.StreamStateMachine start INFO: Processing Node: < Application, Lp/A, n()V > Context: CallStringContext: [ com.ibm.wala.FakeRootClass.fakeRootMethod()V@3 ] Dec 19, 2017 9:25:14 PM edu.cuny.hunter.streamrefactoring.core.analysis.StreamStateMachine start INFO: Processing Node: < Application, Lp/A, m()Ljava/util/stream/Stream; > Context: CallStringContext: [ p.A.n()V@1 com.ibm.wala.FakeRootClass.fakeRootMethod()V@3 ] Dec 19, 2017 9:25:15 PM edu.cuny.hunter.streamrefactoring.core.analysis.StreamStateMachine discoverPossibleSideEffects WARNING: Can't find IR for target: < Primordial, Ljava/util/stream/Stream, count()J > Dec 19, 2017 9:25:15 PM edu.cuny.hunter.streamrefactoring.core.analysis.StreamStateMachine discoverPossibleSideEffects WARNING: Can't find IR for target: < Primordial, Ljava/util/stream/Stream, distinct()Ljava/util/stream/Stream; > Dec 19, 2017 9:25:15 PM edu.cuny.hunter.streamrefactoring.core.analysis.StreamStateMachine discoverIfReduceOrderingPossiblyMatters INFO: Reduce ordering doesn't matter for: 8 = invokeinterface < Application, Ljava/util/stream/Stream, count()J > 6 @11 exception:7 Dec 19, 2017 9:25:15 PM edu.cuny.hunter.streamrefactoring.core.analysis.Util lambda$7 WARNING: Instruction: 3 = new <Application,Ljava/util/HashSet>@0 has no definitions. Dec 19, 2017 9:25:15 PM edu.cuny.hunter.streamrefactoring.core.analysis.Util lambda$7 WARNING: Instruction: invokespecial < Application, Ljava/util/HashSet, <init>()V > 3 @4 exception:4 has no definitions. Dec 19, 2017 9:25:15 PM edu.cuny.hunter.streamrefactoring.core.analysis.Util lambda$7 WARNING: Instruction: 3 = new <Application,Ljava/util/HashSet>@0 has no definitions. Dec 19, 2017 9:25:15 PM edu.cuny.hunter.streamrefactoring.core.analysis.Util lambda$7 WARNING: Instruction: invokespecial < Application, Ljava/util/HashSet, <init>()V > 3 @4 exception:4 has no definitions. Dec 19, 2017 9:25:15 PM edu.cuny.hunter.streamrefactoring.core.analysis.Stream check INFO: Execution modes: [SEQUENTIAL, PARALLEL] Dec 19, 2017 9:25:15 PM edu.cuny.hunter.streamrefactoring.core.analysis.Stream check INFO: Orderings: [UNORDERED] Dec 19, 2017 9:25:15 PM edu.cuny.hunter.streamrefactoring.core.analysis.Stream check INFO: Side-effects: false Dec 19, 2017 9:25:15 PM edu.cuny.hunter.streamrefactoring.core.analysis.Stream check INFO: Stateful intermediate operations: true Dec 19, 2017 9:25:15 PM edu.cuny.hunter.streamrefactoring.core.analysis.Stream check INFO: Reduce ordering matters: false 
@khatchad khatchad merged commit f8ec064 into ponder-lab:master Dec 20, 2017
@khatchad khatchad deleted the issue_103_slicing branch December 20, 2017 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants