Information Technology Reference
In-Depth Information
overcome the search problem caused by uncertainty. Constraint propagation is
also a technology to reduce uncertainty. From language representation view, we
think that uncertain part should be explicitly marked out and limited to data part.
By this way, the data relevance can be identified, and the data domain can be
operated, which thus make constraint propagation and intelligent backtracking
used to reduce uncertainty and search space. Meantime, such regular structure
improves the readability of the code and make language studying easy so that
special search technology such as constraint propagation and intelligent
backtracking can be used. The logic programming language Prolog takes
inductive proof method of Horn clause, a technology of tentative solving, as
unified computing mechanism. Although Prolog is simple, it is very difficult to
use.
In constraint reasoning system COPS, constraint programming language COPS
combines object-oriented technology, logic programming, production system and
constraint representation together. COPS absorbs basic forms of object-oriented
programming language, applies constraint propagation and heuristic mechanism
into solving, combines declarative constraint representation and type hierarchy
together and realizes structural knowledge encapsulation(Shi 1996). COPS
language has the following characteristics:
–
Combine type hierarchy and constraint representation together;
–
Realize default constraint reasoning;
–
Realize conditional constraint and other part of regular programming;
–
Realize effective constraint reasoning.
1. Constraint and Rule
A constraint is a predicate expression:
P(t 1 , ,t n )
Where,
is a predicate
symbol and predicate can be internal function such as sum, times, eq
(equal) ,neq(not equal) ,ge(great than or equal to) ,gt(great than) ,which can also
be defined by users.
Conditional constraint has the following forms:
t 1 ,
…,
t n are items ,which typically includes variable;
P
if {
condition 1 : constraint 1 ;
···
condition n : constraint n
}
Search WWH ::




Custom Search