Crate conjure_oxide

Source

Modules§

ast
defaults
find_conjure
rule_engine
rules
This module contains the rewrite rules for Conjure Oxides and it’s solvers.
solver
A high-level API for interacting with constraints solvers.
utils

Macros§

register_rule_set
Register a rule set with the given name, priority, and dependencies.Example

Structs§

Metadata
Model
Represents a computational model containing variables, constraints, and a shared context.
Reduction
Represents the result of applying a rule to an expression within a model.
Rule
A rule with a name, application function, and rule sets.
RuleSet
A structure representing a set of rules with a name, priority, and dependencies.

Enums§

ApplicationError
Error
SolverFamily

Functions§

get_example_model
Searches recursively in ../tests/integration folder for an .essence file matching the given filename, then uses conjure to process it into astjson, and returns the parsed model.
get_example_model_by_path
Searches for an .essence file at the given filepath, then uses conjure to process it into astjson, and returns the parsed model.
get_rule_by_name
Get a rule by name. Returns the rule with the given name or None if it doesn’t exist.
get_rule_set_by_name
Get a rule set by name. Returns the rule set with the given name or None if it doesn’t exist.
get_rule_sets
Get all rule sets Returns a Vec of static references to all rule sets registered with the register_rule_set macro. Rule sets are not guaranteed to be in any particular order.
get_rule_sets_for_solver_family
Get all rule sets for a given solver family. Returns a Vec of static references to all rule sets that are applicable to the given solver family.
get_rules
Returns a copied Vec of all rules registered with the register_rule macro.
model_from_json

Type Aliases§

ApplicationResult
The result of applying a rule to an expression. Contains either a set of reduction instructions or an error.

Attribute Macros§

register_rule
Register a rule with the given rule sets and priorities.