pfc-prolog-cvs Mailing List for pfc-prolix (Page 16)
Status: Beta
Brought to you by:
ivanfrade
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(77) |
Jun
(37) |
Jul
(152) |
Aug
(180) |
Sep
(45) |
Oct
|
Nov
|
Dec
|
---|
From: <iva...@us...> - 2003-07-02 19:33:09
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb In directory sc8-pr-cvs1:/tmp/cvs-serv18862/src/org/asturlinux/frade/prolix/ejb/sessionjb Modified Files: ProlixMainBean.java SimpleXmlVisitor.java Log Message: Fixed minor errors in xml generation Index: ProlixMainBean.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb/ProlixMainBean.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ProlixMainBean.java 29 Jun 2003 15:33:04 -0000 1.12 --- ProlixMainBean.java 2 Jul 2003 19:33:06 -0000 1.13 *************** *** 51,54 **** --- 51,57 ---- private PrologContextDummy prologCtx; + private String xmlResult = ""; + private int solutionCounter = 1; + /** * @ejb:interface-method *************** *** 134,141 **** throws ProgramNotLoadedException, QueryNotLoadedException { TreeElement resolution = prologCtx.step(); ! String xmlChain = new String(""); ! treeElementToXmlTransformation(resolution,xmlChain); ! return xmlChain; } --- 137,145 ---- throws ProgramNotLoadedException, QueryNotLoadedException { + xmlResult = ""; + solutionCounter = 1; TreeElement resolution = prologCtx.step(); ! treeElementToXmlTransformation(resolution); ! return xmlResult; } *************** *** 169,185 **** ! private void treeElementToXmlTransformation(TreeElement tree, String result) { String xmlOpen = "<results>"; ! result.concat(xmlOpen); ! int solutionCounter = 1; ! recursiveInOrder(tree,result,solutionCounter); String xmlClose = "</results>"; ! result.concat(xmlClose); } ! private void recursiveInOrder(TreeElement tree, String result, int solution) { /** --- 173,190 ---- ! private void treeElementToXmlTransformation(TreeElement tree) { String xmlOpen = "<results>"; ! xmlResult = xmlResult.concat(xmlOpen); ! recursiveInOrder(tree); + if (tree.isCompletlyExplored()) + xmlResult = xmlResult.concat("<result solution=\"no\"/>"); String xmlClose = "</results>"; ! xmlResult = xmlResult.concat(xmlClose); } ! private void recursiveInOrder(TreeElement tree) { /** *************** *** 194,198 **** TreeElement[] sons = tree.getNextLevelElements(); for (int i = 0; i < sons.length; i++) ! recursiveInOrder(sons[i],result,solution); } catch (NullPointerException np) --- 199,203 ---- TreeElement[] sons = tree.getNextLevelElements(); for (int i = 0; i < sons.length; i++) ! recursiveInOrder(sons[i]); } catch (NullPointerException np) *************** *** 201,213 **** /** * node "treatment" using visitor pattern. ! * visitor _add_ node's xml to result. */ System.out.println("Exploring node: " + tree.getQuery()); if (tree.isSolution()) { ! SimpleXmlVisitor visitor = new SimpleXmlVisitor(result,solution); tree.accept(visitor); ! solution++; ! result = visitor.getResult(); } } --- 206,218 ---- /** * node "treatment" using visitor pattern. ! * visitor write node's xml. */ System.out.println("Exploring node: " + tree.getQuery()); if (tree.isSolution()) { ! SimpleXmlVisitor visitor = new SimpleXmlVisitor(solutionCounter); tree.accept(visitor); ! solutionCounter++; ! xmlResult = xmlResult.concat(visitor.getResult()); } } Index: SimpleXmlVisitor.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb/SimpleXmlVisitor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SimpleXmlVisitor.java 23 Jun 2003 19:04:38 -0000 1.2 --- SimpleXmlVisitor.java 2 Jul 2003 19:33:06 -0000 1.3 *************** *** 30,36 **** private int _counter; ! public SimpleXmlVisitor(String result,int counter) { ! _result = result; _counter = counter; } --- 30,36 ---- private int _counter; ! public SimpleXmlVisitor(int counter) { ! _result = ""; _counter = counter; } *************** *** 41,62 **** * Code to execute over the TreeElement te */ ! String opening = "<result solution=\"yes\" number=\"" + _counter + "\">"; ! _result.concat(opening); Substitution[] substArray = te.getSubstitutions(); ! for (int i = 0; i < substArray.length;i++) { ! _result.concat("<substitution " + ! "variable=\"" + substArray[i].getOriginalValue() + "\"" + ! "value=\"" + substArray[i].getNewValue() + "\"" + ! "/>"); } - String closing = "</result>"; ! _result.concat(closing); } - public String getResult() { --- 41,67 ---- * Code to execute over the TreeElement te */ ! String opening = "<result solution=\"yes\" number=\"" + _counter + "\">"; ! _result = _result.concat(opening); Substitution[] substArray = te.getSubstitutions(); ! if (substArray != null) { ! System.out.println("Node have substitutions"); ! for (int i = 0; i < substArray.length;i++) ! { ! _result = _result.concat("<substitution " ! + "variable=\"" ! + substArray[i].getOriginalValue() ! + "\" " + "value=\"" ! + substArray[i].getNewValue() ! + "\"" + "/>"); ! } } String closing = "</result>"; ! _result = _result.concat(closing); ! } public String getResult() { |
From: <iva...@us...> - 2003-07-02 19:33:09
|
Update of /cvsroot/pfc-prolog/prolix In directory sc8-pr-cvs1:/tmp/cvs-serv18862 Modified Files: build.xml Log Message: Fixed minor errors in xml generation Index: build.xml =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/build.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** build.xml 27 Jun 2003 11:47:31 -0000 1.13 --- build.xml 2 Jul 2003 19:33:06 -0000 1.14 *************** *** 346,349 **** --- 346,351 ---- <target name="clean" depends="init"> + <property name="jboss.tmp.dir" + value="server/default/tmp/deploy/server/default" /> <delete dir="${build.dir}"/> <delete dir="${dist.dir}"/> *************** *** 351,354 **** --- 353,360 ---- <fileset dir="." includes="**/*~" defaultexcludes="no" /> </delete> + <delete + dir="${jboss.home}/${jboss.tmp.dir}/lib/prolix-dummy-interpreter.jar"/> + <delete + dir="${jboss.home}/${jboss.tmp.dir}/deploy/prolix-beans.jar"/> </target> |
From: <iva...@us...> - 2003-06-29 15:33:06
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb In directory sc8-pr-cvs1:/tmp/cvs-serv13279/src/org/asturlinux/frade/prolix/ejb/sessionjb Modified Files: ProlixMainBean.java Log Message: Added debug messages in bean and detected recursivity end Index: ProlixMainBean.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb/ProlixMainBean.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ProlixMainBean.java 28 Jun 2003 17:23:23 -0000 1.11 --- ProlixMainBean.java 29 Jun 2003 15:33:04 -0000 1.12 *************** *** 114,118 **** // Don't needed in simulation //_consult = consult; - System.out.println("Load consult in Bean"); //FIXME Could be prologCtx == null? --- 114,117 ---- *************** *** 187,198 **** * recursive pattern */ - TreeElement[] sons = tree.getNextLevelElements(); - for (int i = 0; i < sons.length;i++) - recursiveInOrder(sons[i],result,solution); /** * node "treatment" using visitor pattern. * visitor _add_ node's xml to result. */ if (tree.isSolution()) { --- 186,207 ---- * recursive pattern */ + if (tree == null) + return; + + try + { + TreeElement[] sons = tree.getNextLevelElements(); + for (int i = 0; i < sons.length; i++) + recursiveInOrder(sons[i],result,solution); + } + catch (NullPointerException np) + { + } /** * node "treatment" using visitor pattern. * visitor _add_ node's xml to result. */ + System.out.println("Exploring node: " + tree.getQuery()); if (tree.isSolution()) { |
From: <iva...@us...> - 2003-06-29 15:30:37
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient In directory sc8-pr-cvs1:/tmp/cvs-serv12976/src/org/asturlinux/frade/prolix/consoleclient Modified Files: Interfaz.java Log Message: Corrected interfaz. dont crash with null input or letter when you wait a number Index: Interfaz.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient/Interfaz.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Interfaz.java 24 Jun 2003 08:18:35 -0000 1.1 --- Interfaz.java 29 Jun 2003 15:30:34 -0000 1.2 *************** *** 31,35 **** { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); ! int readed = 0; do { --- 31,35 ---- { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); ! int read = 0; do { *************** *** 43,57 **** { String someyouwrite = in.readLine(); ! readed = Integer.valueOf(someyouwrite).intValue(); } catch (IOException e) { //FIXME null string ! readed = -10; } } ! while( readed < 1 || readed > opt); ! return readed; } } --- 43,61 ---- { String someyouwrite = in.readLine(); ! read = Integer.valueOf(someyouwrite).intValue(); } catch (IOException e) { //FIXME null string ! read = -10; ! } ! catch (NumberFormatException n) ! { ! read = -10; } } ! while( read < 1 || read > opt); ! return read; } } |
From: <iva...@us...> - 2003-06-28 17:25:56
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb In directory sc8-pr-cvs1:/tmp/cvs-serv27695/src/org/asturlinux/frade/prolix/ejb/sessionjb Modified Files: ProlixMainBean.java Log Message: minor changes. Problems in jboss finding implementation class Index: ProlixMainBean.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb/ProlixMainBean.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ProlixMainBean.java 28 Jun 2003 11:37:03 -0000 1.10 --- ProlixMainBean.java 28 Jun 2003 17:23:23 -0000 1.11 *************** *** 114,117 **** --- 114,118 ---- // Don't needed in simulation //_consult = consult; + System.out.println("Load consult in Bean"); //FIXME Could be prologCtx == null? |
From: <iva...@us...> - 2003-06-28 17:23:26
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient In directory sc8-pr-cvs1:/tmp/cvs-serv27695/src/org/asturlinux/frade/prolix/consoleclient Modified Files: ConsoleClient.java Log Message: minor changes. Problems in jboss finding implementation class Index: ConsoleClient.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient/ConsoleClient.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ConsoleClient.java 28 Jun 2003 11:37:03 -0000 1.5 --- ConsoleClient.java 28 Jun 2003 17:23:23 -0000 1.6 *************** *** 128,132 **** { String input = new String(in.readLine()); ! // interpreter.loadProgram(input) } catch (IOException io) --- 128,140 ---- { String input = new String(in.readLine()); ! interpreter.loadProgram(input); ! } ! catch (LexicalException le) ! { ! System.out.println("Lexical error"); ! } ! catch (SyntaxException se) ! { ! System.out.println("Syntax error"); } catch (IOException io) *************** *** 144,148 **** catch (RemoteException re) { ! System.out.println("Remote exception: 145"); } } --- 152,156 ---- catch (RemoteException re) { ! System.out.println("Remote exception in getLoadedProgram"); } } *************** *** 155,159 **** { String input = new String(in.readLine()); ! // interpreter.loadConsult(input) } catch (IOException io) --- 163,179 ---- { String input = new String(in.readLine()); ! interpreter.loadConsult(input); ! } ! catch (LexicalException le) ! { ! System.out.println("Lexical error"); ! } ! catch (SyntaxException se) ! { ! System.out.println("Syntax error"); ! } ! catch (ProgramNotLoadedException pnle) ! { ! System.out.println("Unable to load a query without a program"); } catch (IOException io) |
From: <iva...@us...> - 2003-06-28 11:37:06
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient In directory sc8-pr-cvs1:/tmp/cvs-serv17247/src/org/asturlinux/frade/prolix/consoleclient Modified Files: ConsoleClient.java Log Message: adding functionality to step mode. Index: ConsoleClient.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient/ConsoleClient.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ConsoleClient.java 27 Jun 2003 11:47:31 -0000 1.4 --- ConsoleClient.java 28 Jun 2003 11:37:03 -0000 1.5 *************** *** 29,32 **** --- 29,33 ---- import javax.ejb.*; import org.asturlinux.frade.prolix.ejb.interfaces.*; + import org.asturlinux.frade.prolix.interpreter.exceptions.*; *************** *** 65,69 **** return; } ! catch (CreateException ce) { System.out.println("ERROR creating interpreter "); --- 66,70 ---- return; } ! catch (javax.ejb.CreateException ce) { System.out.println("ERROR creating interpreter "); *************** *** 176,182 **** private void gostep() { ! /** ! * FIXME Do something useful ! */ } --- 177,196 ---- private void gostep() { ! try ! { ! System.out.println(interpreter.step()); ! } ! catch (ProgramNotLoadedException programNotLoaded) ! { ! System.out.println("Unable to execute a step if you don't load a program"); ! } ! catch (QueryNotLoadedException queryNotLoaded) ! { ! System.out.println("Unable to execute a step if you don't load a query"); ! } ! catch (RemoteException remote) ! { ! System.out.println("Remote exception doing an step"); ! } } |
From: <iva...@us...> - 2003-06-28 11:37:06
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb In directory sc8-pr-cvs1:/tmp/cvs-serv17247/src/org/asturlinux/frade/prolix/ejb/sessionjb Modified Files: ProlixMainBean.java Log Message: adding functionality to step mode. Index: ProlixMainBean.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb/ProlixMainBean.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ProlixMainBean.java 27 Jun 2003 11:47:31 -0000 1.9 --- ProlixMainBean.java 28 Jun 2003 11:37:03 -0000 1.10 *************** *** 90,103 **** /** * Some format operations to obtain a pretty output ! * FIXME Now don't work: don't loop. */ StringBuffer result = new StringBuffer(_program); ! int separatorValue = Character.getNumericValue('.'); ! int position = result.toString().indexOf(separatorValue); while (position != -1) { System.out.println("in the loop"); result.insert(position+1,"\n"); ! position = result.toString().indexOf(separatorValue); } return result.toString(); --- 90,104 ---- /** * Some format operations to obtain a pretty output ! * FIXME Delete last "." */ StringBuffer result = new StringBuffer(_program); ! // Dirty trick ! result.append("."); ! int position = result.toString().indexOf("."); while (position != -1) { System.out.println("in the loop"); result.insert(position+1,"\n"); ! position = result.toString().indexOf(".",position+2); } return result.toString(); *************** *** 131,136 **** **/ public String step() { ! } --- 132,141 ---- **/ public String step() + throws ProgramNotLoadedException, QueryNotLoadedException { ! TreeElement resolution = prologCtx.step(); ! String xmlChain = new String(""); ! treeElementToXmlTransformation(resolution,xmlChain); ! return xmlChain; } *************** *** 197,200 **** } } - } --- 202,204 ---- |
From: <iva...@us...> - 2003-06-27 11:47:36
|
Update of /cvsroot/pfc-prolog/prolix In directory sc8-pr-cvs1:/tmp/cvs-serv3154 Modified Files: build.xml Log Message: added some options to client and methods in Bean. Index: build.xml =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/build.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** build.xml 26 Jun 2003 22:12:55 -0000 1.12 --- build.xml 27 Jun 2003 11:47:31 -0000 1.13 *************** *** 65,71 **** <echo message="jboss.home = ${jboss.home}"/> <echo message="xdoclet.home = ${xdoclet.home}"/> ! <!-- <echo message="java.class.path = ${java.class.path}"/> ! --> <available property="jdk1.3+" classname="java.lang.StrictMath" /> </target> --- 65,71 ---- <echo message="jboss.home = ${jboss.home}"/> <echo message="xdoclet.home = ${xdoclet.home}"/> ! <!-- <echo message="java.class.path = ${java.class.path}"/> ! --> <available property="jdk1.3+" classname="java.lang.StrictMath" /> </target> |
From: <iva...@us...> - 2003-06-27 11:47:36
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient In directory sc8-pr-cvs1:/tmp/cvs-serv3154/src/org/asturlinux/frade/prolix/consoleclient Modified Files: ConsoleClient.java Log Message: added some options to client and methods in Bean. Index: ConsoleClient.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient/ConsoleClient.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ConsoleClient.java 26 Jun 2003 21:44:45 -0000 1.3 --- ConsoleClient.java 27 Jun 2003 11:47:31 -0000 1.4 *************** *** 77,81 **** --- 77,83 ---- String[] optionsMenu = {"Load Program", + "Get loaded program", "Load Consult", + "Get loaded consult", "Step", "Exit"}; *************** *** 91,99 **** case 1: program(); break; ! case 2: consult(); break; ! case 3: gostep(); break; ! case 4: otherIteration = false; break; } --- 93,105 ---- case 1: program(); break; ! case 2: getLoadedProgram(); break; ! case 3: consult(); break; ! case 4: getLoadedConsult(); ! break; ! case 5: gostep(); ! break; ! case 6: otherIteration = false; break; } *************** *** 129,132 **** --- 135,149 ---- } + private void getLoadedProgram() + { + try + { + System.out.println(interpreter.getProgram()); + } + catch (RemoteException re) + { + System.out.println("Remote exception: 145"); + } + } private void consult() *************** *** 142,145 **** --- 159,174 ---- { System.out.println("Please, write something with sense"); + } + } + + private void getLoadedConsult() + { + try + { + System.out.println(interpreter.getCurrentConsult()); + } + catch (RemoteException re) + { + System.out.println("Remote exception!!! 165"); } } |
From: <iva...@us...> - 2003-06-27 11:47:36
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb In directory sc8-pr-cvs1:/tmp/cvs-serv3154/src/org/asturlinux/frade/prolix/ejb/sessionjb Modified Files: ProlixMainBean.java Log Message: added some options to client and methods in Bean. Index: ProlixMainBean.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb/ProlixMainBean.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ProlixMainBean.java 24 Jun 2003 21:53:28 -0000 1.8 --- ProlixMainBean.java 27 Jun 2003 11:47:31 -0000 1.9 *************** *** 47,52 **** { ! private String _program; ! private String _consult; private PrologContextDummy prologCtx; --- 47,52 ---- { ! private String _program = "hermano(X,Y):=padre(X,Z),padre(Y,Z).padre(Felipe,JC).padre(Helena,JC)"; ! private String _consult = "hermano(X,Y)"; private PrologContextDummy prologCtx; *************** *** 57,61 **** throws LexicalException, SyntaxException { ! _program = program; try --- 57,62 ---- throws LexicalException, SyntaxException { ! //Don't needed in simulation ! //_program = program; try *************** *** 87,91 **** public String getProgram() { ! return _program; } --- 88,105 ---- public String getProgram() { ! /** ! * Some format operations to obtain a pretty output ! * FIXME Now don't work: don't loop. ! */ ! StringBuffer result = new StringBuffer(_program); ! int separatorValue = Character.getNumericValue('.'); ! int position = result.toString().indexOf(separatorValue); ! while (position != -1) ! { ! System.out.println("in the loop"); ! result.insert(position+1,"\n"); ! position = result.toString().indexOf(separatorValue); ! } ! return result.toString(); } *************** *** 97,101 **** throws LexicalException, SyntaxException, ProgramNotLoadedException { ! _consult = consult; //FIXME Could be prologCtx == null? prologCtx.consult(consult); --- 111,117 ---- throws LexicalException, SyntaxException, ProgramNotLoadedException { ! // Don't needed in simulation ! //_consult = consult; ! //FIXME Could be prologCtx == null? prologCtx.consult(consult); *************** *** 111,114 **** --- 127,137 ---- } + /** + * @ejb:interface-method + **/ + public String step() + { + + } /** |
From: <iva...@us...> - 2003-06-26 22:15:13
|
Update of /cvsroot/pfc-prolog/prolix In directory sc8-pr-cvs1:/tmp/cvs-serv3586 Modified Files: .cvsignore Log Message: Added lib dir to .cvsignore Index: .cvsignore =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 20 May 2003 14:55:49 -0000 1.1 --- .cvsignore 26 Jun 2003 22:15:11 -0000 1.2 *************** *** 2,3 **** --- 2,5 ---- build dist + lib + |
From: <iva...@us...> - 2003-06-26 22:12:58
|
Update of /cvsroot/pfc-prolog/prolix In directory sc8-pr-cvs1:/tmp/cvs-serv3132 Modified Files: build.xml Log Message: Added to server jar file interpreter interfaces and exceptions Index: build.xml =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/build.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** build.xml 26 Jun 2003 21:44:45 -0000 1.11 --- build.xml 26 Jun 2003 22:12:55 -0000 1.12 *************** *** 227,230 **** --- 227,235 ---- > </fileset> + <fileset + dir="${build.classes.dir}" + includes="${package.path}/interpreter/**/**" + > + </fileset> </jar> |
From: <iva...@us...> - 2003-06-26 21:44:48
|
Update of /cvsroot/pfc-prolog/prolix In directory sc8-pr-cvs1:/tmp/cvs-serv31961 Modified Files: build.xml Log Message: added script to launch console client. Done needed changes in build.xml Index: build.xml =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/build.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** build.xml 24 Jun 2003 21:57:24 -0000 1.10 --- build.xml 26 Jun 2003 21:44:45 -0000 1.11 *************** *** 12,16 **** <property name="Name" value="Prolix"/> <property name="version" value="1.1"/> ! <target name="check-jboss" unless="jboss.home"> --- 12,16 ---- <property name="Name" value="Prolix"/> <property name="version" value="1.1"/> ! <property name="interpreter" value="prolix-dummy-interpreter.jar"/> <target name="check-jboss" unless="jboss.home"> *************** *** 65,70 **** <echo message="jboss.home = ${jboss.home}"/> <echo message="xdoclet.home = ${xdoclet.home}"/> <echo message="java.class.path = ${java.class.path}"/> ! <available property="jdk1.3+" classname="java.lang.StrictMath" /> </target> --- 65,71 ---- <echo message="jboss.home = ${jboss.home}"/> <echo message="xdoclet.home = ${xdoclet.home}"/> + <!-- <echo message="java.class.path = ${java.class.path}"/> ! --> <available property="jdk1.3+" classname="java.lang.StrictMath" /> </target> *************** *** 131,135 **** <pathelement location="${jboss.home}/server/${jboss.configuration}/lib/mail.jar" /> <pathelement location="${build.classes.dir}" /> ! <pathelement location="lib/prolix-dummy-interpreter.jar"/> </path> --- 132,136 ---- <pathelement location="${jboss.home}/server/${jboss.configuration}/lib/mail.jar" /> <pathelement location="${build.classes.dir}" /> ! <pathelement location="lib/${interpreter}"/> </path> *************** *** 138,188 **** <!-- =================================================================== --> ! <target name="xdoclet-generate" depends="init"> ! <taskdef ! name="ejbdoclet" ! classname="xdoclet.ejb.EjbDocletTask" ! > ! <classpath refid="xdoclet.path"/> ! </taskdef> ! <ejbdoclet ! sourcepath="${src.ejb.dir}" ! destdir="${build.generate.dir}" ! classpathref="base.path" ! excludedtags="@version,@author" ! ejbspec="${ejb.version}" ! force="${xdoclet.force}" ! mergedir="${src.resources.dir}/xdoclet" ! > ! ! <fileset dir="${src.ejb.dir}"> ! <include name="**/*Bean.java"/> ! </fileset> ! ! <packageSubstitution packages="sessionjb,entityjb" substituteWith="interfaces"/> ! <dataobject/> ! <remoteinterface/> <localinterface/> ! <homeinterface/> <localhomeinterface/> ! <!-- <entitypk/> ! <entigtybmp/> ! <entitycmp/> --> ! <session/> ! <valueobject/> ! <!-- Beans Deployment descriptor --> ! <deploymentdescriptor destdir="${build.classes.dir}/META-INF"/> ! <!-- AS 4/29/02 Do not validate XML files because JBoss 3.0 message driven will ! report an wrong error because it uses the wrong jboss.dtd --> ! <jboss version="${jboss.version}" ! xmlencoding="UTF-8" ! typemapping="${type.mapping}" ! datasource="${datasource.name}" ! destdir="${build.classes.dir}/META-INF" ! validateXml="false" ! /> ! </ejbdoclet> ! </target> <!-- =================================================================== --> --- 139,189 ---- <!-- =================================================================== --> ! <target name="xdoclet-generate" depends="init"> ! <taskdef ! name="ejbdoclet" ! classname="xdoclet.ejb.EjbDocletTask" ! > ! <classpath refid="xdoclet.path"/> ! </taskdef> ! <ejbdoclet ! sourcepath="${src.ejb.dir}" ! destdir="${build.generate.dir}" ! classpathref="base.path" ! excludedtags="@version,@author" ! ejbspec="${ejb.version}" ! force="${xdoclet.force}" ! mergedir="${src.resources.dir}/xdoclet" ! > ! ! <fileset dir="${src.ejb.dir}"> ! <include name="**/*Bean.java"/> ! </fileset> ! ! <packageSubstitution packages="sessionjb,entityjb" substituteWith="interfaces"/> ! <dataobject/> ! <remoteinterface/> <localinterface/> ! <homeinterface/> <localhomeinterface/> ! <!-- <entitypk/> ! <entigtybmp/> ! <entitycmp/> --> ! <session/> ! <valueobject/> ! <!-- Beans Deployment descriptor --> ! <deploymentdescriptor destdir="${build.classes.dir}/META-INF"/> ! <!-- AS 4/29/02 Do not validate XML files because JBoss 3.0 ! message driven will report an wrong error because it uses the wrong jboss.dtd --> ! <jboss version="${jboss.version}" ! xmlencoding="UTF-8" ! typemapping="${type.mapping}" ! datasource="${datasource.name}" ! destdir="${build.classes.dir}/META-INF" ! validateXml="false" ! /> ! </ejbdoclet> ! </target> <!-- =================================================================== --> *************** *** 226,240 **** > </fileset> ! <fileset ! dir="${build.classes.dir}" ! includes="${package.path}/interpreter/**" ! > ! </fileset> ! <fileset ! dir="../dummy/build" ! includes="**/**" ! > ! </fileset> ! </jar> <!-- Interfaces interpreter-prolix jar--> --- 227,231 ---- > </fileset> ! </jar> <!-- Interfaces interpreter-prolix jar--> *************** *** 283,294 **** <!-- =================================================================== --> ! <!-- Creates the client binary --> <!-- =================================================================== --> <target name="deploy-server" depends="jar"> ! <copy todir="${jboss.deploy}"> ! <fileset dir="${dist.dir}" includes="prolix-beans.jar"> ! </fileset> ! </copy> </target> --- 274,285 ---- <!-- =================================================================== --> ! <!-- Deploys server binary --> <!-- =================================================================== --> + + <!-- FIXME Must copy interpreter and interpreter interfaces to + to JBOSS_HOME/server/default/lib ? --> <target name="deploy-server" depends="jar"> ! <copy file="${dist.dir}/prolix-beans.jar" todir="${jboss.deploy}"/> </target> *************** *** 320,330 **** </path> </pathconvert> ! <echo message="JBoss Home on Unix: ${jboss.home.on.unix}"/> ! <echo message="Java Home on Unix: ${java.home.on.unix}"/> ! <filter token="jboss.home" value="${jboss.home.on.windows}"/> ! <filter token="java.home" value="${java.home.on.windows}"/> ! ! <filter token="jboss.home" value="${jboss.home.on.unix}"/> ! <filter token="java.home" value="${java.home.on.unix}"/> <!-- <copy file="${src.ejb.conf.dir}/jndi.properties" todir="${build.bin.dir}"/> --- 311,327 ---- </path> </pathconvert> ! <!-- ! <echo message="JBoss Home on Unix: ${jboss.home.on.unix}"/> ! <echo message="Java Home on Unix: ${java.home.on.unix}"/> ! <filter token="jboss.home" value="${jboss.home.on.windows}"/> ! <filter token="java.home" value="${java.home.on.windows}"/> ! --> ! <filter token="jboss.home" value="${jboss.home.on.unix}"/> ! <filter token="java.home" value="${java.home.on.unix}"/> ! <filter token="dist.dir" value="${dist.dir}"/> ! <copy todir="${dist.dir}" filtering="yes"> ! <fileset dir="${basedir}/etc" includes="run-*-client.sh"> ! </fileset> ! </copy> <!-- <copy file="${src.ejb.conf.dir}/jndi.properties" todir="${build.bin.dir}"/> |
From: <iva...@us...> - 2003-06-26 21:44:48
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient In directory sc8-pr-cvs1:/tmp/cvs-serv31961/src/org/asturlinux/frade/prolix/consoleclient Modified Files: ConsoleClient.java Log Message: added script to launch console client. Done needed changes in build.xml Index: ConsoleClient.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient/ConsoleClient.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ConsoleClient.java 24 Jun 2003 12:05:51 -0000 1.2 --- ConsoleClient.java 26 Jun 2003 21:44:45 -0000 1.3 *************** *** 53,60 **** // Obtain reference to home InitialContext ctx = new InitialContext(); ! Object o = ctx.lookup( "org/asturlinux/frade/prolix/ejb/sessionjb/ProlixMain" ); ! ProlixMainHome home = null; ! home = (ProlixMainHome)PortableRemoteObject.narrow(o, ProlixMainHome.class); ! // Create the interpreter bean interpreter = home.create(); --- 53,60 ---- // Obtain reference to home InitialContext ctx = new InitialContext(); ! //Object o = ctx.lookup( "org/asturlinux/frade/prolix/ejb/sessionjb/ProlixMain" ); ! //ProlixMainHome home = null; ! // home = (ProlixMainHome)PortableRemoteObject.narrow(o, ProlixMainHome.class); ! ProlixMainHome home = (ProlixMainHome)ctx.lookup(ProlixMainHome.JNDI_NAME); // Create the interpreter bean interpreter = home.create(); |
From: <iva...@us...> - 2003-06-26 21:44:48
|
Update of /cvsroot/pfc-prolog/prolix/etc In directory sc8-pr-cvs1:/tmp/cvs-serv31961/etc Added Files: run-console-client.sh Log Message: added script to launch console client. Done needed changes in build.xml --- NEW FILE: run-console-client.sh --- #! /bin/sh # ================================================================== # with <filter token=....> ant substitutes some var (like java.home) # # ================================================================== # OS specific support. $var _must_ be set to either true or false. cygwin=false; case "`uname`" in CYGWIN*) cygwin=true ;; esac # Set JAVA_HOME JAVA_HOME=@java.home@ # For Cygwin, ensure paths are in UNIX format before anything is touched if $cygwin ; then [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"` fi if [ -z "$JAVACMD" ] ; then if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD=$JAVA_HOME/jre/sh/java else JAVACMD=$JAVA_HOME/bin/java fi else JAVACMD=java fi fi if [ ! -x "$JAVACMD" ] ; then echo "Error: JAVA_HOME is not defined correctly." echo " We cannot execute $JAVACMD" exit fi if [ -n "$CLASSPATH" ] ; then LOCALCLASSPATH=$CLASSPATH fi # add in the dependency .jar files # from JBOSS DIRLIBS=@jboss.home@/client/*.jar if $cygwin; then DIRLIBS=`cygpath --path --unix "$DIRLIBS"` fi for i in ${DIRLIBS} do # if the directory is empty, then it will return the input string # this is stupid, so case for it if [ "$i" != "${DIRLIBS}" ] ; then if [ -z "$LOCALCLASSPATH" ] ; then LOCALCLASSPATH=$i else LOCALCLASSPATH="$i":$LOCALCLASSPATH fi fi done # Here added to classpath the client jar # Set DIST_HOME DIST_HOME=@dist.dir@ LOCALCLASSPATH=$DIST_HOME/prolix-console-client.jar:$LOCALCLASSPATH # Prepare java environment if [ -n "$JAVA_HOME" ] ; then if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar fi if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip fi else echo "Warning: JAVA_HOME environment variable is not set." echo " If build fails because sun.* classes could not be found" echo " you will need to set the JAVA_HOME environment variable" echo " to the installation directory of java." fi # We need to find jndi.properties later so include working dir LOCALCLASSPATH=$LOCALCLASSPATH:. # For Cygwin, switch paths to Windows format before running java if $cygwin; then JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"` fi #Finally, run the program. $JAVACMD -classpath "$LOCALCLASSPATH" org.asturlinux.frade.prolix.consoleclient.ConsoleClient "$@" |
From: <iva...@us...> - 2003-06-26 21:43:01
|
Update of /cvsroot/pfc-prolog/prolix/etc In directory sc8-pr-cvs1:/tmp/cvs-serv31620/etc Log Message: Directory /cvsroot/pfc-prolog/prolix/etc added to the repository |
From: <iva...@us...> - 2003-06-24 21:57:27
|
Update of /cvsroot/pfc-prolog/prolix In directory sc8-pr-cvs1:/tmp/cvs-serv18688 Modified Files: build.xml Log Message: Temporary changes: add to beans-jar a lot of aux classes. Must be done with classpath or other solution Index: build.xml =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/build.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** build.xml 24 Jun 2003 10:37:36 -0000 1.9 --- build.xml 24 Jun 2003 21:57:24 -0000 1.10 *************** *** 1,7 **** <?xml version="1.0"?> ! <!-- ======================================================================= --> ! <!-- Template build file modified to prolix --> ! <!-- ======================================================================= --> <project name="prolix" default="main" basedir="."> --- 1,7 ---- <?xml version="1.0"?> ! <!-- =================================================================== --> ! <!-- Template build file modified to prolix --> ! <!-- =================================================================== --> <project name="prolix" default="main" basedir="."> *************** *** 203,218 **** <src path="${build.generate.dir}"/> </javac> ! <!-- I don't need to compile a client ! <javac ! srcdir="${src.client.dir}" ! destdir="${build.classes.dir}" ! debug="on" ! deprecation="off" ! optimize="on" ! includes="**/*.java" ! classpathref="base.path" ! > ! </javac> ! --> </target> --- 203,207 ---- <src path="${build.generate.dir}"/> </javac> ! </target> *************** *** 221,243 **** <!-- =================================================================== --> <target name="jar" depends="compile"> <mkdir dir="${dist.dir}"/> ! <jar jarfile="${dist.dir}/prolix-beans.jar"> ! <fileset ! dir="${build.classes.dir}" ! includes="${package.path}/ejb/**/**" > ! </fileset> ! </jar> ! <jar jarfile="${dist.dir}/prolix-interpreter-interface.jar" ! > ! <fileset ! dir="${build.classes.dir}" ! includes="${package.path}/interpreter/**" > ! </fileset> ! </jar> ! <!-- Client jar --> <jar jarfile="${dist.dir}/prolix-console-client.jar"> --- 210,252 ---- <!-- =================================================================== --> + <target name="jar" depends="compile"> <mkdir dir="${dist.dir}"/> ! ! <!-- jboss jar --> ! <jar jarfile="${dist.dir}/prolix-beans.jar"> ! <fileset ! dir="${build.classes.dir}" ! includes="${package.path}/ejb/**/**" ! > ! </fileset> ! <fileset ! dir="${build.classes.dir}" ! includes="META-INF/**" ! > ! </fileset> ! <fileset ! dir="${build.classes.dir}" ! includes="${package.path}/interpreter/**" > ! </fileset> ! <fileset ! dir="../dummy/build" ! includes="**/**" ! > ! </fileset> ! </jar> ! ! <!-- Interfaces interpreter-prolix jar--> ! <jar jarfile="${dist.dir}/prolix-interpreter-interface.jar" ! > ! <fileset ! dir="${build.classes.dir}" ! includes="${package.path}/interpreter/**" > ! </fileset> ! </jar> ! <!-- Client jar --> <jar jarfile="${dist.dir}/prolix-console-client.jar"> |
From: <iva...@us...> - 2003-06-24 21:53:33
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb In directory sc8-pr-cvs1:/tmp/cvs-serv18053/src/org/asturlinux/frade/prolix/ejb/sessionjb Modified Files: ProlixMainBean.java Log Message: corrected english. Orden by Order Index: ProlixMainBean.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb/ProlixMainBean.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ProlixMainBean.java 23 Jun 2003 19:04:38 -0000 1.7 --- ProlixMainBean.java 24 Jun 2003 21:53:28 -0000 1.8 *************** *** 147,151 **** int solutionCounter = 1; ! recursiveInOrden(tree,result,solutionCounter); String xmlClose = "</results>"; --- 147,151 ---- int solutionCounter = 1; ! recursiveInOrder(tree,result,solutionCounter); String xmlClose = "</results>"; *************** *** 153,157 **** } ! private void recursiveInOrden(TreeElement tree, String result, int solution) { /** --- 153,157 ---- } ! private void recursiveInOrder(TreeElement tree, String result, int solution) { /** *************** *** 160,164 **** TreeElement[] sons = tree.getNextLevelElements(); for (int i = 0; i < sons.length;i++) ! recursiveInOrden(sons[i],result,solution); /** --- 160,164 ---- TreeElement[] sons = tree.getNextLevelElements(); for (int i = 0; i < sons.length;i++) ! recursiveInOrder(sons[i],result,solution); /** |
From: <iva...@us...> - 2003-06-24 12:05:54
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient In directory sc8-pr-cvs1:/tmp/cvs-serv24048/src/org/asturlinux/frade/prolix/consoleclient Modified Files: ConsoleClient.java Log Message: Minor changes in incomplete console client Index: ConsoleClient.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient/ConsoleClient.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ConsoleClient.java 24 Jun 2003 08:18:35 -0000 1.1 --- ConsoleClient.java 24 Jun 2003 12:05:51 -0000 1.2 *************** *** 28,42 **** import java.io.*; import javax.ejb.*; ! import org.asturlinux.frade.prolix.ejb.sessionjb.*; /** ! * Clase cliente en modo texto de Prolix * */ public class ConsoleClient { - private ProlixMain interpreter; public static void main(String args[]) { --- 28,42 ---- import java.io.*; import javax.ejb.*; ! import org.asturlinux.frade.prolix.ejb.interfaces.*; /** ! * console-client of prolix interpreter * */ public class ConsoleClient { + private ProlixMain interpreter; public static void main(String args[]) { *************** *** 132,139 **** --- 132,153 ---- private void consult() { + BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); + System.out.println("Write your consult to Prolog"); + try + { + String input = new String(in.readLine()); + // interpreter.loadConsult(input) + } + catch (IOException io) + { + System.out.println("Please, write something with sense"); + } } private void gostep() { + /** + * FIXME Do something useful + */ } |
From: <iva...@us...> - 2003-06-24 10:37:40
|
Update of /cvsroot/pfc-prolog/prolix In directory sc8-pr-cvs1:/tmp/cvs-serv13354 Modified Files: build.xml Log Message: Corrected build.xml to separate ejb interfaces Index: build.xml =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/build.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** build.xml 17 Jun 2003 11:08:07 -0000 1.8 --- build.xml 24 Jun 2003 10:37:36 -0000 1.9 *************** *** 160,164 **** </fileset> ! <packageSubstitution packages="session,entity" substituteWith="interfaces"/> <dataobject/> <remoteinterface/> --- 160,164 ---- </fileset> ! <packageSubstitution packages="sessionjb,entityjb" substituteWith="interfaces"/> <dataobject/> <remoteinterface/> *************** *** 167,171 **** <localhomeinterface/> <!-- <entitypk/> ! <entitybmp/> <entitycmp/> --> <session/> --- 167,171 ---- <localhomeinterface/> <!-- <entitypk/> ! <entigtybmp/> <entitycmp/> --> <session/> *************** *** 229,239 **** > </fileset> - <!-- Not needed (included in last fileset) - <fileset - dir="${build.dir}" - includes="META-INF/**" - > - </fileset> - --> </jar> <jar --- 229,232 ---- *************** *** 247,258 **** </jar> ! <!-- ! <jar jarfile="${dist.dir}/prolix-client.jar"> <fileset dir="${build.classes.dir}"> <include name="${package.path}/interpreter/exceptions/**"/> ! <include name="${package.path}/ejb/sessionjb/**"/> </fileset> </jar> ! --> </target> --- 240,252 ---- </jar> ! <!-- Client jar --> ! <jar jarfile="${dist.dir}/prolix-console-client.jar"> <fileset dir="${build.classes.dir}"> + <include name="${package.path}/consoleclient/**"/> <include name="${package.path}/interpreter/exceptions/**"/> ! <include name="${package.path}/ejb/interfaces/**"/> </fileset> </jar> ! </target> |
From: <iva...@us...> - 2003-06-24 08:18:39
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient In directory sc8-pr-cvs1:/tmp/cvs-serv28280/consoleclient Added Files: ConsoleClient.java Interfaz.java Log Message: Added unfinished files of a simple console-mode client --- NEW FILE: ConsoleClient.java --- /** * * Copyright 2003 Ivan Frade * * This file is part of Prolix. * * Prolix is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Prolix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Prolix; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * **/ package org.asturlinux.frade.prolix.consoleclient; import java.util.*; import java.rmi.*; import javax.naming.*; import javax.rmi.*; import java.io.*; import javax.ejb.*; import org.asturlinux.frade.prolix.ejb.sessionjb.*; /** * Clase cliente en modo texto de Prolix * */ public class ConsoleClient { private ProlixMain interpreter; public static void main(String args[]) { ConsoleClient console = new ConsoleClient(); console.run(); } /** * Obtain Bean and present menu */ private void run() { try { // Obtain reference to home InitialContext ctx = new InitialContext(); Object o = ctx.lookup( "org/asturlinux/frade/prolix/ejb/sessionjb/ProlixMain" ); ProlixMainHome home = null; home = (ProlixMainHome)PortableRemoteObject.narrow(o, ProlixMainHome.class); // Create the interpreter bean interpreter = home.create(); } catch (NamingException ne) { System.out.println("ERROR: Naming Exception"); return; } catch (CreateException ce) { System.out.println("ERROR creating interpreter "); return; } catch (RemoteException re) { System.out.println("ERROR: Remote Exception creatin interpreter"); return; } String[] optionsMenu = {"Load Program", "Load Consult", "Step", "Exit"}; boolean otherIteration = true; int input; do { switch (Interfaz.writeMenu("Prolix", optionsMenu.length, optionsMenu)) { case 1: program(); break; case 2: consult(); break; case 3: gostep(); break; case 4: otherIteration = false; break; } } while(otherIteration); } /** * * Private methods to actions * */ /** * * Take program from command line and try to load in interpreter * */ private void program() { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Write some program code in Prolog"); try { String input = new String(in.readLine()); // interpreter.loadProgram(input) } catch (IOException io) { System.out.println("Please, write something with sense"); } } private void consult() { } private void gostep() { } } --- NEW FILE: Interfaz.java --- /** * * Copyright 2003 Ivan Frade * * This file is part of Prolix. * * Prolix is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Prolix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Prolix; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * **/ package org.asturlinux.frade.prolix.consoleclient; import java.io.*; public class Interfaz { public static int writeMenu(String title, int opt, String []options) { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int readed = 0; do { System.out.println("\n\n -= " + title + " =- \n\n "); for (int i = 0 ; i < opt ; i++) System.out.println(" " + (i+1) + ". " + options[i]); System.out.println("Write a number in range [1-" + opt + "], please"); try { String someyouwrite = in.readLine(); readed = Integer.valueOf(someyouwrite).intValue(); } catch (IOException e) { //FIXME null string readed = -10; } } while( readed < 1 || readed > opt); return readed; } } |
From: <iva...@us...> - 2003-06-24 08:17:03
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient In directory sc8-pr-cvs1:/tmp/cvs-serv28049/consoleclient Log Message: Directory /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient added to the repository |
From: <iva...@us...> - 2003-06-23 19:04:46
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/interpreter/interfaces In directory sc8-pr-cvs1:/tmp/cvs-serv15454/org/asturlinux/frade/prolix/interpreter/interfaces Modified Files: TreeElementImpl.java TreeElementVisitor.java Log Message: Added GPL license to all files currently in project Index: TreeElementImpl.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/interpreter/interfaces/TreeElementImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TreeElementImpl.java 23 Jun 2003 17:15:00 -0000 1.1 --- TreeElementImpl.java 23 Jun 2003 19:04:42 -0000 1.2 *************** *** 1,2 **** --- 1,24 ---- + /** + * + * Copyright 2003 Ivan Frade + * + * This file is part of Prolix. + * + * Prolix is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Prolix is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Prolix; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + **/ + package org.asturlinux.frade.prolix.interpreter.interfaces; Index: TreeElementVisitor.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/interpreter/interfaces/TreeElementVisitor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TreeElementVisitor.java 23 Jun 2003 17:15:00 -0000 1.1 --- TreeElementVisitor.java 23 Jun 2003 19:04:42 -0000 1.2 *************** *** 1,2 **** --- 1,24 ---- + /** + * + * Copyright 2003 Ivan Frade + * + * This file is part of Prolix. + * + * Prolix is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Prolix is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Prolix; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + **/ + package org.asturlinux.frade.prolix.interpreter.interfaces; |
From: <iva...@us...> - 2003-06-23 19:04:44
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb In directory sc8-pr-cvs1:/tmp/cvs-serv15454/org/asturlinux/frade/prolix/ejb/sessionjb Modified Files: ProlixMainBean.java SimpleXmlVisitor.java Log Message: Added GPL license to all files currently in project Index: ProlixMainBean.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb/ProlixMainBean.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ProlixMainBean.java 23 Jun 2003 17:15:00 -0000 1.6 --- ProlixMainBean.java 23 Jun 2003 19:04:38 -0000 1.7 *************** *** 1,2 **** --- 1,24 ---- + /** + * + * Copyright 2003 Ivan Frade + * + * This file is part of Prolix. + * + * Prolix is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Prolix is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Prolix; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + **/ + package org.asturlinux.frade.prolix.ejb.sessionjb; Index: SimpleXmlVisitor.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb/SimpleXmlVisitor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SimpleXmlVisitor.java 23 Jun 2003 17:15:00 -0000 1.1 --- SimpleXmlVisitor.java 23 Jun 2003 19:04:38 -0000 1.2 *************** *** 1,2 **** --- 1,24 ---- + /** + * + * Copyright 2003 Ivan Frade + * + * This file is part of Prolix. + * + * Prolix is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Prolix is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Prolix; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + **/ + package org.asturlinux.frade.prolix.ejb.sessionjb; |