Skip to content

Commit

Permalink
(core) minor fixes in assertions
Browse files Browse the repository at this point in the history
Src-commit: 444ceb01f524a6175672688271e4094bfa4ab12b
  • Loading branch information
jfmc committed Jul 22, 2023
1 parent 57c96c4 commit a01a419
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion core/engine/atomic_basic.test.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:- module(_, [], [assertions]).
:- module(_, [], [assertions, nativeprops]).

:- doc(title, "Tests for atomic_basic.pl").

Expand Down
2 changes: 2 additions & 0 deletions core/engine/packages.pl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
@pred{op/3} does. Its scope is local to the current text.
Usually included in @concept{package file}s.".

:- impl_defined([op/3]). % TODO: comp above (iso/1) requires a pred, fixme

% ---------------------------------------------------------------------------

:- doc(doinclude,new_declaration/1).
Expand Down
2 changes: 1 addition & 1 deletion core/lib/attr/attr_rt.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:- module(attr_rt, [], [assertions, fsyntax, dcg, datafacts]).
:- module(attr_rt, [], [assertions, modes, fsyntax, dcg, datafacts]).

:- doc(title, "Attributed variables runtime").
%:- doc(copyright,"@include{FreeDocLicense.lpdoc}").
Expand Down
4 changes: 3 additions & 1 deletion core/lib/lists.test.pl
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
:- module('lists.test', _, [assertions, regtypes]).
:- module('lists.test', _, [assertions, nativeprops, regtypes]).

% NOTE: non exhaustive tests and experimental (may change in the future)
% - use member/2 and backtracking (similar to test case generation)
% - shared variables between calls/success
% - compat fields

% TODO: warnings due to missing qualification in comp expansion!

:- use_module(library(lists), [nonsingle/1]).
nonsingle(A) :- lists:nonsingle(A).

Expand Down
2 changes: 1 addition & 1 deletion core/library/argnames/tests/argnames_test.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:- module(argnames_test,[],[assertions,regtypes,argnames]).
:- module(argnames_test,[],[assertions,nativeprops,regtypes,argnames]).

:- doc(title, "Tests for dynamic argnames").
:- doc(author, "Jose F. Morales").
Expand Down
6 changes: 4 additions & 2 deletions core/library/clpfd/fd_range_bits_unsafe.pl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
in_range/2
% portray/3
],
[assertions, regtypes, fsyntax, dcg]).
[assertions, modes, regtypes, fsyntax, dcg]).

:- doc(title, "Range handling").

Expand All @@ -78,6 +78,8 @@
:- use_module(library(lists), [last/2, append/3]).
:- use_module(library(between), [between/3]).

:- regtype fd_range_t/1.

fd_range_type(prolog_bits_unsafe).
fd_range_t(_).
fd_const_spec := ~int | inf | sup.
Expand All @@ -89,7 +91,7 @@
mymax(_, sup) := sup:-!.
mymax(X, Y) := ~(fd_utils:max(X,Y)).

:- pred default(fd_range_t).
:- pred default(?fd_range_t).
default := -1.

:- pred new(+int, +int, -fd_range_t).
Expand Down
8 changes: 5 additions & 3 deletions core/library/clpfd/fd_range_finite_intervals.pl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

in_range/2
],
[assertions, regtypes, fsyntax, dcg]).
[assertions, modes, regtypes, fsyntax, dcg]).

:- doc(title, "Sparse integer ranges implemented as list of intervals").

Expand Down Expand Up @@ -94,6 +94,8 @@

% Our range bounds are closed integers

:- regtype fd_range_bound_t/1.

fd_range_bound_t := ~int.

:- regtype fd_interval_t/1 # "Integer Interval List".
Expand All @@ -104,8 +106,8 @@
fd_range_bound_t(Y),
fd_interval_t(L).

% :- regtype fd_range_t/1 #
% "Data Structure for Sparse Ranges with Singleton".
:- regtype fd_range_t/1 #
"Data Structure for Sparse Ranges with Singleton".

% TODO: Specify well the type.
fd_range_t(X) :-
Expand Down
6 changes: 4 additions & 2 deletions core/library/clpfd/fd_range_intervals.pl
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@

% Our range bounds are closed integers

:- regtype fd_range_bound_t/1.

fd_range_bound_t := ~int | inf | sup.

:- regtype fd_interval_t/1 # "Integer Interval List".
Expand All @@ -104,8 +106,8 @@
fd_range_bound_t(Y),
fd_interval_t(L).

% :- regtype fd_range_t/1 #
% "Data Structure for Sparse Ranges with Singleton".
:- regtype fd_range_t/1 #
"Data Structure for Sparse Ranges with Singleton".

% TODO: Specify well the type.
fd_range_t(X) :-
Expand Down
1 change: 1 addition & 0 deletions core/library/iso_incomplete.pl
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
close_option(force(true)).
close_option(force(false)).

% TODO: warnings due to missing qualification in comp expansion!
:- pred close(@stream).
close(S) :- close(S, []).

Expand Down
2 changes: 1 addition & 1 deletion core/library/modblobs/modblobs.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:- module(modblobs, [], [assertions, regtypes, nativeprops, datafacts]).
:- module(modblobs, [], [assertions, modes, regtypes, nativeprops, datafacts]).

:- doc(title, "Modules as blobs").
:- doc(author, "Isabel Garcia-Contreras").
Expand Down

0 comments on commit a01a419

Please sign in to comment.