sitelogo
文法規則(grammar rules)
MINERVA superseeded IF/Prolog. Please see http://www.ifcomputer.co.jp/MINERVA for details.

We discontinued to sell IF/Prolog Dec 31. 2003. For current customers, we continue to provide professional support for IF/Prolog until Dec 31, 2008.

文法規則は以下のような記述をPrologの規則や事実に変更します。 (より詳細な記述は/ClocMel/にあります)

    sent --> sent(X).     sent(X) --> noun_p(X),verb_p(X).

    noun_p(X) --> determ(X),noun(X).     verb_p(X) --> verb(X),noun_p(Y).

    determ(_) --> [the].     noun(sing) --> [man].     noun(sing) --> [banana].     verb(sing) --> [loves].     verb(sing) --> [eats].

    noun(plur) --> [men].     noun(plur) --> [bananas].     verb(plur) --> [love].     verb(plur) --> [eat].

次のように質問すれば、インタプリタが文法規則に従って文をチェックします。

?- phrase(sent,[the,man,eats,the,bananas]).

yes ?- _


Up read on...
scroll to top managed with ubiCMS