Accomplishable Tasks in Knowledge Representation
aa r X i v : . [ c s . A I] J un Accomplishable Tasks in KnowledgeRepresentation
Keehang Kwon and Mi-Young Park
Faculty of Computer Engineering, DongA University840 Hadan Saha, 604-714 Busan, Korea { khkwon, openmp } @dau.ac.kr Abstract
Knowledge Representation (KR) is traditionally based on the logic offacts, expressed in boolean logic. However, facts about an agent can alsobe seen as a set of accomplished tasks by the agent.This paper proposes a new approach to KR: the notion of task log-ical
KR based on Computability Logic. This notion allows the user torepresent both accomplished tasks and accomplishable tasks by the agent.This notion allows us to build sophisticated KRs about many interestingagents, which have not been supported by previous logical languages.
Keywords : tasks, knowledge representation, agents, computabilitylogic.
Traditional acquaintance with knowledge representation (KR) relates to theboolean logic including classical logic, modal logic and linear logic [3, 4]. Withinthis setting, knowledges are expressed as a logic of facts. Many KRs in AItextbooks and papers [8] have been written in boolean logic. However, booleanlogic is too simple to represent an important aspect of knowledge, i.e. , tasksthat can be accomplished by the agent. In particular, boolean logic is awkwardto use in representing accomplishable tasks by many interesting agents.It is possible to expand knowledge about an agent by employing a task/gamelogic called computability logic (CL) [6, 7], a powerful logic which is builtaround the notion of success/failure. CL is a logic of task in which accom-plishable tasks can be easily represented. Consequently, CL can express bothdeterministic (true/false) and nondeterministic task (success/failure) in a con-cise way. The task logic offers many new, essential logical operators includ-ing parallel conjunction/disjunction, sequential conjunction/disjunction, choiceconjunction/disjunction, etc .This paper proposes to use CL as an KR language. The distinguishingfeature of CL is that now knowledge about an agent include new, sophisticatedtasks that have not been supported by previous logical languages. While CL isan excellent KR language, it is based on the first-order logic. We also considerits higher-order extension where first-order terms are replaced by higher-order1erms. It is well-known that higher-order terms can describe objects of functiontypes including programs and formulas. Higher-order terms have proven usefulin many metalanguage applications such as theorem proving.The remainder of this paper is structured as follows. We discuss a newway of defining algorithms in the next section. In Section 3, we present someexamples. Section 4 concludes the paper. A task logical knowledge representation and reasoning (KRR) is of the form c : T −→ T where c : T represents an agent c who can do task T and T is a query. Inthe traditional developments of KR, T is limited to facts or accomplished tasks.Accomplishable tasks are totally ignored. In KR, however, representing accom-plishable tasks is desirable quite often. Such examples include many interestingagents including coffee vending machine, many OS processes, lottery tickets, etc .To define the class of accomplishable tasks, we need a specification language.An ideal language would support an optimal translation of the tasks. We arguethat a reasonable, high-level translation of the tasks can be achieved via com-putability logic(CL)[5, 6]. An advantage of CL over other formalisms such assequential pseudocode, linear logic[3], etc , is that it can optimally encode a num-ber of essential tasks: nondeterminism, updates, etc . Hence the main advantageof CL over other formalisms is the minimum (linear) size of the encoding.We consider here a higher-order version of CL. The logical language we con-sider in this paper is built based on a simply-typed lambda calculus. Althoughtypes are strictly necessary, we will omit these here because their identity is notrelevant in this paper. An atomic formula is ( p t . . . t n ) where p is a (predicate)variable or non-logical constant and each t i is a lambda term.The basic operator in CL is the reduction of the form c : A → B . Thisexpression means that the task B can be reduced to another task B . Theexpression c : A ∧ B means that the agent c can perform two tasks A and B in parallel. The expression ! A means that the agent can perform the task A repeatedly. The expression c : A ⊓ B means that the agent c can perform eithertask A or B , regardless of what the machine chooses. The expression c : ⊓ xA ( x )means that the agent c can perform the task A , regardless of what the machinechooses for x . The expression c : A ⊔ B means that the agent c can choose andperform a true disjunct between A and B .The expression c : ⊔ xA ( x ) means that the agent can choose a right valuefor x so that it can perform the task A . We point the reader to [6, 7] to findout more about the whole calculus of CL. The notion of CL makes KR versatile compared to traditional approach. As anexample, we present an agent c who can compute the factorial function. Thistask can be defined as follows in English:21) c can either claim that f ac (0 ,
1) holds, or(2) can replace f ac ( X, Y ) by f ac ( X + 1 , XY + Y ).It is shown below that the above description can be translated into CL formulas.The following is a CL translation of the above knowledge, where the reusableaction is preceded with !. Note that our version use ⊓ which dynamically cre-ates/destroys facts. c :! ( f ac ⊓ ⊓ x ⊓ y (( f ac x y ) → ( f ac x + 1 xy + y )).A task of answering queries is typically given in the form of a query relativeto agents. Computation tries to solve the query with respect to the agent c .As an example, executing agent c −→ ⊓ y ⊔ zf ac ( y, z ) would involve the userchoosing a value, say 5, for y . This eventually results in the initial resource f ac (0 ,
1) being created and then transformed to f ac (1 , f ac (2 , z = 120 using the secondconjucnt five times.An example of interactive, accomplishable tasks is provided by the followingagent t which is a lottery ticket. The ticket is represented as 0 ⊔ M whichindicates that it has two possible values, nothing or one million dollars.The following is a CL translation of the above agent. t : 0 ⊔ M .Now we want to obtain a final value of t . This task is represented by the query t .Now executing the program agent t −→ agent t would produce the followingquestion asked by the agent in the task of 0 ⊔ M in the program: “how much isthe final value?”. The user’s response would be zero dollars. This move bringsthe task down to 0 −→ agent t . Executing 0 −→ agent t would require themachine to choose zero dollars in 0 ⊔ M for a success.An example of parallel tasks is provided by the agent b which consists of two(sub)agents c and d working at a fastfood restaurant. The agent c waits for acustomer to pay money(at least three dollars), and then generates a hamburgerset consisting of a hamburger, a coke and a change. The agent d waits for acustomer to pay money(at least four dollars), and then generates a fishburgerset consisting of a fishburger, a coke and a change.The following is a CL translation of the above algorithm. c :! ⊓ x ( ≥ ( x, → m ( ham ) ∧ m ( coke ) ∧ m ( x − ∧ d :! ⊓ x ( ≥ ( x, → m ( f i ) ∧ m ( coke ) ∧ m ( x − c and d in parallel to obtain a hamburger set andthen a fishburger set by interactively paying money to c and d . This inter-active task is represented by the query c ∧ d . Now executing the program agent c, agent d −→ agent c ∧ agent d would produce the following questionasked by the agent in the task of c : “how much do you want to pay me?”.The user’s response would be five dollars. This move brings the task down to3 ( ham ) ∧ m ( coke ) ∧ m ($2) which would be a success. The task of d wouldproceed similarly.As an example of higher-order KR, consider the interpreter for Horn clauses.It is described by G - and D -formulas given by the syntax rules below: G ::= A | G and G | some x GD ::= A | G imp A | all x D | D and D
In the rules above, A represents an atomic formula. A D -formula is called a Hornclause. The expression some x G involves bindings. We represent such objectsusing lambda terms. For example, all x p ( x ) is represented as all λx ( p x ).In the algorithm to be considered, G -formulas will function as queries and D -formulas will constitute a program.We will present an operational semantics for this language based on [11].Note that execution alternates between two phases: the goal-reduction phaseand the backchaining phase. Following Prolog’s syntax, we assume that namesbeginning with uppercase letters are quantified by ⊓ . Definition 1.
Let G be a goal and let D be a program. Then the notion ofexecuting h D, G i – pv D G – is defined as follows:(1) bc D A A ⊓ % This is a success.(2) pv D G → bc D ( G imp A ) A ) ⊓ (3) bc D ( D X ) A → bc D ( all D ) A ⊓ (4) bc D D A ∨ bc D D A → bc D ( D and D ) A ⊓ (5) atom A ∧ bc D D A → pv D A ⊓ % change to backchaining phase.(6) pv D G ∧ pv D G → pv D ( G and G ) ⊓ (7) pv D ( G X ) → pv D ( some G ).In the rules (3) and (7), the symbol X will be instantiated by a term. In thiscontext, consider the query pv ( p a ) ( some λx ( p x )). In solving this query, pv ( p a ) ( p a ) will be formed and eventually solved.The examples presented here have been of a simple nature. They are, how-ever, sufficient for appreciating the attractiveness of the algorithm developmentprocess proposed here. We point the reader to [9, 10, 11] for more examples. Knowledge representation is traditionally based on the logic of facts, expressedin boolean logic. This paper proposed a new, task logical approach to KR. Thisapproach allows us to build sophisticated KRs about many interesting agents,which have not been supported by previous boolean logical languages.Our ultimate interest is in a procedure for carrying out computations of thekind described above. Hence it is important to realize this CL interpreter in anefficient way, taking advantages of some techniques discussed in [1, 2, 4].4
Acknowledgements
This paper was supported by Dong-A University Research Fund.
References [1] M. Banbara.
Design and implementation of linear logic programming lan-guages . Ph.D. Dissertation, Kobe University, 2002.[2] Iliano Cervesato, Joshua S. Hodas, and Frank Pfenning. Efficient resourcemanagement for linear logic proof search. In
Proceedings of the 1996 Work-shop on Extensions of Logic Programming , LNAI 1050, pages 67 – 81.[3] Jean-Yves Girard. Linear logic.
Theoretical Computer Science , 50:1–102,1987.[4] Joshus Hodas and Dale Miller. Logic programming in a fragment of intuition-istic linear logic.
Journal of Information and Computation , 1994. Invited toa special issue of submission to the 1991 LICS conference.[5] G. Japaridze. The logic of tasks.
Annals of Pure and Applied Logic , 117:263–295, 2002.[6] G. Japaridze. Introduction to computability logic.
Annals of Pure andApplied Logic , 123:1–99, 2003.[7] G. Japaridze. Sequential operators in computability logic.
Information andComputation , vol.206, No.12, pp.1443-1475, 2008.[8] K. Kwon and D. Kang. Extending Logicweb via Hereditary Harrop For-mulas.
IEICE Transactions on Information and Systems , vol.E91-D, No.6,pp.1827-1829, 2008.[9] D. Miller and G. Nadathur. 1987. A logic programming approach to manip-ulating formulas and programs. In
IEEE Symposium on Logic Programming ,S. Haridi, Ed. IEEE Computer Society Press, 379–388.[10] D. Miller and G. Nadathur. 1988. λλ