diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 144443e..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json deleted file mode 100644 index ad18b71..0000000 --- a/.vscode/c_cpp_properties.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "configurations": [ - { - "name": "Mac", - "includePath": [ - "${workspaceFolder}/**" - ], - "defines": [], - "macFrameworkPath": [ - "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks" - ], - "compilerPath": "/opt/homebrew/bin/gcc", - "cStandard": "c17", - "cppStandard": "c++17", - "intelliSenseMode": "macos-clang-arm64" - } - ], - "version": 4 -} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 5c7247b..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [] -} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index f18deae..0000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "tasks": [ - { - "type": "cppbuild", - "label": "C/C++: gcc kompiluj aktywny plik", - "command": "/opt/homebrew/bin/gcc", - "args": [ - "-Wall", "-Wextra", "-Wno-implicit-fallthrough", "-std=gnu17", "-fPIC", "-O2", - "${file}", - "-o", - "${fileDirname}/${fileBasenameNoExtension}" - ], - "options": { - "cwd": "${fileDirname}" - }, - "problemMatcher": [ - "$gcc" - ], - "group": { - "kind": "build", - "isDefault": true - }, - "detail": "Zadanie wygenerowane przez debuger." - } - ], - "version": "2.0.0" -} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..6d3b97a --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# Sets-of-sequences-library +computer architecture and organization project + +**Equivalence Sets of Sequences** +The task is to implement a dynamically loaded C library that handles sets of +sequences with an equivalence relation. The elements of the sets are non-empty +sequences consisting of the numbers 0, 1, and 2. Sequences are represented +as strings in the implementation. For example, the sequence {0, 1, 2} is represented as the string "012". +Abstract classes can be named. + +**Library Interface** +The functions and type name to be provided by the library are declared in the seq.h file attached to the task description. +The following declarations are provided: + +typedef struct seq seq_t; +seq_t * seq_new(void); +void seq_delete(seq_t *p); +int seq_add(seq_t *p, char const *s); +int seq_remove(seq_t *p, char const *s); +int seq_valid(seq_t *p, char const *s); +int seq_set_name(seq_t *p, char const *s, char const *n); +char const * seq_get_name(seq_t *p, char const *s); +int seq_equiv(seq_t *p, char const *s1, char const *s2); + +The correct representation of a sequence is a non-empty string composed of the characters 0, 1, or 2, and it is terminated by a null character. +The correct name of an abstract class is a non-empty string terminated by a null character. +Additional details about the library's operation, including information about invalid parameters, can be inferred from the seq_example.c file provided, +which is an integral part of the specification. The term "the set of sequences remains unchanged" means that the observable state of the set of sequences has not changed.