کد مقاله کد نشریه سال انتشار مقاله انگلیسی نسخه تمام متن
6871053 681508 2015 20 صفحه PDF دانلود رایگان
عنوان انگلیسی مقاله ISI
Automatic validation for binary translation
ترجمه فارسی عنوان
اعتبار خودکار برای ترجمه باینری
ترجمه چکیده
ترجمه باینری یک روش مهم برای انتقال برنامه ها است زیرا اجازه می دهد که کد باینری برای یک پلت فرم برای اجرای دیگری اجرا شود. این است که به طور گسترده ای در ماشین های مجازی و شبیه سازی استفاده می شود. با این حال، پیاده سازی یک مترجم باینری صحیح (و کارآمد) هنوز هم بسیار دشوار است، چرا که بسیاری از جزئیات ظریف باید با هوشمندانه رفتار شود. به صورت دستی تعیین دستورالعمل های نادرست در یک برنامه کاربردی مشکل است، به ویژه هنگامی که برنامه بزرگ است. بنابراین، ابزار اعتبار سنجی خودکار به صورت فوری برای شناسایی مشکلات پنهان در یک مترجم باینری مورد نیاز است. ما ابزار اعتبار جدیدی برای مترجمان باینری ایجاد کردیم. در ابزار اعتبار سنجی ما، کد دودویی اصلی و کد دودویی ترجمه شده به طور همزمان اجرا می شود. هر دو نسخه از کد باینری به طور مداوم حالت های معماری و مقادیر ذخیره شده خود را، که مقادیر ذخیره شده در سلول های حافظه، به یک فرایند سوم، اعتبار سنج، ارسال می کنند. از آنجا که اغلب دستورالعملهای نادرست در هنگام اجرای حکومت نادرست معماری می باشند، اعتبار سنج ما می تواند دستورالعمل های نادرست تر منتشر شده توسط یک مترجم باینری را با مقایسه وضعیت های معماری مربوطه بدست آورد. حالت های مربوط به معماری ممکن است به علت (1) اشتباه ترجمه، (2) طرح بندی های مختلف (اما صحیح) حافظه، و (3) مقادیر بازگشتی از تماس های سیستم خاص متفاوت باشد. نیاز به تمایز میان سه منبع تفاوت، دولت های معماری را بسیار دشوار و غیرممکن می کند. در اعتبار سنجی ما، مراقبت های ویژه ای را برای ایجاد پوسته های حافظه دقیقا همان و ایجاد تماس های سیستم مربوطه همیشه دقیقا همان مقادیر در اصل و در باینری ترجمه شده بازگردانده می شود. بنابراین، هر اختلاف در حالت های مربوط به معماری نشان می دهد دستورالعمل های نادرست منتشر شده توسط مترجم باینری است. علاوه بر حل مشکلات مربوط به معماری-دولتی، ما همچنین روش های متعددی برای سرعت بخشیدن اعتبار خودکار پیشنهاد می کنیم. اولین روش بلوک اعتبار سنجی است که تعدادی اعتبارسنجی را در حین حفظ صحت اعتبار سنجی در سطح آموزش کاهش می دهد. دوم اعتبار سنجی سریع است، که اعتبار بسیار سریع را در هزینه اطلاعات دقیق تر خطا فراهم می کند. اعتبار سنج ما را می توان به مترجمان باینری مختلف استفاده کرد. در آزمایش ما اعتبار سنج موفق به تایید برنامه های ترجمه شده با مترجمان باینری استاتیک، پویا و ترکیبی شده است.
موضوعات مرتبط
مهندسی و علوم پایه مهندسی کامپیوتر نظریه محاسباتی و ریاضیات
چکیده انگلیسی
Binary translation is an important technique for porting programs as it allows binary code for one platform to execute on another. It is widely used in virtual machines and emulators. However, implementing a correct (and efficient) binary translator is still very challenging because many delicate details must be handled smartly. Manually identifying mistranslated instructions in an application program is difficult, especially when the application is large. Therefore, automatic validation tools are needed urgently to uncover hidden problems in a binary translator. We developed a new validation tool for binary translators. In our validation tool, the original binary code and the translated binary code run simultaneously. Both versions of the binary code continuously send their architecture states and the stored values, which are the values stored into memory cells, to a third process, the validator. Since most mistranslated instructions will result in wrong architecture states during execution, our validator can catch most mistranslated instructions emitted by a binary translator by comparing the corresponding architecture states. Corresponding architecture states may differ due to (1) translation errors, (2) different (but correct) memory layouts, and (3) return values of certain system calls. The need to differentiate the three sources of differences makes comparing architecture states very difficult, if not impossible. In our validator, we take special care to make memory layouts exactly the same and make the corresponding system calls always return exactly the same values in the original and in the translated binaries. Therefore, any differences in the corresponding architecture states indicate mistranslated instructions emitted by the binary translator. Besides solving the architecture-state-comparison problems, we also propose several methods to speed up the automatic validation. The first is the validation-block method, which reduces the number of validations while keeping the accuracy of instruction-level validation. The second is quick validation, which provides extremely fast validation at the expense of less accurate error information. Our validator can be applied to different binary translators. In our experiment, the validator has successfully validated programs translated by static, dynamic, and hybrid binary translators.
ناشر
Database: Elsevier - ScienceDirect (ساینس دایرکت)
Journal: Computer Languages, Systems & Structures - Volume 43, October 2015, Pages 96-115
نویسندگان
, , , , ,