CafeOBJ / cafeobj

Development of the CafeOBJ interpreter
http://cafeobj.org/
Other
32 stars 6 forks source link

I would be very happy to get some advice to make a specification imported smoothly... #2

Open Kazukiysd1023 opened 5 years ago

Kazukiysd1023 commented 5 years ago

Hello,

Now I have a syntactic problem (maybe) in importing some specification into CafeOBJ. I would be very happy to get some advice to fix the problem and make it imported smoothly...

I'm trying to specify some business model innovation in the framework named "Business Model Canvas" invented by Alexander Osterwalder, etc. In that trial, I specified the framework itself as follows; and imported the mod file into CafeOBJ, but I've got the Error messages like "No possible parse for LHS" "No possible parse for RHS" I guess they're coming from some syntactical problem, so I just show a part of the specification here. (please don't mention about its semantics now)

module! BUSINESS-MODEL-CANVAS { imports { pr ( LIST ) pr ( STRING ) pr ( INT ) pr ( 2TUPLE ) pr ( 3TUPLE ) pr ( 4TUPLE ) pr ( BOOL ) pr ( STAKEHOLDER ) } signature { [BusinessModelCanvas] op [ CS CR CH KA KR KP C$ R$ ] : List List List List List List List List -> BusinessModelCanvas { constr } op profit : BusinessModelCanvas String -> Int op calc : List StakeHolder -> Int

** other operators are omited now. } axiom { var lcs : List var lcr : List var lch : List var lka : List var lkr : List var lkp : List var lc$ : List var lr$ : List var lis1 : List var str1 : String var str2 : String var str3 : String var str4 : String var str5 : String var str6 : String var int1 : Int var 2tpl : 2Tuple var 4tpl : 4Tuple var stkh1 : StakeHolder

eq profit ( [ CS lcs CR lcr CH lch KA lka KR lkr KP lkp C$ lc$ R$ lr$ ] str1 ) = calc ( lr$ str1 ) - calc ( lc$ str1 ) .

cq calc( 4tpl | lis1 stkh1 ) = 2 * 4 * 4tpl + calc( lis1 stkh1 ) if 2 * 4 * 4tpl = stkh1 .
cq calc ( 4tpl | lis1 stkh1 ) = calc ( lis1 stkh1 ) if not ( 1* 4* 4tpl = stkh1 ) ) .
eq calc ( nil stkh1 ) = 0 .

** other equations and conditional equations are omitted now.

} }

Do I make a mistake causing the above Error messages? I would be very happy to get some advices...

Thank you so much in advance.

norbusan commented 5 years ago

Thanks for your question! Can you please provide the other necessary modules (list, stakeholder at least) so that I can try it out? The definitions therein are essential for the parsing construct.

If you mind posting them here, please send them to info@cafeobj.org so that I can look at them!

Thanks

Kazukiysd1023 commented 5 years ago

Hello norbusan, Thanks so much for your quick respose and kind offer ! I'll send them to you via info@cafeobj.org. kazuki

Kazukiysd1023 commented 5 years ago

Hello norbusan,

I had sent .mod files to info@cafeobj.org on the last Friday. Did you get them?

Is there anything wrong in the specifications? I would be very happy to get your advice!

Thanks so much in advance.

kazuki

norbusan commented 5 years ago

I answered the same day (in Japanese) with a few improvements and suggestions - did you get this email?

Kazukiysd1023 commented 5 years ago

Hello norbusan, I'm very sorry for my missing your message in the mailbox. I've just found it, so I'll try to improve the specifications reading your suggestions from now.
Thanks so much for your quick and kind manner. I'd like to ask you later if I would have some troubles again.

p.s. I'm very surprised to know that you can write good Japanese!