func BooleanToMSP(boolExp string, convertToOnes bool) (*MSP, error) {
	vec := make(data.Vector, 1)
	vec[0] = big.NewInt(1)
	msp, _, err := booleanToMSPIterative(boolExp, vec, 1)
	if err != nil {
		return nil, err
	}
	if convertToOnes {
		invMat := make(data.Matrix, len(msp.Mat[0]))
		for i := 0; i < len(msp.Mat[0]); i++ {
			invMat[i] = make(data.Vector, len(msp.Mat[0]))
			for j := 0; j < len(msp.Mat[0]); j++ {
				if i == 0 || j == i {
					invMat[i][j] = big.NewInt(1)
				} else {
					invMat[i][j] = big.NewInt(0)
				}
			}
		}
		msp.Mat, err = msp.Mat.Mul(invMat)
		if err != nil {
			return nil, err
		}
	}
	return msp, nil
}
BooleanToMSP takes as an input a boolean expression (without a NOT gate) as
a string where attributes are joined by AND and OR gates. It outputs a
msp structure representing the expression, i.e. a matrix whose rows
correspond to attributes used in the expression and with the property that a
boolean expression assigning 1 to some attributes is satisfied iff the
corresponding rows span a vector [1, 1,..., 1] or vector [1, 0,..., 0]
depending if parameter convertToOnes is set to true or false. Additionally a
vector is produced whose i-th entry indicates to which attribute the i-th row
corresponds.
Example: BooleanToMSP("attrib1 AND (attrib2 OR attrib3)", true)
The names of the attributes should not include "AND" or "OR" as
a substring and '(' or ')' as a character, otherwise the function
will not work properly.
package abe
import (
	"math/big"
	"strings"
	"fmt"
	"github.com/fentec-project/gofe/data"
)
type MSP struct {
	P           *big.Int
	Mat         data.Matrix
	RowToAttrib []string
}