Skip to content
Snippets Groups Projects
Commit 9a1f1a68 authored by Thorsten Wißmann's avatar Thorsten Wißmann :guitar:
Browse files

Fixup GML-GMLMIP conversion

Variable numbers should not be 0, so shift them by 1 on conversion, then
shift them back.
parent f828ad2f
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ static CAMLprim value pair2caml(const int& t) {
CAMLlocal1( abc );
abc = caml_alloc(2, 0);
bool neg = t < 0;
Store_field( abc, 0, Val_int(neg ?(-t) : t));
Store_field( abc, 0, Val_int((neg ?(-t) : t) - 1));
Store_field( abc, 1, Val_bool(!neg));
return abc;
}
......@@ -74,7 +74,7 @@ CAMLprim value gmlRules_stub(value modalities) {
modvec.push_back(make_pair(make_pair(
Bool_val(vpos),
Int_val(vcnt)),
Int_val(vformula)));
1+Int_val(vformula)));
block = Field(block, 1);
}
// Do one rule step and save result in rulevec
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment