Ngu nghia cua chuong trinh logic 1 gioi thieu

9 100 0
Ngu nghia cua chuong trinh logic 1 gioi thieu

Đang tải... (xem toàn văn)

Thông tin tài liệu

The semantics of constraint logic programs Ngữ nghĩa chương trình logic có ràng buộc Abstract Tóm tắt The Constraint Logic Programming (CLP) Scheme was introduced by Ja€ar and Lassez The scheme gave a formal framework, based on constraints, for the basic operational, logical and algebraic semantics of an extended class of logic programs This paper presents for the first time the semantic foundations of CLP in a self-contained and complete package The main contributions are threefold First, we extend the original conference paper by presenting definitions and basic semantic constructs from first principles, giving new and complete proofs for the main lemmas Importantly, we clarify which theorems depend on conditions such as solution compactness, satisfaction completeness and independence of constraints Second, we generalize the original results to allow for incompleteness of the constraint solver This is important since almost all CLP systems use an incomplete solver Third, we give conditions on the (possibly incomplete) solver which ensure that the operational semantics is con¯uent, that is, has independence of literal scheduling constraint solver: Trình giải (“chương trình giải” hợp lí hơn) operational semantics: Ngữ nghĩa thủ tục (đa số tác giả khác dùng từ “ngữ nghĩa tác vụ”) Phương pháp lập trình logic có ràng buộc (CLP) Jaffar Lassez đưa Phương pháp dựa ràng buộc, đưa chương trình khung hình thức cho ngữ nghĩa đại số logic, tác vụ lớp mở rộng chương trình logic Lần đầu, báo giới thiệu sở ngữ nghĩa CLP dạng gói độc lập hoàn chỉnh Bài báo bổ sung thêm ba điểm Thứ nhất, mở rộng báo hội nghị ban đầu cách đưa vào định nghĩa cấu trúc ngữ nghĩa từ nguyên lý ban đầu, chứng minh hoàn chỉnh cho bổ đề Quan trọng nhất, làm rõ định lí phụ thuộc vào điều kiện chẳng hạn tính compact nghiệm, đầy đủ thõa mãn độc lập ràng buộc Thứ hai, tổng quát hóa kết ban đầu có tính đến chưa hoàn thiện chương trình giải ràng buộc Điều quan trọng đa số hệ CLP dùng chương trình giải không hoàn chỉnh Thứ ba, đưa điều kiện cho chương trình giải (có thể không hoàn chỉnh) đảm bảo ngữ nghĩa tác vụ suy biến (hay hợp lưu), tức phụ thuộc vào lập trình chữ (hay lập trình theo nghĩa đen, lập trình theo ngữ nghĩa) Introduction 1.Giới thiệu The Constraint Logic Programming (CLP) Scheme was introduced by Ja€ar and Lassez [8] The scheme gave a formal framework, based on constraints, for the basic operational, logical and algebraic semantics of an extended class of logic programs This framework extended traditional logic programming in a natural way by gener-alizing the term equations of logic programming to constraints from any pre-defined Phương pháp lập trình logic có ràng buộc (CLP) đưa Jaffar Lassez [8] Dựa ràng buộc, phương pháp đưa chương trình khung hình thức cho ngữ nghĩa đại số logic, tác vụ lớp mở rộng chương trình logic Chương trình khung mở rộng lập trình logic truyền thống theo cách tự nhiên cách tổng quát hóa phương trình số hạng lập trình logic cho ràng buộc từ computation domain Di€erent classes of constraints give rise to di€erent program-ming languages with di€erent areas of application Since then there has been consid-erable interest in the semantics and implementation of CLP languages, in part because they have proven remarkably useful, for systems modeling and for solving complex combinatorial optimization problems [11,20] miền tính toán định nghĩa trước Các lớp ràng buộc khác làm nảy sinh ngôn ngữ lập trình khác với phạm vi ứng dụng khác Bởi nên có quan tâm đáng kể đến ngữ nghĩa thực thi ngôn ngữ CLP, phần chúng có ích cho việc mô hình hóa hệ thống giải toán tối ưu tổ hợp phức [11,20] CLP languages have a rich semantic theory which generalizes earlier research into semantics for logic programs In the context of logic programs, van Emden and Ko-walski [4] gave a simple and elegant fixpoint and model theoretic semantics for def-inite clause logic programs based on the least Herbrand model of a program Apt and van Emden [1] extended this work to establish the soundness and completeness of the operational semantics (SLD resolution) with respect to success and to charac-terize finite failure Clark [2] introduced the program completion as a logical seman-tics for finite failure and proved soundness of the operational semantics with respect to the completion Ja€ar et al [9] proved completeness of the operational semantics with respect to the completion Together these results provide an elegant algebraic, fixpoint and logical semantics for pure logic programs The book of Lloyd [17] pro-vides a detailed introduction to the semantics of logic programs Fixpoint: điểm bất động (điểm bất động, điểm mốc hay điểm cố định thôi) Các ngôn ngữ CLP có lí thuyết ngữ nghĩa phong phú, tổng quát hóa nghiên cứu trước thành ngữ nghĩa cho chương trình logic Trong khuôn khổ chương trình logic, van Emden Ko-walski [4] đưa điểm mốc đơn giản tinh tế ngữ nghĩa lí thuyết mô hình cho chương trình logic mệnh đề xác định dựa mô hình Herbrand nhỏ chương trình Apt van Emden [1] mở rộng công trình để thiết lập thành công tính đắn hoàn chỉnh ngữ nghĩa tác vụ (phân giải SLD) xác định lỗi hữu hạn Clark [2] hoàn chỉnh chương trình dạng ngữ nghĩa logic cho lỗi hữu hạn chứng minh tính đắn ngữ nghĩa logic phần bổ sung Jaffar cộng [9] chứng minh tính đầy đủ ngữ nghĩa tác vụ phần bổ sung Các kết cung cấp phép toán đại số tinh tế, điểm mốc ngữ nghĩa logic cho chương trình logic túy Sách Lloyd [17] giới thiệu chi tiết ngữ nghĩa chương trình logic One natural generalization of logic programs is to allow di€erent uni®cation mechanisms in the operational semantics Such a generalization was welcomed since it promised the integration of the functional and logical programming paradigms Ja€ar et al [10] generalized the theory of pure logic programs to a logic program-ming scheme which was parametric in the underlying equality theory, and proved that the main semantic results continued to hold However, the theory of logic pro-grams with equality was still not powerful enough to handle logic languages which provided more than equations In particular, Prolog II [3] provided inequations over the rational trees Ja€ar and Stuckey [13] showed that the standard semantic results still held for Prolog II in the presence of inequations The CLP Scheme generalized these two strands of work to provide a scheme over arbitrary constraints which could be equations, inequations or whatever Somewhat surprisingly, the key results for the logic programming semantics continue to hold in this much more general set-ting Indeed, as we shall show, presenting the standard logic programming results in terms of CLP actually results in a more direct and elegant formalization and pro-vides deeper insight into why the results hold for logic programming Sự tổng quát hóa tự nhiên chương trình logic cho phép chế hợp khác ngữ nghĩa tác vụ Một tổng quát hóa hoan nghênh hứa hẹn tích hợp mô hình lập trình chức logic Jaffar cộng [10] tổng quát hóa lí thuyết chương trình logic túy cho phương pháp lập trình logic tham số lí thuyết phương trình bản, chứng minh kết ngữ nghĩa Tuy nhiên, lí thuyết chương trình logic với đẳng thức chưa đủ mạnh để xử lí chương trình logic cung cấp nhiều chương trình Đặc biệt, Prolog II [3] cung cấp bất phương trình hữu tỉ Jaffar Stuckey [13] chứng tỏ kết ngữ nghĩa tiêu chuẩn Prolog II có bất phương trình Phương pháp CLP tổng quát hóa hai phần công trình để đưa Phương pháp ràng buộc tùy ý phương trình, bất phương trình hay thứ Khá ngạc nhiên, kết then chốt ngữ nghĩa lập trình logic tiếp tục thiết lập tổng quát hóa nhiều Thực sự, chứng minh, đưa vào kết logic lặp trình tiêu chuẩn theo CLP thực dẫn đến hình thức luận trực tiếp tinh tế giúp hiểu sâu kết cho lập trình logic This paper presents for the ®rst time the semantic foundations of CLP in a selfcontained and complete package The original presentation of the CLP scheme was in the form of an extended abstract [8], referring much of the technical details, including all formal proofs, to an unpublished report [7] The conference paper of Maher [18] provided a stronger completeness result Subsequent papers on CLP semantics have either been partial in the sense that they focus on certain aspects only, or they have been informal, being part of a tutorial or survey Indeed, Ja€ar and Ma-her's comprehensive survey of CLP [11] did not present the semantics in a formal way, nor include any important proofs The main contributions of the present paper are: Trước hết, báo đưa vào sở ngữ nghĩa CLP dạng gói độc lập hoàn chỉnh Ban đầu, Phương pháp CLP đưa dạng báo cáo tóm tắt mở rộng [8], đề cập đến nhiều chi tiết kỹ thuật, bao gồm tất chứng minh hình thức, báo cáo chưa xuấn [7] Bài báo hội nghị Maher [18] cung cấp kết hoàn chỉnh mạnh Các báo ngữ nghĩa CLP cục bộ, tức họ tập trung vào khía cạnh đó, không thức, phần giảng khảo sát Thực sự, khảo sát hoàn chỉnh Jaffar Maher CLP [11] không đưa vào ngữ nghĩa dạng hình thức, không đề cập đến chứng minh quan trọng Các đóng góp báo sau: We extend the original conference papers by presenting de®nitions and basic semantic constructs from ®rst principles, with motivating discussions and examples, and give new and complete proofs for the main lemmas Importantly, we clarify which theorems depend on conditions such as solution compactness, satisfaction completeness and independence of constraints Chúng mở rộng báo hội nghị ban đầu cách đưa vào định nghĩa cấu trúc ngữ nghĩa từ nguyên lý thứ nhất, trọng thảo luận ví dụ, đưa chứng minh hoàn chỉnh bổ đề Quan trọng là, làm rõ định lí phụ thuộc vào điều kiện chẳng hạn tính compact nghiệm, đầy đủ thõa mãn độc lập ràng buộc We generalize the original results to allow for incompleteness of the constraint solver This is important since almost all CLP systems use an incomplete solver Chúng tổng quát hóa kết ban đầu có tính đến chưa hoàn thiện chương trình giải ràng buộc Điều quan trọng đa số hệ CLP dùng chương trình giải không hoàn chỉnh We give conditions on the (possibly incomplete) solver which ensure that the operational semantics is con¯uent, that is, has independence of literal scheduling Chúng đưa điều kiện cho chương trình giải (có thể không hoàn chỉnh) đảm bảo ngữ nghĩa tác vụ suy biến (hay hợp lưu), tức không phụ thuộc vào lập trình theo nghĩa đen A synopsis is as follows In Section we introduce the notions of constraints, solvers and constraint domains In Section the operational semantics of CLP is in-troduced, together with breadth-®rst derivations In Section 4, soundness and com-pleteness results for successful derivations are derived Also, two ®xpoint semantics are introduced In Section we give soundness and completeness results for ®nite failure Section summarizes our main results and relates them to the standard re-sults for logic programming Also, two ®xpoint semantics are introduced.: câu chưa dịch soundness and completeness: cần đủ “soundness and com-pleteness results” phải dịch “các kết cần đủ” ????? Thường nghe nói “ điều kiện cần đủ” lại nói “các kết cần đủ” Nội dung báo sau Trong phần giới thiệu khái niệm ràng buộc, chương trình giải vùng ràng buộc Trong phần 3, ngữ nghĩa tác vụ CLP giới thiệu, với suy diễn theo chiều rộng Trong phần 4, kết đắn hoàn chỉnh suy luận thành công rút Trong phần 5, đưa kết đắn hoàn chỉnh lỗi xác định Phần tóm tắt kết làm rõ mối quan hệ chúng với kết tiêu chuẩn lập trình logic ... giải toán tối ưu tổ hợp phức [11 ,20] CLP languages have a rich semantic theory which generalizes earlier research into semantics for logic programs In the context of logic programs, van Emden and... provide an elegant algebraic, fixpoint and logical semantics for pure logic programs The book of Lloyd [17 ] pro-vides a detailed introduction to the semantics of logic programs Fixpoint: điểm bất động... promised the integration of the functional and logical programming paradigms Ja€ar et al [10 ] generalized the theory of pure logic programs to a logic program-ming scheme which was parametric

Ngày đăng: 29/08/2017, 14:56

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan