1 / 7

Turing Machine based Script Language

Turing Machine based Script Language. Turing Machine Background 1936-7 Paper “On computable numbers with an application to the Entscheidungsproblem” Theory of Turing Machines Definition of Computability Turing Test Theoretical Computing Machine “Tape” – back and forth

kchavez
Download Presentation

Turing Machine based Script Language

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Turing Machine based Script Language Turing Machine Background • 1936-7 Paper “On computable numbers with an application to the Entscheidungsproblem” • Theory of Turing Machines • Definition of Computability • Turing Test • Theoretical Computing Machine • “Tape” – back and forth • “State”, “Color”, “Direction” • Wolfram 2002, pp. 78-81, p.888 • “Computing Machinery and Intelligence” Alan Turing, 1950 VisualSim Architect Script Language Overview Small Instruction Set Just-In-Time Compiler 10 RISC like Instructions vs. 3 in Turing Machine Execute at Model Level Concept of Global, Local, and Block Memory Ability to Declare Modeling Elements Virtual Execution within Modeling Environment Powerful, yet Fast Execution Several Million Instructions per Second Modeling Uses Ease in defining behavioral algorithms and text-based flow diagrams Ease in defining architectural (processing) execution Concurrent Threads easier than C++ Threads

  2. Custom DE Domain Block - uEngine Other Script Languages or C/C++ lack Block Level integration, or similar abstraction with the Modeling Environment.

  3. Script Language – Ten Instructions Mnemonic Description DEFDefine or declare a memory LBLLabel used by other instructions ENDStops current thread, removes from Thread Queue ACTAction instruction, with expressions and modifiers for input, output, wait, scheduling JITJump if True, if expression is true, then jump based on LBL, +/- integer (relative), or absolute JIFJump if False, if expression is false, then jump based on LBL, +/- integer (relative), or absolute WHLWhile (true), execute next set of instructions till RTN command reached, else jump LBL, +/- integer (relative) SBR Execute Subroutine, jump based on LBL, +/- integer (relative) RTNReturn from SBR or WHL statement, 32 levels supported GTOGOTO specific address, based on LBL, +/- integer (relative), also generate model threads

  4. M/G/2 Queueing Model

  5. M/G/2 Queueing Model Script INSTR OP_X OP OP_Y OP OP_Z ----- -------------- ----- ------ ----- ------------- ; DEF Cust_1 block Generic_Class ; DEF Cust_2 block Generic_Class ; DEF Serv_1 block 0.0 ; DEF Serv_2 block 0.0 ; DEF Queue_Len block 0.0 ; DEF Queue_Stats block stats ; DEF Queue_Stats_DS block Basic_Stats ; ACT Trace = true ; GTO Thread_2 thread Teller_2 ; LBL Teller_1 ; ACT input wait ; ACT Cust_1 = Input_Queue ; JIF Dist_Type_Param == "exp" +3 ; ACT Serv_1 = exp(MTBC) ; GTO Send_Cust_1_Out ; JIF Dist_Type_Param == "norm" +3 ; ACT Serv_1 = norm(MTBC, 15.0) ; GTO Send_Cust_1_Out ; JIF Dist_Type_Param == "rand" +3 ; ACT Serv_1 = rand(MinSvcTime, MaxSvcTime) ; GTO Send_Cust_1_Out ; LBL Send_Cust_1_Out ; ACT Serv_1 wait ; ACT Time_in_Queue send TNow - Cust_1.TIME ; ACT output send Cust_1 ; SBR Queue_Statistics ; GTO Teller_1 ; Script File Script File (cont.) LBL Teller_2 ; ACT input wait ; ACT Cust_2 = Input_Queue ; JIF Dist_Type_Param == "exp" +3 ; ACT Serv_2 = exp(MTBC) ; GTO Send_Cust_2_Out ; JIF Dist_Type_Param == "norm" +3 ; ACT Serv_2 = norm(MTBC, 15.0) ; GTO Send_Cust_2_Out ; JIF Dist_Type_Param == "rand" +3 ; ACT Serv_2 = rand(MinSvcTime, MaxSvcTime) ; GTO Send_Cust_2_Out ; LBL Send_Cust_2_Out ; ACT Serv_2 wait ; ACT Time_in_Queue send TNow - Cust_2.TIME ; ACT output send Cust_2 ; SBR Queue_Statistics ; GTO Teller_2 ; LBL Queue_Statistics ; ACT Queue_Len = Input_Queue_Length ; ACT Queue_Stats = Queue_Len ; ACT Queue_Stats_DS.Number_Values = Queue_Stats.length ; ACT Num_in_Queue send Queue_Len ; ACT Queue_Stats_DS.Min_Value = Queue_Stats.min ; ACT Queue_Stats_DS.Mean_Value = Queue_Stats.mean ; ACT Queue_Stats_DS.StDev_Value = Queue_Stats.stdev ; ACT Queue_Stats_DS.Max_Value = Queue_Stats.max ; ACT Stats_in_Queue send Queue_Stats_DS ; RTN ;

  6. Exponential Uniform Random Gaussian M/G/2 Queueing Model Output

  7. Summary of Turing Machine based Script Language Script Language Summary JIT Compiler: Text-Window, File, or EXCEL Input, Fast Execution DEF instructions for declaring Memories, Arrays, Queues, Statistics ACT commands for Input, Output, Wait, Schedule instructions ACT, JIT, JIF, WHL command integration with Ptolemy expression language SBR command supports Thread Level Semaphore or Mutex for multiple threads Script Language Assertions: Ability to set High, Low values Script Language Exceptions, Command Line Interface uEngine: Support for multiple Input, Output or Virtual ports uEngine: 1024 uCode Lines per Block, 32 Threads, 32 Subroutine Levels uEngine Debugging: uCode enabled Trace Mode, Single Step mode with breakpoint on postfire() method. www.mirabilisdesign.comwww.mirabilisdesign.comwww.mirabilisdesign.com

More Related