|
Macaulay2 Engine
|
ComputationStatusCode / StopConditions / StrategyValues / Algorithms / gbTraceValues — engine-to-interpreter vocabulary for long-running computations. More...
#include "engine-includes.hpp"Go to the source code of this file.
Classes | |
| struct | StopConditions |
| Bundle of optional early-termination knobs the front end can attach to a long-running Computation. More... | |
Enumerations | |
| enum | ComputationStatusCode { COMP_NEED_RESIZE = 1 , COMP_ERROR = 2 , COMP_INTERRUPTED = 3 , COMP_NOT_STARTED = 4 , COMP_INITIAL_STOP = 5 , COMP_DONE = 6 , COMP_DONE_DEGREE_LIMIT = 7 , COMP_DONE_LENGTH_LIMIT = 8 , COMP_DONE_SYZYGY_LIMIT = 9 , COMP_DONE_PAIR_LIMIT = 10 , COMP_DONE_GB_LIMIT = 11 , COMP_DONE_SYZ_LIMIT = 12 , COMP_DONE_CODIM = 13 , COMP_DONE_MIN_GENS = 14 , COMP_DONE_STEPS = 15 , COMP_DONE_SUBRING_LIMIT = 16 , COMP_COMPUTING = 17 , COMP_OVERFLOWED = 18 } |
| enum | StrategyValues { STRATEGY_LONGPOLYNOMIALS = 1 , STRATEGY_SORT = 2 , STRATEGY_USE_HILB = 4 , STRATEGY_USE_SYZ = 8 } |
| enum | Algorithms { GB_polyring_field = 1 , GB_polyring_field_homog = 2 } |
| enum | gbTraceValues { PRINT_SPAIR_TRACKING = 1024 } |
ComputationStatusCode / StopConditions / StrategyValues / Algorithms / gbTraceValues — engine-to-interpreter vocabulary for long-running computations.
Declares the C-side enums and struct the M2 interpreter shares with the engine for long-running computations. ComputationStatusCode (18 values: COMP_DONE, COMP_INTERRUPTED, COMP_DONE_DEGREE_LIMIT, COMP_DONE_GB_LIMIT, COMP_OVERFLOWED, ...) is what every start_computation() returns, and the StopConditions struct is what the interpreter populates to tell a Computation when to pause: always_stop, stop_after_degree + degree_limit, basis_element_limit, syzygy_limit, pair_limit, use_codim_limit + codim_limit, subring_limit, just_min_gens, and length_limit (commented "ignored for GB computations"). Three further bitfield-style enums live in this header but carry a TODO asking whether they should move elsewhere: StrategyValues (STRATEGY_LONGPOLYNOMIALS, _SORT, _USE_HILB, _USE_SYZ), Algorithms (GB_polyring_field, GB_polyring_field_homog), and gbTraceValues (PRINT_SPAIR_TRACKING). Concrete computation classes (GB, resolution, Hilbert, ...) build their own interface headers on this vocabulary.
ComputationStatusCode is the single source of truth for the engine/M2 boundary — the header carries an explicit "Keep this enum in sync with RawStatusCodes in Macaulay2/m2/gb.m2" comment, and adding a value here without updating the M2-side mirror silently breaks status reporting. Wrapped in extern "C" so it crosses the generated-C side of the .dd pipeline.
Definition in file computation.h.