typescript
3.18 KB
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
Script started on Tue 23 Jun 2015 10:50:19 AM JST
spa@khawasaki:~/work/src/paccs/fzn-parser$ ./ , ./fznslurp examples/a.fzn > examples/
/a.ast
| ?-
spa@khawasaki:~/work/src/paccs/fzn-parser$ ./fznslurp examples/a.fzn > examples/
/a.ast [Awasaki:~/work/src/paccs/fzn-parser$ ./fznslurp[1P examples/a.fzn > examples/a.ast
[K[Aspa@khawasaki:~/work/src/paccs/fzn-parser$ ./
examples/ fznslurp fzp
spa@khawasaki:~/work/src/paccs/fzn-parser$ ./ examples/a.fzn > examples/a.ast f examples/a.fzn > examples/a.ast [Apa@khawasaki:~/work/src/paccs/fzn-parser$ ./fz examples/a.fzn > examples/a.ast
[Apa@khawasaki:~/work/src/paccs/fzn-parser$ ./fzp examples/a.fzn > examples/a.ast [Aa@khawasaki:~/work/src/paccs/fzn-parser$ ./fzp
spa@khawasaki:~/work/src/paccs/fzn-parser$ ./fznslurp
GNU Prolog 1.3.0
By Daniel Diaz
Copyright (C) 1999-2007 Daniel Diaz
| ?- slurp(e 'examples/a.f ast'< , X)('examples/a.ast', X).
X = [satisfy,[],constrs([constraint(int_lin_ne,(_,array(_),int):(id('X_INTRODUCED_0'),alit((_,_):(id(wa),id(nt))),lit(0)),[])]),vars([var(nt,int(1,3),[],[_:id(output_var)]),var(wa,int(1,3),[],[_:id(output_var)]),var('X_INTRODUCED_0',array(int,1,2),array(_):alit((int,int):(lit(1),lit(-1))),[])]),preds([])]
yes
| ?- slurp('examples/a.ast', X)._X).X). , member(Y X, _X)(X, _X).
X = satisfy ? ;
X = [] ? ;
X = constrs([constraint(int_lin_ne,(_,array(_),int):(id('X_INTRODUCED_0'),alit((_,_):(id(wa),id(nt))),lit(0)),[])]) ? ;
X = vars([var(nt,int(1,3),[],[_:id(output_var)]),var(wa,int(1,3),[],[_:id(output_var)]),var('X_INTRODUCED_0',array(int,1,2),array(_):alit((int,int):(lit(1),lit(-1))),[])]) ? ;
X = preds([]) ? ;
no
| ?- slurp('examples/a.ast', _X), member(X, _X).X, _X). _, _X)., _X). v, _X).a, _X).r, _X).s, _X).(, _X)._, _X).Y, _X).), _X).(_Y), _X). , member(_ Y, _Y)(Y, _Y).
Y = var(nt,int(1,3),[],[_:id(output_var)]) ? ;
Y = var(wa,int(1,3),[],[_:id(output_var)]) ? ;
Y = var('X_INTRODUCED_0',array(int,1,2),array(_):alit((int,int):(lit(1),lit(-1))),[]) ? ;
no
| ?- slurp('examples/a.ast', _X), member(vars(_Y), _X), member(Y, _Y).(_Y), _X), member(Y, _Y). (_Y), _X), member(Y, _Y). (_Y), _X), member(Y, _Y). (_Y), _X), member(Y, _Y). c(_Y), _X), member(Y, _Y).o(_Y), _X), member(Y, _Y).n(_Y), _X), member(Y, _Y).s(_Y), _X), member(Y, _Y).t(_Y), _X), member(Y, _Y).r(_Y), _X), member(Y, _Y).e(_Y), _X), member(Y, _Y).(_Y), _X), member(Y, _Y). s(_Y), _X), member(Y, _Y).(_Y), _X), member(Y, _Y).
Y = constraint(int_lin_ne,(_,array(_),int):(id('X_INTRODUCED_0'),alit((_,_):(id(wa),id(nt))),lit(0)),[]) ? ;
no
| ?-
spa@khawasaki:~/work/src/paccs/fzn-parser$ exit
Script done on Tue 23 Jun 2015 10:52:37 AM JST