Download Negation and Control in Prolog by Lee Naish (auth.) PDF

By Lee Naish (auth.)

Show description

Read Online or Download Negation and Control in Prolog PDF

Best nonfiction_5 books

Wolf to the Slaughter (Chief Inspector Wexford Mysteries)

It used to be greater than a inn, this nameless room on a secluded aspect road of a small state city. No sign up to signal, no questions requested, and for 5 greenbacks a guy may have 3 hours of undisturbed, illicit lovemaking. Then one night a guy with a knife grew to become the affection nest right into a dying chamber.

A night in the Netherhells - (The third book in the Ebenezum series)

The realization to the mystical Ebenezum trilogy. "Gardener skewers all of the cliches of quest-fantasy with wit, type, mordant irony and nice glee-this sequence might have been serialized in nationwide Lampoon or filmed by means of one of many Pythons! " (Spider Robinson)

Additional resources for Negation and Control in Prolog

Example text

Wait declarations are represented as sets of arguments that may be constructed. each pair L, of unifiable clause heads and recursive calls do if the head is as general as the call then terminate with failure else for-each argument/, less general in the head do add a wait declaration to wait group L, with 0 in argument I and 1 in all other arguments end-for end-if end-for Allwaits = { W [ W is the intersection of one wait from each group} Waits = { W [ W ~ Allwaits ^ V V ( V E Allwaits ~ W 4sV)} This can be implemented simply in PROLOG.

Attends(S, U) :- stud_unit(S, U). attends(L, U) :- lect__unit(L, U). 9--priority(stud_unit(100, 10), 500). % priority(lect_ unit(8, 10), 10). 9__priority(classtime(10, 25), 30). The times each person is busy can be computed as follows: busy(P, T). class_time(U, T), attends(P, U). ~- attends(P, U) & class_time(U, T). +-- stud_unit(P, U) & class_time(U, T). & class_time(U, T), stud_unit(P, U). At this point, the delayed calls are analysed, with reference to the priority declarations. Class time has fewer solutions (30 compared to 500), and it is resumed first.

Other factors, such as the varying cost of unification, may also be worth considering. The main principle, however, is that information in priority declarations can be used to estimate the number of solutions to each call Other information, such as the form of indexing, can be used to estimate the cost of each caLL Combining these, we obtain a formula for the total cost of evaluating a query. By incorporating this knowledge into the computation rule, the efficiency can be greatly improved. MU-PROLOG has a facility for storing large database procedures in files [Naish 83b] and we plan to implement priority declarations also.

Download PDF sample

Rated 4.29 of 5 – based on 42 votes