By Heiko Dörr

This e-book offers significant learn effects at the speedy implementation of graph rewriting platforms (GRS). First, it explores the category of so-called UBS-GRS, the place the complexity of a rewriting step is linear rather than NP, exhibiting for instance that visible programming is feasible by means of UBS graph rewriting. moment, an summary computer for graph rewriting is outlined offering an guideline set adequate for the execution of GRS.
The easy definitions of GRS within the algorithmic method are brought and prolonged by way of attribution and keep an eye on buildings to contain a formalism for an operational specification. the interpretation of a practical programming language to graph rewriting exhibits the services of UBS-GRS.

Show description

Read or Download Efficient Graph Rewriting and Its Implementation PDF

Similar compilers books

The Definitive Guide to SugarCRM: Better Business Applications (Books for Professionals by Professionals)

SugarCRM is one in all if no longer the major Open resource CRM resolution on the market at five. five million downloads and starting to be and with approximately 17,000 registered builders and plenty extra clients. it will be the legit, definitive e-book written by means of SugarCRM and counseled by means of SugarCRM. additionally, this booklet will be additionally the single SugarCRM developer booklet so one can deal with the platform similar good points due to the fact that SugarCRM five.

Methodologies and Software Engineering for Agent Systems: The Agent-Oriented Software Engineering Handbook

As info applied sciences develop into more and more dispensed and obtainable to greater variety of humans and as advertisement and govt enterprises are challenged to scale their functions and prone to bigger marketplace stocks, whereas lowering charges, there's call for for software program methodologies and appli- tions to supply the subsequent beneficial properties: Richer software end-to-end performance; relief of human involvement within the layout and deployment of the software program; Flexibility of software program behaviour; and Reuse and composition of current software program purposes and platforms in novel or adaptive methods.

Numeric Computation and Statistical Data Analysis on the Java Platform

Numerical computation, wisdom discovery and statistical info research built-in with strong 2nd and 3D images for visualisation are the main subject matters of this e-book. The Python code examples powered via the Java platform can simply be reworked to different programming languages, akin to Java, Groovy, Ruby and BeanShell.

Additional info for Efficient Graph Rewriting and Its Implementation

Example text

IRestore old IOTR content. lidt fword ptr [old_IOT addr] ;Terminate the program 26 i386/i486 Advanced Programming mov ax,4cOOh int 21h start endp code ends ;Terminate this program ;by calling DOS function call. ;Local Interrupt service routine ;These routines will get the offset address of its message ;and display the message on the screen. INTCODE segment use16 assume cs:intcode,ds:data IntO: mov si,offset IntOM jmp dispmsg Intl: mov si,offset IntlM jmp dispmsg Int2: mov si,offset Int2M jmp dispmsg Int3: mov si,offset Int3M jmp dispmsg Int4: mov si,offset Int4M jmp dispmsg IntS: mov si,offset IntSM jmp dispmsg Int6: mov si,offset Int6M dispmsg jmp Int7: mov si,offset Int7M jmp dispmsg IntS: mov si,offset IntSM jmp dispmsg Int9: mov si,offset Int9M jmp dispmsg IntlO: mov si,offset IntlOM jmp dispmsg Intll : mov si,offset IntllM dispmsg jmp Int12: mov si,offset Int12M jmp dispmsg Int13: mov si,offset Int13M jmp dispmsg Int14: mov si,offset Int14M jmp dispmsg IntlS: mov si,offset IntlSM dispmsg: mov call iret di, SO dispit * 3S ;Message display routine iBecause DOS function call is not available at this time, ;we have to display it by ourself.

H' ,0 ;STEP 6: stack segment for privilege level 0,1,2 stkO segment db 100h stkO limit equ stkO- ends para public use16 'stkO' dup(O) stk1 para public use16 'stk1' dup(O) segment db 100h stk1 limit equ stk1- ends $ $ Enter and Leave Protected Mode 49 stk2 segment db 100h stk2 limit equ stk2- ends para public use16 'stk2' dup(O) $ ;STEP 7: Task state segment taskO TSS TSS stack segment para public use16 'taskO' stkO selec,stkO limit,stk1 selec, stk1-limit, stk2 selec,stk2 limit ;cr3 TSS cr3 TSS-regs O,O,O,O,O,O,O,O,O,stkO limit gdata selec,code selec~stkO selec, Tss=seg gdata-selec,gdata selec,gdata selec dd -0 -;LOT field dw ;task trap flag dw 68h ;l/O base taskO TSS limit equ $ taskO-TSS- ends ° - - ° ; STEP 8: Oununy segment dmy dmy segment para public use16 'dmy' 128 dup(O) db ends ;COOE segment code main segment para public use16 'code' assume cs:code,ds:gdata proc far mov ax,gdata ;get gdata segment address mov ds,ax ;put in os ;STEP 9: initialize lOT mov mov mov mov mov fillidt: mov add add loop iSTEP 10: mov mov xor aX,lOT eS,ax di,offset idt tab aX,offset int=entry cx, lNTNO es:[di],ax di,osCPSlZE aX,lNTSlZE fillidt ;get lOT segment address ;put in ES ;get lOT offset address ;get interrupt service ;routine address ;get interrupt number ;put entry address in lOT ;adjust address in lOT ;adjust interrupt service jroutine address, the size of each ;routine is defined in lNTSlZE ikeep filling get GOT/lOT limit and linear address aX,offset gdt limit PGOT_limit, axeax,eax ;get GOT segment limit iPut in pGOT limit ;clear eax - 50 i386/i486 Advanced Programming mov shl aX,GDT eax,4 mov pGDT_addr,eax mov mov xor mov shl ax,offset idt limit PlDT_limit,axeax,eax ax,idt eax,4 mov plDT_addr,eax ;get GDT segment address ;convert to 32 bit linear ; address ;put in pGDT_addr ;get lOT segment limit iPut in pGDT limit ;clear eax ;get lDT segment address iconvert to 32 bit ;linear address iPut in plDT_addr ;STEP 11: based on gdt phys tab to set linear base address for each corresponaing descriptor bdtl: mov mov mov ax, GOT es,ax si,offset gdt_phys_tab mov cx,gdt_tab_size lodsw mov bx,ax and bX,OfffSh lodsw push shl mov ax ax,4 es:[bx] [d_basel],ax pop shr mov ax ax,12 es:[bx][d_base2],al loop bdtl iget gdt segment address iPut in ES ;get address of igdt phys tab iget-gdt_phys_tab size iget descriptor number iPut in BX imask off Tl bit and RPL iget corresponding isegment address for ithe above descriptor isave it ;get lower 4 bytes offset isave it in descriptor ;basel position irestore segment address iget the highest byte ;save it in descriptor ;base2 position icontinue ; STEP 12 : switch to protected mode cli 19dt [pGDT] lidt [pIDT] mov or mov eax,crO al,prot enable crO,eax- jmp dword ptr cs:[enter_prot] ;far jump to iflush instruction queue enter prot: -dw offset now in prot code selec- dw ;clear interrupt ;load GDT address and ilimit into GDTR ;load lDT address and ilimit into lDTR ;get crO register jset protected mode enabl4 ;restore crO jElP icode segment selector iSTEP 13: execute in protected mode, set LDTR,SS,SP,OS,ES,FS,GS Enter and Leave Protected Mode 51 now in_prot: xor ax,ax lldt ax mov mov mov mov mov mov mov mov ;clear ax ;load NULL selector ito LOTR ax,stkO_selec ;get stack segment ; selector ss,ax ;put in 55 sp,offset stkO limit ;set stack pointer ax,gdata selec;get data segment selector ds,ax ;put in os es,ax ;put in ES fs,ax ;put in FS gs,ax iPut in GS ;STEP 14: display message in protected mode iclear the screen first mov ax,video_selec iget video segment selector es,ax mov iPut in ES cx,4000h ibuffer size to clear mov di,di iscreen starting address xor mov ah,attribute icharacter attribute mov al,space ispace rep stosw ifill it mov si,offset in_protected iget protected mode imessage address mov di,320 iget display address call disp_it icall display procedure iSTEP 15: load TSS to TR mov ax,taskO TSS selec ltr ax iget TSS selector for icurrent task iload into task register - ;STEP 16: switch back to real-address mode int 20 iinterrupt 20 iSTEP 17: Interrupt service Routine REPT call iret ENOM iSTEP 18: disp: pop mov mov sub shr INTNO disp ientry point for iinterrupt service routine icall the display message iprocedure get interrupt number and display it ax ;get return address from stack bx,gdata selec ireload data segment ds,bx ax, offset int_entry iget offset from the ;interrupt entry aX,TWO ;divide by 4 to get 52 i386/i486Advanced Programming mov mov call mov si,offset int num cx,TWO htoa si,offset int_msg mov call di,5*160 disp_it ;STEP 19: cli mov mov mov mov mov mov mov and mov db dw dw iSTEP 20: ;interrupt number ;get ascii code address ;convert to 2 ascii code ;call convert procedure ;get interrupt message ; address ;get display address ;call display procedure return to real-address mode ax,dmy_selec es,ax ds,ax fs,ax gs,ax ss,ax eax,crO eax,not prot_enable crO,eax ;disable interrupt ;dununy selector ;reset segment registers ;load the content of CRO ;disable protected mode ;restore the content of ;CRO Oeah ;far jump to flush ;instruction queue offset next instruction inew EIP code ;new CS execute in real-address mode, set DS,SS and SP next instruction: mov ax, Gdata ;get mov ds,ax ;put mov ax,stkO ;get mov ss,ax ;put mov sp,offset stkO limit data segment address in DS stack segment address in SS ;set stack pointer ;STEP 21: set IDTR to DOS interrupt table lidt [pold] sti ;load DOS interrupt vector ;table to IDTR register ;enable interrupt ;STEP 22: terminate this process main mov int endp ax,4cOOh 21h ;terminate process ;DOS function call ; Procedure: disp it ;Display string in protected mode ; Input: ds:si - string address, the end of the string must ;be 0 disp_it mov mov proc near ax,video_selec es,ax ;get video segment selector iPut in ES Enter and Leave Protected Mode mov disp_itl: lodsb stosw cmp jne ret disp_it ah,attribute ;display attribute al,O disp_itl ;get display character ;put it on screen ;end of display character ?

The offset of these routines is initialized at run time. Step 3: Variable • pGDT is a pointer to a six-byte data that has the linear base address and limit value for the GOT. These values are set at run time. • pIDT is a pointer to a six-byte data that has the linear base address and limit value for the lOT. These values are set at run time. • pold is a pointer to a six-byte data that has the linear base address and limit value for the interrupt vector table defmed in real-address mode with DOS environment.

Download PDF sample

Rated 4.65 of 5 – based on 49 votes