Macaulay2 Engine
Loading...
Searching...
No Matches
BasicPolyListParser.hpp File Reference

Parsers from text (string or file) into a BasicPolyList, including the Msolve input format. More...

#include <string>
#include <vector>
#include "BasicPolyList.hpp"

Go to the source code of this file.

Functions

BasicPolyList parseMsolveFromString (std::string contents)
BasicPolyList parseMsolveFile (std::string filename)
BasicPolyList parseBasicPolyListFromString (std::string contents, std::vector< std::string > varnames)

Detailed Description

Parsers from text (string or file) into a BasicPolyList, including the Msolve input format.

Note
AI-generated documentation. Verify against the source before relying on it.

Three free functions read polynomial systems from text and return a portable BasicPolyList. parseMsolveFromString / parseMsolveFile consume the input format of the external Msolve solver: the first non-comment line lists the variables (and the Msolve-style characteristic / ] lines are skipped), after which every remaining non-comment line is parsed as one polynomial. parseBasicPolyListFromString(contents, varnames) consumes the engine's simpler "one polynomial per line, `#` starts a comment" text format, building the variable-name-to-index table from the caller-supplied varnames. The free-function shape reflects that parsers carry no state across calls — text in, polynomials out.

Because BasicPolyList is ring-agnostic, these parsers run before any PolynomialRing is constructed, which makes them suitable for early pipeline stages: test-input wiring, the gb-f4 streaming PolynomialList consumer, and the round-trip half of Msolve dispatch.

See also
BasicPoly.hpp
BasicPolyList.hpp

Definition in file BasicPolyListParser.hpp.