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); }
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; }
private bool CompileAndExecute(List<AssociativeNode> astList) { bool succeeded = Compile(astList, runnerCore); if (succeeded) { vmState = Execute(astList.Count > 0); } return succeeded; }
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; }
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(); }
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; }
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; }
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; }
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; }
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; }