fact: Definition AlbumSpec : ADT AlbumSig := Def ADT { rep := QueryStructure AlbumSchema, Def Constructor0 "Init" : rep := empty,, Def Method1 "AddPhoto" (r : rep) (photo : AlbumSchema#PHOTOS) : rep * bool := Insert photo into r!PHOTOS, Def Method1 "AddEvent" (r : rep) (event : AlbumSchema#EVENTS) : rep * bool := Insert event into r!EVENTS, Def Method2 "PhotosByDateRange" (r : rep) (startDate : nat) (endDate : nat) : rep * list (AlbumSchema#PHOTOS) := photos <- For (photo in r!PHOTOS) (event in r!EVENTS) Where (event!EVENT_NAME = photo!EVENT_NAME) Where (startDate <= event!DATE <= endDate) Return photo; ret (r, photos), Def Method1 "PhotosByPersons" (r : rep) (persons : list string) : rep * list (AlbumSchema#PHOTOS) := photos <- For (photo in r!PHOTOS) Where (IncludedIn persons photo!PERSONS) Return photo; ret (r, photos) }%methDefParsing.
imports: Fiat.QueryStructure.Automation.MasterPlan Fiat.QueryStructure.Specification.SearchTerms.ListInclusion Fiat.QueryStructure.Specification.SearchTerms.InRange