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

Sspace #61

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Sspace #61

wants to merge 2 commits into from

Conversation

shaversion
Copy link
Collaborator

No description provided.

Copy link
Member

@MksmOrlov MksmOrlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Use clang formatter
  2. Write tests
  3. Add documentation

@@ -1,2 +1,4 @@
add_subdirectory(identifiers-module)
add_subdirectory(sections-module)
add_subdirectory(sspace-search-module)
add_subdirectory(utils-module)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add newline

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this file from PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not copy utils, use it from sc-machine


#include "sc-core/sc_memory.h"

//extern sc_addr keynode_question_erase_elements;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented code. Check everywhere


#include "sc-core/sc_helper.h"
#include "sc-core/sc_memory_headers.h"
#include <stdbool.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need it?


sc_result agent_search_extensional_closure(const sc_event * event, sc_addr arg)
{
sc_addr question, answer;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sc_addr question, answer;
sc_addr action, answer;

question is deprecated


if (sc_iterator3_next(it1) == SC_TRUE) {
printf("agent search extensional closure: found element\n");
if (sc_helper_check_arc(s_default_ctx,back,sc_iterator3_value(it1,2),sc_type_arc_pos_const_temp)!=SC_TRUE) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is the first usage of back, so it is always true. Remove this if


answer = create_answer_node();
sc_addr front, back = sc_memory_node_new(s_default_ctx,sc_type_const);
SYSTEM_ELEMENT(back);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need to make it system element because you delete this node in the end of this agent. Also I am not sure if we need to make system elements in this agent everywhere


sc_iterator3_free(it1);

bool f = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename f

}
sc_iterator3_free(it2);

it2 = sc_iterator3_a_f_a_new(s_default_ctx, 0, sc_iterator3_value(it1, 2), 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sc_iterator3_value(it1, 2) is node, not connector (?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants