Skip to content

Commit b0096d1

Browse files
Merge branch 'dev'
2 parents 86ad668 + fcdf375 commit b0096d1

File tree

95 files changed

+939
-1637
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+939
-1637
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ Changelog
44
[Unreleased]
55
------------
66

7+
[2.0.2] - 2021-07-22
8+
--------------------
9+
10+
### Changed
11+
12+
- Automated tests updated for some of the more recent changes
13+
- Added an intro to the docs explaining what the project is about
14+
15+
### Fixed
16+
17+
- No warning about unusued PEDL events when used in an unnamed channel
18+
719
[2.0.1] - 2021-07-07
820
--------------------
921

@@ -96,6 +108,7 @@ This is the first version in the changelog, and the last version of SMEDL 1.x.
96108
between the monitoring system and the target system
97109

98110
[Unreleased]: https://gitlab.precise.seas.upenn.edu/smedl/smedl/compare/master...v2.0.1
111+
[2.0.2]: https://gitlab.precise.seas.upenn.edu/smedl/smedl/compare/v2.0.2...v2.0.1
99112
[2.0.1]: https://gitlab.precise.seas.upenn.edu/smedl/smedl/compare/v2.0.1...v2.0.0
100113
[2.0.0]: https://gitlab.precise.seas.upenn.edu/smedl/smedl/compare/v2.0.0...v1.1.1
101114
[1.1.1]: https://gitlab.precise.seas.upenn.edu/smedl/smedl/-/tags/v1.1.1

TODO.md

Lines changed: 0 additions & 162 deletions
This file was deleted.

smedl/about.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"title" : "smedl",
33
"summary" : "A tool for generating software monitors from SMEDL and PEDL definitions.",
44
"uri" : "https://gitlab.precise.seas.upenn.edu/smedl/smedl",
5-
"version" : "2.0.1",
5+
"version" : "2.0.2",
66
"author" : "The Trustees of the University of Pennsylvania",
77
"author_email": "pgeb@seas.upenn.edu",
88
"maintainer": "Dominick C. Pastore",

smedl/codegen/global_wrapper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ int localcreation_{{conn.channel}}_{{target.mon_string}}(SMEDLValue *identities,
224224
}
225225
{% for var, param in target.state_vars.items() %}
226226
{% set array_name = "identities" if param.identity else "params" %}
227-
if (!set_{{target.monitor.name}}_{{var.name}}(new_identities, {{array_name}}[{{param.index}}])) {
227+
if (!set_{{target.monitor.name}}_{{var}}(new_identities, {{array_name}}[{{param.index}}])) {
228228
goto fail;
229229
}
230230
{% endfor %}

smedl/codegen/local_wrapper.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ void free_{{mon.name}}_local_wrapper(void) {
192192
* Return nonzero on success or if monitor already exists, zero on failure.
193193
*
194194
* Parameters:
195-
* identites - An array of SMEDLValue of the proper length for this monitor.
195+
* identities - An array of SMEDLValue of the proper length for this monitor.
196196
* Must be fully specified; no wildcards. */
197197
int create_{{mon.name}}(SMEDLValue *identities) {
198198
{% if mon.params is nonempty %}
@@ -240,7 +240,7 @@ int create_{{mon.name}}(SMEDLValue *identities) {
240240
* failure.
241241
*
242242
* Parameters:
243-
* identites - An array of SMEDLValue of the proper length for this monitor.
243+
* identities - An array of SMEDLValue of the proper length for this monitor.
244244
* value - The value to assign to the state variable. */
245245
{% for var in spec.state_vars.values() %}
246246

@@ -264,7 +264,7 @@ int set_{{mon.name}}_{{var.name}}(SMEDLValue *identities, SMEDLValue value) {
264264
* Return nonzero on success, zero on failure.
265265
*
266266
* Parameters:
267-
* identites - An array of SMEDLValue of the proper length for this monitor.
267+
* identities - An array of SMEDLValue of the proper length for this monitor.
268268
* Wildcards can be represented with a SMEDLValue of type SMEDL_NULL.
269269
* params - An array of SMEDLValue, one for each parameter of the event.
270270
* aux - Extra data that is passed through to exported events unchanged. */

smedl/codegen/local_wrapper.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ void free_{{mon.name}}_local_wrapper(void);
2323
* Return nonzero on success or if monitor already exists, zero on failure.
2424
*
2525
* Parameters:
26-
* identites - An array of SMEDLValue of the proper length for this monitor. */
26+
* identities - An array of SMEDLValue of the proper length for this monitor. */
2727
int create_{{mon.name}}(SMEDLValue *identities);
2828

2929
/* State variable interface - Set the value of the respective state variable.
3030
* Intended to be used right after monitor creation.
3131
* Return nonzero on success, zero if the monitor does not exist.
3232
*
3333
* Parameters:
34-
* identites - An array of SMEDLValue of the proper length for this monitor.
34+
* identities - An array of SMEDLValue of the proper length for this monitor.
3535
* value - The value to assign to the state variable. */
3636
{% for var_name in spec.state_vars.keys() %}
3737
int set_{{mon.name}}_{{var_name}}(SMEDLValue *identities, SMEDLValue value);
@@ -42,7 +42,7 @@ int set_{{mon.name}}_{{var_name}}(SMEDLValue *identities, SMEDLValue value);
4242
* Return nonzero on success, zero on failure.
4343
*
4444
* Parameters:
45-
* identites - An array of SMEDLValue of the proper length for this monitor.
45+
* identities - An array of SMEDLValue of the proper length for this monitor.
4646
* params - An array of SMEDLValue, one for each parameter of the event.
4747
* aux - Extra data that is passed through to exported events unchanged. */
4848
{% for event in spec.imported_events.keys() %}

smedl/codegen/manager.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ char **smedl_argv;
3030
* variables. Sensible defaults are provided, but the target program can
3131
* override them if desired. */
3232
int smedl_argc = 1;
33-
char **smedl_argv = {"{{syncset}}", NULL};
33+
char *smedl_argv_default[] = {"{{syncset}}", NULL};
34+
char **smedl_argv = smedl_argv_default;
3435
{% endif %}
3536

3637
/* Manager event queue */
@@ -136,9 +137,9 @@ int process_queue(void) {
136137
{% if conn.source_mon is not none %}
137138
{% for param_type in conn.source_mon.params %}
138139
{% if param_type is sameas SmedlType.STRING %}
139-
free(identites[{{loop.index0}}].v.s);
140+
free(identities[{{loop.index0}}].v.s);
140141
{% elif param_type is sameas SmedlType.OPAQUE %}
141-
free(identites[{{loop.index0}}].v.o.data);
142+
free(identities[{{loop.index0}}].v.o.data);
142143
{% endif %}
143144
{% endfor %}
144145
{% endif %}
@@ -157,9 +158,9 @@ int process_queue(void) {
157158
{% if conn.source_mon is not none %}
158159
{% for param_type in conn.source_mon.params %}
159160
{% if param_type is sameas SmedlType.STRING %}
160-
free(identites[{{loop.index0}}].v.s);
161+
free(identities[{{loop.index0}}].v.s);
161162
{% elif param_type is sameas SmedlType.OPAQUE %}
162-
free(identites[{{loop.index0}}].v.o.data);
163+
free(identities[{{loop.index0}}].v.o.data);
163164
{% endif %}
164165
{% endfor %}
165166
{% endif %}

smedl/codegen/mon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ if (!smedl_replace_string(&mon->s.{{a.var}}, {{expression(a.expr)}})) {
168168
/* malloc fail */
169169
return 0;
170170
}
171-
{%- elif spec.state_vars[a.var].type is sameas SmedlType.STRING %}
171+
{%- elif spec.state_vars[a.var].type is sameas SmedlType.OPAQUE %}
172172
if (!smedl_replace_opaque(&mon->s.{{a.var}}, {{expression(a.expr)}})) {
173173
/* malloc fail */
174174
return 0;

smedl/codegen/static/smedl_types.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ int smedl_assign_opaque(SMEDLOpaque *dest, SMEDLOpaque src) {
142142
if (tmp == NULL && src.size != 0) {
143143
return 0;
144144
}
145-
(*dest).data = tmp;
146-
(*dest).size = src.size;
145+
dest->data = tmp;
146+
dest->size = src.size;
147147
if (src.size != 0) {
148-
memcpy((*dest).data, src.data, src.size);
148+
memcpy(dest->data, src.data, src.size);
149149
}
150150
return 1;
151151
}
@@ -170,11 +170,11 @@ int smedl_replace_opaque(SMEDLOpaque *dest, SMEDLOpaque src) {
170170
if (tmp == NULL && src.size != 0) {
171171
return 0;
172172
}
173-
free((*dest).data);
174-
(*dest).data = tmp;
175-
(*dest).size = src.size;
173+
free(dest->data);
174+
dest->data = tmp;
175+
dest->size = src.size;
176176
if (src.size != 0) {
177-
memcpy((*dest).data, src.data, src.size);
177+
memcpy(dest->data, src.data, src.size);
178178
}
179179
return 1;
180180
}

0 commit comments

Comments
 (0)