Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes from cpp branch #222

Open
wants to merge 75 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
4ffebb7
Update: Allow to use C++20 compiler for compilation
patham9 Jun 12, 2022
d7e04eb
Merge branch 'master' into cpp
patham9 Jun 14, 2022
c19ac2c
Merge branch 'master' into cpp
patham9 Jun 14, 2022
4abb6cf
Merge branch 'master' into cpp
patham9 Jun 14, 2022
abb8bdc
Merge branch 'master' into cpp
patham9 Jun 14, 2022
d9d3a93
Merge branch 'master' into cpp
patham9 Jun 14, 2022
aadd006
Merge branch 'master' into cpp
patham9 Jun 17, 2022
876c953
Merge branch 'master' into cpp
patham9 Aug 13, 2022
c80790a
Update: Decision.c: compatibility with Cpp
patham9 Aug 13, 2022
fb0e622
Merge branch 'master' into cpp
patham9 Sep 9, 2022
3c6f64c
Merge branch 'master' into cpp
patham9 Sep 12, 2022
0aa42b0
Merge branch 'master' into cpp
patham9 Sep 27, 2022
dd92e94
Update: changes for cpp compatibility
patham9 Nov 3, 2022
a746d91
Update: merge from master
patham9 Nov 4, 2022
0bde4f5
Merge branch 'master' into cpp
patham9 Nov 23, 2022
cbb84ea
Merge branch 'master' into cpp
patham9 Nov 23, 2022
44170d6
Merge branch 'master' into cpp
patham9 Dec 9, 2022
a87531c
Update: merged
patham9 Jun 13, 2023
cddcca0
Merge branch 'master' into cpp
patham9 Jul 31, 2023
df2136a
Merge branch 'master' into cpp
patham9 Sep 21, 2023
167c54f
Update: merge conflict resolved
patham9 Nov 9, 2023
809f0f8
Merge branch 'master' into cpp
patham9 Nov 16, 2023
d04b381
Update: updates to make C++ compiler happy
patham9 Dec 5, 2023
aeb7edd
Merge branch 'master' into cpp
patham9 Dec 6, 2023
972a042
Merge branch 'master' into cpp
patham9 Dec 6, 2023
79ec36b
Merge branch 'master' into cpp
patham9 Dec 7, 2023
25bed87
Merge branch 'master' into cpp
patham9 Dec 7, 2023
d0f3963
Update: make C++ compiler happy
patham9 Dec 7, 2023
94e129c
Update: make cpp compiler happy
patham9 Dec 7, 2023
ddf5a87
Merge branch 'master' into cpp
patham9 Dec 8, 2023
ca0d3ef
Merge branch 'master' into cpp
patham9 Dec 8, 2023
76cf9a7
Merge branch 'master' into cpp
patham9 Dec 8, 2023
1b078a1
Merge branch 'master' into cpp
patham9 Dec 8, 2023
a692930
Update: merge from master
patham9 Dec 9, 2023
b24a41e
Merge branch 'master' into cpp
patham9 Dec 9, 2023
2f30425
Merge branch 'master' into cpp
patham9 Dec 10, 2023
95d90be
Merge branch 'master' into cpp
patham9 Dec 10, 2023
339b505
Merge branch 'master' into cpp
patham9 Jan 14, 2024
0b71fd0
Merge branch 'master' into cpp
patham9 Jan 14, 2024
d66fe5b
Merge branch 'master' into cpp
patham9 Jan 14, 2024
2e4b4c6
Update: added the missing introduction of variables for functional eq…
patham9 Jan 16, 2024
a2a0d80
Merge branch 'master' into cpp
patham9 Jun 25, 2024
20d241f
Merge branch 'master' into cpp
patham9 Jul 16, 2024
80e1f0c
Merge branch 'master' into cpp
patham9 Aug 13, 2024
1717da4
Merge branch 'master' into cpp
patham9 Aug 15, 2024
2f236f3
Merge branch 'master' into cpp
patham9 Aug 23, 2024
c06ee9c
Merge branch 'master' into cpp
patham9 Aug 27, 2024
71b8452
Merge branch 'master' into cpp
patham9 Aug 30, 2024
9c7c3dd
Merge branch 'master' into cpp
patham9 Aug 30, 2024
dff403f
Merge branch 'master' into cpp
patham9 Aug 30, 2024
b243195
Merge branch 'master' into cpp
patham9 Sep 5, 2024
56048bd
Merge branch 'master' into cpp
patham9 Sep 5, 2024
6a46d76
Merge branch 'master' into cpp
patham9 Sep 6, 2024
bb12cfe
Merge branch 'master' into cpp
patham9 Sep 16, 2024
605b7bf
Merge branch 'master' into cpp
patham9 Sep 17, 2024
ab1c228
Merge branch 'master' into cpp
patham9 Sep 17, 2024
068eb6b
Update: conflict fix
patham9 Sep 18, 2024
fb48872
Update: conflict resolved
patham9 Sep 19, 2024
4e7f449
Update: conflict resolved
patham9 Sep 20, 2024
05ecd9b
Merge branch 'master' into cpp
patham9 Sep 20, 2024
cbd717d
Merge branch 'master' into cpp
patham9 Sep 21, 2024
3511841
Merge branch 'master' into cpp
patham9 Sep 25, 2024
df3b230
Merge branch 'master' into cpp
patham9 Sep 27, 2024
887844b
Merge branch 'master' into cpp
patham9 Sep 28, 2024
dc26f17
Merge branch 'master' into cpp
patham9 Oct 1, 2024
27b1d63
Merge branch 'master' into cpp
patham9 Oct 3, 2024
60a052e
Merge branch 'master' into cpp
patham9 Oct 9, 2024
f889262
Merge branch 'master' into cpp
patham9 Oct 14, 2024
b4a8eda
Merge branch 'master' into cpp
patham9 Oct 14, 2024
01cc60e
Merge branch 'master' into cpp
patham9 Oct 14, 2024
1939364
Merge branch 'master' into cpp
patham9 Oct 15, 2024
fa105b1
Merge branch 'master' into cpp
patham9 Oct 16, 2024
11bf831
Merge branch 'master' into cpp
patham9 Oct 16, 2024
e6e8e8d
Merge branch 'master' into cpp
patham9 Oct 16, 2024
abcf7e7
Merge branch 'master' into cpp
patham9 Oct 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ set -e
Str=`ls src/*.c src/NetworkNAR/*.c | xargs`
echo $Str
echo "Compilation started:"
BaseFlags="-flto -g -pthread -lpthread -D_POSIX_C_SOURCE=199506L -pedantic -std=c99 -g3 -O3 $Str -lm -oNAR"
NoWarn="-Wno-unknown-pragmas -Wno-tautological-compare -Wno-dollar-in-identifier-extension -Wno-unused-parameter -Wno-unused-variable -Wno-strict-prototypes"
gcc $@ -DSTAGE=1 -Wall -Wextra -Wformat-security $NoWarn $BaseFlags
BaseFlags="-flto -g -pthread -lpthread -D_POSIX_C_SOURCE=199506L -std=c++17 -g3 -O3 $Str -lm -oNAR"
NoWarn="-Wno-unknown-pragmas -Wno-tautological-compare -Wno-dollar-in-identifier-extension -Wno-unused-parameter -Wno-unused-variable -Wno-write-strings -Wno-missing-field-initializers -Wno-narrowing -Wno-strict-prototypes -Wno-c++20-compat -Wno-missing-braces"
g++ $@ -DSTAGE=1 -Wall -Wextra -Wformat-security $NoWarn $BaseFlags
echo "First stage done, generating RuleTable.c now, and finishing compilation."
./NAR NAL_GenerateRuleTable > ./src/RuleTable.c
gcc $@ -mfpmath=sse -msse2 -DSTAGE=2 $NoWarn $BaseFlags src/RuleTable.c || (echo "Error with SSE, hence compiling without SSE:" && gcc $@ -DSTAGE=2 $NoWarn $BaseFlags src/RuleTable.c)
g++ $@ -mfpmath=sse -msse2 -DSTAGE=2 $NoWarn $BaseFlags src/RuleTable.c || (echo "Error with SSE, hence compiling without SSE:" && g++ $@ -DSTAGE=2 $NoWarn $BaseFlags src/RuleTable.c)
echo "Done."
4 changes: 2 additions & 2 deletions src/Cycle.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static long conceptProcessID3 = 0; //avoids duplicate concept processing
while(chain != NULL) \
{ \
Concept *CONCEPT = chain->c; \
chain = chain->next; \
chain = (ConceptChainElement*) chain->next; \
if(CONCEPT != NULL && CONCEPT->processID != conceptProcessID) \
{ \
CONCEPT->processID = conceptProcessID; \
Expand Down Expand Up @@ -790,7 +790,7 @@ void Cycle_RelativeForgetting(long currentTime)
//Apply concept forgetting:
for(int i=0; i<concepts.itemsAmount; i++)
{
Concept *c = concepts.items[i].address;
Concept *c = (Concept*) concepts.items[i].address;
c->priority *= CONCEPT_DURABILITY;
concepts.items[i].priority = Usage_usefulness(c->usage, currentTime); //how concept memory is sorted by, by concept usefulness
}
Expand Down
12 changes: 6 additions & 6 deletions src/Decision.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,13 @@ static Decision Decision_ConsiderNegativeOutcomes(Decision decision)
//1. discount decision based on negative outcomes via revision
for(int i=0; i<concepts.itemsAmount; i++)
{
Concept *c = concepts.items[i].address;
Concept *c = (Concept*) concepts.items[i].address;
if(c->goal_spike.type != EVENT_TYPE_DELETED && (currentTime - c->goal_spike.occurrenceTime) < NEG_GOAL_AGE_MAX)
{
for(int j=0; j<c->precondition_beliefs[decision.operationID[0]].itemsAmount; j++)
{
Implication imp = c->precondition_beliefs[decision.operationID[0]].array[j];
Concept *prec = imp.sourceConcept;
Concept *prec = (Concept*) imp.sourceConcept;
if(prec->belief_spike.type != EVENT_TYPE_DELETED && currentTime - prec->belief_spike.occurrenceTime < EVENT_BELIEF_DISTANCE)
{
Term imp_subject = Term_ExtractSubterm(&imp.term, 1);
Expand Down Expand Up @@ -353,7 +353,7 @@ static Decision Decision_ConsiderImplication(long currentTime, Event *goal, Impl
puts("");
)
//now look at how much the precondition is fulfilled
Concept *prec = imp->sourceConcept;
Concept *prec = (Concept*) imp->sourceConcept;
Event *precondition = &prec->belief_spike; //a. :|:
if(precondition != NULL)
{
Expand Down Expand Up @@ -440,7 +440,7 @@ Decision Decision_BestCandidate(Concept *goalconcept, Event *goal, long currentT
Term left_side = Narsese_GetPreconditionWithoutOp(&left_side_with_op); //might be something like <#1 --> a>
for(int cmatch_k=0; cmatch_k<concepts.itemsAmount; cmatch_k++)
{
Concept *cmatch = concepts.items[cmatch_k].address;
Concept *cmatch = (Concept*) concepts.items[cmatch_k].address;
if(!Variable_hasVariable(&cmatch->term, true, true, true) && cmatch->belief_spike.type != EVENT_TYPE_DELETED)
{
Substitution subs2 = Variable_UnifyWithAnalogy(cmatch->belief_spike.truth, &left_side, &cmatch->term);
Expand Down Expand Up @@ -558,7 +558,7 @@ void Decision_Anticipate(int operationID, Term opTerm, bool declarative, long cu
assert(operationID >= 0 && operationID <= OPERATIONS_MAX, "Wrong operation id, did you inject an event manually?");
for(int j=0; j<concepts.itemsAmount; j++)
{
Concept *postc = concepts.items[j].address;
Concept *postc = (Concept*) concepts.items[j].address;
Implication valid_implications[TABLE_SIZE*2] = {0};
int k=0;
if(!declarative)
Expand Down Expand Up @@ -593,7 +593,7 @@ void Decision_Anticipate(int operationID, Term opTerm, bool declarative, long cu
for(int h=0; h<k; h++)
{
Implication imp = valid_implications[h]; //(&/,a,op) =/> b.
Concept *current_prec = imp.sourceConcept;
Concept *current_prec = (Concept*) imp.sourceConcept;
Event *precondition = &current_prec->belief_spike;
if(precondition != NULL && precondition->type != EVENT_TYPE_DELETED)
{
Expand Down
12 changes: 6 additions & 6 deletions src/HashTable.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void *HashTable_Get(HashTable *hashtable, void *key)
{
HASH_TYPE keyhash = hashtable->hash(key) % hashtable->buckets;
VMItem *item = hashtable->HT[keyhash];
for(; item!=NULL; item=item->next)
for(; item!=NULL; item=(VMItem*) item->next)
{
if(hashtable->equal(item->key, key))
{
Expand Down Expand Up @@ -56,11 +56,11 @@ void HashTable_Set(HashTable *hashtable, void *key, void *value)
if(item->next == NULL)
break;
else
item=item->next;
item=(VMItem*) item->next;
}
}
//Retrieve recycled VMItem from the stack and set its value to c
VMItem *popped = Stack_Pop(&hashtable->VMStack);
VMItem *popped = (VMItem*) Stack_Pop(&hashtable->VMStack);
popped->value = value;
popped->key = key;
popped->next = NULL;
Expand Down Expand Up @@ -90,15 +90,15 @@ void HashTable_Delete(HashTable *hashtable, void *key)
return;
}
//If there is more than 1 item, we have to remove the item from chain, relinking previous to next
for(; item!=NULL; previous=item, item=item->next)
for(; item!=NULL; previous=item, item=(VMItem*) item->next)
{
//item found?
if(hashtable->equal(item->key, key))
{
//remove item and return
if(previous == NULL)
{
hashtable->HT[keyhash] = item->next;
hashtable->HT[keyhash] = (VMItem*) item->next;
}
else
{
Expand Down Expand Up @@ -140,7 +140,7 @@ int HashTable_MaximumChainLength(HashTable *hashtable)
{
VMItem *item = hashtable->HT[i];
int cnt = 0;
for(;item != NULL; item=item->next, cnt++);
for(;item != NULL; item=(VMItem*) item->next, cnt++);
maxlen = MAX(maxlen, cnt);
}
return maxlen;
Expand Down
12 changes: 6 additions & 6 deletions src/InvertedAtomIndex.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void InvertedAtomIndex_AddConcept(Term term, Concept *c)
ConceptChainElement *elem = invertedAtomIndex[atom];
if(elem == NULL)
{
ConceptChainElement *newElem = Stack_Pop(&conceptChainElementStack); //new item
ConceptChainElement *newElem = (ConceptChainElement*) Stack_Pop(&conceptChainElementStack); //new item
newElem->c = c;
invertedAtomIndex[atom] = newElem;
}
Expand All @@ -69,10 +69,10 @@ void InvertedAtomIndex_AddConcept(Term term, Concept *c)
goto NEXT_ATOM;
}
previous = elem;
elem = elem->next;
elem = (ConceptChainElement*) elem->next;
}
//ok, we can add it as previous->next
ConceptChainElement *newElem = Stack_Pop(&conceptChainElementStack); //new item
ConceptChainElement *newElem = (ConceptChainElement*) Stack_Pop(&conceptChainElementStack); //new item
newElem->c = c;
previous->next = newElem;
}
Expand All @@ -96,7 +96,7 @@ void InvertedAtomIndex_RemoveConcept(Term term, Concept *c)
{
if(previous == NULL) //item was the initial chain element, let the next element be the initial now
{
invertedAtomIndex[atom] = elem->next;
invertedAtomIndex[atom] = (ConceptChainElement*) elem->next;
}
else //item was within the chain, relink the previous to the next of elem
{
Expand All @@ -110,7 +110,7 @@ void InvertedAtomIndex_RemoveConcept(Term term, Concept *c)
goto NEXT_ATOM;
}
previous = elem;
elem = elem->next;
elem = (ConceptChainElement*) elem->next;
}
}
NEXT_ATOM:;
Expand All @@ -134,7 +134,7 @@ void InvertedAtomIndex_Print()
fputs(" -> ", stdout);
Narsese_PrintTerm(&c->term);
puts("");
elem = elem->next;
elem = (ConceptChainElement*) elem->next;
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/Memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void Memory_INIT()

Concept *Memory_FindConceptByTerm(Term *term)
{
return HashTable_Get(&HTconcepts, term);
return (Concept*) HashTable_Get(&HTconcepts, term);
}

Concept* Memory_Conceptualize(Term *term, long currentTime)
Expand All @@ -116,7 +116,7 @@ Concept* Memory_Conceptualize(Term *term, long currentTime)
PriorityQueue_Push_Feedback feedback = PriorityQueue_Push(&concepts, 1);
if(feedback.added)
{
recycleConcept = feedback.addedItem.address;
recycleConcept = (Concept*) feedback.addedItem.address;
//if something was evicted in the adding process delete from hashmap first
if(feedback.evicted)
{
Expand Down Expand Up @@ -159,7 +159,7 @@ static bool Memory_containsEvent(PriorityQueue *queue, Event *event)
{
for(int i=0; i<queue->itemsAmount; i++)
{
if(Event_Equal(event, queue->items[i].address))
if(Event_Equal(event, (Event*) queue->items[i].address))
{
return true;
}
Expand Down Expand Up @@ -227,8 +227,8 @@ bool Memory_addCyclingEvent(Event *e, double priority, long currentTime, int lay
PriorityQueue_Push_Feedback feedback = PriorityQueue_Push(priority_queue, priority);
if(feedback.added)
{
Event *toRecycle = feedback.addedItem.address;
*toRecycle = *e;
Event *toRecyle = (Event*) feedback.addedItem.address;
*toRecyle = *e;
return true;
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/NAR.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void NAR_AddInputNarsese2(char *narsese_sentence, bool queryCommand, double answ
fflush(stdout);
for(int i=0; i<concepts.itemsAmount; i++)
{
Concept *c = concepts.items[i].address;
Concept *c = (Concept*) concepts.items[i].address;
//compare the predicate of implication, or if it's not an implication, the term
Term toCompare = isImplication ? Term_ExtractSubterm(&term, 2) : term;
Truth unused = (Truth) {0};
Expand Down
3 changes: 2 additions & 1 deletion src/NetworkNAR/UDPNAR.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ void* Reasoner_Thread_Run(void* timestep_address)
pthread_mutex_unlock(&nar_mutex);
if(timestep >= 0)
{
nanosleep((struct timespec[]){{0, timestep}}, NULL); //POSIX sleep for timestep nanoseconds
struct timespec ts = {0, timestep};
nanosleep(&ts, NULL); //wait another timestep
}
}
return NULL;
Expand Down
6 changes: 3 additions & 3 deletions src/Shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ int Shell_ProcessInput(char *line)
puts("//*concepts");
for(int i=0; i<concepts.itemsAmount; i++)
{
Concept *c = concepts.items[i].address;
Concept *c = (Concept*) concepts.items[i].address;
assert(c != NULL, "Concept is null");
fputs("//", stdout);
Narsese_PrintTerm(&c->term);
Expand Down Expand Up @@ -213,7 +213,7 @@ int Shell_ProcessInput(char *line)
puts("//*cycling_belief_events");
for(int i=0; i<cycling_belief_events.itemsAmount; i++)
{
Event *e = cycling_belief_events.items[i].address;
Event *e = (Event*) cycling_belief_events.items[i].address;
assert(e != NULL, "Event is null");
Narsese_PrintTerm(&e->term);
printf(": { \"priority\": %f, \"time\": %ld } ", cycling_belief_events.items[i].priority, e->occurrenceTime);
Expand All @@ -229,7 +229,7 @@ int Shell_ProcessInput(char *line)
{
for(int i=0; i<cycling_goal_events[layer].itemsAmount; i++)
{
Event *e = cycling_goal_events[layer].items[i].address;
Event *e = (Event*) cycling_goal_events[layer].items[i].address;
assert(e != NULL, "Event is null");
Narsese_PrintTerm(&e->term);
printf(": {\"priority\": %f, \"time\": %ld } ", cycling_goal_events[layer].items[i].priority, e->occurrenceTime);
Expand Down
2 changes: 1 addition & 1 deletion src/Stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void Stats_Print(long currentTime)
double Stats_averageConceptPriority = 0.0;
for(int i=0; i<concepts.itemsAmount; i++)
{
Concept *c = concepts.items[i].address;
Concept *c = (Concept*) concepts.items[i].address;
Stats_averageConceptPriority += c->priority;
}
Stats_averageConceptPriority /= (double) CONCEPTS_MAX;
Expand Down
6 changes: 3 additions & 3 deletions src/system_tests/Alien_Test.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@
*/

bool NAR_Alien_Left_executed = false;
Feedback NAR_Alien_Left()
Feedback NAR_Alien_Left(Term args)
{
puts("NAR invoked left");
NAR_Alien_Left_executed = true;
return (Feedback) {0};
}
bool NAR_Alien_Right_executed = false;
Feedback NAR_Alien_Right()
Feedback NAR_Alien_Right(Term args)
{
puts("NAR invoked right");
NAR_Alien_Right_executed = true;
return (Feedback) {0};
}
bool NAR_Alien_Shoot_executed = false;
Feedback NAR_Alien_Shoot()
Feedback NAR_Alien_Shoot(Term args)
{
puts("NAR invoked shoot");
NAR_Alien_Shoot_executed = true;
Expand Down
4 changes: 2 additions & 2 deletions src/system_tests/Bandrobot_Test.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ Feedback NAR_Bandrobot_Right(Term args)
return (Feedback) {0};
}
bool NAR_Bandrobot_Pick_executed = false;
Feedback NAR_Bandrobot_Pick()
Feedback NAR_Bandrobot_Pick(Term args)
{
NAR_Bandrobot_Pick_executed = true;
return (Feedback) {0};
}
bool NAR_Bandrobot_Drop_executed = false;
Feedback NAR_Bandrobot_Drop()
Feedback NAR_Bandrobot_Drop(Term args)
{
NAR_Bandrobot_Drop_executed = true;
return (Feedback) {0};
Expand Down
4 changes: 2 additions & 2 deletions src/system_tests/Cartpole_Test.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ static double angle = -3.1415/2.0;
static double angle_velocity = 0.0;
static double position = 0.0;
static double max_angle_velocity = 0.3;
static Feedback NAR_CP_Left()
static Feedback NAR_CP_Left(Term args)
{
double reverse = angle > 0 ? 1 : -1;
//if(position > 0.0 && position < 1.0)
Expand All @@ -13,7 +13,7 @@ static Feedback NAR_CP_Left()
velocity -= 0.1;
return (Feedback) {0};
}
static Feedback NAR_CP_Right()
static Feedback NAR_CP_Right(Term args)
{
double reverse = angle > 0 ? 1 : -1;
//if(position > 0.0 && position < 1.0)
Expand Down
4 changes: 2 additions & 2 deletions src/system_tests/Follow_Test.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
*/

bool NAR_Follow_Test_Left_executed = false;
Feedback NAR_Follow_Test_Left()
Feedback NAR_Follow_Test_Left(Term args)
{
puts("left executed by NAR");
NAR_Follow_Test_Left_executed = true;
return (Feedback) {0};
}
bool NAR_Follow_Test_Right_executed = false;
Feedback NAR_Follow_Test_Right()
Feedback NAR_Follow_Test_Right(Term args)
{
puts("right executed by NAR");
NAR_Follow_Test_Right_executed = true;
Expand Down
4 changes: 2 additions & 2 deletions src/system_tests/Multistep_Test.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
*/

bool NAR_Lightswitch_GotoSwitch_executed = false;
Feedback NAR_Lightswitch_GotoSwitch()
Feedback NAR_Lightswitch_GotoSwitch(Term args)
{
NAR_Lightswitch_GotoSwitch_executed = true;
puts("NAR invoked goto switch");
return (Feedback) {0};
}
bool NAR_Lightswitch_ActivateSwitch_executed = false;
Feedback NAR_Lightswitch_ActivateSwitch()
Feedback NAR_Lightswitch_ActivateSwitch(Term args)
{
NAR_Lightswitch_ActivateSwitch_executed = true;
puts("NAR invoked activate switch");
Expand Down
6 changes: 3 additions & 3 deletions src/system_tests/Pong2_Test.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@
*/

bool NAR_Pong_Left_executed = false;
Feedback NAR_Pong_Left()
Feedback NAR_Pong_Left(Term args)
{
NAR_Pong_Left_executed = true;
return (Feedback) {0};
}
bool NAR_Pong_Right_executed = false;
Feedback NAR_Pong_Right()
Feedback NAR_Pong_Right(Term args)
{
NAR_Pong_Right_executed = true;
return (Feedback) {0};
}
bool NAR_Pong_Stop_executed = false;
Feedback NAR_Pong_Stop()
Feedback NAR_Pong_Stop(Term args)
{
NAR_Pong_Stop_executed = true;
return (Feedback) {0};
Expand Down
Loading