flora-commits Mailing List for Flora-2 (Page 116)
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
|
|
From: <ki...@us...> - 2002-06-14 09:05:35
|
Update of /cvsroot/flora/flora2/syslib
In directory usw-pr-cvs1:/tmp/cvs-serv25757/syslib
Modified Files:
flrmetaops.P flrdynmod.P
Log Message:
1. Parser, compiler, coder: Allow things like X@..., where X is a variable
2. Compiler, coder: make sure that reified statements are encoded as body
literals even if they occur in the head.
Otherwise won't be able to match queries against facts.
3. Fixes in prologall() and prolog2hilog conversion. Seems to work correctly
now.
4. Changed syslib/flrmetaops.P and syslib/flrdynmod.P so that they'll work
with the richer X@... syntax.
Index: flrmetaops.P
===================================================================
RCS file: /cvsroot/flora/flora2/syslib/flrmetaops.P,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- flrmetaops.P 18 May 2002 17:43:28 -0000 1.1.1.1
+++ flrmetaops.P 14 Jun 2002 09:05:32 -0000 1.2
@@ -33,42 +33,85 @@
flora_decode_predicate/6
from flrwrapper.
-#include "flora_terms.flh"
+:- import flora_concat_atoms/2 from flrporting.
+#include "flora_terms.flh"
/******************************************************************************
FLLIBUNIVEQFORM(?X,?Y)
The meta predicate ~
******************************************************************************/
-FLLIBUNIVEQFORM(X,Y) :- X=Y, !.
+FLLIBUNIVEQFORM(X,Y) :-
+ (var(X) ; var(Y)),
+ !,
+ X=Y.
-%% This takes care of F-logic molecules with dynamic module specification
-FLLIBUNIVEQFORM(X, Y) :-
- X=FLLIBMODLIT(Fun1,Args1,ModuleName1),
- Y=FLLIBMODLIT(Fun2,Args2,ModuleName2),
+%% Now neither X nor Y are variables
+
+%% Speed up the case of nonvar1@Var1 ~ nonvar2@Var2
+FLLIBUNIVEQFORM(FLLIBMODLIT(WrapX,X,MX),FLLIBMODLIT(WrapY,Y,MY)) :-
+ WrapX \== FL_LIBMOD,
+ WrapY \== FL_LIBMOD,
+ WrapX = WrapY,
+ X=Y,
+ MX=MY.
+
+%% Spped up the case of nonvar1@nonvarmod1 ~ nonvar2@nonvarmod2
+FLLIBUNIVEQFORM(X,Y) :-
+ X \= FLLIBMODLIT(_,_,_),
+ Y \= FLLIBMODLIT(_,_,_),
!,
- Fun1 = Fun2,
- Args1 = Args2,
- ModuleName1 = ModuleName2.
+ X=Y.
-FLLIBUNIVEQFORM(X, Y) :-
- X=FLLIBMODLIT(Fun,Args,ModuleName),
+%% Common (expensive) case
+FLLIBUNIVEQFORM(X,Y) :-
+ get_canonical_form(X,(Wrap,Args,Mod,Callable)),
+ get_canonical_form(Y,(Wrap,Args,Mod,Callable)),
+ (var(Callable),nonvar(Wrap),nonvar(Args),nonvar(Mod)
+ -> flora_module_predicate(Wrap,Args,Mod,Callable)
+ ; var(Callable), nonvar(Wrap), nonvar(Args)
+ %% Cases like a(X)@M ~ Y@Z where module stays unbound
+ -> Callable = FLLIBMODLIT(Wrap,Args,Mod)
+ ; true
+ ).
+
+%% get_canonical_form(+Term,-Module,-CallableForm)
+%% Term is either a Hilog/Prolog term or a reified statement
+%% Canonical form is (Func,Args,Module,CallableForm)
+get_canonical_form(Term,(_,_,_,Term)) :-
+ var(Term),
+ !.
+
+%% Case of Var@...
+get_canonical_form(FLLIBMODLIT(FL_LIBMOD,Term,Mod),(Wrap,Args,Module,Callable)) :-
!,
- %% this ensures that ModuleName is bound whenever possible
- (nonvar(ModuleName), !
- ; flora_decode_predicate(Y,_Type,ModuleName,_WrapPref,_PredSym,_ArgL)),
- flora_module_predicate(Fun,Args,ModuleName,Literal),
- Literal = Y.
+ get_canonical_form(Term,Canon),
+ Canon = (Wrap,Args,NewMod,Callable),
+ (var(Term) -> Module = Mod
+ ; var(NewMod) -> Module=Mod
+ ; Module = NewMod
+ ).
-FLLIBUNIVEQFORM(X, Y) :-
- Y=FLLIBMODLIT(Fun,Args,ModuleName),
+%% Case of nonvar@Var
+get_canonical_form(FLLIBMODLIT(Wrap,Args,Mod), (Wrap,Args,Mod,Callable)) :-
!,
- %% this ensures that ModuleName is bound whenever possible
- (nonvar(ModuleName), !
- ; flora_decode_predicate(X,_Type,ModuleName,_WrapPref,_PredSym,_ArgL)),
- flora_module_predicate(Fun,Args,ModuleName,Literal),
- X = Literal.
+ (var(Mod) -> true
+ ; flora_module_predicate(Wrap,Args,Mod,Callable)
+ ).
+
+get_canonical_form(Term, Canon) :-
+ flora_decode_predicate(Term,Type,TermModuleName,Prefix,Wrapper,ArgL),
+ (Type = (hilog) ->
+ Canon = (WRAP_HILOG,[Wrapper|ArgL],TermModuleName,_)
+ ; (atom(Prefix) -> flora_concat_atoms([Prefix,Wrapper],Wrapper1)
+ ; Wrapper1 = Wrapper
+ ),
+ Canon = (Wrapper1,ArgL,TermModuleName,Term)
+ ).
+
+
+
%% This takes care of first-order Flora predicates with dynamic
%% module specification
Index: flrdynmod.P
===================================================================
RCS file: /cvsroot/flora/flora2/syslib/flrdynmod.P,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- flrdynmod.P 18 May 2002 17:43:28 -0000 1.1.1.1
+++ flrdynmod.P 14 Jun 2002 09:05:32 -0000 1.2
@@ -32,9 +32,12 @@
:- import
flora_check_module_name/1,
flora_module_predicate/4,
+ flora_decode_module_prefix/3,
flora_firstorder_module_predicate/4
from flrwrapper.
+:- import flora_error_line/2 from flrprint.
+
/*********************************************************************
This file is for the following dynamic module references:
@@ -50,11 +53,30 @@
/*********************************************************************
fllibmodlit(+Functor,+Args,+ModuleName)
*********************************************************************/
-fllibmodlit(F,Args,ModuleName) :-
+fllibmodlit(F,Arg,ModuleName) :-
( flora_check_module_name(ModuleName) ->
- flora_module_predicate(F,Args,ModuleName,P),
- !,
- call(P)
+ (var(Arg) -> flora_error_line('Uninstantiated literal, ~w@~w',
+ [Arg,ModuleName]),
+ abort
+ ; (
+ is_list(Arg), Arg = Args, !, % Term@X
+ flora_module_predicate(F,Args,ModuleName,P)
+ ; atom(Arg), !, % Var@..., Var bound to atom
+ ( % if already a hilog predicate -- use it
+ flora_decode_module_prefix(Arg,_,_), Arg = P, !
+ %% else construct it
+ ; flora_module_predicate(WRAP_HILOG,[Arg],ModuleName,P)
+ )
+ ; Arg =.. [Funct|Args], !, % Var@..., Var bound to compound
+ ( % if already a hilog or flogic predicate -- use it
+ flora_decode_module_prefix(Funct,_,_), Arg = P, !
+ %% else construct it
+ ; flora_module_predicate(Funct,Args,ModuleName,P)
+ )
+ ),
+ !,
+ call(P)
+ )
;
abort
).
@@ -63,9 +85,28 @@
/*********************************************************************
fllibmodobj(+Functor,+Args,+ModuleName,-Predicate)
*********************************************************************/
-fllibmodobj(F,Args,ModuleName,P) :-
+fllibmodobj(F,Arg,ModuleName,P) :-
( flora_check_module_name(ModuleName) ->
- flora_module_predicate(F,Args,ModuleName,P)
+ (var(Arg) -> flora_error_line('Uninstantiated literal, ~w@~w',
+ [Arg,ModuleName]),
+ abort
+ ; (
+ is_list(Arg), Arg = Args, !, % Term@X
+ flora_module_predicate(F,Args,ModuleName,P)
+ ; atom(Arg), !, % Var@..., Var bound to atom
+ ( % if already a hilog predicate -- use it
+ flora_decode_module_prefix(Arg,_,_), Arg = P, !
+ %% else construct it
+ ; flora_module_predicate(WRAP_HILOG,[Arg],ModuleName,P)
+ )
+ ; Arg =.. [Funct|Args], !, % Var@..., Var bound to compound
+ ( % if already a hilog or flogic predicate -- use it
+ flora_decode_module_prefix(Funct,_,_), Arg = P, !
+ %% else construct it
+ ; flora_module_predicate(Funct,Args,ModuleName,P)
+ )
+ )
+ )
;
abort
),
|
|
From: <ki...@us...> - 2002-06-14 09:05:35
|
Update of /cvsroot/flora/flora2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv25757/includes
Modified Files:
flrdefinition.flh
Log Message:
1. Parser, compiler, coder: Allow things like X@..., where X is a variable
2. Compiler, coder: make sure that reified statements are encoded as body
literals even if they occur in the head.
Otherwise won't be able to match queries against facts.
3. Fixes in prologall() and prolog2hilog conversion. Seems to work correctly
now.
4. Changed syslib/flrmetaops.P and syslib/flrdynmod.P so that they'll work
with the richer X@... syntax.
Index: flrdefinition.flh
===================================================================
RCS file: /cvsroot/flora/flora2/includes/flrdefinition.flh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- flrdefinition.flh 25 May 2002 07:20:41 -0000 1.2
+++ flrdefinition.flh 14 Jun 2002 09:05:32 -0000 1.3
@@ -6,6 +6,8 @@
This file is automatically included by the FLORA compiler.
************************************************************************/
+:- import flora_plg2hlg/4 from prolog2hilog.
+:- import flora_post_p2h_conversion/2 from flrutils.
:- import
storage_delete_all/1,
|
|
From: <ki...@us...> - 2002-06-10 02:17:08
|
Update of /cvsroot/flora/flora2/docs
In directory usw-pr-cvs1:/tmp/cvs-serv12137/docs
Modified Files:
flora2.tex
Log Message:
clarifications
Index: flora2.tex
===================================================================
RCS file: /cvsroot/flora/flora2/docs/flora2.tex,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- flora2.tex 3 Jun 2002 04:28:25 -0000 1.7
+++ flora2.tex 10 Jun 2002 02:17:05 -0000 1.8
@@ -143,7 +143,11 @@
\newcommand{\dq}{\symbol{34}}
-\title{\FLORA: User's Manual}
+\title{
+ \FLORA: User's Manual
+ \\
+ {\Large Version 0.90}
+ }
\author{
{Guizhen Yang
@@ -151,7 +155,7 @@
Michael Kifer}
\\\\
Department of Computer Science\\
- State University of New York at Stony Brook\\
+ Stony Brook University\\
Stony Brook, NY 11794-4400
}
@@ -2428,9 +2432,9 @@
\cite{hilog-jlp}. Any HiLog term can be consistently translated into a
Prolog term. For instance, {\tt group(X)(Y,Z)} can be represented by the
Prolog term {\tt apply(apply(group,X),Y,Z)}. The translation scheme is
-pretty straightforward and described in \cite{hilog-jlp}.
+pretty straightforward and is described in \cite{hilog-jlp}.
-In \FLORA any Id-term, including function symbols and predicate symbols,
+Any Id-term in \FLORA, including function symbols and predicate symbols,
are considered to be HiLog terms and therefore are subject to translation.
That is, even a normal Prolog term will by default be represented using the
HiLog translation, e.g., {\tt foo(a)} will be represented as {\tt
@@ -2450,16 +2454,15 @@
%%
For instance, (\ref{eq-hilog-notallowed}) will cause an error because {\tt
X} is bound to the \emph{term} {\tt a(b)}, which is different from the
-atomic formula {\tt a(b)}, and thus has no truth value. In a future
-release, we will provide a predicate {\tt call}/1, which converts HiLog
-terms in the domain of arguments into HiLog terms in the domain of atomic
-formulas, so (\ref{eq-hilog-notallowed}) could be rewritten into {\tt p(X),
- X(p), call(X).}\footnote{
- %%
- Of course, {\tt call/1} exists in Prolog as well. However, unlike HiLog
- and sorted HiLog, this predicate does not have logical semantics.
- %%
- }
+atomic formula {\tt a(b)}, and thus has no truth value. In fact, since
+terms are not associated with any \FLORA module, it is not clear what $\tt
+X(p)$ should mean when $\tt X$ is bound to a \emph{term} $\tt a(b)$ ({\it
+ e.g.}, in what module should $\tt a(b)(p)$ be called). In a future
+release, we will provide a predicate {\tt call}/2, which would convert
+HiLog terms into HiLog predicates in a given module, so
+(\ref{eq-hilog-notallowed}) could be rewritten into {\tt p(X), X(p),
+ call(X, \_@).} In this example, {\tt call(X, \_@)} would cause {\tt a(b)}
+to be executed in the current module.
|
|
From: <ki...@us...> - 2002-06-10 02:16:03
|
Update of /cvsroot/flora/flora2/p2h
In directory usw-pr-cvs1:/tmp/cvs-serv11928/p2h
Modified Files:
p2h_config.P
Log Message:
small fixes
Index: p2h_config.P
===================================================================
RCS file: /cvsroot/flora/flora2/p2h/p2h_config.P,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- p2h_config.P 18 May 2002 17:43:28 -0000 1.1.1.1
+++ p2h_config.P 10 Jun 2002 02:16:00 -0000 1.2
@@ -27,49 +27,50 @@
%% and loaded.
:- compiler_options([xpp_on]).
-#include "extensions_xsb.h"
+#include "flora_porting.flh"
-:- import slash/1 from machine.
-:- import fmt_write_string/3, path_sysop/3 from file_io.
-:- import search_module/6 from consult.
-:- import xsb_configuration/2, windows_os/0 from xsb_configuration.
-:- import str_cat/3, str_sub/2 from string.
+:- import
+ flora_slash/1,
+ flora_concat_atoms/2,
+ flora_file_op/3,
+ flora_running_under/1
+ from flrporting.
:- import flora_configuration/2 from flrregistry.
-
-is_cygwin :- xsb_configuration(architecture,A), str_sub(cygwin,A).
+:- import search_module/6 from consult.
+:- import xsb_configuration/2 from xsb_configuration.
?- flora_configuration(installdir, FloraDir),
- slash(Slash),
+ flora_slash(Slash),
Basename = prolog2hilog,
- fmt_write_string(Module,
- '%s%sp2h%s%s', f(FloraDir, Slash, Slash,Basename)),
+ flora_concat_atoms([FloraDir,Slash,p2h,Slash,Basename],Module),
( %% avoid recompilation: check if prolog2hilog.OBJ exists and
%% is newer than prolog2hilog.c.
search_module(Basename,Dir,_Mod,_Ext,_Base,ModuleO),
- str_cat(Module, '.c', ModuleSourceFile),
- path_sysop(newerthan,ModuleO,ModuleSourceFile)
+ flora_concat_atoms([Module, '.c'], ModuleSourceFile),
+ flora_file_op(newerthan,ModuleO,ModuleSourceFile)
%% module compiled and is current, so just load
-> [Basename]
+ ; % Don't check anything on Windows -- module is supposed to be compiled
+ flora_running_under(windows) -> [Basename]
+
%% If Module isn't compiled or is old --- recompile
; xsb_configuration(compiler, CC),
xsb_configuration(config_libdir, ConfigLibdir),
- str_cat(Module, XSB_OBJ_EXTENSION_ATOM, Objfile),
+ flora_concat_atoms([Module,'.', PROLOG_OFILE_EXT], Objfile),
consult(Module, [cc(CC), cc_opts(' ')]),
- fmt_write_string(LibObjFile,
- '%s%s%s%s',
- args(ConfigLibdir,Slash,Basename,
- XSB_OBJ_EXTENSION_ATOM)),
- path_sysop(rename,Objfile, LibObjFile),
- ((windows_os; is_cygwin), !
- ;
- %% Note: the .so ending is Unix-ism. I dunno what this
- %% corresponds to in windows. - mk
- str_cat(Module, '.so', SharedLib),
- fmt_write_string(LibMod,
- '%s%s%s.so',
- a(ConfigLibdir,Slash,Basename)),
- path_sysop(rename,SharedLib,LibMod)
+ flora_concat_atoms([ConfigLibdir,Slash,Basename,'.',PROLOG_OFILE_EXT],
+ LibObjFile),
+ flora_file_op(rename,Objfile, LibObjFile),
+ (flora_running_under(unix)
+ ->
+ %% Note: the .so ending is Unix-specific.
+ %% We don't need to run this script under Windows
+ flora_concat_atoms([Module, '.so'], SharedLib),
+ flora_concat_atoms([ConfigLibdir,Slash,Basename,'.so'], LibMod),
+ flora_file_op(rename,SharedLib,LibMod)
+ ; % Not sure what to do under Cygwin -- probably nothing
+ true
)
).
|
|
From: <ki...@us...> - 2002-06-10 02:15:40
|
Update of /cvsroot/flora/flora2
In directory usw-pr-cvs1:/tmp/cvs-serv11851
Modified Files:
version.flh flrwrapper.P flrporting.P flrparser.P Makefile
Log Message:
tabled some expensive predicates in flrwrapper.P
improvements in flrporting.P
other minor stuff
Index: version.flh
===================================================================
RCS file: /cvsroot/flora/flora2/version.flh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- version.flh 8 Jun 2002 20:02:07 -0000 1.2
+++ version.flh 10 Jun 2002 02:15:36 -0000 1.3
@@ -1,2 +1,2 @@
-#define FLORA_VERSION '0.88 (Phalaenopsis intermedia) of June 2002'
+#define FLORA_VERSION '0.90 (under development) of June 2002'
Index: flrwrapper.P
===================================================================
RCS file: /cvsroot/flora/flora2/flrwrapper.P,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- flrwrapper.P 18 May 2002 17:43:26 -0000 1.1.1.1
+++ flrwrapper.P 10 Jun 2002 02:15:36 -0000 1.2
@@ -62,6 +62,10 @@
It fails if the input is not a valid Flora module name. It is used for
either F-logic or HiLog wrapper predicates.
*****************************************************************************/
+%% Tabling r\this expensive predicate can speed up dynamic module calls
+%% like foo@X
+:- table flora_module_predicate/4.
+
flora_module_predicate(Functor,Args,ModuleName,Predicate) :-
flora_module_name(ModuleName,Type,WS),
!,
@@ -192,7 +196,7 @@
flora_module_name_error(+ModuleName)
*****************************************************************************/
flora_module_name_error(ModuleName) :-
- flora_error_line("invalid Flora module name `~w'",args(ModuleName)).
+ flora_error_line("invalid Flora module name `~w'",ModuleName).
/***************************************************************************
@@ -445,6 +449,9 @@
ArgsList=[]. In (3), PredicateSymbol=[] and ArgsList=[].
*****************************************************************************/
+%% This is an expensive predicate -- table it
+:- table flora_decode_predicate/6.
+
flora_decode_predicate(Predicate,PredicateType,ModuleName,
WrapPrefix,PredicateSymbol,ArgsList) :-
%% This branch is to decode an F-logic, a HiLog, or a Flora predicate.
Index: flrporting.P
===================================================================
RCS file: /cvsroot/flora/flora2/flrporting.P,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- flrporting.P 3 Jun 2002 04:28:25 -0000 1.9
+++ flrporting.P 10 Jun 2002 02:15:36 -0000 1.10
@@ -49,6 +49,7 @@
flora_write_quoted_atom/1,
flora_write_atom/1,
flora_slash/1,
+ flora_running_under/1,
flora_file_op/2,
flora_file_op/3,
flora_copy_input/0,
@@ -159,3 +160,24 @@
flora_write_atom(Atom) :-
stat_flag(CURRENT_OUTPUT, StdOut),
file_puttoken(StdOut,TK_ATOM,Atom).
+
+
+:- table flora_running_under/1.
+
+flora_running_under(cygwin) :-
+ xsb_configuration(architecture,A),
+ str_sub(cygwin,A),
+ !.
+flora_running_under(windows) :-
+ xsb_configuration(architecture,A),
+ str_sub(windows,A),
+ !.
+flora_running_under(macos) :-
+ xsb_configuration(architecture,A),
+ str_sub(rhapsody,A),
+ !.
+flora_running_under(darwin) :-
+ xsb_configuration(architecture,A),
+ str_sub(rhapsody,A),
+ !.
+flora_running_under(unix).
Index: flrparser.P
===================================================================
RCS file: /cvsroot/flora/flora2/flrparser.P,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- flrparser.P 2 Jun 2002 18:51:00 -0000 1.3
+++ flrparser.P 10 Jun 2002 02:15:36 -0000 1.4
@@ -2664,7 +2664,7 @@
parsing_error(If,NO_MULTIATT,Status)
; F == FL_AT ->
- %% Module name specs for F-logic modules should not be allowed.
+ %% Module specs for F-logic molecules in the head are not allowed.
%% However, module name specs for a term should be OK, since it
%% might be a useful meta-programming feature.
%% But this requires more checking.
Index: Makefile
===================================================================
RCS file: /cvsroot/flora/flora2/Makefile,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Makefile 8 Jun 2002 20:02:07 -0000 1.4
+++ Makefile 10 Jun 2002 02:15:36 -0000 1.5
@@ -107,7 +107,7 @@
# always compile flora2devel to make sure that .xwam has the latest .flora_path
-flora2devel${OBJEXT} : flora2devel.P
+flora2devel${OBJEXT} : flora2devel.P version.flh
@echo 'mc(flora2devel,$(OPTION)).' >> cmd...
flroperator${OBJEXT} : flroperator.P flroperator.H $(FLORA_TERMS)
|
|
From: <ki...@us...> - 2002-06-10 02:13:05
|
Update of /cvsroot/flora/flora-testsuite/apptests/programs
In directory usw-pr-cvs1:/tmp/cvs-serv11316/apptests/programs
Modified Files:
Grade.flr
Log Message:
small fixes
Index: Grade.flr
===================================================================
RCS file: /cvsroot/flora/flora-testsuite/apptests/programs/Grade.flr,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Grade.flr 24 May 2002 07:08:04 -0000 1.1
+++ Grade.flr 10 Jun 2002 02:13:02 -0000 1.2
@@ -61,9 +61,8 @@
find_grade(Stud,AvgVal,DescendingBounds,Grade),
Val = Grade.
-find_grade(Stud,[],_) :- !,
- Stud[weighted_average->A],
- abort(('Avg ', A, 'for ', Stud, ' is out of range'))@flora(sys).
+find_grade(Stud,Avg,[],_) :- !,
+ abort(('Avg ', Avg, 'for ', Stud, ' is out of range'))@flora(sys).
find_grade(Stud,Avg,[B|Bounds],Grade) :-
B > Avg,
!,
|
|
From: <ki...@us...> - 2002-06-10 02:13:05
|
Update of /cvsroot/flora/flora-testsuite
In directory usw-pr-cvs1:/tmp/cvs-serv11316
Modified Files:
test_dir.sh
Log Message:
small fixes
Index: test_dir.sh
===================================================================
RCS file: /cvsroot/flora/flora-testsuite/test_dir.sh,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- test_dir.sh 18 May 2002 16:08:36 -0000 1.1.1.1
+++ test_dir.sh 10 Jun 2002 02:13:02 -0000 1.2
@@ -2,8 +2,10 @@
# Test files in one directory
#============================================================================
+dir=`pwd`
+dir=`basename $dir`
echo "-------------------------------------------------------"
-echo "--- Running flora_tests/test_dir.sh ---"
+echo "--- Running $dir/test_dir.sh ---"
echo "-------------------------------------------------------"
FLORADIR=$1
@@ -34,15 +36,9 @@
# Remove the Prolog and object files to make sure we are using the
# latest compiled sources
-# Precautionary measure: rm only if we are certain
-# that this is flora_tests directory
-dir=`pwd`
-dir=`basename $dir`
-if test "flora_tests"="$dir" ; then
- rm -f *.P *${OBJEXT} *.fld *.fdb
- rm -f ../datafiles/*.P ../datafiles/*${OBJEXT} \
+rm -f *.P *${OBJEXT} *.fld *.fdb
+rm -f ../datafiles/*.P ../datafiles/*${OBJEXT} \
../datafiles/*.fld ../datafiles/*.fdb
-fi
# run the tests
|
|
From: <ki...@us...> - 2002-06-09 00:10:23
|
Update of /cvsroot/flora/flora-website In directory usw-pr-cvs1:/tmp/cvs-serv1548 Modified Files: release_notes.html Log Message: Index: release_notes.html =================================================================== RCS file: /cvsroot/flora/flora-website/release_notes.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- release_notes.html 8 Jun 2002 23:40:19 -0000 1.7 +++ release_notes.html 9 Jun 2002 00:10:20 -0000 1.8 @@ -10,8 +10,37 @@ <hr> <center> +<h1> Release Notes for Version 0.90 (...)</h1> +</center> + +<h3>General</h3> +<p> +</p> + + +<h3>News</h3> +<ul> + <li> </li> + <li> </li> +</ul> +<h3>Bugfixes</h3> +<ul> + <li> </li> +</ul> +<h3>Backward Incompatibility</h3> +<ul> + <li> </li> +</ul> + + +<pre> + +</pre> + +<hr> +<center> <a name="interim"> -<h1> Release Notes for Version 0.88</h1> +<h1> Release Notes for Version 0.88 (Phalaenopsis intermedia)</h1> </center> <h3>General</h3> @@ -57,7 +86,9 @@ <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> @@ -82,14 +113,18 @@ <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> |
|
From: <ki...@us...> - 2002-06-08 23:40:23
|
Update of /cvsroot/flora/flora-website
In directory usw-pr-cvs1:/tmp/cvs-serv28731
Modified Files:
release_notes.html installation.html florahome.php
download.php documentation.php
Log Message:
minor fixes
Index: release_notes.html
===================================================================
RCS file: /cvsroot/flora/flora-website/release_notes.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- release_notes.html 3 Jun 2002 04:30:04 -0000 1.6
+++ release_notes.html 8 Jun 2002 23:40:19 -0000 1.7
@@ -18,7 +18,10 @@
<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.
+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>
@@ -55,8 +58,6 @@
literal <tt>_@</tt> to refer to the current module. This is more convenient
and faster.
<li> The <tt>bform</tt> argument specifier is now called <tt>meta</tt>.
-<li> The compiler directive "arguments" is now called "reification".
- In the future it will apply to all FLORA literals, not just predicates.
</ul>
Index: installation.html
===================================================================
RCS file: /cvsroot/flora/flora-website/installation.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- installation.html 27 May 2002 07:57:20 -0000 1.3
+++ installation.html 8 Jun 2002 23:40:19 -0000 1.4
@@ -54,7 +54,7 @@
<pre>
cd D:\bleeding-edge-flora\flora2
makeflora clean
- makeflora D:\XSB\bin\xsb.bat
+ makeflora D:\XSB\bin\xsb.bat
</pre>
<p>
Index: florahome.php
===================================================================
RCS file: /cvsroot/flora/flora-website/florahome.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- florahome.php 27 May 2002 18:40:05 -0000 1.4
+++ florahome.php 8 Jun 2002 23:40:19 -0000 1.5
@@ -40,8 +40,8 @@
<p>
<IMG src="images/new.gif" alt="New">
-June 10, 2002: Interim release of <a href="download.php">FLORA-2, version
-0.88</a>.
+June 8, 2002: Interim release of FLORA-2, <a href="download.php">version
+0.88 (Phalaenopsis intermedia)</a>.
Many new features and bug fixes.
See <a href="release_notes.html">release notes</a> for the details.
</p>
Index: download.php
===================================================================
RCS file: /cvsroot/flora/flora-website/download.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- download.php 27 May 2002 07:57:20 -0000 1.4
+++ download.php 8 Jun 2002 23:40:19 -0000 1.5
@@ -14,20 +14,6 @@
latest (and not always stable) version can be downloaded from CVS.
</p>
-<h3>Installing the version distributed with XSB:</h3>
-<p>
- Download and install <a href="http://xsb.sourceforge.net"
- target="new_window">XSB</a>. If you are planning to use the version of
- FLORA-2 that is distributed with XSB (which is likely to be not the latest
- version), then FLORA-2 is already installed. However, it might need to be
- <a href="configure.html" target="new_window">configured</a>.
-</p>
-<p>
- Please take a look at the <a href="release_notes.html#package"
- target="new_window">release notes</a> for the list of changes, bug fixes, and
- incompatibilities.
-</p>
-
<h3>Installing an interim stable version:</h3>
<p>
Sometimes FLORA-2 releases happen in-between the stable releases of XSB.
@@ -48,6 +34,20 @@
</p>
<p>
Please take a look at the <a href="release_notes.html#interim"
+ target="new_window">release notes</a> for the list of changes, bug fixes, and
+ incompatibilities.
+</p>
+
+<h3>Installing the version distributed with XSB as a package:</h3>
+<p>
+ Download and install <a href="http://xsb.sourceforge.net"
+ target="new_window">XSB</a>. If you are planning to use the version of
+ FLORA-2 that is distributed with XSB (which is likely to be not the latest
+ version), then FLORA-2 is already installed. However, it might need to be
+ <a href="configure.html" target="new_window">configured</a>.
+</p>
+<p>
+ Please take a look at the <a href="release_notes.html#package"
target="new_window">release notes</a> for the list of changes, bug fixes, and
incompatibilities.
</p>
Index: documentation.php
===================================================================
RCS file: /cvsroot/flora/flora-website/documentation.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- documentation.php 21 May 2002 17:07:44 -0000 1.2
+++ documentation.php 8 Jun 2002 23:40:19 -0000 1.3
@@ -9,17 +9,18 @@
<h1>FLORA-2 Documentation</h1>
<p>
- The FLORA-2 manual is distributed with the system. You need LaTeX and the
+ The sources of FLORA-2 manual are available from CVS. You need LaTeX and the
associated tools in order to create a printable version. For your
- convenience, a PDF version of the manual is provided below.
+ convenience, a PDF version of the manual is provided for the official
+ releases of this software.
</p>
<ul>
- <li>Manual for the <a href="docs/packagemanual.pdf">FLORA-2 package</a>
- that is distributed with the latest version of XSB.
- </li>
- <li>Manual for the <a href="docs/interimmanual.pdf">latest interim
+ <li><a href="docs/interimmanual.pdf">Manual for the latest interim
release</a> of FLORA-2.
+ </li>
+ <li><a href="docs/packagemanual.pdf">Manual for the older version that is</a>
+ packaged with XSB.
</li>
<li><emph>Manual for the CVS version</emph>: Since this version changes
frequently, we do not convert it to PDF on a regular basis. You can
|
|
From: <ki...@us...> - 2002-06-08 21:54:31
|
Update of /cvsroot/flora/flora2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv7859/admin
Modified Files:
ReleaseTarBall.sh
Log Message:
minor
Index: ReleaseTarBall.sh
===================================================================
RCS file: /cvsroot/flora/flora2/admin/ReleaseTarBall.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ReleaseTarBall.sh 8 Jun 2002 20:02:07 -0000 1.1
+++ ReleaseTarBall.sh 8 Jun 2002 21:54:27 -0000 1.2
@@ -14,7 +14,7 @@
./flora2/debugger/*.in ./flora2/debugger/*.P \
./flora2/demos/*.flr ./flora2/demos/*.sh \
./flora2/demos/Makefile ./flora2/demos/NMakefile.mak \
- ./flora2/docs/flora2.ps ./flora2/docs/flora2.pdf \
+ ./flora2/docs/flora2.pdf \
./flora2/docs/technical.txt \
./flora2/emacs/flora.el \
./flora2/flrincludes/*.flh \
|
|
From: <ki...@us...> - 2002-06-08 20:02:10
|
Update of /cvsroot/flora/flora2
In directory usw-pr-cvs1:/tmp/cvs-serv13858
Modified Files:
version.flh flrconfig.P Makefile INSTALLATION .cvsignore
Added Files:
LICENSE
Log Message:
prepared for release
--- NEW FILE: LICENSE ---
The XSB System
==============
Copyright (C) The Research Foundation of SUNY, 1986, 1993-2002
Copyright (C) ECRC, Germany, 1990
XSB is distributed under the terms of GNU LIBRARY GENERAL PUBLIC
LICENSE reproduced below.
GNU LIBRARY GENERAL PUBLIC LICENSE
==================================
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
========
The licenses for most software are designed to take away your freedom to
share and change it. By contrast, the GNU General Public Licenses are
intended to guarantee your freedom to share and change free software--to
make sure the software is free for all its users.
This license, the Library General Public License, applies to some specially
designated Free Software Foundation software, and to any other libraries
whose authors decide to use it. You can use it for your libraries, too.
When we speak of free software, we are referring to freedom, not price. Our
General Public Licenses are designed to make sure that you have the freedom
to distribute copies of free software (and charge for this service if you
wish), that you receive source code or can get it if you want it, that you
can change the software or use pieces of it in new free programs; and that
you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to
deny you these rights or to ask you to surrender the rights. These
restrictions translate to certain responsibilities for you if you
distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis or for
a fee, you must give the recipients all the rights that we gave you. You
must make sure that they, too, receive or can get the source code. If you
link a program with the library, you must provide complete object files to
the recipients so that they can relink them with the library, after making
changes to the library and recompiling it. And you must show them these
terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright the
library, and (2) offer you this license which gives you legal permission to
copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain that
everyone understands that there is no warranty for this free library. If
the library is modified by someone else and passed on, we want its
recipients to know that what they have is not the original version, so that
any problems introduced by others will not reflect on the original authors'
reputations.
Finally, any free program is threatened constantly by software patents. We
wish to avoid the danger that companies distributing free software will
individually obtain patent licenses, thus in effect transforming the
program into proprietary software. To prevent this, we have made it clear
that any patent must be licensed for everyone's free use or not licensed at
all.
Most GNU software, including some libraries, is covered by the ordinary GNU
General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General Public
License for libraries did not effectively promote software sharing, because
most developers did not use the libraries. We concluded that weaker
conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the users
of those programs of all benefit from the free status of the libraries
themselves. This Library General Public License is intended to permit
developers of non-free programs to use free libraries, while preserving
your freedom as a user of such programs to change the free libraries that
are incorporated in them. (We have not seen how to achieve this as regards
changes in header files, but we have achieved it as regards changes in the
actual functions of the Library.) The hope is that this will lead to faster
development of free libraries.
The precise terms and conditions for copying, distribution and modification
follow. Pay close attention to the difference between a "work based on the
library" and a "work that uses the library". The former contains code
derived from the library, while the latter only works together with the
library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
===============================================================
0. This License Agreement applies to any software library which contains a
notice placed by the copyright holder or other authorized party saying
it may be distributed under the terms of this Library General Public
License (also called "this License"). Each licensee is addressed as
"you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work which
has been distributed under these terms. A "work based on the Library"
means either the Library or any derivative work under copyright law:
that is to say, a work containing the Library or a portion of it, either
verbatim or with modifications and/or translated straightforwardly into
another language. (Hereinafter, translation is included without
limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for making
modifications to it. For a library, complete source code means all the
source code for all modules it contains, plus any associated interface
definition files, plus the scripts used to control compilation and
installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of running
a program using the Library is not restricted, and output from such a
program is covered only if its contents constitute a work based on the
Library (independent of the use of the Library in a tool for writing
it). Whether that is true depends on what the Library does and what the
program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's complete
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the notices
that refer to this License and to the absence of any warranty; and
distribute a copy of this License along with the Library.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Library or any portion of it,
thus forming a work based on the Library, and copy and distribute such
modifications or work under the terms of Section 1 above, provided that
you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no charge
to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful. (For example, a function in a
library to compute square roots has a purpose that is entirely
well-defined independent of the application. Therefore, Subsection
2d requires that any application-supplied function or table used
by this function must be optional: if the application does not
supply it, the square root function must still compute square
roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library, and
can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based on
the Library, the distribution of the whole must be on the terms of this
License, whose permissions for other licensees extend to the entire
whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of a
storage or distribution medium does not bring the other work under the
scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so that
they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in these
notices.
Once this change is made in a given copy, it is irreversible for that
copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of the
Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or derivative of
it, under Section 2) in object code or executable form under the terms
of Sections 1 and 2 above provided that you accompany it with the
complete corresponding machine-readable source code, which must be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange.
If distribution of object code is made by offering access to copy from a
designated place, then offering equivalent access to copy the source
code from the same place satisfies the requirement to distribute the
source code, even though third parties are not compelled to copy the
source along with the object code.
5. A program that contains no derivative of any portion of the Library, but
is designed to work with the Library by being compiled or linked with
it, is called a "work that uses the Library". Such a work, in isolation,
is not a derivative work of the Library, and therefore falls outside the
scope of this License.
However, linking a "work that uses the Library" with the Library creates
an executable that is a derivative of the Library (because it contains
portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License. Section 6
states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is
not. Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data structure
layouts and accessors, and small macros and small inline functions (ten
lines or less in length), then the use of the object file is
unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section
6. Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or link a
"work that uses the Library" with the Library to produce a work
containing portions of the Library, and distribute that work under terms
of your choice, provided that the terms permit modification of the work
for the customer's own use and reverse engineering for debugging such
modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work during
execution displays copyright notices, you must include the copyright
notice for the Library among them, as well as a reference directing the
user to the copy of this License. Also, you must do one of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood that
the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at least three
years, to give the same user the materials specified in Subsection
6a, above, for a charge no more than the cost of performing this
distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the Library"
must include any data and utility programs needed for reproducing the
executable from it. However, as a special exception, the source code
distributed need not include anything that is normally distributed (in
either source or binary form) with the major components (compiler,
kernel, and so on) of the operating system on which the executable runs,
unless that component itself accompanies the executable.
It may happen that this requirement contradicts the license restrictions
of other proprietary libraries that do not normally accompany the
operating system. Such a contradiction means you cannot use both them
and the Library together in an executable that you distribute.
7. You may place library facilities that are a work based on the Library
side-by-side in a single library together with other library facilities
not covered by this License, and distribute such a combined library,
provided that the separate distribution of the work based on the Library
and of the other library facilities is otherwise permitted, and provided
that you do these two things:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities. This
must be distributed under the terms of the Sections above.
b) Give prominent notice with the combined library of the fact that
part of it is a work based on the Library, and explaining where to
find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute the
Library except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense, link with, or distribute the
Library is void, and will automatically terminate your rights under this
License. However, parties who have received copies, or rights, from you
under this License will not have their licenses terminated so long as
such parties remain in full compliance.
9. You are not required to accept this License, since you have not signed
it. However, nothing else grants you permission to modify or distribute
the Library or its derivative works. These actions are prohibited by law
if you do not accept this License. Therefore, by modifying or
distributing the Library (or any work based on the Library), you
indicate your acceptance of this License to do so, and all its terms and
conditions for copying, distributing or modifying the Library or works
based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent license
would not permit royalty-free redistribution of the Library by all
those who receive copies directly or indirectly through you, then the
only way you could satisfy both it and this License would be to refrain
entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply, and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is implemented
by public license practices. Many people have made generous
contributions to the wide range of software distributed through that
system in reliance on consistent application of that system; it is up
to the author/donor to decide if he or she is willing to distribute
software through any other system and a licensee cannot impose that
choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in certain
countries either by patents or by copyrighted interfaces, the original
copyright holder who places the Library under this License may add an
explicit geographical distribution limitation excluding those
countries, so that distribution is permitted only in or among countries
not thus excluded. In such case, this License incorporates the
limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new versions of
the Library General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in
detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a license
version number, you may choose any version ever published by the Free
Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free Software
Foundation; we sometimes make exceptions for this. Our decision will be
guided by the two goals of preserving the free status of all
derivatives of our free software and of promoting the sharing and reuse
of software generally.
NO WARRANTY
===========
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH
YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY
(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR
OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Index: version.flh
===================================================================
RCS file: /cvsroot/flora/flora2/version.flh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- version.flh 2 Jun 2002 18:51:00 -0000 1.1
+++ version.flh 8 Jun 2002 20:02:07 -0000 1.2
@@ -1,2 +1,2 @@
-#define FLORA_VERSION '0.88 of June 2002'
+#define FLORA_VERSION '0.88 (Phalaenopsis intermedia) of June 2002'
Index: flrconfig.P
===================================================================
RCS file: /cvsroot/flora/flora2/flrconfig.P,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- flrconfig.P 27 May 2002 07:59:22 -0000 1.3
+++ flrconfig.P 8 Jun 2002 20:02:07 -0000 1.4
@@ -24,16 +24,21 @@
told,
(windows_os
-> tell('runflora.bat'),
- writeln('@echo OFF'),
- write('@set FLORADIR="'), writeq(FloraDir), write('"'), nl,
- write('@set PROLOG='), write(ConfigBinDir), writeln('\xsb'),
- writeln('@%PROLOG% -e "asserta(library_directory(%FLORADIR%)). [flora2devel]. flora_shell." %1 %2 %3 %4 %5 %6 %7')
+ writeln('@echo OFF'),
+ write('@set FLORADIR="'), writeq(FloraDir), write('"'), nl,
+ write('@set PROLOG='), write(ConfigBinDir), writeln('\xsb'),
+ writeln('@%PROLOG% -e "asserta(library_directory(%FLORADIR%)). [flora2devel]. flora_shell." %1 %2 %3 %4 %5 %6 %7')
;
- tell('runflora'),
- writeln('#! /bin/sh'),
- write('FLORADIR="'), writeq(FloraDir), write('"'), nl,
- write('PROLOG='), write(ConfigBinDir), writeln('/xsb'),
- writeln('$PROLOG -e "asserta(library_directory($FLORADIR)). [flora2devel]. flora_shell." $*')
+ tell('runflora'),
+ writeln('#! /bin/sh'),
+ nl,
+ writeln('if test ! "$*" = ""; then'),
+ writeln(' extra_args="$*"'),
+ writeln('fi'),
+ nl,
+ write('FLORADIR="'), writeq(FloraDir), write('"'), nl,
+ write('PROLOG='), write(ConfigBinDir), writeln('/xsb'),
+ writeln('$PROLOG -e "asserta(library_directory($FLORADIR)). [flora2devel]. flora_shell." $extra_args')
),
told,
tell(F).
Index: Makefile
===================================================================
RCS file: /cvsroot/flora/flora2/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Makefile 27 May 2002 07:59:23 -0000 1.3
+++ Makefile 8 Jun 2002 20:02:07 -0000 1.4
@@ -5,7 +5,7 @@
##
## Contact: flo...@li...
##
-## Copyright (C) The Research Foundation of SUNY, 1999-2001
+## Copyright (C) The Research Foundation of SUNY, 1999-2002
##
## 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
@@ -91,19 +91,19 @@
@cat $(SVFILE)
core: top
- cd closure; $(MAKE) PROLOG=$(PROLOG)
- cd genincludes; $(MAKE) PROLOG=$(PROLOG)
- cd syslib; $(MAKE) PROLOG=$(PROLOG)
- cd trailer; $(MAKE) PROLOG=$(PROLOG)
- cd debugger; $(MAKE) PROLOG=$(PROLOG)
+ cd closure && $(MAKE) PROLOG=$(PROLOG)
+ cd genincludes && $(MAKE) PROLOG=$(PROLOG)
+ cd syslib && $(MAKE) PROLOG=$(PROLOG)
+ cd trailer && $(MAKE) PROLOG=$(PROLOG)
+ cd debugger && $(MAKE) PROLOG=$(PROLOG)
libs:
- cd lib; $(MAKE) PROLOG=$(PROLOG)
+ cd lib && $(MAKE) PROLOG=$(PROLOG)
misc:
- cd pkgs; $(MAKE) PROLOG=$(PROLOG)
- cd demos; $(MAKE) PROLOG=$(PROLOG)
- cd docs; $(MAKE) PROLOG=$(PROLOG)
+ cd pkgs && $(MAKE) PROLOG=$(PROLOG)
+ cd demos && $(MAKE) PROLOG=$(PROLOG)
+ -cd docs && $(MAKE) PROLOG=$(PROLOG)
# always compile flora2devel to make sure that .xwam has the latest .flora_path
@@ -199,7 +199,7 @@
init:
- /bin/rm -f $(FLORADIR)/.*flora*.tmp
+ @/bin/rm -f $(FLORADIR)/.*flora*.tmp
@echo "file_write($(STDWARN),'-------------- Warnings/Errors --------------------'), file_nl($(STDWARN))." > cmd...
@echo "file_write($(STDWARN),'$(HDRMSG)'), file_nl($(STDWARN))." >> cmd...
@echo "file_flush($(STDWARN),_)." >> cmd...
@@ -217,15 +217,15 @@
clean:
/bin/rm -f core *~ .*~ *${OBJEXT} *.O *.bak ../flora2${OBJEXT} .#*
/bin/rm -f .*.tmp .flora_path .prolog_path
- cd closure; $(MAKE) clean
- cd genincludes; $(MAKE) clean
- cd syslib; $(MAKE) clean
- cd lib; $(MAKE) clean
- cd debugger; $(MAKE) clean
- cd p2h; $(MAKE) clean
- cd trailer; $(MAKE) clean
- cd pkgs; $(MAKE) clean
- cd demos; $(MAKE) clean
+ cd closure && $(MAKE) clean
+ cd genincludes && $(MAKE) clean
+ cd syslib && $(MAKE) clean
+ cd lib && $(MAKE) clean
+ cd debugger && $(MAKE) clean
+ cd p2h && $(MAKE) clean
+ cd trailer && $(MAKE) clean
+ cd pkgs && $(MAKE) clean
+ cd demos && $(MAKE) clean
/bin/rm -f headerinc/*~ headerinc/.*~
/bin/rm -f syslibinc/*~ syslibinc/.*~
/bin/rm -f libinc/*~ libinc/.*~
@@ -234,8 +234,8 @@
/bin/rm -f $(HOME)/.xsb/flora/*.P $(HOME)/.xsb/flora/*${OBJEXT}
veryclean: clean
- cd docs; $(MAKE) clean
- cd emacs; $(MAKE) clean
+ cd docs && $(MAKE) clean
+ cd emacs && $(MAKE) clean
.DONE:
Index: INSTALLATION
===================================================================
RCS file: /cvsroot/flora/flora2/INSTALLATION,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- INSTALLATION 18 May 2002 17:43:26 -0000 1.1.1.1
+++ INSTALLATION 8 Jun 2002 20:02:07 -0000 1.2
@@ -1,7 +1,6 @@
-These instructions are for installing development versions of FLORA, which
-are intended to be installed in a directory outside of the XSB distribution
-tree.
+These instructions are for installing versions of FLORA outside of the XSB
+distribution tree.
If you installed a full version of XSB and intend to use FLORA-2 from
there, you don't need to do anything -- just skip the instructions below.
@@ -9,20 +8,33 @@
If you have downloaded an interim release of FLORA-2 from
http://flora.sourceforge.net or a development version from
-the CVS repository there then you can configure XSB as follows.
-(These instructions are presently for Unix only.)
+the CVS repository there then you can configure FLORA-2 as follows.
1. Untar/download FLORA-2 into a directory *outside* of the XSB
- distribution tree.
-2. Change to the top directory of your new FLORA-2 installation.
+ distribution tree, say FLORA:
+
+ cd FLORA
+ tar xzf flora2.tar.gz (or use WinZip, under Windows)
+
+ This will create a subdirectory, flora2; it is the top directory of your
+ new installation of FLORA-2.
+
+2. Change to the top directory of the new FLORA-2 installation:
+
+ cd flora2
+
Type
- makeflora all path-to-call-xsb
+ makeflora clean
+ makeflora path-to-call-xsb
The path to the XSB executable is typically something like .../XSB/bin/xsb
+ or D:\XSB\bin\xsb.bat
If you have XSB executable or its invocation script somewhere on your
PATH, then you can configure FLORA-2 by simply typing
makeflora
-3. After the installation, the Unix shell script `runflora' will be created.
- Use it to run this version of FLORA-2.
+
+3. After the installation, the Unix shell script `runflora' or a Windows
+ script `runflora.bat' will be created. Use it to run this version of
+ FLORA-2.
Index: .cvsignore
===================================================================
RCS file: /cvsroot/flora/flora2/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- .cvsignore 27 May 2002 07:59:23 -0000 1.2
+++ .cvsignore 8 Jun 2002 20:02:07 -0000 1.3
@@ -6,3 +6,6 @@
.flora_path
runflora
runflora.bat
+*.gz
+*.Z
+*.tar
|
|
From: <ki...@us...> - 2002-06-08 20:02:10
|
Update of /cvsroot/flora/flora2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv13858/admin
Added Files:
ReleaseTarBall.sh
Log Message:
prepared for release
--- NEW FILE: ReleaseTarBall.sh ---
#!/bin/sh
# Create a FLORA-2 tarball
# RUN this in ./admin/ directory!
files="./flora2/LICENSE ./flora2/INSTALLATION \
./flora2/Makefile ./flora2/NMakefile.mak \
./flora2/makeflora ./flora2/makeflora.bat \
./flora2/*.sh ./flora2/*.P ./flora2/*.H ./flora2/*.flh\
./flora2/closure/Makefile ./flora2/closure/NMakefile.mak \
./flora2/closure/*.fli ./flora2/closure/includes/*.fli \
./flora2/debugger/Makefile ./flora2/debugger/NMakefile.mak \
./flora2/debugger/*.in ./flora2/debugger/*.P \
./flora2/demos/*.flr ./flora2/demos/*.sh \
./flora2/demos/Makefile ./flora2/demos/NMakefile.mak \
./flora2/docs/flora2.ps ./flora2/docs/flora2.pdf \
./flora2/docs/technical.txt \
./flora2/emacs/flora.el \
./flora2/flrincludes/*.flh \
./flora2/genincludes/Makefile ./flora2/genincludes/NMakefile.mak \
./flora2/genincludes/*.fli \
./flora2/headerinc/*.flh \
./flora2/includes/*.flh \
./flora2/lib/*.flr ./flora2/lib/Makefile ./flora2/lib/NMakefile.mak \
./flora2/libinc/*.flh \
./flora2/p2h/prolog2hilog.* ./flora2/p2h/*.P \
./flora2/p2h/Makefile ./flora2/p2h/NMakefile.mak \
./flora2/pkgs/Makefile ./flora2/pkgs/NMakefile.mak \
./flora2/syslib/*.P ./flora2/syslib/*.H ./flora2/syslib/*.sh \
./flora2/syslib/Makefile ./flora2/syslib/NMakefile.mak \
./flora2/syslibinc/*.flh \
./flora2/trailer/Makefile ./flora2/trailer/NMakefile.mak \
./flora2/trailer/README"
curdir=`pwd`
curdir=`basename $curdir`
if test ! $curdir = admin; then
echo "+++ This script must be run out of flora2/admin/ directory"
exit 1
fi
cd ../..
tar cvf flora2/flora2.tar $files
gzip -f flora2/flora2.tar
|
|
From: <ki...@us...> - 2002-06-08 18:22:49
|
Update of /cvsroot/flora/flora2/admin In directory usw-pr-cvs1:/tmp/cvs-serv21485/admin Log Message: Directory /cvsroot/flora/flora2/admin added to the repository |
|
From: <ki...@us...> - 2002-06-03 04:30:08
|
Update of /cvsroot/flora/flora-website
In directory usw-pr-cvs1:/tmp/cvs-serv15732
Modified Files:
release_notes.html
Log Message:
Index: release_notes.html
===================================================================
RCS file: /cvsroot/flora/flora-website/release_notes.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- release_notes.html 27 May 2002 18:40:05 -0000 1.5
+++ release_notes.html 3 Jun 2002 04:30:04 -0000 1.6
@@ -39,6 +39,10 @@
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>
|
|
From: <ki...@us...> - 2002-06-03 04:29:12
|
Update of /cvsroot/flora/flora-testsuite/general_tests
In directory usw-pr-cvs1:/tmp/cvs-serv15421/general_tests
Added Files:
clptest_old clptest.flr
Log Message:
added clprtest
--- NEW FILE: clptest_old ---
1 1.0000
1 2.0000
1 3.0000
2 3.0000
2 5.0000
3 1.0000
3 2.0000
3 3.0000
--- NEW FILE: clptest.flr ---
%% Illustrates the use of constraint solver
p(1.0).
p(2.0).
p(3.0).
p(5.0).
?- [clpr].
test1 :- {X>0, X<5}, p(X), write('1 ')@prolog(), writeln(X)@prolog(), fail.
test1 :- true.
test2 :- {X>2},p(X), write('2 ')@prolog(), writeln(X)@prolog(), fail.
test2 :- true.
test3 :- {X>0}, p(X), {X<5}, write('3 ')@prolog(), writeln(X)@prolog(), fail.
test3 :- true.
test :- tell(temp)@prolog(),
test1, test2, test3,
told@prolog().
|
|
From: <ki...@us...> - 2002-06-03 04:28:28
|
Update of /cvsroot/flora/flora2/demos
In directory usw-pr-cvs1:/tmp/cvs-serv15198/demos
Modified Files:
Makefile
Added Files:
clpdemo.flr
Log Message:
added description of clpr to manual. clprdemo. small bugfix
--- NEW FILE: clpdemo.flr ---
%% Illustrates the use of constraint solver
p(1.0).
p(2.0).
p(3.0).
p(5.0).
?- [clpr].
?- {X>0, X<5}, p(X).
?- {X>2},p(X).
?- {X>0}, p(X), {X<5}.
Index: Makefile
===================================================================
RCS file: /cvsroot/flora/flora2/demos/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- Makefile 18 May 2002 17:43:27 -0000 1.1.1.1
+++ Makefile 3 Jun 2002 04:28:25 -0000 1.2
@@ -27,7 +27,7 @@
FLORADIR = ..
-ALL = aggregate.P benchmark.P default.P family_obj.P \
+ALL = aggregate.P benchmark.P clpdemo.P default.P family_obj.P \
family_rel.P flogic_basics.P metavar.P mix.P module1.P mod1.P \
mono_inherit.P rel_ops.P tree_traversal.P \
btupdates.P pretty.P
|
|
From: <ki...@us...> - 2002-06-03 04:28:28
|
Update of /cvsroot/flora/flora2/docs
In directory usw-pr-cvs1:/tmp/cvs-serv15198/docs
Modified Files:
flora2.tex
Log Message:
added description of clpr to manual. clprdemo. small bugfix
Index: flora2.tex
===================================================================
RCS file: /cvsroot/flora/flora2/docs/flora2.tex,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- flora2.tex 2 Jun 2002 18:51:00 -0000 1.6
+++ flora2.tex 3 Jun 2002 04:28:25 -0000 1.7
@@ -4412,6 +4412,80 @@
{\it i.e.}, an additional pair of parentheses is needed to indicate that
the sequence of literals form a single argument.
+\section{Constraint Solving}\label{sec-clp}
+\index{Constraint solving}
+
+\FLORA provides an interface to constraint solving capabilities of the
+underlying Prolog engine. Currently XSB supports linear constraint solving
+over the domain of real numbers (CLPR). However, we must warn that the XSB
+implementation of CLPR has many rough spots -- do not say that we did not
+warn! To pass a constraint to a constraint solver in the body of a \FLORA
+rule (or query), simply include it inside curly braces.
+
+Here is a 2-minute introduction to CLPR. Try the following program:
+%%
+\begin{verbatim}
+ ?- insert{p(1.0),p(2.0),p(3.0)}.
+ ?- X>0, X<5, p(X).
+\end{verbatim}
+%%
+Intuitively, one would expect 2.0 and 3.0 as answers. However, if you
+actually try to run this
+program, you will be disappointed --- an error message will be
+reported:
+%%
+\begin{quote}
+ ++Error[XSB]: [Runtime/P] Type Error: Uninstantiated Arithmetic Expression \\
+ Aborting...
+\end{quote}
+%%
+This happens because ordinarily Prolog views {\tt >/2} and {\tt </2} as
+predicates with infinite number of facts. Since there are infinite number
+of values for {\tt X} that make {\tt X > 0} true, it reasons, the query
+does not make sense.
+
+Constraint logic programming takes a different view: it considers {\tt X>0,
+ X<5} to be a \emph{constraint} on the set of solutions of the query {\tt
+ p(X)}. This approach allows Prolog to return meaningful solutions to the
+above query. However, the user must explicitly tell the system which view
+ to take --- the ``dumb'' view that treats arithmetic built-ins are
+ infinite predicates or a ``smart'' view, which treats them as constraints.
+ The smart view is indicated by enclosing constraints in curly
+ braces. Thus, the above program becomes:
+%%
+\begin{verbatim}
+ ?- [clpr]. % must be loaded prior to the use of constraint solver
+ ?- insert{p(1.0),p(2.0),p(3.0)}.
+ ?- {X>0, X<5}, p(X).
+
+ X = 2.000000e+00
+
+ X = 3.000000e+00
+
+ 2 solution(s) in 0.0000 seconds
+\end{verbatim}
+%%
+Note that the package {\tt clpr} must be loaded in advance.
+
+It should be kept in mind that the constraint solver is very picky about
+the type of values it is willing to work with. It insists on floats and
+will refuse to convert integers to floats. For instance, if the insert
+statement were as follows:
+%%
+\begin{verbatim}
+ ?- insert{p(1),p(2),p(3)}.
+\end{verbatim}
+%%
+then the user would have been rewarded with the following obscure message:
+%%
+\begin{quote}
+ type\_error(\_h5356 = 3,2,a real number,3)
+\end{quote}
+%%
+It is trying to tell the user that a floating number is expected and the
+integer 3 will not do.
+
+
\section{Debugging User Programs}\label{sec-debugging}
\index{debugging}
|
|
From: <ki...@us...> - 2002-06-03 04:28:28
|
Update of /cvsroot/flora/flora2/syslib
In directory usw-pr-cvs1:/tmp/cvs-serv15198/syslib
Modified Files:
flrload.P
Log Message:
added description of clpr to manual. clprdemo. small bugfix
Index: flrload.P
===================================================================
RCS file: /cvsroot/flora/flora2/syslib/flrload.P,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- flrload.P 25 May 2002 18:08:19 -0000 1.4
+++ flrload.P 3 Jun 2002 04:28:24 -0000 1.5
@@ -28,6 +28,7 @@
:- compiler_options([xpp_on]).
#include "flora_terms.flh"
+#include "flora_extensions.flh"
:- import
@@ -40,7 +41,8 @@
:- import
flora_load_module_internal/1,
- flora_load_module_internal/2
+ flora_load_module_internal/2,
+ flora_locate_file/3
from flrutils.
:- import flora_display_error/1 from flrdisplay.
@@ -131,6 +133,13 @@
flora_check__module_overriding(_LoadFile,_Workspace,userin,main,_Location) :-
!.
+%% Don't do the check if we are loading a prolog module
+%% (i.e., it doesn't have the .flr file and no workspace was given in [...])
+flora_check__module_overriding(LoadFile,main,_HostFile,_HostMod,_Location) :-
+ not flora_locate_file(LoadFile,FLORA_FILE_EXT,_FlrFile),
+ !.
+
+
flora_check__module_overriding(LoadFile,Workspace,HostFile,HostMod,[Line,Char]) :-
HostMod == Workspace,
!,
@@ -138,6 +147,6 @@
flora_file_op(basename,HostFile,HostFileBasename),
flora_error_line('~w.flr: Literal [~w >> ~w] near line(~w)/char(~w) overrides the program in which it occurs',
[HostFileBasename,LoadFile,HostMod,Line,Char]),
- fail.
+ abort.
flora_check__module_overriding(_LoadFile,_Workspace,_HostFile,_HostMod,_Location).
|
|
From: <ki...@us...> - 2002-06-03 04:28:28
|
Update of /cvsroot/flora/flora2/flrincludes In directory usw-pr-cvs1:/tmp/cvs-serv15198/flrincludes Added Files: flora_extensions.flh Log Message: added description of clpr to manual. clprdemo. small bugfix --- NEW FILE: flora_extensions.flh --- %% File extensions used in FLORA-2 #define FLORA_FILE_EXT flr #define FLORA_INCLUDE_EXT fli #define FLORA_HEADER_EXT flh #define FLORA_FDB_EXT fdb %% Extension for storage of defined predicate skeletons #define FLORA_FLD_EXT fld |
|
From: <ki...@us...> - 2002-06-03 04:28:28
|
Update of /cvsroot/flora/flora2 In directory usw-pr-cvs1:/tmp/cvs-serv15198 Modified Files: flrutils.P flrporting.P Log Message: added description of clpr to manual. clprdemo. small bugfix Index: flrutils.P =================================================================== RCS file: /cvsroot/flora/flora2/flrutils.P,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- flrutils.P 25 May 2002 07:20:41 -0000 1.2 +++ flrutils.P 3 Jun 2002 04:28:25 -0000 1.3 @@ -34,14 +34,9 @@ #include "flora_characters.flh" #include "flora_terms.flh" #include "flora_porting.flh" +#include "flora_extensions.flh" -#define FLORA_FILE_EXT flr -#define FLORA_INCLUDE_EXT fli -#define FLORA_HEADER_EXT flh -#define FLORA_FDB_EXT fdb -%% Extension for storage of defined predicate skeletons -#define FLORA_FLD_EXT fld #define FLORA_FAILURE failure #define FLORA_SUCCESS success #define FLORA_NOOP noop Index: flrporting.P =================================================================== RCS file: /cvsroot/flora/flora2/flrporting.P,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- flrporting.P 18 May 2002 21:34:07 -0000 1.8 +++ flrporting.P 3 Jun 2002 04:28:25 -0000 1.9 @@ -139,6 +139,7 @@ flora_file_op(isabsolute,File) :- path_sysop(isabsolute,File). flora_file_op(rename,File,ToFile) :- path_sysop(rename,File,ToFile). flora_file_op(basename,File,Base) :- path_sysop(basename,File,Base). +flora_file_op(extension,File,Ext) :- path_sysop(extension,File,Ext). flora_file_op(expand,File,Base) :- path_sysop(expand,File,Base). flora_file_op(newerthan,File,Base) :- path_sysop(newerthan,File,Base). flora_file_op(dirname,File,Dir) :- path_sysop(dirname,File,Dir). |
|
From: <ki...@us...> - 2002-06-02 18:51:03
|
Update of /cvsroot/flora/flora2/flrincludes
In directory usw-pr-cvs1:/tmp/cvs-serv21316/flrincludes
Modified Files:
flora_terms.flh
Log Message:
added syntax for CLPR-style constraints: ...,{X>2,X<5},...
(need to update xsb for this to work)
Index: flora_terms.flh
===================================================================
RCS file: /cvsroot/flora/flora2/flrincludes/flora_terms.flh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- flora_terms.flh 18 May 2002 20:19:40 -0000 1.2
+++ flora_terms.flh 2 Jun 2002 18:51:00 -0000 1.3
@@ -212,6 +212,9 @@
#define FL_BTERASE bterase
#define FL_BTERASEALL bteraseall
+#define FL_CONSTRAINT_START '{'
+#define FL_CONSTRAINT_END '}'
+
/****************************************************************************
Intermediate coding of a FLORA program consists of the following constructs:
@@ -341,6 +344,8 @@
#define FLINSERT flinsert
#define FLDELETE fldelete
+#define FLCONSTRAINT flconstraint
+
#define FLIFTHEN flifthen
#define FLIFTHENELSE flifthenelse
@@ -369,6 +374,8 @@
#define PRFACT prfact
#define PRQUERY prquery
#define PRDIRECTIVE prdirective
+
+#define PRCONSTRAINT prconstraint
#define PRCOMMAND prcommand
#define PRTABLE prtable
|
Update of /cvsroot/flora/flora2
In directory usw-pr-cvs1:/tmp/cvs-serv21316
Modified Files:
flrparser.P flrdependency.P flrcompiler.P flrcoder.P
flora2devel.P flora2.P TODO
Added Files:
version.flh
Log Message:
added syntax for CLPR-style constraints: ...,{X>2,X<5},...
(need to update xsb for this to work)
--- NEW FILE: version.flh ---
#define FLORA_VERSION '0.88 of June 2002'
Index: flrparser.P
===================================================================
RCS file: /cvsroot/flora/flora2/flrparser.P,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- flrparser.P 19 May 2002 23:39:13 -0000 1.2
+++ flrparser.P 2 Jun 2002 18:51:00 -0000 1.3
@@ -65,12 +65,14 @@
Body := BodyLiteral
Body := BodyConjunt | BodyDisjunct | BodyNegative | ControlFlowStatement
Body := Body '@' ModuleName
+Body := BodyConstraint
ModuleName := 'prolog()' | 'prolog(' atom ')' | atom | 'flora(' atom ') '
BodyConjuct := Body ',' Body
BodyDisjunct := Body ';' Body
BodyNegative := ('tnot' | '\+') Body
+BodyConstraint := '{' CLPR-style constraint '}'
ControlFlowStatement := IfThenElse | UnlessDo
| WhileDo | WhileLoop
@@ -151,7 +153,7 @@
/****************************************************************************
canonical_form(+ComposerTerm,-CanoniTerm)
canonical_form(+ComposerTerm,-CanoniTerm,-PrimaryIndex)
- translates a structure constructed by the composer into an intermidiate
+ translates a structure constructed by the composer into an intermediate
canonical form. That is to make the functor/arguments syntax compatible
with the operator syntax.
@@ -171,7 +173,7 @@
)
CANOBRACE(ListOfElements, % are CANOTERMs separated by ',' at top level
- NumberOfElements, % separated by ',' at the top level
+ NumberOfElements, % number of terms between {...}
ParenthesisIndex % index of the brace '{' (error message)
)
@@ -537,6 +539,8 @@
flload_struct(List,FLLOAD(List)).
+flconstraint_struct(Constr,FLCONSTRAINT(Constr)).
+
is_flworkspace_struct(FLWORKSPACE(_G,_N)).
%% Encoding these module specs: @mod @flora(mod) @prolog(mod) @prologall(mod)
@@ -1916,6 +1920,11 @@
(Status == [] -> flload_struct(C,Code); true)
).
+%% {...} at the top level -- constraint
+flora_body_literal(CANOBRACE(L,_N,_I),Code,Status) :-
+ !,
+ flora_constraint_list(L,Code,Status).
+
flora_body_literal(CanoniTerm,Code,[]) :-
get_atom(CanoniTerm,A),
!,
@@ -2067,6 +2076,29 @@
not is_anonymous_flvar_struct(Code)
),
!.
+
+
+/****************************************************************************
+ flora_constraint_list(+L,-Code,-Status)
+ Add brace to delineate constraints
+****************************************************************************/
+
+flora_constraint_list(L,Code,Status) :-
+ flora_body_literal_list(L,Lcode,Status),
+ flconstraint_struct(Lcode,Code).
+
+flora_body_literal_list([L],Code,Status) :-
+ !,
+ flora_body_literal(L,Code,Status).
+
+flora_body_literal_list([L|Lits],Code,Status) :-
+ flora_body_literal(L,Lcode,S),
+ (S == []
+ -> flora_body_literal_list(Lits,LitsCode,Status),
+ (Status == [] -> flconjunct_struct(Lcode,LitsCode,Code); true)
+ ; Status = S
+ ).
+
/****************************************************************************
Index: flrdependency.P
===================================================================
RCS file: /cvsroot/flora/flora2/flrdependency.P,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- flrdependency.P 18 May 2002 17:43:26 -0000 1.1.1.1
+++ flrdependency.P 2 Jun 2002 18:51:00 -0000 1.2
@@ -131,6 +131,8 @@
is_control(FLLIBIFTHEN(If,Then),FLLIBIFTHEN,[If,Then]) :- !.
is_control(FLLIBIFTHENELSE(If,Then,Else),FLLIBIFTHENELSE,[If,Then,Else]) :- !.
+is_constraint(PRCONSTRAINT(Constr),Constr).
+
/****************************************************************************
cut_off(+Term_before_cutoff,-Term_after_cutoff)
cut off a term whose depth is greater than MAXDEPTH
@@ -397,6 +399,10 @@
!,
assert_rule(HeadCode,NewBody,NewBCI,anu(A,n,U)).
+assert_rule(_HeadCode,BodyCode,(_BCI,_I),anu(_A,_N,_U)) :-
+ is_constraint(BodyCode,_),
+ !.
+
assert_rule(HeadCode,BodyCode,(BCI,Index),anu(A,N,U)) :-
is_upd(BodyCode,_,List,Cond),
!,
@@ -574,6 +580,10 @@
is_skolem(Term,F,N,Args,Index),
!,
build_prolog(F,N,Args,VarList,Code,CodeInd).
+
+build_struct(Term,_VarList,Code,(_CodeInd,_Index)) :-
+ is_constraint(Term,Code),
+ !.
build_struct(Term,_VarList,thismodule,(thismodule,NO_INDEX)) :-
is_prthismodule(Term),
Index: flrcompiler.P
===================================================================
RCS file: /cvsroot/flora/flora2/flrcompiler.P,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- flrcompiler.P 25 May 2002 18:08:19 -0000 1.4
+++ flrcompiler.P 2 Jun 2002 18:51:00 -0000 1.5
@@ -82,6 +82,9 @@
is_fltnot(FLTNOT(Goal),Goal).
is_flload(FLLOAD(LoadList),LoadList).
+
+is_flconstraint(FLCONSTRAINT(ConstrBody),ConstrBody).
+
%% @module
is_flworkspace(FLWORKSPACE(P,WS),P,WS).
%% @flora(module)
@@ -585,6 +588,7 @@
controlconstruct_struct(CondCode,ActionCode,Wrapper,Code) :-
florasyslib_struct(Wrapper,2,[CondCode,ActionCode],Code).
+constraint_struct(ConstrCode,PRCONSTRAINT(ConstrCode)).
/****************************************************************************
reset_newpredicate/0
@@ -1440,6 +1444,11 @@
; is_flload(ParserTerm,LoadList) ->
compile_flload(LoadList,SpecCode,Status),
+ OidCode=NULL
+
+ ; is_flconstraint(ParserTerm,ConstrBody) ->
+ compile_body(ConstrBody,ConstrBodyCode,Status),
+ constraint_struct(ConstrBodyCode,SpecCode),
OidCode=NULL
; is_flworkspace(ParserTerm,P,WS) ->
Index: flrcoder.P
===================================================================
RCS file: /cvsroot/flora/flora2/flrcoder.P,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- flrcoder.P 18 May 2002 17:43:26 -0000 1.1.1.1
+++ flrcoder.P 2 Jun 2002 18:51:00 -0000 1.2
@@ -58,6 +58,8 @@
is_prindex(PRINDEX(P,A,N),P,A,N).
is_prhilogtable(PRHILOGTABLE(A),A).
+is_prconstraint(PRCONSTRAINT(Constr),Constr).
+
is_prthismodule(PRTHISMODULE(PRTHISMODULE)).
is_prthisfdbstorage(PRTHISFDBSTORAGE(PRTHISFDBSTORAGE)).
%% debug trie
@@ -573,6 +575,13 @@
put(0')), nl.
flora_write_struct(Term,_Prefix) :-
+ is_prconstraint(Term,ConstrBody),
+ !,
+ write(FL_CONSTRAINT_START),
+ flora_write_struct(ConstrBody,_),
+ write(FL_CONSTRAINT_END).
+
+flora_write_struct(Term,_Prefix) :-
atomic(Term),
!,
write_canonical(Term).
@@ -1195,6 +1204,13 @@
!,
flora_build_predicate_symbol(P,A,DWS,NewP),
Code=index(NewP/A,N).
+
+%% Build constraint term: {}(...)
+flora_build_struct(Term,DWS,Prefix,VarList,Code) :-
+ is_prconstraint(Term,ConstrBody),
+ !,
+ flora_build_struct(ConstrBody,DWS,Prefix,VarList,BodyCode),
+ Code = '{}'(BodyCode).
flora_build_struct(Term,DWS,_Prefix,_VarList,DWS) :-
is_prthismodule(Term),
Index: flora2devel.P
===================================================================
RCS file: /cvsroot/flora/flora2/flora2devel.P,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- flora2devel.P 18 May 2002 17:43:26 -0000 1.1.1.1
+++ flora2devel.P 2 Jun 2002 18:51:00 -0000 1.2
@@ -30,7 +30,7 @@
%% .flora_path contains #define FLORA_INSTALL_DIR
#include ".flora_path"
-#define FLORA_VERSION '0.85devel of May 2002'
+#include "version.flh"
:- import flora_configuration/2 from flrregistry.
:- import flora_concat_atoms/2,
Index: flora2.P
===================================================================
RCS file: /cvsroot/flora/flora2/flora2.P,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- flora2.P 18 May 2002 17:43:26 -0000 1.1.1.1
+++ flora2.P 2 Jun 2002 18:51:00 -0000 1.2
@@ -76,7 +76,7 @@
flora_shell/0.
-#define FLORA_VERSION '0.85 of May 2002'
+#include "version.flh"
/*****************************************************************************/
Index: TODO
===================================================================
RCS file: /cvsroot/flora/flora2/TODO,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- TODO 18 May 2002 17:43:26 -0000 1.1.1.1
+++ TODO 2 Jun 2002 18:51:00 -0000 1.2
@@ -290,7 +290,7 @@
DONE 9. Add while-do, unless-do and do-until to the parser, like it is done for
if-the-else.
-10. Add the contraints syntax {...}.
+DONE 10. Add the constraints syntax {...}.
DONE 11. Implement convenient versions of I/O predicates and others, such as
|
|
From: <ki...@us...> - 2002-06-02 18:51:03
|
Update of /cvsroot/flora/flora2/docs
In directory usw-pr-cvs1:/tmp/cvs-serv21316/docs
Modified Files:
flora2.tex
Log Message:
added syntax for CLPR-style constraints: ...,{X>2,X<5},...
(need to update xsb for this to work)
Index: flora2.tex
===================================================================
RCS file: /cvsroot/flora/flora2/docs/flora2.tex,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- flora2.tex 27 May 2002 07:59:22 -0000 1.5
+++ flora2.tex 2 Jun 2002 18:51:00 -0000 1.6
@@ -5184,12 +5184,14 @@
Body := BodyLiteral
Body := BodyConjunt | BodyDisjunct | BodyNegative | ControlFlowStatement
Body := Body '@' ModuleName
+Body := BodyConstraint
ModuleName := 'prolog()' | 'prolog(' atom ')' | atom | 'flora(' atom ') '
BodyConjuct := Body ',' Body
BodyDisjunct := Body ';' Body
BodyNegative := ('tnot' | '\+') Body
+BodyConstraint := '{' CLPR-style constraint '}'
ControlFlowStatement := IfThenElse | UnlessDo
| WhileDo | WhileLoop
|
|
From: <ki...@us...> - 2002-05-27 18:40:08
|
Update of /cvsroot/flora/flora-website In directory usw-pr-cvs1:/tmp/cvs-serv27776 Modified Files: release_notes.html florahome.php florabar.php Log Message: minor changes Index: release_notes.html =================================================================== RCS file: /cvsroot/flora/flora-website/release_notes.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- release_notes.html 21 May 2002 22:21:14 -0000 1.4 +++ release_notes.html 27 May 2002 18:40:05 -0000 1.5 @@ -42,7 +42,8 @@ </ul> <h3>Bugfixes</h3> <ul> - <li> + <li> Works again under Windows.</li> + <li> Numerous other small bugs.</li> </ul> <h3>Backward Incompatibility</h3> <ul> Index: florahome.php =================================================================== RCS file: /cvsroot/flora/flora-website/florahome.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- florahome.php 22 May 2002 02:18:45 -0000 1.3 +++ florahome.php 27 May 2002 18:40:05 -0000 1.4 @@ -39,12 +39,11 @@ </p> <p> -March 11, 2002: We are happy to announce the release of a "late alpha" -version of FLORA-2. This version is part of <a -href="http://sourceforge.net/project/showfiles.php?group_id=1176">XSB -release 2.5</a>. It has significantly improved stability and -several important new features. See -<a href="http://xsb.sourceforge.net/rel_notes.html#flora">release notes</a> for the details. +<IMG src="images/new.gif" alt="New"> +June 10, 2002: Interim release of <a href="download.php">FLORA-2, version +0.88</a>. +Many new features and bug fixes. +See <a href="release_notes.html">release notes</a> for the details. </p> @@ -57,11 +56,14 @@ FLORID</a>: A C++-based implementation of F-logic from Freiburg University. <li> <A href="http://www.dsic.upv.es/~pcarsi/tfl/">Transaction F-logic prototype</a> from the University of Valencia, Spain. +<li> The <a href="http://www.cs.toronto.edu/~bonner/transaction-logic.html"> +Transaction Logic</a> and <a +href="http://www.cs.toronto.edu/~bonner/ctr/index.html">Concurrent +Transaction Logic</a> pages at the University of Toronto. +</li> <li> <A href="http://triple.semanticweb.org">TRIPLE</a>: A Query Language for RDF based on F-logic. </li> -<li> <a href="http://www.cs.toronto.edu/~bonner/transaction-logic.html">The -Transaction Logic Page</a> at the University of Toronto. <li> <A href="http://www.cs.sunysb.edu/~kifer/dood/">The DOOD page</a>: additional links to information on Deductive and Object-Oriented Databases. @@ -94,7 +96,7 @@ Powered by <br> <A href="http://xsb.sourceforge.net" target="right_window"> -<IMG src="xsblogo.jpg" width="90" height="90" border="0" border="0" +<IMG src="images/xsblogo.jpg" width="90" height="90" border="0" border="0" alt="XSB Logo"></A> </td> </table> Index: florabar.php =================================================================== RCS file: /cvsroot/flora/flora-website/florabar.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- florabar.php 22 May 2002 02:18:45 -0000 1.3 +++ florabar.php 27 May 2002 18:40:05 -0000 1.4 @@ -2,7 +2,7 @@ <body bgcolor="#7999af"> <h1> - <img align=middle src="flora.gif" width=90 height=210> + <img align=middle src="images/flora.gif" width=90 height=210> </h1> <pre> @@ -95,7 +95,7 @@ </td> <td> <A href="http://stonybrook.edu" target="right_window"> -<IMG src="sblogo.gif" width="60" height="36" border="0" border="0" alt="Stony Brook Logo"></A> +<IMG src="images/sblogo.gif" width="60" height="36" border="0" border="0" alt="Stony Brook Logo"></A> </td> </tr> </table> |
|
From: <ki...@us...> - 2002-05-27 18:39:52
|
Update of /cvsroot/flora/flora-website In directory usw-pr-cvs1:/tmp/cvs-serv27534 Removed Files: xsblogo.jpg sblogo.gif flora.gif contactus.gif Log Message: moved to images/ --- xsblogo.jpg DELETED --- --- sblogo.gif DELETED --- --- flora.gif DELETED --- --- contactus.gif DELETED --- |