Web service - Superconductor/superconductor GitHub Wiki

Online Compiler Web Service

We are (for now) hosting an instance of the compiler. Send a JSON post request to http://ec2-54-218-69-113.us-west-2.compute.amazonaws.com/compile/ . Specify the source code in field 'ftl' and the desired output language in field 'target'. (Targets: 'js', 'webcl', 'pjs', 'cl', 'c++')

Example

JS Fiddle

 var src = "interface I {} class C : I { children {} attributes { var x : int; } actions { x := 1; }}";
 var myRequest = new Request({
        url: 'http://ec2-54-218-69-113.us-west-2.compute.amazonaws.com/compile/',
        method: 'POST',
        data: JSON.stringify({
            'ftl': src,
            'target': 'js'
        }),
        onSuccess: function(text, xml) {
            console.log(text);
            console.log("received from server: " + text.length + " characters");
            if (text.substring(0,6) == "error:")
                console.error("Synthesis error: " + text.substring(6));
            else
                console.log('result', JSON.parse(text));
        }
    }).send();

Naive JavaScript Backend

Our old JavaScript backend can be called by sending a POST request to http://jsfiddle.net/lmeyerov/Awubf/ . It takes a JSON object with two fields, 'ftl' for the grammar source (a string) and 'target' set to 'js'. See the JS Fiddle

Optimized JavaScript Backend (asm.js + workers + typed arrays)

WebCL Backend

TBB Backend

OpenCL Backend