Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

A compositional modeling language

1996, Proceedings of the 10th international workshop on qualitative reasoning about physical systems

This document describes a compositional modeling language, CML, which is a general declarative modeling language for logically specifying the symbolic and mathematical properties of the structure and behavior of physical systems. CML is intended to facilitate model sharing between research groups, many of which have long been using similar languages. These languages are based primarily on the language originally defined by Qualitative Process theory [Forbus 1984] and include the languages used for the ...

A Composi t i onal Model i ng Language Dani el Bobr ow* , Br i an Fal kenhai ner * * , AdamFar quhar #, Ri char d Fakes* , Kennet h For bus, Thomas Gr uber &, Yumi I wasaki * Xer ox Cor por at i on Pal o Al t o Resear ch Cent er 3333 Coyot e Hi l l Road Pal o Al t o, CA 94304 bobr ow@par c . xer ox . com * * Xer ox Wi l son Cent er 800 Phi l i ps Rd . , M/ S 128- 51E Webst er , NY 14580 f al ken @wr c . xer ox . co m * Knowl edge Syst ems Labor at or y Gat es Bl dg . 2A, M/ C 9020 Depar t ment of Comput er Sci ence St anf or d Uni ver si t y St anf or d, CA 94305 { axf , f akes, i wasaki ) @ksl . st anf or d. ed u $Qual i t at i ve Reasoni ng Gr oup The I nst i t ut e f or t he Lear ni ng Sci ences Nor t hwest er n Uni ver si t y 1890 Mapl e Avenue Evanst on, I L 60201 f or bus @il s . nwu . ed u 8- ' Col l oquy Syst ems I nc . 5150 El Cami no Real , Sui t e D- 21 Los Al t os, CA 94022 gr uber @col l oquy . com %Uni ver si t y of Texas at Aust i n Depar t ment of Comput er Sci ence Aust i n, TX 78712 kui per s @cs . ut exas . edu Abst r act Thi s document descr i bes a composi t i onal model i ng l anguage, CML, whi ch i s a gener al decl ar at i ve model i ng l anguage f or l ogi cal l y speci f yi ng t he symbol i c and mat hemat i cal pr oper t i es of t he st r uct ur e and behavi or of physi cal syst ems . CML i s i nt ended t o f aci l i t at e model shar i ng bet ween r esear ch gr oups, many of whi ch have l ong been usi ng si mi l ar l anguages . These l anguages ar e based pr i mar i l y on t he l anguage or i gi nal l y def i ned by Qual i t at i ve Pr ocess t heor y [ For bus 1984] and i ncl ude t he l anguages used f or t he Qual i t at i ve Physi cs Compi l er ( QPC) [ Cr awf or d 1990 ; Far quhar 1993 ; Far quhar 1994] , composi t i onal model f or mul at i on [ Fal kenhai ner 1991 ] , and t he Devi ce Model i ng Envi r onment ( DME) [ Low and I wasaki 1993] . CML i s an at t empt t o synt hesi ze and pr ovi de a cl ean r edesi gn of t hese l anguages . 1 . I nt r oduct i on Composi t i onal model i ng i s an ef f ect i ve par adi gm f or f or mul at i ng a behavi or model of physi cal syst em by composi ng descr i pt i ons of symbol i c and mat hemat i cal pr oper t i es of i ndi vi dual syst em component s . Thi s paper descr i bes Composi t i onal Model i ng Language ( CML) , whi ch i s a gener al decl ar at i ve model i ng l anguage f or r epr esent i ng physi cal knowl edge r equi r ed f or composi t i onal model i ng . CML i s i nt ended t o f aci l i t at e model shar i ng bet ween r esear ch gr oups, many of whi ch has l ong been usi ng 12 0 , Benj ami n Kui per s% QR- 96 si mi l ar l anguages . These l anguages ar e based pr i mar i l y on t he l anguage or i gi nal l y def i ned by Qual i t at i ve Pr ocess Theor y [ For bus 1984] and i ncl ude t he l anguages used f or t he Qual i t at i ve Physi cs Compi l er [ Far quhar 1994] , composi t i onal model f or mul at i on [ Fal kenhai ner 1991] , and t he Devi ce Model i ng Envi r onment [ Low and I wasaki 1993] . CML i s an at t empt t o synt hesi ze and pr ovi de a cl ean r edesi gn of t hese l anguages . The speci f i cat i on of CML has been f or mul at ed by r esear cher s i nvol ved i n t hose pr oj ect s . CML was desi gned wi t h ef f i ci ency, expr essi veness and ease of use i n mi nd . The l anguage i s r est r i ct ed enough t o al l ow ef f i ci ent i mpl ement at i on of pr ocedur es t o pr edi ct behavi or . The synt ax i s si mpl e and r eadabl e so t hat a per son f ami l i ar wi t h t he domai n wi l l be abl e t o r ead and easi l y under st and an expr essi on of knowl edge of t he domai n i n t he l anguage . The l anguage suppor t s l umped par amet er or di nar y di f f er ent i al equat i ons t hat ar e common i n engi neer i ng model i ng. Fi nal l y, t he l anguage suppor t s a var i et y of di f f er ent appr oaches t o r epr esent i ng physi cal phenomena ; i t al l ows t he def i ni t i on and use of domai n t heor i es t hat use component s, pr ocess, bond gr aphs, ki nemat i c pai r s, et c . , and al so suppor t s bot h r el at i onal and obj ect - or i ent ed speci f i cat i on st yl es . CML speci f i es a set of t op- l evel f or ms f or def i ni ng model s and an ont ol ogy of pr i mi t i ve f unct i ons, r el at i ons, and const ant s . CML i s i nt ended t o be an open, evol vi ng l anguage, of whi ch t hi s document descr i bes t he base l anguage . Var i ous ext ensi ons wi l l undoubt edl y be def i ned di f f er ent as t hey nat ur al l y ar i se i n t he cour se of i t s use by peopl e . An i mpor t ant goal i n desi gni ng t he base l anguage r easonabl y possi bl e . i s t o suppor t as much shar i ng as i s shar i ng t he cont ent of CML knowl edge f aci l i t at e Al so, t o f i l l y t r ansl at abl e t o t he knowl edge C M L i s bases, ( KI F) [ Geneser et h and Fi kes 1992] , f or m at i nt er change convent i ons est abl i shed by KI F have adopt ed we and wher ever possi bl e. 1. 1. Pat t er ns of Use A t ypi cal i mpl ement at i on suppor t i ng CML mi ght be used as f ol l ows : To pr edi ct t he behavi or of a physi cal syst em i n some domai n, knowl edge about t he physi cs of t he domai n i s capt ur ed i n a gener al pur pose domai n t heor y t hat descr i bes cl asses of r el evant obj ect s, phenomena and syst ems . The domai n t heor y of chemi cal pr ocessi ng pl ant s, f or exampl e, mi ght i ncl ude physi cal phenomena such as mass and heat f l ows, boi l i ng, evapor at i on, and condensat i on ; i t woul d al so i ncl ude chemi cal r eact i ons, t he ef f ect s of cat al yst s, and model s of component s such as r eact i on vessel s, pumps, cont r ol l er s, and f i l t er s . A domai n t heor y i n CML consi st s of a set of quant i f i ed def i ni t i ons, cal l ed model f r agment s, each of whi ch descr i bes some par t i al pi ece of t he domai n' s physi cs, such as pr ocesses ( e . g . , l i qui d f l ows) , devi ces ( e . g . , t r ansi st or s) , and obj ect s ( e . g . , cont ai ner s) . Each def i ni t i on appl i es whenever t her e exi st s a set of par t i ci pant s f or whom t he st at ed condi t i ons ar e sat i sf i ed . A speci f i c syst em or si t uat i on bei ng model ed i s cal l ed a scenar i o . A model of t he scenar i o consi st s of f r agment s t hat l ogi cal l y f ol l ow f r om t he domai n t heor y and t he scenar i o def i ni t i on . For exampl e, consi der t he si t uat i on depi ct ed i n Fi gur e 1 . A scenar i o r epr esent i ng t hi s si t uat i on woul d st at e t hat t her e i s a can cont ai ni ng some wat er pl aced over a gas heat er . I n addi t i on, t he scenar i o may al so st at e whet her or not t he gas heat er i s i ni t i al l y on, t he i ni t i al t emper at ur e and vol ume of t he wat er and so on . I n or der t o r eason about t hi s si t uat i on, t he domai n t heor y must cont ai n t he def i ni t i ons of a can, cont ai ned wat er , a gas heat er , as wel l as t he def i ni t i ons of r el evant physi cal pr ocesses such as heat f l ow and evapor at i on . The def i ni t i ons of t hese obj ect s and pr ocesses must speci f y t hei r numer i c and non- numer i c at t r i but es, such as wat er - l evel and f ame- l i t - p . The t ypes of val ues such at t r i but es t ake, f or exampl e " a numer i c, t i medependent quant i t y whose di mensi on i s l engt h" must al so be speci f i ed i n t he domai n t heor y . Once t he domai n t heor y has been const r uct ed, i t can be used t o model many di f f er ent physi cal devi ces under a var i et y of di f f er ent condi t i ons . The user speci f i es a scenar i o t hat def i nes an i ni t i al conf i gur at i on of t he devi ce, t he i ni t i al val ues of some of t he par amet er s t hat ar e r el evant t o model i ng i t , and per haps condi t i ons t hat f ur t her 1 KI F pr ovi des a st andar d encodi ng and semant i cs f or a f i r st or der l ogi c wi t h set t heor y and some mi nor ext ensi ons such as a r est r i ct ed quot e and t he abi l i t y t o r ef er t o r el at i ons di r ect l y . char act er i ze t he syst em. The CML i mpl ement at i on woul d aut omat i cal l y i dent i f y model f r agment s t hat ar e appl i cabl e i n t he scenar i o . These model f r agment s woul d be composed i nt o a si ngl e model t hat compr i ses bot h a symbol i c descr i pt i on as wel l as a set of gover ni ng equat i ons . The equat i ons may be sol ved or si mul at ed t o pr oduce a behavi or al descr i pt i on . Because t he condi t i ons under whi ch t he model f r agment s hol d ar e expl i ci t i n t he domai n t heor y, t he syst em woul d be abl e t o const r uct aut omat i cal l y addi t i onal model s t hat descr i be t he devi ce as i t moves i nt o new oper at i ng r egi ons . Fi gur e 1 : An exampl e si t uat i on wi t h a can of wat er and a heat er 1. 2. Not at i on and Synt ax The CML synt ax i s based on t he Common Li sp st andar d [ St eel e 1990] ; a sequence of char act er s i s a l egal CML expr essi on onl y i f i t i s accept abl e t o t he Common Li sp r eader wi t h st andar d set t i ngs . I n t hi s document , we wi l l adopt t he f ol l owi ng not at i onal convent i ons : Var i abl es ar e mar ked wi t h a ? pr ef i x, t o di st i ngui sh t hem f r om obj ect and r el at i on const ant s . Wher e t he synt ax al l ows f or a f i ni t e ser i es of i t ems i ndexed f r om 1 t o n, t he f i r st i t em of t he sequence i s gi ven wi t h t he subscr i pt 1 and t he r emai ni ng n1 i t ems ar e abbr evi at ed by " . . . n " . For exampl e, ( ( par t i ci pant L : t ype t 1) . . . n) i s t he not at i on f or ( ( par t i ci pant s : t ype t ype, ) . . . ( par t i ci pant n : t ype t ypezyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLK ) ) . 2. Gener al Semant i cs The goal of CML i s t o pr ovi de a common synt ax wi t h a wel l - def i ned semant i cs so t hat di f f er ent i mpl ement at i ons, wi t h di f f er ent i nt er nal r epr esent at i ons and i nf er ence pr ocedur es, wi l l be abl e t o accur at el y par se t he same domai n t heor y . The synt ax and semant i cs of CML t opl evel f or ms i s pr esent ed i n Sect i on 3 . The semant i cs of a set of CML t op - l evel f or ms i s pr ovi ded by t r ansl at i ng t hem i nt o f i r st or der l ogi c such as def i ned i n KI F, and CML i nher i t s t he l ogi c' s model - t heor et i c semant i cs . I n t hi s sect i on, we descr i be t he gener al semant i cs of r el at i ons, i ndi vi dual s and quant i t i es under l yi ng t he def i ni t i ons of t he t op- l evel f or ms . Bobr ow 13 CML suppor t s ever ywher e cont i nuous 2. 1. Quant i t i es CML i s desi gned t o model t i me- var yi ng physi cal syst ems, such as t he movement of a mechani cal devi ce or t he pr ocess of a chemi cal r eact i on . I n engi neer i ng model s, t he pr oper t i es and st at e of such syst ems ar e descr i bed by var i abl es, par amet er s, coef f i ci ent s, and const ant s . I n CML, t he t er m quant i t y encompasses t hese not i ons . A quant i t y i s ei t her a const ant or a unar y f unct i on whose ar gument i s a t i me . I n t he synt ax of CML, t i me i s l ef t as an i mpl i ci t par amet er t o t i me- dependent quant i t i es, f unct i ons, and r el at i ons . Al l non- const ant quant i t i es ar e r est r i ct ed t o have a f i ni t e number of cr i t i cal poi nt s or di scont i nuous changes over any f i ni t e i nt er val . Thi s r est r i ct i on r ul es out cer t ai n cl asses of poor l y behaved syst ems, such as osci l l at or s wi t h i nf i ni t e f r equency, t hat pose pr obl ems f or numer i c i nt egr at i on and qual i t at i ve si mul at i on t echni ques . Quant i t i es may be numer i c or non- numer i c . Nonnumer i c quant i t i es ar e si mpl y const ant s or unar y f unct i ons of t i me sat i sf yi ng t he above f i ni t e- change r equi r ement . Thei r val ues ar e unr est r i ct ed . A numer i c quant i t y i s associ at ed wi t h a si ngl e physi cal di mensi on, gi ven by t he f unct i on di mens i on. CML speci f i es a cor e set of f undament al physi cal di mensi ons : t he seven def i ned by t he Syst em I nt er nat i onal e ( mass, l engt h, t i me, char ge, t emper at ur e, amount , and l umi nosi t y) pl us a di mensi on f or di mensi onl ess number s . Real number s ar e di mensi onl ess const ant quant i t i es . CML al so pr ovi des a t op- l evel f or m t o al l ow def i ni t i on of any ot her di mensi ons . A di mensi on i s a pr oper t y t hat i s used t o di st i ngui sh i ncompat i bl e quant i t i es . Quant i t i es of t he same di mensi on can be compar ed, added, and so on . These oper at i ons ar e not def i ned f or quant i t i es of di f f er ent di mensi ons . A mat hemat i cal r el at i on hol ds on non- const ant quant i t i es i f i t hol ds on t hei r val ues at each t i me t hat t hey ar e def i ned . A numer i c t i me- dependent quant i t y i s a f unct i on of t i me whose val ues al l have t he same di mensi on . The val ue of a numer i c t i me- dependent quant i t y i s a numer i c const ant quant i t y . The magni t ude of a numer i c const ant quant i t y i s speci f i ed i n uni t s of measur e . A uni t of measur e i s i t sel f a const ant quant i t y used as a r ef er ence f or a gi ven di mensi on . For exampl e, t he met er i s a uni t of measur e f or t he l engt h di mensi on and t he second i s a uni t of measur e f or t he t i me di mensi on . The magni t ude of a const ant quant i t y depends on t he uni t i n whi ch i t i s r equest ed. The bi nar y f unct i on magni t ude maps a const ant quant i t y and a uni t of t he same di mensi on t o a r eal number . For exampl e, t he magni t ude of 12g i n gr ams i s 12 and i t s magni t ude i n ounces i s about 4 . 23 . A uni t of measur e def i nes an absol ut e scal e wi t h a 0 val ue f or quant i t i es of a par t i cul ar di mensi on . The r eal number 0 i s di mensi onl ess and t her ef or e i s di f f er ent f r om ot her quant i t i es whose magni t ude i s 0, such as 0 Newt ons or Of eet . 14 QR- 96 pi ecewi se cont i nuous quant i t i es, quant i t i es, st ep quant i t i esl , and count quant i t i esl . 2.1 .1 . Handl i ng i mpl i ci t dependence on t i me One i mpor t ant aspect of t r ansl at i ng t he semant i cs of quant i t i es i nt o l ogi c i s t he r epr esent at i on of t i me . A t i mequant i t y i s a numer i c, ever ywher e cont i nuous quant i t y whose di mensi on i s t he t i me- di mensi on . Al l t i medependent quant i t i es and r el at i ons i n CML have a t i mequant i t y as an i mpl i ci t ar gument . I n t he t r ansl at i on of CML i nt o l ogi c, t i me i s handl ed i n t hr ee st eps : 1 . Ever y t i me- dependent r el at i on i s augment ed wi t h a f i r st ar gument , whi ch must be a t i me- quant i t y . 2. Ever y t i me- dependent quant i t y, q, i s uni f or ml y t r ansl at ed wi t h t he f ol l owi ng f or m, wher e val ue- at i s a f unct i on of t wo ar gument s, a quant i t y and a t i me, and r et ur ns t he val ue of t he quant i t y at t he t i me : ( l ambda ( ?t l ) ( i f ( = ?t l ?t ) ( val ue- at q ?t i ) ) . 3 . Ever y mat hemat i cal number s ( const ant ext ended t o appl y Ever y mat hemat i cal f unct i on t hat t ypi cal l y appl i es t o quant i t i es) i s pol ymor phi cal l y t o f unct i on quant i t i es as wel l . oper at i on t hat t ypi cal l y appl i es t o number s must be ext ended si mi l ar l y . 3. Language Def i ni t i on A domai n t heor y i n CML i s a f i ni t e set ` } of t he f ol l owi ng t op- l evel f or ms : def Rel at i on f or def i ni ng l ogi cal r el at i ons . def Quant i t yFunct i on f or def i ni ng quant i t i es used i n t he domai n t heor y . def Model Fr agment f or descr i bi ng t he behavi or of model ed ent i t i es under expl i ci t l y speci f i ed condi t i ons . Model f r agment s ar e used t o descr i be phenomena t hat ar i se out of t he i nt er act i ons of a composi t e set of obj ect s ( e . g . , col l i si ons or f l ows) , or t he behavi or of a si ngl e obj ect ( e . g ., a r esi st or , pump, or val ve) . def Ent i t y f or def i ni ng pr oper t i es of per si st ent obj ect s ( e . g . , r esi st or s, cont ai ner s) . def Scenar i o f or def i ni ng i ni t i al val ue pr obl ems consi st i ng of a set of obj ect s, t hei r conf i gur at i on, and i ni t i al val ues f or t he quant i t i es t hat descr i be t hem. I n addi t i on, t he f or ms def Di mensi on, def Uni t , and def Const ant Quant i t y ar e pr ovi ded f or def i ni ng new or St ep quant i t i es ar e pi ecewi se cont i nuous quant i t i es t hat ar e const ant over ever y cont i nuous i nt er val . 2 Count quant i t i es ar e st ep quant i t i es t hat have nonnegat i ve i nt eger val ues and ar e di mensi onl ess . 3 Not e t hat such a mat hemat i cal r el at i on i s f al se when any of i t s ar gument s i s undef i ned . a Thus, i mpl ement at i ons must al l ow f or use bef or e def i ni t i on . der i ved di mensi ons, new or der i ved uni t s, and uni ver sal const ant s, r espect i vel y . The gener al synt ax of a f or m i s t he f or m i dent i f i er ( e . g ., def Quant i t yFunct i on) , f ol l owed by i t s name, f ol l owed by a ser i es of keywor d/ val ue pai r s . Some keywor ds ar e opt i onal , as i ndi cat ed by t he sur r oundi ng br acket s i n t he gr ammar ( i . e . , [ : di mensi on] ) . Wher ever a keywor d/ val ue pai r appear s, an ar bi t r ar y number of ot her , i mpl ement at i on speci f i c, keywor ds ar e al l owed . I f t he domai n t heor i es empl oyi ng such keywor ds ar e t o be por t abl e, however , t he f ol l owi ng r est r i ct i on must be sat i sf i ed . I f t he keywor ds af f ect t he behavi or al i nf er ences ent ai l ed by t he domai n t heor y, t hen t hey shoul d onl y st r engt hen or annot at e t he behavi or al i nf er ences . Thi s al l ows ot her i mpl ement at i ons t o i gnor e t he addi t i onal keywor ds and st i l l dr aw cor r ect , i f weaker concl usi ons . Domai n t heor i es t hat empl oy an ext ensi on t hat sat i sf i es t hi s cr i t er i on wi l l be shar abl e acr oss i mpl ement at i ons . The r at i onal e i s t hat var i ous gr oups wi l l want t o add f i el ds t hat f aci l i t at e expl anat i on t ool s or suppor t sof t war e engi neer i ng of l ar ge knowl edge bases ( e . g . , shor t names, aut hor s, poi nt er s t o ext ended document at i on, et c . ) . A secondar y pur pose i s t o al l ow f or l ocal ext ensi ons t o t he l anguage as t he need ar i ses, wi t hout havi ng t o change t he The i mpact such common l anguage speci f i cat i on . ext ensi ons may have on shar abi l i t y and t he semant i cs of a gi ven domai n t heor y i s not addr essed her e . I n some cases, par t i cul ar l y qual i t at i ve si mul at i on, t he added i nf or mat i on may si mpl y pr ovi de monot oni c r educt i ons i n ambi gui t y . I n ot her cases, par t i cul ar l y i n t he pr esence of a cl osed wor l d assumpt i on, t he nat ur e of t he pr edi ct ed behavi or may be f undament al l y af f ect ed . Tabl e 1 shows t he synt ax f or t he t op- l evel f or ms wi t h some exampl es . The def i ni t i ons f or t he i nt er medi at e f or ms used i n t hi s t abl e ar e gi ven i n Tabl e 2 . The f ol l owi ng sect i ons di scuss each f or m i n det ai l . 3 . 2. Quant i t y Funct i ons The def Quant i t yFunct i on f or m def i nes a f unct i on t hat maps a t upl e of obj ect s t o a quant i t y . The quant i t y i s i t sel f a f unct i on of t i me . I n addi t i on t o bei ng gl obal l y def i ned vi a def Quant i t yFunct i on, quant i t y f unct i ons may al so be def i ned wi t hi n model f r agment and ent i t y def i ni t i ons i n t he quant i t i es cl ause. The name i s a f unct i on const ant nami ng an n- ar y f unct i on t hat r et ur ns a t i me- dependent quant i t y . The xt . . . x ar e l ogi cal var i abl es . => The asent ence i s a l ogi cal sent ence t hat may ment i on t he var i abl es x i. I t may be used t o pl ace r est r i ct i ons on t he quant i t y' s val ues, or asser t t hi ngs, such as t ype i nf or mat i on, about t he xi . Di mensi on The di mens i on ex pr es s i on ( see def Di mensi on f or t he compl et e synt ax) speci f i es t he di mensi on of t he quant i t i es r et ur ned by t he quant i t y f unct i on . Non- numer i c I f non- numer i c i s t r ue, t hen t he quant i t i es r et ur ned by t he f unct i on ar e non- numer i c, ot her wi se t hey ar e numer i c . Pi ecewi se- cont i nuous I f pi ecewi se- cont i nuous i s t r ue, t hen t he quant i t i es r et ur ned by t he f unct i on ar e pi ecewi se- cont i nuous . St ep- quant i t y I f st ep- quant i t y i s t r ue, t hen t he quant i t i es r et ur ned by t he f unct i on ar e st ep- quant i t i es . Count - quant i t y I f count - quant i t y i s t r ue, t hen t he quant i t i es r et ur ned by t he f unct i on ar e di mensi onl ess count - quant i t i es . 3. 3. Model Fr agment s and Ent i t i es Thi s sect i on def i nes t he synt ax and semant i cs f or t he key CML f or ms def Model Fr agment and i t s r est r i ct ed ver si on def Ent i t y . The def Model Fr agment f or m def i nes a cl ass of 3 . 1 Rel at i ons and Funct i ons phenomena, whi ch ar e descr i bed by a set of obj ect s I n t he def Rel at i on f or m, t he symbol Name i s a gl obal i nvol ved, st at i c at t r i but es and t i me- dependent quant i t i es . I t r el at i on const ant nami ng a r el at i on of ar i t y n ; t he xi ar e al so def i nes consequences t hat hol d onl y when an i nst ance l ogi cal var i abl es, one f or each ar gument of Name. Al l uses of t he cl ass i s act i ve . The def Model Fr agment f or m may of Name i n t he domai n t heor y shoul d be consi st ent wi t h t he def i ne condi t i ons suf f i ci ent t o i mpl y t he exi st ence of an i nst ance, i n addi t i on t o t he necessar y consequences t her eof . speci f i ed const r ai nt s . The def Ent i t y f or m i s a r est r i ct ed ver si on of => The asent ence i s a l ogi cal sent ence t hat may ment i on def Model Fr agment t hat i s used f or def i ni ng pr oper t i es of t he var i abl es xi . I f pr esent , t he sent ence ( => ( Name a per si st ent obj ect t hat ar e al ways t r ue . The def Ent i t y xi . . . xn) asent ence ) i s t r ue . f or m def i nes onl y necessar y consequences of an obj ect <_> The asent ence i s a l ogi cal sent ence t hat may bei ng an i nst ance of t he cl ass, not condi t i ons suf f i ci ent t o ment i on t he var i abl es xi . I f pr esent , t he sent ence i mpl y t he exi st ence of an i nst ance . ( <=> ( Name . X( . . . xn) asent ence ) i s t r ue . The def Ent i t y and def Model Fr agment f or ms have been Funct i on I f f unct i on i s t r ue, t hen t he r el at i on Name i s a desi gned t o suppor t an obj ect - or i ent ed st yl e of def i ni ng f unct i on . That i s, t he f i r st n- 1 ar gument s t o Name domai n t heor i es . Each f or m def i nes a cl ass of obj ect s uni quel y det er mi nes t he nt h and ( Name xt . . . x zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA _1) speci f i ed by set s of st at i c at t r i but es and t i me dependent may be used as a t er m denot i ng xn. quant i t i es . These at t r i but es and quant i t i es ar e ef f ect i vel y t i me- dependent I f t i me- dependent i s t r ue, t hen Name sl ot s def i ned on i nst ances of t he cl ass . Fur t her mor e, t hese i s a t i me- dependent r el at i on and appear ances of Name cl asses may be ar r anged i n a hi er ar chy vi a t he subcl ass- of i n a CML f or m must be handl ed speci al l y . cl ause . Bobr ow 15 Synt ax Ex ampl es ( def Rel at i on Name ( XI . . . xn) [ : document at i on st r i ng ] ( def Rel at i on cont ent s ( ?x ?y) : => ( and ( cont ai ner ?x) ( cont ai ned- st uf f ?y) ) : <=> ( cont ai ned- i n ?y ?x) ) ( def Rel at i on f ahr enhei t ( ?t ?f ) : <=> ( == ?f ( : => asent ence ] ( : <_> asent ence ] [ : f unct i on bool ean ] ( - ( magni t ude ?t r anki ne) 459 . 7) ) : f unct i on t r ue) ( def Rel at i on above ( ?x ?y) : t i me- dependent t r ue ( def Quant i t yFunct i on mass ( ?x) : => ( physi cal - obj ect ?x) : di mensi on mass- di mensi on) ( def Quant i t yFunct i on densi t y ( ?x) : => ( physi cal - obj ect ?x) : di mensi on ( / mass- di mensi on ( expt l engt h- di mensi on 3) ) ) [ di me- dependent bool ean ] ) ( def Quant i t yFunct i on Name ( xI . . . xn) [ : document at i on st r i ng ] [ : => asent ence ] [ : di mensi on di mensi on expr essi on ] ( : pi ecewi se- cont i nuous bool ean ] [ : st ep- quant i t y bool ean ] [ : count - quant i t y l ean ] [ : non- numer i c bool ean ] 1 ( def Model Fr agment Name [ : document at i on st r i ng ] [ : subcl ass- of l sl . . . s] [ : par(tpi ci pant sanq ( ar t i c ant [ : t ype W e. ] ) . . . ) ] e p [ : condi t i ons condi t i ons ] [ : quant i t i es ( ( quant i t y I keywor ds 1) . . . q) ] [ : at t r i but es ( ( at t r i ut [ ape ttr el ] ) . . . [ : consequences consequences ] ) a] ( def Ent i t y Name [ : document at i on st r i ng ] [ : subcl ass- of cl ass ) . . . s] [ : quant i t i es ( ( uant i l keywor ds 1) . . . q) ] [ : at t r i but es ( ( at t r i but e) [ : t ype at t r el ] ) . . . a) ] [ : consequences consequences ] ) ( def Model Fr agment Cont ai ned- St uf f : subcl ass- of ( physi cal - obj ect ) : par t i ci pant s ( ( sub : t ype subst ance) ( ct nr : t ype f l ui d- cont ai ner ) ) : condi t i ons ( ( > ( amount - of - i n sub ct nr ) ( * 0 gr ams) ) ) : quant i t i es ( ( pr essur e : di mensi on pr essur e- di mensi on) ( mass : di mensi on mass- di mensi on) ) : consequences ( ( == mass amount - of - i n sub ct nr ) ( def Ent i t y Can : subcl ass- of ( physi cal - obj ect Cont ai ner ) : quant i t i es ( ( hei ght : di mensi on l engt h- di mensi on) ( di amet er : di mensi on l engt h- di mensi on) ( vol ume : di mensi on vol ume- di mensi on) ) : consequences ( ( == ( vol ume : sel f ) ( * PI ( expt ( / di amet er 2) 2) hei ght ) ) ) ) Tabl e 1 : Synt ax and exampl es of t op- l evel f or ms Synt ax Ex am l es ( def i mensi on Name : document at i on " i n [ : = di mensi on expr essi on ] ~ ( def Di mensi on ener gy- di mensi on ( * mass- di mensi on l engt h- di mensi on ( expt t i me- di mensi on - 2) ) ) ( def Uni C i nch ( def Uni t Name : _ ( * 2 . 54 ( * met er 0 . 01) ) ) [ : document at i on st r i ng ] [ : = quant i t y exnr essi on ] [ : di mensi on di mensi on expr essi on ] ) ( def Const ant Quant i t y Pi ( def Const ant Quant i t y Name : = ( acos - 1) ) [ : document at i on t r i n ] ( def Const ant Quant i t y Bol t zman- Const ant [ : =, ?ent i t y ex . zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA " ' on ] : = ( * 1 . 380658 ( / Joul e Kel vi n) ) ) [ : di mensi on di mensi on expr essi on ] ) ( def Scenar i o wat er - heat i ng- exampl e : document at i on " A can cont ai ni ng wat er i s pl aced di r ect l y above a gas- heat er , whi ch i s i ni t i al l y l i t . " : I ndi vi dual s ( ( C : t ype Can) ( H : t ype Gas- heat er ) ( W: t ype Cont ai ned- wat er ) ) : i ni t i al l y ( ( > ( amount - of - i n WC) ( * 0 gr ams) ) ) : t hr oughout ( ( _ ( hei ght A) ( * 0 . 2 met er ) ) ( _ ( di amet er A) ( * 0. 15 met er ) ) ( f l ame- l i t - p H t r ue) ( di r ect l y- above C H ( def Scenar i o Name [ : document at i on st r i ng ] [ : i ndi vi dual s ( ( i ndi vi dual [ : t ype t yke] ) * ) ] [ : i ni t i al l y asent ences ] [ : t hr oughout asent ences ] Tabl e 1 : cont . Addi t i onal Synt ax di mensi on expr essi on di mensi on I ( * di mensi on expr essi on +) I ( expt di mensi on expr essi on number ) I ( l di mensi on expr essi on di mensi on expr essi on) quant i t y expr essi on uni t I quant i t y I ( mat hon quant i t y expr essi on +) asent ence : : = ( and l i t er al * ) l i t er al : : = ( r el const t er m* ) I - ( ' not ( r el const t er m * ) ) Tabl e 2 : Some Addi t i onal Synt ax Name The name of t he model f r agment or ent i t y, name , i s a r el at i on const ant nami ng t he cl ass of i nst ances . Subcl ass- of The subcl ass- of cl ause al l ows a hi er ar chy t o be def i ned . Each cl ass i s t he name of a model f r agment or ent i t y def i ni t i on . An i nst ance of name i s al so an i nst ance of each super cl ass . As a consequence, al l of t he par t i ci pant , quant i t y, and at t r i but e f unct i ons def i ned f or each st eer ar e al so def i ned f or name . Par t i ci pant s The par t i ci pant s cl ause i dent i f i es t he obj ect s t hat par t i ci pat e i n t he model f r agment i nst ance . Each par t i ci pant i s a f unct i on const ant t hat names a unar y f unct i on whi ch may be appl i ed t o an i nst ance t o access t he cor r espondi ng par t i ci pant ; each I f i s a r el at i on const ant t hat names a cl ass ( unar y r el at i on) of whi ch t he par t i ci pant i s an i nst ance. Condi t i ons The condi t i ons cl ause speci f i es t he condi t i ons under whi ch an i nst ance of a model f r agment i s act i ve . I f t he condi t i ons hol d over t he speci f i ed par t i ci pant s, t hen an i nst ance of t he model f r agment exi st s wi t h t he speci f i ed quant i t i es and at t r i but es . Condi t i ons i s an i mpl i ci t conj unct i on of l i t er al s . The bi nar y r el at i ons same and di f f er ent may be used i n t he condi t i ons t o st at e t hat t wo par t i ci pant s ar e t he same or di f f er ent f r om each ot her . At t r i but es The at t r i but es cl ause may be used t o def i ne st at i c at t r i but es of an i nst ance . Each at t r i but e i s a symbol nami ng a f unct i on t hat i s t ot al l y def i ned f or i nst ances of name . The at t r i but es ar e pol ymor phi c, t hat i s, an at t r i but e of t he same name may be def i ned f or anot her unr el at ed f or m wi t h a di f f er ent t ype . Bobr ow 17 Quant i t i es The quant i t i es cl ause may be used t o l ocal l y def i ne quant i t i es t hat descr i be an i nst ance . The keywor ds ar e t he keywor d opt i ons def i ned f or def Quant i t yFunct i on, except t hat => i s not al l owed . Such i mpl i cat i ons may be pl aced i n t he consequences cl ause . The quant i t i es ar e pol ymor phi c, t hat i s, a quant i t y of t he same name may be def i ned f or anot her unr el at ed model f r agment , but have di f f er ent pr oper t i es . Nonet hel ess, quant i t y f unct i ons def i ned i n a quant i t i es cl ause must be consi st ent wi t h any of t he const r ai nt s i mposed by a def Quant i t yFunct i on def i ni t i on of t he same name . For exampl e, ent i t y def i ni t i ons Li qui d and Sand can bot h def i ne a quant i t y cal l ed Amount - of wi t h di mensi ons vol umedi mensi on and mass- di mensi on, r espect i vel y . However , i f t her e i s a separ at e gl obal def i ni t i on of Amount - of usi ng t he def Quant i t yFunct i on f or m, whi ch speci f i es t he di mensi on t o be vol umedi mensi on, t he quant i t y def i ni t i on of Amount - of i n Sand i s di sal l owed si nce i t i s i nconsi st ent wi t h t he gl obal def i ni t i on Consequences The consequences cl ause hol ds whenever an i nst ance i s act i ve . The consequences i s an i mpl i ci t conj unct i on of l i t er al s . The pr i mar y r ol e of t he consequences i s t o est abl i sh equat i ons t hat hel p t o def i ne t he behavi or of t he par t i ci pant s . I n addi t i on t o equat i ons, ot her l ogi cal r el at i ons may al so be asser t ed . 3 . 3 . 1 Synt act i c Sugar I n or der t o al l ow f or mor e conci se and r eadabl e def i ni t i ons, t he def Ent i t y and def Model Fr agment f or ms pr ovi de some synt act i c sugar . Sel f The symbol sel f may be used t o r ef er t o t he cur r ent i nst ance . Not e t hat i t may not be used i n t he condi t i ons cl ause of a model - f r agment def i ni t i on wi t h no super cl asses, as t hi s woul d pl ace i t out si de of t he scope wi t hi n whi ch t he i nst ance exi st s . Nam The user pr ovi ded symbol f or t he name of a model f r agment or ent i t y may be used i nst ead of sel f and i s compl et el y equi val ent . uant ' The symbol f or any nt i may be used t o r ef er t o t he appr opr i at e quant i t y wi t hi n t he consequences cl ause . Thi s i s compl et el y equi val ent t o t he mor e ver bose f or m ( uant i sel f ) , whi ch may al so be used . At t r i but e The symbol f or any at t r i but e may be used t o r ef er t o t he appr opr i at e at t r i but e wi t hi n t he consequences cl ause . Thi s i s compl et el y equi val ent t o t he mor e ver bose f or m ( at t r i but e sel f ) , whi ch may al so be used . Par t i ci pant I n a model f r agment def i ni t i on, t he user pr ovi ded symbol f or each par t i ci pant may be used t o r ef er t o t hat par t i ci pant . Out si de of t he condi t i ons , t he mor e ver bose f or m ( par t i ci pant sel f ) may al so be used . 18 QR- 96 3. 4. Semant i cs The f ul l semant i cs of t he CML f or ms ar e def i ned i n e pr ovi de an [ Fal kenhai ner , Far quhar et al . 1994] . W i nf or mal account of t hem her e, st ar t i ng wi t h t he si mpl er def Ent i t y f or m. The def Ent i t y f or m def i nes a cl ass of obj ect s . I f any obj ect i s a member of t he cl ass, t hen t he quant i t i es and at t r i but es def i ned i n t he f or m appl y t o i t , and t he consequences ar e t r ue f or t hem. Ent i t i es may be st r uct ur ed i nt o a hi er ar chy usi ng t he subcl ass- of cl ause ; al l quant i t i es, at t r i but es, and consequences t hat appl y t o a super cl ass al so appl y t o t he subcl ass . That i s, al l i nher i t ance i s monot oni c - t her e i s no way t o over - r i de def aul t val ues t hat ar e i nher i t ed . A def Model Fr agment f or m wi t hout any super cl asses i s al so si mpl e t o under st and . I f t he par t i ci pant s exi st and sat i sf y t he t i me- i ndependent condi t i ons, t hen an i nst ance of t he model f r agment exi st s . At any moment t hat t he t i medependent condi t i ons hol d, t he model i nst ance i s act i ve and t he consequences hol d . I f t he t i me- dependent condi t i ons do not hol d, t he consequences ar e not i mpl i ed . A def Model Fr agment f or m wi t hout super cl asses def i nes suf f i ci ent condi t i ons f or an i nst ance t o exi st . A def Model Fr agment f or m wi t h super cl asses i s somewhat mor e compl ex . I f t her e i s some obj ect t hat i s an i nst ance of al l of t he def i ni t i on' s super cl asses and t he def i ni t i on' s par t i ci pant s exi st and i t s t i me- i ndependent condi t i ons hol d, t hen t hat obj ect i s al so an i nst ance of t he def i ni t i on . Act i vi t y and consequences ar e handl ed j ust as A f or model f r agment s wi t hout super cl asses . def Model Fr agment f or m wi t h super cl asses def i nes necessar y condi t i ons f or an obj ect t o be an i nst ance . The pr evi ous par agr aphs descr i be CML as i t has been def i ned and i s consi st ent wi t h i t s pr edecessor l anguages . Thi s scheme i s ext r emel y usef ul f or pr ovi di ng addi t i onal i nf or mat i on about concr et e physi cal phenomena i n a l i br ar y . For i nst ance, a l i br ar y mi ght i ncl ude one def i ni t i on f or f l ui d- f l ow t hat hel d whenever t her e wer e t wo cont ai ner s connect ed by a por t . Subcl asses of f l ui d- f l ow mi ght i ncl ude l ami nar f l ow, t ur bul ent f l ow, and so on . Thi s scheme, however , has an i mpor t ant shor t comi ng t hat i t does not al l ow abst r act model f r agment s t o be def i ned . To under st and t hi s di f f i cul t y, consi der an exampl e of a l i br ar y of chemi cal r eact i ons . Such a l i br ar y mi ght i ncl ude model f r agment s f or bi nar y chemi cal r eact i ons, such as oxi dat i on, bet ween subst ances . Ther e ar e a f ew t hi ngs t hat can be sai d about al l bi nar y chemi cal r eact i ons such as " t her e ar e t wo di st i nct r eact ant s" . Thus, Bi nar yr eact i on, t he cl ass of al l bi nar y r eact i ons, may have t wo par t i ci pant s, React ant - 1 and React ant - 2 and a condi t i on t hat t hey ar e di st i nct . I t i s not nat ur al , however , t o speci f y f ur t her e condi t i ons under whi ch a gener i c bi nar y r eact i on occur s . Thi s i s much easi er t o say about a speci f i c chemi cal r eact i on . Oxi dat i on, a subcl ass of Bi nar yr eact i on, may have t he condi t i on t hat React ant - 1 i s an oxi dant , and React ant - 1 and React ant - 2 ar e i n cont act . Gi ven a si t uat i on i nvol vi ng t hr ee chemi cal subst ances, A, B, and C, such t hat onl y A i s an oxi dant , and A and B ar e i n cont act wi t h each ot her , one woul d expect exi st ance of onl y one bi nar y chemi cal r eact i on, whi ch i s al so an oxi dat i on r eact i on, t o be i nf er r ed . However , f r om t he semant i cs of t he model f r agment s descr i bed above, t her e woul d be si x i nst ances of abst r act bi nar y r eact i ons, one f or each possi bl e combi nar i on of A, B, and C. Al t hough t he cur r ent i nt er pr et at i on i s coher ent and l ogi cal l y consi st ent , i t poses a pr act i cal pr obl em t hat i t enabl es a l ar ge number of uni nt er est i ng model f r agment i nst ances t o be i nf er r ed . We ar e cur r ent l y consi der i ng an al t er nat e scheme t hat suppor t s abst r act model f r agment s wi t h or wi t hout super cl asses . 3. 5 . Di mensi ons, Uni t s, and Const ant s The vocabul ar y used t o descr i be quant i t i es var i es f r om one domai n t o anot her . For t hi s r eason, i t i s essent i al t o be abl e t o def i ne new di mensi ons and uni t s . Of t en, t hese wi l l be der i ved f r om t he base set of SI di mensi ons and uni t s ( e . g . , an el ect r o- magnet i c domai n t heor y mi ght def i ne a di mensi on f or magnet i c- f l ux and i t s SI der i ved uni t , t he Weber ) . I f t he new di mensi on i s r educi bl e t o ot her di mensi ons, t he di mensi on expr essi on must be pr ovi ded . The t op- l evel f or ms def Di mensi on and def Uni t pr ovi de t hi s f aci l i t y . The f or m def Const ant Quant i t y i s al so pr ovi ded f or def i ni ng gl obal named const ant s . Ever y CML i mpl ement at i on shoul d have a bui l t - i n l i br ar y of def i ni t i ons f or t he basi c SI di mensi ons and uni t s : t i me- di mensi on, l engt h- di mensi on, t emper at ur e di mensi on, mass- di mensi on, l umi nosi t y- di mensi on, char ge- di mensi on, amount - di mensi on ( usual l y measur ed i n mol es) , and di mensi onl ess . The l i br ar y shoul d al so i ncl ude t he def i ni t i ons f or t he common SI uni t s i ncl udi ng t he base uni t s, met er , ki l ogr am, second, amper e, Kel vi n, mol e, as wel l as t he der i ved uni t s Her t z, Newt on, Pascal , Joul e, Wat t , Coul omb, vol t , Far ad, ohm, Si emens, Weber , Tesl a, and Henr y . Except f or di mensi onl ess, di mensi ons ar e, by convent i on, named by af f i xi ng - di mensi on t o t he st andar d Engl i sh wor d . Thi s makes i t st r ai ght f or war d t o di st i ngui sh bet ween di mensi ons and si mi l ar l y named quant i t y f unct i ons . I f a def Uni t l acks t he = ar gument , t hen i t def i nes a f undament al uni t . A f undament al uni t def i ni t i on must have ei t her a di mensi on ( as i n t he met er exampl e) or a uant i eMr essi on , i n whi ch case t he di mensi on i s i nf er r ed f r om t hat of t he guant i t y expr essi on . I f t he expr essi on i s compl ex, i t may be mor e i nf or mat i ve t o pr ovi de t he di mensi on expl i ci t l y . The def Const ant Quant i t y f or m i s i dent i cal t o def Uni t , except t hat = must be pr ovi ded . 3. 6 . I ndi vi dual s The i ndi vi dual s cl ause speci f i es a set of named obj ect s t hat ar e assumed t o exi st i ni t i al l y . The domai n t heor y may i mpl y t he exi st ence of ot her i ndi vi dual s . The i ndi vi dual i s an obj ect const ant denot i ng an obj ect , not a r el at i on or f unct i on . I ni t i al l y The i ni t i al l y cl ause speci f i es condi t i ons t hat i ni t i al l y hol d i n t he scenar i o . I t i s an i mpl i ci t conj unct i on of l i t er al s . I t may speci f y r el at i ons bet ween quant i t i es, t i me- dependent r el at i ons, and per haps an assi gnment f or t he quant i t y t i me . Thr oughout The t hr oughout cl ause speci f i es condi t i ons t hat hol d t hr oughout t he scenar i o . I t i s a l i st of l i t er al s under an i mpl i ci t conj unct i on . Scenar i os The def Scenar i o f or m i s used f or set t i ng up pr obl ems i n whi ch t he behavi or of a syst em i s t o be pr edi ct ed f r om a set of i ni t i al condi t i ons . 4. Equat i ons CML pr ovi des a base set of mat hemat i cal f unct i ons and oper at or s t hat can be used i n t he consequences and condi t i ons of model f r agment and ent i t y def i ni t i ons as wel l as i ni t i al l y and t hr oughout cl auses of scenar i o def i ni t i ons . The mat hemat i cal f unct i ons and r el at i ons can be appl i ed t o t i me dependent var i abl es as wel l as t i me i ndependent ones . The r el at i ons on quant i t i es i ncl uded : <, <=, >=, >, ==, posi t i ve, negat i ve, zer o, i nt eger , odd, even . CML i ncl udes mat hemat i cal f unct i ons as def i ned i n t he Common Li sp st andar d ( +, - , * , / , abs, acos, acosh, asi n, asi nh, at an, at anh, cos, cosh, exp, expt , l og, max, mi n, mod, si gnum, si n, si nh, sqr t , t an, t anh) ; t he t i me der i vat i ve d/ dt ; t he qual i t at i ve r el at i ons M+, M- M+O, M- 0, Q= ; and t he composabl e equat i ons C+, C- , Qpr op+, Qpr op+O, Qpr op- 0, I +, I . The f ul l semant i cs of t hese f unct i ons and r el at i ons ar e def i ned i n [ Fal kenhai ner , Far quhar et al . 1994] . Tabl e 3 summar i zes t he der i vat i ve, qual i t at i ve const r ai nt s, and composabl e equat i ons . 5. Concl usi on I n t hi s paper , we have pr esent ed CML, t he knowl edge r epr esent at i on l anguage f or t he composi t i onal model i ng par adi gm. The mai n advant age of composi t i onal model i ng i s i t s modul ar i t y . Wr i t i ng model f r agment s, each descr i bi ng a si ngl e phenomenon, i s a much easi er t ask t han composi ng a compl et e model f or ever y possi bl e syst em and quer y . Even so, const r uct i ng such a domai n t heor y i s a subst ant i al under t aki ng . Thus, t he maj or goal of CML i s t o suppor t t he i nt er change and r euse of such t heor i es . To enabl e shar i ng of knowl edge st at ed i n CML, t he semant i cs of CML i s f ul l y def i ned i n KI F. The l anguage pr esent ed her e i s t he base l anguage of CML, whi ch al l t he i mpl ement at i ons of model i ng syst ems usi ng CML ar e expect ed t o suppor t . Var i ous ext ensi ons t o t he base l anguage wi l l undoubt edl y be needed t o accommodat e domai n- speci f i c r epr esent at i onal needs . Some of such ext ensi ons t hat we ar e consi der i ng ar e t he f ol l owi ng : Bobr ow 19 For ms Exampl es Meani ng ( d/ dt x) d/ dt x ( M+ y x) M- x ( M+0 y x) M- 0 x ( Q= x y) ( > ( d/ dt ( l ocat i on m) 0) d/ dt os m vel m ( M+ ( l evel w) ( pr essur e w) ) M- vol w ( space c ( M+0 ( l evel w) ( pr essur e w ( C+ y x) ( C- y x) ( C+ ( net c) ( i n 1 c) ) ( C- ( net c) ( out c) ) ( Qpr op+ y x) ( Qpr op- y x) ( Qpr op+ ( si ze ( dr ai n c) ) ( out c) ) ( Qpr op+0 y x) ( Qpr op- 0 y x) ( Qpr op+0 ( cur r ent w) ( conduct ance w) ) ( C* y x) x C/ ( cor r espondence y v x1 v I . . . x n v n ) ( C* ( magni f i cat i on scope) ( magni f i cat i on l ens ( cor r espondence ( l evel c) t op ( vol ume c) f ul l ) The t i me der i vat i ve of x . The t i me der i vat i ve of x i s The quant i t y y i s a i n( de) cr easi ng monot oni c f unct i on of x . Y i s a monot oni c i n( de) cr easi ng f unct i on of x, but asses t hr ough t he or i gi n . X and y and t hei r der i vat i ves have t he same si gn . A somewhat weaker st at ement t han M+O. Composabl e addi t i on and subt r act i on . X i n( de) cr ement s y . Not e t hat t hese can be mi xed wi t h ro s. Composabl e qual i t at i ve pr opor t i onal i t i es . Not e t hat t hese can be mi xed wi t h C+, C- . Qpr op+ i s equi val ent t o a C+ chai ned t o an M+ . Si mi l ar t o Qpr op, but i f al l of t he composed equat i ons on y ar e C+, C, Qpr op+0, Qpr op- 0, t hen =0 when t he x' s ar e 0. Si mi l ar t o C+, C- , but x mul t i pl i es ( di vi des) i nt o y . I f t her e i s a f unct i on f such t hat y=f ( x I . . . x n) t hen when xi =vi y=v . The xi ar e quant i t y f unct i ons, and t he vi ar e val ues. Tabl e 3 : Qual i t at i ve Rel at i ons and Composi t i onal Equat i ons Ext ensi on t o t he r epr esent at i on of quant i t i es t o i ncl ude vect or s and mat r i ces . Ext ensi on t o t he not i on of mat hemat i cal f unct i ons t o i ncl ude mat hemat i cal r el at i ons r epr esent ed by ar bi t r ar y ext er nal dat a st r uct ur es such as dat abases and f or ei gn pr ocedur es . Expansi on of t he mat hemat i cal vocabul ar y t o i ncl ude par t i al di f f er ent i al equat i ons . Gener al i zat i on of t he model f r agment r epr esent at i on t o r epr esent non- numer i c and di scont i nuous changes . Repr esent at i on of pr ocedur al speci f i cat i ons such as pr escr i bed oper at or pr ocedur es . The det ai l ed speci f i cat i on of t he synt ax and semant i cs of t he l anguage al ong wi t h di scussi ons of desi gn r at i onal e and i mpl ement at i on consi der at i ons can be f ound i n [ Fal kenhai ner , Far quhar et al . 1994] . To f aci l i t at e const r uct i on of domai n t heor i es i n CML, we have i mpl ement ed a web- based CML edi t or f or br owsi ng, cr eat i ng and edi t i ng CML domai n t heor i es . The edi t or , whi ch i s publ i cl y accessi bl e on t he W W W , pr ovi des a f ul l , di st r i but ed col l abor at i ve edi t i ng envi r onment . W e ar e al so i n t he pr ocess of i mpl ement i ng a model f or mul at i on and si mul at i on syst em, whi ch wi l l make use of t he CML l i br ar y . The syst em wi l l be al so publ i cl y accessi bl e as a ser vi ce on t he W W W . W e hope t hat t he avai l abi l i t y of t hese ser vi ces wi l l f aci l i t at e devel opment of a si gni f i cant publ i c l i br ar y of domai n t heor i es by t hi s r esear ch communi t y and t hat i t wi l l spur f ur t her r esear ch and devel opment i n t he f i el d . 20 QR- 96 Acknowl edgement The aut hor s t hank Vi j ay Sar aswat f or usef ul comment s on t he l anguage speci f i cat i ons . The r esear ch by t he aut hor s ar e suppor t ed i n par t by t he f ol l owi ng agenci es : For bus by t he Of f i ce of Naval Resear ch, Far quhar , Fi kes, Gr uber , and I wasaki by ARPA and NASA/ ARC under cont r act NAG2581 ( ARPA or der 8607) , and Kui per s by NSF gr ant s I RI 9216584 and I RI - 9504138 and by NASA gr ant s NCC 2760 and NAG2- 994 . Ref er ences Cr awf or d, J . , Far quhar , A. , and Kui per s, B. ( 1990) . PC: A Compi l er f r om Physi cal Model s i nt o Qual i t at i ve Di f f er ent i al Equat i ons . The Ei ght h Nat i onal Conf er ence on Ar t i f i ci al I nt el l i gence, Fal kenhai ner , B . , For bus, K . ( 1991) . " Composi t i onal model i ng : f i ndi ng t he r i ght model f or t he j ob . " Ar t i f i ci al I nt el l i gence 51( 1- 3) : Fal kenhai ner , B. , Far quhar , A. , Bobr ow, D. , Fi kes, R. , For bus, K. , et al . ( 1994) . CML : A Composi t i onal Techni cal r epor t KSL- 94- 16, Model i ng Language . Knowl edge Syst ems Labor at or y, St anf or d Uni ver si t y . Far quhar , A. ( 1993) . Aut omat ed Model i ng of Physi cal Syst ems i n t he Pr esence of I ncompl et e Knowl edge . Ph . D. t hesi s . Uni ver si t y of Texas at Aust i n . Far quhar , A. ( 1994) . A Qual i t at i ve Physi cs Compi l er . Pr oceedi ngs, Twel f t h Nat i onal Conf er ence on Ar t i f i ci al I nt el l i gence, Seat t l e, Washi ngt on, The AAAI Pr ess/ The MI T Pr ess . For bus, K. D. ( 1984) . " Qual i t at i ve Pr ocess Theor y . " Ar t i f i ci al I nt el l i gence 24( 1- 3) : Geneser et h, M. R. and Fi kes, R. E. ( 1992) . Knowl edge I nt er change For mat , Ver si on 3 . 0 Ref er ence Manual . Techni cal r epor t Logi c- 92- 1, St anf or d Uni ver si t y Logi c Gr oup . Low, C. M. and I wasaki , Y. ( 1993) . " Devi ce model l i ng envi r onment : an i nt er act i ve envi r onment f or model l i ng devi ce behavi our . " I nt el l i gent Syst ems Engi neer i ng 1( 2) : 115- 145 . St eel e, G. L . ( 1990) . Common Li sp : The Language . Di gi t al Pr ess . Bobr ow 21