Copyright | (c) Masahiro Sakai 2011-2015 |
---|---|
License | BSD-style |
Maintainer | masahiro.sakai@gmail.com |
Portability | non-portable (BangPatterns, FlexibleContexts) |
Safe Haskell | Safe |
Language | Haskell2010 |
A parser library for OPB file and WBO files used in pseudo boolean competition.
References:
- Input/Output Format and Solver Requirements for the Competitions of Pseudo-Boolean Solvers http://www.cril.univ-artois.fr/PB11/format.pdf
Synopsis
- opbParser :: Stream s m Char => ParsecT s u m Formula
- parseOPBString :: SourceName -> String -> Either ParseError Formula
- parseOPBByteString :: SourceName -> ByteString -> Either ParseError Formula
- parseOPBFile :: FilePath -> IO (Either ParseError Formula)
- wboParser :: Stream s m Char => ParsecT s u m SoftFormula
- parseWBOString :: SourceName -> String -> Either ParseError SoftFormula
- parseWBOByteString :: SourceName -> ByteString -> Either ParseError SoftFormula
- parseWBOFile :: FilePath -> IO (Either ParseError SoftFormula)
Parsing OPB files
parseOPBString :: SourceName -> String -> Either ParseError Formula Source #
Parse a OPB format string containing pseudo boolean problem.
parseOPBByteString :: SourceName -> ByteString -> Either ParseError Formula Source #
Parse a OPB format lazy bytestring containing pseudo boolean problem.
parseOPBFile :: FilePath -> IO (Either ParseError Formula) Source #
Parse a OPB file containing pseudo boolean problem.
Parsing WBO files
parseWBOString :: SourceName -> String -> Either ParseError SoftFormula Source #
Parse a WBO format string containing weighted boolean optimization problem.
parseWBOByteString :: SourceName -> ByteString -> Either ParseError SoftFormula Source #
Parse a WBO format lazy bytestring containing pseudo boolean problem.
parseWBOFile :: FilePath -> IO (Either ParseError SoftFormula) Source #
Parse a WBO file containing weighted boolean optimization problem.