linux backport
file exists system predicate $source_file -> $user source hide and make system preds fix check_head_and_body user_expansion never fails goal expansion is controlled b dynamic procedure add must_be_of_type predicate_indicator fix neat_call, debug flag is user controlled use simplecudd, not ptoblogbdd compile all of myddas fx junk in file_name fix warnings use common file opening struct and funds avoid pairs module fix db queues
This commit is contained in:
177
regression/modules/L
Normal file
177
regression/modules/L
Normal file
@@ -0,0 +1,177 @@
|
||||
% YAP 6.3.4-60a8efb4RS Yap_RecoverSlots:208
|
||||
(compiled 2015-12-15T14:05:17@VITORs-MacBook-Pro.localRS Yap_RecoverSlots:208
|
||||
)
|
||||
!!! syntax error: expected to find ')', found ]
|
||||
:-RS Yap_RecoverSlots:208
|
||||
moduleRS Yap_RecoverSlots:208
|
||||
( ytestRS Yap_RecoverSlots:208
|
||||
, [run_testRS Yap_RecoverSlots:208
|
||||
/RS Yap_RecoverSlots:208
|
||||
1RS Yap_RecoverSlots:208
|
||||
,
|
||||
run_testsRS Yap_RecoverSlots:208
|
||||
/RS Yap_RecoverSlots:208
|
||||
0RS Yap_RecoverSlots:208
|
||||
,
|
||||
test_modeRS Yap_RecoverSlots:208
|
||||
/RS Yap_RecoverSlots:208
|
||||
0RS Yap_RecoverSlots:208
|
||||
,
|
||||
opRS Yap_RecoverSlots:208
|
||||
( 1150RS Yap_RecoverSlots:208
|
||||
, fxRS Yap_RecoverSlots:208
|
||||
, testRS Yap_RecoverSlots:208
|
||||
),
|
||||
opRS Yap_RecoverSlots:208
|
||||
( 999RS Yap_RecoverSlots:208
|
||||
, xfxRS Yap_RecoverSlots:208
|
||||
, givenRS Yap_RecoverSlots:208
|
||||
,
|
||||
opRS Yap_RecoverSlots:208
|
||||
( 998RS Yap_RecoverSlots:208
|
||||
, xfxRS Yap_RecoverSlots:208
|
||||
, returnsRS Yap_RecoverSlots:208
|
||||
) <== HERE ==> ] )
|
||||
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
!!! syntax error: expected operator, got 'returns'
|
||||
run_testRS Yap_RecoverSlots:208
|
||||
( Lab ):-RS Yap_RecoverSlots:208
|
||||
|
||||
source_moduleRS Yap_RecoverSlots:208
|
||||
( M ),
|
||||
testRS Yap_RecoverSlots:208
|
||||
( Lab, ( G <== HERE ==> returnsRS Yap_RecoverSlots:208
|
||||
SolsgivenRS Yap_RecoverSlots:208
|
||||
Program ), Done ),
|
||||
ensure_groundRS Yap_RecoverSlots:208
|
||||
( Done ),
|
||||
formatRS Yap_RecoverSlots:208
|
||||
( '~w : 'RS Yap_RecoverSlots:208
|
||||
, [Lab] ),
|
||||
resetRS Yap_RecoverSlots:208
|
||||
( Streams ),
|
||||
assertallRS Yap_RecoverSlots:208
|
||||
( Program, Refs ),
|
||||
conj2listRS Yap_RecoverSlots:208
|
||||
( Sols, LSols ),
|
||||
catchRS Yap_RecoverSlots:208
|
||||
( do_returnsRS Yap_RecoverSlots:208
|
||||
( M:RS Yap_RecoverSlots:208
|
||||
G, LSols, Lab ), Ball, endRS Yap_RecoverSlots:208
|
||||
( Ball ) ),
|
||||
shutdownRS Yap_RecoverSlots:208
|
||||
( Streams, Refs )
|
||||
|
||||
!!! syntax error: expected operator, got 'returns'
|
||||
run_testRS Yap_RecoverSlots:208
|
||||
( Lab ):-RS Yap_RecoverSlots:208
|
||||
|
||||
source_moduleRS Yap_RecoverSlots:208
|
||||
( M ),
|
||||
testRS Yap_RecoverSlots:208
|
||||
( Lab, ( G <== HERE ==> returnsRS Yap_RecoverSlots:208
|
||||
Sols ), Done ),
|
||||
ensure_groundRS Yap_RecoverSlots:208
|
||||
( Done ),
|
||||
formatRS Yap_RecoverSlots:208
|
||||
( '~w : 'RS Yap_RecoverSlots:208
|
||||
, [Lab] ),
|
||||
resetRS Yap_RecoverSlots:208
|
||||
( Streams ),
|
||||
conj2listRS Yap_RecoverSlots:208
|
||||
( Sols, LSols ),
|
||||
catchRS Yap_RecoverSlots:208
|
||||
( do_returnsRS Yap_RecoverSlots:208
|
||||
( M:RS Yap_RecoverSlots:208
|
||||
G, LSols, Lab ), Ball, endRS Yap_RecoverSlots:208
|
||||
( Ball ) ),
|
||||
shutdownRS Yap_RecoverSlots:208
|
||||
( Streams, _ )
|
||||
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
!!! syntax error: expected operator, got 'returns'
|
||||
infoRS Yap_RecoverSlots:208
|
||||
( A <== HERE ==> returnsRS Yap_RecoverSlots:208
|
||||
B, _, ( AreturnsRS Yap_RecoverSlots:208
|
||||
B ), gRS Yap_RecoverSlots:208
|
||||
( _, okRS Yap_RecoverSlots:208
|
||||
) ):-RS Yap_RecoverSlots:208
|
||||
!RS Yap_RecoverSlots:208
|
||||
|
||||
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
!!! syntax error: expected to find ')', found <EOT>
|
||||
do_returnsRS Yap_RecoverSlots:208
|
||||
( G0, Sols0, Lab ):-RS Yap_RecoverSlots:208
|
||||
|
||||
counterRS Yap_RecoverSlots:208
|
||||
( I ),
|
||||
fetchRS Yap_RecoverSlots:208
|
||||
( I, Sols0, Pattern0, Next ),
|
||||
(
|
||||
Pattern0=RS Yap_RecoverSlots:208
|
||||
( V0=@=RS Yap_RecoverSlots:208
|
||||
Target0 ),
|
||||
copy_termRS Yap_RecoverSlots:208
|
||||
( G0-RS Yap_RecoverSlots:208
|
||||
V0, G-RS Yap_RecoverSlots:208
|
||||
VGF ),
|
||||
catchRS Yap_RecoverSlots:208
|
||||
( answerRS Yap_RecoverSlots:208
|
||||
( G, VGF, Target0, Lab, Sol ), Error, Sol=RS Yap_RecoverSlots:208
|
||||
errorRS Yap_RecoverSlots:208
|
||||
( G, Error ) ),
|
||||
stepRS Yap_RecoverSlots:208
|
||||
( _I, Sols, G0, Sol, Lab ),
|
||||
!RS Yap_RecoverSlots:208
|
||||
<== HERE ==>
|
||||
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
RS Yap_RecoverSlots:208
|
||||
?- \^\% YAP exiting: cannot handle signal 3
|
16
regression/modules/goal_expansion_tests.yap
Normal file
16
regression/modules/goal_expansion_tests.yap
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
:- use_module(library(lists)).
|
||||
|
||||
|
||||
test a(X) returns atom(X) .+
|
||||
given user:goal_expansion(a(X), current_atom(X))
|
||||
|
||||
test m:a(3,X) returns X =@= 15,
|
||||
given user:goal_expansion(a(X,Y), Y is X*5)
|
||||
|
||||
test m:a(3,X) returns X =@= 9
|
||||
given user:goal_expansion(a(X,Y), m, Y is X*X ))
|
||||
|
||||
test m:a(3,X) returns X =@= 9
|
||||
given user:goal_expansion(a(X,Y), m, Y is X*X ), user:goal_expansion(a(X), X is 3*5)
|
||||
|
32
regression/parse/run
Normal file
32
regression/parse/run
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/local/bin/yap
|
||||
#.
|
||||
#
|
||||
#
|
||||
|
||||
:- use_module(library(system)).
|
||||
|
||||
main :-
|
||||
source_dir( Dir ),
|
||||
directory_files(Dir/input/parse,[_,_|Files]),
|
||||
member( File, Files ),
|
||||
atom_concat(test_, Number, File),
|
||||
run( File ),
|
||||
match( File ),
|
||||
fail.
|
||||
main.
|
||||
|
||||
run(File) :-
|
||||
open( Dir/in/File, read, Stream ),
|
||||
tmp_dir( Tmp ),
|
||||
open( Tmp/File, Write, Output ),
|
||||
parse( Stream, Output ).
|
||||
|
||||
parse( Stream, Output ) :-
|
||||
catch( take(Stream, Term ), ERR, TERM = err__(ERR) ),
|
||||
show( Stream, Output, Term ).
|
||||
|
||||
take( Stream, Term ) :-
|
||||
repeat,
|
||||
read_term( Stream, Term ),
|
||||
( Term == end_of_file -> ! ; true ).
|
||||
|
Reference in New Issue
Block a user