using System;
using System.Runtime.InteropServices;

namespace Omega
{
	internal class DllInterface
	{
		[DllImport("omegaLIB.dll")] 
		internal static extern int Relation_Union (int h1, int h2);

		[DllImport("omegaLIB.dll")] 
		internal static extern int Relation_Intersection (int h1, int h2);

		[DllImport("omegaLIB.dll")] 
		internal static extern int Relation_Composition (int h1, int h2);

		[DllImport("omegaLIB.dll")] 
		internal static extern int *Relation_GetConjuncts (int h);
		
		[DllImport("omegaLIB.dll")] 
		internal static extern int Conjunct_QueryVariableLowerBound (int h, int v);

		[DllImport("omegaLIB.dll")] 
		internal static extern int Conjunct_QueryVariableUpperBound (int h, int v);

		[DllImport("omegaLIB.dll")] 
		internal static extern int Relation_GetLocal (int h, int v);

		[DllImport("omegaLIB.dll")] 
		internal static extern int Relation_Create1 (int s);

		[DllImport("omegaLIB.dll")] 
		internal static extern int Relation_Create2 (int i, int o);

		[DllImport("omegaLIB.dll")] 
		internal static extern void Relation_Delete (int h);

		[DllImport("omegaLIB.dll")] 
		internal static extern void Relation_Print (int h);

		[DllImport("omegaLIB.dll")] 
		internal static extern void Relation_Finalize (int h);

		[DllImport("omegaLIB.dll")] 
		internal static extern void Relation_Simplify (int h, int p1, int p2);

		[DllImport("omegaLIB.dll")] 
		internal static extern void Relation_NameInputVariable (int h, int i, string n);

		[DllImport("omegaLIB.dll")] 
		internal static extern void Relation_NameOutputVariable (int h, int i, string n);

		[DllImport("omegaLIB.dll")] 
		internal static extern void Relation_NameSetVariable (int h, int i, string n);

		[DllImport("omegaLIB.dll")] 
		internal static extern int Relation_GetInputVariable (int h, int i);

		[DllImport("omegaLIB.dll")] 
		internal static extern int Relation_GetOutputVariable (int h, int i);

		[DllImport("omegaLIB.dll")] 
		internal static extern int Relation_GetSetVariable (int h, int i);

		[DllImport("omegaLIB.dll")] 
		internal static extern int Relation_GetInputCount (int h);

		[DllImport("omegaLIB.dll")] 
		internal static extern int Relation_GetOutputCount (int h);

		[DllImport("omegaLIB.dll")] 
		internal static extern int Relation_GetSetCount (int h);

		[DllImport("omegaLIB.dll")] 
		internal static extern int Relation_AddAnd (int h);

		[DllImport("omegaLIB.dll")] 
		internal static extern int Formula_AddAnd (int h);

		[DllImport("omegaLIB.dll")] 
		internal static extern int Formula_AddOr (int h);

		[DllImport("omegaLIB.dll")] 
		internal static extern int Formula_AddNot (int h);

		[DllImport("omegaLIB.dll")] 
		internal static extern int FAnd_AddEQ (int h);

		[DllImport("omegaLIB.dll")] 
		internal static extern int FAnd_AddGEQ (int h);

		[DllImport("omegaLIB.dll")]
		internal static extern void Constraint_DeleteHandle (int h);

		[DllImport("omegaLIB.dll")]
		internal static extern void Constraint_UpdateCoefficient (int h, int v, int c);

		[DllImport("omegaLIB.dll")]
		internal static extern void Constraint_UpdateConstant (int h, int c);

		[DllImport("omegaLIB.dll")] 
		internal static extern string Variable_GetName (int h);

		[DllImport("omegaLIB.dll")] 
		internal static extern int Global_Create (string n);

		[DllImport("omegaLIB.dll")] 
		internal static extern void Global_Delete (int h);
	}
}