RSS

DE-BUG-GING

23 Sep

bug via shutterstock

Ada beberapa kontroversi mengenai asal-usul istilah “debugging.”

Istilah “bug” dan “debugging” keduanya populer dikaitkan dengan Admiral Grace Hopper pada 1940-an.  Sementara ia bekerja pada Mark II Komputer di Harvard University, rekan-rekannya menemukan ngengat terjebak dalam sebuah relay dan dengan demikian menghambat operasi, dimana ia mengatakan bahwa mereka “debug” sistem.

 

 

beberapa istilah dalam debugging -logic error :  ( sori, bahasanya campur aduk english-indonesia, belum sempet translate, ;p  soalnya deskripsi ini ringkasan dari berbagai sumber. silahkan diterjemahkan sendiri ^_^)

Arithmetic overflow

  1. Kondisi saat hasil kalkulasi melebihi tipe data
  2. Kondisi saat mengacu bilangan yg lebih besar dari media penyimpanan

Contohnya:

  1. Var c1,c2,c3 à  int

C1*c2 dimana c1 atau c2 mrpk bilangan yg sangat besar. Shg hasil dari c3 tidak dapat di assign karena melebihi limit bil integerArray mengacu ke index 10, padahal array hanya ada sampai 9

Arithmetic underflow  

The term arithmetic underflow (or “floating point underflow”, or just “underflow”) is a condition in a computer program that can occur when the true result of a floating point operation is smaller in magnitude (that is, closer to zero) than the smallest value representable as a normal floating point number in the target datatype. Underflow can in part be regarded as negative overflow of the exponent of the floating point value. For example, if the exponent part can represent values from −128 to 127, then a result with absolute value less than 2−127 may cause underflow (assuming that the exponent −128 is reserved for values like 0 which have no “normal” representation).

Runtime error

A run-time error is detected after or during the execution a program, whereas a compile-time error is detected by the compiler before the program is ever executed. Type checking, storage allocation, and even code generation and code optimization may be done at compile-time or upon a run-time, depending on the language and compiler.

DEBUGGING TECHNIQUE :

Static analysis

Static program analysis is the analysis of computer software that is performed without actually executing programs built from that software (analysis performed on executing programs is known as dynamic analysis)[1] In most cases the analysis is performed on some version of the source code and in the other cases some form of the object code. The term is usually applied to the analysis performed by an automated tool, with human analysis being called program understanding, program comprehension or code review.

Some of the implementation techniques of formal static analysis include:

  • Model checking considers systems that have finite state or may be reduced to finite state by abstraction;
  • Data-flow analysis is a lattice-based technique for gathering information about the possible set of values;
  • Abstract interpretation models the effect that every statement has on the state of an abstract machine (i.e., it ‘executes’ the software based on the mathematical properties of each statement and declaration). This abstract machine over-approximates the behaviours of the system: the abstract system is thus made simpler to analyze, at the expense of incompleteness (not every property true of the original system is true of the abstract system). If properly done, though, abstract interpretation is sound (every property true of the abstract system can be mapped to a true property of the original system).[6] The Frama-c framework and Polyspace heavily rely on abstract interpretation.
  • Use of assertions in program code as first suggested by Hoare logic. There is tool support for some programming languages (e.g., the SPARK programming language (a subset of Ada) and the Java Modeling Language — JML — using ESC/Java and ESC/Java2, ANSI/ISO C Specification Language for the C language).

ASSERTION

An assertion may be used to verify that an assumption made by the programmer during the implementation of the program remains valid when the program is executed. For example, consider the following Java code:

 int total = countNumberOfUsers();

 if (total % 2 == 0) {

     // total is even

 } else {

     // total is odd and non-negative

     assert(total % 2 == 1);

 }

In Java, % is the remainder operator (or modulus) — if its first operand is negative, the result can also be negative. Here, the programmer has assumed that total is non-negative, so that the remainder of a division with 2 will always be 0 or 1. The assertion makes this assumption explicit — if countNumberOfUsers does return a negative value, the program may have a bug.

 
3 Komentar

Ditulis oleh pada 23/09/2011 in algoritma-struktur data

 

Tag: ,

3 responses to “DE-BUG-GING

  1. Maulana Ibrahim

    23/09/2011 at 04:37

    awalnya kan bug itu karena benar2 ada “bug” atau serangga kecil di dlm komputer yang mengganggu kinerja komp. trusnya istilah tsb digunakan oleh programmer untuk pengistilahan celah atau ruang error pd program. just info thx

     
    • nirma

      24/09/2011 at 12:18

      iya betull… kan udah saya tulis tuh di paragraf paling atas ^_^

       
  2. Jim

    17/10/2015 at 19:48

    Makasih atas infonya , Aerith

     

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

 
%d blogger menyukai ini: