flora-commits Mailing List for Flora-2
Brought to you by:
kifer
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(59) |
Jun
(43) |
Jul
(4) |
Aug
(4) |
Sep
(102) |
Oct
(20) |
Nov
(47) |
Dec
(32) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(24) |
Feb
(34) |
Mar
(72) |
Apr
(36) |
May
(10) |
Jun
(46) |
Jul
(36) |
Aug
(24) |
Sep
(37) |
Oct
(27) |
Nov
(43) |
Dec
(40) |
| 2004 |
Jan
(35) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(30) |
Aug
(83) |
Sep
(68) |
Oct
(38) |
Nov
(3) |
Dec
(7) |
| 2005 |
Jan
(9) |
Feb
(31) |
Mar
(46) |
Apr
(73) |
May
(21) |
Jun
(1) |
Jul
(32) |
Aug
(33) |
Sep
(3) |
Oct
(28) |
Nov
(4) |
Dec
(23) |
| 2006 |
Jan
(22) |
Feb
(2) |
Mar
(12) |
Apr
(23) |
May
(73) |
Jun
(14) |
Jul
|
Aug
(20) |
Sep
(14) |
Oct
(5) |
Nov
|
Dec
(14) |
| 2007 |
Jan
(54) |
Feb
(81) |
Mar
(286) |
Apr
(313) |
May
(154) |
Jun
(85) |
Jul
(8) |
Aug
(11) |
Sep
(12) |
Oct
(14) |
Nov
(6) |
Dec
(6) |
| 2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
(12) |
May
(4) |
Jun
|
Jul
(13) |
Aug
(22) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(46) |
Jun
(43) |
Jul
(46) |
Aug
(9) |
Sep
(13) |
Oct
(31) |
Nov
(42) |
Dec
(18) |
| 2014 |
Jan
(7) |
Feb
(7) |
Mar
(11) |
Apr
(13) |
May
(16) |
Jun
(6) |
Jul
(17) |
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
|
| 2015 |
Jan
|
Feb
(17) |
Mar
(4) |
Apr
(3) |
May
(2) |
Jun
(3) |
Jul
(2) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
|
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
|
9
|
10
|
11
|
12
(2) |
13
(1) |
14
|
15
(1) |
|
16
(8) |
17
(11) |
18
(2) |
19
|
20
(1) |
21
|
22
|
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
|
30
|
31
(2) |
|
|
|
|
|
|
From: Michael K. <ki...@us...> - 2005-10-31 04:50:54
|
Update of /cvsroot/flora/flora2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13216 Modified Files: flrutils.P Log Message: minor Index: flrutils.P =================================================================== RCS file: /cvsroot/flora/flora2/flrutils.P,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- flrutils.P 17 Oct 2005 05:25:33 -0000 1.61 +++ flrutils.P 31 Oct 2005 04:50:47 -0000 1.62 @@ -1550,7 +1550,7 @@ flora_put_attr_and_insert_fact(StorageName,Term). flora_put_attr_and_insert_fact(StorageName,Term) :- - flora_db_insert_base(StorageName,Term). + flora_db_insert_base(StorageName,Term). /************************************************************************* |
|
From: Chang Z. <ch...@us...> - 2005-10-31 04:00:32
|
Update of /cvsroot/flora/flora2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5500 Modified Files: flrundefined.P Log Message: improve comments for flora_error_undefined/1 Index: flrundefined.P =================================================================== RCS file: /cvsroot/flora/flora2/flrundefined.P,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- flrundefined.P 17 Oct 2005 05:25:33 -0000 1.27 +++ flrundefined.P 31 Oct 2005 04:00:22 -0000 1.28 @@ -783,12 +783,13 @@ /****************************************************************************** * flora_error_undefined(+Predicate) -* if a fact with the same skeleton as -* Predicate, then it is not really -* undefined(fact skeleton is inserted into the FLD storage -* at run time, when it is queried and there is a matching -* fact in the FDB storage) -* else print 'undefined predicate message +* flora_error_undefined(+Predicate) is called when the skeleton of Predicate +* is missing from the FLD storage. Because the skeleton of a fact is not +* inserted into the FLD storage when the fact is inserted into the FDB storage, +* Predicate might have been defined by some inserted facts. +* flora_error_undefined(+Predicate) searches the FDB storage to see whether +* such a fact exists. If yes, the skeleton of the fact is inserted into the +* FLD storage; otherwise, a FLORA_UNDEFINED_EXCEPTION is thrown. ******************************************************************************/ flora_error_undefined(Predicate) :- flora_decode_predicate(Predicate,PType,MName,WPrefix, PSymbol, AList), |
|
From: Michael K. <ki...@us...> - 2005-10-20 03:26:12
|
Update of /cvsroot/flora/flora2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12135 Modified Files: version.flh Log Message: Index: version.flh =================================================================== RCS file: /cvsroot/flora/flora2/version.flh,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- version.flh 2 May 2005 01:36:13 -0000 1.16 +++ version.flh 20 Oct 2005 03:26:02 -0000 1.17 @@ -1,2 +1,2 @@ -#define FLORA_VERSION '0.94 (Narumigata) of May 2005' +#define FLORA_VERSION '0.95devel (Androcymbium) of July 2005' |
|
From: Michael K. <ki...@us...> - 2005-10-18 00:35:51
|
Update of /cvsroot/flora/flora-website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9939 Modified Files: counter.php Log Message: put images in /tmp/persistent/flora Index: counter.php =================================================================== RCS file: /cvsroot/flora/flora-website/counter.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- counter.php 18 May 2002 16:12:28 -0000 1.1.1.1 +++ counter.php 18 Oct 2005 00:35:31 -0000 1.2 @@ -2,7 +2,7 @@ // counter.php the program to show the counter number. function CounterImage() { - $counterLogFile = ".counter.log"; + $counterLogFile = "/tmp/persistent/flora/.counter.log"; if (file_exists($counterLogFile) == true) { if(($fp= fopen($counterLogFile, "r+")) == false) { @@ -45,7 +45,7 @@ function ConvertToImage($content) { - $imageFile = ".counter.png"; + $imageFile = "/tmp/persistent/flora/.counter.png"; $relativePath = ".counter.png"; $noOfChars = strlen($content); |
|
From: Michael K. <ki...@us...> - 2005-10-18 00:01:55
|
Update of /cvsroot/flora/flora2/pkgs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2029/pkgs Modified Files: flrjava.flr Log Message: adjusted the use of =.. to its new, expanded semantics Index: flrjava.flr =================================================================== RCS file: /cvsroot/flora/flora2/pkgs/flrjava.flr,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- flrjava.flr 5 Aug 2005 21:08:55 -0000 1.1 +++ flrjava.flr 18 Oct 2005 00:01:46 -0000 1.2 @@ -247,16 +247,12 @@ /* Writing the prototype */ %nonInhSingleSetProto(?Method):- - ?Method=..?L, - ?L=[?FnName|?FnArgs], - ?FnName\=flapply, - %nonInhSingleSetProtoCall(?FnName,?FnArgs), - %writeln('String value)')@flora(io). - -%nonInhSingleSetProto(?Method):- - ?Method=..?L,?L=[flapply|[?FnName|?FnArgs]], + ?Method =.. [?H|?FnArgs], + (?H = hilog(?FnName) -> ?Msg = ',String value)' + ; ?H = ?FnName -> ?Msg = 'String value)' + ), %nonInhSingleSetProtoCall(?FnName,?FnArgs), - %writeln(',String value)')@flora(io). + %writeln(?Msg)@flora(io). %nonInhSingleSetProtoCall(?FnName,?FnArgs):- %write('public void set_')@flora(io), @@ -265,14 +261,8 @@ %writeSetlist(?FnArgs). %nonInhSingleGetProto(?Method):- - ?Method=..?L, - ?L=[?FnName|?FnArgs], - ?FnName\=flapply, - %nonInhSingleGetProtoCall(?FnName,?FnArgs). - -%nonInhSingleGetProto(?Method):- - ?Method=..?L, - ?L=[flapply|[?FnName|?FnArgs]], + ?Method =.. [?H|?FnArgs], + (?H = hilog(?FnName), ! ; ?H = ?FnName), %nonInhSingleGetProtoCall(?FnName,?FnArgs). %nonInhSingleGetProtoCall(?FnName,?FnArgs):- @@ -283,14 +273,8 @@ %writeln(')')@flora(io). %nonInhSingleGetAllProto(?Method):- - ?Method=..?L, - ?L=[?FnName|?FnArgs], - ?FnName\=flapply, - %nonInhSingleGetAllProtoCall(?FnName,?FnArgs). - -%nonInhSingleGetAllProto(?Method):- - ?Method=..?L, - ?L=[flapply|[?FnName|?FnArgs]], + ?Method =.. [?H|?FnArgs], + (?H = hilog(?FnName), ! ; ?H = ?FnName), %nonInhSingleGetAllProtoCall(?FnName,?FnArgs). %nonInhSingleGetAllProtoCall(?FnName,?_FnArgs):- @@ -299,17 +283,12 @@ %write('()')@flora(io). %nonInhSingleDeleteProto(?Method):- - ?Method=..?L, - ?L=[?FnName|?FnArgs], - ?FnName\=flapply, - %nonInhSingleDeleteProtoCall(?FnName,?FnArgs), - %writeln('String value)')@flora(io). - -%nonInhSingleDeleteProto(?Method):- - ?Method=..?L, - ?L=[flapply|[?FnName|?FnArgs]], + ?Method =.. [?H|?FnArgs], + (?H = hilog(?FnName) -> ?Msg = ',String value)' + ; ?H = ?FnName -> ?Msg = 'String value)' + ), %nonInhSingleDeleteProtoCall(?FnName,?FnArgs), - %writeln(',String value)')@flora(io). + %writeln(?Msg)@flora(io). %nonInhSingleDeleteProtoCall(?FnName,?FnArgs):- %write('public void delete_')@flora(io), @@ -318,14 +297,8 @@ %writeSetlist(?FnArgs). %nonInhSingleDeleteAllProto(?Method):- - ?Method=..?L, - ?L=[?FnName|?FnArgs], - ?FnName\=flapply, - %nonInhSingleDeleteAllProtoCall(?FnName,?FnArgs). - -%nonInhSingleDeleteAllProto(?Method):- - ?Method=..?L, - ?L=[flapply|[?FnName|?FnArgs]], + ?Method =.. [?H|?FnArgs], + (?H = hilog(?FnName), ! ; ?H = ?FnName), %nonInhSingleDeleteAllProtoCall(?FnName,?FnArgs). %nonInhSingleDeleteAllProtoCall(?FnName,?FnArgs):- @@ -336,37 +309,19 @@ %writeln(')')@flora(io). %nonInhSetSetProto(?Method):- - ?Method=..?L, - ?L=[?FnName|?FnArgs], - ?FnName\=flapply, - %write('public void set_')@flora(io), - %write(?FnName)@flora(io), - %write('(')@flora(io), - %writeSetlist(?FnArgs), - %writeln('Vector value)')@flora(io). - -%nonInhSetSetProto(?Method):- - ?Method=..?L, - ?L=[flapply|[?FnName|?FnArgs]], + ?Method =.. [?H|?FnArgs], + (?H = hilog(?FnName) -> ?Msg = ',Vector value)' + ; ?H = ?FnName -> ?Msg = 'Vector value)' + ), %write('public void set_')@flora(io), %write(?FnName)@flora(io), %write('(')@flora(io), %writeSetlist(?FnArgs), - %writeln(',Vector value)')@flora(io). - -%nonInhSetGetProto(?Method):- - ?Method=..?L, - ?L=[?FnName|?FnArgs], - ?FnName\=flapply, - %write('public Iterator get_')@flora(io), - %write(?FnName)@flora(io), - %write('(')@flora(io), - %writeGetlist(?FnArgs), - %write(')')@flora(io). + %writeln(?Msg)@flora(io). %nonInhSetGetProto(?Method):- - ?Method=..?L, - ?L=[flapply|[?FnName|?FnArgs]], + ?Method =.. [?H|?FnArgs], + (?H = hilog(?FnName), ! ; ?H = ?FnName), %write('public Iterator get_')@flora(io), %write(?FnName)@flora(io), %write('(')@flora(io), @@ -374,50 +329,26 @@ %write(')')@flora(io). %nonInhSetGetAllProto(?Method):- - ?Method=..?L, - ?L=[?FnName|?_FnArgs], - ?FnName\=flapply, - %write('public Iterator getAll_')@flora(io), - %write(?FnName)@flora(io), - %write('()')@flora(io). - -%nonInhSetGetAllProto(?Method):- - ?Method=..?L, - ?L=[flapply|[?FnName|?_FnArgs]], + ?Method =.. [?H|?_FnArgs], + (?H = hilog(?FnName), ! ; ?H = ?FnName), %write('public Iterator getAll_')@flora(io), %write(?FnName)@flora(io), %write('()')@flora(io). %nonInhSetDeleteProto(?Method):- - ?Method=..?L,?L=[?FnName|?FnArgs], - ?FnName\=flapply, - %write('public void delete_')@flora(io), - %write(?FnName)@flora(io), - %write('(')@flora(io), - %writeSetlist(?FnArgs), - %writeln('Vector value)')@flora(io). - -%nonInhSetDeleteProto(?Method):- - ?Method=..?L, - ?L=[flapply|[?FnName|?FnArgs]], + ?Method =.. [?H|?FnArgs], + (?H = hilog(?FnName) -> ?Msg = ',Vector value)' + ; ?H = ?FnName -> ?Msg = 'Vector value)' + ), %write('public void delete_')@flora(io), %write(?FnName)@flora(io), %write('(')@flora(io), %writeSetlist(?FnArgs), - %writeln(',Vector value)')@flora(io). - -%nonInhSetDeleteAllProto(?Method):- - ?Method=..?L, - ?L=[?FnName|?FnArgs], - ?FnName\=flapply, - %write('public void delete_')@flora(io), - %write(?FnName)@flora(io), - %write('(')@flora(io), - %writeGetlist(?FnArgs), - %write(')')@flora(io). + %writeln(?Msg)@flora(io). %nonInhSetDeleteAllProto(?Method):- - ?Method=..?L,?L=[flapply|[?FnName|?FnArgs]], + ?Method =.. [?H|?FnArgs], + (?H = hilog(?FnName), ! ; ?H = ?FnName), %write('public void delete_')@flora(io), %write(?FnName)@flora(io), %write('(')@flora(io), @@ -452,18 +383,12 @@ %writeln('}')@flora(io). %parentCallSetBody(?Method,?Inherit):- - ?Method=..?L,?L=[flapply|[?FnName|?FnArgs]], + ?Method =.. [?H|?FnArgs], + (?H = hilog(?FnName), ! ; ?H = ?FnName), %writeVectorParsInit, %writeBodyList(?FnArgs), %writeProxySetCall(?FnName,?Inherit). -%parentCallSetBody(?Method,?Inherit):- - ?Method=..?L,?L=[?FnName|?FnArgs], - ?FnName\=flapply, - %writeVectorParsInit, - %writeBodyList(?FnArgs), - %writeProxySetCall(?FnName,?Inherit). - %writeVectorParsInit:- %writeln('Vector pars = new Vector();')@flora(io). @@ -475,14 +400,8 @@ %writeln(',pars,value);')@flora(io). %parentCallGetBody(?Method,?Inherit,?Single):- - ?Method=..?L,?L=[flapply|[?FnName|?FnArgs]], - %writeVectorParsInit, - %writeBodyList(?FnArgs), - %writeProxyGetCall(?FnName,?Inherit,?Single). - -%parentCallGetBody(?Method,?Inherit,?Single):- - ?Method=..?L,?L=[?FnName|?FnArgs], - ?FnName\=flapply, + ?Method =.. [?H|?FnArgs], + (?H = hilog(?FnName), ! ; ?H = ?FnName), %writeVectorParsInit, %writeBodyList(?FnArgs), %writeProxyGetCall(?FnName,?Inherit,?Single). @@ -498,14 +417,8 @@ %parentCallGetAllBody(?Method,?Inherit,?Single):- - ?Method=..?L,?L=[flapply|[?FnName|?FnArgs]], - %writeVectorParsInit, - %writeGetAllBodyList(?FnArgs), - %writeProxyGetAllCall(?FnName,?Inherit,?Single). - -%parentCallGetAllBody(?Method,?Inherit,?Single):- - ?Method=..?L,?L=[?FnName|?FnArgs], - ?FnName\=flapply, + ?Method =.. [?H|?FnArgs], + (?H = hilog(?FnName), ! ; ?H = ?FnName), %writeVectorParsInit, %writeGetAllBodyList(?FnArgs), %writeProxyGetAllCall(?FnName,?Inherit,?Single). @@ -520,18 +433,12 @@ %writeln(',pars);')@flora(io). %parentCallDeleteBody(?Method,?Inherit):- - ?Method=..?L,?L=[flapply|[?FnName|?FnArgs]], + ?Method =.. [?H|?FnArgs], + (?H = hilog(?FnName), ! ; ?H = ?FnName), %writeVectorParsInit, %writeBodyList(?FnArgs), %writeProxyDeleteBody(?FnName,?Inherit). -%parentCallDeleteBody(?Method,?Inherit):- - ?Method=..?L,?L=[?FnName|?FnArgs], - ?FnName\=flapply, - %writeVectorParsInit, - %writeBodyList(?FnArgs), - %writeProxyDeleteBody(?FnName,?Inherit). - %writeProxyDeleteBody(?FnName,?Inherit):- %write(' proxyFlora.delete("')@flora(io), %write(?FnName)@flora(io), @@ -540,14 +447,8 @@ %writeln(',pars,value);')@flora(io). %parentCallDeleteAllBody(?Method,?Inherit,?Single):- - ?Method=..?L,?L=[flapply|[?FnName|?FnArgs]], - %writeVectorParsInit, - %writeBodyList(?FnArgs), - %writeProxyDeleteAllBody(?FnName,?Inherit,?Single). - -%parentCallDeleteAllBody(?Method,?Inherit,?Single):- - ?Method=..?L,?L=[?FnName|?FnArgs], - ?FnName\=flapply, + ?Method =.. [?H|?FnArgs], + (?H = hilog(?FnName), ! ; ?H = ?FnName), %writeVectorParsInit, %writeBodyList(?FnArgs), %writeProxyDeleteAllBody(?FnName,?Inherit,?Single). |
|
From: Michael K. <ki...@us...> - 2005-10-17 23:27:29
|
Update of /cvsroot/flora/flora-testsuite/general_tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27862/general_tests Modified Files: pretty_old Log Message: changed anon var from _ to ? Index: pretty_old =================================================================== RCS file: /cvsroot/flora/flora-testsuite/general_tests/pretty_old,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- pretty_old 26 Jul 2005 21:23:41 -0000 1.4 +++ pretty_old 17 Oct 2005 23:27:20 -0000 1.5 @@ -9,8 +9,8 @@ remarks *-> '', rpe *-> 'nottaken', *active, - %print(_), - %enroll(_,_) + %print(?), + %enroll(?,?) ]. Class info: @@ -24,8 +24,8 @@ remarks *-> '', rpe *-> 'nottaken', *active, - %print(_), - %enroll(_,_) + %print(?), + %enroll(?,?) ]. 'john' : 'student'. |
|
From: Michael K. <ki...@us...> - 2005-10-17 23:26:26
|
Update of /cvsroot/flora/flora2/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27565/lib Modified Files: flrprettyprint.flr flrio.flr Log Message: adjusted the use of =.. to its new, expanded semantics Index: flrprettyprint.flr =================================================================== RCS file: /cvsroot/flora/flora2/lib/flrprettyprint.flr,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- flrprettyprint.flr 17 Oct 2005 05:25:33 -0000 1.15 +++ flrprettyprint.flr 17 Oct 2005 23:26:18 -0000 1.16 @@ -353,11 +353,8 @@ fail. %flora_pp_immediate_superclasses(?_,?_) :- true. -// Replaces each var with atom '_' for nicer output +// Replaces each var with atom '?' for nicer output %ground_list([]) :- !. %ground_list([?H|?T]) :- - (var(?H)@prolog(), !, ?H='_' ; true), + (var(?H)@prolog(), !, ?H='?' ; true), %ground_list(?T). - - - Index: flrio.flr =================================================================== RCS file: /cvsroot/flora/flora2/lib/flrio.flr,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- flrio.flr 26 Jul 2005 00:33:34 -0000 1.15 +++ flrio.flr 17 Oct 2005 23:26:18 -0000 1.16 @@ -164,13 +164,12 @@ // This is used for fmt_write_* predicates. Takes a *prolog* term argument // of the form -// _(arg1,...,argn) and returns _(arg1',..., argn'), where arg_i=arg_i' +// arg(arg1,...,argn) and returns arg(arg1',..., argn'), where arg_i=arg_i' // if arg_i is not compound. Otherwise we apply flora_write_oid/1 // This is needed in order make sure that arguments like f(a) are printed -// as f(a) and not _flora'main'f(a) or something like that. +// as f(a) and not flapply(f,a) or something like that. %florify_arguments(?WrappedArgs,?OutTerm) :- - ?WrappedArgs =.. [?Wrapper, ?Fun | ?Args], - (?Wrapper==WRAP_HILOG;?Wrapper==WRAP_TABLED_HILOG), + ?WrappedArgs =.. [hilog(?Fun) | ?Args], !, %florify_arglist(?Args,?OutList), ?OutTerm =.. [?Fun|?OutList]. |
|
From: Michael K. <ki...@us...> - 2005-10-17 05:55:25
|
Update of /cvsroot/flora/flora2/syslib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14562/syslib Modified Files: flrmetaops.P Log Message: added an error check Index: flrmetaops.P =================================================================== RCS file: /cvsroot/flora/flora2/syslib/flrmetaops.P,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- flrmetaops.P 16 Oct 2005 21:46:28 -0000 1.22 +++ flrmetaops.P 17 Oct 2005 05:55:12 -0000 1.23 @@ -440,6 +440,13 @@ flora_add_last(Args,AugmentedArgs,[WS,_]), flora_module_predicate(WRAP_HILOG,[PredName|AugmentedArgs],WS,X) ; + Head = WRAP_HILOG('%hilog',PredName) + -> + flora_decode_goal_as_atom(X,Xdecoded), + flora_decode_goal_as_atom(Y,Ydecoded), + flora_abort([Xdecoded,'=..',Ydecoded, + ' : wrong syntax to the right of =..']) + ; Head = WRAP_HILOG(flogic,FlogicSymbol,WS) -> flogic_wrapper(Wrapper,FlogicSymbol,ArgNo), @@ -448,7 +455,7 @@ flora_decode_goal_as_atom(X,Xdecoded), flora_decode_goal_as_atom(Y,Ydecoded), flora_abort([Xdecoded,'=..',Ydecoded, - ' : wrong number of components on the right']) + ' : wrong number of components to the right of =..']) ), flora_add_last(Args,AugmentedArgs,[WS,_]), flora_module_predicate(Wrapper,AugmentedArgs,WS,X) @@ -458,7 +465,7 @@ flora_decode_goal_as_atom(X,Xdecoded), flora_decode_goal_as_atom(Y,Ydecoded), flora_abort([Xdecoded,'=..',Ydecoded, - ' : wrong syntax on the right']) + ' : wrong syntax to the right of =..']) ). %% For now, this predicate fails for most of the wrong syntax |
|
From: Hui W. <hw...@us...> - 2005-10-17 05:25:46
|
Update of /cvsroot/flora/flora2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9411 Modified Files: flora2.P flrcoder.H flrcoder.P flrcompiler.H flrcompiler.P flrcomposer.P flrdependency.H flrdependency.P flrlexer.P flrlibman.P flroperator.P flrparser.H flrparser.P flrregistry.P flrundefined.H flrundefined.P flrutils.H flrutils.P Log Message: 1, Supports for URIs (http://www.daml.org/services/swsl-rules/1.0/#swsl-rules-basic-defs); 2, More specific error reporting in flrcoder; 3, Fix bugs in syntax error reporting about underscore. Index: flrparser.H =================================================================== RCS file: /cvsroot/flora/flora2/flrparser.H,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- flrparser.H 16 Apr 2005 07:38:45 -0000 1.6 +++ flrparser.H 17 Oct 2005 05:25:33 -0000 1.7 @@ -51,3 +51,5 @@ :- import flora_system_module/1 from flrlibman. :- export flora_parse/3. + +:- export fldirective_struct/3. Index: flrdependency.H =================================================================== RCS file: /cvsroot/flora/flora2/flrdependency.H,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- flrdependency.H 20 Aug 2004 16:44:28 -0000 1.10 +++ flrdependency.H 17 Oct 2005 05:25:33 -0000 1.11 @@ -9,7 +9,8 @@ :- import flora_set_counter/2, - flora_get_counter/2 + flora_get_counter/2, + flora_concat_atoms/2 from flrporting. :- import @@ -21,13 +22,18 @@ :- import is_prrule/3, + is_pratom/3, + is_prstring/3, is_prdirective/2, is_prignoredep/2, - flora_build_struct/6 + is_prprefixdef/3, + flora_build_struct/7 from flrcoder. :- import get_canonical_form/2 from flrcanon. +:- import flora_depchk_prefixdef/3 from flrregistry. + :- dynamic rule(_,_,_). :- dynamic target(_,_,_). :- dynamic tabled_head(_). Index: flrcoder.H =================================================================== RCS file: /cvsroot/flora/flora2/flrcoder.H,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- flrcoder.H 26 Jul 2005 00:33:32 -0000 1.14 +++ flrcoder.H 17 Oct 2005 05:25:33 -0000 1.15 @@ -51,6 +51,12 @@ %% Undefinedness support :- dynamic using_debug_prefix(_). +:- import + flora_coder_prefixdef/2, + flora_shell_prefixdef/3, + flora_depchk_prefixdef/3 + from flrregistry. + :- export flora_divide_program/3, flora_extern_code/2, @@ -70,6 +76,8 @@ is_prvariable/3, is_prtransactionalvariable/3, is_prstring/3, + is_pruri/3, + is_prurisq/3, is_prlist/4, is_prfdbstorage/3, is_skolem/5, @@ -80,6 +88,7 @@ is_prtransactionalatomlit/3, is_prtermlit/4, is_prtransactionaltermlit/4, + is_prprefixdef/3, is_prworkspace/3, is_florasyslib/5, is_prologterm/4, @@ -89,5 +98,5 @@ is_prreify/2, is_flogic/4, is_fllibdb/1, - flora_write_struct/2, - flora_build_struct/6. + flora_write_struct/3, + flora_build_struct/7. Index: flrcompiler.P =================================================================== RCS file: /cvsroot/flora/flora2/flrcompiler.P,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- flrcompiler.P 16 Oct 2005 21:45:53 -0000 1.84 +++ flrcompiler.P 17 Oct 2005 05:25:33 -0000 1.85 @@ -78,6 +78,9 @@ is_flsemantics(FLSEMANTICS(A),A). is_flsetsemantics(FLSETSEMANTICS(A),A). is_flcmpopt(FLCMPOPT(OptList),OptList). + +is_flprefixdef(FLPREFIXDEF(PrefixName,PrefixStr),PrefixName,PrefixStr). + is_flignoredep(FLIGNOREDEP(PredList),PredList). %% These two are used for the build process only--want to get rid of them @@ -188,7 +191,9 @@ is_flstring(FLSTRING(String,_I),String). is_fltransactionalstring(FLTRANSACTIONALSTRING(String,_I),String). is_fltoken(FLTOKEN(Token,I),Token,I). -is_fltoken(FLTOKEN(Token,Num,I),Token,Num,I). +is_fltoken(FLTOKEN(Token,Num,I),Token,Num,I). +is_fluri(FLURI(Uri,_I),Uri). +is_flurisq(FLURISQ(Prefix,Localname),Prefix,Localname). is_flvar(FLVAR(Name,Index),Name,Index). is_fltransactionalvar(FLTRANSACTIONALVAR(Name,Index),Name,Index). @@ -268,6 +273,7 @@ import_struct(F,N,M,PRIMPORT(F,N,M)). cmpopt_struct(OptList,PRCMPOPT(OptList)). ignoredep_struct(SpecList,PRIGNOREDEP(SpecList)). +prefixdef_struct(PrefixName,PrefixStr,PRPREFIXDEF(PrefixName,PrefixStr)). is_prfact(PRFACT(Head),Head). @@ -357,6 +363,13 @@ strobj_struct(FLSTRING(String,I),PRSTRING(String,I)). transactionalstrobj_struct(FLTRANSACTIONALSTRING(String,I),PRSTRING(String,I)). + +uriobj_struct(FLURI(Uri,I),PRURI(Uri,I)). + +urisqobj_struct(FLURISQ(Prefix,Localname),PRURISQ(PrefixAtom,LocalnameStr)) :- + atomobj_struct(Prefix,PrefixAtom), + strobj_struct(Localname,LocalnameStr). + newoid_struct(Oid,Index,PRNEWOID(Oid,Index)). cut_struct(Index,PRCUT(Index)). @@ -1053,6 +1066,8 @@ is_varobj_struct(PRVARIABLE(_Name,_I)). is_varobj_struct(PRVARIABLE(_Name,Index),Index). is_strobj_struct(PRSTRING(_String,_I)). +is_uriobj_struct(PRURI(_Uri,_I)). +is_urisqobj_struct(PRURISQ(_Prefix,_Localname)). is_transactionalvar_struct(PRTRANSACTIONALVARIABLE(_Name,Index),Index). allvars(Term,Vars) :- @@ -1078,7 +1093,9 @@ allvars(Term,Vars,Vars) :- ( is_atomobj_struct(Term); is_numobj_struct(Term); - is_strobj_struct(Term) + is_strobj_struct(Term); + is_uriobj_struct(Term); + is_urisqobj_struct(Term) ), !. @@ -1131,6 +1148,8 @@ is_flnumber(ParserTerm,_Number); is_fltransactionalnumber(ParserTerm,_Number); is_flstring(ParserTerm,_String); + is_fluri(ParserTerm,_Uri); + is_flurisq(ParserTerm,_Prefix,_Localname); is_fltransactionalstring(ParserTerm,_String); is_fltoken(ParserTerm,_Token,_I); is_fltoken(ParserTerm,_Token,_Num,_I) @@ -1175,7 +1194,9 @@ ( is_pratom(CompilerTerm,_,_); is_prnumber(CompilerTerm,_,_); is_prtransactionalnumber(CompilerTerm,_,_); - is_prstring(CompilerTerm,_,_) + is_prstring(CompilerTerm,_,_); + is_pruri(CompilerTerm,_,_); + is_prurisq(CompilerTerm,_,_) ), !. @@ -1530,7 +1551,7 @@ /**************************************************************************** compile_directive(+DirectList,+DirctIdx,-CodeDiffList,-Status) - compile_direct(DirectTerm,+DirctIdx,-CodeList,Status) + compile_direct(+DirectTerm,+DirctIdx,-CodeList,-Status) ****************************************************************************/ compile_directive([],_,T-T,[]) :- !. @@ -1572,6 +1593,20 @@ CodeList = [], !. +compile_direct(DirectTerm,Idx,CodeList,Status) :- + is_flprefixdef(DirectTerm,PrefixName,PrefixStr), + compile_pathexplist([PrefixName,PrefixStr],[NameCode,StrCode],_,_,S), + ( S==[] -> + prefixdef_struct(NameCode,StrCode,Direct), + directive_struct(Direct,Code1), + fldirective_struct([DirectTerm],Idx,Term), + compile_query(Term,CodeList-[Code1],Status) + + ; Status=S, + CodeList=[] + ), + !. + %% :- compiler_options compile_direct(DirectTerm,Idx,[Code],[]) :- is_flcmpopt(DirectTerm,OptList), @@ -2304,6 +2339,12 @@ ; is_flstring(ParserTerm,_S) -> strobj_struct(ParserTerm,Object) + ; is_fluri(ParserTerm,_U) -> + uriobj_struct(ParserTerm,Object) + + ; is_flurisq(ParserTerm,_P,_L) -> + urisqobj_struct(ParserTerm,Object) + ; is_fltransactionalstring(ParserTerm,_S) -> transactionalstrobj_struct(ParserTerm,Object) ), @@ -3039,6 +3080,12 @@ ; is_fltransactionalvar(ParserTerm,Name,Index) -> compile_fltransactionalvar_without_trans(Name,Index,Object) + ; is_fluri(ParserTerm,_U) -> + uriobj_struct(ParserTerm,Object) + + ; is_flurisq(ParserTerm,_P,_L) -> + urisqobj_struct(ParserTerm,Object) + ; is_flstring(ParserTerm,_S) -> strobj_struct(ParserTerm,Object) @@ -3422,6 +3469,13 @@ ; is_flobjref(ParserTerm,ObjTerm,RefType,AttTerm), compile_wsflobjref(ObjTerm,RefType,AttTerm,WS,Object,OidCode,Code,Status) + + ; is_flurisq(ParserTerm,_P,_L) -> + urisqobj_struct(ParserTerm,UrisqCode), + workspaceobj_struct(UrisqCode,WS,Object,OidCode), + Code=NULL, + Status = [] + ). @@ -4211,6 +4265,12 @@ ; is_flobjref(ParserTerm,ObjTerm,RefType,AttTerm), compile_head_wsflobjref(ObjTerm,RefType,AttTerm,WS,Object,Code,Status) + + ; is_flurisq(ParserTerm,_P,_L) -> + urisqobj_struct(ParserTerm,UrisqCode), + workspaceobj_struct(UrisqCode,WS,Object,Code), + Status = [] + ). @@ -5056,5 +5116,10 @@ numobj_struct(A,ACode); is_flvar(A,AN,AI),varobj_struct(AN,AI,ACode)), (numobj_struct(P,PCode); is_flvar(P,PN,PI),varobj_struct(PN,PI,PCode)), florasyslib_struct(FLLIBSHDIRECT,4,[FL_INDEX,Mod,ACode,PCode],Code) + + ; is_flprefixdef(DirectTerm,PrefixName,PrefixStr) -> + compile_pathexplist([PrefixName,PrefixStr],[NamePR,StrPR],_,_,_Status), + florasyslib_struct(FLLIBPREFIXDEF,3,[Mod,NamePR,StrPR],Code) + ), !. Index: flrcoder.P =================================================================== RCS file: /cvsroot/flora/flora2/flrcoder.P,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- flrcoder.P 26 Jul 2005 00:33:32 -0000 1.43 +++ flrcoder.P 17 Oct 2005 05:25:33 -0000 1.44 @@ -32,6 +32,7 @@ #include "flora_terms.flh" #include "flora_porting.flh" +#include "standard.h" #define THISMODULE thismodule #define USERMODULE usermodule @@ -61,6 +62,7 @@ is_primport(PRIMPORT(P,A,M),P,A,M). % prolog's :- import (for output only) is_prcmpopt(PRCMPOPT(OptList),OptList). % :- compiler_options/1 directive is_prignoredep(PRIGNOREDEP(PredList),PredList). [...1941 lines suppressed...] + ( HS == [] -> + flora_build_dynrulelist(T,DWS,Prefix,VarList,TCode,TCInd,Status), + append(HCode,TCode,Code), + append(HCInd,TCInd,CInd) + ; + Status = HS, + Code = [], + CInd = [] + ). /**************************************************************************** - flora_build_newpred(+F,+N,+Args,+DWS,+Prefix,?VarList,-Code,-IndexedCode) + flora_build_newpred(+F,+N,+Args,+DWS,+Prefix,?VarList,-Code,-IndexedCode,-Status) ****************************************************************************/ -flora_build_newpred(F,N,Args,DWS,Prefix,VarList,Code,CodeInd) :- - flora_build_wsliteral(USERMODULE,F,N,Args,DWS,DWS,Prefix,VarList,Code,CodeInd). +flora_build_newpred(F,N,Args,DWS,Prefix,VarList,Code,CodeInd,Status) :- + flora_build_wsliteral(USERMODULE,F,N,Args,DWS,DWS,Prefix,VarList,Code,CodeInd,Status). /**************************************************************************** flora_build_newoid(+Oid,+DWS,-Code) Index: flrundefined.P =================================================================== RCS file: /cvsroot/flora/flora2/flrundefined.P,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- flrundefined.P 20 Aug 2005 04:19:01 -0000 1.26 +++ flrundefined.P 17 Oct 2005 05:25:33 -0000 1.27 @@ -416,7 +416,8 @@ **********************************************************************/ generate_patches :- term_seen(Term), - flora_write_struct(Term,FLBODYPREFIX), + flora_write_struct(Term,FLBODYPREFIX,Status), + flora_coder_error(Status), put(0'.),nl, fail. Index: flrutils.P =================================================================== RCS file: /cvsroot/flora/flora2/flrutils.P,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- flrutils.P 15 Oct 2005 19:08:20 -0000 1.60 +++ flrutils.P 17 Oct 2005 05:25:33 -0000 1.61 @@ -2359,6 +2359,21 @@ ), flora_coder_error(L). +flora_coder_error([error(Indx,Msg)|L]) :- + !, + flora_nth_token(Indx,Tk), + flora_token_text(Tk,TextStr,BLN,BCN,_ELN,_ECN), + ( flora_current_compile_filename(FileName) -> + flora_error_line('[~w] [Coder] near line(~w)/char(~w) `~s''', + [FileName,BLN,BCN,TextStr]) + ; + flora_error_line('[Coder] near line(~w)/char(~w) `~s''', + [BLN,BCN,TextStr]) + ), + flora_error_indentline, + flora_stderr_string('~w~n',[Msg]), + flora_coder_error(L). + /***************************************************************************** flora_list2conjunct(+List,-Goal) @@ -2413,13 +2428,13 @@ String: A query string Vars: A list of the form [Name1=Var1, Name2=Var2,...]. Name is a name of a variable mentioned in String, for instance, - 'X' (note: must be quoted, since it is a name). + '?X' (note: must be quoted, since it is a name). Var is a variable where you want the bonding for the variable Name in String to be returned. For instance, - if String is 'p(X,Y).' - Vars can be ['X' = Xyz, 'Y' = Qpr] - Then Xyz will be bound to the value of X in p(X,Y) after - the execution and Qpr will be bound to the value of Y in p(X,Y). + if String is 'p(?X,?Y).' + Vars can be ['?X' = Xyz, '?Y' = Qpr] + Then Xyz will be bound to the value of ?X in p(?X,?Y) after + the execution and Qpr will be bound to the value of ?Y in p(?X,?Y). Status: indicates the status of compilation of the command in String. Exception: is a possible exception during the runtime execution of the command in String. Index: flrlibman.P =================================================================== RCS file: /cvsroot/flora/flora2/flrlibman.P,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- flrlibman.P 3 Apr 2005 06:38:09 -0000 1.15 +++ flrlibman.P 17 Oct 2005 05:25:33 -0000 1.16 @@ -176,6 +176,7 @@ flora_library_file(FLLIBMODOBJ,flrdynmod,syslib) :- !. flora_library_file(FLLIBSEMANTICS,flrsemantics,syslib) :- !. flora_library_file(FLLIBSETSEMANTICS,flrsemantics,syslib) :- !. +flora_library_file(FLLIBPREFIXDEF,flrprefixdef,syslib) :- !. flora_library_file(FLLIBDYNRULE,flrdynrule,syslib) :- !. flora_library_file(FLLIBNEWMODULE,flrdynrule,syslib) :- !. Index: flroperator.P =================================================================== RCS file: /cvsroot/flora/flora2/flroperator.P,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- flroperator.P 16 Oct 2005 21:45:53 -0000 1.24 +++ flroperator.P 17 Oct 2005 05:25:33 -0000 1.25 @@ -37,6 +37,7 @@ flora_op(1600,xfx,FL_BAR). flora_op(1600,fx,FL_INDEX). flora_op(1600,fx,FL_EXPORT). +flora_op(1600,fx,FL_PREFIXDEF). flora_op(1300,fx,FL_UPDATABLE). flora_op(1600,fx,FL_CMPOPT). flora_op(1600,fx,FL_IGNOREDEP). @@ -115,6 +116,7 @@ flora_op(800,yfx,FL_PLUS). flora_op(800,yfx,FL_MINUS). flora_op(800,yfx,FL_SYMOR). +flora_op(800,yfx,FL_URISQOP). flora_op(700,yfx,FL_STAR). flora_op(700,yfx,FL_SLASH). Index: flrundefined.H =================================================================== RCS file: /cvsroot/flora/flora2/flrundefined.H,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- flrundefined.H 26 Jul 2005 00:33:32 -0000 1.16 +++ flrundefined.H 17 Oct 2005 05:25:33 -0000 1.17 @@ -43,7 +43,10 @@ flora_concat_items/2 from flrporting. -:- import flora_abort/1 from flrutils. +:- import + flora_abort/1, + flora_coder_error/1 + from flrutils. :- import flora_disabled_undefinedness_check_registry/3 from flrregistry. @@ -61,7 +64,7 @@ is_prtransactionalatomlit/3, is_prtermlit/4, is_prtransactionaltermlit/4, - flora_write_struct/2 + flora_write_struct/3 from flrcoder. :- import Index: flrparser.P =================================================================== RCS file: /cvsroot/flora/flora2/flrparser.P,v retrieving revision 1.88 retrieving revision 1.89 diff -u -d -r1.88 -r1.89 --- flrparser.P 16 Oct 2005 21:45:53 -0000 1.88 +++ flrparser.P 17 Oct 2005 05:25:33 -0000 1.89 @@ -135,7 +135,7 @@ '=>' | '=>>' | '*=>' | '*=>>' | '+>' | '*+>' | '->->' | '*->->' -PathExpression := atom | number | string | variable | specialOidToken +PathExpression := atom | number | string | uri | variable | specialOidToken PathExpression := Term | List | ReifiedFormula PathExpression := PathExpression PathExpressionConnective PathExpression PathExpression := BinaryRelationship @@ -501,7 +501,7 @@ get_index(OBJECT(_PrimitiveType,Index),Index) :- !. get_index(FLATOM(_Name,Index),Index) :- !. - +get_index(FLSTRING(_Str,Index),Index) :- !. get_index(FLVAR(_Name,Index),Index) :- !. @@ -526,6 +526,8 @@ is_birelop(FL_ISA) :- !. is_birelop(FL_SUB) :- !. +is_urisqop(FL_URISQOP) :- !. + is_objrefop(A) :- is_fdobjrefop(A), !. is_objrefop(A) :- is_mvdobjrefop(A), !. @@ -593,6 +595,8 @@ flexport_struct(DynamicModule,Term,Modules,Updtag,FLEXPORT(DynamicModule,Term,Modules,FLATOM(Updtag,_I))). flexport_struct_list(TermList,FLEXPORT_LIST(TermList)). +flprefixdef_struct(PrefixName,PrefixStr,FLPREFIXDEF(PrefixName,PrefixStr)). + fldynrule_struct(Head,Body,FLDYNRULE(Head,Body)). %%flargumentsdirect_struct(F,N,Args,FLARGUMENTS(F,N,Args)). @@ -620,6 +624,7 @@ flobject_struct(OBJECT(NUMBER(Num),I),FLNUMBER(Num,I)) :- !. flobject_struct(OBJECT(ASCII_STRING(Str),I),FLSTRING(Str,I)) :- !. flobject_struct(OBJECT(SPECIAL_TOKEN(Atom),I),FLTOKEN(Atom,I)) :- !. +flobject_struct(OBJECT(URI(Uri),I),FLURI(Uri,I)) :- !. fltransactionalobject_struct(OBJECT(TRANSACTIONAL_IDENTIFIER(Atom),I),FLTRANSACTIONALATOM(Atom,I)) :- !. fltransactionalobject_struct(OBJECT(TRANSACTIONAL_QUOTED_ATOM(Atom),I),FLTRANSACTIONALATOM(Atom,I)) :- !. @@ -638,6 +643,7 @@ is_flatom_struct(FLATOM(Atom,_I),Atom). is_flnumber_struct(FLNUMBER(_Num,_I)). is_flstring_struct(FLSTRING(_Str,_I)). +is_fluri_struct(FLURI(_Uri,_I)). flatom_struct(Atom,Index, FLATOM(Atom,Index)). @@ -682,6 +688,8 @@ flbirelate_struct(Subject,R,Object,FLBIRELATE(Subject,R,Object)). +flurisq_struct(PrefixName,LocalName,FLURISQ(PrefixName,LocalName)). + flobjref_struct(Object,M,Attribute,FLOBJREF(Object,M,Attribute)). %% Composes PARSED Funct with PARSED args to compose a parsed term @@ -937,6 +945,7 @@ ; flora_index_directive(CanoniTerm,CodeList,Status) ; flora_setsemantics_directive(CanoniTerm,CodeList,Status) ; flora_cmpopt_directive(CanoniTerm,CodeList,Status) + ; flora_prefixdef_directive(CanoniTerm,CodeList,Status) ; flora_ignoredep_directive(CanoniTerm,CodeList,Status) ), fldirective_struct(CodeList,If,Code), @@ -969,6 +978,7 @@ ; flora_exec_index_directive(CanoniTerm,CodeList,Status) ; flora_exec_setsemantics_directive(CanoniTerm,CodeList,Status) ; flora_exec_semantics_directive(CanoniTerm,CodeList,Status) + ; flora_prefixdef_directive(CanoniTerm,CodeList,Status) ), !. @@ -1791,13 +1801,69 @@ parsing_error(H,ERROR_CMPOPT,Status) ). +/**************************************************************************** + flora_prefixdef_directive(+CanoniTerm,-CodeList,-Status) + Compiling the prefix directive in the form of + :- prefix A="aaa",B="bbb",.... +****************************************************************************/ +flora_prefixdef_directive(CANOTERM(Funct,_N,FL_PARENTHESIS,[T],_If,_Ip),Code,Status) :- + get_name(Funct,FL_PREFIXDEF), + flora_comma_separated_list(T,TermList), + flora_prefixdef_parse_term_list(TermList,Code,Status), + !. + +%% error case. +flora_prefixdef_directive(CANOTERM(Funct,_N,FL_PARENTHESIS,_Args,If,_Ip),[],Status) :- + get_name(Funct,FL_PREFIXDEF), + !, + parsing_error(If,ERROR_PREFIX,Status). + +/**************************************************************************** + flora_prefixdef_parse_term_list(+TermList,-CodeList,-Status) +***************************************************************************/ +flora_prefixdef_parse_term_list([],[],[]) :- !. + +flora_prefixdef_parse_term_list([H|T],Code,Status) :- + flora_prefixdef_parse_term(H,HCode,HStatus), + ( HStatus == [] -> + flora_prefixdef_parse_term_list(T,TCode,Status), + append(HCode,TCode,Code) + ; + Status = HStatus + ). + +/**************************************************************************** + flora_prefixdef_parse_term(+CanoniTerm,-Code,-Status) + ****************************************************************************/ +flora_prefixdef_parse_term(CANOTERM(Funct,N,FL_PARENTHESIS,Args,_If,_Ip),[Code],Status) :- + get_name(Funct,FL_UNIVEQ), + N==2, + !, + Args=[PrefixHead,PrefixBody], + ( PrefixHead=OBJECT(IDENTIFIER(_Name),_Index_Head) -> % make sure that prefix name(the part before '=') is an atom + ( PrefixBody=OBJECT(ASCII_STRING(_Str),_Index_Body) -> % make sure that the part following '=' is a string + flora_pathexplist(Args,NULL,ArgsCode,Status), + ArgsCode=[NameCode,StrCode], + flprefixdef_struct(NameCode,StrCode,Code) + + ; get_index(PrefixBody,Index_Body), + parsing_error(Index_Body,ERROR_PREFIX_BODY,Status) + ) + + ; get_index(PrefixHead,Index_Head), + parsing_error(Index_Head,ERROR_PREFIX_HEAD,Status) + ). + +%% error case +flora_prefixdef_parse_term(CANOTERM(_Funct,_N,_FL_PARENTHESIS,_Args,If,_Ip),[],Status) :- + parsing_error(If,ERROR_PREFIX,Status). + /**************************************************************************** flora_ignoredep_directive(+CanoniTerm,-CodeList,-Status) Compiling the :- ignore_depchk directive ****************************************************************************/ -flora_ignoredep_directive(CANOTERM(Funct,1,FL_PARENTHESIS,[T],_If,_Ip), - [Code],Status) :- +flora_ignoredep_directive(CANOTERM(Funct,1,FL_PARENTHESIS,[T],_If,_Ip),[Code],Status) :- get_name(Funct,FL_IGNOREDEP), ( flora_comma_separated_list(T,PreList) -> flora_parse_body_template_list(PreList,LCode,Status), @@ -2253,7 +2319,7 @@ Note: Textual information is reserved for module names. ****************************************************************************/ -%% Handle Flora user module specification. (@ M) +%% Handle Flora user module specification. (@ ?M) flora_workspace(CanoniTerm,FLORAUSERMOD(NVCode),[]) :- flora_name_or_normvar(CanoniTerm,NVCode), !. @@ -3622,13 +3688,33 @@ ( Status == [] -> ( is_birelop(F) -> flbirelate_struct(LCode,F,RCode,Code) - ; + ; flobjref_struct(LCode,F,RCode,Code) ) ; true ). +% To handle URI SQname structure like W3C#"function" +flora_pathexp(CANOTERM(Funct,2,FL_PARENTHESIS,Args,_If,_Ip),_HF,DWS,Code,Status) :- + get_atom(Funct,F), + is_urisqop(F), + !, + Args=[Prefix,Localname], + ( Prefix=OBJECT(IDENTIFIER(_Prefix),_Index_Prefix) -> % prefix (the part before '#') should be an atom + ( Localname=OBJECT(ASCII_STRING(_Localname),_Index_Localname) -> % localname (the part following '#') should be a string + flora_pathexplist(Args,DWS,ArgsCode,Status), + ArgsCode=[PrefixCode,LocalnameCode], + flurisq_struct(PrefixCode,LocalnameCode,Code) + + ; get_index(Localname,Index_Localname), + parsing_error(Index_Localname,ERROR_SQNAME_LOCAL,Status) + ) + + ; get_index(Prefix,Index_Prefix), + parsing_error(Index_Prefix,ERROR_SQNAME_PREFIX,Status) + ). + %% This procedure is to handle module specification @prolog() and @prologall() %% in the argument position. %% Note that @module (for FLORA modules) is deprecated in the argument position. @@ -3730,6 +3816,7 @@ nowspathexp(S) :- is_flreify_struct(S), !. nowspathexp(S) :- is_flnumber_struct(S), !. nowspathexp(S) :- is_flstring_struct(S), !. +nowspathexp(S) :- is_fluri_struct(S), !. nowspathexp(S) :- is_flatom_struct(S,FAtom), @@ -4127,8 +4214,24 @@ ; F == FL_AT -> %% Module specs for F-logic molecules in the head are not allowed. parsing_error(If,NO_WSINRULEHEAD,Status) - ; - flora_head_term(Funct,2,Args,HF,DWS,Code,Status) + + ; is_urisqop(F) -> + Args=[Prefix,Localname], + ( Prefix=OBJECT(IDENTIFIER(_Prefix),_Index_Prefix) -> % make sure that prefix (the part before '#') is an atom + ( Localname=OBJECT(ASCII_STRING(_Localname),_Index_Localname) -> % make sure that localname (the part following '#') is a string + flora_head_pathexplist(Args,DWS,ArgsCode,Status), + ArgsCode=[PrefixCode,LocalnameCode], + flurisq_struct(PrefixCode,LocalnameCode,Code) + + ; get_index(Localname,Index_Localname), + parsing_error(Index_Localname,ERROR_SQNAME_LOCAL,Status) + ) + + ; get_index(Prefix,Index_Prefix), + parsing_error(Index_Prefix,ERROR_SQNAME_PREFIX,Status) + ) + + ; flora_head_term(Funct,2,Args,HF,DWS,Code,Status) ). flora_head_pathexp(CANOTERM(Funct,N,FL_PARENTHESIS,Args,_If,_Ip),HF,DWS,Code,Status) :- @@ -4733,6 +4836,26 @@ (Status == [] -> flobjref_struct(LCode,F,RCode,Code); true) ). +% To handle URI SQname structure like W3C#"function" +flora_db_pathexp(Mode,CANOTERM(Funct,2,FL_PARENTHESIS,Args,_If,_Ip),_HF,DWS,Code,Status) :- + get_atom(Funct,F), + is_urisqop(F), + !, + Args=[Prefix,Localname], + ( Prefix=OBJECT(IDENTIFIER(_Prefix),_Index_Prefix) -> % prefix (the part before '#') should be an identifier + ( Localname=OBJECT(ASCII_STRING(_Localname),_Index_Localname) -> % localname (the part following '#') should be a string + flora_db_pathexplist(Mode,Args,DWS,ArgsCode,Status), + ArgsCode=[PrefixCode,LocalnameCode], + flurisq_struct(PrefixCode,LocalnameCode,Code) + + ; get_index(Localname,Index_Localname), + parsing_error(Index_Localname,ERROR_SQNAME_LOCAL,Status) + ) + + ; get_index(Prefix,Index_Prefix), + parsing_error(Index_Prefix,ERROR_SQNAME_PREFIX,Status) + ). + flora_db_pathexp(Mode,CANOTERM(Funct,2,FL_PARENTHESIS,[L,R],If,_Ip),HF,_DWS,Code,Status) :- get_atom(Funct,FL_AT), !, Index: flora2.P =================================================================== RCS file: /cvsroot/flora/flora2/flora2.P,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- flora2.P 30 Aug 2005 04:58:46 -0000 1.15 +++ flora2.P 17 Oct 2005 05:25:32 -0000 1.16 @@ -306,13 +306,13 @@ String: A query string Vars: A list of the form [Name1=Var1, Name2=Var2,...]. Name is a name of a variable mentioned in String, for instance, - 'X' (note: must be quoted, since it is an atom). + '?X' (note: must be quoted, since it is an atom). Var is a variable where you want the binding for the variable Name in String to be returned. For instance, - if String is 'p(X,Y).' - Vars can be ['X' = Xyz, 'Y' = Qpr] - Then Xyz will be bound to the value of X in p(X,Y) after - the execution and Qpr will be bound to the value of Y in p(X,Y). + if String is 'p(?X,?Y).' + Vars can be ['?X' = Xyz, '?Y' = Qpr] + Then Xyz will be bound to the value of ?X in p(?X,?Y) after + the execution and Qpr will be bound to the value of ?Y in p(?X,?Y). Status: indicates the status of compilation of the command in String. Exception: is a possible exception during the runtime execution of the command in String. Index: flrutils.H =================================================================== RCS file: /cvsroot/flora/flora2/flrutils.H,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- flrutils.H 15 Oct 2005 19:08:20 -0000 1.32 +++ flrutils.H 17 Oct 2005 05:25:33 -0000 1.33 @@ -250,4 +250,6 @@ flora_compile_add/2, flora_compile_add/1, - flora_patch_full_filename/1. + flora_patch_full_filename/1, + + flora_coder_error/1. Index: flrlexer.P =================================================================== RCS file: /cvsroot/flora/flora2/flrlexer.P,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- flrlexer.P 13 Oct 2005 02:07:54 -0000 1.16 +++ flrlexer.P 17 Oct 2005 05:25:33 -0000 1.17 @@ -175,6 +175,7 @@ flora_transactional_number_struct(+Num,+TextStr,+LN1,+CN1,+LN2,+CN2,-Token) flora_quoted_atom_struct(+AtomStr,+TextStr,+LN1,+CN1,+LN2,+CN2,-Token) flora_transactional_quoted_atom_struct(+AtomStr,+TextStr,+LN1,+CN1,+LN2,+CN2,-Token) + flora_uri_struct(+UriStr,+TextStr,+LN1,+CN1,+LN2,+CN2,-Token) flora_ascii_string_struct(+ASCII,+TextStr,+LN1,+CN1,+LN2,+CN2,-Token) flora_transactional_ascii_string_struct(+ASCII,+TextStr,+LN1,+CN1,+LN2,+CN2,-Token) flora_symbol_token_struct(+TextStr,+LN1,+CN1,+LN2,+CN2,-Token) @@ -217,6 +218,9 @@ text_info(LN1,CN1,LN2,CN2,TextStr,Text), atom_codes(A,AtomStr). +flora_uri_struct(UriStr,TextStr,LN1,CN1,LN2,CN2,URI(UriStr,Text)) :- + text_info(LN1,CN1,LN2,CN2,TextStr,Text). + flora_ascii_string_struct(ASCII,TextStr,LN1,CN1,LN2,CN2,ASCII_STRING(ASCII,Text)) :- text_info(LN1,CN1,LN2,CN2,TextStr,Text). @@ -433,18 +437,15 @@ ; (Char >= CH_a, Char =< CH_z;Char >= CH_A, Char =< CH_Z) -> read_identifier(Char,LineNo,CharNo,NextLN,NextCN,TokenList,Status) - ; Char == CH_UNDERSCORE -> - read_anonyoid(Char,LineNo,CharNo,NextLN,NextCN,TokenList,Status) - ; Char == CH_QUESTION -> get_char(NextLN,NextCN,NChar,NNLN,NNCN),% get the next character to see if there is a '?-' ( NChar \== CH_MINUS -> ( (NChar >= CH_a, NChar =< CH_z;NChar >= CH_A, NChar =< CH_Z) -> - % the case '?alphabet' is a variable + % the case '?alphanum' is a variable read_variable(NChar,NextLN,NextCN,NNLN,NNCN,TokenList,Status) ; NChar == CH_UNDERSCORE -> - % the case '?_[alphabet]' is an anonymous variable + % the case '?_[alphanum]' is an anonymous variable read_underscore_variable(NChar,NextLN,NextCN,NNLN,NNCN,TokenList,Status) ; % the case '?' itself is an anonymous variable @@ -456,7 +457,7 @@ ) ; peek_char(NextNextChar), - ( NextNextChar == '>' -> + ( NextNextChar == FL_GT -> % the case 'x[?->y]'. ? is an anonymous variable % since the cursor cannot be set backward, we construct a token here to avoid losing it. flora_variable_struct([CH_UNDERSCORE],LineNo,CharNo,LineNo,CharNo,Tk), @@ -475,6 +476,9 @@ ) + ; Char == CH_UNDERSCORE -> + read_underscore(Char,LineNo,CharNo,NextLN,NextCN,TokenList,Status) + ; Char >= CH_0, Char =< CH_9 -> read_number(Char,LineNo,CharNo,NextLN,NextCN,TokenList,Status) @@ -495,8 +499,7 @@ Status=[FLORA_NOT_EOF,error(UNEXP_DEL_ISO)], set_charpos(NextLN,NextCN) - ; - read_special(Char,LineNo,CharNo,NextLN,NextCN,TokenList,Status) + ; read_special(Char,LineNo,CharNo,NextLN,NextCN,TokenList,Status) ). /**************************************************************************** @@ -705,6 +708,29 @@ NNCN = NextCN ). + +/**************************************************************************** +read_underscore(+Char,+LineNo,+CharNo,+NextLN,+NextCN,-TokenList,-Status) + This function handles full uris, e.g._"uri", and two special tokens: + _#, _#<number> -- which generates new oids in rule head. Its use + in places other than rule head generates an error. + _@ -- which is replaced by the preprocessor constant + FLORA_THIS_MODULE_NAME. +****************************************************************************/ +read_underscore(Char,LineNo,CharNo,NextLN,NextCN,TokenList,Status) :- + peek_char(NextChar), + ( NextChar == FL_DOUBLEQUOTE -> + read_uri(Char,LineNo,CharNo,NextLN,NextCN,TokenList,Status) + + ; ( NextChar == FL_HASH; NextChar == FL_AT) -> + read_anonyoid(Char,LineNo,CharNo,NextLN,NextCN,TokenList,Status) + + ; Status = [FLORA_NOT_EOF,error(AFTER_UNDERSCORE)], + flora_special_token_struct([Char],LineNo,CharNo,LineNo,CharNo,Tk), + TokenList = [Tk] + ). + + /**************************************************************************** read_anonyoid(+Char,+LineNo,+CharNo,+NextLN,+NextCN,-TokenList,-Status) This function handles two special tokens: @@ -729,8 +755,9 @@ NNLN=LNN, NNCN=CNN, flora_special_token_struct([C1,Ch],LN1,CN1,LN,CN,Tk) - ) - ; Ch == CH_AT, % The special token _@ is read + ) + + ; Ch == CH_AT, % The special token _@ is read NLN=NextLN, NCN=NextCN, get_char(NLN,NCN,NCh,NNLN,NNCN), @@ -786,7 +813,7 @@ read_name(Ch,LN,CN,NextLN,NextCN,Chars,LN3,CN3,NCh,NLN,NCN,NNLN,NNCN) ; Ch >= CH_A, Ch =< CH_Z -> - read_name(Ch,LN,CN,NextLN,NextCN,Chars,LN3,CN3,NCh,NLN,NCN,NNLN,NNCN) + read_name(Ch,LN,CN,NextLN,NextCN,Chars,LN3,CN3,NCh,NLN,NCN,NNLN,NNCN) ; Ch >= CH_0, Ch =< CH_9 -> read_name(Ch,LN,CN,NextLN,NextCN,Chars,LN3,CN3,NCh,NLN,NCN,NNLN,NNCN) @@ -808,6 +835,23 @@ !, read_tokens(NCh,NLN,NCN,NNLN,NNCN,Tokens,Status). + +/**************************************************************************** + read_uri(+C1,+LN1,+CN1,+LN,+CN,-TokenList,-Status) :- + handles a full uri such as _"http://www.w3c.org/examples". + C1 is _, and it is already known that the character next to C1 is ". +****************************************************************************/ +read_uri(C1,LN1,CN1,LN,CN,TokenList,Status) :- + get_char(LN,CN,Ch,NextLN,NextCN), + C1 == CH_UNDERSCORE, + Ch == CH_DOUBLEQUOTE, + get_char(NextLN,NextCN,NextCh,NNLN,NNCN), + read_string(NextCh,NextLN,NextCN,NNLN,NNCN,LN,CN,CH_DOUBLEQUOTE, + Chars,TxChs,LLN,LCN,Tokens,Status), + flora_uri_struct(Chars,[CH_DOUBLEQUOTE|TxChs],LN1,CN1,LLN,LCN,Tk), + TokenList = [Tk|Tokens]. + + /**************************************************************************** read_special(+Ch,+LineNo,+CharNo,+NextLN,+NextCN,-Tokens,-Status) handles tokens made of special symbols. Index: flrcomposer.P =================================================================== RCS file: /cvsroot/flora/flora2/flrcomposer.P,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- flrcomposer.P 26 Jul 2005 00:33:32 -0000 1.8 +++ flrcomposer.P 17 Oct 2005 05:25:33 -0000 1.9 @@ -141,6 +141,7 @@ is_sole_operand(TRANSACTIONAL_VARIABLE(_,_)) :- !. is_sole_operand(TRANSACTIONAL_NUMBER(_,_)) :- !. is_sole_operand(TRANSACTIONAL_SYMBOL_TOKEN(_,_)) :- !. +is_sole_operand(URI(_,_)) :- !. is_sole_operand(IDENTIFIER(I,_)) :- \+ flora_opdef(_,_,I), !. is_sole_operand(QUOTED_ATOM(QA,_)) :- \+ flora_opdef(_,_,QA), !. @@ -154,6 +155,7 @@ is_sole_operator(SYMBOL_TOKEN(FL_SEMICOLON,_),FL_SEMICOLON) :- !. is_sole_operator(SYMBOL_TOKEN(FL_IMPLYOP,_),FL_IMPLYOP) :- !. is_sole_operator(SYMBOL_TOKEN(FL_QUERYOP,_),FL_QUERYOP) :- !. +is_sole_operator(SYMBOL_TOKEN(FL_URISQOP,_),FL_URISQOP) :- !. %%is_sole_operator(SYMBOL_TOKEN(FL_TRAN,_),FL_TRAN) :- !. Index: flrdependency.P =================================================================== RCS file: /cvsroot/flora/flora2/flrdependency.P,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- flrdependency.P 13 Apr 2005 17:09:49 -0000 1.22 +++ flrdependency.P 17 Oct 2005 05:25:33 -0000 1.23 @@ -454,7 +454,8 @@ generate_rules([]) :- !. generate_rules(CodeList) :- retractall(rule(_,_,_)), - parse_codelist(CodeList). + parse_codelist(CodeList), + retractall(flora_depchk_prefixdef(_,_,_)). /**************************************************************************** parse_codelist(+CodeList) @@ -473,46 +474,69 @@ ( is_prrule(Term,Head,Body) -> parse_rule(Head,Body) ; - is_prdirective(Term,Direct), is_prignoredep(Direct,PList) -> - assert_ignoredlist(PList) + is_prdirective(Term,Direct) -> + ( is_prignoredep(Direct,PList) -> + assert_ignoredlist(PList) + + ; is_prprefixdef(Direct,PrefixName,PrefixStr) -> + is_pratom(PrefixName,NameAtom,_Index), + is_prstring(PrefixStr,String,_Index2), + flora_concat_atoms(['flora_prefix_',NameAtom],NameCode), + (flora_depchk_prefixdef(DEFAULT_WORKSPACE,NameCode,_)->retract(flora_depchk_prefixdef(DEFAULT_WORKSPACE,NameCode,_));true), + assert(flora_depchk_prefixdef(DEFAULT_WORKSPACE,NameCode,String)) + + ; true + ) ; true ). assert_ignoredlist([]) :- !. assert_ignoredlist([H|L]) :- - flora_build_struct(H,DEFAULT_WORKSPACE,FLBODYPREFIX,_VarList,HC,_HCI), - ( var(HC) -> - true - ; - ( functor(HC,DB,3), dboperation(DB,3) -> - HC =.. [DB,WS,DBList,Cond], - canonical_list(DBList,CDBList), - get_canonical_form(Cond,FLCANON(_W,_A,_M,CallCond,_TF)), - NHC =.. [DB,WS,CDBList,CallCond] - ; - functor(HC,DB,2), dboperation(DB,2) -> - HC =.. [DB,WS,DBList], - canonical_list(DBList,CDBList), - NHC =.. [DB,WS,CDBList] - ; - functor(HC,DB,4), moduleloading(DB,4) -> - HC =.. [DB,LList|_Rest], - NHC =.. [DB,LList,_,_,_] - ; - NHC = HC - ), - get_canonical_form(NHC,FLCANON(Wrap,Args,Mod,_Callable,_TF)) - ), - assert(ignored(Wrap,Args,Mod)), - assert_ignoredlist(L). + flora_build_struct(H,DEFAULT_WORKSPACE,FLBODYPREFIX,_VarList,HC,_HCI,Status), + ( Status == [] -> + ( var(HC) -> + true + ; + ( functor(HC,DB,3), dboperation(DB,3) -> + HC =.. [DB,WS,DBList,Cond], + canonical_list(DBList,CDBList), + get_canonical_form(Cond,FLCANON(_W,_A,_M,CallCond,_TF)), + NHC =.. [DB,WS,CDBList,CallCond] + ; + functor(HC,DB,2), dboperation(DB,2) -> + HC =.. [DB,WS,DBList], + canonical_list(DBList,CDBList), + NHC =.. [DB,WS,CDBList] + ; + functor(HC,DB,4), moduleloading(DB,4) -> + HC =.. [DB,LList|_Rest], + NHC =.. [DB,LList,_,_,_] + ; + NHC = HC + ), + get_canonical_form(NHC,FLCANON(Wrap,Args,Mod,_Callable,_TF)) + ), + assert(ignored(Wrap,Args,Mod)), + assert_ignoredlist(L) + ; + true + ). parse_rule(Head,Body) :- - flora_build_struct(Head,DEFAULT_WORKSPACE,FLBODYPREFIX,VarList,HeadCode,HCI), - functor(HeadCode,F,N), - ( default_tabled(F,N) -> assert(tabled_head((HeadCode,HCI))); true), - flora_build_struct(Body,DEFAULT_WORKSPACE,FLBODYPREFIX,VarList,BodyCode,BCI), - assert_rule((HeadCode,HCI),BodyCode,BCI,anu(_,_,_)). + flora_build_struct(Head,DEFAULT_WORKSPACE,FLBODYPREFIX,VarList,HeadCode,HCI,Status_Head), + ( Status_Head == [] -> + functor(HeadCode,F,N), + ( default_tabled(F,N) -> assert(tabled_head((HeadCode,HCI))); true), + flora_build_struct(Body,DEFAULT_WORKSPACE,FLBODYPREFIX,VarList,BodyCode,BCI,Status_Body), + ( Status_Body == [] -> + assert_rule((HeadCode,HCI),BodyCode,BCI,anu(_,_,_)) + ; + true + ) + ; + true + ). assert_rule(_H,BodyCode,_BI,_) :- var(BodyCode), Index: flrcompiler.H =================================================================== RCS file: /cvsroot/flora/flora2/flrcompiler.H,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- flrcompiler.H 26 Jul 2005 00:33:32 -0000 1.16 +++ flrcompiler.H 17 Oct 2005 05:25:33 -0000 1.17 @@ -30,7 +30,7 @@ flora_set_counter/2, flora_get_counter/2, flora_concat_atoms/2, - flora_match_substring/3 + flora_match_substring/3 from flrporting. :- import @@ -70,13 +70,16 @@ is_prtransactionalvariable/3, is_pratom/3, is_prnumber/3, + is_pruri/3, + is_prurisq/3, is_prtransactionalnumber/3, is_prstring/3 from flrcoder. - :- import flora_error_line/2 from flrprint. +:- import fldirective_struct/3 from flrparser. + :- dynamic compile_with_var_module(_). :- dynamic dynrule_warnings(_). Index: flrregistry.P =================================================================== RCS file: /cvsroot/flora/flora2/flrregistry.P,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- flrregistry.P 15 Oct 2005 19:08:20 -0000 1.7 +++ flrregistry.P 17 Oct 2005 05:25:33 -0000 1.8 @@ -52,6 +52,12 @@ :- index(flora_storage_registry/1,trie). :- index(flora_module_registry/1,trie). +:- dynamic flora_coder_prefixdef/2. + +:- dynamic flora_shell_prefixdef/3. + +:- dynamic flora_depchk_prefixdef/3. + :- export flora_module_registry/1, flora_debug_module_registry/1, @@ -63,4 +69,7 @@ flora_configuration/2, flora_dbmodule_registry/5, flora_dbmodule_handle/4, - flora_dbmodule_inmemory/1. + flora_dbmodule_inmemory/1, + flora_coder_prefixdef/2, + flora_shell_prefixdef/3, + flora_depchk_prefixdef/3. |
|
From: Hui W. <hw...@us...> - 2005-10-17 05:25:45
|
Update of /cvsroot/flora/flora2/syslibinc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9411/syslibinc Added Files: flrprefixdef_inc.flh Log Message: 1, Supports for URIs (http://www.daml.org/services/swsl-rules/1.0/#swsl-rules-basic-defs); 2, More specific error reporting in flrcoder; 3, Fix bugs in syntax error reporting about underscore. --- NEW FILE: flrprefixdef_inc.flh --- /************************************************************************ file: syslibinc/flrprefixdef_inc.flh Author(s): Hui Wan This file is automatically included by the FLORA compiler. ************************************************************************/ :- compiler_options([xpp_on]). #mode standard Prolog #if !defined(FLORA_TERMS_FLH) #define FLORA_TERMS_FLH #include "flora_terms.flh" :- import flora_load_library/1 from flrlibman. #endif ?- flora_load_library(FLLIBPREFIXDEF). /***********************************************************************/ |
|
From: Hui W. <hw...@us...> - 2005-10-17 05:25:45
|
Update of /cvsroot/flora/flora2/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9411/docs Modified Files: flora2.tex hilog_table.txt technical.txt Log Message: 1, Supports for URIs (http://www.daml.org/services/swsl-rules/1.0/#swsl-rules-basic-defs); 2, More specific error reporting in flrcoder; 3, Fix bugs in syntax error reporting about underscore. Index: technical.txt =================================================================== RCS file: /cvsroot/flora/flora2/docs/technical.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- technical.txt 31 Dec 2003 22:11:13 -0000 1.6 +++ technical.txt 17 Oct 2005 05:25:33 -0000 1.7 @@ -128,8 +128,8 @@ 3) Debug option is local to module and can be dynamically turned on/off. This is done by keeping track of the loaded modules that require debugging in flora_debug_module_registry. In the system module flora(sys), we have - debug[#check_undefined(Flag)] - debug[#check_undefined(Flag,Module)] + debug[%check_undefined(Flag)] + debug[%check_undefined(Flag,Module)] to query, turn on, or turn off the debug option of a certain module or all modules. Index: hilog_table.txt =================================================================== RCS file: /cvsroot/flora/flora2/docs/hilog_table.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- hilog_table.txt 14 Nov 2003 07:58:39 -0000 1.2 +++ hilog_table.txt 17 Oct 2005 05:25:33 -0000 1.3 @@ -54,8 +54,8 @@ Example: :- table p/1. - p(X) :- q(X). - q(X) :- r(X). + p(?X) :- q(?X). + q(?X) :- r(?X). will be translated as @@ -135,23 +135,23 @@ 1) Directives 'firstorder', 'firstorderall', 'hilogtable', and 'table' are no longer needed. 2) Hilog predicates are tabled by default. Only hilog predicates led - by '#' are not tabled. - e.g. p(X) :- #q(X). - => t_flapply(p,X) :- flapply(q,X). + by '%' are not tabled. + e.g. p(?X) :- %q(?X). + => t_flapply(p,?X) :- flapply(q,?X). where t_flapply is the wrapper for tabled hilog and flapply is the wrapper for non-tabled hilog predicates. Both of them are prefixed with _$_$_flora_modspec_. - Terms are always wrapped by flapply. For example, the term p(X) will - be flapply(p,X), and the term #q(X) will be flapply(#,flapply(q,X)). + Terms are always wrapped by flapply. For example, the term p(?X) will + be flapply(p,X), and the term %q(?X) will be flapply(%,flapply(q,X)). 3) import syntax import p/1 as ... from ... to import tabled p/1 - import #(q)/1 as ... from ... to import non-tabled q/1 + import %(q)/1 as ... from ... to import non-tabled q/1 4) The syntax of index directive is now :- index N-M or - :- index #N-M + :- index %N-M where both N and M are integers, 0<M<=N. Suppose N1=N+1, M1=M+1, @@ -159,14 +159,14 @@ :- index FLORA_THIS_WORKSPACE(t_flapply)/N1-M1. ?- index(FLORA_THIS_WORKSPACE(dyna_t_flapply)/N1,M1). ?- index(FLORA_THIS_WORKSPACE(dynz_t_flapply)/N1,M1). - a compiler directive 'index #N-M' is translated into + a compiler directive 'index %N-M' is translated into :- index FLORA_THIS_WORKSPACE(flapply)/N1-M1. ?- index(FLORA_THIS_WORKSPACE(dyna_flapply)/N1,M1). ?- index(FLORA_THIS_WORKSPACE(dynz_flapply)/N1,M1). *) an executable 'index(N-M)' is translated into (fllibprogramans((index(FLORA_THIS_WORKSPACE(dyna_t_flapply)/N1,M1), index(FLORA_THIS_WORKSPACE(dynz_t_flapply)/N1,M1)),[])). - an executable 'index(#N-M)' is translated into + an executable 'index(%N-M)' is translated into (fllibprogramans((index(FLORA_THIS_WORKSPACE(dyna_flapply)/N1,M1), index(FLORA_THIS_WORKSPACE(dynz_flapply)/N1,M1)),[])). Index: flora2.tex =================================================================== RCS file: /cvsroot/flora/flora2/docs/flora2.tex,v retrieving revision 1.144 retrieving revision 1.145 diff -u -d -r1.144 -r1.145 --- flora2.tex 16 Oct 2005 21:46:28 -0000 1.144 +++ flora2.tex 17 Oct 2005 05:25:33 -0000 1.145 @@ -9021,7 +9021,7 @@ fd(Mary,age,29). % Mary[age->29]. mvd(Mary,kids,Tim). % Mary[kids->>{Tim}]. mvd(Mary,kids,Leo). % Mary[kids->>{Leo}]. -fd(Mary,salary(1998),100000). % Mary[salary(1998)->a_lot]. +fd(Mary,salary(1998),100000). % Mary[salary(1998)->100000]. \end{verbatim} \end{quote} %% @@ -9055,7 +9055,7 @@ determined at program load time, the names of the wrapper predicates are also generated at that time from predefined templates. -The way \FLORA rules are encoded is more complex. Consider, the following rule: +The way \FLORA rules are encoded is more complex. Consider the following rule: %% \begin{verbatim} Mary[parent->?X] :- Mary[father->?X]. |
|
From: Hui W. <hw...@us...> - 2005-10-17 05:25:45
|
Update of /cvsroot/flora/flora2/flrincludes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9411/flrincludes Modified Files: flora_errors.flh flora_terms.flh Log Message: 1, Supports for URIs (http://www.daml.org/services/swsl-rules/1.0/#swsl-rules-basic-defs); 2, More specific error reporting in flrcoder; 3, Fix bugs in syntax error reporting about underscore. Index: flora_terms.flh =================================================================== RCS file: /cvsroot/flora/flora2/flrincludes/flora_terms.flh,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- flora_terms.flh 16 Oct 2005 21:45:52 -0000 1.58 +++ flora_terms.flh 17 Oct 2005 05:25:33 -0000 1.59 @@ -46,6 +46,7 @@ (8) WHITESPACE(TextInfo) (9) COMMENT(TextInfo) (10) RULE_DELIMETER(TextInfo) + (11) URI(U,TextInfo) TextInfo=TEXT(BeginX,BeginY,EndX,EndY,ListOfCodes) **************************************************************************/ @@ -66,6 +67,7 @@ #define WHITESPACE whitespace #define COMMENT comment #define RULE_DELIMETER rule_delimeter +#define URI uri /************************************************************************** @@ -106,6 +108,8 @@ #define FL_BRACKET '[' #define FL_BRACE '{' +#define FL_DOUBLEQUOTE '"' + #define FL_VARSYM '?' #define FL_COMMA ',' @@ -122,6 +126,8 @@ #define FL_SYMOR '\/' #define FL_SYMAND '/\' +#define FL_URISQOP '#' + #define FL_FLOOR floor #define FL_ABS abs #define FL_FLOAT float @@ -134,6 +140,7 @@ #define FL_FAIL fail #define FL_UNDERSCORE '_' +#define FL_HASH '#' #define FL_AT '@' #define FL_CUT '!' @@ -227,7 +234,8 @@ #define FL_EQUALITY equality #define FL_INHERITANCE inheritance #define FL_CUSTOM custom -#define FLORA_DEFAULT_SEMANTICS [FL_EQUALITY(NONE), FL_INHERITANCE(FLOGIC), FL_CUSTOM(NONE)] +#define FLORA_DEFAULT_SEMANTICS [FL_EQUALITY(NONE),FL_INHERITANCE(FLOGIC), FL_CUSTOM(NONE)] +#define FL_PREFIXDEF prefix #define FL_IN (in) @@ -303,6 +311,8 @@ FLVAR(Name,Index) FLATOM(Atom,Index) FLNUMBER(Number,Index) + FLURI(Uri,Index) + FLURISQ(Prefix,Localname) FLSTRING(String,Index) FLTOKEN(Token,Index) FLTERM(FLPATHEXP,Arity,[FLPATHEXPs]) @@ -382,10 +392,13 @@ #define FLDEPCHKEX fldepchkex #define FLSEMANTICS flsemantics #define FLSETSEMANTICS flsetsemantics +#define FLPREFIXDEF flprefixdef #define FLATOM flatom #define FLTRANSACTIONALATOM fltransactionalatom #define FLNUMBER flnumber +#define FLURI fluri +#define FLURISQ flurisq #define FLTRANSACTIONALNUMBER fltransactionalnumber #define FLSTRING flstring #define FLTRANSACTIONALSTRING fltransactionalstring @@ -491,6 +504,7 @@ #define PROPDEF propdef #define PRCMPOPT prcmpopt #define PRIGNOREDEP prignoredep +#define PRPREFIXDEF prprefixdef #define PRTHISMODULE prthismodule /* For the trie that keeps database facts */ @@ -517,6 +531,8 @@ #define PRVARIABLE prvariable #define PRTRANSACTIONALVARIABLE prtransactionalvariable #define PRSTRING prstring +#define PRURI pruri +#define PRURISQ prurisq #define PRLIST prlist #define PRTERM prterm #define PRFDSKOLEM prfdskolem @@ -722,6 +738,8 @@ #define FLLIBSEMANTICS fllibsemantics #define FLLIBSETSEMANTICS fllibsetsemantics +#define FLLIBPREFIXDEF fllibprefixdef + #define FLLIBCONTROL fllibcontrol #define FLLIBIFTHENELSE fllibifthenelse #define FLLIBIFTHEN fllibifthen @@ -891,8 +909,9 @@ ****************************************************************************/ #define FLORA_IGNORE_UNDEFCHECK ignore_undefcheck -#define FL_TRANSACTIONAL FLORA_SYMBOL('transactional') +#define FL_TRANSACTIONAL FLORA_SYMBOL('transactional') #define FL_TABLED FLORA_SYMBOL('tabled') #define FL_NOTTABLED FLORA_SYMBOL('nottabled') #define FL_TERM FLORA_SYMBOL('term') #define FL_INVALIDMODULE FLORA_SYMBOL('invalid_module') +#define FL_URI '_uri' Index: flora_errors.flh =================================================================== RCS file: /cvsroot/flora/flora2/flrincludes/flora_errors.flh,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- flora_errors.flh 26 Jul 2005 00:33:34 -0000 1.34 +++ flora_errors.flh 17 Oct 2005 05:25:33 -0000 1.35 @@ -42,7 +42,7 @@ #mode nocomment "%" #define ERROR_DBLPERCENT 'invalid symbol after %' #mode restore - +#define AFTER_UNDERSCORE 'invalid symbol after _' /************************************** warnings reported by Flora Composer @@ -186,12 +186,19 @@ #define NO_UPDATEELSE 'updating else-statement is illegal' #define REIFY_WRONG_ARGNUM 'reification operator takes at most 1 argument' -#define ERROR_EXPORT 'export of invalid path expresion' +#define ERROR_EXPORT 'export of invalid path expression' #define ERROR_EXPORT_SPEC 'export of invalid F-logic molecule type' #define ERROR_EXPORT_ATOM 'atom occurs where variable is expected' #define ERROR_EXPORT_MODULE 'export to invalid module' #define ERROR_EXPORT_ATOM_ATTR 'variable occurs where term is expected' +#define ERROR_PREFIX 'invalid prefix definition' +#define ERROR_PREFIX_HEAD 'identifier is expected as the head of prefix definition' +#define ERROR_PREFIX_BODY 'string is expected as the body of prefix definition' + +#define ERROR_SQNAME_PREFIX 'identifier is expected as prefix of SQname' +#define ERROR_SQNAME_LOCAL 'string is expected as localname of SQname' + #mode save #mode nocomment "%" #define ERROR_TRANSACTIONAL_SYMBOL 'unexpected symbol with %' @@ -223,6 +230,12 @@ #define VARWSINHEAD 'unbound module name in rule head' +/************************************** + errors reported by Flora Coder +**************************************/ +#define MOD_NODEFPREFIX 'prefix not defined in the specified module' +#define FILE_NODEFPREFIX 'prefix not defined in this flora file' + /******************************************** Misc warnings ********************************************/ |
|
From: Hui W. <hw...@us...> - 2005-10-17 05:25:45
|
Update of /cvsroot/flora/flora2/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9411/lib Modified Files: flrprettyprint.flr flrstorage.flr Log Message: 1, Supports for URIs (http://www.daml.org/services/swsl-rules/1.0/#swsl-rules-basic-defs); 2, More specific error reporting in flrcoder; 3, Fix bugs in syntax error reporting about underscore. Index: flrprettyprint.flr =================================================================== RCS file: /cvsroot/flora/flora2/lib/flrprettyprint.flr,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- flrprettyprint.flr 26 Jul 2005 00:33:34 -0000 1.14 +++ flrprettyprint.flr 17 Oct 2005 05:25:33 -0000 1.15 @@ -361,4 +361,3 @@ - Index: flrstorage.flr =================================================================== RCS file: /cvsroot/flora/flora2/lib/flrstorage.flr,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- flrstorage.flr 26 Jul 2005 00:33:34 -0000 1.8 +++ flrstorage.flr 17 Oct 2005 05:25:33 -0000 1.9 @@ -43,4 +43,3 @@ flora_db_delete_all(?StorageName)@prolog(flrstoragebase). - |
|
From: Hui W. <hw...@us...> - 2005-10-17 05:25:45
|
Update of /cvsroot/flora/flora2/syslib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9411/syslib Modified Files: Makefile flrdecode.P flrimportedcalls.P Added Files: flrprefixdef.P Log Message: 1, Supports for URIs (http://www.daml.org/services/swsl-rules/1.0/#swsl-rules-basic-defs); 2, More specific error reporting in flrcoder; 3, Fix bugs in syntax error reporting about underscore. --- NEW FILE: flrprefixdef.P --- /* File: flrprefixdef.P ** ** Author(s): Hui Wan ** ** Contact: flo...@li... ** ** Copyright (C) The Research Foundation of SUNY, 1999-2001 ** ** FLORA-2 is free software; you can redistribute it and/or modify it under the ** terms of the GNU Library General Public License as published by the Free ** Software Foundation; either version 2 of the License, or (at your option) ** any later version. ** ** FLORA-2 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 Library General Public License for ** more details. ** ** You should have received a copy of the GNU Library General Public License ** along with FLORA-2; if not, write to the Free Software Foundation, ** Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ** ** */ :- compiler_options([xpp_on]). #include "flora_terms.flh" #include "flora_exceptions.flh" :- import flora_concat_atoms/2 from flrporting. :- import flora_shell_prefixdef/3 from flrregistry. :- export FLLIBPREFIXDEF/3. FLLIBPREFIXDEF(Mod,NameCode,StrCode) :- flora_concat_atoms(['flora_prefix_',NameCode],PrefixCode), (flora_shell_prefixdef(Mod,PrefixCode,_)->retract(flora_shell_prefixdef(Mod,PrefixCode,_));true), assert(flora_shell_prefixdef(Mod,PrefixCode,StrCode)). Index: flrimportedcalls.P =================================================================== RCS file: /cvsroot/flora/flora2/syslib/flrimportedcalls.P,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- flrimportedcalls.P 26 Sep 2004 03:58:45 -0000 1.9 +++ flrimportedcalls.P 17 Oct 2005 05:25:33 -0000 1.10 @@ -34,6 +34,7 @@ ?- import FLLIBCATCH/3, FLLIBTHROW/1 from flrerrhandler. ?- import FLLIBEXPORT/1 from flrexport. +?- import FLLIBPREFIXDEF/3 from flrprefixdef. %% These two are not strictly necessary, because flrutils.P and prolog2hilog %% are loaded in the beginning Index: Makefile =================================================================== RCS file: /cvsroot/flora/flora2/syslib/Makefile,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- Makefile 3 Apr 2005 06:37:52 -0000 1.21 +++ Makefile 17 Oct 2005 05:25:33 -0000 1.22 @@ -66,7 +66,8 @@ flrdbmodule$(OBJEXT) \ flroptimize$(OBJEXT) \ flrnewoid$(OBJEXT) \ - flrimport$(OBJEXT) + flrimport$(OBJEXT) \ + flrprefixdef$(OBJEXT) FLORA_INCLUDES_DIR = ../flrincludes DYN_INCLUDES_DIR = ../includes Index: flrdecode.P =================================================================== RCS file: /cvsroot/flora/flora2/syslib/flrdecode.P,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- flrdecode.P 30 Aug 2005 04:58:46 -0000 1.39 +++ flrdecode.P 17 Oct 2005 05:25:33 -0000 1.40 @@ -774,6 +774,10 @@ !, decode_literal_internal(Term,Code,Level,Depth). +decode_literal_internal(FL_URI(Term),['_',Code],Level,Depth) :- + !, + decode_literal_internal(Term,Code,Level,Depth). + decode_literal_internal(FLLIBNEWMODULE(_ThisModule,NewModuleName), [ReifyStart,FL_NEWMODULE,'{',NewModuleName,'}',ReifyEnd], Level,_Depth) :- |
|
From: Hui W. <hw...@us...> - 2005-10-17 05:25:44
|
Update of /cvsroot/flora/flora2/demos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9411/demos Modified Files: db_test3.flr owl_benchmark2_eq.flr owl_benchmark2_noeq.flr Log Message: 1, Supports for URIs (http://www.daml.org/services/swsl-rules/1.0/#swsl-rules-basic-defs); 2, More specific error reporting in flrcoder; 3, Fix bugs in syntax error reporting about underscore. Index: owl_benchmark2_noeq.flr =================================================================== RCS file: /cvsroot/flora/flora2/demos/owl_benchmark2_noeq.flr,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- owl_benchmark2_noeq.flr 26 Jul 2005 00:33:33 -0000 1.6 +++ owl_benchmark2_noeq.flr 17 Oct 2005 05:25:33 -0000 1.7 @@ -484,9 +484,9 @@ // If C1 is a subclass of of C2 and C2 has property P with range O, // then C1 also has property P with range O. /* -?C1[P=>>O] :- C1 :: C2, C2[P=>>O], - C1 : rdfs_Class, C2 : rdfs_Class, - P : rdf_Property, O : rdfs_Resource. +?C1[?P=>>?O] :- ?C1 :: ?C2, ?C2[?P=>>?O], + ?C1 : rdfs_Class, ?C2 : rdfs_Class, + ?P : rdf_Property, ?O : rdfs_Resource. */ // Rule D13 Index: owl_benchmark2_eq.flr =================================================================== RCS file: /cvsroot/flora/flora2/demos/owl_benchmark2_eq.flr,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- owl_benchmark2_eq.flr 26 Jul 2005 00:33:33 -0000 1.6 +++ owl_benchmark2_eq.flr 17 Oct 2005 05:25:33 -0000 1.7 @@ -486,9 +486,9 @@ // If C1 is a subclass of of C2 and C2 has property P with range O, // then C1 also has property P with range O. /* -?C1[P=>>O] :- C1 :: C2, C2[P=>>O], - C1 : rdfs_Class, C2 : rdfs_Class, - P : rdf_Property, O : rdfs_Resource. +?C1[?P=>>?O] :- ?C1 :: ?C2, ?C2[?P=>>?O], + ?C1 : rdfs_Class, ?C2 : rdfs_Class, + ?P : rdf_Property, ?O : rdfs_Resource. */ // Rule D13 Index: db_test3.flr =================================================================== RCS file: /cvsroot/flora/flora2/demos/db_test3.flr,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- db_test3.flr 26 Jul 2005 00:33:33 -0000 1.3 +++ db_test3.flr 17 Oct 2005 05:25:33 -0000 1.4 @@ -4,7 +4,7 @@ /**** -?To be integrated with the new flora error handling mech. +To be integrated with the new flora error handling mech. ?- write('test 101, create an already existing database')@prolog(), catch{flDBCreate(DSN,'ext_db',USER_NAME,PWD), FLORA_ABORT(FLORA_DB_EXCEPTION(ErrorMsg1),_), writeln(ErrorMsg1)@prolog()}, writeln('failed, as expected')@prolog(). |
|
From: Michael K. <ki...@us...> - 2005-10-17 02:25:57
|
Update of /cvsroot/flora/flora-website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17422 Modified Files: release_notes.html Log Message: updated to reflect recent changes Index: release_notes.html =================================================================== RCS file: /cvsroot/flora/flora-website/release_notes.html,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- release_notes.html 1 May 2005 03:29:51 -0000 1.26 +++ release_notes.html 17 Oct 2005 02:25:47 -0000 1.27 @@ -1,315 +1,380 @@ <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - <title>FLORA-2 Release Notes</title> -</head> -<body bgcolor="#FFFFFF"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <title>FLORA-2 Release Notes</title> + </head> + <body bgcolor="#FFFFFF"> -<a name="top"> -<hr> -<a name="release"> -<center> -<h1> Release Notes for Version 0.94 (Narumigata)</h1> -</center> + <a name="top"/> + <hr> + <a name="release"/> + <center> + <h1> Release Notes for Version 0.95 (Androcymbium)</h1> + </center> -<h3>General</h3> -<p> - The development of FLORA-2 has continued unabated. Apart from making the - system more robust, we added a large number of enhancements. - The syntax has also been cleaned up, which resulted in incompatible changes - with respect to version 0.92 (see below). -</p> + <h3>General</h3> + <p> + FLORA-2 has undergone significant changes to make it more of a Web + language. The system has also become more robust and many interfaces and + enhancements were added. The syntax has been changed somewhat to make + FLORA-2 better aligned with other Semantic Web languages and, especially, + with other F-logic based languages. This resulted in incompatible + changes with respect to version 0.94 (see below; a special script is + provided to simplify conversion of old programs to the new syntax). + </p> -<h3>News</h3> -<ul> - <li> - Modules can now be encapsulated. A module can export methods and - predicates to all modules our to a particular list of predicates. - </li> - <li> - One can now reify rules in addition to facts and other formulas. - </li> - <li> - The new directives <tt>setsemantics{...}</tt> and <tt>semantics{...}</tt> - allow the programmer set and query the semantics of any module. - </li> - <li> - It is now possible to use "and" and "or" instead of "," and ";" when the - latter mean conjunction and disjunction, respectively. - </li> - <li> - A new predicate, <tt>flora_query</tt>, can now - be used to send arbitrary queries to FLORA-2 from the Prolog side. - This means that one can use the XSB C or Java interfaces to send queries to - FLORA-2 through an intermediate Prolog module. - </li> - <li> - The <tt>clause{...}</tt> primitive lets one query the rule base. - </li> - <li> - The commands <tt>flAdd file</tt> and <tt>[+file]</tt> can - now add contents to modules instead of erasing it. - The command <tt>flCompileAdd</tt> is used to compile files for later - loading into a module. It does not by itself load any files. - </li> - <li> - Enhanced checking for undefined methods and predicates. The new directive - <tt>#ignore_undefcheck</tt> allows to selectively relax checks for - undefinedness in cases where such checks are undesirable. - </li> - <li> - The following types are now predefined: integer, float, number, symbol, - (a,b), (a;b), (a-b). - </li> - <li> - There is now a rudimentary run-time optimizer, which the user can turn of - and off dynamically. See <tt>flOptimize</tt>. - </li> - <li> - Inheritance-less <tt>inheritance(none)</tt> semantics is now supported in - addition to the usual semantics where inheritance is the default. - </li> - <li> - Experimental support for persistent FLORA-2 modules, which are stored in a - database through the ODBC interface. - </li> - <li> - Experimental support for XML/HTML/SGML parsing and XPath queries. - </li> -</ul> + <h3>News</h3> + <ul> + <li> + There is now syntax based on namespaces to simplify specification of + Web resources. + </li> + <li> + It is now possible to save the current state of a module in a file. + </li> + <li> + The meta-decomposition operator <tt>=..</tt> now works not only for + Prolog terms but also for HiLog terms and for reified formulas. + </li> + <li> + It is now possible to specify the type (signature) of a Boolean method. + </li> + <li> + A new Java API and a bi-directional interface to Protege. + </li> + </ul> -<h3>Backward Incompatibility</h3> -<ul> - <li> - <i>Major incompatible change of syntax</i>: HiLog predicates are now tabled - by default. Non-tabled predicates must now be prefixed with a #, by analogy - with non-tabled methods. The <tt>table</tt> directive has been deprecated. - </li> - <li> - The symbol % is no longer starting a comment. Use /*...*/ and // instead. - The symbol % will be reused for other purposes. - </li> - <li> - The "<tt>equality</tt>" directive has been deprecated. Use the new - <tt>setsemantics</tt> directive. - <li> - Constructs like a[attr=> {b,c}] and a[attr=>> {b,c}] - are no longer legal (i.e., the curly braces in the context of - => or =>>). Use a[attr=> (b,c)] and a[attr=>> (b,c)] - instead. - </li> - <li> Prolog predicates <tt>call/1</tt> and <tt>findall/3</tt> are no longer - special in FLORA-2 and should be avoided, since <tt>call/1</tt> is - redundant and <tt>findall/3</tt> is superseded by the aggregate operators - such as <tt>collectset{...}</tt>. - </li> - </li> -</ul> + <h3>Backward Incompatibility</h3> + <ul> + <i>Major incompatible change of syntax</i>: Some aspects of the syntax + has been aligned with other rule languages for the Web and with F-logic + based systems. There is a Perl script in the <tt>Misc</tt> subdirectory, + which can greatly simplify conversion of the old FLORA-2 programs. + <li> + Variables now start with ? and uppercase alphanumeric atoms do not need + to be quoted. + </li> + <li> + Transactional methods are now designated with the prefix % instead of + #. + </li> + </ul> -<pre> + <pre> -</pre> + </pre> -<hr> -<center> -<h1> Release Notes for Version 0.92 (Cattleya intermedia)</h1> -</center> + <hr> + <center> + <h1> Release Notes for Version 0.94 (Narumigata)</h1> + </center> + <h3>General</h3> + <p> + The development of FLORA-2 has continued unabated. Apart from making the + system more robust, we added a large number of enhancements. The syntax + has also been cleaned up, which resulted in incompatible changes with + respect to version 0.92 (see below). + </p> -<h3>General</h3> -<p> - FLORA has undergone many changes and a great number of features were - added. Some changes make the syntax of the present version incompatible with - earlier versions. However, these changes simplify the language and - improve its usability. + <h3>News</h3> + <ul> + <li> + Modules can now be encapsulated. A module can export methods and + predicates to all modules our to a particular list of predicates. + </li> + <li> + One can now reify rules in addition to facts and other formulas. + </li> + <li> + The new directives <tt>setsemantics{...}</tt> + and <tt>semantics{...}</tt> allow the programmer set and query the + semantics of any module. + </li> + <li> + It is now possible to use "and" and "or" instead of "," and ";" when + the latter mean conjunction and disjunction, respectively. + </li> + <li> + A new predicate, <tt>flora_query</tt>, can now be used to send + arbitrary queries to FLORA-2 from the Prolog side. This means that one + can use the XSB C or Java interfaces to send queries to FLORA-2 through + an intermediate Prolog module. + </li> + <li> + The <tt>clause{...}</tt> primitive lets one query the rule base. + </li> + <li> + The commands <tt>flAdd file</tt> and <tt>[+file]</tt> can now add + contents to modules instead of erasing it. The + command <tt>flCompileAdd</tt> is used to compile files for later + loading into a module. It does not by itself load any files. + </li> + <li> + Enhanced checking for undefined methods and predicates. The new + directive + <tt>#ignore_undefcheck</tt> allows to selectively relax checks for + undefinedness in cases where such checks are undesirable. + </li> + <li> + The following types are now predefined: integer, float, number, symbol, + (a,b), (a;b), (a-b). + </li> + <li> + There is now a rudimentary run-time optimizer, which the user can turn + of and off dynamically. See <tt>flOptimize</tt>. + </li> + <li> + Inheritance-less <tt>inheritance(none)</tt> semantics is now supported + in addition to the usual semantics where inheritance is the default. + </li> + <li> + Experimental support for persistent FLORA-2 modules, which are stored + in a database through the ODBC interface. + </li> + <li> + Experimental support for XML/HTML/SGML parsing and XPath queries. + </li> + </ul> - It is the first version that is reasonably feature-complete and thus - can be called a "beta". -</p> + <h3>Backward Incompatibility</h3> + <ul> + <li> + <i>Major incompatible change of syntax</i>: HiLog predicates are now + tabled by default. Non-tabled predicates must now be prefixed with a #, + by analogy with non-tabled methods. The <tt>table</tt> directive has + been deprecated. + </li> + <li> + The symbol % is no longer starting a comment. Use /*...*/ and // + instead. The symbol % will be reused for other purposes. + </li> + <li> + The "<tt>equality</tt>" directive has been deprecated. Use the new + <tt>setsemantics</tt> directive. + <li> + Constructs like a[attr=> {b,c}] and a[attr=>> {b,c}] + are no longer legal (i.e., the curly braces in the context of + => or =>>). Use a[attr=> (b,c)] and a[attr=>> (b,c)] + instead. + </li> + <li> Prolog predicates <tt>call/1</tt> and <tt>findall/3</tt> are no + longer special in FLORA-2 and should be avoided, since <tt>call/1</tt> + is redundant and <tt>findall/3</tt> is superseded by the aggregate + operators such as <tt>collectset{...}</tt>. + </li> + </li> + </ul> + <pre> -<h3>News</h3> -<ul> - <li> - Major changes in the language: there are no firstorder predicates any - more -- all are HiLog. See backward incompatibility. - </li> - <li> - It is now possible to add new rules to the program at run time as well as - create new program modules at run time. This is useful for agent - programming. Typically one would use this feature by creating a new module - and then adding rules to it at run time. Then calling the methods defined - in that module. - </li> - <li> - Inheritance is now implemented in accordance with the semantics defined in - <a href="ftp://ftp.cs.sunysb.edu/pub/TechReports/kifer/well-founded-optimizm.pdf">Well-Founded - Optimism: Inheritance in Frame-Based Knowledge - Bases</a>. <i>Intl. Conference on Ontologies, DataBases, and Applications of - Semantics for Large Scale Information Systems (ODBASE), October, 2002.</i> - In plain terms it means that inheritance now "works right." - </li> - <li>It is now possible to call X@Module, where X and/or Module is a - variable. This allows - one to construct a term and then call it in a module or to query the modules - in which a term is defined. For instance, - the following will work: ..., p(X), X(a,Y), X@foo. - </li> - <li> - Flora now honors XSB directives --nobanner, --noprompt, --quietload. This - makes it easier to put graphical interfaces on top of Flora and simplifies - interprogram communication. - </li> - <li> - The update operators now also update the - tabling information, which makes them much better behaved with queries. - The new operator refresh{...} provides finer-grained control over - cached queries. - </li> - <li> - It is now possible to table HiLog predicates, but expect more changes to - this syntax in future versions. - </li> - <li> - FLORA-2 now works under Cygwin. People might prefer this to the native - Windows port, because it runs significantly faster. - </li> -</ul> -<h3>Bugfixes</h3> -<ul> - <li>There was a subtle bug in the behavior of multiple inheritance. This has - now been fixed. Inheritance (and especially multiple inheritance) - has now a well-defined model theoretic semantics, as described in - <a href="ftp://ftp.cs.sunysb.edu/pub/TechReports/kifer/well-founded-optimizm.pdf">Well-Founded - Optimism: Inheritance in Frame-Based Knowledge - Bases</a>. <i>Intl. Conference on Ontologies, DataBases, and Applications of - Semantics for Large Scale Information Systems (ODBASE), October, 2002.</i> + </pre> - </li> - <li>Great many other small fixes.</li> -</ul> -<h3>Backward Incompatibility</h3> -<ul> - <li>firstorder directive deprecated (all predicates are HiLog now)</li> - <li>arguments directive deprecated (use the reification feature ${...} - instead</li> - <li>expunge deprecated</li> - <li>flImport: syntax change, as we no longer need to specify firstorder/hilog</li> - <li>index directive: change of syntax</li> - <li> - The calls flP2H, catch/3, throw/1 have been eliminated. Use the built-ins - p2h{...,...}, catch{...,...,...}, and throw{...} instead. - </li> -</ul> + <hr> + <center> + <h1> Release Notes for Version 0.92 (Cattleya intermedia)</h1> + </center> -<pre> + <h3>General</h3> + <p> + FLORA has undergone many changes and a great number of features were + added. Some changes make the syntax of the present version incompatible + with earlier versions. However, these changes simplify the language and + improve its usability. -</pre> + It is the first version that is reasonably feature-complete and thus + can be called a "beta". + </p> -<hr> -<center> -<h1> Release Notes for Version 0.88 (Phalaenopsis intermedia)</h1> -</center> -<h3>General</h3> -<p> -This release introduces a number of new features, improves performance, -and stability. The main highlights are the significantly faster compilation -and improved support for reified statements. Some new features, such as the -interface to CLPR constraint solving requires the latest version of XSB (from -the CVS repository). It is also required, if you want to run FLORA-2 under -Windows. -</p> + <h3>News</h3> + <ul> + <li> + Major changes in the language: there are no firstorder predicates any + more -- all are HiLog. See backward incompatibility. + </li> + <li> + It is now possible to add new rules to the program at run time as well + as create new program modules at run time. This is useful for agent + programming. Typically one would use this feature by creating a new + module and then adding rules to it at run time. Then calling the + methods defined in that module. + </li> + <li> + Inheritance is now implemented in accordance with the semantics defined + in + <a + href="ftp://ftp.cs.sunysb.edu/pub/TechReports/kifer/well-founded-optimizm.pdf">Well-Founded + Optimism: Inheritance in Frame-Based Knowledge + Bases</a>. <i>Intl. Conference on Ontologies, DataBases, and + Applications of Semantics for Large Scale Information Systems + (ODBASE), October, 2002.</i> In plain terms it means that + inheritance now "works right." + </li> + <li>It is now possible to call X@Module, where X and/or Module is a + variable. This allows one to construct a term and then call it in a + module or to query the modules in which a term is defined. For + instance, the following will work: ..., p(X), X(a,Y), X@foo. + </li> + <li> + Flora now honors XSB + directives --nobanner, --noprompt, --quietload. This makes it easier to + put graphical interfaces on top of Flora and simplifies interprogram + communication. + </li> + <li> + The update operators now also update the tabling information, which + makes them much better behaved with queries. The new operator + refresh{...} provides finer-grained control over cached queries. + </li> + <li> + It is now possible to table HiLog predicates, but expect more changes + to this syntax in future versions. + </li> + <li> + FLORA-2 now works under Cygwin. People might prefer this to the native + Windows port, because it runs significantly faster. + </li> + </ul> + <h3>Bugfixes</h3> + <ul> + <li>There was a subtle bug in the behavior of multiple inheritance. This + has now been fixed. Inheritance (and especially multiple inheritance) + has now a well-defined model theoretic semantics, as described in + <a + href="ftp://ftp.cs.sunysb.edu/pub/TechReports/kifer/well-founded-optimizm.pdf">Well-Founded + Optimism: Inheritance in Frame-Based Knowledge + Bases</a>. <i>Intl. Conference on Ontologies, DataBases, and + Applications of Semantics for Large Scale Information Systems + (ODBASE), October, 2002.</i> + </li> + <li>Great many other small fixes.</li> + </ul> + <h3>Backward Incompatibility</h3> + <ul> + <li>firstorder directive deprecated (all predicates are HiLog now)</li> + <li>arguments directive deprecated (use the reification feature ${...} + instead</li> + <li>expunge deprecated</li> + <li>flImport: syntax change, as we no longer need to specify + firstorder/hilog</li> + <li>index directive: change of syntax</li> + <li> + The calls flP2H, catch/3, throw/1 have been eliminated. Use the + built-ins p2h{...,...}, catch{...,...,...}, and throw{...} instead. + </li> + </ul> -<h3>News</h3> -<ul> -<li> Many bug fixed and many new features. -</li> -<li> Significantly reduced compilation time for some programs. -</li> -<li> The new token <tt>_@</tt>, which denotes the current FLORA module. -</li> -<li> The new <tt>@prologall()</tt> module specification, which automatically - converts the arguments of Prolog calls between the FLORA and Prolog - representation as needed. -</li> -<li> The new reification operator ${...}. Say, x[m-> ${a[b->c]}] - will reify the formula a[b->c]. This is in addition to the previously - available meta-argument specification (called "bform" before and now - changed to "meta"). -</li> -<li> - New syntax: ..., {constraint},... which allows Flora programs to use the CLPR - constraint solver of XSB. -</li> -</ul> -<h3>Bugfixes</h3> -<ul> - <li> Works again under Windows.</li> - <li> Numerous other small bugs.</li> -</ul> -<h3>Backward Incompatibility</h3> -<ul> -<li> The predicate <tt>flThisModule/1</tt> has been deprecated. Use the - literal <tt>_@</tt> to refer to the current module. This is more convenient - and faster. -</li> -<li> The <tt>bform</tt> argument specifier is now called <tt>meta</tt>. -</li> -</ul> + <pre> -<pre> + </pre> -</pre> -<hr> + <hr> + <center> + <h1> Release Notes for Version 0.88 (Phalaenopsis intermedia)</h1> + </center> -<center> -<h1> Release Notes for Version 0.86</h1> -</center> + <h3>General</h3> + <p> + This release introduces a number of new features, improves performance, + and stability. The main highlights are the significantly faster + compilation and improved support for reified statements. Some new + features, such as the interface to CLPR constraint solving requires the + latest version of XSB (from the CVS repository). It is also required, if + you want to run FLORA-2 under Windows. + </p> -<h3>General</h3> -<p> -This release fixes many bugs, eliminates some restrictions, and adds -new features. -</p> -<h3>News</h3> -<ul> -<li> The most important new feature is the ability to check for undefined -predicates and methods in debug mode (see the manual regarding checking -undefinedness checks). This feature simplifies debugging considerably. -</li> -<li> Flora compiler now checks if a tabled predicate depends on an update -operation and issues appropriate warnings. Such dependency is considered to be -a likely program bug. -</li> -<li> Numbered anonymous oids added (e.g., _#123). They behave like regular -anonymous oids (_#) in the sense that they are substituted by a new oid. -However, numbered oids can be referenced within the same clause (e.g., -_#12[self->_#12]). -</li> -<li> Optimized compilation of path expressions and nested terms. -</li> -</ul> + <h3>News</h3> + <ul> + <li> Many bug fixed and many new features. + </li> + <li> Significantly reduced compilation time for some programs. + </li> + <li> The new token <tt>_@</tt>, which denotes the current FLORA module. + </li> + <li> The new <tt>@prologall()</tt> module specification, which + automatically converts the arguments of Prolog calls between the FLORA + and Prolog representation as needed. + </li> + <li> The new reification operator ${...}. Say, x[m-> ${a[b->c]}] + will reify the formula a[b->c]. This is in addition to the + previously available meta-argument specification (called "bform" before + and now changed to "meta"). + </li> + <li> + New syntax: ..., {constraint},... which allows Flora programs to use + the CLPR constraint solver of XSB. + </li> + </ul> + <h3>Bugfixes</h3> + <ul> + <li> Works again under Windows.</li> + <li> Numerous other small bugs.</li> + </ul> + <h3>Backward Incompatibility</h3> + <ul> + <li> The predicate <tt>flThisModule/1</tt> has been deprecated. Use the + literal <tt>_@</tt> to refer to the current module. This is more + convenient and faster. + </li> + <li> The <tt>bform</tt> argument specifier is now called <tt>meta</tt>. + </li> + </ul> + <pre> -<hr> + </pre> + <hr> -<p> -<address> -Feedback: <a href="mailto:flo...@li...">The FLORA-2 -Development Team</a> -</address> + <center> + <h1> Release Notes for Version 0.86</h1> + </center> + <h3>General</h3> + <p> + This release fixes many bugs, eliminates some restrictions, and adds + new features. + </p> -<p> -<!--Don't touch! The date gets updated when you commit changes to this page--> -$Date$ + <h3>News</h3> + <ul> + <li> The most important new feature is the ability to check for undefined + predicates and methods in debug mode (see the manual regarding checking + undefinedness checks). This feature simplifies debugging considerably. + </li> + <li> Flora compiler now checks if a tabled predicate depends on an update + operation and issues appropriate warnings. Such dependency is + considered to be a likely program bug. + </li> + <li> Numbered anonymous oids added (e.g., _#123). They behave like + regular anonymous oids (_#) in the sense that they are substituted by a + new oid. However, numbered oids can be referenced within the same + clause (e.g., _#12[self->_#12]). + </li> + <li> Optimized compilation of path expressions and nested terms. + </li> + </ul> -</body> + + + <hr> + + <p> + <address> + Feedback: <a href="mailto:flo...@li...">The + FLORA-2 Development Team</a> + </address> + + + <p> + <!--Don't touch! The date gets updated when you commit changes to this page--> + $Date$ + + </body> </html> |
|
From: Michael K. <ki...@us...> - 2005-10-16 21:46:37
|
Update of /cvsroot/flora/flora2/syslib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31427/syslib Modified Files: flrmetaops.P Log Message: improved support for =.. described it in the manual Index: flrmetaops.P =================================================================== RCS file: /cvsroot/flora/flora2/syslib/flrmetaops.P,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- flrmetaops.P 16 Oct 2005 17:28:19 -0000 1.21 +++ flrmetaops.P 16 Oct 2005 21:46:28 -0000 1.22 @@ -397,6 +397,10 @@ ( PredType == (prolog) -> (Wrapper==WRAP_HILOG -> Args = [RealPredName|RealArgs], Y = [WRAP_HILOG(hilog,RealPredName)|RealArgs] + %% libraries like insert + ; fllib_wrapper(Wrapper) -> fail + %% Aggregates look like (fllibavg(...), ...) + ; Args=[Head|_], Head=..[Library|_], fllib_wrapper(Library) -> fail ; Y = [PredName|Args] ) ; @@ -476,3 +480,44 @@ flogic_wrapper(WRAP_TRAN, '%boolean', 2). flogic_wrapper(WRAP_OBJEQL, ':=:', 2). flogic_wrapper(WRAP_EXISTS, '[]', 1). + +%% used to skip internal libraries in decomposition of prolog terms +%% =.. simply fails on such libraries +fllib_wrapper(FLLIBINSERT). +fllib_wrapper(FLLIBINSERTALL). +fllib_wrapper(FLLIBDELETE). +fllib_wrapper(FLLIBDELETEALL). +fllib_wrapper(FLLIBERASE). +fllib_wrapper(FLLIBERASEALL). +fllib_wrapper(FLLIBBTINSERT). +fllib_wrapper(FLLIBBTDELETEALL). +fllib_wrapper(FLLIBBTDELETEALL). +fllib_wrapper(FLLIBBTERASE). +fllib_wrapper(FLLIBBTERASEALL). + +fllib_wrapper(FLLIBREFRESH). +fllib_wrapper(FLLIBINSERTRULE_A). +fllib_wrapper(FLLIBINSERTRULE_Z). +fllib_wrapper(FLLIBDELETERULE_A). +fllib_wrapper(FLLIBDELETERULE_Z). +fllib_wrapper(FLLIBDELETERULE). + +fllib_wrapper(FLLIBNEWMODULE). +fllib_wrapper(FLLIBCLAUSE). +fllib_wrapper(FLLIBNEWOID). +fllib_wrapper(FLLIBCATCH). +fllib_wrapper(FLLIBTHROW). + +fllib_wrapper(FLLIBIFTHENELSE). +fllib_wrapper(FLLIBIFTHEN). +fllib_wrapper(FLLIBUNLESSDO). +fllib_wrapper(FLLIBWHILEDO). +fllib_wrapper(FLLIBDOUNTIL). +fllib_wrapper(FLLIBWHILELOOP). +fllib_wrapper(FLLIBLOOPUNTIL). + +fllib_wrapper(FLLIBAVG). +fllib_wrapper(FLLIBSUM). +fllib_wrapper(FLLIBMAX). +fllib_wrapper(FLLIBMIN). +fllib_wrapper(FLLIBCOUNT). |
|
From: Michael K. <ki...@us...> - 2005-10-16 21:46:37
|
Update of /cvsroot/flora/flora2/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31427/docs Modified Files: flora2.tex Log Message: improved support for =.. described it in the manual Index: flora2.tex =================================================================== RCS file: /cvsroot/flora/flora2/docs/flora2.tex,v retrieving revision 1.143 retrieving revision 1.144 diff -u -d -r1.143 -r1.144 --- flora2.tex 12 Oct 2005 19:08:22 -0000 1.143 +++ flora2.tex 16 Oct 2005 21:46:28 -0000 1.144 @@ -3839,12 +3839,110 @@ internal encoding is concerned (and likewise are {\tt a[b->?Y]@foo} and {\tt ?Z[b->d]@foo}). +\subsection{Meta-decomposition}\label{sec-meta-decomp} -{\bf Unimplemented}: Meta-programming support for HiLog terms and -F-molecules is incomplete. For instance, there is no operator similar to -{\tt =..}, like in Prolog (or, rather, it exists, but does not do the right -thing in \FLORA). Additional meta-programming support will be provided -through future enhancements. +\index{meta-decomposition operator =..} +\index{{\tt =..}!meta-decomposition operator} +%% +\FLORA supports an extended version of the Prolog meta-decomposition +operator ``{\tt =..}''. On Prolog terms, it behaves the same way as one +would expect in Prolog. For instance, +%% +\begin{verbatim} + flora2 ?- ?X=p(a,?Z)@prolog(), ?X=..?Y. + + ?X = p(a,?_h4094)@prolog() + ?Z = ?_h4094 + ?Y = [p, a, ?_h4094] +\end{verbatim} +%% + +The main use of the {\tt =..} operator in \FLORA is, however, for +decomposing HiLog terms or of reifications of HiLog predicates and F-logic +(atomic) molecules. The meta-decomposition operator uses special +conventions for these new cases. + +For HiLog terms, the head of the list on the fight-hand side of {\tt =..} +has the form {\tt hilog(HiLogPredicateName)}. For instance, +%% +\begin{verbatim} + flora2 ?- p(a,b) =.. ?L. + + ?L = [hilog(p), a, b] +\end{verbatim} +%% +For HiLog predicates the head of the list has the form {\tt + hilog(HiLogPredicateName,Module)}. For instance, +%% +\begin{verbatim} + flora2 ?- ${p(a,b)}@foo =.. ?L. + + ?L = [hilog(p,foo), a, b] +\end{verbatim} +%% +For non-tabled HiLog predicates, which represent actions with side-effects, +the head of the list is similar except that {\tt '\%hilog'} is +used instead of {\tt hilog}. For instance, +%% +\begin{verbatim} + flora2 ?- ${%p(a,b)}@foo =.. ?L. + + ?L = [%hilog(p,foo), a, b] +\end{verbatim} +%% + +For F-logic molecules, the head of the list has the form +{\tt flogic(MoleculeSymbol,Module)}. The {\tt MoleculeSymbol} argument +represents the type of the molecule and can be one of the following: +{\tt ->}, {\tt *->}, {\tt =>}, {\tt *=>}, {\tt +>}, {\tt *+>}, {\tt ->->}, +{\tt *->->}, {\tt :}, {\tt ::}, {\tt boolean} (tabled Boolean methods), +{\tt *boolean} (inheritable tabled Boolean methods), {\tt + \%boolean} (transactional, nontabled Boolean methods), {\tt :=:}, {\tt + []} (empty molecules, such as {\tt a[]}). Here is a number of examples +that illustrate the use of {\tt =..} for decomposition of F-logic molecules: +%% +\begin{alltt} + \${a[b->c]@foo} =.. [flogic(->,foo), a, b, c] + \${a[b*->c]@foo} =.. [flogic(*->,foo), a, b, c] + \${a[b=>c]@foo} =.. [flogic(=>,foo), a, b, c] + \${a[b*=>c]@foo} =.. [flogic(*=>,foo), a, b, c] + \${a[b+>c]@foo} =.. [flogic(+>,foo), a, b, c] + \${a[b*+>c]@foo} =.. [flogic(*+>,foo), a, b, c] + \${a[b->->c]@foo} =.. [flogic(->->,foo), a, b, c] + \${a[b*->->c]@foo} =.. [flogic(*->->,foo), a, b, c] + \${a:b@foo} =.. [flogic(:,foo), a, b] + \${a::b@foo} =.. [flogic(::,foo), a, b] + \${a:=:b@foo} =.. [flogic(:=:,foo), a, b] + \${a[]@foo} =.. [flogic([],foo), a] + \${a[p]@foo} =.. [flogic(boolean,foo), p] + \${a[*p]@foo} =.. [flogic('*boolean',foo), a, p] + \${a[%p]@foo} =.. [flogic('%boolean',foo), a, p] +\end{alltt} +%% + +The {\tt =..} operator is bi-directional, which means that either one or +both of its arguments can be bound. For instance, +%% +\begin{verbatim} + flora2 ?- ?X =.. [flogic('*boolean',foo),a ,p]. + + ?X = ${a[*p]@foo} +\end{verbatim} +%% + +At present, the =.. operator does not do reified terms that +represent aggregate operators, update predicates, and other \FLORA +statements that are not part of the extended F-logic or HiLog syntax. +In such cases, the query simply fails. +In the future, {\tt =..} might be extended to some of these additional +classes of terms. + +The original Prolog's {\tt =..} is also available using the idiom +{\tt (... =.. ...)@prolog()}. This is rarely used, however. One might use +this when the term to be decomposed is known to be a Prolog terms (in this +case the Prolog's operator will run slightly faster) or if one wants to +process the Prolog terms into which \FLORA literals are encoded internally +(which is probably hardly ever necessary). \subsection{Passing Parameters between \FLORA and Prolog}\label{sec-passing-args} |
|
From: Michael K. <ki...@us...> - 2005-10-16 21:46:07
|
Update of /cvsroot/flora/flora2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31225 Modified Files: flrparser.P flroperator.P flrnowsp.P flrcompiler.P TODO Log Message: got rid of the code supporting ~.. Index: flrparser.P =================================================================== RCS file: /cvsroot/flora/flora2/flrparser.P,v retrieving revision 1.87 retrieving revision 1.88 diff -u -d -r1.87 -r1.88 --- flrparser.P 16 Oct 2005 03:05:54 -0000 1.87 +++ flrparser.P 16 Oct 2005 21:45:53 -0000 1.88 @@ -845,8 +845,6 @@ fluniveqform_struct(Left,Right,FLUNIVEQFORM(Left,Right)). %% struct for =.. flmetauniv_struct(Left,Right,FLMETAUNIV(Left,Right)). -%% struct for ~.. -flmetaunivform_struct(Left,Right,FLMETAUNIVFORM(Left,Right)). %% struct for ${...} flreify_struct(Formula,FLREIFYOP(Formula)). @@ -2159,13 +2157,6 @@ !, flora_body_metauniv(CANOTERM(Funct,2,FL_PARENTHESIS,Args,If,Ip),WS,DWS,Code,Status). -%% Parse the ~.. meta predicate -%% Workspace as in (A~..B)@foo is illegal. But (A@foo =.. B) is fine. -flora_body(CANOTERM(Funct,2,FL_PARENTHESIS,Args,If,Ip),WS,DWS,Code,Status) :- - get_name(Funct,FL_METAUNIVFORM), - !, - flora_body_metaunivform(CANOTERM(Funct,2,FL_PARENTHESIS,Args,If,Ip),WS,DWS,Code,Status). - %% Process the control constructs while-do/loop, loop/do-until, unless-do flora_body(CANOTERM(TopWrapper,1,FL_PARENTHESIS,Args,_If,_Ip),WS,DWS,Code,Status) :- get_name(TopWrapper,TopName), @@ -2508,28 +2499,6 @@ /**************************************************************************** - flora_body_metaunivform(+CanoniTerm,+WS,-Code,-Status) - - Parse the meta op ~.. - This is like =.. but is compiled differently: the left arg is meta. - Also, all module specs are illegal: - (_~.. _)@floramodule, (_ ~.. _)@prolog(mod), (_ ~.. _)@prolog(), - (_ ~.. _)@prologall(mod), (_ ~.. _)@prologall(), - -****************************************************************************/ -flora_body_metaunivform(CANOTERM(_Funct,2,FL_PARENTHESIS,Args,_If,_Ip),WS,DWS,Code,Status) :- - Args = [Left,Right], - protect_reification(flora_body(Left,WS,DWS,LeftParsed,S1)), - (S1 == [] -> flora_pathexp(Right,DISALLOW_TRANS,DWS,RightParsed,Status) - %% failed to parse the first term - ; Status=S1 - ), - (Status == [] -> flmetaunivform_struct(LeftParsed,RightParsed,Code) - %% failed to parse the second term - ; true - ). - -/**************************************************************************** flora_body_controlconstruct(+CanoniTermList1,+WS,+DWS,+TopWrapper,-Code,-Status). Process control constructs while-do/loop, loop/do-until, unless-do CanoniTermList1 represents the inner part of the control construct, Index: flrcompiler.P =================================================================== RCS file: /cvsroot/flora/flora2/flrcompiler.P,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- flrcompiler.P 10 Aug 2005 13:40:34 -0000 1.83 +++ flrcompiler.P 16 Oct 2005 21:45:53 -0000 1.84 @@ -118,8 +118,6 @@ is_fluniveqform(FLUNIVEQFORM(Left,Right),Left,Right). %% Meta =.. is_flmetauniv(FLMETAUNIV(Left,Right),Left,Right). -%% Meta ~.. -is_flmetaunivform(FLMETAUNIVFORM(Left,Right),Left,Right). is_reifyop(FLREIFYOP(Formula),Formula). @@ -2148,9 +2146,6 @@ ; is_flmetauniv(ParserTerm,Left,Right) -> compile_flmetauniv(Left,Right,OidCode,SpecCode,Status) - - ; is_flmetaunivform(ParserTerm,Left,Right) -> - compile_flmetaunivform(Left,Right,OidCode,SpecCode,Status) ; is_flcontrolconstruct(ParserTerm,Wrapper,Cond,Action) -> compile_flcontrolconstruct(Cond,Action,Wrapper,SpecCode,Status), @@ -2253,27 +2248,6 @@ ). - -/**************************************************************************** - compile_flmetaunivform(+Left,+Right,-OidCode,-Code,-Status) - Compiling ~.. -****************************************************************************/ -compile_flmetaunivform(Left,Right,OidCode,Code,Status) :- - set_context(goal_reification), - compile_body(Left,LeftCode,S1), - clear_context(goal_reification), - ( S1 == [] - -> compile_pathexp(Right,RightCode,OidCode,RightObjCode,Status), - (Status == [] - -> metauniv_struct(LeftCode,RightCode,UnivCode), - conjunct_code([UnivCode,RightObjCode],Code) - ; true - ) - ; Status=S1 - ). - - - /**************************************************************************** compile_flcontrolconstruct(+Cond,+Action,+Wrapper,-Code,-Status) Index: TODO =================================================================== RCS file: /cvsroot/flora/flora2/TODO,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- TODO 4 Aug 2004 07:22:34 -0000 1.10 +++ TODO 16 Oct 2005 21:45:53 -0000 1.11 @@ -235,7 +235,7 @@ handles static rules that have p(...) in the head. -5. Metaprogramming +DONE 5. Metaprogramming - Need to implement the Flora analog of =.. (~..), which should work with different types of atomic formulas. Call it ..=.. for now (find a @@ -515,9 +515,9 @@ (nonvar(Y),! ; flP2H(_newvar1235,Y)), (nonvar(Z),! ; flP2H(_newvar1236,Z)) -27. Implement the database interface for Flora. The issue is how to save +DONE 27. Implement the database interface for Flora. The issue is how to save object molecules transparently, i.e., an atom like - a[b->c,e->>d] in a database and allow it to be queries. + a[b->c,e->>d] in a database and allow it to be queried. The database should probably be somehow associated with a module, so to save stuff we would use @@ -534,5 +534,5 @@ 29. Implement evaluable functions -30. Get rid of ->>, =>> and instead use constraints +DONE 30. Get rid of ->>, =>> and instead use constraints class[method {cardinality constraints} => type] Index: flrnowsp.P =================================================================== RCS file: /cvsroot/flora/flora2/flrnowsp.P,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- flrnowsp.P 16 Oct 2005 03:05:54 -0000 1.2 +++ flrnowsp.P 16 Oct 2005 21:45:53 -0000 1.3 @@ -50,7 +50,6 @@ flora_nowsp(FL_ORDERGT,2) :- !. flora_nowsp(FL_ORDEREQGT,2) :- !. %%flora_nowsp(FL_METAUNIV,2) :- !. -%%flora_nowsp(FL_METAUNIVFORM,2) :- !. flora_nowsp(FL_IS,2) :- !. flora_nowsp(FL_MATHEQ,2) :- !. flora_nowsp(FL_MATHNOTEQ,2) :- !. Index: flroperator.P =================================================================== RCS file: /cvsroot/flora/flora2/flroperator.P,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- flroperator.P 16 Oct 2005 17:28:20 -0000 1.23 +++ flroperator.P 16 Oct 2005 21:45:53 -0000 1.24 @@ -100,7 +100,6 @@ flora_op(1000,xfx,FL_ORDERGT). flora_op(1000,xfx,FL_ORDEREQGT). flora_op(1000,xfx,FL_METAUNIV). -flora_op(1000,xfx,FL_METAUNIVFORM). flora_op(1000,xfx,FL_OBJEQL). flora_op(1000,xfx,FL_IS). flora_op(1000,xfx,FL_MATHEQ). |
|
From: Michael K. <ki...@us...> - 2005-10-16 21:46:06
|
Update of /cvsroot/flora/flora2/flrincludes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31225/flrincludes Modified Files: flora_terms.flh Log Message: got rid of the code supporting ~.. Index: flora_terms.flh =================================================================== RCS file: /cvsroot/flora/flora2/flrincludes/flora_terms.flh,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- flora_terms.flh 16 Oct 2005 17:28:20 -0000 1.57 +++ flora_terms.flh 16 Oct 2005 21:45:52 -0000 1.58 @@ -196,7 +196,6 @@ #define FL_ORDEREQGT '@>=' #define FL_METAUNIV '=..' #define FL_UNIVEQFORM '~' -#define FL_METAUNIVFORM '~..' #define FL_IS (is) #define FL_MATHEQ '=:=' #define FL_OBJEQL ':=:' @@ -357,7 +356,6 @@ FLLOOPUNTIL(Action,UntilCondition) FLMETAUNIV(LeftTerm,RightList) % handles and =.. - FLMETAUNIVFORM(LeftTerm,RightList) % handles both ~.. FLUNIVEQFORM(LeftFormula,RightFormula) FLREIFYOP(Formula) % ${...} @@ -452,8 +450,6 @@ #define FLUNIVEQFORM fluniveqform /* Parse functor for =.. */ #define FLMETAUNIV flmetauniv -/* Parse functor for ~.. */ -#define FLMETAUNIVFORM flmetaunivform /* ${...} */ #define FLREIFYOP flreify @@ -683,13 +679,12 @@ #define FLLIBDISPLAY fllibdisplay -#define FLLIBDBOP fllibdbop -#define FLLIBINSERT fllibinsert - #define FLLIBEXPORT fllibexport #define FLLIBEXPORT_INTERNAL fllibexport_internal #define FLLIBDBMODULE fllibdbmodule +#define FLLIBDBOP fllibdbop +#define FLLIBINSERT fllibinsert #define FLLIBINSERTALL fllibinsertall #define FLLIBDELETE fllibdelete #define FLLIBDELETEALL fllibdeleteall |
|
From: Michael K. <ki...@us...> - 2005-10-16 17:28:28
|
Update of /cvsroot/flora/flora2/syslib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12505/syslib Modified Files: flrmetaops.P Log Message: added proper definitions for =.. Index: flrmetaops.P =================================================================== RCS file: /cvsroot/flora/flora2/syslib/flrmetaops.P,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- flrmetaops.P 28 Sep 2005 13:04:01 -0000 1.20 +++ flrmetaops.P 16 Oct 2005 17:28:19 -0000 1.21 @@ -28,13 +28,15 @@ :- compiler_options([xpp_on]). #include "flora_terms.flh" -:- import append/3 from basics. +:- import append/3, length/2 from basics. :- import - flora_module_predicate/4, - is_flora_callable_literal/1 + flora_module_predicate/4, + is_flora_callable_literal/1, + flora_decode_predicate/7 from flrwrapper. + :- import get_canonical_form/2, convert_to_body_literal/2, @@ -43,7 +45,15 @@ check_consistency/1 from flrcanon. -:- import flora_generalize_last/2 from flrtrim. +:- import + flora_generalize_last/2, + flora_add_last/3, + flora_trim_last/2 + from flrtrim. + +:- import + flora_decode_goal_as_atom/2 + from flrdecode. :- import flora_list2conjunct/2 from flrutils. @@ -380,5 +390,89 @@ FLLIBMETAUNIV(?X,?Y) The meta predicate =.. ******************************************************************************/ +FLLIBMETAUNIV(X,Y) :- + nonvar(X), + !, + flora_decode_predicate(X,PredType,WS,Wrapper,Prefix,PredName,Args), + ( PredType == (prolog) + -> (Wrapper==WRAP_HILOG + -> Args = [RealPredName|RealArgs], Y = [WRAP_HILOG(hilog,RealPredName)|RealArgs] + ; Y = [PredName|Args] + ) + ; + PredType == (hilog) + -> + flora_trim_last(Args,ArgsTrimmed), + (Prefix = 't_' + -> Y = [WRAP_HILOG(hilog,PredName,WS)|ArgsTrimmed] + ; Y = [WRAP_HILOG('%hilog',PredName,WS)|ArgsTrimmed] + ) + ; + PredType == (flogic) + -> + flora_trim_last(Args,ArgsTrimmed), + %% convert wrapper names to arrows + flogic_wrapper(PredName,FlogicSymbol,_), + Y = [WRAP_HILOG(flogic,FlogicSymbol,WS)|ArgsTrimmed] + ). -FLLIBMETAUNIV(X,Y) :- X =.. Y. +FLLIBMETAUNIV(X,Y) :- + is_list(Y), + Y = [Head|Args], + (atom(Head) + -> X =.. Y + ; + Head = WRAP_HILOG(hilog,FunctName) + -> + X =.. [WRAP_HILOG,FunctName|Args] + ; + Head = WRAP_HILOG(hilog,PredName,WS) + -> + flora_add_last(Args,AugmentedArgs,[WS,_]), + flora_module_predicate(WRAP_TABLED_HILOG,[PredName|AugmentedArgs],WS,X) + ; + Head = WRAP_HILOG('%hilog',PredName,WS) + -> + flora_add_last(Args,AugmentedArgs,[WS,_]), + flora_module_predicate(WRAP_HILOG,[PredName|AugmentedArgs],WS,X) + ; + Head = WRAP_HILOG(flogic,FlogicSymbol,WS) + -> + flogic_wrapper(Wrapper,FlogicSymbol,ArgNo), + (length(Args,ArgNo) -> true + ; + flora_decode_goal_as_atom(X,Xdecoded), + flora_decode_goal_as_atom(Y,Ydecoded), + flora_abort([Xdecoded,'=..',Ydecoded, + ' : wrong number of components on the right']) + ), + flora_add_last(Args,AugmentedArgs,[WS,_]), + flora_module_predicate(Wrapper,AugmentedArgs,WS,X) + ; + Head = WRAP_HILOG(flogic,_) + -> + flora_decode_goal_as_atom(X,Xdecoded), + flora_decode_goal_as_atom(Y,Ydecoded), + flora_abort([Xdecoded,'=..',Ydecoded, + ' : wrong syntax on the right']) + ). + +%% For now, this predicate fails for most of the wrong syntax + + +%% Arguments: Flogic Wrapper, visual symbol, #of required arguments +flogic_wrapper(WRAP_MVD, '->', 3). +flogic_wrapper(WRAP_IMVD, '*->', 3). +flogic_wrapper(WRAP_MVDSIG, '=>', 3). +flogic_wrapper(WRAP_IMVDSIG, '*=>', 3). +flogic_wrapper(WRAP_MVDINC, '+>', 3). +flogic_wrapper(WRAP_IMVDINC, '*+>', 3). +flogic_wrapper(WRAP_MVDTOLIST, '->->', 3). +flogic_wrapper(WRAP_IMVDTOLIST, '*->->', 3). +flogic_wrapper(WRAP_ISA, ':', 2). +flogic_wrapper(WRAP_SUB, '::', 2). +flogic_wrapper(WRAP_METH, 'boolean', 2). +flogic_wrapper(WRAP_IMETH, '*boolean', 2). +flogic_wrapper(WRAP_TRAN, '%boolean', 2). +flogic_wrapper(WRAP_OBJEQL, ':=:', 2). +flogic_wrapper(WRAP_EXISTS, '[]', 1). |
|
From: Michael K. <ki...@us...> - 2005-10-16 17:28:28
|
Update of /cvsroot/flora/flora2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12505 Modified Files: flroperator.P Log Message: added proper definitions for =.. Index: flroperator.P =================================================================== RCS file: /cvsroot/flora/flora2/flroperator.P,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- flroperator.P 30 Aug 2005 04:58:46 -0000 1.22 +++ flroperator.P 16 Oct 2005 17:28:20 -0000 1.23 @@ -34,7 +34,6 @@ flora_op(1700,fx,FL_IMPLYOP). flora_op(1700,fx,FL_QUERYOP). -flora_op(1600,fx,FL_HILOG). flora_op(1600,xfx,FL_BAR). flora_op(1600,fx,FL_INDEX). flora_op(1600,fx,FL_EXPORT). |
|
From: Michael K. <ki...@us...> - 2005-10-16 17:28:28
|
Update of /cvsroot/flora/flora2/flrincludes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12505/flrincludes Modified Files: flora_terms.flh Log Message: added proper definitions for =.. Index: flora_terms.flh =================================================================== RCS file: /cvsroot/flora/flora2/flrincludes/flora_terms.flh,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- flora_terms.flh 29 Aug 2005 04:46:54 -0000 1.56 +++ flora_terms.flh 16 Oct 2005 17:28:20 -0000 1.57 @@ -210,12 +210,9 @@ #define FL_REIFYOP '$' +/* Executable op definition in the :- op directive */ #define FL_OP op -/* Executable arguments definition induced by :- arguments directive */ -/*#define FL_ARGUMENTS arguments */ -/* Executable op definition induced by :- op directive */ #define FL_HILOG (hilog) -/*#define FL_TABLE (table) */ #define FL_INDEX (index) #define FL_IMPORT (import) #define FL_FROM (from) |
|
From: Michael K. <ki...@us...> - 2005-10-16 03:06:03
|
Update of /cvsroot/flora/flora2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10342 Modified Files: flrparser.P flrnowsp.P Log Message: fixed parsing of (?x =.. something)@prolog() previously wasn't allowing variable on the left Index: flrparser.P =================================================================== RCS file: /cvsroot/flora/flora2/flrparser.P,v retrieving revision 1.86 retrieving revision 1.87 diff -u -d -r1.86 -r1.87 --- flrparser.P 26 Jul 2005 00:33:32 -0000 1.86 +++ flrparser.P 16 Oct 2005 03:05:54 -0000 1.87 @@ -2451,8 +2451,9 @@ (_ =.. _)@prolog() and (_ =.. _)@prologall() are legal. ****************************************************************************/ flora_body_metauniv(CANOTERM(_Funct,2,FL_PARENTHESIS,_Args,If,_Ip),WS,_DWS,_Code,Status) :- - %% only @prolog() and @prologall() are allowed; + %% Only @prolog() and @prologall() are allowed; %% they don't match get_module_from_spec/3 + %% The test below checks for @prolog(mod), @prologall(mod) (get_module_from_spec(WS,PROLOGMODULE,_);get_module_from_spec(WS,PROLOGALLMODULE,_)), !, parsing_error(If,NO_WORKSPACE,Status). @@ -2463,7 +2464,8 @@ !, Args = [LCode,RCode], (WS == PROLOGMODULE - -> ( flora_prlgterm(LCode,DWS,LCodeParsed,S1), + -> ( (get_flvar_struct(LCode,LCodeParsed), S1=[], ! + ; flora_prlgterm(LCode,DWS,LCodeParsed,S1)), (S1 == [] -> flora_pathexp(RCode,DISALLOW_TRANS,DWS,RCodeParsed,Status) %% failed to parse the first term ; Status=S1 @@ -3409,11 +3411,13 @@ /**************************************************************************** - flora_prlgterm(+CanoniTerm,-Code,-Status) + flora_prlgterm(+CanoniTerm,+DWS,-Code,-Status) This predicate is called to parse a Prolog predicate or prolog term. Its arguments can be F-logic molecules and path expressions, so the arguments are not parsed as Prolog terms. + + ***Why is it using a workspace? ****************************************************************************/ flora_prlgterm(CANOTERM(Funct,N,FL_PARENTHESIS,Args,If,_Ip),DWS,Code,Status) :- !, Index: flrnowsp.P =================================================================== RCS file: /cvsroot/flora/flora2/flrnowsp.P,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- flrnowsp.P 18 May 2002 17:43:26 -0000 1.1.1.1 +++ flrnowsp.P 16 Oct 2005 03:05:54 -0000 1.2 @@ -49,8 +49,8 @@ flora_nowsp(FL_ORDEREQLT,2) :- !. flora_nowsp(FL_ORDERGT,2) :- !. flora_nowsp(FL_ORDEREQGT,2) :- !. -flora_nowsp(FL_METAUNIV,2) :- !. -flora_nowsp(FL_METAUNIVFORM,2) :- !. +%%flora_nowsp(FL_METAUNIV,2) :- !. +%%flora_nowsp(FL_METAUNIVFORM,2) :- !. flora_nowsp(FL_IS,2) :- !. flora_nowsp(FL_MATHEQ,2) :- !. flora_nowsp(FL_MATHNOTEQ,2) :- !. |
|
From: Michael K. <ki...@us...> - 2005-10-15 19:08:29
|
Update of /cvsroot/flora/flora2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26854 Modified Files: flrutils.P flrutils.H flrregistry.P flroperator.H flrlexer.H flrarguments.H Log Message: minor cosmetic changes, typos Index: flrutils.P =================================================================== RCS file: /cvsroot/flora/flora2/flrutils.P,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- flrutils.P 16 Sep 2005 03:22:37 -0000 1.59 +++ flrutils.P 15 Oct 2005 19:08:20 -0000 1.60 @@ -2883,7 +2883,7 @@ %% If CallerInfo is a var, abort - used in closure/ for debugging to %% make sure that Caller is always bound -%% For now, the second elt in caller info list is just the callee mudule name +%% For now, the second elt in caller info list is just the callee module name %% Later it might be a term with arguments, such as module(arg1,arg2,...) %% This checks for bugs in the caller info. Index: flrarguments.H =================================================================== RCS file: /cvsroot/flora/flora2/flrarguments.H,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- flrarguments.H 18 May 2002 17:43:26 -0000 1.1.1.1 +++ flrarguments.H 15 Oct 2005 19:08:20 -0000 1.2 @@ -26,11 +26,9 @@ :- dynamic flora_dynarg(_,_,_). - :- dynamic flora_sharg(_,_,_). :- index(flora_dynarg/3,trie). - :- index(flora_sharg/3,trie). :- index flora_arguments_spec/3-1. Index: flrutils.H =================================================================== RCS file: /cvsroot/flora/flora2/flrutils.H,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- flrutils.H 30 Aug 2005 04:58:46 -0000 1.31 +++ flrutils.H 15 Oct 2005 19:08:20 -0000 1.32 @@ -190,6 +190,7 @@ :- dynamic flora_xpp_extra_options/1. :- dynamic flora_maxerr(_). + :- index(flora_maxerr/1,trie). :- dynamic flora_compiler_environment(_,_). Index: flrlexer.H =================================================================== RCS file: /cvsroot/flora/flora2/flrlexer.H,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- flrlexer.H 10 Dec 2003 18:39:09 -0000 1.4 +++ flrlexer.H 15 Oct 2005 19:08:20 -0000 1.5 @@ -41,6 +41,7 @@ :- dynamic flora_file_list/2. :- dynamic flora_file_first_token/2. :- dynamic flora_file_last_token/2. + :- index(flora_file_stack/2,trie). :- index(flora_file_list/2,trie). Index: flroperator.H =================================================================== RCS file: /cvsroot/flora/flora2/flroperator.H,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- flroperator.H 18 May 2002 17:43:26 -0000 1.1.1.1 +++ flroperator.H 15 Oct 2005 19:08:20 -0000 1.2 @@ -25,11 +25,9 @@ :- dynamic flora_dynop(_,_,_). - :- dynamic flora_shop(_,_,_). :- index(flora_dynop/3,trie). - :- index(flora_shop/3,trie). :- index flora_op/3-3. Index: flrregistry.P =================================================================== RCS file: /cvsroot/flora/flora2/flrregistry.P,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- flrregistry.P 26 Sep 2004 08:34:45 -0000 1.6 +++ flrregistry.P 15 Oct 2005 19:08:20 -0000 1.7 @@ -35,8 +35,6 @@ :- dynamic flora_optimizer_registry/2. :- dynamic flora_in_debug_mode/1. -:- index(flora_in_debug_mode/1,trie). - :- dynamic flora_configuration/2. :- dynamic flora_disabled_undefinedness_check_registry/3. @@ -49,6 +47,7 @@ %% db --> memory has been done for these modules. (ModuleName) :- dynamic flora_dbmodule_inmemory/1. +:- index(flora_in_debug_mode/1,trie). :- index(flora_debug_module_registry/1,trie). :- index(flora_storage_registry/1,trie). :- index(flora_module_registry/1,trie). |