RiDE.L – programming language

Научная статья

Информатика, кибернетика и программирование

Kosenko IMM UrB RS USU Yekterinburg With time ti is getting hrder to develop softwre for highperformnce computing HPC; the min reson for tht is the complexity grow of hrdwre rchitectures mthemticl models dt structures nd lgorithms complexity which re pplied in lrge computtions. The lnguges with clssicl compiler rchitectures trditionlly used in HPC: C C FORTRN Pscl – re not so good t hndling tht complexity s lter lnguges: Hskell JvScript Oz Ruby. The best in tht Hskell GHC even when breking hrmonious syntx nd semntic...



12 KB

0 чел.

RiDE.L – programming language

Ì.Î. Bakhterev, V.V. Kosenko

IMM UrB RAS, USU, Yekaterinburg

With time ti is getting harder to develop software for high-performance computing (HPC); the main reason for that is the complexity grow of hardware architectures, mathematical models, data structures and algorithms complexity, which are applied in large computations.

The languages with classical compiler architectures traditionally used in HPC: C, C++, FORTRAN, Pascal – are not so good at handling that complexity as later languages: Haskell, JavaScript, Oz, Ruby. But these language systems do not allow to create programs, which could be executed effectively enough. The best in that, Haskell GHC, even when breaking harmonious syntax and semantic constructions, designed for optimization, are used in sources, generates binary programs yielding in terms of execution speed and memory usage to ones generated by C++. It is known, that C++ surpasses Haskell GHC at least in 2 times by these parameters, when programs calculating the same function are compared.

Attempts to extend classic compilers with abstractions originating from new programming languages are made: C++0x, C#, Java. But they lead to excessive complication of the already nontrivial syntax and semantics of the languages being extended. And that makes substantially harder to use and to support these tools.

Hence, it is task of current importance to develop the language possesses the set of features providing effective programming as well as effective execution of resulting programs. Requirements for such a language was formulated during the work on operating system kernel, but their fulfillment may result in instrument, which will be useful for HPC software development too. It seems that combination of following features is necessary.

1. Basic syntax and semantic should be simple and uniform as much as possible.

2. The language should allow to write programs in imperative paradigm.

3. There should be possible in language to work with closures, to overload and to particularize operators.

When developing OS kernel or HPC software that allows to describe algebraic data types in handy way (the experience shows, this technique is more comfortable than templates in C++). Also at HPC software it is possible with the help of closures to provide runtime code specialization, which is useful   when attempting to gain maximum performance. And at that closures are able to provide such specialization under programmer's control, as it might be done in `C, in contrast to transparent methods  possibly not matching the features of task being solved,  which are used at .Net and Java virtual machines.

4. The language should provide tools for machine-dependent data type description. In the works on both the OS and HPC software such tools give ability to optimize code for execution on the processors with specific architecture.

5. The definition of new control flow constructions should be possible within the language. When developing OS it could be used to create abstractions easing the description of error handling code sequences. And when developing HPC software that feature could be applied e.g. to implement the version of for operator optimized to fit specific supercomputer architecture, or to implement some operator running computational kernels (special programs are held in view) during stream processing.

 It has been managed to design the language fulfilling the requirements. Moreover, the architecture of RiDE.L has turned out to be simple. It is expression language syntactically simple and trivial, in general. The semantic of expressions is defined by simple algorithm, which replace parts of expression tree with implementations of corresponding overloaded operators. That cannot be done without some basic predefined primitives. But it has turned out, that it was enough to implement at semantic base the small number of simple constructions (below ten) designed for abstract work with types, expressions and operator overloading.

Despite its basic simplicity, RiDE.L allows to handle such nontrivial constructions as following.

int i; int j; future(int) array(M * N) retvals; int allisok;

for (((i; j) ={in} range(0; N - 1) * range(0; N - 1)) &&
(ok = 1; ok)) (
retvals.(i * j) = matrixmul 'A.%1 B.%2 : R.%1.%2 = R'(i; j) |
 grep 'success'

for ((allisok = 1; i = 0); i < M * N && allisok; i += 1)
allisok &&= wait(retvals.i) && retvals.i.value == 0);

if (allisok) () or (print 'ERROR')

The given code describes the launching and gathering output from naive parallel multiplication of two matrices AB. The description is given in terms of distributed computations framework, adopted in OS being developed. In that code constructions: int, future, array, range, for, if-or, ={in} – are not elements of basic RiDE.L semantic, but they might be implemented at library level.

By now several several main RiDE.L translator components have been implemented, and in future the its operational prototype will be completed. The prototype should let to test hypotheses about flexibility, expressive power and comfort of suggested approaches to compiler design.


А также другие работы, которые могут Вас заинтересовать

60467. Подорожуємо Англією 401 KB
  Скажіть в яких країнах розмовляють цією мовою Учні називають англомовні країни А чи знаєте ви де ж вперше пролунали слова англійською мовою тобто де ж виникла англійська мова...
  Цель: Расширить знания детей об освобождении родного края от немецко-фашистских захватчиков, формировать активную жизненную позицию, воспитывать патриотизм и уважение к защитникам Родины.
60469. Моя Батьківщина - Україна 120.5 KB
  Обладнання: картини рідної природи; карта України; символи України; вишиваний рушник колосся і калина; назви народних символів; картки з прислівями назви сторінок усного журналу.
60470. «Україно, квіте любий, сонячная руто…» (Україна у житті та творчості зарубіжних поетів) 101.5 KB
  Володимир Маяковський про Україну 13 січня 1924 року в газеті Пролетарська правда що виходила у Києві було надруковано оголошення: Товаришу Маяковський Робітничі кореспонденти чекають на вас у своєму клубі 13 січня о 1 годині дня. 21 квітня 1845 року він пішов на військову службу.
60472. Усний журнал «Краса в імені твоїм» 95.5 KB
  Мета: ознайомити присутніх із тим, як виникли імена, пояснити значення й походження найпоширеніших жіночих і чоловічих імен; розвивати у студентів артистичні здібності, дикцію, правильність вимови; виховувати повагу до рідкісних імен.
60473. У світі цікавої інформатики (усний журнал) 387 KB
  Мета: підвищити інтерес студентів до вивчення основ інформатики; формування навичок використання засобів сучасних інформаційно комунікаційних технологій; розвинути навички самостійної роботи за комп’ютером...
60474. Сценарій свята зустрічі птахів 66 KB
  Шановне зібрання Ми присутні з вами на святі зустрічі птахів. Сьогодні на святі ви почуєте багато цікавої інформації красивих віршів і висловів про птахів. Зустрічайте юних поетів з віршами про птахів.