Skip to main content

GlobalArgs

Struct GlobalArgs 

Source
pub struct GlobalArgs {
Show 25 fields pub help: (), pub extra_rule_sets: Vec<String>, pub verbose: u8, pub quiet: bool, pub rule_trace: Option<PathBuf>, pub rule_trace_aggregates: Option<PathBuf>, pub rule_trace_cdp: bool, pub rule_attempt_trace: Option<PathBuf>, pub parser: Parser, pub rewriter: Rewriter, pub comprehension_expander: QuantifiedExpander, pub heuristic: Heuristic, pub responses: Vec<usize>, pub seed: u64, pub solver_seed: u32, pub channelling: Channelling, pub solver: SolverFamily, pub minion_discrete_threshold: usize, pub minion_varorder: Option<MinionVariableOrder>, pub minion_valorder: Option<MinionValueOrder>, pub save_solver_input_file: Option<PathBuf>, pub solver_timeout: Option<Duration>, pub log_file: Option<PathBuf>, pub log_format: Option<LogFormat>, pub log_detail: Option<LogDetail>,
}

Fields§

§help: ()

Print help

§extra_rule_sets: Vec<String>

Extra rule sets to enable

§verbose: u8

Increase stderr logging detail (-v: stages, -vv: rule applications, -vvv: rule attempts).

Rule-attempt logging can be expensive and produce a very large amount of output.

§quiet: bool

Disable warning and progress logs on stderr

§rule_trace: Option<PathBuf>

Output file for the default rule trace.

§rule_trace_aggregates: Option<PathBuf>

Output file for aggregated rule-application counts.

The file is updated incrementally in the format: total_rule_applications: N, followed by one line per rule.

§rule_trace_cdp: bool

Continue rule trace generation during solver-time CDP rewrites.

This is off by default, so follow-up dominance-blocking rewrites do not contribute to the trace.

§rule_attempt_trace: Option<PathBuf>

Output file for the rule-attempt trace in CSV format.

Each row includes: elapsed_s, rule_level, rule_name, rule_set, status, expression.

§parser: Parser

Which parser to use.

Possible values: tree-sitter, via-conjure.

§rewriter: Rewriter

Which rewriter to use.

Possible values: baseline, optimised, baseline+prefilter, or baseline+worklist.

Option meanings:

  • prefilter: skip rules whose declared expression kinds cannot match; strong win vs baseline and part of optimised.
  • worklist: drive rewriting from persistent dirty queues instead of repeated full scans; strong win vs baseline and part of optimised.
§comprehension_expander: QuantifiedExpander

Which strategy to use for expanding quantified variables in comprehensions.

Possible values: auto, native, via-solver, via-solver-ac. auto chooses between native and solver-backed expansion from the comprehension’s estimated size and available pruning constraints.

§heuristic: Heuristic

Heuristic for selecting an answer when multiple modelling choices are applicable.

Possible values: f (first), r (random), c (compact), i (interactive). Compact minimises the representation-domain size for representation choices and the resulting AST depth for equally-applicable rewrite rules. Interactive prompts on stderr, or uses --responses when provided. x (all) is reserved for model generation and is not supported by the CLI yet.

§responses: Vec<usize>

Comma-separated 1-based answers for the interactive heuristic (-h i).

If provided, these are used as the answers during interactive model generation instead of prompting the user.

§seed: u64

Seed used by the random heuristic.

§solver_seed: u32

Seed used by the backend solver’s random search behaviour.

§channelling: Channelling

Whether multiple representations of the same declaration may be channelled together.

Possible values: no, yes. Channelling is disabled by default. Enable yes to allow different representations of the same variable at different call sites, e.g. 1 in (x :: set (representation packed) of int) /\ 2 in (x :: set (representation occurrence) of int).

§solver: SolverFamily

Solver to use.

Possible values: minion, sat, z3.

How a model is expressed for the chosen solver – which SAT encoding an integer gets, or which Z3 theory – is a modelling choice made per declaration, not part of the solver name. Use --heuristic to steer those choices and --channelling to allow more than one per declaration.

§minion_discrete_threshold: usize

Int-domain size threshold for using Minion DISCRETE variables.

If an int domain has size <= this value, Conjure Oxide emits DISCRETE; otherwise BOUND.

§minion_varorder: Option<MinionVariableOrder>

Override Minion variable ordering.

Possible values: static, sdf, srf, ldf, random, conflict, wdeg, domoverwdeg.

§minion_valorder: Option<MinionValueOrder>

Override Minion value ordering.

Possible values: ascend, descend, random.

§save_solver_input_file: Option<PathBuf>

Save a solver input file to .

This input file will be in a format compatible by the command-line interface of the selected solver. For example, when the solver is Minion, a valid .minion file will be output.

This file is for informational purposes only; the results of running this file cannot be used by Conjure Oxide in any way.

§solver_timeout: Option<Duration>

Stop the solver after the given cumulative wall-clock timeout.

Minion has one-second timeout resolution, so finer durations are rounded up.

§log_file: Option<PathBuf>

Write general logs to this file

§log_format: Option<LogFormat>

Format used by –log-file [default: text]

§log_detail: Option<LogDetail>

Detail written by –log-file [default: stages]

Trait Implementations§

Source§

impl Args for GlobalArgs

Source§

fn group_id() -> Option<Id>

Report the [ArgGroup::id][crate::ArgGroup::id] for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self via [FromArgMatches::from_arg_matches_mut] Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate self via [FromArgMatches::update_from_arg_matches_mut] Read more
Source§

impl Clone for GlobalArgs

Source§

fn clone(&self) -> GlobalArgs

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GlobalArgs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for GlobalArgs

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, A> IntoAst<A> for T
where T: Into<A>, A: Ast,

§

fn into_ast(self, _a: &A) -> A

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 224 bytes