before node: ASTRoot -> {
if (len(node.imports) <= 2) {
import_count << p.project_url weight astCount / 1000000;
}
}
if (len(p.programming_languages) == 1 && lowercase(p.programming_languages[0]) == "java") {
# TODO
}
If you are looking for projects containing Java, the code should be:
exists (i: int; lowercase(p.programming_languages[i]) == "java") {
# TODO
}
isJavaFile := function(file: ChangedFile) : bool {
return match(format(`\.%s$`, "java"), lowercase(file.name));
};
visit(p, visitor {
before node: ASTRoot -> {
exists (i: int; strfind("java.io", lowercase(node.imports[i])) != -1) {
# TODO
}
}
});
From: ssri...@oakland.edu
Date: March 25, 2019 at 11:28:13 AM EDT
To: Boa Language and Infrastructure User Forum <boa-...@googlegroups.com>
Subject: [Boa Users] Help needed with Boa ASTRoot imports attribute
Reply-To: boa-...@googlegroups.com
--
My goal:
1. To print the smallest GitHub project with 2 or fewer imports.2. I want to test if a certain library is being used by a projects. As in, Is "java.io" being used in any projects?
Attached code:1. job id : 769852. job id: 76970
Problems:1. My output project has more than 2 imports.2. When I use "exists", "for each" quantifiers to check if the project is java project. It is fetching me not just Java but also c++, c projects too.
How can I modify it to fetch only certain language projects?
Appreciate any help provided, I am in tight schedule for my Research work.
Thank you in advance,
-Srilakshmi Sripathi
More information about Boa: http://boa.cs.iastate.edu/
---
You received this message because you are subscribed to the Google Groups "Boa Language and Infrastructure User Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boa-user+u...@googlegroups.com.
To post to this group, send email to boa-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.