non t erminating pro cesses in the situation calculus
play

NonT erminating Pro cesses in the Situation Calculus Giusepp - PDF document

NonT erminating Pro cesses in the Situation Calculus Giusepp e De Giacomo Eugenia T erno vsk aia Dipartimen to di Informatica e Sistemistica Departmen t of Computer Science Univ ersit a di Roma La


  1. Non�T erminating Pro cesses in the Situation Calculus Giusepp e De Giacomo Eugenia T erno vsk aia Dipartimen to di Informatica e Sistemistica Departmen t of Computer Science Univ ersit� a di Roma �La Sapienza� Univ ersit y of T oron to degiacomo�dis�uniroma��it eugenia�cs�toronto�edu Ra y Reiter Departmen t of Computer Science Univ ersit y of T oron to reiter�cs�toronto�edu � In tro duction By their v ery design� man y rob ot con trol programs are non�terminating� T o giv e a simple example � one w e shall use in this pap er � an o�ce co�ee�deliv ery rob ot migh t b e implemen ted as an in�nite lo op in whic h the rob ot resp onds to exogenous requests for co�ee that are main tained on a queue� Since a future co�ee request is alw a ys p ossible� the program nev er terminates� As is the case for more con v en tional programs� w e w an t some reliabilit y assurances for rob ot con� trollers� This pap er describ es the approac h b eing tak en b y our Cognitiv e Rob otics Group to expressing and pro ving prop erties of non�terminating programs expressed in GOLOG� a high lev el logic program� ming language for mo deling and implemen ting dynamical systems� The kinds of prop erties w e ha v e in mind are traditional in computer science� liv eness� fairness� etc� W e di�er from the �classical� approac hes ��LS�� � Cou�� � MP�� �� for reasons dictated b y the follo wing c haracteristics of GOLOG� �� T o write a GOLOG program� the programmer �rst axiomatizes the primitiv e actions of the appli� cation domain� using �rst order logic� These actions ma y also include exogenous ev en ts� �� Next� she describ es� in GOLOG� the complex b eha viors her rob ot is to exhibit in this domain� This GOLOG program is in terpreted b y means of a form ula� this time in second order logic� �� Finally � a suitable theorem�pro v er executes the program� Because these features are all represen ted in classical �second order� logic� it is natural to express and pro v e prop erties of GOLOG programs� including non�terminating ones� in the v ery same logic� This approac h to program pro ofs has the adv an tage of logical uniformit y and the a v ailabilit y of classical pro of theory � It also pro vides a v ery ric h language with whic h to express program prop erties� as w e shall see in this pap er� Moreo v er� it pro vides for pro ofs of programs with incomplete initial state� the normal situation in rob otics where the agen t do es not ha v e complete information ab out the w orld it inhabits� Finally � this approac h gracefully accommo dates exogenous ev en t o ccurrences� and pro ofs of program prop erties in their presence� � F ormal Preliminaries ��� The Situation Calculus The situation calculus is a second order language sp eci�cally designed for represen ting dynamically c hang� ing w orlds� All c hanges to the w orld are the result of named actions � A p ossible w orld history � whic h is simply a sequence of actions� is represen ted b y a �rst order term called a situation � The constan t S is used to denote the initial situation � namely the empt y history � There is a distinguished binary � function sym b ol do � do � �� s � denotes the successor situation to resulting from p erforming the action � � s Actions ma y b e parameterized� F or example� put � x� y � migh t stand for the action of putting ob ject x on ob ject y � in whic h case do � put � A� B � � s � denotes that situation resulting from placing A on B when the history is s � Notice that in the situation calculus� actions are denoted b y �rst order terms� and situations �w orld histories� are also �rst order terms� F or example� do � putdow n � A � � do � w al k � L � � do � pick up � A � � S ��� � �

  2. is a situation denoting the w orld history consisting of the sequence of actions �pic kup�A�� w alk�L�� put� do wn�A��� Notice that the sequence of actions in a history � in the order in whic h they o ccur� is obtained from a situation term b y reading o� the actions from righ t to left� The situation calculus has a distin� guished predicate sym b ol Poss � the in tended meaning of P oss � a� s � is that it is p ossible to p erform the action a in situation s � Relations �functions� whose truth v alues �function v alues� v ary from situation to situation are called r elational �functional� �uents � They are denoted b y predicate �function� sym b ols taking a situation term as their last argumen t� F or example� hasC of f ee � p� s � is a relational �uen t whose in tended meaning is that p erson p has co�ee in situation s � r obotLocation � s � is a functional �uen t denoting the rob ot�s lo cation in situation s � When formalizing an application domain� one m ust sp ecify certain axioms� � A ction pr e c ondition axioms � one for eac h primitiv e action� These c haracterize the relation P oss � and giv e the preconditions for the p erformance of an action in a situation� In a rob ot co�ee deliv ery setting� suc h an axiom migh t b e� P oss � g iv eC of f ee � per son � � s � � hol ding C of f ee � s � � r obotLocation � s � � of f ice � per son � This sa ys that the preconditions for the rob ot to giv e co�ee to p erson p are that the rob ot is carrying co�ee� and the rob ot�s lo cation is p �s o�ce� � Suc c essor state axioms � one for eac h �uen t� These capture the causal la ws of the domain� together with a solution to the frame problem �Rei���� F or our co�ee deliv ery rob ot� the follo wing is an example� P oss � a� s � � � hol ding C of f ee � do � a� s �� � � � a pick upC of f ee hol ding C of f ee � s � � � � � per son � a � g iv eC of f ee � per son �� � In other w ords� pro vided the action a is p ossible� the rob ot will b e holding a cup of co�ee after action is p erformed i� is the action of the rob ot pic king up the co�ee� or the rob ot is already a a holding co�ee and a is not the action of the rob ot giving that co�ee to someone� � Unique names axioms for the primitiv e actions� stating that di�eren t names for actions denote di�eren t actions� � Axioms describing the initial situation � what is true initially � b efore an y actions ha v e o ccurred� This is an y �nite set of sen tences whic h men tion no situation term� or only the situation term S � � Examples of axioms for the initial situation for our co�ee deliv ery example are� � � � p � hasC of f ee � p� S � � r obotLocation � S � � C M � � � These ha v e the in tended reading that initially � no one has co�ee� and the rob ot is lo cated at the co�ee mac hine � C M �� See �LRL � �� � for a full description� ��� GOLOG GOLOG �LRL � �� � is a situation calculus�based logic programming language that allo ws for de�ning complex actions using a rep ertoire of user sp eci�ed primitiv e actions� GOLOG pro vides the usual kinds of imp erativ e programming language con trol structures as w ell as v arious forms of nondeterminism� Brie�y � GO LO G programs are formed b y using the follo wing constructs� �� Primitive actions� a � Do action a in the curren t situation� Actually a is a pseudo�action obtained from an action b y suppressing the situation argumen t in eac h functional �uen t� The function a � s � � that giv en a pseudo�action a and a situation s returns the original action �see �LRL �� ��� �� T est actions� � �� T est the truth v alue of expression � in the curren t situation� As for primitiv e actions� is a pseudo�form ula obtained from a situation calculus form ula b y suppressing all situation � argumen ts� The function � � s � that giv en a pseudo�form ula � and a situation s returns the original form ula� �� Se quenc e� � Execute program � follo w ed b y program � � � � � � � � � � �

Recommend


More recommend