کد مقاله کد نشریه سال انتشار مقاله انگلیسی نسخه تمام متن
423028 685164 2012 17 صفحه PDF دانلود رایگان
عنوان انگلیسی مقاله ISI
A Rewriting Logic Approach to Static Checking of Units of Measurement in C
موضوعات مرتبط
مهندسی و علوم پایه مهندسی کامپیوتر نظریه محاسباتی و ریاضیات
پیش نمایش صفحه اول مقاله
A Rewriting Logic Approach to Static Checking of Units of Measurement in C
چکیده انگلیسی

Many C programs assume the use of implicit domain-specific information. A common example is units of measurement, where values can have both a standard C type and an associated unit. However, since there is no way in the C language to represent this additional information, violations of domain-specific policies, such as unit safety violations, can be difficult to detect. In this paper we present a static analysis, based on the use of an abstract C semantics defined using rewriting logic, for the detection of unit violations in C programs. In contrast to typed approaches, the analysis makes use of annotations present in C comments on function headers and in function bodies, leaving the C language unchanged. Initial evaluation results show that performance scales well, and that errors can be detected without imposing a heavy annotation burden.

ناشر
Database: Elsevier - ScienceDirect (ساینس دایرکت)
Journal: Electronic Notes in Theoretical Computer Science - Volume 290, 20 December 2012, Pages 51-67