翻訳と辞書
Words near each other
・ B-Men Gahou
・ B-Method
・ B-Mobile
・ B-mode
・ B-Movie (band)
・ B-Movie (disambiguation)
・ B-Movie (DVD)
・ B-Movie Film Festival
・ B-Movie Matinee
・ B-N-acetylglucosaminyl-glycopeptide b-1,4-galactosyltransferase
・ B-Netz
・ B-Open Nordic
・ B-P Battioni e Pagani S.p.A.
・ B-P's footprint
・ B-Projekt
B-Prolog
・ B-PSA Federation of Canada
・ B-R-K
・ B-ration
・ B-Real
・ B-Reel
・ B-Robo Kabutack
・ B-Rock 99.3FM
・ B-Rock and the Bizz
・ B-roll
・ B-Room
・ B-Say-Tah, Saskatchewan
・ B-Scada
・ B-scan ultrasonography
・ B-segment


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

B-Prolog : ウィキペディア英語版
B-Prolog
B-Prolog is a high-performance implementation of the standard Prolog language with several extended features including matching clauses, action rules for event handling, finite-domain constraint solving, arrays and hash tables, declarative loops, and tabling. First released in 1994, B-Prolog is now a widely used CLP system. The constraint solver of B-Prolog was ranked top in two categories in the Second International Solvers Competition,〔(Results of the Second International Competition of CSP and Max-CSP Solvers )〕 and it also took the second place in P class in the second ASP solver competition 〔http://www.cs.kuleuven.be/~dtai/events/ASP-competition/index.shtml〕 and the second place overall in the third ASP solver competition.〔(BPSolver’s Solutions to the Third ASP Competition Problems | Association for Logic Programming )〕 B-Prolog underpins the PRISM system, a logic-based probabilistic reasoning and learning system. B-Prolog is a commercial product, but it can be used for learning and non-profit research purposes free of charge (since version 7.8 for individual users, including commercial individual users, B-Prolog is free of charge 〔http://lists.probp.com/pipermail/bp-users/2012-November/000050.html〕).
== Matching clauses ==
A matching clause is a form of a clause where the determinacy and input/output unifications are denoted explicitly. The compiler translates matching clauses into matching trees and generates indexes for all input arguments. The compilation of matching clauses is much simpler than that of normal Prolog clauses because no complex program analysis or specialization is necessary; and the generated code tends to be more compact and faster. The B-Prolog compiler and most of the library predicates are written in matching clauses.
A matching clause takes the following form:

H, G => B

where H is an atomic formula, G and B are two sequences of atomic formulas. H is called the head, G the guard, and B the body of the clause. No call in G can bind variables in H and all calls in G must be in-line tests. In other words, the guard must be flat. The following gives an example predicate in matching clauses that merges two sorted lists:

merge(,(),Zs),X Zs=(),merge(Xs,(),ZsT).
merge(Xs,(),Zs) => Zs=(),merge(Xs,Ys,ZsT).

The cons () occurs in both the head and the body of the third clause. To avoid reconstructing the term, we can rewrite the clause into the following:

merge((),Ys,Zs),Ys=(),X Zs=(),merge(Xs,Ys,ZsT).

The call Ys=() in the guard matches Ys against the pattern ().

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「B-Prolog」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.