souffle
2.0.2-371-g6315b36
|
Namespaces | |
ast | |
ast2ram | |
detail | |
evaluator | |
gzfstream | |
interpreter | |
profile | |
ram | |
stream_write_qualified_char_as_number | |
synthesiser | |
Souffle - A Datalog Compiler Copyright (c) 2013, 2015, Oracle and/or its affiliates. | |
test | |
Data Structures | |
class | BaseTable |
class | btree_multiset |
A b-tree based multi-set implementation. More... | |
class | btree_set |
A b-tree based set implementation. More... | |
class | CacheAccessCounter |
cache hits/misses. More... | |
class | CmdOptions |
A utility class for parsing command line arguments within generated query programs. More... | |
struct | comp_deref |
A functor class supporting the values pointers are pointing to. More... | |
class | ConstConstraint |
Constant constraints for values in query command. More... | |
class | DebugReport |
Class representing a HTML report, consisting of a list of sections. More... | |
class | DebugReportSection |
Class representing a section of a HTML report. More... | |
struct | deref |
A functor dereferencing a given type. More... | |
struct | deref_less |
A functor comparing the dereferenced value of a pointer type utilizing a given comparator. More... | |
class | Diagnostic |
class | DiagnosticMessage |
class | DisjointSet |
Structure that emulates a Disjoint Set, i.e. More... | |
struct | EqrelMapComparator |
class | Equivalence |
Equivalence class for variables in query command. More... | |
class | EquivalenceRelation |
class | ErrorReport |
class | Explain |
class | ExplainConfig |
class | ExplainProvenance |
class | ExplainProvenanceImpl |
class | Global |
class | Graph |
A simple graph structure for graph-based operations. More... | |
struct | id |
A functor representing the identity function for a generic type T. More... | |
class | InnerNode |
struct | IntrinsicFunctorInfo |
class | IOSystem |
struct | IsPtrLike |
struct | IsPtrLike< Own< A > > |
struct | IsPtrLike< std::shared_ptr< A > > |
struct | IsPtrLike< std::weak_ptr< A > > |
struct | IterDerefWrapper |
A wrapper for an iterator obtaining pointers of a certain type, dereferencing values before forwarding them to the consumer. More... | |
struct | lambda_traits |
A type trait enabling the deduction of type properties of lambdas. More... | |
class | LambdaBTreeSet |
A b-tree based set implementation. More... | |
class | LeafNode |
struct | Lock |
A small utility class for implementing simple locks. More... | |
class | Logger |
The class utilized to times for the souffle profiling tool. More... | |
class | LogStatement |
class | LRUCache |
An Least-Recently-Used cache for arbitrary element types. More... | |
class | LRUCache< T, 0 > |
class | LRUCache< T, 1 > |
class | MainConfig |
struct | MainOption |
class | OptimisticReadWriteLock |
A 'sequential' non-locking implementation for an optimistic r/w lock. More... | |
class | ParserDriver |
class | PiggyList |
struct | print_deref |
A functor printing elements after dereferencing it. More... | |
class | ProfileEventSingleton |
Profile Event Singleton. More... | |
class | ProgramFactory |
Abstract program factory class. More... | |
class | RandomInsertPiggyList |
A PiggyList that allows insertAt functionality. More... | |
struct | range |
A utility class enabling representation of ranges by pairing two iterator instances marking lower and upper boundaries. More... | |
class | ReadCinCSVFactory |
class | ReadCinJSONFactory |
class | ReadFileCSV |
class | ReadFileCSVFactory |
class | ReadFileJSON |
class | ReadFileJSONFactory |
class | ReadSQLiteFactory |
class | ReadStream |
class | ReadStreamCSV |
class | ReadStreamFactory |
class | ReadStreamJSON |
class | ReadStreamSQLite |
class | ReadWriteLock |
class | RecordMap |
Bidirectional mappping between records and record references. More... | |
class | RecordTable |
class | Relation |
Object-oriented wrapper class for Souffle's templatized relations. More... | |
class | RelationWrapper |
Relation wrapper used internally in the generated Datalog program. More... | |
struct | reverse |
Use to range-for iterate in reverse. More... | |
class | RuleBody |
struct | scanner_data |
class | ScreenBuffer |
class | SerialisationStream |
class | SignalHandler |
Class SignalHandler captures signals and reports the context where the signal occurs. More... | |
class | SingleValueIterator |
An iterator to be utilized if there is only a single element to iterate over. More... | |
class | SouffleProgram |
Abstract base class for generated Datalog programs. More... | |
class | SparseArray |
A sparse array simulates an array associating to every element of uint32_t an element of a generic type T. More... | |
class | SparseBitMap |
A sparse bit-map is a bit map virtually assigning a bit value to every value if the uint32_t domain. More... | |
class | SparseDisjointSet |
class | SpinLock |
A 'sequential' non-locking implementation for a spin lock. More... | |
class | SrcLocation |
A class describing a range in an input file. More... | |
class | SymbolTable |
class | t_info |
info relations More... | |
class | t_nullaries |
Nullary relations. More... | |
class | Table |
class | TempFileStream |
class | TreeNode |
class | Trie |
class | Trie< 1u > |
A template specialization for tries representing a set. More... | |
class | tuple |
Defines a tuple for the OO interface such that relations with varying columns can be accessed. More... | |
class | WriteCoutCSV |
class | WriteCoutCSVFactory |
class | WriteCoutJSON |
class | WriteCoutJSONFactory |
class | WriteCoutPrintSize |
class | WriteCoutPrintSizeFactory |
class | WriteFileCSV |
class | WriteFileCSVFactory |
class | WriteFileJSON |
class | WriteFileJSONFactory |
class | WriteSQLiteFactory |
class | WriteStream |
class | WriteStreamCSV |
class | WriteStreamFactory |
class | WriteStreamJSON |
class | WriteStreamSQLite |
Typedefs | |
using | block_t = uint64_t |
template<typename A , typename B > | |
using | copy_const_t = std::conditional_t< std::is_const_v< A >, const B, B > |
using | IntrinsicFunctors = std::vector< std::reference_wrapper< const IntrinsicFunctorInfo > > |
template<typename A > | |
using | Own = std::unique_ptr< A > |
using | parent_t = uint64_t |
using | RamDomain = int32_t |
using | RamFloat = float |
using | RamSigned = RamDomain |
using | RamUnsigned = uint32_t |
using | rank_t = uint8_t |
template<typename A , size_t E = tcb::dynamic_extent> | |
using | span = tcb::span< A, E > |
using | time_point = std::chrono::high_resolution_clock::time_point |
template<typename A , size_t N> | |
using | Tuple = std::array< A, N > |
template<typename A > | |
using | VecOwn = std::vector< Own< A > > |
using | yyscan_t = void * |
Functions | |
std::string | absPath (const std::string &path) |
C++-style realpath. More... | |
std::pair< uint8_t, uint8_t > | aggregateArity (AggregateOp op) |
template<typename Container , typename UnaryPredicate > | |
bool | all_of (const Container &c, UnaryPredicate p) |
A generic test checking whether all elements within a container satisfy a certain predicate. More... | |
template<typename Container , typename UnaryPredicate > | |
bool | any_of (const Container &c, UnaryPredicate p) |
A generic test checking whether any elements within a container satisfy a certain predicate. More... | |
template<typename B , typename A > | |
std::enable_if_t< std::is_base_of_v< A, B >, copy_const_t< A, B > * > | as (A &x) |
template<typename B , typename A > | |
auto | as (A *x) |
Helpers for dynamic_cast ing without having to specify redundant type qualifiers. More... | |
template<typename B , typename A > | |
B * | as (const std::unique_ptr< A > &x) |
std::string | baseName (const std::string &filename) |
bool | canBeParsedAsRamFloat (const std::string &string) |
Can a string be parsed as RamFloat. More... | |
bool | canBeParsedAsRamSigned (const std::string &string) |
Can a string be parsed as RamSigned. More... | |
bool | canBeParsedAsRamUnsigned (const std::string &string) |
Can a string be parsed as RamUnsigned. More... | |
template<typename toType , typename baseType > | |
bool | castEq (const baseType *left, const baseType *right) |
Cast the values, from baseType to toType and compare using ==. More... | |
template<typename A > | |
std::unique_ptr< A > | clone (const A *node) |
template<typename A , typename B > | |
auto | clone (const std::pair< A, B > &p) |
template<typename A > | |
std::unique_ptr< A > | clone (const std::unique_ptr< A > &node) |
template<typename A > | |
auto | clone (const std::vector< A * > &xs) |
template<typename A > | |
auto | clone (const std::vector< std::unique_ptr< A >> &xs) |
void | compileToBinary (std::string compileCmd, const std::string &sourceFilename) |
Compiles the given source file to a binary file. More... | |
template<typename C > | |
bool | contains (const C &container, const typename C::value_type &element) |
A utility to check generically whether a given element is contained in a given container. More... | |
template<typename C > | |
bool | contains (const C &container, const typename C::value_type::first_type &element) |
Version of contains specialised for maps. More... | |
template<typename A > | |
bool | contains (const std::set< A > &container, const A &element) |
std::string | convertDotToSVG (const std::string &dotSpec) |
AggregateOp | convertOverloadedAggregator (const AggregateOp op, const TypeAttribute type) |
Convert aggregator to a give type. More... | |
BinaryConstraintOp | convertOverloadedConstraint (const BinaryConstraintOp constraintOp, const TypeAttribute toType) |
Convert Constraint to work with requested type. More... | |
BinaryConstraintOp | convertStrictToNotEqualConstraint (const BinaryConstraintOp constraintOp) |
BinaryConstraintOp | convertStrictToWeakIneqConstraint (const BinaryConstraintOp constraintOp) |
template<typename Iter > | |
IterDerefWrapper< Iter > | derefIter (const Iter &iter) |
A factory function enabling the construction of a dereferencing iterator utilizing the automated deduction of template parameters. More... | |
std::string | dirName (const std::string &name) |
C++-style dirname. More... | |
long | duration_in_ns (const time_point &start, const time_point &end) |
long | duration_in_us (const time_point &start, const time_point &end) |
bool | endsWith (const std::string &value, const std::string &ending) |
Determines whether the given value string ends with the given end string. More... | |
template<typename T > | |
bool | equal_ptr (const std::unique_ptr< T > &a, const std::unique_ptr< T > &b) |
Compares two values referenced by a pointer where the case where both pointers are null is also considered equivalent. More... | |
template<typename T > | |
bool | equal_ptr (const T *a, const T *b) |
Compares two values referenced by a pointer where the case where both pointers are null is also considered equivalent. More... | |
template<typename Container , typename Comparator > | |
bool | equal_targets (const Container &a, const Container &b, const Comparator &comp) |
A function testing whether two containers are equal with the given Comparator. More... | |
template<typename T , template< typename... > class Container> | |
bool | equal_targets (const Container< std::unique_ptr< T >> &a, const Container< std::unique_ptr< T >> &b) |
A function testing whether two containers of unique pointers are referencing equivalent targets. More... | |
template<typename T , template< typename... > class Container> | |
bool | equal_targets (const Container< T * > &a, const Container< T * > &b) |
A function testing whether two containers of pointers are referencing equivalent targets. More... | |
template<typename Key , typename Value > | |
bool | equal_targets (const std::map< Key, std::unique_ptr< Value >> &a, const std::map< Key, std::unique_ptr< Value >> &b) |
A function testing whether two maps of unique pointers are referencing to equivalent targets. More... | |
std::string | escape (const std::string &inputString) |
std::string | escape (const std::string &inputString, const std::string &needle, const std::string &replacement) |
std::string | escapeJSONstring (const std::string &JSONstr) |
Escape JSON string. More... | |
std::stringstream | execStdOut (char const *cmd) |
std::stringstream | execStdOut (std::string const &cmd) |
void | executeBinary (const std::string &binaryFilename) |
Executes a binary file. More... | |
bool | existDir (const std::string &name) |
Check whether a directory exists in the file system. More... | |
bool | existFile (const std::string &name) |
Check whether a file exists in the file system. More... | |
void | explain (SouffleProgram &prog, bool ncurses) |
template<typename... Args> | |
void | fatal (const char *format, const Args &... args) |
std::string | fileExtension (const std::string &path) |
File extension, with all else removed. More... | |
template<typename A , typename F > | |
std::vector< A > | filter (std::vector< A > xs, F &&f) |
Filter a vector to include certain elements. More... | |
template<typename A , typename F > | |
std::vector< A > | filterNot (std::vector< A > xs, F &&f) |
Filter a vector to exclude certain elements. More... | |
std::string | findTool (const std::string &tool, const std::string &base, const std::string &path) |
IntrinsicFunctors | functorBuiltIn (FunctorOp op) |
IntrinsicFunctors | functorBuiltIn (std::string_view symbol) |
IntrinsicFunctors | functorBuiltIn (std::string_view symbol, const std::vector< TypeAttribute > ¶ms) |
std::stringstream & | genJsonRules (std::stringstream &ss, const std::string &name, size_t maxRows) |
std::stringstream & | genJsonUsage (std::stringstream &ss) |
std::vector< TypeAttribute > | getBinaryConstraintTypes (const BinaryConstraintOp op) |
Get type binary constraint operates on. More... | |
std::string | getCurrentFilename (const std::vector< std::string > &filenames) |
BinaryConstraintOp | getEqConstraint (const std::string &type) |
BinaryConstraintOp | getGreaterEqualConstraint (const std::string &type) |
BinaryConstraintOp | getGreaterThanConstraint (const std::string &type) |
template<typename C > | |
C::value_type | getIf (const C &container, std::function< bool(const typename C::value_type)> pred) |
Returns the first element in a container that satisfies a given predicate, nullptr otherwise. More... | |
souffle::SouffleProgram * | getInstance (const char *p) |
BinaryConstraintOp | getLessEqualConstraint (const std::string &type) |
BinaryConstraintOp | getLessThanConstraint (const std::string &type) |
FunctorOp | getMaxOp (const std::string &type) |
FunctorOp | getMinOp (const std::string &type) |
Given a type of an an attribute it returns the appropriate min/max functor operation. More... | |
template<typename C > | |
C::mapped_type const & | getOr (const C &container, typename C::key_type key, const typename C::mapped_type &defaultValue) |
Get value for a given key; if not found, return default value. More... | |
Lock & | getOutputLock () |
Obtains a reference to the lock synchronizing output operations. More... | |
RelationQualifier | getRelationQualifierFromTag (const RelationTag &tag) |
Get the corresponding RelationQualifier for a valid RelationTag. More... | |
RelationRepresentation | getRelationRepresentationFromTag (const RelationTag &tag) |
Get the corresponding RelationRepresentation for a valid RelationTag. More... | |
TypeAttribute | getTypeAttributeAggregate (const AggregateOp op) |
Get return type of the aggregate. More... | |
std::string | identifier (std::string id) |
Valid C++ identifier, note that this does not ensure the uniqueness of identifiers returned. More... | |
template<typename B , typename A > | |
std::enable_if_t< std::is_base_of_v< A, B >, bool > | isA (A &x) |
template<typename B , typename A > | |
bool | isA (A *x) |
Checks if the object of type Source can be casted to type Destination. More... | |
template<typename B , typename A > | |
bool | isA (const std::unique_ptr< A > &x) |
bool | isEqConstraint (const BinaryConstraintOp constraintOp) |
bool | isExecutable (const std::string &name) |
Check whether a given file exists and it is an executable. More... | |
bool | isFunctorMultiResult (FunctorOp op) |
bool | isGreaterEqual (const BinaryConstraintOp constraintOp) |
bool | isGreaterThan (const BinaryConstraintOp constraintOp) |
bool | isInfixFunctorOp (const BinaryConstraintOp op) |
Determines whether a functor should be written using infix notation (e.g. More... | |
bool | isInfixFunctorOp (const FunctorOp op) |
bool | isInfixFunctorOp (std::string_view symbol) |
Determines whether a functor should be written using infix notation (e.g. More... | |
bool | isLessEqual (const BinaryConstraintOp constraintOp) |
bool | isLessThan (const BinaryConstraintOp constraintOp) |
bool | isNumber (const char *str) |
Check whether a string is a sequence of digits. More... | |
bool | isOrderedBinaryConstraintOp (const BinaryConstraintOp op) |
Determines whether arguments of constraint are orderable. More... | |
bool | isOverloaded (const BinaryConstraintOp constraintOp) |
Utility function, informing whether constraint is overloaded. More... | |
bool | isOverloadedAggregator (const AggregateOp op) |
bool | isOverloadedFunctor (std::string_view symbol) |
Indicate whether a functor is overloaded. More... | |
bool | isPrefix (const std::string &prefix, const std::string &element) |
Determine if one string is a prefix of another. More... | |
bool | isRelationQualifierTag (const RelationTag &tag) |
Check if a given relation tag is a relation qualifier. More... | |
bool | isRelationRepresentationTag (const RelationTag &tag) |
Check if a given relation tag sets a relation representation. More... | |
bool | isStrictIneqConstraint (const BinaryConstraintOp constraintOp) |
bool | isValidFunctorOpArity (std::string_view symbol, size_t arity) |
bool | isWeakIneqConstraint (const BinaryConstraintOp constraintOp) |
template<typename Container , typename Printer , typename Iter = typename Container::const_iterator> | |
detail::joined_sequence< Iter, Printer > | join (const Container &c, const std::string &sep, const Printer &p) |
Creates an object to be forwarded to some output stream for printing the content of containers interspersed by a given separator. More... | |
template<typename Container , typename Iter = typename Container::const_iterator, typename T = typename std::iterator_traits<Iter>::value_type> | |
std::enable_if_t<!JoinShouldDeref< T >, detail::joined_sequence< Iter, detail::print< id< T > > > > | join (const Container &c, const std::string &sep=",") |
Creates an object to be forwarded to some output stream for printing the content of containers interspersed by a given separator. More... | |
template<typename Container , typename Iter = typename Container::const_iterator, typename T = typename std::iterator_traits<Iter>::value_type> | |
std::enable_if_t< JoinShouldDeref< T >, detail::joined_sequence< Iter, detail::print< deref< T > > > > | join (const Container &c, const std::string &sep=",") |
template<typename Iter , typename Printer > | |
detail::joined_sequence< Iter, Printer > | join (const Iter &a, const Iter &b, const std::string &sep, const Printer &p) |
Creates an object to be forwarded to some output stream for printing sequences of elements interspersed by a given separator. More... | |
template<typename Iter , typename T = typename Iter::value_type> | |
detail::joined_sequence< Iter, detail::print< id< T > > > | join (const Iter &a, const Iter &b, const std::string &sep=",") |
Creates an object to be forwarded to some output stream for printing sequences of elements interspersed by a given separator. More... | |
int | main (int argc, char **argv) |
template<typename Iter > | |
range< Iter > | make_range (const Iter &a, const Iter &b) |
A utility function enabling the construction of ranges without explicitly specifying the iterator type. More... | |
template<typename A , typename F > | |
auto | map (const std::vector< A > &xs, F &&f) |
Applies a function to each element of a vector and returns the results. More... | |
template<typename A , typename B = A, typename... Args> | |
Own< A > | mk (Args &&... xs) |
BinaryConstraintOp | negatedConstraintOp (const BinaryConstraintOp op) |
Negated Constraint Operator Each operator requires a negated operator which is necessary for the expansion of complex rule bodies with disjunction and negation. More... | |
template<typename Container , typename UnaryPredicate > | |
bool | none_of (const Container &c, UnaryPredicate p) |
A generic test checking whether all elements within a container satisfy a certain predicate. More... | |
time_point | now () |
std::ostream & | operator<< (std::ostream &os, AggregateOp op) |
std::ostream & | operator<< (std::ostream &os, BinaryConstraintOp x) |
std::ostream & | operator<< (std::ostream &os, FunctorOp op) |
std::ostream & | operator<< (std::ostream &os, RelationQualifier qualifier) |
std::ostream & | operator<< (std::ostream &os, RelationRepresentation representation) |
std::ostream & | operator<< (std::ostream &os, RelationTag qualifier) |
std::ostream & | operator<< (std::ostream &os, TypeAttribute T) |
template<typename T , unsigned size> | |
std::ostream & | operator<< (std::ostream &out, const LRUCache< T, size > &cache) |
std::ostream & | operator<< (std::ostream &out, const RuleBody &body) |
template<std::size_t Arity> | |
RamDomain | pack (RecordTable &recordTab, span< const RamDomain, Arity > tuple) |
helper to convert tuple to record reference for the synthesiser More... | |
template<std::size_t Arity> | |
RamDomain | pack (RecordTable &recordTab, Tuple< RamDomain, Arity > const &tuple) |
helper to convert tuple to record reference for the synthesiser More... | |
std::string | pathJoin (const std::string &first, const std::string &second) |
Join two paths together; note that this does not resolve overlaps or relative paths. More... | |
void | printHTMLGraph (std::ostream &out, const std::string &dotSpec, const std::string &id) |
template<typename To = RamDomain, typename From > | |
To | ramBitCast (From source) |
In C++20 there will be a new way to cast between types by reinterpreting bits (std::bit_cast), but as of January 2020 it is not yet supported. More... | |
RamFloat | RamFloatFromString (const std::string &str, std::size_t *position=nullptr) |
Converts a string to a RamFloat. More... | |
RamSigned | RamSignedFromString (const std::string &str, std::size_t *position=nullptr, const int base=10) |
Converts a string to a RamSigned. More... | |
RamUnsigned | RamUnsignedFromString (const std::string &str, std::size_t *position=nullptr, const int base=10) |
Converts a string to a RamUnsigned. More... | |
std::string | simpleName (const std::string &path) |
File name, with extension removed. More... | |
std::vector< std::string > | split (const std::string &s, char delim, int times=-1) |
utility function to split a string More... | |
std::vector< std::string > | splitString (const std::string &str, char delimiter) |
Splits a string given a delimiter. More... | |
std::string | stringify (const std::string &input) |
Stringify a string using escapes for escape, newline, tab, double-quotes and semicolons. More... | |
std::string | tempFile () |
Generate temporary file. More... | |
TEST (SparseArray, Basic) | |
TEST (SparseArray, Copy) | |
TEST (SparseArray, Find) | |
TEST (SparseArray, Find2) | |
TEST (SparseArray, Iterator) | |
TEST (SparseArray, IteratorStress) | |
TEST (SparseArray, IteratorStress2) | |
TEST (SparseArray, Limits) | |
TEST (SparseArray, LowerBound) | |
TEST (SparseArray, LowerBound2) | |
TEST (SparseArray, MemoryUsage) | |
TEST (SparseArray, Merge) | |
TEST (SparseArray, UpperBound) | |
TEST (SparseArray, UpperBound2) | |
TEST (SparseBitMap, Basic) | |
TEST (SparseBitMap, CopyAndMerge) | |
TEST (SparseBitMap, Find) | |
TEST (SparseBitMap, Iterator) | |
TEST (SparseBitMap, IteratorStress2) | |
TEST (SparseBitMap, Size) | |
TEST (SparseBitMap, Stress) | |
TEST (Trie, Basic) | |
TEST (Trie, BoundaryTest_1D) | |
TEST (Trie, BoundaryTest_1D_2) | |
TEST (Trie, BoundaryTest_1D_Stress) | |
TEST (Trie, BoundaryTest_1D_Stress_Dense) | |
TEST (Trie, BoundaryTest_2D) | |
TEST (Trie, BoundaryTest_2D_2) | |
TEST (Trie, BoundaryTest_2D_Stress) | |
TEST (Trie, BoundaryTest_2D_Stress_Dense) | |
TEST (Trie, BoundaryTest_3D) | |
TEST (Trie, BoundaryTest_3D_2) | |
TEST (Trie, BoundaryTest_3D_Stress) | |
TEST (Trie, Iterator) | |
TEST (Trie, IteratorStress_1D) | |
TEST (Trie, IteratorStress_2D) | |
TEST (Trie, IteratorStress_3D) | |
TEST (Trie, IteratorStress_4D) | |
TEST (Trie, Limits) | |
TEST (Trie, Merge_1D) | |
TEST (Trie, Merge_2D) | |
TEST (Trie, Merge_3D) | |
TEST (Trie, Merge_Bug) | |
TEST (Trie, Merge_Stress) | |
TEST (Trie, Parallel) | |
TEST (Trie, RangeQuery) | |
TEST (Trie, RangeQuery_1D) | |
TEST (Trie, RangeQuery_2D) | |
TEST (Trie, RangeQuery_3D) | |
TEST (Trie, RangeQueryStress) | |
TEST (Trie, Size) | |
template<typename T > | |
detail::multiplying_printer< T > | times (const T &value, unsigned num) |
A utility printing a given value multiple times. More... | |
std::string | toBase64 (const std::string &data) |
BinaryConstraintOp | toBinaryConstraintOp (const std::string &symbol) |
Converts symbolic representation of an operator to the operator. More... | |
char const * | toBinaryConstraintSymbol (const BinaryConstraintOp op) |
Converts operator to its symbolic representation. More... | |
template<typename T > | |
std::vector< T * > | toPtrVector (const std::vector< std::unique_ptr< T >> &v) |
A utility function enabling the creation of a vector of pointers. More... | |
const std::string & | toString (const std::string &str) |
A generic function converting strings into strings (trivial case). More... | |
template<typename T > | |
std::enable_if<!detail::is_printable< T >::value, std::string >::type | toString (const T &) |
A fallback for the to-string function in case an unprintable object is supposed to be printed. More... | |
template<typename T > | |
std::enable_if< detail::is_printable< T >::value, std::string >::type | toString (const T &value) |
A generic function converting arbitrary objects to strings by utilizing their print capability. More... | |
template<typename T > | |
std::vector< T > | toVector () |
A utility function enabling the creation of a vector with a fixed set of elements within a single expression. More... | |
template<typename T , typename... R> | |
std::vector< T > | toVector (const T &first, const R &... rest) |
A utility function enabling the creation of a vector with a fixed set of elements within a single expression. More... | |
std::string | unescape (const std::string &inputString) |
std::string | unescape (const std::string &inputString, const std::string &needle, const std::string &replacement) |
std::string | which (const std::string &name) |
Simple implementation of a which tool. More... | |
Variables | |
constexpr auto | dynamic_extent = tcb::dynamic_extent |
constexpr char | FUNCTOR_INTRINSIC_PREFIX_NEGATE_NAME [] = "negate" |
template<typename T > | |
constexpr bool | isRamType |
template<typename A > | |
constexpr bool | JoinShouldDeref = IsPtrLike<A>::value && !std::is_same_v<A, char const*> |
constexpr RamFloat | MAX_RAM_FLOAT = std::numeric_limits<RamFloat>::max() |
constexpr RamSigned | MAX_RAM_SIGNED = std::numeric_limits<RamSigned>::max() |
constexpr RamUnsigned | MAX_RAM_UNSIGNED = std::numeric_limits<RamUnsigned>::max() |
constexpr RamFloat | MIN_RAM_FLOAT = std::numeric_limits<RamFloat>::lowest() |
constexpr RamSigned | MIN_RAM_SIGNED = std::numeric_limits<RamSigned>::min() |
lower and upper boundaries for the ram types More... | |
constexpr RamUnsigned | MIN_RAM_UNSIGNED = std::numeric_limits<RamUnsigned>::min() |
constexpr block_t | rank_mask = (1ul << split_size) - 1 |
constexpr uint8_t | split_size = 8u |
using souffle::block_t = typedef uint64_t |
Definition at line 47 of file UnionFind.h.
using souffle::copy_const_t = typedef std::conditional_t<std::is_const_v<A>, const B, B> |
Definition at line 150 of file MiscUtil.h.
using souffle::IntrinsicFunctors = typedef std::vector<std::reference_wrapper<const IntrinsicFunctorInfo> > |
Definition at line 129 of file FunctorOps.h.
using souffle::Own = typedef std::unique_ptr<A> |
Definition at line 42 of file ContainerUtil.h.
using souffle::parent_t = typedef uint64_t |
Definition at line 41 of file UnionFind.h.
using souffle::RamDomain = typedef int32_t |
Definition at line 56 of file RamTypes.h.
using souffle::RamFloat = typedef float |
Definition at line 60 of file RamTypes.h.
using souffle::RamSigned = typedef RamDomain |
Definition at line 57 of file RamTypes.h.
using souffle::RamUnsigned = typedef uint32_t |
Definition at line 58 of file RamTypes.h.
using souffle::rank_t = typedef uint8_t |
Definition at line 39 of file UnionFind.h.
using souffle::span = typedef tcb::span<A, E> |
using souffle::time_point = typedef std::chrono::high_resolution_clock::time_point |
Definition at line 85 of file MiscUtil.h.
using souffle::Tuple = typedef std::array<A, N> |
Definition at line 36 of file RamTypes.h.
using souffle::VecOwn = typedef std::vector<Own<A> > |
Definition at line 45 of file ContainerUtil.h.
using souffle::yyscan_t = typedef void* |
Definition at line 48 of file ParserDriver.h.
|
strong |
Types of aggregation functions.
Enumerator | |
---|---|
MAX | |
MIN | |
SUM | |
FMAX | |
FMIN | |
FSUM | |
MEAN | |
UMAX | |
UMIN | |
USUM | |
COUNT |
Definition at line 34 of file AggregateOp.h.
|
strong |
Binary Constraint Operators.
Enumerator | |
---|---|
EQ | |
FEQ | |
NE | |
FNE | |
LT | |
ULT | |
FLT | |
SLT | |
LE | |
ULE | |
FLE | |
SLE | |
GT | |
UGT | |
FGT | |
SGT | |
GE | |
UGE | |
FGE | |
SGE | |
MATCH | |
CONTAINS | |
NOT_MATCH | |
NOT_CONTAINS |
Definition at line 41 of file BinaryConstraintOps.h.
|
strong |
Definition at line 35 of file FunctorOps.h.
|
strong |
Space of qualifiers that a relation can have.
Enumerator | |
---|---|
INPUT | |
OUTPUT | |
PRINTSIZE | |
OVERRIDABLE | |
INLINE | |
MAGIC | |
SUPPRESSED |
Definition at line 45 of file RelationTag.h.
|
strong |
Space of internal representations that a relation can have.
Enumerator | |
---|---|
DEFAULT | |
BRIE | |
BTREE | |
EQREL | |
INFO |
Definition at line 56 of file RelationTag.h.
|
strong |
Space of user-chosen tags that a relation can have.
Enumerator | |
---|---|
INPUT | |
OUTPUT | |
PRINTSIZE | |
OVERRIDABLE | |
INLINE | |
MAGIC | |
SUPPRESSED | |
BRIE | |
BTREE | |
EQREL |
Definition at line 31 of file RelationTag.h.
|
strong |
Enumerator | |
---|---|
Symbol | |
Signed | |
Unsigned | |
Float | |
Record | |
ADT |
Definition at line 34 of file TypeAttribute.h.
|
inline |
|
inline |
Definition at line 74 of file AggregateOp.h.
bool souffle::all_of | ( | const Container & | c, |
UnaryPredicate | p | ||
) |
A generic test checking whether all elements within a container satisfy a certain predicate.
c | the container |
p | the predicate |
Definition at line 110 of file FunctionalUtil.h.
Referenced by souffle::ast::analysis::TypeSet::end(), and functorBuiltIn().
bool souffle::any_of | ( | const Container & | c, |
UnaryPredicate | p | ||
) |
A generic test checking whether any elements within a container satisfy a certain predicate.
c | the container |
p | the predicate |
Definition at line 124 of file FunctionalUtil.h.
Referenced by souffle::ParserDriver::addTag(), all_of(), isValidFunctorOpArity(), and souffle::ast::transform::ResolveAliasesTransformer::removeComplexTermsInAtoms().
std::enable_if_t<std::is_base_of_v<A, B>, copy_const_t<A, B>*> souffle::as | ( | A & | x | ) |
Definition at line 166 of file MiscUtil.h.
auto souffle::as | ( | A * | x | ) |
Helpers for dynamic_cast
ing without having to specify redundant type qualifiers.
e.g. as<AstLiteral>(p)
instead of dynamic_cast<const AstLiteral*>(p.get())
.
Definition at line 157 of file MiscUtil.h.
B* souffle::as | ( | const std::unique_ptr< A > & | x | ) |
Definition at line 171 of file MiscUtil.h.
|
inline |
Definition at line 199 of file FileUtil.h.
|
inline |
Can a string be parsed as RamFloat.
Definition at line 192 of file StringUtil.h.
Referenced by souffle::ExplainProvenanceImpl::queryProcess(), and souffle::ast::analysis::TypeConstraintsAnalysis::visitNumericConstant().
|
inline |
Can a string be parsed as RamSigned.
Souffle (parser, not fact file readers) accepts: hex, binary and base 10. Integer can be negative, in all 3 formats this means that it starts with minus (c++ default semantics).
Definition at line 162 of file StringUtil.h.
Referenced by souffle::ExplainProvenanceImpl::queryProcess(), and souffle::ast::analysis::TypeConstraintsAnalysis::visitNumericConstant().
|
inline |
Can a string be parsed as RamUnsigned.
Souffle accepts: hex, binary and base 10.
Definition at line 179 of file StringUtil.h.
Referenced by souffle::ExplainProvenanceImpl::queryProcess(), and souffle::ast::analysis::TypeConstraintsAnalysis::visitNumericConstant().
bool souffle::castEq | ( | const baseType * | left, |
const baseType * | right | ||
) |
Cast the values, from baseType to toType and compare using ==.
(if casting fails -> return false.)
baseType,initial | Type of values |
toType,type | where equality comparison takes place. |
Definition at line 404 of file ContainerUtil.h.
std::unique_ptr<A> souffle::clone | ( | const A * | node | ) |
Definition at line 108 of file MiscUtil.h.
auto souffle::clone | ( | const std::pair< A, B > & | p | ) |
std::unique_ptr<A> souffle::clone | ( | const std::unique_ptr< A > & | node | ) |
Definition at line 113 of file MiscUtil.h.
auto souffle::clone | ( | const std::vector< A * > & | xs | ) |
Definition at line 172 of file ContainerUtil.h.
Referenced by souffle::ast::BranchInit::BranchInit(), souffle::ast::transform::SemanticCheckerImpl::checkAggregator(), souffle::ram::Program::clone(), souffle::ast::Program::clone(), souffle::ram::transform::CollapseFiltersTransformer::collapseFilters(), souffle::ast::transform::MagicSetTransformer::MagicSetCoreTransformer::createMagicClause(), souffle::ast::transform::DebugReporter::disableTransformers(), souffle::ast::transform::FixpointTransformer::disableTransformers(), souffle::ast::transform::ConditionalTransformer::disableTransformers(), souffle::ram::transform::EliminateDuplicatesTransformer::eliminateDuplicates(), souffle::ram::transform::ExpandFilterTransformer::expandFilters(), souffle::ram::DebugInfo::getChildNodes(), souffle::ram::Exit::getChildNodes(), souffle::ram::LogTimer::getChildNodes(), souffle::ram::Loop::getChildNodes(), souffle::ram::Query::getChildNodes(), souffle::ast::TypeCast::getChildNodes(), souffle::ram::transform::MakeIndexTransformer::getExpressionPair(), souffle::ast::transform::getInlinedArgument(), souffle::ast::transform::getInlinedAtom(), souffle::ram::Negation::getOperand(), souffle::ram::Constraint::getOperator(), souffle::ram::Conjunction::getRHS(), souffle::ast::transform::MaterializeAggregationQueriesTransformer::groundInjectedParameters(), souffle::ram::transform::HoistAggregateTransformer::hoistAggregate(), souffle::ast2ram::AstToRamTranslator::makeSubproofSubroutine(), souffle::RuleBody::negated(), souffle::ast::Negation::Negation(), souffle::ram::ParallelAggregate::ParallelAggregate(), souffle::ram::ParallelChoice::ParallelChoice(), souffle::ram::transform::ParallelTransformer::parallelizeOperations(), souffle::ast::renameAtoms(), souffle::ram::transform::ReorderConditionsTransformer::reorderConditions(), souffle::ram::transform::ReorderFilterBreak::reorderFilterBreak(), souffle::RuleBody::toClauseBodies(), souffle::ast::transform::SimplifyAggregateTargetExpressionTransformer::transform(), souffle::ast::transform::RemoveRedundantSumsTransformer::transform(), souffle::ast::transform::PartitionBodyLiteralsTransformer::transform(), souffle::ast::transform::MagicSetTransformer::MagicSetCoreTransformer::transform(), and souffle::ast::transform::FoldAnonymousRecords::transformClause().
auto souffle::clone | ( | const std::vector< std::unique_ptr< A >> & | xs | ) |
Definition at line 182 of file ContainerUtil.h.
void souffle::compileToBinary | ( | std::string | compileCmd, |
const std::string & | sourceFilename | ||
) |
bool souffle::contains | ( | const C & | container, |
const typename C::value_type & | element | ||
) |
A utility to check generically whether a given element is contained in a given container.
Definition at line 75 of file ContainerUtil.h.
Referenced by souffle::ast::transform::MagicSetTransformer::MagicSetCoreTransformer::addRelevantVariables(), souffle::ParserDriver::addTag(), souffle::ast::transform::MagicSetTransformer::AdornDatabaseTransformer::queueAdornment(), souffle::ast::renameAtoms(), and TEST().
bool souffle::contains | ( | const C & | container, |
const typename C::value_type::first_type & | element | ||
) |
Version of contains specialised for maps.
This workaround is needed because of set container, for which value_type == key_type, which is ambiguous in this context.
Definition at line 92 of file ContainerUtil.h.
bool souffle::contains | ( | const std::set< A > & | container, |
const A & | element | ||
) |
Definition at line 81 of file ContainerUtil.h.
|
inline |
Definition at line 213 of file GraphUtils.h.
|
inline |
Convert aggregator to a give type.
Eg. sum, float → fsum.
Definition at line 133 of file AggregateOp.h.
References CASE_NUMERIC, fatal(), MAX, MIN, and SUM.
|
inline |
Convert Constraint to work with requested type.
Example: constraintOp = LT, toType = Float -> FLT (less-than working on floats).
Definition at line 248 of file BinaryConstraintOps.h.
References COMPARE_CONSTRAINT, COMPARE_CONSTRAINT_FLOAT_OR_RAW, EQ, fatal(), GE, GT, LE, LT, and NE.
|
inline |
Definition at line 173 of file BinaryConstraintOps.h.
|
inline |
Definition at line 159 of file BinaryConstraintOps.h.
IterDerefWrapper<Iter> souffle::derefIter | ( | const Iter & | iter | ) |
A factory function enabling the construction of a dereferencing iterator utilizing the automated deduction of template parameters.
Definition at line 252 of file ContainerUtil.h.
References souffle::SingleValueIterator< T >::end, and souffle::SingleValueIterator< T >::value.
Referenced by souffle::ast::analysis::TypeSet::begin().
|
inline |
|
inline |
Definition at line 99 of file MiscUtil.h.
|
inline |
Definition at line 94 of file MiscUtil.h.
|
inline |
Determines whether the given value string ends with the given end string.
Definition at line 311 of file StringUtil.h.
bool souffle::equal_ptr | ( | const std::unique_ptr< T > & | a, |
const std::unique_ptr< T > & | b | ||
) |
Compares two values referenced by a pointer where the case where both pointers are null is also considered equivalent.
Definition at line 145 of file MiscUtil.h.
bool souffle::equal_ptr | ( | const T * | a, |
const T * | b | ||
) |
Compares two values referenced by a pointer where the case where both pointers are null is also considered equivalent.
Definition at line 130 of file MiscUtil.h.
Referenced by souffle::ram::AbstractLog::apply(), souffle::ram::AbstractConditional::apply(), souffle::ram::AbstractChoice::getChildNodes(), souffle::ram::Exit::print(), souffle::ram::Query::print(), and souffle::ram::NestedOperation::print().
bool souffle::equal_targets | ( | const Container & | a, |
const Container & | b, | ||
const Comparator & | comp | ||
) |
A function testing whether two containers are equal with the given Comparator.
Definition at line 433 of file ContainerUtil.h.
Referenced by souffle::ram::AbstractOperator::apply(), souffle::ast::Term::apply(), souffle::ast::Program::equal(), equal_targets(), and souffle::ast::transform::RemoveRelationCopiesTransformer::removeRelationCopies().
bool souffle::equal_targets | ( | const Container< std::unique_ptr< T >> & | a, |
const Container< std::unique_ptr< T >> & | b | ||
) |
A function testing whether two containers of unique pointers are referencing equivalent targets.
Definition at line 462 of file ContainerUtil.h.
References b, and equal_targets().
bool souffle::equal_targets | ( | const Container< T * > & | a, |
const Container< T * > & | b | ||
) |
A function testing whether two containers of pointers are referencing equivalent targets.
Definition at line 453 of file ContainerUtil.h.
References b, and equal_targets().
bool souffle::equal_targets | ( | const std::map< Key, std::unique_ptr< Value >> & | a, |
const std::map< Key, std::unique_ptr< Value >> & | b | ||
) |
A function testing whether two maps of unique pointers are referencing to equivalent targets.
Definition at line 471 of file ContainerUtil.h.
|
inline |
Definition at line 428 of file StringUtil.h.
|
inline |
|
inline |
|
inline |
Definition at line 274 of file FileUtil.h.
|
inline |
Definition at line 288 of file FileUtil.h.
void souffle::executeBinary | ( | const std::string & | binaryFilename | ) |
|
inline |
Check whether a directory exists in the file system.
Definition at line 84 of file FileUtil.h.
Referenced by main().
|
inline |
Check whether a file exists in the file system.
Definition at line 71 of file FileUtil.h.
Referenced by getCurrentFilename(), and main().
|
inline |
void souffle::fatal | ( | const char * | format, |
const Args &... | args | ||
) |
Definition at line 198 of file MiscUtil.h.
Referenced by convertOverloadedAggregator(), convertOverloadedConstraint(), souffle::interpreter::Engine::execute(), souffle::SouffleProgram::getAllRelations(), souffle::ast::transform::getInlinedArgument(), souffle::ram::analysis::MinIndexSelection::map(), souffle::profile::Reader::Reader(), souffle::WriteCoutPrintSize::WriteCoutPrintSize(), and souffle::WriteCoutPrintSize::writeNullary().
|
inline |
std::vector<A> souffle::filter | ( | std::vector< A > | xs, |
F && | f | ||
) |
Filter a vector to include certain elements.
Definition at line 155 of file FunctionalUtil.h.
Referenced by souffle::ram::transform::CollapseFiltersTransformer::collapseFilters(), souffle::ram::transform::EliminateDuplicatesTransformer::eliminateDuplicates(), souffle::ram::transform::ExpandFilterTransformer::expandFilters(), souffle::ram::transform::ReorderConditionsTransformer::reorderConditions(), souffle::ram::transform::ReorderFilterBreak::reorderFilterBreak(), souffle::ram::transform::ChoiceConversionTransformer::rewriteIndexScan(), souffle::ram::transform::ChoiceConversionTransformer::rewriteScan(), souffle::test::TEST(), TEST(), and souffle::interpreter::NodeGenerator::visitQuery().
std::vector<A> souffle::filterNot | ( | std::vector< A > | xs, |
F && | f | ||
) |
|
inline |
Definition at line 182 of file FileUtil.h.
References absPath().
IntrinsicFunctors souffle::functorBuiltIn | ( | FunctorOp | op | ) |
Definition at line 224 of file FunctorOps.cpp.
Referenced by isFunctorMultiResult(), isInfixFunctorOp(), and souffle::ast::analysis::TypeConstraintsAnalysis::visitFunctor().
IntrinsicFunctors souffle::functorBuiltIn | ( | std::string_view | symbol | ) |
Definition at line 228 of file FunctorOps.cpp.
IntrinsicFunctors souffle::functorBuiltIn | ( | std::string_view | symbol, |
const std::vector< TypeAttribute > & | params | ||
) |
Definition at line 232 of file FunctorOps.cpp.
References all_of().
std::stringstream& souffle::genJsonRules | ( | std::stringstream & | ss, |
const std::string & | name, | ||
size_t | maxRows | ||
) |
Definition at line 339 of file Tui.h.
References souffle::profile::Tools::cleanJsonOut(), souffle::profile::OutputProcessor::getProgramRun(), souffle::profile::Table::getRows(), souffle::profile::OutputProcessor::getVersions(), i, souffle::profile::Tui::out, rul(), souffle::profile::Tui::ruleTable, souffle::Table< T, blockSize >::size(), souffle::profile::Tools::split(), souffle::profile::ss, and toString().
Referenced by genJson().
std::stringstream& souffle::genJsonUsage | ( | std::stringstream & | ss | ) |
Definition at line 468 of file Tui.h.
References souffle::profile::Tools::cleanJsonOut(), souffle::test::count(), souffle::profile::OutputProcessor::getProgramRun(), souffle::profile::Table::getRows(), getUsageStats(), souffle::profile::Tui::out, souffle::profile::Tui::relationTable, souffle::profile::Tools::split(), souffle::profile::ss, str, and usage().
Referenced by genJson().
|
inline |
Get type binary constraint operates on.
Definition at line 439 of file BinaryConstraintOps.h.
References COMPARE_EQUALS, COMPARE_OP, CONTAINS, EQ, GE, GT, LE, LT, MATCH, NE, NOT_CONTAINS, NOT_MATCH, and Symbol.
std::string souffle::getCurrentFilename | ( | const std::vector< std::string > & | filenames | ) |
Definition at line 33 of file SrcLocation.cpp.
References dirName(), and existFile().
|
inline |
Definition at line 74 of file BinaryConstraintOps.h.
|
inline |
Definition at line 94 of file BinaryConstraintOps.h.
|
inline |
Definition at line 114 of file BinaryConstraintOps.h.
C::value_type souffle::getIf | ( | const C & | container, |
std::function< bool(const typename C::value_type)> | pred | ||
) |
Returns the first element in a container that satisfies a given predicate, nullptr otherwise.
Definition at line 101 of file ContainerUtil.h.
Referenced by souffle::ParserDriver::addFunctorDeclaration(), and souffle::ParserDriver::addType().
|
inline |
Definition at line 71 of file CompiledSouffle.h.
References souffle::RelationWrapper< RelType >::Arity.
Referenced by souffle::interpreter::Engine::execute().
|
inline |
Definition at line 84 of file BinaryConstraintOps.h.
|
inline |
Definition at line 104 of file BinaryConstraintOps.h.
FunctorOp souffle::getMaxOp | ( | const std::string & | type | ) |
FunctorOp souffle::getMinOp | ( | const std::string & | type | ) |
Given a type of an an attribute it returns the appropriate min/max functor operation.
Definition at line 267 of file FunctorOps.cpp.
C::mapped_type const& souffle::getOr | ( | const C & | container, |
typename C::key_type | key, | ||
const typename C::mapped_type & | defaultValue | ||
) |
Get value for a given key; if not found, return default value.
Definition at line 111 of file ContainerUtil.h.
Referenced by souffle::ReadFileCSV::ReadFileCSV(), and souffle::WriteFileCSV::writeNextTuple().
|
inline |
Obtains a reference to the lock synchronizing output operations.
Definition at line 568 of file ParallelUtil.h.
Referenced by souffle::WriteCoutCSV::writeNextTuple().
|
inline |
Get the corresponding RelationQualifier for a valid RelationTag.
Definition at line 95 of file RelationTag.h.
|
inline |
Get the corresponding RelationRepresentation for a valid RelationTag.
Definition at line 111 of file RelationTag.h.
|
inline |
|
inline |
Valid C++ identifier, note that this does not ensure the uniqueness of identifiers returned.
Definition at line 387 of file StringUtil.h.
Referenced by souffle::ram::transform::MakeIndexTransformer::getExpressionPair().
std::enable_if_t<std::is_base_of_v<A, B>, bool> souffle::isA | ( | A & | x | ) |
Definition at line 184 of file MiscUtil.h.
bool souffle::isA | ( | A * | x | ) |
Checks if the object of type Source can be casted to type Destination.
Definition at line 179 of file MiscUtil.h.
bool souffle::isA | ( | const std::unique_ptr< A > & | x | ) |
Definition at line 189 of file MiscUtil.h.
References tinyformat::format().
|
inline |
|
inline |
Check whether a given file exists and it is an executable.
Definition at line 97 of file FileUtil.h.
bool souffle::isFunctorMultiResult | ( | FunctorOp | op | ) |
Definition at line 247 of file FunctorOps.cpp.
References functorBuiltIn().
|
inline |
Definition at line 217 of file BinaryConstraintOps.h.
|
inline |
Definition at line 197 of file BinaryConstraintOps.h.
|
inline |
Determines whether a functor should be written using infix notation (e.g.
a + b + c
) or prefix notation (e.g. +(a,b,c)
)
Definition at line 425 of file BinaryConstraintOps.h.
bool souffle::isInfixFunctorOp | ( | const FunctorOp | op | ) |
Definition at line 262 of file FunctorOps.cpp.
References functorBuiltIn(), and isInfixFunctorOp().
bool souffle::isInfixFunctorOp | ( | std::string_view | symbol | ) |
Determines whether a functor should be written using infix notation (e.g.
a + b + c
) or prefix notation (e.g. +(a,b,c)
)
Generally follow Haskell convention: functions w/ symbolic names are infix, otherwise prefix. NOTE: The surface syntax occasionally uses alpha infix operators For backwards compatibility we translate these into symbolic ops.
Definition at line 252 of file FunctorOps.cpp.
References FUNCTOR_INTRINSIC_PREFIX_NEGATE_NAME.
Referenced by isInfixFunctorOp(), and souffle::ast::analysis::TypeConstraintsAnalysis::visitFunctor().
|
inline |
Definition at line 207 of file BinaryConstraintOps.h.
|
inline |
Definition at line 187 of file BinaryConstraintOps.h.
|
inline |
Check whether a string is a sequence of digits.
Definition at line 217 of file StringUtil.h.
Referenced by main().
|
inline |
Determines whether arguments of constraint are orderable.
Definition at line 389 of file BinaryConstraintOps.h.
|
inline |
Utility function, informing whether constraint is overloaded.
Only the signed version's are treated as overloaded (as they are returned by the parser).
Definition at line 231 of file BinaryConstraintOps.h.
|
inline |
Definition at line 116 of file AggregateOp.h.
bool souffle::isOverloadedFunctor | ( | std::string_view | symbol | ) |
Indicate whether a functor is overloaded.
At the moment, the signed versions are treated as representatives (because parser always returns a signed version).
|
inline |
Determine if one string is a prefix of another.
Definition at line 292 of file StringUtil.h.
Referenced by RamUnsignedFromString().
|
inline |
|
inline |
Check if a given relation tag sets a relation representation.
Definition at line 67 of file RelationTag.h.
|
inline |
Definition at line 133 of file BinaryConstraintOps.h.
bool souffle::isValidFunctorOpArity | ( | std::string_view | symbol, |
size_t | arity | ||
) |
Definition at line 240 of file FunctorOps.cpp.
References any_of().
|
inline |
Definition at line 146 of file BinaryConstraintOps.h.
detail::joined_sequence<Iter, Printer> souffle::join | ( | const Container & | c, |
const std::string & | sep, | ||
const Printer & | p | ||
) |
Creates an object to be forwarded to some output stream for printing the content of containers interspersed by a given separator.
For use cases see the test case {util_test.cpp}.
Definition at line 199 of file StreamUtil.h.
std::enable_if_t<!JoinShouldDeref<T>, detail::joined_sequence<Iter, detail::print<id<T> > > > souffle::join | ( | const Container & | c, |
const std::string & | sep = "," |
||
) |
Creates an object to be forwarded to some output stream for printing the content of containers interspersed by a given separator.
For use cases see the test case {util_test.cpp}.
Definition at line 216 of file StreamUtil.h.
References join().
std::enable_if_t<JoinShouldDeref<T>, detail::joined_sequence<Iter, detail::print<deref<T> > > > souffle::join | ( | const Container & | c, |
const std::string & | sep = "," |
||
) |
Definition at line 223 of file StreamUtil.h.
detail::joined_sequence<Iter, Printer> souffle::join | ( | const Iter & | a, |
const Iter & | b, | ||
const std::string & | sep, | ||
const Printer & | p | ||
) |
Creates an object to be forwarded to some output stream for printing sequences of elements interspersed by a given separator.
For use cases see the test case {util_test.cpp}.
Definition at line 175 of file StreamUtil.h.
References b.
Referenced by souffle::ParserDriver::addTag(), souffle::ram::PackRecord::apply(), souffle::ram::AbstractExistenceCheck::apply(), souffle::ram::IO::clone(), souffle::ast::ComponentType::clone(), souffle::ast::Directive::clone(), souffle::RuleBody::constraint(), souffle::synthesiser::DirectRelation::generateTypeStruct(), souffle::synthesiser::IndirectRelation::generateTypeStruct(), souffle::synthesiser::BrieRelation::generateTypeStruct(), souffle::ast::IntrinsicFunctor::getFinalReturnType(), souffle::synthesiser::DirectRelation::getTypeName(), souffle::synthesiser::IndirectRelation::getTypeName(), souffle::synthesiser::BrieRelation::getTypeName(), join(), souffle::ast::QualifiedName::operator<(), std::operator<<(), souffle::ast::Program::print(), souffle::ast::analysis::AlgebraicDataType::Branch::print(), and souffle::ram::analysis::MinIndexSelection::print().
detail::joined_sequence<Iter, detail::print<id<T> > > souffle::join | ( | const Iter & | a, |
const Iter & | b, | ||
const std::string & | sep = "," |
||
) |
Creates an object to be forwarded to some output stream for printing sequences of elements interspersed by a given separator.
For use cases see the test case {util_test.cpp}.
Definition at line 187 of file StreamUtil.h.
int souffle::main | ( | int | argc, |
char ** | argv | ||
) |
Ensure that code generation is enabled if using SWIG interface option.
Definition at line 191 of file main.cpp.
References souffle::Global::config(), existDir(), existFile(), TCB_SPAN_NAMESPACE_NAME::get(), souffle::MainConfig::help(), isNumber(), PACKAGE_VERSION, souffle::MainConfig::processArgs(), RAM_DOMAIN_SIZE, and splitString().
Referenced by main().
range<Iter> souffle::make_range | ( | const Iter & | a, |
const Iter & | b | ||
) |
A utility function enabling the construction of ranges without explicitly specifying the iterator type.
Iter | .. the iterator type |
a | .. the lower boundary |
b | .. the upper boundary |
Definition at line 389 of file ContainerUtil.h.
Referenced by souffle::EquivalenceRelation< Arity >::closure(), souffle::EquivalenceRelation< Arity >::getBoundaries(), and souffle::EquivalenceRelation< Arity >::partition().
auto souffle::map | ( | const std::vector< A > & | xs, |
F && | f | ||
) |
Applies a function to each element of a vector and returns the results.
Definition at line 158 of file ContainerUtil.h.
Referenced by souffle::ast::Program::apply(), souffle::ram::DebugInfo::clone(), souffle::ram::Exit::clone(), souffle::ram::LogTimer::clone(), souffle::ram::Loop::clone(), souffle::ram::Query::clone(), souffle::ram::LogRelationTimer::clone(), souffle::ram::Aggregate::clone(), souffle::ram::UnpackRecord::clone(), souffle::ram::NestedIntrinsicOperator::clone(), souffle::ram::Negation::getChildNodes(), souffle::ram::AbstractExistenceCheck::getChildNodes(), souffle::ram::Conjunction::getChildNodes(), souffle::ram::NestedOperation::getChildNodes(), souffle::ram::Constraint::getChildNodes(), souffle::ram::AbstractChoice::getCondition(), souffle::ram::AbstractLog::getStatement(), souffle::interpreter::ProgInterface::ProgInterface(), TEST(), and souffle::ast::analysis::TypeConstraintsAnalysis::visitFunctor().
Own<A> souffle::mk | ( | Args &&... | xs | ) |
Definition at line 48 of file ContainerUtil.h.
References souffle::reverse< A >::begin(), souffle::reverse< A >::iterable, and souffle::reverse< A >::reverse().
|
inline |
Negated Constraint Operator Each operator requires a negated operator which is necessary for the expansion of complex rule bodies with disjunction and negation.
Definition at line 297 of file BinaryConstraintOps.h.
bool souffle::none_of | ( | const Container & | c, |
UnaryPredicate | p | ||
) |
A generic test checking whether all elements within a container satisfy a certain predicate.
c | the container |
p | the predicate |
Definition at line 138 of file FunctionalUtil.h.
Referenced by any_of().
|
inline |
Definition at line 89 of file MiscUtil.h.
Referenced by souffle::ProfileEventSingleton::makeTimingEvent(), souffle::profile::Reader::processFile(), and souffle::profile::Tui::Tui().
|
inline |
Definition at line 51 of file AggregateOp.h.
|
inline |
Definition at line 70 of file BinaryConstraintOps.h.
std::ostream & souffle::operator<< | ( | std::ostream & | os, |
FunctorOp | op | ||
) |
Definition at line 285 of file FunctorOps.cpp.
|
inline |
Definition at line 139 of file RelationTag.h.
|
inline |
Definition at line 153 of file RelationTag.h.
|
inline |
Definition at line 122 of file RelationTag.h.
|
inline |
Definition at line 44 of file TypeAttribute.h.
std::ostream& souffle::operator<< | ( | std::ostream & | out, |
const LRUCache< T, size > & | cache | ||
) |
Definition at line 142 of file CacheUtil.h.
std::ostream& souffle::operator<< | ( | std::ostream & | out, |
const RuleBody & | body | ||
) |
Definition at line 153 of file ParserUtils.cpp.
RamDomain souffle::pack | ( | RecordTable & | recordTab, |
span< const RamDomain, Arity > | tuple | ||
) |
helper to convert tuple to record reference for the synthesiser
Definition at line 159 of file RecordTable.h.
RamDomain souffle::pack | ( | RecordTable & | recordTab, |
Tuple< RamDomain, Arity > const & | tuple | ||
) |
helper to convert tuple to record reference for the synthesiser
Definition at line 153 of file RecordTable.h.
|
inline |
Join two paths together; note that this does not resolve overlaps or relative paths.
Definition at line 165 of file FileUtil.h.
|
inline |
Definition at line 226 of file GraphUtils.h.
To souffle::ramBitCast | ( | From | source | ) |
In C++20 there will be a new way to cast between types by reinterpreting bits (std::bit_cast), but as of January 2020 it is not yet supported.
Cast a type by reinterpreting its bits. Domain is restricted to Ram Types only. Template takes two types (second type is never necessary because it can be deduced from the argument) The following always holds For type T and a : T ramBitCast<T>(ramBitCast<RamDomain>(a)) == a
Definition at line 87 of file RamTypes.h.
Referenced by souffle::interpreter::Engine::evalAggregate(), souffle::interpreter::Engine::execute(), souffle::ExplainProvenanceImpl::findTuple(), souffle::detail::brie::TrieBase< 1u, Trie< 1u > >::getBoundaries(), souffle::tuple::operator<<(), souffle::ExplainProvenanceImpl::queryProcess(), and souffle::interpreter::test::TEST().
|
inline |
Converts a string to a RamFloat.
Definition at line 93 of file StringUtil.h.
Referenced by souffle::ExplainProvenanceImpl::queryProcess(), and souffle::evaluator::runRange().
|
inline |
Converts a string to a RamSigned.
This procedure has similar behaviour to std::stoi/stoll.
The procedure accepts prefixes 0b (if base = 2) and 0x (if base = 16) If base = 0, the procedure will try to infer the base from the prefix, if present.
Definition at line 51 of file StringUtil.h.
Referenced by souffle::ExplainProvenanceImpl::queryProcess(), and souffle::evaluator::runRange().
|
inline |
Converts a string to a RamUnsigned.
This procedure has similar behaviour to std::stoul/stoull.
The procedure accepts prefixes 0b (if base = 2) and 0x (if base = 16) If base = 0, the procedure will try to infer the base from the prefix, if present.
Definition at line 110 of file StringUtil.h.
References isPrefix(), and str.
Referenced by souffle::ExplainProvenanceImpl::queryProcess(), and souffle::ReadStreamCSV::readRamUnsigned().
|
inline |
|
inline |
utility function to split a string
Definition at line 146 of file ExplainProvenance.h.
Referenced by souffle::Explain::processCommand().
|
inline |
Splits a string given a delimiter.
Definition at line 321 of file StringUtil.h.
Referenced by main(), and souffle::ast::transform::SemanticChecker::transform().
|
inline |
Stringify a string using escapes for escape, newline, tab, double-quotes and semicolons.
Definition at line 334 of file StringUtil.h.
Referenced by souffle::ram::DebugInfo::apply(), souffle::ram::LogTimer::apply(), souffle::ram::LogRelationTimer::apply(), souffle::ram::LogSize::clone(), and souffle::ast2ram::AstToRamTranslator::translateNonRecursiveRelation().
|
inline |
souffle::TEST | ( | SparseArray | , |
Basic | |||
) |
Definition at line 45 of file brie_test.cpp.
souffle::TEST | ( | SparseArray | , |
Copy | |||
) |
Definition at line 246 of file brie_test.cpp.
souffle::TEST | ( | SparseArray | , |
Find | |||
) |
Definition at line 196 of file brie_test.cpp.
souffle::TEST | ( | SparseArray | , |
Find2 | |||
) |
Definition at line 226 of file brie_test.cpp.
souffle::TEST | ( | SparseArray | , |
Iterator | |||
) |
Definition at line 96 of file brie_test.cpp.
References map().
souffle::TEST | ( | SparseArray | , |
IteratorStress | |||
) |
Definition at line 119 of file brie_test.cpp.
References contains(), and n.
souffle::TEST | ( | SparseArray | , |
IteratorStress2 | |||
) |
Definition at line 150 of file brie_test.cpp.
References contains(), and n.
souffle::TEST | ( | SparseArray | , |
Limits | |||
) |
Definition at line 80 of file brie_test.cpp.
souffle::TEST | ( | SparseArray | , |
LowerBound | |||
) |
Definition at line 292 of file brie_test.cpp.
souffle::TEST | ( | SparseArray | , |
LowerBound2 | |||
) |
Definition at line 340 of file brie_test.cpp.
souffle::TEST | ( | SparseArray | , |
MemoryUsage | |||
) |
Definition at line 448 of file brie_test.cpp.
souffle::TEST | ( | SparseArray | , |
Merge | |||
) |
Definition at line 274 of file brie_test.cpp.
References TCB_SPAN_NAMESPACE_NAME::detail::data().
souffle::TEST | ( | SparseArray | , |
UpperBound | |||
) |
Definition at line 368 of file brie_test.cpp.
souffle::TEST | ( | SparseArray | , |
UpperBound2 | |||
) |
Definition at line 420 of file brie_test.cpp.
souffle::TEST | ( | SparseBitMap | , |
Basic | |||
) |
Definition at line 488 of file brie_test.cpp.
souffle::TEST | ( | SparseBitMap | , |
CopyAndMerge | |||
) |
Definition at line 667 of file brie_test.cpp.
souffle::TEST | ( | SparseBitMap | , |
Find | |||
) |
souffle::TEST | ( | SparseBitMap | , |
Iterator | |||
) |
Definition at line 540 of file brie_test.cpp.
souffle::TEST | ( | SparseBitMap | , |
IteratorStress2 | |||
) |
Definition at line 579 of file brie_test.cpp.
References contains(), and n.
souffle::TEST | ( | SparseBitMap | , |
Size | |||
) |
Definition at line 654 of file brie_test.cpp.
souffle::TEST | ( | SparseBitMap | , |
Stress | |||
) |
Definition at line 516 of file brie_test.cpp.
References contains(), and n.
souffle::TEST | ( | Trie | , |
Basic | |||
) |
Definition at line 714 of file brie_test.cpp.
souffle::TEST | ( | Trie | , |
BoundaryTest_1D | |||
) |
souffle::TEST | ( | Trie | , |
BoundaryTest_1D_2 | |||
) |
souffle::TEST | ( | Trie | , |
BoundaryTest_1D_Stress | |||
) |
souffle::TEST | ( | Trie | , |
BoundaryTest_1D_Stress_Dense | |||
) |
souffle::TEST | ( | Trie | , |
BoundaryTest_2D | |||
) |
Definition at line 1023 of file brie_test.cpp.
souffle::TEST | ( | Trie | , |
BoundaryTest_2D_2 | |||
) |
Definition at line 1061 of file brie_test.cpp.
souffle::TEST | ( | Trie | , |
BoundaryTest_2D_Stress | |||
) |
Definition at line 1099 of file brie_test.cpp.
souffle::TEST | ( | Trie | , |
BoundaryTest_2D_Stress_Dense | |||
) |
Definition at line 1138 of file brie_test.cpp.
souffle::TEST | ( | Trie | , |
BoundaryTest_3D | |||
) |
Definition at line 1177 of file brie_test.cpp.
souffle::TEST | ( | Trie | , |
BoundaryTest_3D_2 | |||
) |
Definition at line 1204 of file brie_test.cpp.
souffle::TEST | ( | Trie | , |
BoundaryTest_3D_Stress | |||
) |
Definition at line 1231 of file brie_test.cpp.
souffle::TEST | ( | Trie | , |
Iterator | |||
) |
souffle::TEST | ( | Trie | , |
IteratorStress_1D | |||
) |
Definition at line 776 of file brie_test.cpp.
References TCB_SPAN_NAMESPACE_NAME::detail::data(), EXPECT_FALSE, and EXPECT_TRUE.
souffle::TEST | ( | Trie | , |
IteratorStress_2D | |||
) |
Definition at line 802 of file brie_test.cpp.
References TCB_SPAN_NAMESPACE_NAME::detail::data(), EXPECT_FALSE, and EXPECT_TRUE.
souffle::TEST | ( | Trie | , |
IteratorStress_3D | |||
) |
Definition at line 830 of file brie_test.cpp.
References TCB_SPAN_NAMESPACE_NAME::detail::data(), EXPECT_FALSE, and EXPECT_TRUE.
souffle::TEST | ( | Trie | , |
IteratorStress_4D | |||
) |
Definition at line 859 of file brie_test.cpp.
References TCB_SPAN_NAMESPACE_NAME::detail::data(), EXPECT_FALSE, and EXPECT_TRUE.
souffle::TEST | ( | Trie | , |
Limits | |||
) |
Definition at line 1653 of file brie_test.cpp.
souffle::TEST | ( | Trie | , |
Merge_1D | |||
) |
souffle::TEST | ( | Trie | , |
Merge_2D | |||
) |
Definition at line 1461 of file brie_test.cpp.
souffle::TEST | ( | Trie | , |
Merge_3D | |||
) |
Definition at line 1505 of file brie_test.cpp.
souffle::TEST | ( | Trie | , |
Merge_Bug | |||
) |
Definition at line 1585 of file brie_test.cpp.
souffle::TEST | ( | Trie | , |
Merge_Stress | |||
) |
Definition at line 1557 of file brie_test.cpp.
References b, souffle::Trie< Dim >::begin(), souffle::Trie< Dim >::contains(), souffle::Trie< Dim >::end(), EXPECT_EQ, and i.
souffle::TEST | ( | Trie | , |
Parallel | |||
) |
Definition at line 1680 of file brie_test.cpp.
References filter().
souffle::TEST | ( | Trie | , |
RangeQuery | |||
) |
Definition at line 1274 of file brie_test.cpp.
souffle::TEST | ( | Trie | , |
RangeQuery_1D | |||
) |
souffle::TEST | ( | Trie | , |
RangeQuery_2D | |||
) |
Definition at line 1319 of file brie_test.cpp.
souffle::TEST | ( | Trie | , |
RangeQuery_3D | |||
) |
Definition at line 1347 of file brie_test.cpp.
souffle::TEST | ( | Trie | , |
RangeQueryStress | |||
) |
Definition at line 1387 of file brie_test.cpp.
souffle::TEST | ( | Trie | , |
Size | |||
) |
Definition at line 1618 of file brie_test.cpp.
detail::multiplying_printer<T> souffle::times | ( | const T & | value, |
unsigned | num | ||
) |
A utility printing a given value multiple times.
Definition at line 322 of file StreamUtil.h.
Referenced by souffle::ram::DebugInfo::apply(), souffle::ram::Exit::apply(), souffle::ram::LogTimer::apply(), souffle::ram::Loop::apply(), souffle::ram::Query::apply(), souffle::ram::LogRelationTimer::apply(), souffle::ram::UnpackRecord::apply(), souffle::ram::Clear::Clear(), souffle::ram::LogSize::clone(), souffle::ram::Swap::clone(), souffle::ram::Call::clone(), souffle::ram::Scan::clone(), souffle::ram::Break::clone(), souffle::ram::Filter::clone(), souffle::ram::Extend::clone(), souffle::ram::ParallelChoice::clone(), souffle::ram::IO::clone(), souffle::ram::ParallelAggregate::clone(), and souffle::SparseArray< value_t, 4, merge_op >::upperBound().
|
inline |
Definition at line 173 of file GraphUtils.h.
|
inline |
Converts symbolic representation of an operator to the operator.
Note that this won't tell you which polymorphic overload is actually used.
Definition at line 371 of file BinaryConstraintOps.h.
|
inline |
Converts operator to its symbolic representation.
Definition at line 336 of file BinaryConstraintOps.h.
std::vector<T*> souffle::toPtrVector | ( | const std::vector< std::unique_ptr< T >> & | v | ) |
A utility function enabling the creation of a vector of pointers.
Definition at line 146 of file ContainerUtil.h.
Referenced by souffle::ram::AbstractOperator::AbstractOperator(), souffle::ast::BranchDeclaration::BranchDeclaration(), souffle::ast::Program::getClauses(), souffle::ast::Program::getComponentInstantiations(), souffle::ast::Program::getComponents(), souffle::ast::Program::getDirectives(), souffle::ram::NestedIntrinsicOperator::getFunction(), souffle::ast::Program::getFunctorDeclarations(), souffle::ram::AbstractExistenceCheck::getRelation(), souffle::ram::Project::getRelation(), souffle::ast::Program::getRelations(), souffle::ast::Program::getTypes(), and souffle::ram::PackRecord::PackRecord().
|
inline |
A generic function converting strings into strings (trivial case).
Definition at line 234 of file StringUtil.h.
Referenced by souffle::ParserDriver::addDirective(), souffle::ParserDriver::addFunctorDeclaration(), souffle::ParserDriver::addRelation(), souffle::ParserDriver::addType(), souffle::ast::transform::ComponentChecker::checkComponentNamespaces(), souffle::ast::transform::SemanticCheckerImpl::checkInlining(), souffle::profile::Tui::genJsonRelations(), genJsonRules(), souffle::ast::transform::MaterializeAggregationQueriesTransformer::instantiateUnnamedVariables(), souffle::ast2ram::AstToRamTranslator::nameUnnamedVariables(), TEST(), souffle::ast2ram::AstToRamTranslator::translateNonRecursiveRelation(), verAtoms(), and verRul().
std::enable_if<!detail::is_printable<T>::value, std::string>::type souffle::toString | ( | const T & | ) |
A fallback for the to-string function in case an unprintable object is supposed to be printed.
Definition at line 277 of file StringUtil.h.
std::enable_if<detail::is_printable<T>::value, std::string>::type souffle::toString | ( | const T & | value | ) |
A generic function converting arbitrary objects to strings by utilizing their print capability.
This function is mainly intended for implementing test cases and debugging operations.
Definition at line 265 of file StringUtil.h.
std::vector<T> souffle::toVector | ( | ) |
A utility function enabling the creation of a vector with a fixed set of elements within a single expression.
This is the base case covering empty vectors.
Definition at line 128 of file ContainerUtil.h.
Referenced by TEST().
std::vector<T> souffle::toVector | ( | const T & | first, |
const R &... | rest | ||
) |
A utility function enabling the creation of a vector with a fixed set of elements within a single expression.
This is the step case covering vectors of arbitrary length.
Definition at line 138 of file ContainerUtil.h.
References e.
|
inline |
Definition at line 409 of file StringUtil.h.
|
inline |
|
inline |
|
constexpr |
|
constexpr |
Definition at line 147 of file FunctorOps.h.
Referenced by isInfixFunctorOp().
|
constexpr |
Definition at line 72 of file RamTypes.h.
|
constexpr |
Definition at line 206 of file StreamUtil.h.
Definition at line 103 of file RamTypes.h.
Referenced by souffle::interpreter::Engine::evalAggregate().
Definition at line 97 of file RamTypes.h.
Referenced by souffle::interpreter::Engine::evalAggregate().
|
constexpr |
Definition at line 100 of file RamTypes.h.
Referenced by souffle::interpreter::Engine::evalAggregate().
Definition at line 102 of file RamTypes.h.
Referenced by souffle::interpreter::Engine::evalAggregate().
lower and upper boundaries for the ram types
Definition at line 96 of file RamTypes.h.
Referenced by souffle::interpreter::Engine::evalAggregate().
|
constexpr |
Definition at line 99 of file RamTypes.h.
Referenced by souffle::interpreter::Engine::evalAggregate().
|
constexpr |
Definition at line 49 of file UnionFind.h.
Referenced by souffle::DisjointSet::b2p().
|
constexpr |
Definition at line 44 of file UnionFind.h.
Referenced by souffle::DisjointSet::b2r().