It's a guide of how drawing some piping elements in their isometric's formFull description
Business Ethics, Organization,Full description
Descripción: An indepth look at the four Usui Reiki Symbols
Full description
Prior to the twentieth century, theories of knowledge were inherently perceptual. Since then, developments in logic, statis- tics, and programming languages have inspired amodal theories that rest ...
Explanation on GD&T symbol used,provide basic understand from the chartFull description
global mobile corporation
mcaDeskripsi lengkap
CPU ORGANIZATIONFull description
Spatial RelationshipFull description
Full description
Social Work CO Subject
subject: organizational behaviour topic: organizational culture finding the contrasting cultures and working environment in two different service organizations namely Axis Bank and Cox&King
Full description
Symbol Table Organization & Techniques Definition:- Symbol table is an abstruct data structure for storing the information. The table differs from the other data structure in method of accessibility. The other data structures are index/ pointh index/ pointh accessible where as table is context accessible.
The table Entry here of the form: Ke y
Associated Data
e can access associated data once once !ey !ey is specified. Operation on Table:-
Two Two main !inds of operations ". #rimary $Searching %n this the !ey !e y &alue is specified. specif ied. e ha&e to find the corresponding data. K 'Key is gi&en( ) *'&alue( +. Secondary ,ere insertion and deletion are there Domain: '!ey- &alue( %nsert: 'table- !ey!e y- &alue( )table Delete: 'table- !ey( ) table ew table: ' ( ) table Select: 'table- !ey( ) '&alue- boolean( %s empty: 'table( ) boolean Symbol table organization for non-blocked structured language:-
y a non$bloc!ed structure language- we mean a language in which each separately compiled unit is a single module that has no submodules. submodules. All &ariables declared in a module are !nown throughout the module. There are four modules 0nordered 1rdered Tree ,ash ". 0nordered The simplest method of organi2ing a symbol table is to add the attribute entries to the table in the order in which the &ariables are declared. So there is no particular ordering. - ,ere the insertion is &ery easy as no comparision are re3uired. - The searching is more difficult hence it is &ery time consuming. - 4or delete operation- on the a&erage- a search length of 'n5"(/+ is re3uired- assuming there a n records.
-
-
Time to insert a !ey ) " 0nsuccessful search the time wanted is 'n5"( An unwanted table organi2ation should be used only if the expected si2e of the symbol table is small- since the a&erage time for insertion and deletion is directly proportional to the table si2e. The algorithm is gi&en for selecting a data whose !ey is !nown to us. procedure select'table- !ey- data &alue- found( &ar i unteger6 begin with table do begin entry7n5"8.!ey 9 !ey6 i9"6 while'entry7i8.!ey;!ey i9i5"6 if i9n then begin data &alue9entry7i8.&alue6 found9T<0E6 end else found94A=SE6 end end So the complexity is 1''n5"(/+(. ..... ow let>s see &arious aspects: 'Actual use( i( 4ixed as &ariable length entries. %n fixed - the number of entries possible in a table are fix where as in &ariable length it is changed. ii( Si2e of !ey'in byte(. iii( ?ethod of access i&( ,ow fre3uent the insertion and deletion. =anguage specific consideration: i( AS%@ *ariables are stored asletter; as letter; digit; So with this format at the most +B entries are possible. To !now the address of a gi&en !ey- we ha&e formula as follows: Address; 9 !ey; $ BC 1< Address; 9 ' !ey letter; BC( "F 5 digit; $ G ii( 41
b
b
b
b
#adding 'This much bytes are wasted( iii( @ or #AS@A= %n such high$le&el languages- the &ariable length !ey strange are used. ith this type of !ey strange- we get the better memory utili2ation but the method is not fast. ptr
S
length
H
?
1
=
+. 1rdered %n this method- the table is maintained is sorted form based on the &ariable>s name. %n such circumstances an insertion must be accomplished by a loo!up procedure which determines where in the symbol table the &ariable attribute should be placed. The actual insertion of new entry may generate. Some additional o&erhead primarily because other entries may ha&e to be mo&ed to get the position of insertion. 4or searching a particular !ey- we apply inary$Search Techni3ue. Suppose ' K "-*"( .... 'K mid-*mid( .... 'K n-*n( are the entries in the table. ,ere mid9 n di& + Algorithm is described below 4ind'low- high( hile low high do begin mid 9 'low5high( di& +6 if ! entry7mid8.!ey then high 9 mid6 4ind'low-high(6 else low 9 mid 5 "6 4ind'low-high(6 end So the !ey for which we are sending is placed in high or low &ariable. The time complexity of this algorithm is 1'log n(. ?ethods of Sorting: i.
Array e short the entries in the table in some particular ..... with arrays. ith arrays- the searching of particular entry is &ery fast. ut insertion is time consuming. 4or inserting particular entry- first we ha&e to find its position to locate it. And all the entries below it are shifted down.
ii.
%ndex ith this method- the insertion is easy. ptr
K
*
,ere only ptr field is manipulated. e ha&e to do nothing with table. So- it is easier for insertion. iii. =in!ed =ist %n this approach- we combined the array and lin!ed list. A E I
,ere- array is for searching and lin!ed list is used for insertion and deletion. ,ere there is no actual limit of number of entries in the table. To search a !ey- starting symbol can be found by comparison and then entries can be counted to find the exact match. J. Tree %n a binary tree structured symbol table- each node ha&e the following format: =eft ptr Key *alue s ta!e an example of storing a string abcd in this format. =#
a
&alue
a
b
&alue
<# b 0==
<#
c b
c
&alue
<#
d ,ere in case of balanced binary tree the time complexity of a searching a node among the n node is gi&en by 1'log + n( G. ,ash A hashing function or !ey to address transformation is defined as a mapping ,: K)A. That is- a hashing function , ta!es as its argument a &ariable named and produces a table address at which the set of attributes for that &ariables are stored. ith this method the search time is essentially independent of the number of records in the table. , K A table space address space =et n be the number of entries in the table we define loading factorload factor 9 no of entries'n( / total address space 'LAL( %f load factor is high- it is difficult to manage the table. ow in practical we ha&e K;;LAL So if we assign more than one !ey to one address- there is a problem of collision. Pre conditioning:Each element of K usually contains characters which are numeric- alphabetic. The indi&idual characters of a name are not particularly amenable to arithmetical and logical operation. The proun of transforming a &ariable>s name to a form which can be easily manipulated by a hashing function is called pre conditioning. #re conditioning can be handled most efficiently by using the num erically coded internal representation. Example: AS@%% on 4@D%@ of each character in the name. There are number of hashing functions that are applicable tp symbol table handling. "( Di&ision ?ethod:$ The most widely accepted hashing function s di&ision method which is defined as- ,'x(9 'x mod m(5" for di&ision m. %n mapping !eys to addresses- the di&ision method preser&es- to a certain extent- the unitormity that exist in a !ey set. Keys which are closely bunched together are mapped to uni3ue address. %n general- if many !ey are congruent modulo d- and m is not relati&ely prime to d- then using m a a di&isor can result in poor performance of the di&ision method.
+( ?id$s3uare method:$ A second hashing function that performs reasonably well is the mid$ s3uare method. %n this method- a !ey multiplied by itself and an address is obtained by.... bits or digits at both ends of the product until the number of bits or digits left is e3ual to the desired address length. J( 4olding ?ethod:$
4or the folding method- a !ey is partitioned into a number of parts- each of which has the same length as the re3uired address with the possible exception of the last part. The parts are then added together- ignoring the final carry- to form an address if the !eys are in binary form- the exclusi&e$ 1< operation may be substituted for addition. 4olding is a hashing function which is useful for compressing multiword !eys so that other hashing functions can be used. G( =ength$dependent method:$ %n this approach- the length of the &ariable name is used in conMunction with some subpart of the name to produce either a table address directly- or more commonly- an intermediate !e. The fynction that produced the best results summed the internal binary representation of the first and last characters and the length of &ariable ha&e shifted left four binary places. A hashing function is a many$to$one mapping. That is- the name space K is in general much longer than the address space. A .. onto which K is mapped. 1f course- two records cannot occupy the same location and therefore some methods must be used to resol&e the collision that can result. Open ddressing:
To minimi2e the number of collisions- a hashing function should map the &ariable names in a program to the address space as unitarily as possible. ith open addressing- if a &ariable name x is mapped to a storage location dand this location is already occupied- then other locations in the table are scanned until a free record location is found for the new record. The cocetion are scanned according to a se3uence which can be defined in many ways. The simplest techni3ue for handling collision is to use the following se3uence: d- d5"- ....- m$"- m- "- +- ....- d$"- .... A free record location is always found if at last one is a&ailable- otherwise the search halts after scanning m locations. hen a record is loo!ed up- the sa&e se3uence of locations is scanned until that record is located- as until an empty record position is found. This method of collision resolution is called linear probing. There are three main difficulties with the open$addressing: "( hen trying to locate an open location for record insertion- there is in many instances- the necessity to examine records that do not ha&e the same initial hash &alue. +( A table$o&erflow situation cannot be satisfactorily handled using open addressing. %f an o&erflow occurs- the entire table must be recogni2ed. J( Difficulty of physically deleting records.
!haining:
@haining can be used in a &ariety of ways to handle o&erflow records. This method in&ol&es the chaining of colliding records into a special o&erflow area which is separate from the prime area. A separate chain !ept for each set of colliding records and conse a pointer field must accompany each record in a primary or an o&erflow location. 4igure shows this: *ariable ADD Empty Empty Empty
*alue
=in! "
J
The algorithm performs the insertion and deletion by first examining the prime area locations- as determined by the hashing function and then the o&erflow area if necessary. ote that for explicit declaration- the algorithm can be impro&ed by ha&ing insertion performed at the front of list of unordered o&erflow records. This ... allows for fast insertion6 howe&er it has not guarantee that duplicate declarations will be detected. ,ere disad&antage is that the additional storage is re3uired to store the lin!s. ut its performance and &ersatility is superior to open addressing. The open addressing scheme is easier to implement and because of its efficient utili2ation of storage. %t should be considered when implementing the compiler on a small machine. Symbol-Table Organization for "locked Structured #anguage:-
y a bloc!$ structured language- we mean a language which a module can contain nested submodules and each sub modules can ha&e its own set of locally declared &ariables. A &ariable declared within a module unless the same &ariable name is redefined within a sub module of A. The redefinition of a &ariable holds throughout the scope of the sub modules.
-
Stac! symbol tables Stac! implemented tree structural tables Stac! implemented hash symbol tables
". Stac! symbol tables The simplest symbol table organi2ation for a bloc!ed$structured language is the stac! symbol table. %n this organi2ation the records containing the &ariables attributes are encountered upon reaching the end of a bloc!- all records for &ariables declared in the bloc! are remo&ed. Since these &ariables cannot be re.. outside the bloc!.
The insertion operation is &ery simple in a stac! symbol table. ew records are added at the top location in the stac!. Declaration in&ol&ing duplicate names can exist in bloc!$ structured languages- but they cannot occur in the same bloc!. The deletion operation in&ol&es the linear search of the table from the top of the bottom. The search must be conducted in this order to guarantee that the latest occurrence of a &ariable with a particular name is located first. ..... because sets of symbol table records are discarded as bloc!s are terminated. The a&erage length of search for a stac! symbol table will be less than for the corresponding unordered symbol table. +. Stac! implemented tree structural tables %n bloc!$structured language- when the compilation of bloc! is completed- the bloc! must be remo&ed from the table. As a result- the problem of deleting table records must be addressed. %n a tree- the steps to delete a record are: - =ocate the position of record in the tree -
-
@oncerned with generation of target language code. Semantic analysis and code generation must be done. 4or code generation memory assignment is re3uired.
%un $ Time emory Organization: 'inds of memory organization: () Static memory allocation: %n a static storage allocation- it is necessary to be able to decide at compile time exactly where each data obMect will reside at runtime. %n order to ma!e such decision o The si2e of each bloc! must be !nown at compile time.
o
1nly one occurrence of each obMect is allowed at a gi&en moment during
program execution.
length cannot be established at compile time. Similarly dynamic arrays are not allowed- since their bounds are not
o
!nown at compile time. ecause of +nd ....- nested procedures are not possible in a static storage allocation scheme. This is the case because it is not !now of compile time which or how many nested procedures- and hence their local &ariables- will be .... at execution time.