argumentation_schemes/catalog/
analogy.rs1use crate::catalog::ANALOGICAL_ID_OFFSET;
6use crate::critical::CriticalQuestion;
7use crate::scheme::*;
8use crate::types::*;
9
10pub fn all() -> Vec<SchemeSpec> {
12 vec![
13 argument_from_analogy(),
14 argument_from_verbal_classification(),
15 argument_from_commitment(),
16 ]
17}
18
19pub fn argument_from_analogy() -> SchemeSpec {
21 SchemeSpec {
22 id: SchemeId(ANALOGICAL_ID_OFFSET),
23 name: "Argument from Analogy".into(),
24 category: SchemeCategory::Analogical,
25 premises: vec![
26 PremiseSlot::new("similar_case", "The analogous case", SlotRole::Property),
27 PremiseSlot::new(
28 "current_case",
29 "The case being reasoned about",
30 SlotRole::Property,
31 ),
32 PremiseSlot::new(
33 "property",
34 "The property that holds in the analogous case",
35 SlotRole::Proposition,
36 ),
37 ],
38 conclusion: ConclusionTemplate::positive(
39 "?property also holds in ?current_case because it holds in ?similar_case",
40 "?property",
41 ),
42 critical_questions: vec![
43 CriticalQuestion::new(
44 1,
45 "Are ?similar_case and ?current_case truly similar in relevant respects?",
46 Challenge::DisanalogyClaim,
47 ),
48 CriticalQuestion::new(
49 2,
50 "Is ?property the kind of thing that transfers between analogous cases?",
51 Challenge::RuleValidity,
52 ),
53 CriticalQuestion::new(
54 3,
55 "Are there relevant differences between ?similar_case and ?current_case that block the analogy?",
56 Challenge::DisanalogyClaim,
57 ),
58 ],
59 metadata: SchemeMetadata {
60 citation: "Walton 2008 p.315".into(),
61 domain_tags: vec!["analogical".into()],
62 presumptive: true,
63 strength: SchemeStrength::Moderate,
64 },
65 }
66}
67
68pub fn argument_from_verbal_classification() -> SchemeSpec {
70 SchemeSpec {
71 id: SchemeId(ANALOGICAL_ID_OFFSET + 1),
72 name: "Argument from Verbal Classification".into(),
73 category: SchemeCategory::Analogical,
74 premises: vec![
75 PremiseSlot::new("subject", "The entity being classified", SlotRole::Agent),
76 PremiseSlot::new(
77 "classification",
78 "The classification being applied",
79 SlotRole::Property,
80 ),
81 ],
82 conclusion: ConclusionTemplate::positive(
83 "?subject has the properties associated with ?classification",
84 "is_a_?classification_?subject",
85 ),
86 critical_questions: vec![
87 CriticalQuestion::new(
88 1,
89 "Does ?subject actually fit the definition of ?classification?",
90 Challenge::PremiseTruth("classification".into()),
91 ),
92 CriticalQuestion::new(
93 2,
94 "Is ?classification the right category for this context?",
95 Challenge::RuleValidity,
96 ),
97 ],
98 metadata: SchemeMetadata {
99 citation: "Walton 2008 p.320".into(),
100 domain_tags: vec!["analogical".into(), "definition".into()],
101 presumptive: true,
102 strength: SchemeStrength::Moderate,
103 },
104 }
105}
106
107pub fn argument_from_commitment() -> SchemeSpec {
109 SchemeSpec {
110 id: SchemeId(ANALOGICAL_ID_OFFSET + 2),
111 name: "Argument from Commitment".into(),
112 category: SchemeCategory::Analogical,
113 premises: vec![
114 PremiseSlot::new(
115 "agent",
116 "The person who made the commitment",
117 SlotRole::Agent,
118 ),
119 PremiseSlot::new(
120 "commitment",
121 "The commitment that was made",
122 SlotRole::Action,
123 ),
124 PremiseSlot::new(
125 "claim",
126 "The claim that follows from the commitment",
127 SlotRole::Proposition,
128 ),
129 ],
130 conclusion: ConclusionTemplate::positive(
131 "?agent should act consistently with ?commitment, therefore ?claim",
132 "?claim",
133 ),
134 critical_questions: vec![
135 CriticalQuestion::new(
136 1,
137 "Did ?agent actually make ?commitment?",
138 Challenge::PremiseTruth("commitment".into()),
139 ),
140 CriticalQuestion::new(
141 2,
142 "Does ?claim actually follow from ?commitment?",
143 Challenge::RuleValidity,
144 ),
145 CriticalQuestion::new(
146 3,
147 "Have circumstances changed such that ?commitment no longer applies?",
148 Challenge::AlternativeCause,
149 ),
150 ],
151 metadata: SchemeMetadata {
152 citation: "Walton 2008 p.322".into(),
153 domain_tags: vec!["analogical".into(), "social_contract".into()],
154 presumptive: true,
155 strength: SchemeStrength::Moderate,
156 },
157 }
158}
159
160#[cfg(test)]
161mod tests {
162 use super::*;
163
164 #[test]
165 fn all_returns_three_analogical_schemes() {
166 assert_eq!(all().len(), 3);
167 }
168
169 #[test]
170 fn analogical_ids_are_in_offset_range() {
171 for s in all() {
172 assert!(s.id.0 >= ANALOGICAL_ID_OFFSET);
173 assert!(s.id.0 < ANALOGICAL_ID_OFFSET + 100);
174 }
175 }
176}