Visual Prolog

Visual Prolog sebelumnya dikenal sebagai PDC Prolog dan Turbo Prolog merupakan bahasa pemrograman prolog yang berorientasi objek. Sebelumnya, Turbo Prolog dipasarkan oleh Borland, tetapi saat ini produk tersebut dikembangkan serta dipasarkan oleh perusahaan asal Denmark, Prolog Development Center, yang sejatinya merupakan perusahaan yang mengembangkan Turbo Prolog. Visual Prolog dapat digunakan untuk membuat aplikasi berbasis grafis untuk sistem operasi Microsoft Windows, aplikasi konsol, berkas pustaka .dll, dan program berbasis CGCI. Copyright C Erlando OS. All rights reserved. Windows, dan akses database melalui ODBC. Visual Prolog merupakan bahasa pemrograman yang dikompilasi, dan bukan diinterpretasikan oleh sebuah interpreter.

Sejarah versi

Sejak versi 6.0 bahasa prolog telah mendukung secara penuh pemrograman berorientasi objek.

Versi 7.0 membawa serta fitur polimorfisme parametrik.

Versi 7.2 memperkenalkan predikat anonim, serta namespace.

Versi 7.3 memperkenalkan kelas generik serta interface.

Contoh menara hanoi

Berikut ini merupakan contoh program Menara Hanoi yang diimplementasikan menggunakan bahasa pemrograman prolog.

class hanoi
   predicates 
       hanoi: (unsigned N). 
end class hanoi
 
implement hanoi
   domains 
       pole = string. 
 
   clauses 
       hanoi(N):- move(N, "left", "centre", "right"). 
 
   class predicates 
       move: (unsigned N, pole A, pole B, pole C). 
   clauses 
       move(0, _, _, _):- !. 
       move(N, A, B, C):- 
           move(N-1, A, C, B), 
           stdio::writef("move a disc from % pole to the % pole\n", A, C), 
           move(N-1, B, A, C). 
end implement hanoi
 
goal
   console::init(), 
   hanoi::hanoi(4).


Bacaan lanjutan

Lihat pula

Referensi

Pranala luar

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.