Search in sources :

Example 1 with ApiSynthesizerEcho

use of edu.rice.cs.caper.bayou.application.api_synthesis_server.synthesis.ApiSynthesizerEcho in project bayou by capergroup.

the class ApiSynthesizerFactory method makeFromConfig.

/**
 * @return a synthesiser in accordance with edu.rice.cs.caper.bayou.application.api_synthesis_server.Configuration
 */
static ApiSynthesizer makeFromConfig() {
    _logger.debug("entering");
    ApiSynthesizer synthesizer;
    if (Configuration.UseSynthesizeEchoMode) {
        synthesizer = new ApiSynthesizerEcho(Configuration.EchoModeDelayMs);
    } else {
        ContentString tensorFlowHost = new ContentString(Configuration.AstServerAuthority.split(":")[0]);
        NatNum32 tensorFlowPort = new NatNum32(Configuration.AstServerAuthority.split(":")[1]);
        synthesizer = new ApiSynthesizerRemoteTensorFlowAsts(tensorFlowHost, tensorFlowPort, Configuration.SynthesizeTimeoutMs, Configuration.EvidenceClasspath, Configuration.AndroidJarPath, Configuration.ApiSynthMode);
    }
    _logger.debug("exiting");
    return synthesizer;
}
Also used : ContentString(edu.rice.cs.caper.programming.ContentString) ApiSynthesizerEcho(edu.rice.cs.caper.bayou.application.api_synthesis_server.synthesis.ApiSynthesizerEcho) NatNum32(edu.rice.cs.caper.programming.numbers.NatNum32) ApiSynthesizerRemoteTensorFlowAsts(edu.rice.cs.caper.bayou.application.api_synthesis_server.synthesis.ApiSynthesizerRemoteTensorFlowAsts) ApiSynthesizer(edu.rice.cs.caper.bayou.application.api_synthesis_server.synthesis.ApiSynthesizer)

Aggregations

ApiSynthesizer (edu.rice.cs.caper.bayou.application.api_synthesis_server.synthesis.ApiSynthesizer)1 ApiSynthesizerEcho (edu.rice.cs.caper.bayou.application.api_synthesis_server.synthesis.ApiSynthesizerEcho)1 ApiSynthesizerRemoteTensorFlowAsts (edu.rice.cs.caper.bayou.application.api_synthesis_server.synthesis.ApiSynthesizerRemoteTensorFlowAsts)1 ContentString (edu.rice.cs.caper.programming.ContentString)1 NatNum32 (edu.rice.cs.caper.programming.numbers.NatNum32)1