-
Notifications
You must be signed in to change notification settings - Fork 19
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
Rigid casl #1845
base: master
Are you sure you want to change the base?
Rigid casl #1845
Conversation
could you please resolve the conflicts here? |
Sure. Also have to shorten some lines. |
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.
Please add more documentation.
Please resolve the todos (I have commented some, but not all).
Please add a general explanation in the style of CASL.hs.
Please merge master into this branch.
Why is RigidCASL/AS.der.hs empty?
rawToSymbol (ASymbol s) = Just s | ||
rawToSymbol (AKindedSymb k i) = | ||
case k of | ||
Sorts_kind -> Just $ Symbol i SortAsItemType |
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.
why is kind sort
assumed here?
@@ -591,8 +600,16 @@ addSymbToSign sig sy = | |||
PredAsItemType pt -> return $ addPred' sig' n pt | |||
OpAsItemType ot -> return $ addOp' sig' n ot | |||
|
|||
addNomsToSign :: Sign e f -> Set.Set Id -> Result (Sign e f) |
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.
Please add a comment documenting the function (I won' repeat this comment for other functions).
extSymbolKind t = case t of | ||
OpAsItemType (OpType k l _) -> | ||
case (k, l) of | ||
(Total, []) -> "const" |
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.
what about partial constants? Should they really lead to "op"?
|
||
-- The function below belong in a different file. But I put them here for now. | ||
-- TODO: The function below belong in a different file. But I put them here for now. |
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.
the TODO should be resolved
@@ -908,15 +915,161 @@ basicCASLAnalysis = basicAnalysis (const return) (const return) | |||
|
|||
-- | extra | |||
cASLsen_analysis :: | |||
(BASIC_SPEC () () (), Sign () (), FORMULA ()) -> Result (FORMULA ()) | |||
(BASIC_SPEC () () (), Sign () (), FORMULA ()) -> | |||
Result (FORMULA (), FORMULA ()) |
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.
please document the purpose of returning two formulas
type Ana a b s f e = Mix b s f e -> a -> State (Sign f e) a | ||
|
||
|
||
-} |
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.
???
map (\(a,b) -> mkVarTerm a b) $ (genToken "w1", st):(map (\(si, ii) -> (genToken $ "x" ++ show ii, si)) $ xs pt)) | ||
(mkPredication (mkQualPred i $ extPt $ toPRED_TYPE pt) $ | ||
map (\(a,b) -> mkVarTerm a b) $ (genToken "w2", st):(map (\(si, ii) -> (genToken $ "x" ++ show ii, si)) $ xs pt)) | ||
) $ MapSet.toPairList $ predMap sig -} |
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.
???
@@ -42,6 +44,8 @@ import qualified Control.Monad.Fail as Fail | |||
|
|||
import Framework.AS | |||
|
|||
import Debug.Trace |
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.
please remove
varP :: AParser st (String, Maybe Token) | ||
varP = {- do | ||
(s, _) <- simpleId `separatedBy` skip | ||
return (concat $ map show s, Nothing) |
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.
???
@@ -120,6 +120,7 @@ printSPEC lg spec = case spec of | |||
sep [keyword "apply" <+> pretty i, prettyLG lg $ Basic_spec bs nullRange] | |||
Bridge s1 rs s2 _ -> fsep $ [condBraces lg s1, keyword "bridge"] | |||
++ map pretty rs ++ [condBraces lg s2] | |||
HSpec _ _ _ _ -> empty |
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.
empty?
Test file at https://ontohub.org/forver/bufferDol.dol
implementation of HybridPartialAlgebraswithRigidsymbols (HPAR) in Hets:
CASL2SubCFOL True NoMembershipOrCast
Comorphisms/HPAR2CASL.hs
)