-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add DC verification algorithm #444
Open
xJoskiy
wants to merge
14
commits into
Desbordante:main
Choose a base branch
from
xJoskiy:DC-verification
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+1,648
−5
Commits on Oct 29, 2024
-
This class represents an operator used in predicates for Denial Constrains (DC) representation. Predicates used there are less, greater, eq, neq, geq and leq. This C++ implementation is 100% bad, there is whole bunch of objects being created, but conceptually all of them are the same. Object "Operator '+'" and another object "Operator '+'" represents the same thing. ---------------------------------------------------------------------------- This is just a copy of a java code from https://github.com/RangerShaw/FastADC. I will refactor and think about better implementation later. I'll be just copying java code to get working algorithm ASAP, and after that I'll start thinking about good implementation.
Configuration menu - View commit details
-
Copy full SHA for 14f7692 - Browse repository at this point
Copy the full SHA 14f7692View commit details -
Implement tests for Operator class
This commit adds test_dc_structures.cpp file, which will be used to test different data structures which are required for DC representation (there are a lot).
Configuration menu - View commit details
-
Copy full SHA for 383cb6d - Browse repository at this point
Copy the full SHA 383cb6dView commit details -
This class represents a column operand within a predicate for FastADC. FastADC processes Denial Constraints (DCs) that involve comparisons between pairs of rows within a dataset. A typical DC example, derived from a Functional Dependency (FD) such as A -> B, is expressed as: ∀𝑡, 𝑠 ∈ 𝑟, ¬(𝑡.𝐴 = 𝑠.𝐴 ∧ 𝑡.𝐵 ≠ 𝑠.𝐵). This denotes that for any pair of rows in the relation, it should not be the case that while the values in column "A" are equal, the values in column "B" are unequal. A predicate in this context (e.g., 𝑡.𝐴 = 𝑠.𝐴) comprises three elements to be fully represented: the column operand from the first tuple ("t.A"), the comparison operator ("="), and the column operand from the second tuple ("s.A"). The `ColumnOperand` class encapsulates the column operand part of a predicate, such as "t.A" or "s.A".
Configuration menu - View commit details
-
Copy full SHA for 73308fe - Browse repository at this point
Copy the full SHA 73308feView commit details -
First step in FastADC algorithm is to build so-called "Predicate Space". This is a long process during which many places in the code wants to get a Predicate. But each predicate is stored in a global storage -- map. In Java code this class (and other similar "provider" classes) are singletons. BaseProvider class is the class, from which a *Provider class should be derived. It ensures that only a PredicateBuilder class can initialize and free these singletons. I'm sure there exists a better approach, where we will store Provider classes in some fields to bind their lifetime more explicitly, but this is how it's done in Java, and I don't have much time to devise perfect architecture.
Configuration menu - View commit details
-
Copy full SHA for 8f727bc - Browse repository at this point
Copy the full SHA 8f727bcView commit details -
Implement PredicateProvider class
This class acts as a centralized storage to manage and provide access to Predicate objects. A Predicate is defined as "t1.A_i op t2.A_j", where t1 and t2 represent different rows, and A_i and A_j are columns (which may be the same or different) The FastADC algorithm first will build a so-called "Predicate Space", which is a set of all predicates that are allowed on R (set of rows, basically a table). In order to create and store predicates, this commit implements a singleton class with a hashmap storage.
Configuration menu - View commit details
-
Copy full SHA for 35da363 - Browse repository at this point
Copy the full SHA 35da363View commit details -
FastADC processes Denial Constraints (DCs) that involve comparisons between pairs of rows within a dataset. A typical DC example, derived from a Functional Dependency such as A -> B, is expressed as: `forall t, s in r, not (t.A = s.A and t.B != s.B)` This denotes that for any pair of rows in the relation, it should not be the case that while the values in column "A" are equal, the values in column "B" are unequal. A predicate in this context (e.g., t.A == s.A) comprises three elements to be fully represented: the column operand from the first tuple ("t.A"), the comparison operator ("="), and the column operand from the second tuple ("s.A").
Configuration menu - View commit details
-
Copy full SHA for 1604dd5 - Browse repository at this point
Copy the full SHA 1604dd5View commit details -
Add test that checks that PredicateProvider works
This simple test creates two predicates on a 2x2 table and evaluates them. We're checking for mo::GetPredicate function ability to correctly create a predicate
Configuration menu - View commit details
-
Copy full SHA for 4dbb532 - Browse repository at this point
Copy the full SHA 4dbb532View commit details -
Create temporary PredicateBuilder class
In the original FastADC pull request this class manages creation of predicates, so it initializes PredicateProvider. But in this pr this class is not required for DC verification. Hence adding a temorary class just to make the tests work
Configuration menu - View commit details
-
Copy full SHA for d33b10d - Browse repository at this point
Copy the full SHA d33b10dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 64e618e - Browse repository at this point
Copy the full SHA 64e618eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f0f986 - Browse repository at this point
Copy the full SHA 0f0f986View commit details -
Configuration menu - View commit details
-
Copy full SHA for fd29585 - Browse repository at this point
Copy the full SHA fd29585View commit details
Commits on Oct 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 90dfe6c - Browse repository at this point
Copy the full SHA 90dfe6cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a12f46 - Browse repository at this point
Copy the full SHA 4a12f46View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ccd19a - Browse repository at this point
Copy the full SHA 2ccd19aView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.