Research Article
Fast Policy Interpretation and Dynamic Conflict Resolution for Blockchain-Based IoT System
Algorithm 1
Policy conflict resolution.
| Input: Policy graph , new policy | | Output: BOOL | | function Check | | ; | | ; | | for in do | | for in do | | ; | | end for | | end for | | ; | | ; ; //Assume that , is conflicted policy. | | ifthen | | sendPolicy(); //send to application for resolving conflict. | | return FALSE; | | else | | GraphReconstruction(); | | return TRUE; | | end if | | end function | | function GraphReconstruction | | for in do | | if ==1 then | | deleteColumn(, ); //delete the column from . | | deleteRow(,); | | end if | | end for | | if deleteColumn(, ) == TRUE then | | ; //initial weight is zero. | | ; | | ; //store the information of . | | return TRUE; | | else | | return FALSE; | | end if | | end function |
|