Fleet  0.0.9
Inference in the LOT
Variables
DSL Namespace Reference

Variables

const auto card_gt = +[](Set x, Set y) -> bool { return x.size() > y.size(); }
 
const auto card_eq = +[](Set x, Set y) -> bool { return x.size() == y.size(); }
 
const auto empty = +[](Set x) -> bool { return x.size() == 0; }
 
const auto singleton = +[](Set x) -> bool { return x.size() == 1; }
 
const auto doubleton = +[](Set x) -> bool { return x.size() == 2; }
 
const auto tripleton = +[](Set x) -> bool { return x.size() == 3; }
 
const auto eq = +[](Set x, Set y) -> bool { return x==y; }
 
const auto presup
 
const auto context = +[](Utterance u) -> Set { return u.context; }
 
const auto shape = +[](Utterance u) -> Set { return u.shape; }
 
const auto color = +[](Utterance u) -> Set { return u.color; }
 
const auto emptyset = +[]() -> Set { return Set(); }
 
const auto subset
 
const auto intersection
 
const auto myunion
 
const auto complement
 
const auto difference
 
const auto filter_color
 
const auto filter_shape
 

Variable Documentation

◆ card_eq

const auto DSL::card_eq = +[](Set x, Set y) -> bool { return x.size() == y.size(); }

◆ card_gt

const auto DSL::card_gt = +[](Set x, Set y) -> bool { return x.size() > y.size(); }

◆ color

const auto DSL::color = +[](Utterance u) -> Set { return u.color; }

◆ complement

const auto DSL::complement
Initial value:
= +[](Set x, Utterance u) -> Set {
Set out;
std::set_difference(u.context.begin(), u.context.end(), x.begin(), x.end(), std::inserter(out, out.begin()));
return out;
}
Definition: Main.cpp:40
std::multiset< MyObject > Set
Definition: Main.cpp:38

◆ context

const auto DSL::context = +[](Utterance u) -> Set { return u.context; }

◆ difference

const auto DSL::difference
Initial value:
= +[](Set x, Set y) -> Set {
Set out;
std::set_difference(x.begin(), x.end(), y.begin(), y.end(), std::inserter(out, out.begin()));
return out;
}
std::multiset< MyObject > Set
Definition: Main.cpp:38

◆ doubleton

const auto DSL::doubleton = +[](Set x) -> bool { return x.size() == 2; }

◆ empty

const auto DSL::empty = +[](Set x) -> bool { return x.size() == 0; }

◆ emptyset

const auto DSL::emptyset = +[]() -> Set { return Set(); }

◆ eq

const auto DSL::eq = +[](Set x, Set y) -> bool { return x==y; }

◆ filter_color

const auto DSL::filter_color
Initial value:
= +[](MyColor c, Set x) -> Set {
Set out;
for(auto& v : x) {
if(v.get<MyColor>() == c)
out.insert(v);
}
return out;
}
MyColor
Definition: Main.cpp:30
std::multiset< MyObject > Set
Definition: Main.cpp:38

◆ filter_shape

const auto DSL::filter_shape
Initial value:
= +[](MyShape s, Set x) -> Set {
Set out;
for(auto& v : x) {
if(v.get<MyShape>() == s)
out.insert(v);
}
return out;
}
MyShape
Definition: Main.cpp:31
std::multiset< MyObject > Set
Definition: Main.cpp:38

◆ intersection

const auto DSL::intersection
Initial value:
= +[](Set x, Set y) -> Set {
Set out;
std::set_intersection(x.begin(), x.end(), y.begin(), y.end(), std::inserter(out, out.begin()));
return out;
}
std::multiset< MyObject > Set
Definition: Main.cpp:38

◆ myunion

const auto DSL::myunion
Initial value:
= +[](Set x, Set y) -> Set {
Set out;
std::set_union(x.begin(), x.end(), y.begin(), y.end(), std::inserter(out, out.begin()));
return out;
}
std::multiset< MyObject > Set
Definition: Main.cpp:38

◆ presup

const auto DSL::presup
Initial value:
= +[](bool x, bool y) -> TruthValue {
if(x) return (y ? TruthValue::True : TruthValue::False);
else return TruthValue::Undefined;
}
TruthValue
Definition: Main.cpp:32

◆ shape

const auto DSL::shape = +[](Utterance u) -> Set { return u.shape; }

◆ singleton

const auto DSL::singleton = +[](Set x) -> bool { return x.size() == 1; }

◆ subset

const auto DSL::subset
Initial value:
= +[](Set x, Set y) -> bool {
return std::includes(y.begin(), y.end(), x.begin(), x.end());
}
std::multiset< MyObject > Set
Definition: Main.cpp:38

◆ tripleton

const auto DSL::tripleton = +[](Set x) -> bool { return x.size() == 3; }