1 / 10

Using DCGs for Large Tasks

Using DCGs for Large Tasks. Web Site Synthesis. Conventional Site Management. CISA Web site. Editor. Synthesis-based Site Management. Web site generator. Research institute ontology. CISA Web site. CISA knowledge base. Editor. Economics of Content Management.

hoai
Download Presentation

Using DCGs for Large Tasks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using DCGs for Large Tasks Web Site Synthesis

  2. Conventional Site Management CISA Web site Editor

  3. Synthesis-based Site Management Web site generator Research institute ontology CISA Web site CISA knowledge base Editor

  4. Economics of Content Management Time to benefit (3 months for CISA site) Conventional editing Effort Automated synthesis Time

  5. CISA Knowledge Base Contains facts and DCG rules like this: person('David Robertson', 'http://www.dai.ed.ac.uk/groups/ssp/members/dave.htm', [staff]). research_group('Software Systems and Processes', 'http://www.dai.ed.ac.uk/groups/ssp'). postal_address --> [ref('http://www.informatics.ed.ac.uk','Division of Informatics'), \\, ref('http://www.ed.ac.uk','University of Edinburgh'),\\, ‘Appleton Tower', \\, 'Edinburgh', \\, 'UK', \\].

  6. Site Generator gen_site :- phrase(group_site, Pages), gen_pages(Pages). gen_pages([Page|T]) :- gen_page(Page), gen_pages(T). gen_pages([]). gen_page(page(File, Terms)) :- html2terms(Chars, Terms), tell(File), put_string(Chars), told. Connects to DCG Generates HTML string Opens file Writes string to output Closes file

  7. Top-level DCG for site group_site --> {…Goals defining main page IDs and a navigator structure…}, main_pages(Main, NavTerm), {…Goals generating lists of events...}. event_pages(EventLists, NavTerm), {…Goals generating list of seminar talks…}, abstract_pages(TalksList).

  8. Generating Main Site Pages main_pages([(Type,File)|T], Navigator) --> {Page =.. [Type,Navigator,Contents,[]], call(Page)}, [page(File, Contents)], main_pages(T, Navigator). main_pages([], _) --> [].

  9. Home Page index(Navigator) --> {start_page(Start, []), phrase(home_body(Navigator), Body), style_sheet(Style, []), page_background(BGr)}, [Start, head([title('CISA Home Page'), Style]), body(BGr, Body), end]. home_body(Navigator) --> standard_heading(Navigator), group_focus, standard_foot('<hr>').

  10. …Down to Definitions Close to HTML standard_heading(Navigator) --> [ '<table width = 100%> <tr> <td> <center> <h1>Centre for Intelligent Systems and their Applications</h1> </center> </td> <td valign=top><a href="http://www.ed.ac.uk"><img src="img/logo/uoe-mono-100x100.gif" border=0 alt="UoE" name="UoE" align=right hspace=10 width=100 height=100></a> </td> </tr> </table> <p>', Navigator, \\, \\, \\].

More Related