File size: 1,591 Bytes
557a17a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
% 


/**

convert_lp_to_caw0000(
[
        [[n,reverse],[[],[v,l],[v,l]]],
        [[n,reverse],[[v,l],[v,m],[v,n]],":-",
        [       [[n,head],[[v,l],[v,h]]],
                [[n,tail],[[v,l],[v,t]]],
                [[n,wrap],[[v,h],[v,h1]]],
                [[n,append],[[v,h1],[v,m],[v,o]]],
                [[n,reverse],[[v,t],[v,o],[v,n]]]
        ]
        ]
],

[
	% gets used i,o (with header with vars that are only either 
	% 	in the header or used in another reverse_c4*

	% skips writeln, other predetermined commands
	% assumes wrap, unwrap used
	% doesn't use read_string (takes var input instead)
	
	[[n,reverse],[[],[v,l],[v,l]]],
	
	[[n,reverse_c41],[[v,l],[v,t],[v,h1]],":-",
	[	[[n,head],[[v,l],[v,h]]],
		[[n,tail],[[v,l],[v,t]]],
		[[n,wrap],[[v,h],[v,h1]]]
	]],
	
	% with vars it needs from another r_c4* or the header
	
	[[n,reverse_c42],[[v,h1],[v,m],[v,t],[v,n]],":-",
	[	[[n,append],[[v,h1],[v,m],[v,o]]],
		[[n,reverse],[[v,t],[v,o],[v,n]]]
	]]
],

[
	% finds algs (configuration of calls to certain 
	% 	commands with header
	% puts together pred

	[[n,reverse],[[],[v,l],[v,l]]],
	
	[[n,reverse],[[v,l],[v,m],[v,n]],":-",
	[	[n,reverse_c41],[[v,l],[v,t],[v,h1]],
		[n,reverse_c42],[[v,h1],[v,m],[v,t],[v,n]]
	]]
],

	% finds specs for r_c4*'s by using lpi with a 
	% flag switched on that returns the specs
	% - specs are i,o vars for lines, where c4 alg
	%   finds algs meeting spec for set of lines
	
	% * LPI numbers pred, pred lines, has widgets that 
	% indicate these and the var states
	% - with assertz x another var

**/

convert_lp_to_caw0000 :-