-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize via streams.yaml
a Java program that has streams
#470
Comments
streams.yaml
streams.yaml
a Java program that has streams
Running on a program with streamsI found a Java program that has streams here. I ran the command.
I got phi-expressions.zip I copied the I ran
ErrorI got an error
Here's the problematic expression (dedented).
The problem seems to be the capital letter in Without
|
Next, I disabled checks in I ran
Problematic expression:
The same problem with capital letters (see #379 (comment)). |
I used another Java program. package org.eolang.streams;
import java.util.stream.Stream;
public class Main {
public static void main(String[] args) {
// Generate the first 10 Fibonacci numbers using streams
Stream.iterate(new long[]{0, 1}, fib -> new long[]{fib[1], fib[0] + fib[1]})
.limit(10) // Limit the stream to 10 Fibonacci numbers
.map(fib -> fib[0]); // Extract the first number in the pair
}
} I got phi-expressions.zip There was no |
@deemp Could you try the following code, please? public String map(){
return Stream.of("a", "b", "c")
.map(String::toUpperCase)
.collect(Collectors.joining(", "));
} It should give you something like:
|
@volodya-lombrozo, we need |
@deemp Oh, I got it. It seems, I understood, what you need. Please, correct me if I'm wrong:
|
Or even:
|
@deemp btw, now we have similar information in the first object attribute:
As you can see, we have |
We can use the |
@fizruk As for MethodDescriptor:
( ParameterDescriptor* ) ReturnDescriptor From the example above we have the following descriptors:
Let's get the descriptor for the
|
@fizruk As for φ-expression, we have a problem, because this descriptors are represented like a raw array of bytes:
Where
is
|
The discussion of the type info implementation in opeo has moved to objectionary/opeo-maven-plugin#389 |
@fizruk, I got a PHI program, but Commands:
(no output) PHI program
|
@fizruk, I believe the problem is that the rule expects
|
Latest generated Click to open the code
|
The rule is fixed in 013b068. |
@volodya-lombrozo, I converted the Java program with streams to PHI and got Then, I ran eoc --parser 0.39.2 unphi --unphi-input $PWD/no-normalization And got an error: Click to unfold
|
I used the Java program from here. I converted
I converted
I converted
I got @yegor256, there's no match on the pattern Click to expand
|
A solution:
|
Details
We need to verify that stream optimizations work.
Subtasks
streams.yaml
on the program.streams.yaml
on the program.opeo-maven-plugin
#517The text was updated successfully, but these errors were encountered: