Development of a Programming Environment and Interpreter for LOOP - - PowerPoint PPT Presentation

development of a programming environment and interpreter
SMART_READER_LITE
LIVE PREVIEW

Development of a Programming Environment and Interpreter for LOOP - - PowerPoint PPT Presentation

Development of a Programming Environment and Interpreter for LOOP and WHILE Michael Gebhard 22.01.2019 Goals LOOP and WHILE Interpreter IDE Plugin Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 2 LOOP Syntax


slide-1
SLIDE 1

Development of a Programming Environment and Interpreter for LOOP and WHILE

Michael Gebhard 22.01.2019

slide-2
SLIDE 2

Goals

LOOP and WHILE Interpreter IDE Plugin

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 2

slide-3
SLIDE 3

LOOP Syntax

program:

instruction ;

instruction:

variable := variable + 1 LOOP variable DO program ENDDO

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 3

slide-4
SLIDE 4

LOOP Semantics

state s : Var → N instruction i : state → state sequencing instruction ◦ instruction Instructions:

X := 0 X := Y X := Y + 1 LOOP X DO P ENDDO

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 4

slide-5
SLIDE 5

LOOP Language

LOOP X DO X := X + 1 ENDDO; Y := X

f (x) = 2x Primitive Recursive

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 5

slide-6
SLIDE 6

WHILE Syntax

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 6

slide-7
SLIDE 7

WHILE Semantics

state s : Var → N instruction i : state ⇀ state sequencing instruction ◦ instruction New Instruction:

WHILE X != 0 DO P ENDDO

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 7

slide-8
SLIDE 8

WHILE Language

X := 0; X := X + 1; WHILE X != 0 DO ENDDO

µ-Recursive

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 8

slide-9
SLIDE 9

Extended Language

main.lw

#LOOP #IMPORT math.lw in: y

  • ut: x

x := double(y)

math.lw

def double in: i0

  • ut: o0
  • 0 := 2 * i0

enddef

Basic Arithmetics Comparison Variable Declarations Macros Imports Language Flag

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 9

slide-10
SLIDE 10

Execution Environment

Parsing Execution

Macros

Debugging

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 10

slide-11
SLIDE 11

Parsing

  • ut: o0
  • 0 := 5;

loop o0 do

  • 0 := o0 * 2

enddo

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 11

slide-12
SLIDE 12

Execution

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 12

slide-13
SLIDE 13

Execution

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 13

slide-14
SLIDE 14

Execution

  • ut: o0
  • 0 := mac(5);

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 14

slide-15
SLIDE 15

Debugging

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 15

slide-16
SLIDE 16

Debugging

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 16

slide-17
SLIDE 17

Debugging

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 17

slide-18
SLIDE 18

IDE: Intellij

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 18

slide-19
SLIDE 19

IDE: Intellij

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 19

slide-20
SLIDE 20

IDE: Intellij

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 20

slide-21
SLIDE 21

IDE: Intellij

Michael Gebhard IDE and Interpreter for LOOP and WHILE (22.01.2019) 21

slide-22
SLIDE 22

Fin