Skip to content

Commit

Permalink
Advanced clock reduction (#147)
Browse files Browse the repository at this point in the history
* started advanced cases

* start_find_redundant_clocks

* test setup, needs test examples

* test setup, needs test examples

* added test component

* added get_transition

* added test component for composition

* added test component, and refactored file system for test components

* Added find transition

* Refactor

* Name refactor

* Where implementations

* Some impl

* Fixed compile error

* Changed reduce_clocks prototype

* Miss merge

* added get_children_mut

* Hardcoded clock reduction of clock y

* Hardcoded clock reduction of clock y

* merge

* heights

* compile

* Test refactor

* Warnings

* working on clock reduction analyzer

* Some debugging

* Fixed Simon Deleuran Laursen's mistake

* Fixed tests

* Reduces

* updated tests

* Naming

* can make graph from cyclic components, and cyclic component added. Updated .gitignore to ignore .ds_store file (generated by macos)

* added guard dependencies to edges

* Refactor

* Test fix-ish

* Removes from updates

* Added invariant_dependencies to nodes and converted graph.nodes to a Hashmap instead of a Vec

* fixed unused clock detection test

* made clock reduction better

* fixed naming

* Fixed another test

* Refactor

* fixed another test

* Fix error

* merged advanced-clock-reduction

* removed unnecessary mut

* merged

* Refactor

* fixed tests

* added processing to json component

* added two test cases

* added comments to find_equivalent_clock_groups

* Fixed clock reduction tests in the simple cases

* helper functions

* fixed clock reduction

* Error handling

* fmt

* working on test_check_declarations_unused_clock_are_removed

* tiny refactor

* start testfunc

* Intersect

* Small fixes

* Fix removal

* Added clock removal test for unused and duplicated clocks & removed advanced clock reduction samples

* Fix warnings

* Fixed SystemRecipe.height

* Remove print

* Fmt

* Fixed comments

Co-authored-by: Simon Laursen <[email protected]>
Co-authored-by: Kira Stæhr Pedersen <[email protected]>
Co-authored-by: Alexander Steffensen <[email protected]>
Co-authored-by: alexsteffensen <[email protected]>
Co-authored-by: Jens Emil Fink Højriis <[email protected]>
  • Loading branch information
6 people authored Nov 30, 2022
1 parent a6a163d commit 8ff768b
Show file tree
Hide file tree
Showing 22 changed files with 821 additions and 702 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ dbm/buildw/
*.a
*.obj
Cargo.lock
.DS_Store
*.DS_Store
**/*.DS_Store

2 changes: 1 addition & 1 deletion Ecdar-ProtoBuf
Submodule Ecdar-ProtoBuf updated 1 files
+2 −1 query.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "System Declarations",
"declarations": "system Component1;\n IO Component1 {foo!, bar?, baz?}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "System1",
"description": "",
"x": 182.0,
"y": 94.0,
"width": 600.0,
"height": 600.0,
"color": "4",
"systemRootX": 267.2,
"componentInstances": [
{
"id": 1,
"componentName": "Component1",
"x": 162.66666666666666,
"y": 250.0
}
],
"operators": [],
"edges": []
}
2 changes: 1 addition & 1 deletion src/DataReader/parse_edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub enum EdgeAttribute {
Guard(BoolExpression),
}

#[derive(Debug, Clone, Deserialize, Serialize, std::cmp::PartialEq, std::cmp::Eq)]
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct Update {
pub variable: String,
#[serde(serialize_with = "encode_boolexpr")]
Expand Down
Loading

0 comments on commit 8ff768b

Please sign in to comment.