Example #1
0
        private bool CompileAndExecute(string code)
        {
            // TODO Jun: Revisit all the Compile functions and remove the blockId out argument
            int  blockId   = ProtoCore.DSASM.Constants.kInvalidIndex;
            bool succeeded = Compile(code, out blockId);

            if (succeeded)
            {
                runnerCore.RunningBlock = blockId;
                vmState = Execute();
            }
            return(succeeded);
        }
Example #2
0
        private void InitCore()
        {
            Validity.Assert(coreOptions != null);

            // Comment Jun:
            // It must be guaranteed that in delta exeuction, expression id's must not be autogerated
            // expression Id's must be propagated from the graphcompiler to the DS codegenerators
            //Validity.Assert(coreOptions.IsDeltaExecution && !coreOptions.GenerateExprID);

            runnerCore = new ProtoCore.Core(coreOptions);

            SyncCoreConfigurations(runnerCore, executionOptions);

            runnerCore.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(runnerCore));
            runnerCore.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(runnerCore));
            runnerCore.FFIPropertyChangedMonitor.FFIPropertyChangedEventHandler += FFIPropertyChanged;
            vmState = null;
        }
Example #3
0
 private bool CompileAndExecute(List<AssociativeNode> astList)
 {
     bool succeeded = Compile(astList, runnerCore);
     if (succeeded)
     {
         vmState = Execute(astList.Count > 0);
     }
     return succeeded;
 }
Example #4
0
 private bool CompileAndExecute(string code)
 {
     // TODO Jun: Revisit all the Compile functions and remove the blockId out argument
     bool succeeded = runner.CompileAndGenerateExe(code, runnerCore, new ProtoCore.CompileTime.Context());
     if (succeeded)
     {
         vmState = Execute(!string.IsNullOrEmpty(code));
     }
     return succeeded;
 }
Example #5
0
        private void InitCore()
        {
            coreOptions = new Options
            {
                IsDeltaExecution = true,
                BuildOptErrorAsWarning = true,
                ExecutionMode = ExecutionMode.Serial
            };

            runnerCore = new ProtoCore.Core(coreOptions);
            runnerCore.Compilers.Add(ProtoCore.Language.Associative, new ProtoAssociative.Compiler(runnerCore));
            runnerCore.Compilers.Add(ProtoCore.Language.Imperative, new ProtoImperative.Compiler(runnerCore));

            runnerCore.Options.RootModulePathName = configuration.RootModulePathName;
            runnerCore.Options.IncludeDirectories = configuration.SearchDirectories.ToList();
            foreach (var item in configuration.PassThroughConfiguration)
            {
                runnerCore.Configurations[item.Key] = item.Value;
            }

            vmState = null;

            CreateRuntimeCore();
        }
Example #6
0
 private bool CompileAndExecute(List<AssociativeNode> astList)
 {
     // TODO Jun: Revisit all the Compile functions and remove the blockId out argument
     int blockId = ProtoCore.DSASM.Constants.kInvalidIndex;
     bool succeeded= Compile(astList, runnerCore, out blockId);
     if (succeeded)
     {
         runtimeCore.RunningBlock = blockId;
         vmState = Execute(astList.Count > 0);
     }
     return succeeded;
 }
Example #7
0
 private bool CompileAndExecute(string code)
 {
     // TODO Jun: Revisit all the Compile functions and remove the blockId out argument
     int blockId = ProtoCore.DSASM.Constants.kInvalidIndex;
     bool succeeded = Compile(code, out blockId);
     if (succeeded)
     {
         runtimeCore.RunningBlock = blockId;
         vmState = Execute(!string.IsNullOrEmpty(code));
     }
     return succeeded;
 }
Example #8
0
        private void InitCore()
        {
            coreOptions = new Options();
            coreOptions.GenerateExprID = true;
            coreOptions.IsDeltaExecution = true;
            coreOptions.BuildOptErrorAsWarning = true;
            coreOptions.WebRunner = false;
            coreOptions.ExecutionMode = ExecutionMode.Serial;

            runnerCore = new ProtoCore.Core(coreOptions);
            runnerCore.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(runnerCore));
            runnerCore.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(runnerCore));
            runnerCore.FFIPropertyChangedMonitor.FFIPropertyChangedEventHandler += FFIPropertyChanged;

            runnerCore.Options.RootModulePathName = configuration.RootModulePathName;
            runnerCore.Options.IncludeDirectories = configuration.SearchDirectories.ToList();
            foreach (var item in configuration.PassThroughConfiguration)
            {
                runnerCore.Configurations[item.Key] = item.Value;
            }

            vmState = null;
        }
Example #9
0
        private void InitCore()
        {
            Validity.Assert(coreOptions != null);

            // Comment Jun:
            // It must be guaranteed that in delta exeuction, expression id's must not be autogerated
            // expression Id's must be propagated from the graphcompiler to the DS codegenerators
            //Validity.Assert(coreOptions.IsDeltaExecution && !coreOptions.GenerateExprID);

            runnerCore = new ProtoCore.Core(coreOptions);

            SyncCoreConfigurations(runnerCore, executionOptions);


            runnerCore.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(runnerCore));
            runnerCore.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(runnerCore));
            runnerCore.FFIPropertyChangedMonitor.FFIPropertyChangedEventHandler += FFIPropertyChanged;
            vmState = null;
        }
Example #10
0
 private bool CompileAndExecute(string code)
 {
     // TODO Jun: Revisit all the Compile functions and remove the blockId out argument
     int blockId = ProtoCore.DSASM.Constants.kInvalidIndex;
     compileState = Compile(code, out blockId);
     Validity.Assert(null != compileState);
     if (compileState.compileSucceeded)
     {
         runnerCore.RunningBlock = blockId;
         vmState = Execute();
     }
     return compileState.compileSucceeded;
 }