CS代考 % Red/green state transition network – cscodehelp代写

% Red/green state transition network
% Your solution should be general and work for
% similar red/green state transition networks with differing
% structures. Knowledge of the specific structure of the

Copyright By cscodehelp代写 加微信 cscodehelp

% network should be contained in a knowledge base of facts.

% This predicate tests all three predicates. The argument is
% the name of the file containing the specific test network you
% wish to test. See the comments in the test network files to see
% what solutions should be returned.
test(TestNetFileName) :-
[TestNetFileName],
write(“Red edge sequences:”), nl,
bagof(X, red_edge_sequence(X), Xs),
writeOut(Xs), nl,
write(“Alternating edge sequences:”), nl,
bagof(Y, alternating_edge_sequence(Y), Ys),
writeOut(Ys), nl,
write(“Matching edge/state sequences:”), nl,
bagof(Z, matching_edge_state_sequence(Z), Zs),
writeOut(Zs), nl.

writeOut([]).
writeOut([H|T]) :-
write(H), nl,
writeOut(T).

% You must define the following predicates. You’ll need to define
% other helper predicates as well
% BEGIN CHANGES

% red_edge_sequence/1

% alternating_edge_sequence/1

% matching_edge_state_sequence/1

% END CHANGES

程序代写 CS代考 加微信: cscodehelp QQ: 2235208643 Email: kyit630461@163.com

Leave a Reply

Your email address will not be published. Required fields are marked *