11.8: adda/oop/frame-based type systems:
. a critical clarifier is how a frame-based subsystem
can be used by the type-checking subsystem .
def's:
. the purpose of the kb system is to support programs that are
acting on the domain as it is represented by the database .
. the type system needs to find a symbol's intended uses or roles,
and make sure it's not used in unintended ways .
web.adda/{frame lang, metaprogramming, quasiquote, Component-based}:
FLORA-2 is an advanced object-oriented knowledge base language
and application development environment.
The language of FLORA-2 is a dialect of F-logic
with numerous extensions,
including meta-programming in the style of HiLog
and logical updates in the style of Transaction Logic.
FLORA-2 was designed with extensibility and flexibility in mind,
and it provides strong support for modular software design
through its unique feature of dynamic modules.
. it's based on XSB
a Logic Programming and Deductive Database system .
a few open-source projects that use XSB:
# Flora is an object-oriented language
for building knowledge-intensive applications, which is based on the ideas of
F-Logic, HiLog and Transaction Logic.
# XMC is the main product of the Logic-based Model Checking project.
# Logtalk is an open source object-oriented logic programming language
that can make use of multi-threading.
# OpenSHORE is a hypertext repository
that stores data about and described by documents.
Access to this information is provided as hypertext.
OpenSHORE (Semantic Hypertext Object Repository)
an XML based Semantic Document Repository (SDR)
with a free definable meta model
that builds up a semantic network from sections
and relations in documents.
OpenSHORE is an hypertext repository:
The repository stores objects that appear in documents
together with their relations in the semantic net.
Hypertext navigation follows these relations
in the semantic net.
Frame-based systems represent domain knowledge. frames are a notion originally introduced by Marvin Minsky (1975)in the seminal paper"A framework for representing knowledge" .. prior to that, domain knowledge was represented byrule-based and logic-based formalisms .Minsky proposed organizing knowledge into chunks called frames.These frames are supposed to capture the essence ofconcepts or stereotypical situations,by clustering all relevant information for these situations together.Important descendants of frame-based representation formalismsare description logicsthat capture the declarative part of frames using a logic-based semantics.Most of these logics are decidable fragments of first order logicand are very closely related to other formalismssuch as modal logics and feature logics.. Minsky's 1975 ideas were evolved into FRL and KRL(Bobrow and Winograd 1977).KRL addressed almost every representational problemdiscussed in the literature.-- a very rich repertoire and almost unlimited flexibility.Features that are common to FRL, KRL, and later frame-based systems(Fikes and Kehler 1985) are:(1) frames are organized in (tangled) hierarchies;(2) frames are composed out of slots (attributes)for which fillers (scalar values, references to other frames or procedures)have to be specified or computed; and(3) properties (fillers, restriction on fillers, etc.)are inherited from superframes to subframes in the hierarchyaccording to some inheritance strategy.
. from math, a monotone function is order-preserving:x less than y impliesf(x) less than f(y),. monotonic logic is a formal logic whose consequence relationis monotonicmeaning that adding a formula to a theorynever produces a reduction of its set of consequences.Intuitively,monotonicity indicates that learning a new piece of knowledgecannot reduce the set of what is known.A monotonic logic cannot handle various reasoning taskssuch as reasoning by default(consequences may be derived only because oflack of evidence of the contrary),abductive reasoning(consequences are only deduced as most likely explanations)and some important approaches to reasoning about knowledge(the ignorance of a consequence must be retractedwhen the consequence becomes known)and similarly belief revision(new knowledge may contradict old beliefs).An example of a default assumption is that the typical bird flies.As a result, if a given animal is known to be a bird, and nothing else is known,it can be assumed to be able to fly.The default assumption must however be retracted if it is later learnedthat the considered animal is a penguin.This example shows that a logic that models default reasoningshould not be monotonic.
a clash of intuitions: the current state of nonmonotonic multiple inheritance
ijcai.org/Past%20Proceedings/IJCAI-87-VOL1/PDF/094.pdf
frame lang's are found in the context of inheritance networks. these are building relations, eg the assertion prop(x)is represented as a positive link x -> (class for which prop is true)while a complementary assertion can have a negative linknonmonotonic system permits exceptions to inherited propertieseg, neg'links can override pos'links .. the type systems of oopl's are unipolar (positive linking only) monotonicbut frame systems (eg FRL) are unipolar non-monotonic .homogeneous inheritance system (unlike hetero)are one or the other but not both of{ monotonic: all links are strict, thoroughly nonmonotonic: links are defeasible} the concern of this paper isnon-mono homo multiple inheritance systems
. a property of many logic systemsthat states that the hypotheses of any derived factmay be freely extended with additional assumptions.Any true statement in a logic with this propertycontinues to be true, even after adding new axioms.Logics with this property may be called monotonic,to differentiate them from non-monotonic logic.
. typing systems that work similarly to frame'based kb systemsare termed prototype-based languages that use delegation:the language runtime is capable of dispatching the correct methodor finding the right piece of data simply by following a series ofdelegation pointers (from object to its prototype)until a match is found.As such, the child object can continue to be modifiedand amended over time without rearranging the structure of its associated prototypeas in class-based systems.It is also important to note that not only data but also methodscan be added or changed.For this reason, most prototype-based languagesrefer to both data and methods as "slots".Metaobjects are lightweight classes that have but a single instance(the metaobject's referent)A metaobject contains an explicit reference to its referent.An object, working in tandem with a metaobject,is functionally similar to a SELF object that describes its own behavior.
. any entity that manipulates, creates, describes, or implements other objects.The object that the metaobject is about is called the base object.Some information that a metaobject might storeis the base object's type, interface, class, methods,attributes, variables, functions, control structures, etc.A metaobject protocol (MOP)is an interpreter of the semantics of a program that is open and extensible.Therefore, a MOP determines what a program meansand what its behavior is,and it is extensible in that a programmer (or metaprogrammer)can alter program behavior by extending parts of the MOP.The MOP exposes some or all internal structure of the interpreterto the programmer.The MOP may manifest as a set of classes and methodsthat allow a program to inspect the state of the supporting systemand alter its behaviour.MOPs are implemented as object-oriented programswhere all objects are metaobjects.ompiling process, but do not exist when the program is running.One of the best-known runtime MOPs is the one described in the bookThe Art of the Metaobject Protocol (often referred to as AMOP);One example use of a MOP is to alter the implementation of multiple inheritance.A recurring issue is how to resolve conflicting slots and methods of the superclasses.Typically, language designers select one solution,and language users must live with it.A metaobject protocol is one way to implement aspect-oriented programming languages.Many of the early founders of MOPs, including Gregor Kiczaleshave since moved on to be the primary advocates foraspect-oriented programming.http://en.wikipedia.org/wiki/Aspect-oriented_programmingAspects emerged out of object-oriented programming and computational reflection.AOP languages have functionality similar to, but more restricted thanmetaobject protocols.Aspects relate closely to programming concepts likesubjects, mixins, and delegation.Other ways to use aspect-oriented programming paradigms includeComposition Filtersand the hyperslices approach.Since at least the 1970s, developers have been using forms ofinterception and dispatch-patching that are similar tosome of the implementation techniques for AOP,but these never had the semantics thatthe crosscutting specifications were written in one place.Designers have considered alternative ways to achieve separation of code,such as C#'s partial types,but such approaches lack a quantification mechanismthat allows reaching several join points of the codewith one declarative statement.see alt"Subject-Oriented Programming
an object-oriented software paradigmin which the state (fields) and behavior (methods) of objectsare not seen as intrinsic to the objects themselves,but are provided by various subjective perceptions (ÒsubjectsÓ) of the objects.The term and concepts were first published in September 1993in a conference paper[1] which was later recognized as beingone of the three most influential papers to be presented at the conferencebetween 1986 and 1996[2]. As illustrated in that paper,an analogy is made with the contrast between the philosophical views of Plato and Kantwith respect to the characteristics of ÒrealÓ objects,but applied to software ones.For example, while we may all perceive a tree as having ameasurable height, weight, leaf-mass, etc.,from the point-of view of a bird,a tree may also have measures of relative value for food or nesting purposes,or from the point-of-view of a tax-assessor,it may have a certain taxable value in a given year.Neither the bird's nor the tax-assessor's additional state informationneed be seen as intrinsic to the tree,but are added by the perceptions of the bird and tax-assessor,and from Kant's analysis,the same may be true even of characteristics we think of as intrinsic.Like aspect-oriented programming,subject-oriented programming, composition filters, feature oriented programmingand adaptive methodsare considered to be aspect-oriented software development approaches.
Further advances in FOSD arose from recognizing the following facts:Every program has multiple representations(e.g., source, makefiles, documentation, etc.)and adding a feature to a program could elaborate each of its representationsso that all representations are consistent.
The language in which the metaprogram is written is called the metalanguage.The language of the programs that are manipulated is called the object language.The ability of a programming language to be its own metalanguageis called reflection or reflexivity.Having the programming language itself as a first-class data type(as in Lisp, Forth or Rebol) is also very useful.Generic programming invokes a metaprogramming facility within a language,in those languages supporting it.generative programming vs incremental compilation vs modifiable at runtime:. the compiler is a metaprogramming tool;if incremental compilation is available to a programthen metaprogramming can be performed without actually generating source code.In Lisp metaprogramming, the quasiquote operator (typically a comma)introduces code that is evaluated at program definition timerather than at run time.The metaprogramming language is thus identical to the host programming language, and existing Lisp routines can be directly reused for metaprogramming if desired.. in lisp a quote is a hard quote,meaning there is no attention payed to unquote as an escape .. the quasiquote does allow the unquote to work as an escape from quote .
Accord Programming Framework (pdf)
The Accord programming framework supports the development ofautonomic Grid applications .Accord enables runtime composition and autonomic managementof these components using dynamically defined rules.. current (2004) frameworks have interaction patternsthat can't be defined dynamically .. compon'based frameworks don't havethe context-aware self-mgt of individual compon's .. service'based models implicitly assumethat context does not change during app`lifetime .. dynamic context requires autonomic computing,capable of managing themselves using high-level ruleswith minimal human intervention.The Accord programming framework consists of 4 concepts.* an application contextthat defines a common semantic basis for the application.* the definition of autonomic componentsas the building blocks of autonomic applications.* the definition of rules and mechanisms forthe dynamic composition of autonomic components.* an agent infrastructureto support rule enforcement to realize self-managingand dynamic composition behaviors.Accord builds on the AutoMate middleware infrastructurethat provides the essential services required to supportthe development and execution of autonomic applications.( naming service,discovery service,lifecycle management service,and registration service.)
No comments:
Post a Comment