Monday, September 7, 2015

Perkun. The Haskell generators.

Try using in Perkun ( the instruction "cout << haskell generator << eol;". For example:

value false;
value true;
value place_Wyzima;
value place_Novigrad;
value place_Shadizar;
value do_nothing;
value attack_vampire;
input variable do_I_see_vampire:{false,true};
input variable where_am_I:{place_Wyzima,place_Novigrad,place_Shadizar};
hidden variable where_is_vampire:{place_Wyzima,place_Novigrad,place_Shadizar};
output variable action:{do_nothing,attack_vampire};
cout << haskell generator << eol;

It will print out a Haskell code generating the model. The idea is similar like the Prolog generators described previously. You may enhance the generated code to create actual model.

No comments:

Post a Comment