ABSTRACTION MECHANISMS OF BETAFerd<strong>in</strong>and Mácha 1 , František Huňka 21 E-mail: F.Macha@seznam.cz2 Institute for Research and Applications of Fuzzy Model<strong>in</strong>g,30. dubna 22, Ostrava 1, Czech RepublicE-mail: Frantisek.Hunka@osu.czKEYWORDSBeta programm<strong>in</strong>g language, abstraction, pattern,reusability, software development.ABSTRACTAs the software users are harder and harder to please<strong>in</strong> the progress<strong>in</strong>g time, the needs for new develop<strong>in</strong>glanguages and techniques are ris<strong>in</strong>g up. In this paper itwill be discussed a relatively unknown programm<strong>in</strong>glanguage Beta, it's object-oriented characteristics, theabstraction mechanisms of the Beta and utilization of thepresented mechanisms to simulat<strong>in</strong>g modelsconstructions.SOFTWARE DESIGNThe software build<strong>in</strong>g nowadays is similar to build<strong>in</strong>ga brick-box model. The software designers have tochoose from a variety of bricks (API functions, libraryfunctions, components, etc.) and their task is to put themtogether implement<strong>in</strong>g an application.Many times, there is a need to re-implement somealgorithmic element repeatedly. One can use many waysto achieve the desired functionality. Most efficientamong them is so-called object oriented paradigm.There are many products on the software market, thathave similar functionality and yet they are completelydifferent. Ma<strong>in</strong>ly it is because the programmers do notshare their functionality implementation.However, even with such shar<strong>in</strong>g the variability isvery high. For example media players. They have somesame bugs, as the side effect of shar<strong>in</strong>g the decod<strong>in</strong>g orencod<strong>in</strong>g rout<strong>in</strong>es and many different ones becauseimplement<strong>in</strong>g the same th<strong>in</strong>gs differently.THE IMPLEMENTATION SHARINGHowever, the term “shar<strong>in</strong>g the implementation” israther abstract. There are a few levels how to do so.• Us<strong>in</strong>g the media players example, it could be observedan implementation shar<strong>in</strong>g on a primitive level - withthe use of the common de/encod<strong>in</strong>g rout<strong>in</strong>es. Moregenerally it is us<strong>in</strong>g common library functions <strong>in</strong>various projects;• Another way for shar<strong>in</strong>g is copy & paste of the codeso it can be reused;• Concern<strong>in</strong>g the implementation speed by softwareproject evolution (that is, how fast is a programmerable to modify the software and apply a new knowhow),the most efficient k<strong>in</strong>d of implementationshar<strong>in</strong>g is of course the class <strong>in</strong>heritance. It doesn'tsuffer from the negatives of the previous two. Withthe common library rout<strong>in</strong>es there is no specifiedconcept how to use the rout<strong>in</strong>es. So if somebody hasdeveloped an optimised use of a rout<strong>in</strong>e, theoptimisation is not applied <strong>in</strong> another project. Andwith the copy & paste method there is no efficientmeans for updat<strong>in</strong>g the error correction.However if the designer's choose is to build asoftware on an object oriented basis there are aga<strong>in</strong> a fewways how to achieve the desired product functionality.The fastest way from a design to an implementation isto reuse prepared classes and extend their functionality.Let's assume there are some classes available to reuse.Let's <strong>in</strong>herit a super class CSup and create our own classCChild that will have all capabilities and features ofCSup. Most likely, there will be a need to modify someof the features of the CSup class with a newimplementation <strong>in</strong> our CChild class:• If a feature is a non-virtual method, the onlypossibility how to change the method behaviour is touse the selected programm<strong>in</strong>g language's methodhid<strong>in</strong>g mechanism. Of course this is a poor qualitysoftware design, mostly not applicable due to theprogramm<strong>in</strong>g language;• Virtual methods are the best for a super classesbehaviour modification. One k<strong>in</strong>d of modification iscompletely overrid<strong>in</strong>g the method's implementationand set a new one. However it is clear that all effortput <strong>in</strong>to the previous implementation is now lost. ThisAnnual <strong>Proceed<strong>in</strong>gs</strong> of Vidzeme University College “ICTE <strong>in</strong> Regional Development”, 2006120
could be bad particularly when overrid<strong>in</strong>g anoptimised problem solution;• A few programm<strong>in</strong>g languages are support<strong>in</strong>gextension of the method's implementation. With that,the super class's method could be still <strong>in</strong>voked withthe old behaviour before or after the new behaviour isused.Practical usage of method extensions could beobserved with creation of a visual componentVirtualTreeView that should pa<strong>in</strong>t on the screen acomplex tree structure with general data <strong>in</strong> each treenode * .Now let the first application use it with customizedpa<strong>in</strong>t<strong>in</strong>g where every node with data of a particular typeis pa<strong>in</strong>ted green. And another application (the firstapplication extension) wants to pa<strong>in</strong>t nodes as the firstapplication and nodes which meet another particularcriteria should be pa<strong>in</strong>ted red. A whole lot of work issaved when us<strong>in</strong>g extend<strong>in</strong>g virtual methods <strong>in</strong>stead ofoverrid<strong>in</strong>g virtual methods.THE BETA PROGRAMMING LANGUAGEQuot<strong>in</strong>g the Object-oriented programm<strong>in</strong>g <strong>in</strong> theBeta: “BETA is a modern language <strong>in</strong> the Simulatradition. It supports the object-oriented perspective onprogramm<strong>in</strong>g and conta<strong>in</strong>s comprehensive facilities forprocedural and functional programm<strong>in</strong>g.Research is go<strong>in</strong>g on with the aim of <strong>in</strong>clud<strong>in</strong>gconstra<strong>in</strong>t-oriented constructs.BETA replaces classes, procedures, functions, andtypes by a s<strong>in</strong>gle abstraction mechanism called thepattern. It generalizes virtual procedures to virtualpatterns, streaml<strong>in</strong>es l<strong>in</strong>guistic notions such as nest<strong>in</strong>gand block structure, and provides a unified framework forsequential, corout<strong>in</strong>e and concurrent execution.The result<strong>in</strong>g language is smaller than Simula <strong>in</strong> spiteof be<strong>in</strong>g considerably more expressive.”The basic syntax rules of Beta consist of an objectdescriptor(# ... #)where ellipsis reference to an object body. The name andthe object body then specify the pattern:CPattern: (# ... #)* Actually this is a Delphi component called the VirtualTreeView, see http://www.delphigems.com/VirtualTreeview/VT.phpThe object-descriptor is now describ<strong>in</strong>g what arecapabilities of the pattern's <strong>in</strong>stances. Inside the objectdescriptormay or may not be an enter part, a do part oran exit part.In the enter part are com<strong>in</strong>g the values from outsidethe pattern <strong>in</strong>stance and pattern's attributes specified hereare set to these values. The do part is executed when<strong>in</strong>vok<strong>in</strong>g a pattern's <strong>in</strong>stance. The exit part is denot<strong>in</strong>gthe pattern's output values.A pattern can be declared as virtual by us<strong>in</strong>g :
- Page 1 and 2:
ISBN 9984-633-03-9Annual Proceeding
- Page 3 and 4:
“Development of Creative Human -
- Page 5 and 6:
TABLE OF CONTENTSINTELLIGENT SYSTEM
- Page 7 and 8:
INTELLIGENT SYSTEM FOR LEARNERS’
- Page 9 and 10:
LEARNER 1GROUP OF HUMAN AGENTSLEARN
- Page 11 and 12:
QuantityQuantityFigure 6. Distribut
- Page 13 and 14:
LEARNERStructure of theconcept mapL
- Page 15 and 16:
WEB-BASED INTELLIGENT TUTORING SYST
- Page 17 and 18:
materials to be presented and which
- Page 19 and 20:
INFORMATION TECHNOLOGIES AND E-LEAR
- Page 21 and 22:
correspondence with the course aim
- Page 23 and 24:
projects and through IT. Hence, it
- Page 25 and 26:
APPLICATION OF MODELING METHODS IN
- Page 27 and 28:
can support configuration managemen
- Page 29 and 30:
The EKD is one of the Enterprise mo
- Page 31 and 32:
CHANGES TO TRAINING AND PERSPECTIVE
- Page 33 and 34:
or an end, yet none of these attitu
- Page 35 and 36:
make decisions. It cannot be volunt
- Page 37 and 38:
logs), data and video conferencing
- Page 39 and 40:
Ability to follow user’s multi-ta
- Page 41 and 42:
CONCLUSIONSEDUSA method gives us a
- Page 43 and 44:
in successful SD. Given this situat
- Page 45 and 46:
SPATIAL INFORMATIONFor the visualis
- Page 47 and 48:
MOBILE TECHNOLOGIES USE IN SERVICES
- Page 49 and 50:
learning environment (Learning Mana
- Page 51 and 52:
ago only some curricula on Logistic
- Page 53 and 54:
The Web-based version can be access
- Page 55 and 56:
Web-portal, which incorporates diff
- Page 57 and 58:
DO INTELLIGENT OBJECTS AUTOMATICALL
- Page 59 and 60:
Table 1. Examples for introducing R
- Page 61 and 62:
workable influencing of the process
- Page 63 and 64:
are handed over to the objects and
- Page 65 and 66:
• Basic processes, such as wareho
- Page 67 and 68:
THE ECR E-COACH: A VIRTUAL COACHING
- Page 69 and 70:
participating in the workshops and
- Page 71 and 72:
• Assessment modules enable indiv
- Page 73 and 74:
with pictures and illustrated graph
- Page 75 and 76: ECR Question Banknumber category su
- Page 77 and 78: educational programme that follows
- Page 79 and 80: DEVELOPMENT OF WEB BASED GRAVITY MO
- Page 81 and 82: These results of a model require a
- Page 83 and 84: CONCLUSIONSThe main goal of work ha
- Page 85 and 86: dimension and included within any o
- Page 87 and 88: • Resources sharing by providing
- Page 89 and 90: Pursuant to the guidelines of elect
- Page 91 and 92: tariffs of regulated services have
- Page 93 and 94: INFORMATION TECHNOLOGY FOR MOTIVATI
- Page 95 and 96: difficult to predict when and for w
- Page 97 and 98: Listeners' workon the WebListenersS
- Page 99 and 100: PERSPECTIVES OF WEB PAGE AND E-MAIL
- Page 101 and 102: INCREASE IN THE NUMBER OF INTERNETU
- Page 103 and 104: tourism accommodations (home pages
- Page 105 and 106: interactive relationships with clie
- Page 107 and 108: • The data obtained by the resear
- Page 109 and 110: Central Statistical Bureau of Latvi
- Page 111 and 112: departures for 1995 are taken from
- Page 113 and 114: 120100maximumworldminimum806040200-
- Page 115 and 116: 140120maximumworldminimum1008060402
- Page 117 and 118: would be a promising extension. Cur
- Page 119 and 120: AN OVERVIEW OF THE AGENT − BASED
- Page 121 and 122: Suitability for social system simul
- Page 123 and 124: 6. MASONDescription:MASON is a fast
- Page 125: Suitability for social system simul
- Page 129 and 130: (for 10 repeat &| CCar[]->runfor);P
- Page 131 and 132: • Streaming audio• Collaboratio
- Page 133 and 134: NECESSITY OF NEW LAYERED APPROACH T
- Page 135 and 136: Up to now, there has only been limi
- Page 137 and 138: aaaaa6= −aa2,1 = − a0,3226= −
- Page 139 and 140: ∂ u∂x∂ u∂y2 2+ b = 02 2wher
- Page 141 and 142: a6,3= −2030a4,5−130a4,3- - - -
- Page 143 and 144: 0,10,20,30,4( )Mag x y y Ge wx2, =
- Page 145 and 146: Example 1. To understand better the
- Page 147 and 148: Therefore, further the following co
- Page 149 and 150: SOLUTION OF THE THREE-DIMENSIONALEQ
- Page 151 and 152: Mag1, m , m , m1 2 3= mm1 m2m32 2 2
- Page 153 and 154: MagMag0, m , m , m1 2 31, m , m , m
- Page 155: CONCLUSIONSThe basic content of thi