úÎT“L79      !"#$%&'()*+,-./012345678(c) Masahiro Sakai 2011-2015 BSD-stylemasahiro.sakai@gmail.com>non-portable (BangPatterns, DeriveDataTypeable, DeriveGeneric)Safe05.Variable are repserented as positive integers.YPositive (resp. negative) literals are represented as positive (resp. negative) integers.)List of variables interpreted as productsCoefficient and Sum of  A pair of weight and constraint. A pair of top cost and a list of soft constraints. Relational operators greater than or equalequal!Lhs, relational operator and rhs.Pair of objective function and a list of constraints.9_Utility function for computing number of variables in given objective function and constraints.:_Utility function for computing number of variables in given objective function and constraints.! 9:;<=>?@ABC  9:;<=  9:;<=>?@ABC(c) Masahiro Sakai 2012-2014 BSD-stylemasahiro.sakai@gmail.com provisionalnon-portable (BangPatterns)SafeD allocate too many intermediate E². Therefore we use this optimized implementation instead. Many intermediate values in this implementation will be optimized away by worker-wrapper transformation and unboxing.(c) Masahiro Sakai 2011-2016 BSD-stylemasahiro.sakai@gmail.com-non-portable (BangPatterns, FlexibleContexts)None:Parser for OPB filesParser for WBO files<Parse a OPB format string containing pseudo boolean problem.EParse a OPB format lazy bytestring containing pseudo boolean problem.3Parse a OPB file containing pseudo boolean problem.KParse a WBO format string containing weighted boolean optimization problem.EParse a WBO format lazy bytestring containing pseudo boolean problem.BParse a WBO file containing weighted boolean optimization problem.!FGHIJKLMNOPQRSTUVWXYZ[\]^!FGHIJKLMNOPQRSTUVWXYZ[\]^(c) Masahiro Sakai 2011-2015 BSD-stylemasahiro.sakai@gmail.com-non-portable (BangPatterns, FlexibleContexts)Safe:Parser for OPB files Parser for WBO files!<Parse a OPB format string containing pseudo boolean problem."EParse a OPB format lazy bytestring containing pseudo boolean problem.#3Parse a OPB file containing pseudo boolean problem.$KParse a WBO format string containing weighted boolean optimization problem.%EParse a WBO format lazy bytestring containing pseudo boolean problem.&BParse a WBO file containing weighted boolean optimization problem." _`abcdefghijklmnopqrs!"#tuvwx$%& !"#$%&!"# $%&" _`abcdefghijklmnopqrs!"#tuvwx$%&(c) Masahiro Sakai 2011-2015 BSD-stylemasahiro.sakai@gmail.comportableSafe'^A ByteString Builder which renders a OPB format byte-string containing pseudo boolean problem.(mA ByteString Builder which renders a WBO format byte-string containing weighted boolean optimization problem.)DGenerate a OPB format byte-string containing pseudo boolean problem.*SGenerate a WBO format byte-string containing weighted boolean optimization problem.+4Output a OPB file containing pseudo boolean problem.,COutput a WBO file containing weighted boolean optimization problem.-Output a OPB file to a y using z.It is recommended that the y is set to binary and { mode. See | and }.%This function is more efficient than hPut . )< because in many cases no buffer allocation has to be done..Output a WBO file to a y using z.It is recommended that the y is set to binary and { mode. See | and }.%This function is more efficient than hPut . *< because in many cases no buffer allocation has to be done. '(~€‚)*+,-.'()*+,-.'()*+,-. '(~€‚)*+,-.(c) Masahiro Sakai 2011-2015 BSD-stylemasahiro.sakai@gmail.comportableNone/8A builder which renders a OPB format in any String-like ƒ.08A builder which renders a WBO format in any String-like ƒ.1?Generate a OPB format string containing pseudo boolean problem.2NGenerate a WBO format string containing weighted boolean optimization problem. /0„…†‡ˆ12/012/012 /0„…†‡ˆ12(c) Masahiro Sakai 2011-2015 BSD-stylemasahiro.sakai@gmail.com.non-portable (BangPatterns, OverloadedStrings)Safe3Parser for OPB files4Parser for WBO files5<Parse a OPB format string containing pseudo boolean problem.63Parse a OPB file containing pseudo boolean problem.7KParse a WBO format string containing weighted boolean optimization problem.8BParse a WBO file containing weighted boolean optimization problem.!34‰Š‹ŒŽ‘’“”•–—˜™š›œ56žŸ ¡¢78£345678356478!34‰Š‹ŒŽ‘’“”•–—˜™š›œ56žŸ ¡¢78£(c) Masahiro Sakai 2011-2015 BSD-stylemasahiro.sakai@gmail.comnon-portable (BangPatterns)None$  !"#$%&)*+,-.12$  !"#$%&1)+-2*,.¤      !"#$% !"#$%&'()*+,-&'./!"$%0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYABCDEFGHIJKLMNOPZQRSTUVWXY;[\]^_;[`;ab;acdefgh;ijdefghABCDEFGHIJKLMNOPZQRSTUVWXYkl-pseudo-boolean-0.1.4.0-4HCaSjnIZDVLgZWPJVixs7Data.PseudoBoolean$Data.PseudoBoolean.Internal.TextUtilData.PseudoBoolean.MegaparsecData.PseudoBoolean.Parsec$Data.PseudoBoolean.ByteStringBuilderData.PseudoBoolean.BuilderData.PseudoBoolean.AttoparsecData.PseudoBoolean.TypesVarLitTerm WeightedTermSumSoftConstraint SoftFormula wboTopCostwboConstraints wboNumVarswboNumConstraintsOpGeEq ConstraintFormulapbObjectiveFunction pbConstraints pbNumVarspbNumConstraintsreadUnsignedInteger opbParser wboParserparseOPBStringparseOPBByteString parseOPBFileparseWBOStringparseWBOByteString parseWBOFile opbBuilder wboBuildertoOPBByteStringtoWBOByteString writeOPBFile writeWBOFilehPutOPBhPutWBO toOPBString toWBOStringpbComputeNumVarswboComputeNumVars pbProducts wboProducts wboNumSoft$fHashableSoftFormula$fNFDataSoftFormula $fHashableOp $fNFDataOp$fHashableFormula$fNFDataFormulabase Text.Readread integer-gmpGHC.Integer.TypeIntegerformulahintsequence_of_commentscomment#sequence_of_comments_or_constraintscomment_or_constraint objective constraintsum weightedtermintegerunsigned_integerrelational_operator variablenameoneOrMoreSpacezeroOrMoreSpacesemitermoneOrMoreLiteralsliteral softformula softheader'wbo_sequence_of_comments_or_constraintswbo_comment_or_constraintsoftconstrainteolGHC.IO.Handle.TypesHandlebytestring-0.10.8.1Data.ByteString.Builder hPutBuilderBlockBuffering GHC.IO.HandlehSetBinaryMode hSetBufferingshowSumshowWeightedTermshowLitshowConstraintshowSoftConstraintGHC.BaseMonoid optionMaybe