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
|
|
13
|
14
|
15
|
16
|
17
|
18
|
19
|
|
20
|
21
(6) |
22
|
23
|
24
|
25
|
26
|
|
27
(1) |
28
|
29
(2) |
30
(3) |
|
|
|
|
From: Michael K. <ki...@us...> - 2008-04-30 22:11:22
|
Update of /cvsroot/flora/flora-website In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv5883 Modified Files: installation.html Log Message: bug fix Index: installation.html =================================================================== RCS file: /cvsroot/flora/flora-website/installation.html,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- installation.html 30 May 2007 16:19:56 -0000 1.12 +++ installation.html 30 Apr 2008 22:11:26 -0000 1.13 @@ -42,7 +42,7 @@ in the directory <tt>~/XSB</tt>): </p> <pre> - ./makeflora all ~/XSB + ./makeflora all ~/XSB/bin/xsb </pre> <p> If everything went well, you can run FLORA-2 by typing |
|
From: Michael K. <ki...@us...> - 2008-04-30 20:54:53
|
Update of /cvsroot/flora/flora-website/tutorial/homeworks/hw1-sol In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv5972 Modified Files: queries.flr Log Message: small improvements Index: queries.flr =================================================================== RCS file: /cvsroot/flora/flora-website/tutorial/homeworks/hw1-sol/queries.flr,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- queries.flr 29 Apr 2008 17:36:59 -0000 1.6 +++ queries.flr 30 Apr 2008 20:54:58 -0000 1.7 @@ -16,22 +16,21 @@ // Projects that have employees who work for company divisions // that are different from the project's division. -?- ?_:project[name->?P, +?- ?:project[name->?P, participants-> ?E[division->?EDiv]@employees, division->?PDiv]@projects, - ?EDiv \= ?PDiv. + ?EDiv != ?PDiv. // The names of all divisions that have the lowest average // salary per employee among all the divisions of the same company ?- ?Div:division[name->?N]@divisions, - avg{?_Sal| ?_Sal= (?Div.employees@divisions).salary@employees} = ?LowestAvgSal, - ?LowestAvgSal = - max{?_AvgSal| - ?_AvgSal = - avg{?_Sal[?_Div1]| - ?_:company[divisions->{?Div,?_Div1}]@companies, + avg{?_Sal| ?_Sal = (?Div.employees@divisions).salary@employees} + = + max{?_AvgSal| + ?_AvgSal = avg{?_Sal[?_Div1]| + ?:company[divisions->{?Div,?_Div1}]@companies, ?_Sal= (?_Div1.employees@divisions).salary@employees} - }. + }. // Type checking constraints |
|
From: Michael K. <ki...@us...> - 2008-04-30 20:49:22
|
Update of /cvsroot/flora/flora2/emacs In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv3867 Modified Files: flora.el Log Message: bug fix Index: flora.el =================================================================== RCS file: /cvsroot/flora/flora2/emacs/flora.el,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- flora.el 11 Mar 2007 23:19:15 -0000 1.10 +++ flora.el 30 Apr 2008 20:49:20 -0000 1.11 @@ -556,7 +556,7 @@ (save-excursion (process-send-string flora-process-name - (format " _load '%s' >> %s.\n" tmpfile-name (if module module "main")) + (format " _load('%s' >> %s).\n" tmpfile-name (if module module "main")) )) (show-flora-buffer) )) @@ -604,7 +604,7 @@ (run-flora-background) (process-send-string flora-process-name - (format "_load '%s' >> %s.\n" file (if module module "main"))) + (format "_load('%s' >> %s).\n" file (if module module "main"))) (show-flora-buffer))) (defun flora-load-file-to-module (module) |
|
From: Michael K. <ki...@us...> - 2008-04-29 17:37:02
|
Update of /cvsroot/flora/flora-website/tutorial/homeworks/hw1-sol In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv28496/tutorial/homeworks/hw1-sol Modified Files: queries.flr employee.flr Log Message: typo fixes Index: queries.flr =================================================================== RCS file: /cvsroot/flora/flora-website/tutorial/homeworks/hw1-sol/queries.flr,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- queries.flr 12 Jun 2007 23:18:17 -0000 1.5 +++ queries.flr 29 Apr 2008 17:36:59 -0000 1.6 @@ -24,13 +24,13 @@ // The names of all divisions that have the lowest average // salary per employee among all the divisions of the same company ?- ?Div:division[name->?N]@divisions, - avg{?_Sal| ?_Sal= (?Div..employees@divisions).salary@employees} = ?LowestAvgSal, + avg{?_Sal| ?_Sal= (?Div.employees@divisions).salary@employees} = ?LowestAvgSal, ?LowestAvgSal = max{?_AvgSal| ?_AvgSal = avg{?_Sal[?_Div1]| ?_:company[divisions->{?Div,?_Div1}]@companies, - ?_Sal= (?_Div1..employees@divisions).salary@employees} + ?_Sal= (?_Div1.employees@divisions).salary@employees} }. @@ -44,3 +44,14 @@ (?O[?M->?V], not ?O[?M=>?D])@?_Mod. // ?- type_error(?O,?M,?V). + +// Type checking using the _typecheck module +// ?- Type[%_check(?[?=>?]@employees, ?Violations)]@_typecheck. +/* Answers: + ?Violations = (${bob[projects -> f1]@employees}, ${bob[projects => project]@employees}) + + ?Violations = (${d1[employees -> mary]@employees}, ${d1[employees => employee]@employees}) + + ?Violations = (${john[division -> d3]@employees}, ${john[division => division]@employees}) + +*/ Index: employee.flr =================================================================== RCS file: /cvsroot/flora/flora-website/tutorial/homeworks/hw1-sol/employee.flr,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- employee.flr 12 Jun 2007 22:44:34 -0000 1.5 +++ employee.flr 29 Apr 2008 17:36:59 -0000 1.6 @@ -1,4 +1,8 @@ +:- importmodule divisions. + +// importing only the : relationship from projects module +?X:?C :- ?X:?C@projects. // Note that we use *=> to give types to attributes. // These types will be inherited to instances as => |
|
From: Michael K. <ki...@us...> - 2008-04-29 17:37:01
|
Update of /cvsroot/flora/flora-website/tutorial In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv28496/tutorial Modified Files: part2-programming.ppt Log Message: typo fixes Index: part2-programming.ppt =================================================================== RCS file: /cvsroot/flora/flora-website/tutorial/part2-programming.ppt,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 Binary files /tmp/cvsGkHxbq and /tmp/cvsl9xfHF differ |
|
From: Michael K. <ki...@us...> - 2008-04-27 21:08:18
|
Update of /cvsroot/flora/flora2/docs In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8210/docs Modified Files: flora2.tex Log Message: many fixes of typos and various clarifications Index: flora2.tex =================================================================== RCS file: /cvsroot/flora/flora2/docs/flora2.tex,v retrieving revision 1.188 retrieving revision 1.189 diff -u -d -r1.188 -r1.189 --- flora2.tex 21 Apr 2008 03:47:11 -0000 1.188 +++ flora2.tex 27 Apr 2008 21:08:15 -0000 1.189 @@ -193,7 +193,7 @@ \setcounter{page}{1} -\section{Introduction} +\section{Introduction}\label{sec-intro} \FLORA is a sophisticated object-oriented knowledge base language and application development platform. It is implemented as a set of run-time @@ -409,8 +409,8 @@ For instance, %% [...3854 lines suppressed...] which {\tt flrpatch.flh} is generated by the \FLORA installation script). -For compiled programs, the patch rules are included into the compiled code +For compiled programs, the patch rules are included in the compiled code by the \FLORA compiler. For the \FLORA shell, however, these rules are loaded when the corresponding shell module is created (either the default ``main'' module or any module that was created by the {\tt newmodule} @@ -10546,10 +10578,10 @@ The directory {\tt genincludes/} currently contains the already mentioned patch rules. The file {\tt flrpatch.fli} is a template, and {\tt flrpatch.flh}, which contains the actual patch rules, is generated from -{\tt flrpatch.fli} during the installation. +{\tt flrpatch.fli} during installation. The directory {\tt includes/} contains (among others) the header file, -which defines the a number of important macros ({\it e.g.}, {\tt +which defines a number of important macros ({\it e.g.}, {\tt FLORA\_THIS\_WORKSPACE}) that wrap all the names with prefixes to separate the different modules of the user program. The directory {\tt headerinc/} is another place where the template files are located. Each |
|
From: Michael K. <ki...@us...> - 2008-04-21 03:53:09
|
Update of /cvsroot/flora/flora2/pkgs/prolog In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv14429/pkgs/prolog Modified Files: flrpm.P Log Message: small optimizations Index: flrpm.P =================================================================== RCS file: /cvsroot/flora/flora2/pkgs/prolog/flrpm.P,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- flrpm.P 26 Oct 2007 05:14:02 -0000 1.5 +++ flrpm.P 21 Apr 2008 03:53:13 -0000 1.6 @@ -35,6 +35,7 @@ #define TABLE_NAME_PREFIX 'tbl_' #define CREATE_TABLE_PREFIX 'CREATE TABLE ' +#define CREATE_UNIQUE_INDEX 'CREATE UNIQUE INDEX ' #define MAX_COL_LENGTH 7992 #mode save #mode nostring "\!#'" @@ -55,7 +56,7 @@ %% char prepended to numbers when they are saved as strings %% db driver converts such strings back to numbers -#define TERM_CHAR '\255' +#define TERM_CHAR '\377' :- import load_driver/1 from dbdrivers. @@ -290,12 +291,24 @@ create_tables_for_wrapper(DBHandle, ModuleName, Wrapper=Arity) :- make_db_table_name(ModuleName,Wrapper,Arity,TableName), flora_concat_items([CREATE_TABLE_PREFIX,TableName], CreateStatPrefix), - make_column_list(Arity,ColList), + make_column_type_list(Arity,ColTypeList), %% table may already be present. no error in that case. %% however any other db-error is ignored. need to change this strategy. - catch(db_query(DBHandle,flora_db_qh_createtbl,[CreateStatPrefix,'(',ColList,')'],[]), + catch(db_query(DBHandle,flora_db_qh_createtbl,[CreateStatPrefix,'(',ColTypeList,')'],[]), xsb_error(database(Number), Mesg), flrdb_ignore_error(Number, Mesg)), + /* + %%create unique index + %%Does not work: some DBs limit the key length to 1000 or so bytes. + make_column_list(Arity,ColList), + flora_concat_items([CREATE_UNIQUE_INDEX,TableName,'_uidx ON ', + TableName], CreateIdxStatPrefix), + catch(db_query(DBHandle,flora_db_qh_createtblidx,[CreateIdxStatPrefix,'(',ColList,')'],[]), + xsb_error(database(NumberIdx), MesgIdx), + writeln((NumberIdx, MesgIdx))), + flora_concat_items([CreateIdxStatPrefix,'(',ColList,')'], ABC), + db_statement_close_internal(flora_db_qh_createtblidx), + */ db_statement_close_internal(flora_db_qh_createtbl). /* @@ -303,14 +316,22 @@ col1 VARCHAR(255) DEFAULT NULL, col2 VARCHAR(255) DEFAULT NULL, ... of length Arity */ +make_column_type_list(Arity,ColTypeList) :- + (Arity==1 + -> flora_concat_items([COLUMN_PREFIX,Arity,COLUMN_TYPE],ColTypeList) + ; + Arity1 is Arity - 1, + make_column_type_list(Arity1,ColTypeList1), + flora_concat_items([ColTypeList1,',',COLUMN_PREFIX,Arity,COLUMN_TYPE], + ColTypeList) + ). make_column_list(Arity,ColList) :- (Arity==1 - -> flora_concat_items([COLUMN_PREFIX,Arity,COLUMN_TYPE],ColList) + -> flora_concat_items([COLUMN_PREFIX,Arity],ColList) ; Arity1 is Arity - 1, make_column_list(Arity1,ColList1), - flora_concat_items([ColList1,',',COLUMN_PREFIX,Arity,COLUMN_TYPE], - ColList) + flora_concat_items([ColList1,',',COLUMN_PREFIX,Arity], ColList) ). make_db_table_name(ModuleName,Wrapper,Arity,TableName) :- @@ -451,6 +472,7 @@ SQLCheckQuery = [IS_TUPLE_PRESENT,TableName,' '| ColValList], ( %% if empty resultset, db_query fails and R is left unbound + %% This is an EXPENSIVE check to avoid duplicates catch(db_query(DBHandle,flrdb_qa_chk_ins,SQLCheckQuery,[R]), xsb_error(database(Number), Mesg), flrdb_general_error_handler(['Data source error (',Number,'): ', @@ -549,7 +571,7 @@ Is a generic predicate that parses a term and extracts information. ****************************************************************************/ aux_consruct_query_string(Term,N,ModuleName,Wrapper,ValueList,ColValList):- - flora_decode_predicate(Term,PredicateType,ModuleName,Wrapper,_WrapPrefix,PredicateSymbol,ArgsList), + flora_decode_predicate(Term,_PredicateType,ModuleName,Wrapper,_WrapPrefix,PredicateSymbol,ArgsList), ValueList = ArgsList, length(ValueList,N), aux_create_col_val_pairs(ValueList,ColValList1), |
|
From: Michael K. <ki...@us...> - 2008-04-21 03:49:55
|
Update of /cvsroot/flora/flora2/syslib In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv12746/syslib Modified Files: flrimportedcalls.P flrhooks.P Log Message: import clpr add cut to call_one_hook Index: flrimportedcalls.P =================================================================== RCS file: /cvsroot/flora/flora2/syslib/flrimportedcalls.P,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- flrimportedcalls.P 3 Aug 2007 14:17:49 -0000 1.15 +++ flrimportedcalls.P 21 Apr 2008 03:49:57 -0000 1.16 @@ -68,3 +68,4 @@ flora_datatype_name/2 from flrdatatype. +?- import {}/1 from clpr. Index: flrhooks.P =================================================================== RCS file: /cvsroot/flora/flora2/syslib/flrhooks.P,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- flrhooks.P 21 Nov 2007 01:16:53 -0000 1.7 +++ flrhooks.P 21 Apr 2008 03:49:57 -0000 1.8 @@ -393,6 +393,7 @@ unwrap_hook(Hook,UnwrappedHook), %% bind Hook's arg#1 to Module and arg#2 Arg get_hook_args(UnwrappedHook,[Module,Arg|_]), + !, ( catch(call(UnwrappedHook), Exception, hook_error_handler(Exception,Action,HookType,UnwrappedHook)), |
|
From: Michael K. <ki...@us...> - 2008-04-21 03:48:48
|
Update of /cvsroot/flora/flora2/includes In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv12327/includes Modified Files: flrdefinition.flh Log Message: import clpr Index: flrdefinition.flh =================================================================== RCS file: /cvsroot/flora/flora2/includes/flrdefinition.flh,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- flrdefinition.flh 11 Mar 2007 23:19:15 -0000 1.17 +++ flrdefinition.flh 21 Apr 2008 03:48:48 -0000 1.18 @@ -9,6 +9,8 @@ #include "flora_errors.flh" +:- import {}/1 from clpr. + :- import flora_db_delete_all/1 from flrstoragebase. |
|
From: Michael K. <ki...@us...> - 2008-04-21 03:48:32
|
Update of /cvsroot/flora/flora2/flrincludes In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv12309/flrincludes Modified Files: flora_terms.flh Log Message: small additions Index: flora_terms.flh =================================================================== RCS file: /cvsroot/flora/flora2/flrincludes/flora_terms.flh,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- flora_terms.flh 5 Oct 2007 02:21:24 -0000 1.90 +++ flora_terms.flh 21 Apr 2008 03:48:36 -0000 1.91 @@ -731,6 +731,13 @@ WRAP_IMVDDEF=2, \ WRAP_OBJEQL=2] +#define WRAP_LIST_PRED [WRAP_TABLED_HILOG, \ + WRAP_NONTABLED_HILOG] + +#define WRAP_LIST_METH [WRAP_ISA, \ + WRAP_SUB, \ + WRAP_MVD, \ + WRAP_IMVD] /**************************************************************************** |
|
From: Michael K. <ki...@us...> - 2008-04-21 03:47:14
|
Update of /cvsroot/flora/flora2/docs In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv11849/docs Modified Files: flora2.tex Log Message: changed info on MS compiler Index: flora2.tex =================================================================== RCS file: /cvsroot/flora/flora2/docs/flora2.tex,v retrieving revision 1.187 retrieving revision 1.188 diff -u -d -r1.187 -r1.188 --- flora2.tex 23 Dec 2007 07:53:28 -0000 1.187 +++ flora2.tex 21 Apr 2008 03:47:11 -0000 1.188 @@ -308,7 +308,7 @@ %% A version of this compiler (which is all you need in order to compile XSB or \FLORA) can be downloaded free of charge from {\tt - http://msdn.microsoft.com/vstudio/express/visualC/default.aspx} It is + http://www.microsoft.com/express/vc/} It is also necessary to install Windows Platform SDK accessible from the above page. %% @@ -442,13 +442,13 @@ loading and compiling a program: %% \begin{quote} - flora2 ?- {\tt [programfile].} + {\tt flora2 ?- [programfile].} \end{quote} %% or %% \begin{quote} - flora2 ?- {\tt \_load(programfile).} + {\tt flora2 ?- \_load(programfile).} \end{quote} %% Here {\tt program-file} can contain a \FLORA program or a Prolog program. If @@ -551,7 +551,7 @@ affect only the \emph{subsequent} queries. That is, in %% \begin{verbatim} - flora2 ?- \_one, goallist1. + flora2 ?- _one, goallist1. flora2 ?- goallist2. \end{verbatim} %% |
|
From: Michael K. <ki...@us...> - 2008-04-21 03:46:07
|
Update of /cvsroot/flora/flora2 In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv11376 Modified Files: flrwrapper.P flrwrapper.H Log Message: optimization of flora_decode_predicate Index: flrwrapper.P =================================================================== RCS file: /cvsroot/flora/flora2/flrwrapper.P,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- flrwrapper.P 7 Aug 2007 15:59:04 -0000 1.42 +++ flrwrapper.P 21 Apr 2008 03:46:05 -0000 1.43 @@ -296,7 +296,7 @@ /***************************************************************************** flora_decode_predicate(+Call,-CallType,-ModuleName, -Wrapper, - -WrapPrefix,-BaseWrapperOrPredSym,-ArgsList) + -WrapPrefix,-BaseWrapperOrPredSym,-ArgList) This procedure decodes a predicate and returns answers as follows: @@ -335,7 +335,7 @@ Note: This procedure can also be used to decode a predicate symbol (without any argument). Then BaseWrapperOrPredSym is defined and - ArgsList=[]. + ArgList=[]. *****************************************************************************/ @@ -345,23 +345,23 @@ nonvar(ModuleName). %% flora_decode_predicate/6 flora_decode_predicate(Call,CallType,ModuleName, - WrapPrefix,BaseWrapperOrPredSym,ArgsList) :- + WrapPrefix,BaseWrapperOrPredSym,ArgList) :- flora_decode_predicate(Call,CallType,ModuleName, _, - WrapPrefix,BaseWrapperOrPredSym,ArgsList). + WrapPrefix,BaseWrapperOrPredSym,ArgList). %% flora_decode_predicate/7 %% This predicate is cached flora_decode_predicate(Call,CallType,ModuleName, Wrapper, - WrapPrefix,BaseWrapperOrPredSym,ArgsList) :- + WrapPrefix,BaseWrapperOrPredSym,ArgList) :- flora_decoded_predicate_cache(Call,CallType,ModuleName, Wrapper, - WrapPrefix,BaseWrapperOrPredSym,ArgsList), + WrapPrefix,BaseWrapperOrPredSym,ArgList), !. flora_decode_predicate(Call,CallType,ModuleName, Wrapper, - WrapPrefix,BaseWrapperOrPredSym,ArgsList) :- + WrapPrefix,BaseWrapperOrPredSym,ArgList) :- %% This branch is to decode an F-logic, a HiLog, or a Flora predicate. Call =.. [Funct|Args], %% Check if it begins with a module predicate prefix. @@ -388,10 +388,10 @@ %% a Hilog Predicate CallType = (hilog), BaseWrapperOrPredSym=WrapBase, - ArgsList=Args + ArgList=Args ; %% either an F-logic wrapper or Flora system wrapper predicate - Args=ArgsList, + Args=ArgList, BaseWrapperOrPredSym=WrapBase, ( flora_is_flogic_wrapper(WrapPrefix,BaseWrapperOrPredSym) -> CallType = (flogic) @@ -413,21 +413,29 @@ flora_decode_predicate(Call,CallType,_ModuleName, BaseWrapperOrPredSym, - _WrapPrefix,BaseWrapperOrPredSym,ArgsList) :- + _WrapPrefix,BaseWrapperOrPredSym,ArgList) :- CallType = prolog, %% prolog catches all other cases. - Call =.. [BaseWrapperOrPredSym|ArgsList], !, - %% Cache the resuult in the most general form - functor(Call,_,Arity), - length(NewArgsTempl,Arity), - PredTemplate =.. [BaseWrapperOrPredSym|NewArgsTempl], + %% this predicate creates skeleton in the same module as Call + skeletonize_prolog_call(Call,PredTemplate,BaseWrapperOrPredSym,ArgList), + PredTemplate =.. [_|NewArgsTempl], assert(flora_decoded_predicate_cache(PredTemplate,CallType, _ModuleName, BaseWrapperOrPredSym, _WrapPrefix, BaseWrapperOrPredSym,NewArgsTempl)). +skeletonize_prolog_call(Call,Skeleton,PredName,ArgList) :- + functor(Call,_,Arity), + (Arity==0 -> Skeleton=Call, PredName=Call, ArgList=[] + ; + term_psc(Call,PSC), + psc_name(PSC,PredName), + term_new(PSC,Skeleton), + Call =.. [_|ArgList] + ). + /***************************************************************************** flora_decode_module_name(+Call,-ModuleName) @@ -437,7 +445,7 @@ *****************************************************************************/ flora_decode_module_name(Call,ModuleName) :- flora_decode_predicate(Call,CallType,ModuleName, - _WrapPrefix,_BaseWrapperOrPredSym,_ArgsList), + _WrapPrefix,_BaseWrapperOrPredSym,_ArgList), ( CallType == (flogic) ; CallType == (hilog) ), @@ -448,7 +456,7 @@ flora_is_flogic_wrapper(+Call,-ModuleName,-Base) *****************************************************************************/ flora_is_flogic_wrapper(Call,ModuleName,Base) :- - flora_decode_predicate(Call,flogic,ModuleName,_WrapPrefix,Base,_ArgsList), + flora_decode_predicate(Call,flogic,ModuleName,_WrapPrefix,Base,_ArgList), !. Index: flrwrapper.H =================================================================== RCS file: /cvsroot/flora/flora2/flrwrapper.H,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- flrwrapper.H 11 Mar 2007 23:19:16 -0000 1.20 +++ flrwrapper.H 21 Apr 2008 03:46:05 -0000 1.21 @@ -32,6 +32,8 @@ flora_concat_atoms/2 from flrporting. +:- import term_psc/2, term_new/2, psc_name/2 from machine. + :- import flora_module_registry/1 from flrregistry. :- import flora_abort/1 from flrutils. |