Boa language

Boa is a procedural domain-specific programming language, and infrastructure for analyzing data present in open source repositories such as SourceForge. Boa was created by Hridesh Rajan and his collaborators in 2012

at Iowa State University in Ames, Iowa. Boa is a descendent of the Sawzall programming language . Boa was first demonstrated at the SPLASH conference in Tucson, Arizona
Boa code
This complete Boa program will output the 10 most used programming languages. .
<syntaxhighlight lang="c">
counts: output top(10) of string weight int;
p: Project = input;
foreach (i: int; def(p.programming_languages))
counts << p.programming_languages weight 1;
</syntaxhighlight>
The first line of this program declares <code>counts</code> as an output that aggregates the top 10 strings. This aggregation facility is similar to the Sawzall language. The second line of this program says it iterates over all elements of type <code>Project</code> in the Boa source code repository. The third and fourth line of the program together send the string corresponding to each programming language used in the project <code>p</code> with <code>weight 1</code> to the output aggregator <code>counts</code>.
 
< Prev   Next >