A static analysis tool that goes beyond simple syntax checking general dịch - A static analysis tool that goes beyond simple syntax checking general Việt làm thế nào để nói

A static analysis tool that goes be

A static analysis tool that goes beyond simple syntax checking generally needs much of the power of a compiler front end so that it can base its analysis on the semantics of the program. This is because the same syntactic form can often have different interpretations based on the meanings of its constituents. For example, the expression F(N) in Ada might be (among other things) an array reference, function invocation, or type conversion.

Having access to the underlying semantics of the program allows the tool to follow every name appearing within the program back to the declaration that introduces that name, even in the presence of overloading, generic templates, or renaming. The tool will know the type of every object and every expression, and will identify where any implicit runtime checks occur. These implicit runtime checks might include a check for dereferencing a null pointer and a check for indexing outside the bounds of an array. Even languages without implicit runtime checks can define certain runtime actions to have unspecified semantics, such as an integer arithmetic overflow or an array index that is out of bounds. A static analysis tool will need to know when the language semantics allow such unspecified (and thus unpredictable) behavior.

Because of the need to include the power of a compiler front end, many static analysis tools are built on top of preexisting compiler technology for the language of interest. Unfortunately, the compiler technology chosen by the tool’s builder might be unrelated to the compiler used by the tool’s customer. When this happens, the static analysis tool might not work on the customer’s code as written.

For example, if the customer program uses compiler-specific features (such as interrupt handling or special memory-mapping facilities), then there is no guarantee that they will be supported at all, or in the same way, by the static analysis tool’s underlying compiler front end technology. Even for portable code, the customer’s compiler and the static analysis tool’s underlying technology might have different bugs or subtly different interpretations of the rules of the language. And even when the interpretations match, the commands to compile the program – the command line switches that control source code search paths, preprocessor support, and other features – might differ significantly. Thus, the build process for a complex program can be difficult to translate into a make process for performing static analysis on the program.

To address these issues, the clear solution is to integrate the advanced static analysis engine with the same compiler technology the customer is using. The static analysis engine must therefore be somewhat independent of the intermediate representation used by any particular compiler technology, so that the tool can be easily adapted to support multiple compiler front ends.

One approach is for the static analysis engine to have its own intermediate representation specifically designed to support the advanced analyses the tool performs. Adapting to support a new compiler front end requires writing a translation module that transforms the compiler’s intermediate representation (the output of the front end) to the program representation used by the static analysis engine. The translation module outputs the result into a file for later use. The intermediate language translator can either be linked to the compiler front end or run as a stand-alone program, reading the compiler’s intermediate representation, transforming it, and then writing out the analysis engine’s intermediate representation. This process is illustrated in Figure 1.
0/5000
Từ: -
Sang: -
Kết quả (Việt) 1: [Sao chép]
Sao chép!
A static analysis tool that goes beyond simple syntax checking generally needs much of the power of a compiler front end so that it can base its analysis on the semantics of the program. This is because the same syntactic form can often have different interpretations based on the meanings of its constituents. For example, the expression F(N) in Ada might be (among other things) an array reference, function invocation, or type conversion.Having access to the underlying semantics of the program allows the tool to follow every name appearing within the program back to the declaration that introduces that name, even in the presence of overloading, generic templates, or renaming. The tool will know the type of every object and every expression, and will identify where any implicit runtime checks occur. These implicit runtime checks might include a check for dereferencing a null pointer and a check for indexing outside the bounds of an array. Even languages without implicit runtime checks can define certain runtime actions to have unspecified semantics, such as an integer arithmetic overflow or an array index that is out of bounds. A static analysis tool will need to know when the language semantics allow such unspecified (and thus unpredictable) behavior.Because of the need to include the power of a compiler front end, many static analysis tools are built on top of preexisting compiler technology for the language of interest. Unfortunately, the compiler technology chosen by the tool’s builder might be unrelated to the compiler used by the tool’s customer. When this happens, the static analysis tool might not work on the customer’s code as written.For example, if the customer program uses compiler-specific features (such as interrupt handling or special memory-mapping facilities), then there is no guarantee that they will be supported at all, or in the same way, by the static analysis tool’s underlying compiler front end technology. Even for portable code, the customer’s compiler and the static analysis tool’s underlying technology might have different bugs or subtly different interpretations of the rules of the language. And even when the interpretations match, the commands to compile the program – the command line switches that control source code search paths, preprocessor support, and other features – might differ significantly. Thus, the build process for a complex program can be difficult to translate into a make process for performing static analysis on the program.To address these issues, the clear solution is to integrate the advanced static analysis engine with the same compiler technology the customer is using. The static analysis engine must therefore be somewhat independent of the intermediate representation used by any particular compiler technology, so that the tool can be easily adapted to support multiple compiler front ends.
One approach is for the static analysis engine to have its own intermediate representation specifically designed to support the advanced analyses the tool performs. Adapting to support a new compiler front end requires writing a translation module that transforms the compiler’s intermediate representation (the output of the front end) to the program representation used by the static analysis engine. The translation module outputs the result into a file for later use. The intermediate language translator can either be linked to the compiler front end or run as a stand-alone program, reading the compiler’s intermediate representation, transforming it, and then writing out the analysis engine’s intermediate representation. This process is illustrated in Figure 1.
đang được dịch, vui lòng đợi..
Kết quả (Việt) 2:[Sao chép]
Sao chép!
Một công cụ phân tích tĩnh mà đi ngoài cú pháp đơn giản kiểm tra nói chung cần nhiều sức mạnh của một trình biên dịch cuối phía trước để nó có thể căn cứ phân tích của mình về ngữ nghĩa của chương trình. Điều này là bởi vì hình thức cú pháp tương tự thường có thể có những cách hiểu khác nhau dựa trên các ý nghĩa của các thành phần của nó. Ví dụ, F biểu thức (N) trong Ada có thể (trong số những thứ khác) một mảng tham chiếu, chức năng gọi, hoặc chuyển đổi loại hình. Có truy cập vào các ngữ nghĩa cơ bản của chương trình cho phép các công cụ để theo dõi tất cả các tên xuất hiện trong chương trình trở lại đến việc khai giới thiệu tên đó, ngay cả trong sự hiện diện của quá tải, các mẫu chung chung, hoặc đổi tên. Công cụ này sẽ biết loại của mọi đối tượng và mọi biểu hiện, và sẽ xác định nơi bất kỳ kiểm tra thời gian chạy ngầm xảy ra. Những kiểm tra thời gian chạy ngầm có thể bao gồm một kiểm tra cho dereferencing một con trỏ null và kiểm tra để lập chỉ mục bên ngoài giới hạn của một mảng. Ngay cả ngôn ngữ mà không kiểm tra thời gian chạy ngầm có thể xác định các hành động thực thi nhất định để có ngữ nghĩa không xác định, chẳng hạn như một số nguyên tràn số học hay một chỉ số mảng đó là ngoài giới hạn. Một công cụ phân tích tĩnh sẽ cần phải biết khi ngữ nghĩa ngôn ngữ cho phép hành vi không xác định (và do đó không thể đoán trước) chẳng hạn. Do nhu cầu cần đưa sức mạnh của một kết thúc trình biên dịch trước, nhiều công cụ phân tích tĩnh được xây dựng trên công nghệ biên dịch từ trước cho ngôn ngữ quan tâm. Thật không may, các công nghệ trình biên dịch được lựa chọn bởi người xây dựng của công cụ có thể không liên quan đến các trình biên dịch được sử dụng bởi khách hàng của công cụ. Khi điều này xảy ra, các công cụ phân tích tĩnh có thể không làm việc trên mã của khách hàng như bằng văn bản. Ví dụ, nếu các chương trình khách hàng sử dụng các tính năng biên dịch cụ thể (chẳng hạn như việc xử lý ngắt hoặc các cơ sở bộ nhớ, lập bản đồ đặc biệt), thì không có gì đảm bảo rằng họ sẽ được hỗ trợ ở tất cả, hoặc trong cùng một cách, bởi công nghệ biên dịch kết thúc trước nằm bên dưới các công cụ phân tích của tĩnh. Ngay cả đối với mã di động, trình biên dịch của khách hàng và công nghệ cơ bản các công cụ phân tích của tĩnh có thể có lỗi khác nhau hoặc giải thích sự tinh tế của các quy tắc của ngôn ngữ. Và ngay cả khi những cách giải thích phù hợp, các lệnh để biên dịch chương trình - thiết bị chuyển mạch dòng lệnh kiểm soát nguồn con đường tìm kiếm mã, hỗ trợ tiền xử lý, và các tính năng khác - có thể khác nhau đáng kể. Như vậy, quá trình xây dựng một chương trình phức tạp có thể được khó khăn để dịch sang một quá trình làm cho việc thực hiện phân tích tĩnh trên các chương trình. Để giải quyết những vấn đề này, giải pháp rõ ràng là để tích hợp nâng cao công cụ phân tích tĩnh với các công nghệ biên dịch cùng một khách hàng là sử dụng. Do đó các công cụ phân tích tĩnh phải được phần nào độc lập của các đại diện trung gian được sử dụng bởi bất kỳ công nghệ biên dịch cụ thể, do đó công cụ này có thể dễ dàng thích nghi để hỗ trợ nhiều đầu biên dịch trước. Một cách tiếp cận là cho các công cụ phân tích tĩnh để có đại diện trung gian riêng của mình đặc biệt được thiết kế để hỗ trợ nâng cao phân tích này thực hiện công cụ. Thích ứng để hỗ trợ một trình biên dịch trước mới kết thúc yêu cầu viết một mô-đun dịch mà biến đổi đại diện trung gian của trình biên dịch (đầu ra của kết thúc trước) cho các đại diện chương trình được sử dụng bởi các công cụ phân tích tĩnh. Các mô-đun dịch xuất ra kết quả vào một tập tin để sử dụng sau. Các dịch ngôn ngữ trung gian hoặc có thể được liên kết với các trình biên dịch kết thúc trước hoặc chạy như một chương trình độc lập, đọc đại diện trung gian của trình biên dịch, chuyển nó, và sau đó viết ra đại diện trung gian các công cụ phân tích của. Quá trình này được minh họa trong hình 1.









đang được dịch, vui lòng đợi..
 
Các ngôn ngữ khác
Hỗ trợ công cụ dịch thuật: Albania, Amharic, Anh, Armenia, Azerbaijan, Ba Lan, Ba Tư, Bantu, Basque, Belarus, Bengal, Bosnia, Bulgaria, Bồ Đào Nha, Catalan, Cebuano, Chichewa, Corsi, Creole (Haiti), Croatia, Do Thái, Estonia, Filipino, Frisia, Gael Scotland, Galicia, George, Gujarat, Hausa, Hawaii, Hindi, Hmong, Hungary, Hy Lạp, Hà Lan, Hà Lan (Nam Phi), Hàn, Iceland, Igbo, Ireland, Java, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Kurd, Kyrgyz, Latinh, Latvia, Litva, Luxembourg, Lào, Macedonia, Malagasy, Malayalam, Malta, Maori, Marathi, Myanmar, Mã Lai, Mông Cổ, Na Uy, Nepal, Nga, Nhật, Odia (Oriya), Pashto, Pháp, Phát hiện ngôn ngữ, Phần Lan, Punjab, Quốc tế ngữ, Rumani, Samoa, Serbia, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenia, Somali, Sunda, Swahili, Séc, Tajik, Tamil, Tatar, Telugu, Thái, Thổ Nhĩ Kỳ, Thụy Điển, Tiếng Indonesia, Tiếng Ý, Trung, Trung (Phồn thể), Turkmen, Tây Ban Nha, Ukraina, Urdu, Uyghur, Uzbek, Việt, Xứ Wales, Yiddish, Yoruba, Zulu, Đan Mạch, Đức, Ả Rập, dịch ngôn ngữ.

Copyright ©2025 I Love Translation. All reserved.

E-mail: