diff --git a/.github/workflows/validation-linux.yml b/.github/workflows/validation-linux.yml index 94929aebf..8fd5ac5ca 100644 --- a/.github/workflows/validation-linux.yml +++ b/.github/workflows/validation-linux.yml @@ -15,3 +15,4 @@ jobs: run: sudo apt-get install spirv-tools glslang-tools - run: make validate-spv - run: make validate-glsl + - run: make validate-dot diff --git a/Cargo.toml b/Cargo.toml index 8e9b5dac5..9eb8e2470 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,6 +25,7 @@ pp-rs = { git = "https://github.com/Kangz/glslpp-rs", rev = "4f2f72a", optional [features] default = [] +dot-out = [] glsl-in = ["pomelo", "pp-rs"] glsl-validate = [] glsl-out = ["petgraph"] diff --git a/Makefile b/Makefile index 58aad1941..b452a2397 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all clean validate-spv validate-msl validate-glsl +.PHONY: all clean validate-spv validate-msl validate-glsl validate-dot .SECONDARY: boids.metal quad.metal SNAPSHOTS_IN=tests/in SNAPSHOTS_OUT=tests/out @@ -9,7 +9,7 @@ clean: rm *.metal *.air *.metallib *.vert *.frag *.comp *.spv %.metal: $(SNAPSHOTS_IN)/%.wgsl $(wildcard src/*.rs src/**/*.rs examples/*.rs) - cargo run --example convert --features wgsl-in,msl-out -- $< $@ + cargo run --features wgsl-in,msl-out -- $< $@ %.air: %.metal xcrun -sdk macosx metal -c $< -mmacosx-version-min=10.11 @@ -17,13 +17,11 @@ clean: %.metallib: %.air xcrun -sdk macosx metallib $< -o $@ -%.spv: test-data/%.wgsl $(wildcard src/*.rs src/**/*.rs examples/*.rs) - cargo run --example convert --features wgsl-in,spv-out -- $< $@ - spirv-val $@ +%.dot: $(SNAPSHOTS_IN)/%.wgsl $(wildcard src/*.rs src/front/wgsl/*.rs src/back/dot/*.rs bin/convert.rs) + cargo run --features wgsl-in,dot-out -- $< $@ -%.vert %.frag %.comp: test-data/%.wgsl $(wildcard src/*.rs src/**/*.rs examples/*.rs) - cargo run --example convert --features wgsl-in,glsl-out -- $< $@ - glslangValidator $@ +%.png: %.dot + dot -Tpng $< -o $@ validate-spv: $(SNAPSHOTS_OUT)/*.spvasm.snap @set -e && for file in $^ ; do \ @@ -50,3 +48,9 @@ validate-glsl: $(SNAPSHOTS_OUT)/*.glsl.snap echo "Validating" $${file#"$(SNAPSHOTS_OUT)/snapshots__"};\ tail -n +5 $${file} | glslangValidator --stdin -S comp; \ done + +validate-dot: $(SNAPSHOTS_OUT)/*.dot.snap + @set -e && for file in $^ ; do \ + echo "Validating" $${file#"$(SNAPSHOTS_OUT)/snapshots__"}; \ + tail -n +5 $${file} | dot -o /dev/null; \ + done diff --git a/README.md b/README.md index ff661d556..9a83e18d8 100644 --- a/README.md +++ b/README.md @@ -9,25 +9,26 @@ This is an experimental shader translation library for the needs of gfx-rs proje ## Supported end-points -Everything is still a work-in-progress, but some end-points are usable: +Everything is still work-in-progress, but some end-points are usable: -Front-end | Status | Notes | ---------------- | ------------------ | ----- | -SPIR-V (binary) | :white_check_mark: | | -WGSL | :white_check_mark: | | -GLSL (Vulkan) | :ok: | | -Rust | | | +Front-end | Status | Feature | Notes | +--------------- | ------------------ | ------- | ----- | +SPIR-V (binary) | :white_check_mark: | spv-in | | +WGSL | :white_check_mark: | wgsl-in | | +GLSL | :ok: | glsl-in | Vulkan flavor is expected | +Rust | | | | -Back-end | Status | Notes | ---------------- | ------------------ | ----- | -SPIR-V (binary) | :white_check_mark: | | -WGSL | | | -Metal | :white_check_mark: | | -HLSL | :construction: | | -GLSL | :ok: | | -AIR | | | -DXIL/DXIR | | | -DXBC | | | +Back-end | Status | Feature | Notes | +--------------- | ------------------ | -------- | ----- | +SPIR-V | :white_check_mark: | spv-out | | +WGSL | | | | +Metal | :white_check_mark: | msl-out | | +HLSL | :construction: | hlsl-out | | +GLSL | :ok: | glsl-out | | +AIR | | | | +DXIL/DXIR | | | | +DXBC | | | | +DOT (GraphViz) | :ok: | dot-out | Not a shading language | :white_check_mark: = Primary support — :ok: = Secondary support — :construction: = Unsupported, but support in progress diff --git a/bin/convert.rs b/bin/convert.rs index 2726ae44b..736cf996c 100644 --- a/bin/convert.rs +++ b/bin/convert.rs @@ -229,6 +229,12 @@ fn main() { }) .unwrap(); } + #[cfg(feature = "dot-out")] + "dot" => { + use naga::back::dot; + let output = dot::write(&module).unwrap(); + fs::write(output_path, output).unwrap(); + } other => { let _ = params; panic!( diff --git a/src/back/dot/mod.rs b/src/back/dot/mod.rs new file mode 100644 index 000000000..075c17af3 --- /dev/null +++ b/src/back/dot/mod.rs @@ -0,0 +1,444 @@ +/*! GraphViz (DOT) backend + * + * This backend writes a graph in the DOT format, for the ease + * of IR inspection and debugging. +!*/ + +use crate::arena::Handle; + +use std::{ + borrow::Cow, + fmt::{Error as FmtError, Write as _}, +}; + +#[derive(Default)] +struct StatementGraph { + nodes: Vec<&'static str>, + flow: Vec<(usize, usize, &'static str)>, + dependencies: Vec<(usize, Handle, &'static str)>, + emits: Vec<(usize, Handle)>, +} + +impl StatementGraph { + fn add(&mut self, block: &[crate::Statement]) -> usize { + use crate::Statement as S; + let root = self.nodes.len(); + self.nodes.push(if root == 0 { "Root" } else { "Node" }); + for statement in block { + let id = self.nodes.len(); + self.flow.push((id - 1, id, "")); + self.nodes.push(""); // reserve space + self.nodes[id] = match *statement { + S::Emit(ref range) => { + for handle in range.clone() { + self.emits.push((id, handle)); + } + "Emit" + } + S::Break => "Break", //TODO: loop context + S::Continue => "Continue", //TODO: loop context + S::Kill => "Kill", //TODO: link to the beginning + S::Block(ref b) => { + let other = self.add(b); + self.flow.push((id, other, "")); + "Block" + } + S::If { + condition, + ref accept, + ref reject, + } => { + self.dependencies.push((id, condition, "condition")); + let accept_id = self.add(accept); + self.flow.push((id, accept_id, "accept")); + let reject_id = self.add(reject); + self.flow.push((id, reject_id, "reject")); + "If" + } + S::Switch { + selector, + ref cases, + ref default, + } => { + self.dependencies.push((id, selector, "selector")); + for case in cases { + let case_id = self.add(&case.body); + self.flow.push((id, case_id, "case")); + } + let default_id = self.add(default); + self.flow.push((id, default_id, "default")); + "Switch" + } + S::Loop { + ref body, + ref continuing, + } => { + let body_id = self.add(body); + self.flow.push((id, body_id, "body")); + let continuing_id = self.add(continuing); + self.flow.push((body_id, continuing_id, "continuing")); + "Loop" + } + S::Return { value } => { + if let Some(expr) = value { + self.dependencies.push((id, expr, "value")); + } + "Return" + } + S::Store { pointer, value } => { + self.dependencies.push((id, value, "value")); + self.emits.push((id, pointer)); + "Store" + } + S::ImageStore { + image, + coordinate, + array_index, + value, + } => { + self.dependencies.push((id, image, "image")); + self.dependencies.push((id, coordinate, "coordinate")); + if let Some(expr) = array_index { + self.dependencies.push((id, expr, "array_index")); + } + self.dependencies.push((id, value, "value")); + "ImageStore" + } + S::Call { + function: _, + ref arguments, + result, + } => { + for &arg in arguments { + self.dependencies.push((id, arg, "arg")); + } + if let Some(expr) = result { + self.emits.push((id, expr)); + } + //TODO: link to function + "Call" + } + }; + } + root + } +} + +#[allow(clippy::manual_unwrap_or)] +fn name(option: &Option) -> &str { + match *option { + Some(ref name) => name, + None => "", + } +} + +/// set39 color scheme from https://graphviz.org/doc/info/colors.html +const COLORS: &[&str] = &[ + "white", // pattern starts at 1 + "#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", + "#d9d9d9", +]; + +fn write_fun(output: &mut String, prefix: String, fun: &crate::Function) -> Result<(), FmtError> { + enum Payload<'a> { + Arguments(&'a [Handle]), + Local(Handle), + Global(Handle), + } + + writeln!(output, "\t\tnode [ style=filled ]")?; + + for (handle, var) in fun.local_variables.iter() { + writeln!( + output, + "\t\t{}_l{} [ shape=hexagon label=\"{:?} '{}'\" ]", + prefix, + handle.index(), + handle, + name(&var.name), + )?; + } + + let mut edges = crate::FastHashMap::<&str, _>::default(); + let mut payload = None; + for (handle, expression) in fun.expressions.iter() { + use crate::Expression as E; + let (label, color_id) = match *expression { + E::Access { base, index } => { + edges.insert("base", base); + edges.insert("index", index); + (Cow::Borrowed("Access"), 1) + } + E::AccessIndex { base, index } => { + edges.insert("base", base); + (Cow::Owned(format!("AccessIndex[{}]", index)), 1) + } + E::Constant(_) => (Cow::Borrowed("Constant"), 2), + E::Compose { ref components, .. } => { + payload = Some(Payload::Arguments(components)); + (Cow::Borrowed("Compose"), 3) + } + E::FunctionArgument(index) => (Cow::Owned(format!("Argument[{}]", index)), 1), + E::GlobalVariable(h) => { + payload = Some(Payload::Global(h)); + (Cow::Borrowed("Global"), 2) + } + E::LocalVariable(h) => { + payload = Some(Payload::Local(h)); + (Cow::Borrowed("Local"), 1) + } + E::Load { pointer } => { + edges.insert("pointer", pointer); + (Cow::Borrowed("Load"), 4) + } + E::ImageSample { + image, + sampler, + coordinate, + array_index, + offset: _, + level, + depth_ref, + } => { + edges.insert("image", image); + edges.insert("sampler", sampler); + edges.insert("coordinate", coordinate); + if let Some(expr) = array_index { + edges.insert("array_index", expr); + } + match level { + crate::SampleLevel::Auto => {} + crate::SampleLevel::Zero => {} + crate::SampleLevel::Exact(expr) => { + edges.insert("level", expr); + } + crate::SampleLevel::Bias(expr) => { + edges.insert("bias", expr); + } + crate::SampleLevel::Gradient { x, y } => { + edges.insert("grad_x", x); + edges.insert("grad_y", y); + } + } + if let Some(expr) = depth_ref { + edges.insert("depth_ref", expr); + } + (Cow::Borrowed("ImageSample"), 5) + } + E::ImageLoad { + image, + coordinate, + array_index, + index, + } => { + edges.insert("image", image); + edges.insert("coordinate", coordinate); + if let Some(expr) = array_index { + edges.insert("array_index", expr); + } + if let Some(expr) = index { + edges.insert("index", expr); + } + (Cow::Borrowed("ImageLoad"), 5) + } + E::ImageQuery { image, query } => { + edges.insert("image", image); + let args = match query { + crate::ImageQuery::Size { level } => { + if let Some(expr) = level { + edges.insert("level", expr); + } + Cow::Borrowed("ImageSize") + } + _ => Cow::Owned(format!("{:?}", query)), + }; + (args, 7) + } + E::Unary { op, expr } => { + edges.insert("expr", expr); + (Cow::Owned(format!("{:?}", op)), 6) + } + E::Binary { op, left, right } => { + edges.insert("left", left); + edges.insert("right", right); + (Cow::Owned(format!("{:?}", op)), 6) + } + E::Select { + condition, + accept, + reject, + } => { + edges.insert("condition", condition); + edges.insert("accept", accept); + edges.insert("reject", reject); + (Cow::Borrowed("Select"), 3) + } + E::Derivative { axis, expr } => { + edges.insert("", expr); + (Cow::Owned(format!("d{:?}", axis)), 8) + } + E::Relational { fun, argument } => { + edges.insert("arg", argument); + (Cow::Owned(format!("{:?}", fun)), 6) + } + E::Math { + fun, + arg, + arg1, + arg2, + } => { + edges.insert("arg", arg); + if let Some(expr) = arg1 { + edges.insert("arg1", expr); + } + if let Some(expr) = arg2 { + edges.insert("arg2", expr); + } + (Cow::Owned(format!("{:?}", fun)), 7) + } + E::As { + kind, + expr, + convert, + } => { + let fun = if convert { "Convert" } else { "Cast" }; + edges.insert("", expr); + (Cow::Owned(format!("{}<{:?}>", fun, kind)), 3) + } + E::Call(_function) => (Cow::Borrowed("Call"), 4), + E::ArrayLength(expr) => { + edges.insert("", expr); + (Cow::Borrowed("ArrayLength"), 7) + } + }; + writeln!( + output, + "\t\t{}_e{} [ color=\"{}\" label=\"{:?} {}\" ]", + prefix, + handle.index(), + COLORS[color_id], + handle, + label, + )?; + + for (key, edge) in edges.drain() { + writeln!( + output, + "\t\t{}_e{} -> {}_e{} [ label=\"{}\" ]", + prefix, + edge.index(), + prefix, + handle.index(), + key, + )?; + } + match payload.take() { + Some(Payload::Arguments(list)) => { + write!(output, "\t\t{{")?; + for &comp in list { + write!(output, " {}_e{}", prefix, comp.index())?; + } + writeln!(output, " }} -> {}_e{}", prefix, handle.index())?; + } + Some(Payload::Local(h)) => { + writeln!( + output, + "\t\t{}_l{} -> {}_e{}", + prefix, + h.index(), + prefix, + handle.index(), + )?; + } + Some(Payload::Global(h)) => { + writeln!( + output, + "\t\tg{} -> {}_e{} [color=gray]", + h.index(), + prefix, + handle.index(), + )?; + } + None => {} + } + } + + let mut sg = StatementGraph::default(); + sg.add(&fun.body); + for (index, label) in sg.nodes.into_iter().enumerate() { + writeln!( + output, + "\t\t{}_s{} [ shape=square label=\"{}\" ]", + prefix, index, label, + )?; + } + for (from, to, label) in sg.flow { + writeln!( + output, + "\t\t{}_s{} -> {}_s{} [ arrowhead=tee label=\"{}\" ]", + prefix, from, prefix, to, label, + )?; + } + for (to, expr, label) in sg.dependencies { + writeln!( + output, + "\t\t{}_e{} -> {}_s{} [ label=\"{}\" ]", + prefix, + expr.index(), + prefix, + to, + label, + )?; + } + for (from, to) in sg.emits { + writeln!( + output, + "\t\t{}_s{} -> {}_e{} [ style=dotted ]", + prefix, + from, + prefix, + to.index(), + )?; + } + + Ok(()) +} + +pub fn write(module: &crate::Module) -> Result { + use std::fmt::Write as _; + + let mut output = String::new(); + output += "digraph Module {\n"; + + writeln!(output, "\tsubgraph cluster_globals {{")?; + writeln!(output, "\t\tlabel=\"Globals\"")?; + for (handle, var) in module.global_variables.iter() { + writeln!( + output, + "\t\tg{} [ shape=hexagon label=\"{:?} {:?}/'{}'\" ]", + handle.index(), + handle, + var.class, + name(&var.name), + )?; + } + writeln!(output, "\t}}")?; + + for (handle, fun) in module.functions.iter() { + let prefix = format!("f{}", handle.index()); + writeln!(output, "\tsubgraph cluster_{} {{", prefix)?; + writeln!(output, "\t\tlabel=\"Function/'{}'\"", name(&fun.name))?; + write_fun(&mut output, prefix, fun)?; + writeln!(output, "\t}}")?; + } + for (ep_index, (&(stage, ref name), ep)) in module.entry_points.iter().enumerate() { + let prefix = format!("ep{}", ep_index); + writeln!(output, "\tsubgraph cluster_{} {{", prefix)?; + writeln!(output, "\t\tlabel=\"{:?}/'{}'\"", stage, name)?; + write_fun(&mut output, prefix, &ep.function)?; + writeln!(output, "\t}}")?; + } + + output += "}\n"; + Ok(output) +} diff --git a/src/back/mod.rs b/src/back/mod.rs index b3369c0d7..1b0d826e2 100644 --- a/src/back/mod.rs +++ b/src/back/mod.rs @@ -1,5 +1,7 @@ //! Functions which export shader modules into binary and text formats. +#[cfg(feature = "dot-out")] +pub mod dot; #[cfg(feature = "glsl-out")] pub mod glsl; #[cfg(feature = "msl-out")] diff --git a/tests/out/quad.dot.snap b/tests/out/quad.dot.snap new file mode 100644 index 000000000..f00e3c15e --- /dev/null +++ b/tests/out/quad.dot.snap @@ -0,0 +1,99 @@ +--- +source: tests/snapshots.rs +expression: string +--- +digraph Module { + subgraph cluster_globals { + label="Globals" + g0 [ shape=hexagon label="[1] Input/'a_pos'" ] + g1 [ shape=hexagon label="[2] Input/'a_uv'" ] + g2 [ shape=hexagon label="[3] Output/'v_uv'" ] + g3 [ shape=hexagon label="[4] Output/'o_position'" ] + g4 [ shape=hexagon label="[5] Input/'v_uv'" ] + g5 [ shape=hexagon label="[6] Handle/'u_texture'" ] + g6 [ shape=hexagon label="[7] Handle/'u_sampler'" ] + g7 [ shape=hexagon label="[8] Output/'o_color'" ] + } + subgraph cluster_ep0 { + label="Vertex/'main'" + node [ style=filled ] + ep0_e0 [ color="#ffffb3" label="[1] Constant" ] + ep0_e1 [ color="#ffffb3" label="[2] Global" ] + g0 -> ep0_e1 [color=gray] + ep0_e2 [ color="#ffffb3" label="[3] Global" ] + g2 -> ep0_e2 [color=gray] + ep0_e3 [ color="#ffffb3" label="[4] Global" ] + g3 -> ep0_e3 [color=gray] + ep0_e4 [ color="#ffffb3" label="[5] Global" ] + g1 -> ep0_e4 [color=gray] + ep0_e5 [ color="#fb8072" label="[6] Load" ] + ep0_e4 -> ep0_e5 [ label="pointer" ] + ep0_e6 [ color="#fb8072" label="[7] Load" ] + ep0_e1 -> ep0_e6 [ label="pointer" ] + ep0_e7 [ color="#fdb462" label="[8] Multiply" ] + ep0_e6 -> ep0_e7 [ label="right" ] + ep0_e0 -> ep0_e7 [ label="left" ] + ep0_e8 [ color="#ffffb3" label="[9] Constant" ] + ep0_e9 [ color="#ffffb3" label="[10] Constant" ] + ep0_e10 [ color="#bebada" label="[11] Compose" ] + { ep0_e7 ep0_e8 ep0_e9 } -> ep0_e10 + ep0_s0 [ shape=square label="Root" ] + ep0_s1 [ shape=square label="Emit" ] + ep0_s2 [ shape=square label="Store" ] + ep0_s3 [ shape=square label="Emit" ] + ep0_s4 [ shape=square label="Emit" ] + ep0_s5 [ shape=square label="Store" ] + ep0_s6 [ shape=square label="Return" ] + ep0_s0 -> ep0_s1 [ arrowhead=tee label="" ] + ep0_s1 -> ep0_s2 [ arrowhead=tee label="" ] + ep0_s2 -> ep0_s3 [ arrowhead=tee label="" ] + ep0_s3 -> ep0_s4 [ arrowhead=tee label="" ] + ep0_s4 -> ep0_s5 [ arrowhead=tee label="" ] + ep0_s5 -> ep0_s6 [ arrowhead=tee label="" ] + ep0_e5 -> ep0_s2 [ label="value" ] + ep0_e10 -> ep0_s5 [ label="value" ] + ep0_s1 -> ep0_e5 [ style=dotted ] + ep0_s2 -> ep0_e2 [ style=dotted ] + ep0_s3 -> ep0_e6 [ style=dotted ] + ep0_s3 -> ep0_e7 [ style=dotted ] + ep0_s4 -> ep0_e10 [ style=dotted ] + ep0_s5 -> ep0_e3 [ style=dotted ] + } + subgraph cluster_ep1 { + label="Fragment/'main'" + node [ style=filled ] + ep1_e0 [ color="#ffffb3" label="[1] Global" ] + g3 -> ep1_e0 [color=gray] + ep1_e1 [ color="#ffffb3" label="[2] Global" ] + g6 -> ep1_e1 [color=gray] + ep1_e2 [ color="#ffffb3" label="[3] Global" ] + g5 -> ep1_e2 [color=gray] + ep1_e3 [ color="#ffffb3" label="[4] Constant" ] + ep1_e4 [ color="#ffffb3" label="[5] Global" ] + g0 -> ep1_e4 [color=gray] + ep1_e5 [ color="#ffffb3" label="[6] Global" ] + g4 -> ep1_e5 [color=gray] + ep1_e6 [ color="#ffffb3" label="[7] Global" ] + g1 -> ep1_e6 [color=gray] + ep1_e7 [ color="#ffffb3" label="[8] Global" ] + g7 -> ep1_e7 [color=gray] + ep1_e8 [ color="#fb8072" label="[9] Load" ] + ep1_e5 -> ep1_e8 [ label="pointer" ] + ep1_e9 [ color="#80b1d3" label="[10] ImageSample" ] + ep1_e1 -> ep1_e9 [ label="sampler" ] + ep1_e2 -> ep1_e9 [ label="image" ] + ep1_e8 -> ep1_e9 [ label="coordinate" ] + ep1_s0 [ shape=square label="Root" ] + ep1_s1 [ shape=square label="Emit" ] + ep1_s2 [ shape=square label="Store" ] + ep1_s3 [ shape=square label="Return" ] + ep1_s0 -> ep1_s1 [ arrowhead=tee label="" ] + ep1_s1 -> ep1_s2 [ arrowhead=tee label="" ] + ep1_s2 -> ep1_s3 [ arrowhead=tee label="" ] + ep1_e9 -> ep1_s2 [ label="value" ] + ep1_s1 -> ep1_e8 [ style=dotted ] + ep1_s1 -> ep1_e9 [ style=dotted ] + ep1_s2 -> ep1_e7 [ style=dotted ] + } +} + diff --git a/tests/snapshots.rs b/tests/snapshots.rs index d5a01be7b..e7b93f030 100644 --- a/tests/snapshots.rs +++ b/tests/snapshots.rs @@ -5,6 +5,7 @@ bitflags::bitflags! { const SPIRV = 0x4; const METAL = 0x8; const GLSL = 0x10; + const DOT = 0x20; } } @@ -102,6 +103,15 @@ fn check_targets(module: &naga::Module, name: &str, targets: Targets) { } } } + #[cfg(feature = "dot-out")] + { + if targets.contains(Targets::DOT) { + let string = naga::back::dot::write(module).unwrap(); + with_snapshot_settings(|| { + insta::assert_snapshot!(format!("{}.dot", name), string); + }); + } + } } #[cfg(feature = "spv-out")] @@ -213,7 +223,10 @@ fn convert_wgsl(name: &str, targets: Targets) { #[cfg(feature = "wgsl-in")] #[test] fn convert_wgsl_quad() { - convert_wgsl("quad", Targets::SPIRV | Targets::METAL | Targets::GLSL); + convert_wgsl( + "quad", + Targets::SPIRV | Targets::METAL | Targets::GLSL | Targets::DOT, + ); } #[cfg(feature = "wgsl-in")] @@ -278,7 +291,7 @@ fn convert_glsl( entry_points: naga::FastHashMap, _targets: Targets, ) { - let module = naga::front::glsl::parse_str( + let _module = naga::front::glsl::parse_str( &std::fs::read_to_string(format!("tests/in/{}{}", name, ".glsl")) .expect("Couldn't find glsl file"), &naga::front::glsl::Options {