Skip to content
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

Open
wants to merge 72 commits into
base: master
Choose a base branch
from
Open

Rigid casl #1845

wants to merge 72 commits into from

Conversation

mcodescu
Copy link
Collaborator

Test file at https://ontohub.org/forver/bufferDol.dol

implementation of HybridPartialAlgebraswithRigidsymbols (HPAR) in Hets:

  • RigidCASL (PAR) extends CASL with rigid symbols
  • HPAR is the hybridization of PAR
  • HPAR2CASL is the hybridization of the comorphism CASL2SubCFOL True NoMembershipOrCast
  • for now, proofs can be done by translating the entire graph to FOL (there is a question about this in Comorphisms/HPAR2CASL.hs)
  • the branch should not be merged, the implementation is a test towards a generic hybridization method. Therefore, I did not focus so much on the style (e.g. long lines)

@mcodescu mcodescu requested a review from tillmo April 23, 2018 08:01
@tillmo
Copy link
Contributor

tillmo commented Jul 3, 2019

could you please resolve the conflicts here?

@mcodescu
Copy link
Collaborator Author

mcodescu commented Jul 3, 2019

Sure. Also have to shorten some lines.

Copy link
Contributor

@tillmo tillmo left a 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
Copy link
Contributor

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)
Copy link
Contributor

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"
Copy link
Contributor

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.
Copy link
Contributor

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 ())
Copy link
Contributor

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


-}
Copy link
Contributor

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 -}
Copy link
Contributor

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
Copy link
Contributor

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)
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants