| chigraph master Systems programming language written for beginners in LLVM

FunctionValidator.hpp
Go to the documentation of this file.
1
4 #pragma once
5
6 #ifndef CHI_FUNCTION_VALIDATOR_HPP
7 #define CHI_FUNCTION_VALIDATOR_HPP
8
9 #include "chi/Fwd.hpp"
10
11 namespace chi {
12
17
22 Result validateFunction(const GraphFunction& func);
23
27 Result validateFunctionConnectionsAreTwoWay(const GraphFunction& func);
28
32 Result validateFunctionNodeInputs(const GraphFunction& func);
33
37 Result validateFunctionExecOutputs(const GraphFunction& func);
38
42 Result validateFunctionEntryType(const GraphFunction& func);
43
47 Result validateFunctionExitTypes(const GraphFunction& func);
48
52 Result validateFunctionMainSignature(const GraphFunction& func);
53
55 } // namespace chi
56
57 #endif // CHI_FUNCTION_VALIDATOR_HPP
Fwd.hpp
Forward declares all the chigraph data types.
chi::validateFunctionExecOutputs
Result validateFunctionExecOutputs(const GraphFunction &func)
Make sure nodes have an output connection.
Definition: FunctionValidator.cpp:222
chi::validateFunctionEntryType
Result validateFunctionEntryType(const GraphFunction &func)
Make sure the function entry type aligns with the function type.
Definition: FunctionValidator.cpp:249
chi::validateFunctionConnectionsAreTwoWay
Result validateFunctionConnectionsAreTwoWay(const GraphFunction &func)
Make sure that connections connect back and that they have the same types.
Definition: FunctionValidator.cpp:31
chi::validateFunction
Result validateFunction(const GraphFunction &func)
Validate that a function is compilable.
Definition: FunctionValidator.cpp:15
chi::validateFunctionNodeInputs
Result validateFunctionNodeInputs(const GraphFunction &func)
Make sure that nodes are called before their outputs are used.
Definition: FunctionValidator.cpp:198
chi::validateFunctionMainSignature
Result validateFunctionMainSignature(const GraphFunction &func)
Make sure it&#39;s a valid signautre for a main function.
Definition: FunctionValidator.cpp:310
chi::validateFunctionExitTypes
Result validateFunctionExitTypes(const GraphFunction &func)
Make sure the function exit types align with the function type.
Definition: FunctionValidator.cpp:281
chi
The namespace where chigraph lives.
Definition: BitcodeParser.hpp:12