-
Notifications
You must be signed in to change notification settings - Fork 2
Logic-based argumentation extension of keml.analysis #7
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
Open
HoshankM
wants to merge
16
commits into
keml-group:logic-based-argumentation
Choose a base branch
from
HoshankM:LAF
base: logic-based-argumentation
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
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
67e9a02
logic arguments construction + initial categorizer and accumulator funcs
HoshankM acd36f4
created logic argument and argument tree objects
HoshankM f1b97dc
added static logic-utility methods to improve readability + maintenance
HoshankM 88f6c0f
minor miscellaneous improvements
HoshankM df34020
preliminary table/matrix generation + customised workbook controller
HoshankM 7c3dd0d
removed redundant methods and extended output artifacts
HoshankM 799cbd1
configured to run analysis on LAF use-case examples
HoshankM 9f4dd4e
added javadocs for LAF-related classes and methods
HoshankM bf51780
updated README to address LAF-related analysis
HoshankM 6ccf96f
fixed issue of /doc/ pngs not rendering
HoshankM 95ab252
minor change in phrasing of README
HoshankM 63ae7f4
Merge branch 'keml-group:main' into LAF
HoshankM 99965e0
small adjustments for changes in the naming of meta-model attributes
HoshankM 5a7c952
changed phrasing of README to match that of other logic-based repos
HoshankM 57803cb
Removed redundant printTree and adjusted naming in readme.md
HoshankM 13e95fa
updated java-doc of printTree() to match its functionality
HoshankM File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| package keml.analysis; | ||
|
|
||
| import java.util.ArrayList; | ||
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| import keml.Literal; | ||
|
|
||
| /** | ||
| * Tree-like data structure to facilitate the construction of Argument Trees. | ||
| * mainly used for undercuts between {@link LogicArgument}s. | ||
| */ | ||
| public class ArgumentTree { | ||
| /** root {@link LogicArgument} of the current tree*/ | ||
| LogicArgument root; | ||
| /** List of children of the root, that themselves are other trees*/ | ||
| List<ArgumentTree> children; | ||
|
|
||
| /** | ||
| * Constructor for {@link ArgumentTree} | ||
| * @param root {@link LogicArgument} | ||
| */ | ||
| public ArgumentTree(LogicArgument root) { | ||
| this.root = root; | ||
| this.children = new ArrayList<>(); | ||
| } | ||
|
|
||
|
|
||
| /** | ||
| * adds a child to this tree | ||
| * @param at {@link ArgumentTree} | ||
| */ | ||
| public void addChild (ArgumentTree at) { | ||
| this.children.add(at); | ||
| } | ||
|
|
||
|
|
||
| /** | ||
| * getter for the root of this tree | ||
| * @return {@link ArgumentTree#root} | ||
| */ | ||
| public LogicArgument getRoot() { | ||
| return root; | ||
| } | ||
|
|
||
|
|
||
| /** | ||
| * getter for the children of this root | ||
| * @return {@link ArgumentTree#children} | ||
| */ | ||
| public List<ArgumentTree> getChildren() { | ||
| return children; | ||
| } | ||
|
|
||
|
|
||
|
|
||
| /** | ||
| * a <b>static</b> method that creates a String representation of a given {@link ArgumentTree} | ||
| * @param node {@link ArgumentTree} to be represented | ||
| * @param prefix String prefix to facilitate recursive call. Should be empty ("") during first call | ||
| * @param literals2String Map of literals and their associated String symbol. See {@link LAFConversationAnalyser#literals2String} | ||
| * @param tree {@link StringBuilder} of the tree constructed so far (should be empty initially) | ||
| * @return String representation of a given tree | ||
|
|
||
| */ | ||
| public static String printTree(ArgumentTree node, String prefix, Map<Literal, String> literals2String, StringBuilder tree) { | ||
| tree.append(prefix).append("└── ").append(LogicArgument.asString(node.getRoot(), literals2String)).append("\n"); | ||
|
|
||
| for (int i = 0; i < node.getChildren().size(); i++) { | ||
| printTree(node.getChildren().get(i), prefix + " ", literals2String, tree); | ||
| } | ||
|
|
||
| return tree.toString(); | ||
| } | ||
|
|
||
| } | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really need this? I think the helper is handling the prefix itself. Do you need to go back and call this method from the helper?