06.08.2015 Views

New Developments in Artificial Intelligence and the Semantic Web

New Developments in Artificial Intelligence and the Semantic Web

New Developments in Artificial Intelligence and the Semantic Web

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1.4Q/A2.3.9.1 Influence modelEach Prolog program can be thought as an activecontrol flow, which has <strong>in</strong>puts <strong>and</strong> outputs on severallevels. In Figure 12 <strong>in</strong>puts (callers) are up <strong>and</strong>outputs (callees) down. Pure logic, <strong>in</strong>clud<strong>in</strong>g temporaryeffects, is <strong>in</strong> <strong>the</strong> base l<strong>in</strong>e. A vertical distancefor each <strong>in</strong>fluence type can be def<strong>in</strong>ed as follows:Com-components are <strong>the</strong> most distant l<strong>in</strong>es as wellas external actions that cannot be repeated. The mostdistant l<strong>in</strong>es are ma<strong>in</strong> <strong>in</strong>fluences, compared withside effects that are <strong>in</strong>termediate data <strong>and</strong> not among<strong>the</strong> wanted results.callerFigure 10. User <strong>in</strong>terface of JavaMaster.9 Prolog comprehensionVisual Prolog resembles Java <strong>in</strong> most <strong>in</strong>formationneeds (Sections 3 <strong>and</strong> 5). It conta<strong>in</strong>s program flows,classes, objects <strong>and</strong> dependency models. Some essentialdifferences are non-determ<strong>in</strong>ism, strong recursivenature, declarative syntax, <strong>and</strong> flow analysis.Fur<strong>the</strong>r, public attributes are not allowed <strong>and</strong> predicatesare form<strong>in</strong>g much more compact units than <strong>in</strong>methods of Java. Most of <strong>the</strong>se differences makeunderst<strong>and</strong><strong>in</strong>g easier. From <strong>the</strong> programmers po<strong>in</strong>tof-viewit would be best not to use facts, becausefacts can cause side effects, but it is not always possibleto avoid this.Underst<strong>and</strong><strong>in</strong>g side effects is essential <strong>in</strong> Prolog(Walker et al 1997). In Figure 11 <strong>the</strong>re are twocases, A <strong>and</strong> B, us<strong>in</strong>g predicates p, q <strong>and</strong> r. Predicatep causes a side effect note(X) to case A but notto B. It has direct <strong>in</strong>fluence on predicate q but not onr. Still, if r is called after q <strong>the</strong>n B is dependent ofnote <strong>in</strong>directly.Summary: The side effects can be detected completelyby symbolic analysis because <strong>the</strong> phenomen<strong>in</strong> Figure 11 is a control flow... p(X) | q(Y) | r(X,Y)assert(note(X))note(X),s(X)s(X)A: Side effects B: No side effectsFigure 11. Prolog’s side effect model.Startcallee• • •Figure 12. Prolog’s <strong>in</strong>fluence model.TargetThis model can be useful <strong>in</strong> plann<strong>in</strong>g refactor<strong>in</strong>g forVip classes.9.2 Visual Prolog applicationIn order to underst<strong>and</strong> a complete Vip applicationwe can use <strong>the</strong> follow<strong>in</strong>g ma<strong>in</strong> approaches (<strong>the</strong> relatedfigure <strong>in</strong> paren<strong>the</strong>sis):• Static: How has it been written? (F. 11)• Dynamic: How does it behave? (F. 12)• Symbolic: What are <strong>the</strong> explanations for c<strong>and</strong>idatesbetween starts <strong>and</strong> targets referr<strong>in</strong>g to ourfocus? (F. 10)The symbolic approach is <strong>the</strong> most general one. Itis pragmatic by nature. It could give us useful snapshotsfrom <strong>the</strong> user’s approach comb<strong>in</strong><strong>in</strong>g <strong>the</strong> dimensionsof Figure 3!10 ConclusionsA seamless architecture for a symbolic programcomprehension methodology has been described <strong>in</strong>this paper. Us<strong>in</strong>g Visual Prolog proved to be a rightchoice. When one of <strong>the</strong> most characteristic featuresof traditional languages is that <strong>the</strong>y are lead<strong>in</strong>g <strong>in</strong>tomore <strong>and</strong> more specific applications, Visual Prologhas, as shown <strong>in</strong> this paper <strong>in</strong> Sections 2..9, becauseof its declarative notation, ano<strong>the</strong>r ra<strong>the</strong>r valuablefeature; it is lead<strong>in</strong>g <strong>in</strong>to wider, more abstract th<strong>in</strong>k<strong>in</strong>g,thus creat<strong>in</strong>g more general approaches <strong>and</strong><strong>the</strong>ories related to <strong>the</strong> software science.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 140

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!