Carregar apresentação
A apresentação está carregando. Por favor, espere
PublicouSuzana Galvão de Escobar Alterado mais de 9 anos atrás
1
O InterProlog e a Declarativa Miguel Calejo Declarativa http://www.declarativa.com
2
http://www.declarativa.com/cnpl Apresentação no 4º CNPL, 6-4-2001 Copyright Declarativa 20012 Estrutura da apresentação InterProlog –Fundamentos –Resumo da funcionalidade Incursão pelo “mundo real” –XJ, gerador de GUIs sobre InterProlog –A Declarativa e oportunidades part-time
3
http://www.declarativa.com/cnpl Apresentação no 4º CNPL, 6-4-2001 Copyright Declarativa 20013 InterProlog: Java Reflection All objects know their class: –Class C = X.getClass(); Since JDK 1.1, classes provide info about public methods and variables –Method M = C.getMethod(“anyMethod”,Class arg array) No Prolog meta-call, but close –M.invoke(Target,Object arg array)
4
http://www.declarativa.com/cnpl Apresentação no 4º CNPL, 6-4-2001 Copyright Declarativa 20014 InterProlog: Java Serialization Cleaner than in other languages: Reflection allows a system mechanism to introspect any object and serialize it... Cf. classes ObjectOutputStream, InputObjectStream...oos.writeObject(ANYOBJECT); Object ANY = ios.readObject();...using a public stream format :) Writes/reads an object graph, including class descriptions, without repeating objects
5
http://www.declarativa.com/cnpl Apresentação no 4º CNPL, 6-4-2001 Copyright Declarativa 20015 InterProlog architecture sockets, console redirection Java VM InterProlog classes XSB executable InterProlog predicates A Java application A Prolog application Objects Terms
6
http://www.declarativa.com/cnpl Apresentação no 4º CNPL, 6-4-2001 Copyright Declarativa 20016 InterProlog Java program linked to Prolog program through I/O and object sockets Java program launches “PrologEngines” Dynamic Prolog->Java calls with Reflection Serialized objects are parsed/generated by a Definite Clause Gramnmar
7
http://www.declarativa.com/cnpl Apresentação no 4º CNPL, 6-4-2001 Copyright Declarativa 20017 Programming on the Prolog side Object specification helpers I think I’m under a console process Handle Java events as top goals javaMessage(Target,Message(Args)) –EX: javaMessage(‘java.lang.System’- out,println(string(‘hello, world’))). –Wide open API, as far as Java security allows –Variations handle exceptions, return value
8
http://www.declarativa.com/cnpl Apresentação no 4º CNPL, 6-4-2001 Copyright Declarativa 20018 Programming on the Java side One PrologEngine One XSB subprocess isAvailable() sendAndFlush(String s) Object[] deterministicGoal( String G, String Ovars, Object[] objectsP, String RVars ) registerJavaObject(Object x) interrupt(), shutdown()
9
http://www.declarativa.com/cnpl Apresentação no 4º CNPL, 6-4-2001 Copyright Declarativa 20019 InterProlog Term displayers browseList([one(X),two(Y),1+1+1,X/Y]). browseLiteralInstances(foo('First','Last'), [foo('Miguel','Calejo'),foo('Terry','Swift'),foo('David','Warren'),foo('Robert','Pokorn y')]). browseTreeTerm(t(root,[t(child1,[]),t(child2,[]),t(child3,[t(granchild31,[t(grandgr andchild311,[])])])])).
10
http://www.declarativa.com/cnpl Apresentação no 4º CNPL, 6-4-2001 Copyright Declarativa 200110 XJ - declarative GUI construction Vision –GUI deduced from logic program + annotations Application development with XJ –Prolog program is developed, ignoring GUI issues –GUI Term declarations added –Additional Java classes may be added for specifics Developed for XSB, Inc. over InterProlog to support DLA and other applications
11
http://www.declarativa.com/cnpl Apresentação no 4º CNPL, 6-4-2001 Copyright Declarativa 200111 XJ example: term annotations alloy_shape( 'STEEL'( alloy('852') ), 'MOLD CASTING’ ). labels(alloy_shape/2,'Alloy shape'('Alloy','Shape')). guiTerm(alloy_shape(_M,_S), gt(_,[],[gt(_,[operation(XXX,sisa('OBJECT',XXX),'Show in Ontology'), biGuiLink(X1,sub(X1,_),isa(X1,'METAL')) ], [gt(alloy,[constant], [gt(_,[atomUPPER,minSize=3,maxSize=10,typicalSize=8,name='Name'],[]) ]) ]), gt(_,[atomUPPER,typicalSize=15, biGuiLink(X2,sub(X2,_),isa(X2,'CASTING'))],[]) ])).
12
http://www.declarativa.com/cnpl Apresentação no 4º CNPL, 6-4-2001 Copyright Declarativa 200112 XJ example: derived GUI editList(alloy_shape(_,_)). Double-click Inplace editing w/ basic type checking For term For list Navigation to other windows
13
http://www.declarativa.com/cnpl Apresentação no 4º CNPL, 6-4-2001 Copyright Declarativa 200113 XJ - another example editList(spec_attr(S,_,_), (name(S,Chars),append("AMS 40",_,Chars)), _).
14
http://www.declarativa.com/cnpl Apresentação no 4º CNPL, 6-4-2001 Copyright Declarativa 200114 Declarativa 10 meses de idade, 5 pessoas 3 licenciados e 1 doutorado em Informática –1 Prémio IBM, 3 Prémios Microsoft, médias >= 14 Contratos em curso com DoD/XSB Inc. (USA); ME, CVRVV, Servisoft (Portugal) Abordagem declarativa :-) –WAM (SQL Server+JavaScript) –InterProlog/XJ (Prolog+Java)
15
http://www.declarativa.com/cnpl Apresentação no 4º CNPL, 6-4-2001 Copyright Declarativa 200115 Declarativa - WAM Web Application Maker –Model-driven, centralizado no MS SQL Server “Disruptive technology”; com um só click: –Dada uma boa BD com stored procedures, etc... –E algumas anotações de interface... –...obtém aplicação p/ WWW (browsers) sobre intranet/extranet com perfis de utilizador, etc. http://www.declarativa.com/wam
16
http://www.declarativa.com/cnpl Apresentação no 4º CNPL, 6-4-2001 Copyright Declarativa 200116 Oportunidades na Declarativa - I InterProlog –Documentação –Integração de frameworks Java Grafos, edição de diagramas com restrições, edição de texto orientada a sintaxe, agentes distribuídos –Evolução do InterProlog e do XJ
17
http://www.declarativa.com/cnpl Apresentação no 4º CNPL, 6-4-2001 Copyright Declarativa 200117 Oportunidades na Declarativa - II Evolução do WAM –Algoritmos (Java/Prolog/Transact-SQL...) transformando modelos em SQL-Server –Uso de informação linguistica, reconhecimento de padrões de análise –Runtime alternativo com GUI Java/Swing Programação de aplicações WAM –Microsoft SQL Server (Transact-SQL) –Active Server Pages (JavaScript)
18
http://www.declarativa.com/cnpl Apresentação no 4º CNPL, 6-4-2001 Copyright Declarativa 200118 Conclusão InterProlog, XJ; WAM Declarativa procura neurónios remotos ou locais para colaboração –Tarefas curtas –Trabalhos práticos numa disciplina –Projectos de férias de verão –Projectos de licenciatura mc@declarativa.com
Apresentações semelhantes
© 2024 SlidePlayer.com.br Inc.
All rights reserved.