Source code

JavaDoc

License

Tests

Test Coverage

Bachelor’s thesis

Imagine you are tasked with analyzing how many of your customers have the same surname. You are provided with the following list, which has to be processed first to extract the surname.

Input Intended output

Peter Smith; 22; Switzerland - Basel

Smith

Bob Marley; 18; France - Lyon

…​

Anna White; 37; USA - Seattle

…​

…​

…​

Your intent is to extract the surname. One possible way to specify your intent is to write a short program. If you do not know how to program you are out of luck.

A more natural and accessible way to specify your intent is by providing the computer with an input output example from which a program in synthesised that satisfies your intent — hello jPBE

How to solve example problem with jPBE
class MyApp {
    // TODO show minimal usage of jPBE
    List<String> input = List.of(
        "Peter Smith; 22; Switzerland - Basel",
        "Bob Marley; 18; France - Lyon",
        "Anna White; 37; USA - Seattle"
    );
    Synthesizer jpbe = Synthesizer.createDefault();
    Graph graph = jpbe.computeGraph(input.get(0), "Smith");
    TraceExpression program = graph.findTracePath();
    List<String> outputStrings = input.stream()
                                        .map(input -> program.apply(input))
                                        .collect(Collectors.toSet());
}

Abstract

Millions of people need to analyze raw data of varying quality to support their job function. In a lot of cases the present data needs to be refined and processed from its raw form to a more structured format in order to analyze and visualize it. This process is time-intensive and error-prone. Usually tools like Microsoft Excel or OpenRefine are used to improve that process. However, any nontrivial data wrangling task remains inaccessible to non-programmers. Furthermore, existing tools only cover the most common use cases, i.e. they are business agnostic.

Programming by example (PBE), a subfield of program synthesis, allows for a natural and intuitive user interaction mechanism. Users can specify their intent by providing input output examples for string transformations. jPBE will then dynamically synthesis a program satisfying the user intent. By providing additional input out examples the user can further clarify their intent or even generate conditional programs.

jPBE is an open source Java library. The functionality of the library can be configured and extended — more to that in the following chapters.

Configure jPBE

TODO

Extend jPBE with custom operations

TODO

Sample Diagram

diagram classes