1 / 12

Diagram Understanding

Diagram Understanding. by Victor Dubinsky. Two-box Example. Figure 1. The box on the right is heavy. Boston Temperature (Days/F). JIProlog - Java Internet Prolog. JIPExtend jipe = new JIPExtend(); JIPEngine engine = jipe.engine; engine.consultFile("2DCartisianDataPlot.pl");.

yardan
Download Presentation

Diagram Understanding

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. Diagram Understanding by Victor Dubinsky

  2. Two-box Example Figure 1. The box on the right is heavy.

  3. Boston Temperature (Days/F)

  4. JIProlog - Java Internet Prolog JIPExtend jipe = new JIPExtend(); JIPEngine engine = jipe.engine; engine.consultFile("2DCartisianDataPlot.pl");

  5. Two-box Example Figure 1. The box on the right is heavy.

  6. Coded Two-box Example jipe.addTerm("box(a)."); jipe.addTerm("small(a)."); jipe.addTerm("box(b)."); jipe.addTerm("large(b)."); jipe.addTerm("left(a)."); jipe.addTerm("right(b)."); jipe.addTerm("heavy(X):- box(X),large(X).");

  7. /* is_A(X,time) defines several relationships, /* saying that they are of type time. is_A(seconds,time). is_A(minutes,time). is_A(hours,time). is_A(days,time). is_A(weeks,time). is_A(months,time). is_A(quarters,time). is_A(years,time). is_A(decades,time). is_A(centuries,time). /* temperature. is_A(f,temperature). is_A(c,temperature). /* distance. is_A(km,distance) /* Two Dimentional Cartesian Data Plot. is_A(xyPlot,twoDCartesianDataPlot). /* Definition of type_Of(X,Y) relationship. type_Of(X,Y):-is_A(X,Y). /* Definition of a generic temperature graph. temperatureGraph(A):-graph(A),graphType(A,X), type_Of(X,twoDCartesianDataPlot), graphX(A,Y), type_Of(Y,time), graphY(A,Z), is_A(Z,temperature). /* Definition of a temperature graph with degrees Celcius. degreeCTemperatureGraph(A):-temperatureGraph(A),graphY(A,c). Temperature Graph Model

  8. /* Specifies a XY graph with Minutes on X-axis and /* F-degrees temperature on Y-axsis. graph(minutes_F). graphType(minutes_F, xyPlot). graphX(minutes_F,minutes). graphY(minutes_F,f). /* Specifies a XY graph with Minutes on X-axis and /* C-degrees temperature on Y-axsis. graph(minutes_C). graphType(minutes_C,xyPlot). graphX(minutes_C,minutes). graphY(minutes_C,c). /* Specifies a XY graph with Hours on X-axis and /* Kilometers on Y-axsis. grapth(minutes_km). graphType(minutes_km,xyPlot). graphX(minutes_km,hours). graphY(minutes_km,km). Coded Temperature Graphs

  9. Temperature Graphs Queries /* Queries for generic temperature graphs and Degree Celcius graph. ?- temperatureGraph(X). ?- degreeCTemperatureGraph(X).

  10. Boston Temperature (Days/F)

  11. Execution of the Queries // JIPTerm query = this.addQuery("?- heavy(a)."); engine.addEventListener(jipe); engine.setTrace(true); JIPTerm[] queries = new JIPTerm[3]; // queries[1] = (JIPTerm)jipe.termParser.parseTerm("?- heavy(X)."); // queries[0] = (JIPTerm)jipe.termParser.parseTerm("?- temperatureGraph(X)."); // queries[0] = (JIPTerm)jipe.termParser.parseTerm("?- type_Of(X,time)."); queries[0] = (JIPTerm)jipe.termParser.parseTerm("?- degreeCTemperatureGraph(X)."); for (int i = 0; (i < queries.length) && (queries[i] != null); i++) { synchronized(engine) { int nQueryHandle; nQueryHandle = engine.openQuery(queries[i]); } }

  12. Questions?

More Related