// Copyright 2012 Damien Guichard // // Licensed under the EUPL, Version 1.1 only (the "Licence"); // You may not use this work except in compliance with the Licence. // You may obtain a copy of the Licence at: // // http://ec.europa.eu/idabc/eupl5 // // Unless required by applicable law or agreed to in writing, software // distributed under the Licence is distributed on an "AS IS" basis, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the Licence for the specific language governing permissions // and limitations under the Licence. // Code examples from the ERic tutorial documentation load "ECO.bdd". join [Cat] Place [Mat]. select [Animal] Place [Artifact]. join [Wash*w] Agent [Person I*i] w Patient i. select [Act*a] Agent [Person] a Patient [Person]. join [Woman Sarah] SpouseOf [Man John]. join [Woman Sarah] ColleagueOf [Man John]. select ([Person*x] ColleagueOf [Person*y])(x FamilyRelated y). join [Liquid Water] Property [Boil Water*b] b Limit [Celsius +100]. join [Liquid Azote] Property [Boil Azote*b] b Limit [Kelvin 77]. select [Liquid] Property [Boil*b] b Limit [Temperature]. join [Organization RedCross] Mission [Aid Humanitarian*h] [Organization RedCrescent] Mission h h Patient [People WarVictims]. select [Organization] Mission [Aid*a] a Patient [People]. join [Believe *b] Experiencer [Person:Tom] b Theme [Proposition *p] p Statement [Want *w] w Experiencer [Person:Eva*e] w Theme [Situation *s] s Description [Marry *m] m Agent e m Theme [Sailor]. select [Believe *b] Experiencer [Person] b Theme [Proposition *p] p Statement [Want *w] w Experiencer [Person*e] w Theme [Situation *s] s Description [Marry *m] m Agent e. join [Mouse*mouse] Attribute [Color:Green] [Run*run] Agent mouse run Place [Grass] run Then [Catch*catch] catch Agent [Person:I*i] catch Patient mouse catch Instrument [Tail*tail] tail PartOf mouse catch Then [Show*show] show Agent i show Experiencer [Fellow Citizen*fellows] show Then [Tell*tell] tell Agent fellows tell Experiencer i tell Theme [Proposition*prop] prop Statement [DipIn#1*dip1] dip1 Agent i dip1 Patient mouse dip1 Substance [Liquid Oil] dip1 Then [DipIn#2*dip2] dip2 Agent i dip2 Patient mouse dip2 Substance [Liquid Water] dip2 Then [Make*make] make Agent i make Theme [Snail*snail] snail Attribute [Temperature Hot] tell Then [Put#1*put1] put1 Agent i put1 Patient mouse put1 Destination [Hat*hat] [Possess *possess] Agent i possess Theme hat put1 Then [Say#1*say1] say1 Agent mouse say1 Experiencer i say1 Theme [Temperature*temp] temp Too [High] say1 Then [Put#2*put2] put2 Agent i put2 Patient mouse put2 Destination [Drawer*drawer] put2 Then [Say#2*say2] say2 Agent mouse say2 Experiencer i say2 Theme [Light*light] light Too [Low] say2 Then [Put#3*put3] put3 Agent i put3 Patient mouse put3 Destination [Trousers*trousers] possess Theme trousers put3 Then [Poo*poo] poo Agent mouse poo Repeat [Times 3]. super-type [Artifact] Mathematical. super-type [Mathematical] Graph. super-type [Graph] DiGraph EntityRelationGraph. super-type [Label] Concept Referent Relation. join [Hierarchy] Members [Concept *con] [Hierarchy] Members [Relation *rel] [Vertex *v] LabelledWith con [Edge *e] LabelledWith rel e Origin v e Destination v v Optional [Referent *r] r Case [Name] r Case [Integer] r Case [String] r Case [Reference] [Set *sv] Members v [MultiSet *se] Members e [EntityRelationGraph *g] Characteristic sv g Characteristic se. select [Set *sv] Members [Vertex *v] [MultiSet *se] Members [Edge *e] e Origin v e Destination v [Graph *g] Characteristic sv g Characteristic se. ontology [Entity] (Relation). super-type [Entity] Mortal City Date. super-type [Mortal] Human. super-type (Relation) Born Died. join [Human Socrates*s] Born [Date -470] s Born [City:Athens] s Died [Date -399]. select [Mortal*m] Relation [Entity]. load "ECO.bdd". join [Run*r] Experiencer [Teen Marty-McFly] r Substance [Time] r Instrument [Car DeLorean*d] [Mile/Hour 88] RequiredBy d d EquippedWith [Time Convector*t] t Design [Doctor Emmett-Brown] [MegaWatt 2210] RequiredBy t. select [Run*r] Substance [Time] r Instrument [Artifact*m] m EquippedWith [Time Convector*t] [Power-SI*p] RequiredBy t. join [Movie "Back To The Future"*m] Release [Date "3 July 1985"] m Origin [Country United-States] m Duration [Minute 116] m Written [Man Robert-Zemeckis*rz] m ArtDirector rz m ArtProducer [Man Steven-Spielberg] m ArtStudio [Company Amblin-Entertainment] m ArtDistributor [Corporation Universal-Pictures] m Decoration [Award Academy-Awards] m Decoration [Award Hugo-BestDramaticPresentation] m Decoration [Award Saturn-BestScienceFictionFilm] m Cost [Dollar 19000000*d19M] m Estimated d19M m Revenue [Dollar 381109710*d381M] m Exact d381M m Starring [Teen Michael-J-Fox*mjf] m Starring [Man Christopher-Lloyd*chl] mjf Acting [Teen Marty-McFly*mmf] mmf Attribute [Age 17] chl Acting [Doctor Emmett-Brown*doc] doc Attribute [NickName Doc]. select [Movie*m] Decoration [Award Academy-Awards] m Starring [Man*actor] actor Acting [Doctor*d] d Attribute [NickName Doc] [Time Convector*t] Design d [Car*c] EquippedWith t. join [Girl*g] SisterOf [Boy:Paul*b] [FireTruck*f] Attribute [Color:Red] f Place [Mat] [Play*p] Theme f p Agent g p Agent b. select [Act*a] Agent [Child] a Theme [Vehicule*v] v Attribute [Color:Red] v Place [Mat*m] [Truck] Place m.