zuspec-arl-eval 0.0.7.13253972717rc0__cp39-cp39-manylinux_2_34_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zsp_arl_eval/__build_num__.py +1 -0
- zsp_arl_eval/__init__.py +20 -0
- zsp_arl_eval/__version__.py +3 -0
- zsp_arl_eval/core.cpython-39-x86_64-linux-gnu.so +0 -0
- zsp_arl_eval/core.pxd +133 -0
- zsp_arl_eval/decl.pxd +140 -0
- zsp_arl_eval/libzsp-arl-eval.so +0 -0
- zsp_arl_eval/pkginfo.py +24 -0
- zsp_arl_eval/share/include/EvalBackendClosure.h +76 -0
- zsp_arl_eval/share/include/EvalThreadData.h +48 -0
- zsp_arl_eval/share/include/zsp/arl/eval/FactoryExt.h +27 -0
- zsp_arl_eval/share/include/zsp/arl/eval/IBuiltinFuncInfo.h +77 -0
- zsp_arl_eval/share/include/zsp/arl/eval/IComponentTreeData.h +49 -0
- zsp_arl_eval/share/include/zsp/arl/eval/IEval.h +126 -0
- zsp_arl_eval/share/include/zsp/arl/eval/IEvalBackend.h +82 -0
- zsp_arl_eval/share/include/zsp/arl/eval/IEvalContext.h +162 -0
- zsp_arl_eval/share/include/zsp/arl/eval/IEvalContextActivity.h +52 -0
- zsp_arl_eval/share/include/zsp/arl/eval/IEvalContextInt.h +65 -0
- zsp_arl_eval/share/include/zsp/arl/eval/IEvalFunctionData.h +40 -0
- zsp_arl_eval/share/include/zsp/arl/eval/IEvalListener.h +59 -0
- zsp_arl_eval/share/include/zsp/arl/eval/IEvalStackFrame.h +50 -0
- zsp_arl_eval/share/include/zsp/arl/eval/IEvalThread.h +94 -0
- zsp_arl_eval/share/include/zsp/arl/eval/IEvalThreadEventListener.h +42 -0
- zsp_arl_eval/share/include/zsp/arl/eval/IEvalThreadId.h +41 -0
- zsp_arl_eval/share/include/zsp/arl/eval/IEvalValProvider.h +52 -0
- zsp_arl_eval/share/include/zsp/arl/eval/IFactory.h +90 -0
- zsp_arl_eval/share/include/zsp/arl/eval/IModelAddressSpace.h +46 -0
- zsp_arl_eval/share/include/zsp/arl/eval/IModelEvaluator.h +42 -0
- zsp_arl_eval/share/include/zsp/arl/eval/impl/EvalBackendBase.h +76 -0
- zsp_arl_eval/share/include/zsp/arl/eval/impl/EvalListenerBase.h +59 -0
- zsp_arl_eval/share/include/zsp/arl/eval/impl/TaskEvalGetLval.h +148 -0
- zuspec_arl_eval-0.0.7.13253972717rc0.dist-info/LICENSE +201 -0
- zuspec_arl_eval-0.0.7.13253972717rc0.dist-info/METADATA +27 -0
- zuspec_arl_eval-0.0.7.13253972717rc0.dist-info/RECORD +37 -0
- zuspec_arl_eval-0.0.7.13253972717rc0.dist-info/WHEEL +5 -0
- zuspec_arl_eval-0.0.7.13253972717rc0.dist-info/entry_points.txt +2 -0
- zuspec_arl_eval-0.0.7.13253972717rc0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IEval.h
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2023 Matthew Ballance and Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at:
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Created on:
|
|
19
|
+
* Author:
|
|
20
|
+
*/
|
|
21
|
+
#pragma once
|
|
22
|
+
#include "vsc/dm/IModelVal.h"
|
|
23
|
+
#include "vsc/dm/impl/ValRef.h"
|
|
24
|
+
#include "vsc/dm/impl/UP.h"
|
|
25
|
+
#include "zsp/arl/eval/IEvalValProvider.h"
|
|
26
|
+
|
|
27
|
+
namespace zsp {
|
|
28
|
+
namespace arl {
|
|
29
|
+
namespace eval {
|
|
30
|
+
|
|
31
|
+
enum class EvalFlags {
|
|
32
|
+
NoFlags = 0,
|
|
33
|
+
AllFlags = 0xFF,
|
|
34
|
+
Complete = (1 << 0),
|
|
35
|
+
Error = (1 << 1),
|
|
36
|
+
Break = (1 << 2),
|
|
37
|
+
Continue = (1 << 3),
|
|
38
|
+
Return = (1 << 4)
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
static inline EvalFlags operator | (const EvalFlags lhs, const EvalFlags rhs) {
|
|
42
|
+
return static_cast<EvalFlags>(
|
|
43
|
+
static_cast<uint32_t>(lhs) | static_cast<uint32_t>(rhs));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
static inline EvalFlags operator & (const EvalFlags lhs, const EvalFlags rhs) {
|
|
47
|
+
return static_cast<EvalFlags>(
|
|
48
|
+
static_cast<uint32_t>(lhs) & static_cast<uint32_t>(rhs));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static inline EvalFlags operator ~ (const EvalFlags lhs) {
|
|
52
|
+
return static_cast<EvalFlags>(~static_cast<uint32_t>(lhs));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
class IEval;
|
|
56
|
+
using IEvalUP=vsc::dm::UP<IEval>;
|
|
57
|
+
class IEval :
|
|
58
|
+
public virtual IEvalValProvider {
|
|
59
|
+
public:
|
|
60
|
+
|
|
61
|
+
virtual ~IEval() { }
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @brief Performs some work.
|
|
65
|
+
*
|
|
66
|
+
* @return true - if more work remains
|
|
67
|
+
* @return false - if work is complete
|
|
68
|
+
*/
|
|
69
|
+
virtual int32_t eval() = 0;
|
|
70
|
+
|
|
71
|
+
virtual int32_t getIdx() = 0;
|
|
72
|
+
|
|
73
|
+
virtual void setIdx(int32_t idx) = 0;
|
|
74
|
+
|
|
75
|
+
virtual IEval *clone() = 0;
|
|
76
|
+
|
|
77
|
+
virtual EvalFlags getFlags() const = 0;
|
|
78
|
+
|
|
79
|
+
virtual bool hasFlags(EvalFlags flags) const = 0;
|
|
80
|
+
|
|
81
|
+
virtual void setFlags(EvalFlags flags) = 0;
|
|
82
|
+
|
|
83
|
+
virtual void clrFlags(EvalFlags flags=EvalFlags::AllFlags) = 0;
|
|
84
|
+
|
|
85
|
+
virtual const vsc::dm::ValRef &getResult() const = 0;
|
|
86
|
+
|
|
87
|
+
virtual void setResult(
|
|
88
|
+
const vsc::dm::ValRef &r,
|
|
89
|
+
EvalFlags flags=EvalFlags::Complete) = 0;
|
|
90
|
+
|
|
91
|
+
virtual void setError(const char *fmt, ...) = 0;
|
|
92
|
+
|
|
93
|
+
#ifdef UNDEFINED
|
|
94
|
+
/**
|
|
95
|
+
* @brief Moves the result, clearing the result here
|
|
96
|
+
*
|
|
97
|
+
* @return EvalResult&
|
|
98
|
+
*/
|
|
99
|
+
virtual vsc::dm::ValRef &moveResult() = 0;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* @brief Sets the result, taking ownership of value data
|
|
103
|
+
*
|
|
104
|
+
* @param r
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
virtual void setVoidResult() = 0;
|
|
108
|
+
|
|
109
|
+
virtual void setError(const std::string &msg) = 0;
|
|
110
|
+
|
|
111
|
+
virtual bool haveError() const = 0;
|
|
112
|
+
|
|
113
|
+
virtual const std::string &getError() const = 0;
|
|
114
|
+
|
|
115
|
+
virtual void clrResult(bool clr_err=false) = 0;
|
|
116
|
+
|
|
117
|
+
virtual bool haveResult() const = 0;
|
|
118
|
+
#endif
|
|
119
|
+
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
} /* namespace eval */
|
|
123
|
+
} /* namespace arl */
|
|
124
|
+
} /* namespace zsp */
|
|
125
|
+
|
|
126
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IEvalBackend.h
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2023 Matthew Ballance and Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at:
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Created on:
|
|
19
|
+
* Author:
|
|
20
|
+
*/
|
|
21
|
+
#pragma once
|
|
22
|
+
#include <vector>
|
|
23
|
+
#include "zsp/arl/eval/IEvalThread.h"
|
|
24
|
+
#include "zsp/arl/eval/IEvalThreadId.h"
|
|
25
|
+
#include "zsp/arl/dm/IDataTypeAction.h"
|
|
26
|
+
#include "zsp/arl/dm/IDataTypeFunction.h"
|
|
27
|
+
#include "zsp/arl/dm/IModelFieldAction.h"
|
|
28
|
+
|
|
29
|
+
namespace zsp {
|
|
30
|
+
namespace arl {
|
|
31
|
+
namespace eval {
|
|
32
|
+
|
|
33
|
+
class IEvalContext;
|
|
34
|
+
class IEvalBackend;
|
|
35
|
+
using IEvalBackendUP=vsc::dm::UP<IEvalBackend>;
|
|
36
|
+
class IEvalBackend {
|
|
37
|
+
public:
|
|
38
|
+
|
|
39
|
+
virtual ~IEvalBackend() { }
|
|
40
|
+
|
|
41
|
+
virtual void init(IEvalContext *ctxt) = 0;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @brief Start
|
|
45
|
+
*
|
|
46
|
+
* @param threads
|
|
47
|
+
*/
|
|
48
|
+
virtual void enterThreads(
|
|
49
|
+
const std::vector<IEvalThread *> &threads) = 0;
|
|
50
|
+
|
|
51
|
+
virtual void enterThread(IEvalThread *thread) = 0;
|
|
52
|
+
|
|
53
|
+
virtual void leaveThread(IEvalThread *thread) = 0;
|
|
54
|
+
|
|
55
|
+
virtual void leaveThreads(
|
|
56
|
+
const std::vector<IEvalThread *> &threads) = 0;
|
|
57
|
+
|
|
58
|
+
virtual void enterAction(
|
|
59
|
+
IEvalThread *thread,
|
|
60
|
+
dm::IDataTypeAction *action_t,
|
|
61
|
+
const vsc::dm::ValRef &action_v) = 0;
|
|
62
|
+
|
|
63
|
+
virtual void leaveAction(
|
|
64
|
+
IEvalThread *thread,
|
|
65
|
+
dm::IDataTypeAction *action_t,
|
|
66
|
+
const vsc::dm::ValRef &action_v) = 0;
|
|
67
|
+
|
|
68
|
+
virtual void callFuncReq(
|
|
69
|
+
IEvalThread *thread,
|
|
70
|
+
dm::IDataTypeFunction *func_t,
|
|
71
|
+
const std::vector<vsc::dm::ValRef> ¶ms
|
|
72
|
+
) = 0;
|
|
73
|
+
|
|
74
|
+
virtual void emitMessage(const std::string &msg) = 0;
|
|
75
|
+
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
} /* namespace eval */
|
|
79
|
+
} /* namespace arl */
|
|
80
|
+
} /* namespace zsp */
|
|
81
|
+
|
|
82
|
+
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IEvalContext.h
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2023 Matthew Ballance and Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at:
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Created on:
|
|
19
|
+
* Author:
|
|
20
|
+
*/
|
|
21
|
+
#pragma once
|
|
22
|
+
#include <functional>
|
|
23
|
+
#include <vector>
|
|
24
|
+
#include "dmgr/IDebugMgr.h"
|
|
25
|
+
#include "pyapi-compat-if/IPyEval.h"
|
|
26
|
+
#include "vsc/dm/IModelValOp.h"
|
|
27
|
+
#include "zsp/arl/eval/IBuiltinFuncInfo.h"
|
|
28
|
+
#include "zsp/arl/eval/IEval.h"
|
|
29
|
+
#include "zsp/arl/eval/IEvalBackend.h"
|
|
30
|
+
#include "zsp/arl/eval/IEvalListener.h"
|
|
31
|
+
#include "zsp/arl/eval/IEvalFunctionData.h"
|
|
32
|
+
#include "zsp/arl/eval/IEvalValProvider.h"
|
|
33
|
+
#include "zsp/arl/dm/IContext.h"
|
|
34
|
+
#include "zsp/arl/dm/IDataTypeFunction.h"
|
|
35
|
+
#include "zsp/arl/dm/IDataTypeFunctionImport.h"
|
|
36
|
+
#include "zsp/arl/dm/IModelFieldExecutor.h"
|
|
37
|
+
|
|
38
|
+
namespace zsp {
|
|
39
|
+
namespace arl {
|
|
40
|
+
namespace eval {
|
|
41
|
+
|
|
42
|
+
class IEvalResult;
|
|
43
|
+
|
|
44
|
+
enum class EvalContextFunc {
|
|
45
|
+
Write8,
|
|
46
|
+
Write16,
|
|
47
|
+
Write32,
|
|
48
|
+
Write64,
|
|
49
|
+
Read8,
|
|
50
|
+
Read16,
|
|
51
|
+
Read32,
|
|
52
|
+
Read64,
|
|
53
|
+
RegWrite,
|
|
54
|
+
RegWriteMasked,
|
|
55
|
+
RegWriteVal,
|
|
56
|
+
RegWriteValMasked,
|
|
57
|
+
RegRead,
|
|
58
|
+
RegReadVal,
|
|
59
|
+
RegGroupSetHandle,
|
|
60
|
+
Print,
|
|
61
|
+
NumFunctions
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
enum class EvalContextFlags {
|
|
65
|
+
NoFlags = 0,
|
|
66
|
+
SkipExecBody = (1 << 0)
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
class IEvalContext;
|
|
70
|
+
using IEvalContextUP=vsc::dm::UP<IEvalContext>;
|
|
71
|
+
class IEvalContext {
|
|
72
|
+
public:
|
|
73
|
+
|
|
74
|
+
virtual ~IEvalContext() { }
|
|
75
|
+
|
|
76
|
+
virtual void setContextFlags(EvalContextFlags flags) = 0;
|
|
77
|
+
|
|
78
|
+
virtual bool hasContextFlags(EvalContextFlags flags) = 0;
|
|
79
|
+
|
|
80
|
+
virtual int32_t eval() = 0;
|
|
81
|
+
|
|
82
|
+
virtual dm::IContext *ctxt() const = 0;
|
|
83
|
+
|
|
84
|
+
virtual EvalFlags getFlags() const = 0;
|
|
85
|
+
|
|
86
|
+
virtual bool hasFlags(EvalFlags flags) const = 0;
|
|
87
|
+
|
|
88
|
+
virtual void setFlags(EvalFlags flags) = 0;
|
|
89
|
+
|
|
90
|
+
virtual void clrFlags(EvalFlags flags=EvalFlags::AllFlags) = 0;
|
|
91
|
+
|
|
92
|
+
virtual const vsc::dm::ValRef &getResult() const = 0;
|
|
93
|
+
|
|
94
|
+
virtual void setResult(
|
|
95
|
+
const vsc::dm::ValRef &r,
|
|
96
|
+
EvalFlags flags=EvalFlags::Complete) = 0;
|
|
97
|
+
|
|
98
|
+
virtual void setError(const char *fmt, ...) = 0;
|
|
99
|
+
|
|
100
|
+
virtual IEvalBackend *getBackend() const = 0;
|
|
101
|
+
|
|
102
|
+
virtual void setBackend(IEvalBackend *b, bool owned=false) = 0;
|
|
103
|
+
|
|
104
|
+
virtual dm::IModelFieldComponentRoot *getRootComponent() = 0;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Return just the global solve functions
|
|
108
|
+
*
|
|
109
|
+
* Valid after construction
|
|
110
|
+
*/
|
|
111
|
+
virtual const std::vector<dm::IDataTypeFunction *> &getSolveFunctions() const = 0;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Return just the target functions
|
|
115
|
+
*
|
|
116
|
+
* Valid after construction
|
|
117
|
+
*/
|
|
118
|
+
virtual const std::vector<dm::IDataTypeFunction *> &getTargetFunctions() const = 0;
|
|
119
|
+
|
|
120
|
+
virtual void setFunctionData(
|
|
121
|
+
dm::IDataTypeFunction *func_t,
|
|
122
|
+
IEvalFunctionData *data
|
|
123
|
+
) = 0;
|
|
124
|
+
|
|
125
|
+
virtual void addListener(IEvalListener *l) = 0;
|
|
126
|
+
|
|
127
|
+
virtual void callListener(const std::function<void (IEvalListener *)> &f) = 0;
|
|
128
|
+
|
|
129
|
+
virtual dm::IDataTypeFunction *getFunction(EvalContextFunc func) = 0;
|
|
130
|
+
|
|
131
|
+
virtual vsc::dm::ValRefInt mkValRefInt(
|
|
132
|
+
int64_t value,
|
|
133
|
+
bool is_signed,
|
|
134
|
+
int32_t width) = 0;
|
|
135
|
+
|
|
136
|
+
virtual vsc::dm::IModelVal *mkModelValS(int64_t v=0, int32_t w=32) = 0;
|
|
137
|
+
|
|
138
|
+
virtual vsc::dm::IModelVal *mkModelValU(uint64_t v=0, int32_t w=32) = 0;
|
|
139
|
+
|
|
140
|
+
virtual vsc::dm::IModelValOp *getModelValOp() = 0;
|
|
141
|
+
|
|
142
|
+
virtual IEvalStackFrame *mkStackFrame(int32_t n_vars) = 0;
|
|
143
|
+
|
|
144
|
+
virtual pyapi::PyEvalObj *getPyModule(dm::IPyImport *imp) = 0;
|
|
145
|
+
|
|
146
|
+
virtual pyapi::IPyEval *getPyEval() = 0;
|
|
147
|
+
|
|
148
|
+
virtual bool addPyModule(
|
|
149
|
+
const std::string &name,
|
|
150
|
+
pyapi::PyEvalObj *mod) = 0;
|
|
151
|
+
|
|
152
|
+
virtual dmgr::IDebugMgr *getDebugMgr() const = 0;
|
|
153
|
+
|
|
154
|
+
virtual vsc::dm::ValRefInt getAddrHandleValue(const vsc::dm::ValRef &addr_h) = 0;
|
|
155
|
+
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
} /* namespace eval */
|
|
159
|
+
} /* namespace arl */
|
|
160
|
+
} /* namespace zsp */
|
|
161
|
+
|
|
162
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IEvalContextActivity.h
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2023 Matthew Ballance and Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at:
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Created on:
|
|
19
|
+
* Author:
|
|
20
|
+
*/
|
|
21
|
+
#pragma once
|
|
22
|
+
#include "zsp/arl/eval/IEvalContext.h"
|
|
23
|
+
|
|
24
|
+
namespace zsp {
|
|
25
|
+
namespace arl {
|
|
26
|
+
namespace eval {
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class IEvalContextActivity : public virtual IEvalContext {
|
|
31
|
+
public:
|
|
32
|
+
|
|
33
|
+
virtual ~IEvalContextActivity() { }
|
|
34
|
+
|
|
35
|
+
virtual int32_t buildCompTree() = 0;
|
|
36
|
+
|
|
37
|
+
virtual int32_t initCompTree() = 0;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Returns the executor objects
|
|
41
|
+
*
|
|
42
|
+
* Valid after initializing the component tree
|
|
43
|
+
*/
|
|
44
|
+
virtual const std::vector<dm::IModelFieldExecutor *> &getExecutors() const = 0;
|
|
45
|
+
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
} /* namespace eval */
|
|
49
|
+
} /* namespace arl */
|
|
50
|
+
} /* namespace zsp */
|
|
51
|
+
|
|
52
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IEvalContextInt.h
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2023 Matthew Ballance and Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at:
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Created on:
|
|
19
|
+
* Author:
|
|
20
|
+
*/
|
|
21
|
+
#pragma once
|
|
22
|
+
#include <vector>
|
|
23
|
+
#include "zsp/arl/eval/IBuiltinFuncInfo.h"
|
|
24
|
+
#include "zsp/arl/eval/IEvalThread.h"
|
|
25
|
+
#include "zsp/arl/eval/IEvalThreadId.h"
|
|
26
|
+
#include "zsp/arl/dm/IDataTypeFunction.h"
|
|
27
|
+
#include "zsp/arl/dm/IModelFieldAction.h"
|
|
28
|
+
#include "zsp/arl/eval/IEvalContext.h"
|
|
29
|
+
|
|
30
|
+
namespace zsp {
|
|
31
|
+
namespace arl {
|
|
32
|
+
namespace eval {
|
|
33
|
+
|
|
34
|
+
enum class CoreValOpsE {
|
|
35
|
+
AddrSpaceTransparent,
|
|
36
|
+
AddrHandle,
|
|
37
|
+
Number
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class IEvalContextInt : public virtual IEvalContext {
|
|
42
|
+
public:
|
|
43
|
+
|
|
44
|
+
virtual ~IEvalContextInt() { }
|
|
45
|
+
|
|
46
|
+
virtual void callFuncReq(
|
|
47
|
+
IEvalThread *thread,
|
|
48
|
+
dm::IDataTypeFunction *func_t,
|
|
49
|
+
const std::vector<vsc::dm::ValRef> ¶ms
|
|
50
|
+
) = 0;
|
|
51
|
+
|
|
52
|
+
virtual IEvalValProvider *getValProvider(int32_t id) = 0;
|
|
53
|
+
|
|
54
|
+
virtual IBuiltinFuncInfo *getBuiltinFuncInfo(
|
|
55
|
+
dm::IDataTypeFunction *func) = 0;
|
|
56
|
+
|
|
57
|
+
virtual vsc::dm::IValOps *getValOps(CoreValOpsE kind) = 0;
|
|
58
|
+
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
} /* namespace eval */
|
|
62
|
+
} /* namespace arl */
|
|
63
|
+
} /* namespace zsp */
|
|
64
|
+
|
|
65
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IEvalFunctionData.h
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2023 Matthew Ballance and Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at:
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Created on:
|
|
19
|
+
* Author:
|
|
20
|
+
*/
|
|
21
|
+
#pragma once
|
|
22
|
+
|
|
23
|
+
namespace zsp {
|
|
24
|
+
namespace arl {
|
|
25
|
+
namespace eval {
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class IEvalFunctionData {
|
|
30
|
+
public:
|
|
31
|
+
|
|
32
|
+
virtual ~IEvalFunctionData() { }
|
|
33
|
+
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
} /* namespace eval */
|
|
37
|
+
} /* namespace arl */
|
|
38
|
+
} /* namespace zsp */
|
|
39
|
+
|
|
40
|
+
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IEvalListener.h
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2023 Matthew Ballance and Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at:
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Created on:
|
|
19
|
+
* Author:
|
|
20
|
+
*/
|
|
21
|
+
#pragma once
|
|
22
|
+
#include <vector>
|
|
23
|
+
#include "zsp/arl/eval/IEvalThread.h"
|
|
24
|
+
#include "zsp/arl/dm/IModelFieldAction.h"
|
|
25
|
+
|
|
26
|
+
namespace zsp {
|
|
27
|
+
namespace arl {
|
|
28
|
+
namespace eval {
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class IEvalListener {
|
|
33
|
+
public:
|
|
34
|
+
|
|
35
|
+
virtual ~IEvalListener() { }
|
|
36
|
+
|
|
37
|
+
virtual void enterThreads(const std::vector<IEvalThread *> &threads) = 0;
|
|
38
|
+
|
|
39
|
+
virtual void enterThread(IEvalThread *t) = 0;
|
|
40
|
+
|
|
41
|
+
virtual void enterAction(
|
|
42
|
+
IEvalThread *t,
|
|
43
|
+
dm::IModelFieldAction *action) = 0;
|
|
44
|
+
|
|
45
|
+
virtual void leaveAction(
|
|
46
|
+
IEvalThread *t,
|
|
47
|
+
dm::IModelFieldAction *action) = 0;
|
|
48
|
+
|
|
49
|
+
virtual void leaveThread(IEvalThread *t) = 0;
|
|
50
|
+
|
|
51
|
+
virtual void leaveThreads(const std::vector<IEvalThread *> &threads) = 0;
|
|
52
|
+
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
} /* namespace eval */
|
|
56
|
+
} /* namespace arl */
|
|
57
|
+
} /* namespace zsp */
|
|
58
|
+
|
|
59
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IEvalStackFrame.h
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2023 Matthew Ballance and Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at:
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Created on:
|
|
19
|
+
* Author:
|
|
20
|
+
*/
|
|
21
|
+
#pragma once
|
|
22
|
+
#include "vsc/dm/impl/ValRef.h"
|
|
23
|
+
#include "vsc/dm/impl/UP.h"
|
|
24
|
+
#include "vsc/dm/IModelField.h"
|
|
25
|
+
|
|
26
|
+
namespace zsp {
|
|
27
|
+
namespace arl {
|
|
28
|
+
namespace eval {
|
|
29
|
+
|
|
30
|
+
class IEvalStackFrame;
|
|
31
|
+
using IEvalStackFrameUP=vsc::dm::UP<IEvalStackFrame>;
|
|
32
|
+
class IEvalStackFrame {
|
|
33
|
+
public:
|
|
34
|
+
|
|
35
|
+
virtual ~IEvalStackFrame() { }
|
|
36
|
+
|
|
37
|
+
virtual const vsc::dm::ValRef &getVariable(uint32_t idx) = 0;
|
|
38
|
+
|
|
39
|
+
virtual void setVariable(uint32_t idx, vsc::dm::ValRef &var) = 0;
|
|
40
|
+
|
|
41
|
+
virtual int32_t getNumVariables() = 0;
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
} /* namespace eval */
|
|
47
|
+
} /* namespace arl */
|
|
48
|
+
} /* namespace zsp */
|
|
49
|
+
|
|
50
|
+
|