Programming Patterns for Logtalk Parametric Objects
- Cite this paper as:
- Moura P. (2011) Programming Patterns for Logtalk Parametric Objects. In: Abreu S., Seipel D. (eds) Applications of Declarative Programming and Knowledge Management. INAP 2009. Lecture Notes in Computer Science, vol 6547. Springer, Berlin, Heidelberg
This paper presents a survey of programming patterns for Logtalk parametric objects. A parametric object is an object whose identifier is a compound term containing logical variables. These variables play the role of object parameters. Object predicates can be coded to depend on the parameter values. Parametric objects are a common feature of some other object-oriented logic programming languages and Prolog object-oriented extensions. Logtalk extends the usefulness of parametric objects by introducing the concept of object proxies. An object proxy is a compound term that can be interpreted as a possible instantiation of the identifier of a parametric object. Object proxies, when represented as predicate facts, allow application memory footprint to be minimized while still taking full advantage of Logtalk object-oriented features for representing and reasoning with taxonomic knowledge.
Keywordslogic programming programming patterns parametric objects object proxies
Unable to display preview. Download preview PDF.